commit 623618f78eb1de3dbb577e9c1e1d1b1d633d2a64 Author: 罗家炜 <2029049582@qq.com> Date: Tue Apr 1 10:48:36 2025 +0800 初始化提交 diff --git a/lua_probject/.vscode/launch.json b/lua_probject/.vscode/launch.json new file mode 100644 index 00000000..8191125a --- /dev/null +++ b/lua_probject/.vscode/launch.json @@ -0,0 +1,116 @@ +{ + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Cocos2-launch", + "type": "lua", + "request": "launch", + "runtimeType": "Cocos2", + "localRoot": "${workspaceRoot}", + "commandLine": "-workdir ${workspaceRoot}/../ -file src/main.lua", + "port": 7003, + "exePath": "", + "fileExtNames": [ + ".lua", + ".txt", + ".lua.txt", + ".bytes" + ], + "isFoxGloryProject": false, + "printType": 1 + }, + { + "name": "COCOS(remote debugging)", + "type": "lua", + "request": "attach", + "runtimeType": "Cocos2", + "localRoot": "${workspaceRoot}", + "port": 7003, + "fileExtNames": [ + ".lua", + ".txt", + ".lua.txt", + ".bytes" + ], + "isFoxGloryProject": false, + "printType": 1 + }, + { + "name": "Unity-ulua", + "type": "lua", + "request": "attach", + "runtimeType": "Unity", + "localRoot": "${workspaceRoot}", + "fileExtNames": [ + ".lua", + ".txt", + ".lua.txt", + ".bytes" + ], + "port": 7003, + "printType": 1 + }, + { + "name": "Unity-slua", + "type": "lua", + "request": "attach", + "runtimeType": "Unity", + "localRoot": "${workspaceRoot}", + "fileExtNames": [ + ".lua", + ".txt", + ".lua.txt", + ".bytes" + ], + "port": 7003, + "printType": 1 + }, + { + "name": "Unity-xlua", + "type": "lua", + "request": "attach", + "runtimeType": "Unity", + "localRoot": "${workspaceRoot}", + "fileExtNames": [ + ".lua", + ".txt", + ".lua.txt", + ".bytes" + ], + "port": 7003, + "printType": 1 + }, + { + "name": "OpenResty", + "type": "lua", + "request": "attach", + "runtimeType": "OpenResty", + "localRoot": "${workspaceRoot}", + "port": 7003, + "fileExtNames": [ + ".lua" + ], + "printType": 1 + }, + { + "name": "LuaTest", + "type": "lua", + "request": "launch", + "runtimeType": "LuaTest", + "mainFile": "${fileBasenameNoExtension}", + "localRoot": "${fileDirname}", + "curFileExtname": "${fileExtname}", + "fileExtNames": [ + ".lua", + ".txt", + ".lua.txt", + ".bytes" + ], + "port": 7003, + "printType": 1 + } + ] +} \ No newline at end of file diff --git a/lua_probject/.vscode/settings.json b/lua_probject/.vscode/settings.json new file mode 100644 index 00000000..59dffc19 --- /dev/null +++ b/lua_probject/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "cSpell.words": [ + "card", + "clear", + "list" + ], + "editor.snippetSuggestions": "bottom" +} \ No newline at end of file diff --git a/lua_probject/base_project/.vscode/launch.json b/lua_probject/base_project/.vscode/launch.json new file mode 100644 index 00000000..c6838831 --- /dev/null +++ b/lua_probject/base_project/.vscode/launch.json @@ -0,0 +1,17 @@ +{ + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + + + { + "type": "pwa-chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/lua_probject/base_project/.vscode/settings.json b/lua_probject/base_project/.vscode/settings.json new file mode 100644 index 00000000..0cce13b6 --- /dev/null +++ b/lua_probject/base_project/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "editor.snippetSuggestions": "bottom" +} \ No newline at end of file diff --git a/lua_probject/base_project/Core/NetClient.lua b/lua_probject/base_project/Core/NetClient.lua new file mode 100644 index 00000000..88b8aeb6 --- /dev/null +++ b/lua_probject/base_project/Core/NetClient.lua @@ -0,0 +1,192 @@ +--网络核心功能处理类 +--author:-- + +-- a net client +NetClient = { +} + +ConnectionProtocol = { + Tcp = 0, + --http 短连接 + Web = 1, +} + +SocketCode = { + --连接成功 + Connect = 0, + --断开 + Disconnect = 1, + --未知异常 + Exception = 2, + --连接服务异常 + ExceptionOnConnect = 3, + --发送数据流错误 + SendError = 4, + --接收服务器数据流异常 + ExceptionOnReceive = 5, + --服务器连接超时 + TimeoutDisconnect = 6, + --服务器断开连接 + DisconnectByServer = 7, + --客户端网络异常 + NetworkException = 8, + --连接安全异常,一般为防火墙阻止 + SecurityExceptionOnConnect = 9 +} + +--- +-- @type NetClient +local R = { + --网络地址 + hsot = "", + --网络端口 + port = 0, + --session + session = "", + --网络类型 + protocol = ConnectionProtocol.Tcp, + --c#端处理类 + c__netClient = nil, + --拦截 + holdCallback = nil +} + +local LuaNetClient = taurus.unity.LuaNetClient + +--- Create a new NetClient +-- @function [parent=#NetClient] new +-- @param #string host +-- @param #string game +-- @param #number protocol +-- @return #NetClient the created NetClient +function NetClient.new(host, game, protocol) + local self = {} + self.host = host or "" + self.game = game or "" + self.protocol = protocol or ConnectionProtocol.Tcp + -- self.responseMap = {} + self.onevent = event("onevent", false) + self.onconnect = event("onconnect", false) + --print("222222222222222222222222222222222222222222 ",host," ",host," ",game," ",self.protocol) + + self.c__netClient = LuaNetClient(host, game, self, self.protocol) + self.c__netClient:SetCallBackListener(R.c__ondata) + self.c__netClient:SetNetEventListener(R.c__onevent) + self.c__netClient:SetNetConnectListener(R.c__onconnect) + setmetatable(self, { __index = R }) + return self +end + +function R.connect(self) + if self.c__netClient == nil then + return + end + self.c__netClient:Connect() +end + +local TYPE_STRING = "string" +local TYPE_FUNC = "function" +local TYPE_TABLE = "table" +local NULL_JSON = "{}" + +--- send +function R.send(self, cmd, data, callback) + if (debug_print) then + print("send host:" .. self.host) + end + if self.c__netClient == nil then + return + end + if callback and type(callback) ~= TYPE_FUNC then return end + if data then + if type(data) ~= TYPE_TABLE then return end + end + local str = NULL_JSON + if data then + str = json.encode(data) + end + self.c__netClient:Send(cmd, str, callback) +end + +---c#网络层回调函数 +function R.c__ondata(self, cmd, result, data, func) + local _response = nil + + if type(data) == TYPE_STRING and string.len(data) > 0 then + _response = json.decode(data) + end + local new_response = {} + new_response.ReturnCode = result + new_response.Data = _response + + + if self.holdCallback ~= nil then + if self.holdCallback(new_response) then + return + end + end + + func(new_response) +end + +function R.setSession(self, session) + printlog("setSession==>>>", session) + + self.session = session + if self.c__netClient == nil then + return + end + self.c__netClient.Session = session +end + +function R.getSession(self) + printlog("getSession===>>>", self.session) + return self.session +end + +function R.getAveragePingTime(self) + if self.c__netClient == nil then + return + end + return self.c__netClient.AveragePingTime +end + +---c#网络层回调函数 +function R.c__onevent(self, cmd, data) + local new_response = {} + local _response = data and json.decode(data) or nil + new_response.Command = cmd + new_response.Data = _response + self.onevent(new_response) +end + +function R.clearActionQueue(self) + if self.c__netClient == nil then + return + end + self.c__netClient:ClearResponse() +end + +---c#网络层回调函数 +function R.c__onconnect(self, code) + if (debug_print) then + print("codeccccccccccccccccccccccccccccccccccccccc" .. code) + end + self.onconnect(code) +end + +function R.clearEvent(self) + self.onevent:Clear() + self.onconnect:Clear() +end + +function R.setHold(self, func) + self.holdcallback = func +end + +function R.destroy(self) + if self.c__netClient then self.c__netClient:Destroy() end + self.onconnect:Clear() + self.onevent:Clear() + self.c__netClient = nil +end diff --git a/lua_probject/base_project/Core/Queue.lua b/lua_probject/base_project/Core/Queue.lua new file mode 100644 index 00000000..3f82dec6 --- /dev/null +++ b/lua_probject/base_project/Core/Queue.lua @@ -0,0 +1,89 @@ +Queue = {} + + +function Queue.new(capacity) + local self = {} + setmetatable(self,{__index = Queue}) + self.capacity = capacity + self.queue = {} + self.size_ = 0 + self.head = -1 + self.rear = -1 + return self +end + +function Queue:Enqueue(element) + if self.size_ == 0 then + self.head = 0 + self.rear = 1 + self.size_ = 1 + self.queue[self.rear] = element + else + local temp = (self.rear + 1) % self.capacity + --print("1111111111111111111====>>>>") + --print(temp) + if temp == self.head then + error("Error: capacity is full.") + ViewUtil.ErrorTip(10001,"Error: capacity is full.") + return + else + self.rear = temp + end + + self.queue[self.rear] = element + self.size_ = self.size_ + 1 + end + +end + +function Queue:Dequeue() + if self:IsEmpty() then + ViewUtil.ErrorTip(10002,"Error: The Queue is empty.") + error("Error: The Queue is empty.") + return + end + self.size_ = self.size_ - 1 + self.head = (self.head + 1) % self.capacity + local value = self.queue[self.head] + return value +end + +function Queue:Clear() + self.queue = nil + self.queue = {} + self.size_ = 0 + self.head = -1 + self.rear = -1 +end + +function Queue:IsEmpty() + if self.size_ == 0 then + return true + end + return false +end + +function Queue:Count() + return self.size_ +end + +function Queue:dump() + local h = self.head + local r = self.rear + local str = nil + local first_flag = true + while h ~= r do + if first_flag == true then + str = "{"..self.queue[h] + h = (h + 1) % self.capacity + first_flag = false + else + str = str..","..self.queue[h] + h = (h + 1) % self.capacity + end + end + str = str..","..self.queue[r].."}" + if(debug_print) then + print(str) + end +end \ No newline at end of file diff --git a/lua_probject/base_project/Core/TimerManager.lua b/lua_probject/base_project/Core/TimerManager.lua new file mode 100644 index 00000000..55fbe64c --- /dev/null +++ b/lua_probject/base_project/Core/TimerManager.lua @@ -0,0 +1,96 @@ +TimerManager={} + +local timerList={} + +local isEnableTimer=false + +function TimerManager.New() + timerList={} + + UpdateBeat:Add(TimerManager.UpdateTimer) + isEnableTimer=true +end + + +function TimerManager.IsHas(funcIns) + if timerList then + for k,v in pairs(timerList) do + if v.Self==funcIns then + return true + end + end + end + return false +end + + +function TimerManager.AddTimer(timerFunc,funcIns) + if timerFunc then + if TimerManager.IsHas(funcIns) then + printlog("已经存在计时器对象") + return + end + local tempList={} + tempList.func=timerFunc + tempList.Self=funcIns + table.insert(timerList,tempList) + else + printlog("添加计时器失败===>>>") + if debug_print==true then + printlog(debug.traceback()) + end + + end + +end + + + +function TimerManager.RemoveTimer(timerFunc,Self) + if timerFunc then + for k,v in pairs(timerList) do + if v.func==timerFunc and v.Self==self then + timerList[k]=nil + --table.remove(timerList,k) + end + end + end +end + + +function TimerManager.IsEnableTimer(isEnabe) + isEnableTimer=isEnabe +end + + +function TimerManager.UpdateTimer() + if isEnableTimer and #timerList>0 then + for k,v in pairs(timerList) do + if v.func then + v.func(v.Self) + end + end + end +end + + +function TimerManager.Clear() + timerList={} +end + +function TimerManager.EnableTimer() + isEnableTimer=true +end + +function TimerManager.StopAllTimer() + isEnableTimer=false + timerList={} +end + + + + + +return TimerManager + + diff --git a/lua_probject/base_project/Core/TweenUtils.lua b/lua_probject/base_project/Core/TweenUtils.lua new file mode 100644 index 00000000..5c10f952 --- /dev/null +++ b/lua_probject/base_project/Core/TweenUtils.lua @@ -0,0 +1,13 @@ +TweenUtils = {} + +function TweenUtils.TweenFloat(from, to, duration, opupdate) + return DSTween.To(from,to,duration,opupdate) +end + +function TweenUtils.OnComplete(tweener,callback) + tweener:OnComplete(callback) +end + +function TweenUtils.Kill(tweener) + tweener:Stop() +end \ No newline at end of file diff --git a/lua_probject/base_project/Core/bit.lua b/lua_probject/base_project/Core/bit.lua new file mode 100644 index 00000000..2eb676d5 --- /dev/null +++ b/lua_probject/base_project/Core/bit.lua @@ -0,0 +1,136 @@ +--[[ + 位操作 +]] +--bit={data32={}} +bit = bit or {} +function bit.init32() + bit.data32 = {} + for i=1,32 do + bit.data32[i]=2^(32-i) + end +end +bit.init32() + +function bit:d2b(arg) --bit:d2b + local tr={} + for i=1,32 do + if arg >= self.data32[i] then + tr[i]=1 + arg=arg-self.data32[i] + else + tr[i]=0 + end + end + return tr +end + +function bit:b2d(arg) --bit:b2d + local nr=0 + for i=1,32 do + if arg[i] ==1 then + nr=nr+2^(32-i) + end + end + return nr +end + +function bit:_xor(a,b) --bit:xor + local op1=self:d2b(a) + local op2=self:d2b(b) + local r={} + + for i=1,32 do + if op1[i]==op2[i] then + r[i]=0 + else + r[i]=1 + end + end + return self:b2d(r) +end + +function bit:_and(a,b) --bit:_and + local op1=self:d2b(a) + local op2=self:d2b(b) + local r={} + + for i=1,32 do + if op1[i]==1 and op2[i]==1 then + r[i]=1 + else + r[i]=0 + end + end + return self:b2d(r) + +end + +function bit:_or(a,b) --bit:_or + local op1=self:d2b(a) + local op2=self:d2b(b) + local r={} + + for i=1,32 do + if op1[i]==1 or op2[i]==1 then + r[i]=1 + else + r[i]=0 + end + end + return self:b2d(r) +end + +function bit:_not(a) --bit:_not + local op1=self:d2b(a) + local r={} + + for i=1,32 do + if op1[i]==1 then + r[i]=0 + else + r[i]=1 + end + end + return self:b2d(r) +end + +function bit:_rshift(a,n) --bit:_rshift + local op1=self:d2b(a) + local r=self:d2b(0) + + if n < 32 and n > 0 then + for i=1,n do + for i=31,1,-1 do + op1[i+1]=op1[i] + end + op1[1]=0 + end + r=op1 + end + return self:b2d(r) +end + +function bit:_lshift(a,n) --bit:_lshift + local op1=self:d2b(a) + local r=self:d2b(0) + + if n < 32 and n > 0 then + for i=1,n do + for i=1,31 do + op1[i]=op1[i+1] + end + op1[32]=0 + end + r=op1 + end + return self:b2d(r) +end + + +function bit:print(ta) + local sr="" + for i=1,32 do + sr=sr..ta[i] + end + print(sr) +end \ No newline at end of file diff --git a/lua_probject/base_project/Core/functions.lua b/lua_probject/base_project/Core/functions.lua new file mode 100644 index 00000000..94dffd4e --- /dev/null +++ b/lua_probject/base_project/Core/functions.lua @@ -0,0 +1,304 @@ +local setmetatable = setmetatable + +function class(classname, super) + local superType = type(super) + local cls + + if superType ~= "function" and superType ~= "table" then + superType = nil + super = nil + end + + if superType == "function" or (super and super.__ctype == 1) then + -- inherited from native C++ Object + cls = {} + + if superType == "table" then + -- copy fields from super + for k,v in pairs(super) do cls[k] = v end + cls.__create = super.__create + cls.super = super + else + cls.__create = super + cls.ctor = function() end + end + + cls.__cname = classname + cls.__ctype = 1 + + function cls.new(...) + local instance = cls.__create(...) + -- copy fields from class to native object + for k,v in pairs(cls) do instance[k] = v end + instance.class = cls + instance:ctor(...) + return instance + end + + else + -- inherited from Lua Object + if super then + cls = {} + setmetatable(cls, {__index = super}) + cls.super = super + else + cls = {ctor = function() end} + end + + cls.__cname = classname + cls.__ctype = 2 -- lua + cls.__index = cls + + function cls.new(...) + local instance = setmetatable({}, cls) + instance.class = cls + instance:ctor(...) + return instance + end + end + + return cls +end + +-- 刘海偏移 +function get_offset(full_offset) + if full_offset then + local r = GRoot.inst.width / GRoot.inst.height + if r >= 2 then + local d = (Screen.dpi /160) + return d * 20 + end + end + return 0 +end + +---lua table 浅拷贝 +function membe_clone(orig) + local copy + if type(orig) == "table" then + copy = {} + for orig_key, orig_value in pairs(orig) do + copy[orig_key] = orig_value + end + else -- number, string, boolean, etc + copy = orig + end + return copy +end + +-- lua table 深拷贝 +function membe_deep_clone(orig) + local copy + if type(orig) == "table" then + copy = {} + for orig_key, orig_value in pairs(orig) do + copy[membe_deep_clone(orig_key)] = membe_deep_clone(orig_value) + end + else + copy = orig + end + return copy +end + + +---字符串分割函数 +function split(str, delimiter) + if str==nil or str=='' or delimiter==nil then + return nil + end + + local result = {} + for match in (str..delimiter):gmatch("(.-)"..delimiter) do + table.insert(result, match) + end + return result +end + + +function handler( obj,func) + return function(...) + return func(obj, ...) + end +end + +--重新require一个lua文件,替代系统文件。 +function unimport(moduleName,currentModuleName) + local package = package + local currentModuleNameParts + local moduleFullName = moduleName + local offset = 1 + + while true do + if string.byte(moduleName, offset) ~= 46 then -- . + moduleFullName = string.sub(moduleName, offset) + if currentModuleNameParts and #currentModuleNameParts > 0 then + moduleFullName = table.concat(currentModuleNameParts, ".") .. "." .. moduleFullName + end + break + end + offset = offset + 1 + + if not currentModuleNameParts then + if not currentModuleName then + local n,v = debug.getlocal(3, 1) + currentModuleName = v + end + + currentModuleNameParts = string.split(currentModuleName, ".") + end + table.remove(currentModuleNameParts, #currentModuleNameParts) + end + + package.loaded[moduleFullName] = nil + package.preload[moduleFullName] = nil +end + +function table.nums(t) + local count = 0 + for k, v in pairs(t) do + count = count + 1 + end + return count +end + +-- @param t 要检查的表格(t表示是table) +-- @param table 返回指定表格的所有键(key),它是一个键集合的表格 +--]] +function table.keys( t ) + local keys = {} + for k, _ in pairs( t ) do + keys[#keys + 1] = k + end + return keys +end + +function list_remove(t,item) + for i,v in ipairs(t) do + if v == item then + table.remove(t,i) + break + end + end +end + +function list_check(t,item) + for i,v in ipairs(t) do + if v == item then + return true + end + end + return false +end + +function list_index(t,item) + for i,v in ipairs(t) do + if v == item then + return i + end + end + return 0 +end + +function list_concat(des,tag) + for i = 1, #tag do + table.insert(des, tag[i]) + end + return des +end + +function vardump(object, label) + local lookupTable = {} + local result = {} + + local function _v(v) + if type(v) == "string" then + v = "\"" .. v .. "\"" + end + return tostring(v) + end + + local function _vardump(object, label, indent, nest) + label = label or "" + local postfix = "" + if nest > 1 then postfix = "," end + if type(object) ~= "table" then + -- if type(label) == "string" then + result[#result +1] = string.format("%s%s = %s%s", indent, label, _v(object), postfix) + -- else + -- result[#result +1] = string.format("%s%s%s", indent, _v(object), postfix) + -- end + elseif not lookupTable[object] then + lookupTable[object] = true + + -- if type(label) == "string" then + result[#result +1 ] = string.format("%s%s = {", indent, label) + -- else + -- result[#result +1 ] = string.format("%s{", indent) + -- end + local indent2 = indent .. " " + local keys = {} + local values = {} + for k, v in pairs(object) do + keys[#keys + 1] = k + values[k] = v + end + table.sort(keys, function(a, b) + if type(a) == "number" and type(b) == "number" then + return a < b + else + return tostring(a) < tostring(b) + end + end) + for i, k in ipairs(keys) do + _vardump(values[k], k, indent2, nest + 1) + end + result[#result +1] = string.format("%s}%s", indent, postfix) + end + end + _vardump(object, label, "", 1) + + return table.concat(result, "\n") +end + +function sysrandom(min,max) + local num = math.random(min,max) + return num +end + + +function IsHasDictionary(currentTarget,list) + if list and #list>0 then + for k,v in ipairs(list) do + if v==currentTarget then + return true + end + end + return false + else + return false + end +end + + +function CheckDictionaryFromContent(target,list) + if list and #list>0 then + for k,v in pairs(list) do + if v.card==target then + return true,k + end + end + else + return false + end +end + + +function CombineDictionaryAndRemoveSomeItem(list1,list2) + local tempList=membe_clone(list2) + for i=1,#list1 do + if IsHasDictionary(list1[i],list2)==false then + table.insert(tempList,list1[i]) + end + end + return tempList +end \ No newline at end of file diff --git a/lua_probject/base_project/Core/init.lua b/lua_probject/base_project/Core/init.lua new file mode 100644 index 00000000..9efb5388 --- /dev/null +++ b/lua_probject/base_project/Core/init.lua @@ -0,0 +1,20 @@ + + +import(".functions") +import(".string") +import(".Queue") +import(".NetClient") +import(".TweenUtils") +import(".bit") +ds = { + tween = {} +} + +import(".tween.DSTweenManager") +import(".tween.DSTween") +import(".tween.DSTweenQuaternion") + +DSTween = ds.tween.DSTween +DSTweenManager = ds.tween.DSTweenManager + +import(".TimerManager") \ No newline at end of file diff --git a/lua_probject/base_project/Core/string.lua b/lua_probject/base_project/Core/string.lua new file mode 100644 index 00000000..8a5d1995 --- /dev/null +++ b/lua_probject/base_project/Core/string.lua @@ -0,0 +1,305 @@ + + +string._htmlspecialchars_set = {} +string._htmlspecialchars_set["&"] = "&" +string._htmlspecialchars_set["\""] = """ +string._htmlspecialchars_set["'"] = "'" +string._htmlspecialchars_set["<"] = "<" +string._htmlspecialchars_set[">"] = ">" + +--[[-- +将特殊字符转为 HTML 转义符 +~~~ lua +print(string.htmlspecialchars("")) +-- 输出 <ABC> +~~~ +@param string input 输入字符串 +@return string 转换结果 +]] +function string.htmlspecialchars(input) + for k, v in pairs(string._htmlspecialchars_set) do + input = string.gsub(input, k, v) + end + return input +end + +--[[-- +将 HTML 转义符还原为特殊字符,功能与 string.htmlspecialchars() 正好相反 +~~~ lua +print(string.restorehtmlspecialchars("<ABC>")) +-- 输出 +~~~ +@param string input 输入字符串 +@return string 转换结果 +]] +function string.restorehtmlspecialchars(input) + for k, v in pairs(string._htmlspecialchars_set) do + input = string.gsub(input, v, k) + end + return input +end + +--[[-- +将字符串中的 \n 换行符转换为 HTML 标记 +~~~ lua +print(string.nl2br("Hello\nWorld")) +-- 输出 +-- Hello
World +~~~ +@param string input 输入字符串 +@return string 转换结果 +]] +function string.nl2br(input) + return string.gsub(input, "\n", "
") +end + +--[[-- +将字符串中的特殊字符和 \n 换行符转换为 HTML 转移符和标记 +~~~ lua +print(string.nl2br("\nWorld")) +-- 输出 +-- <Hello>
World +~~~ +@param string input 输入字符串 +@return string 转换结果 +]] +function string.text2html(input) + input = string.gsub(input, "\t", " ") + input = string.htmlspecialchars(input) + input = string.gsub(input, " ", " ") + input = string.nl2br(input) + return input +end + +--[[-- +用指定字符或字符串分割输入字符串,返回包含分割结果的数组 +~~~ lua +local input = "Hello,World" +local res = string.split(input, ",") +-- res = {"Hello", "World"} +local input = "Hello-+-World-+-Quick" +local res = string.split(input, "-+-") +-- res = {"Hello", "World", "Quick"} +~~~ +@param string input 输入字符串 +@param string delimiter 分割标记字符或字符串 +@return array 包含分割结果的数组 +]] +function string.split(input, delimiter) + input = tostring(input) + delimiter = tostring(delimiter) + if (delimiter=='') then return false end + local pos,arr = 0, {} + -- for each divider found + for st,sp in function() return string.find(input, delimiter, pos, true) end do + table.insert(arr, string.sub(input, pos, st - 1)) + pos = sp + 1 + end + table.insert(arr, string.sub(input, pos)) + return arr +end + +--[[-- +去除输入字符串头部的空白字符,返回结果 +~~~ lua +local input = " ABC" +print(string.ltrim(input)) +-- 输出 ABC,输入字符串前面的两个空格被去掉了 +~~~ +空白字符包括: +- 空格 +- 制表符 \t +- 换行符 \n +- 回到行首符 \r +@param string input 输入字符串 +@return string 结果 +@see string.rtrim, string.trim +]] +function string.ltrim(input) + return string.gsub(input, "^[ \t\n\r]+", "") +end + +--[[-- +去除输入字符串尾部的空白字符,返回结果 +~~~ lua +local input = "ABC " +print(string.ltrim(input)) +-- 输出 ABC,输入字符串最后的两个空格被去掉了 +~~~ +@param string input 输入字符串 +@return string 结果 +@see string.ltrim, string.trim +]] +function string.rtrim(input) + return string.gsub(input, "[ \t\n\r]+$", "") +end + +--[[-- +去掉字符串首尾的空白字符,返回结果 +@param string input 输入字符串 +@return string 结果 +@see string.ltrim, string.rtrim +]] +function string.trim(input) + input = string.gsub(input, "^[ \t\n\r]+", "") + return string.gsub(input, "[ \t\n\r]+$", "") +end + +--[[-- +将字符串的第一个字符转为大写,返回结果 +~~~ lua +local input = "hello" +print(string.ucfirst(input)) +-- 输出 Hello +~~~ +@param string input 输入字符串 +@return string 结果 +]] +function string.ucfirst(input) + return string.upper(string.sub(input, 1, 1)) .. string.sub(input, 2) +end + +local function urlencodechar(char) + return "%" .. string.format("%02X", string.byte(char)) +end + +--[[-- +将字符串转换为符合 URL 传递要求的格式,并返回转换结果 +~~~ lua +local input = "hello world" +print(string.urlencode(input)) +-- 输出 +-- hello%20world +~~~ +@param string input 输入字符串 +@return string 转换后的结果 +@see string.urldecode +]] +function string.urlencode(input) + -- convert line endings + input = string.gsub(tostring(input), "\n", "\r\n") + -- escape all characters but alphanumeric, '.' and '-' + input = string.gsub(input, "([^%w%.%- ])", urlencodechar) + -- convert spaces to "+" symbols + return string.gsub(input, " ", "+") +end + +--[[-- +将 URL 中的特殊字符还原,并返回结果 +~~~ lua +local input = "hello%20world" +print(string.urldecode(input)) +-- 输出 +-- hello world +~~~ +@param string input 输入字符串 +@return string 转换后的结果 +@see string.urlencode +]] +function string.urldecode(input) + input = string.gsub (input, "+", " ") + input = string.gsub (input, "%%(%x%x)", function(h) return string.char(checknumber(h,16)) end) + input = string.gsub (input, "\r\n", "\n") + return input +end + +--[[-- +计算 UTF8 字符串的长度,每一个中文算一个字符 +~~~ lua +local input = "你好World" +print(string.utf8len(input)) +-- 输出 7 +~~~ +@param string input 输入字符串 +@return integer 长度 +]] +function string.utf8len(input) + if input == nil then return 0 end + if type(input) ~= "string" then return 0 end + local len = string.len(input) + local left = len + local cnt = 0 + local arr = {0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc} + while left ~= 0 do + local tmp = string.byte(input, -left) + local i = #arr + while arr[i] do + if tmp >= arr[i] then + left = left - i + break + end + i = i - 1 + end + cnt = cnt + 1 + end + return cnt +end + +--[[ +截取utf8字符串 +@param string input 输入字符串 +@param integer index、endIndex 截取的开始和结束索引,如果没有结束索引,就从1截到index +@return string 目标字符串 +]] +function string.utf8sub(input, index, endIndex) + if input == nil or type(input) ~= "string" then return nil end + if not endIndex then + endIndex = index + index = 1 + end + local len = string.len(input) + local left = len + local cnt = 0 + local head, tail = 0, 0 + local arr = {0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc} + while left ~= 0 do + if cnt + 1 == index then + head = len - left + 1 + end + local tmp = string.byte(input, -left) + local i = #arr + while arr[i] do + if tmp >= arr[i] then + left = left - i + break + end + i = i - 1 + end + cnt = cnt + 1 + if cnt == endIndex or left == 0 then + tail = len - left + break + end + end + local rt = string.sub(input, head, tail) + return rt +end + +--[[-- +将数值格式化为包含千分位分隔符的字符串 +~~~ lua +print(string.formatnumberthousands(1924235)) +-- 输出 1,924,235 +~~~ +@param number num 数值 +@return string 格式化结果 +]] +function string.formatnumberthousands(num) + local formatted = tostring(checknumber(num)) + local k + while true do + formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') + if k == 0 then break end + end + return formatted +end + + +function string.concat( ... ) + local str = {} + local tem = {...} + for _,v in ipairs(tem) do + str[#str + 1] = v + end + return table.concat(str , "") +end \ No newline at end of file diff --git a/lua_probject/base_project/Core/tween/DSTween.lua b/lua_probject/base_project/Core/tween/DSTween.lua new file mode 100644 index 00000000..520882e7 --- /dev/null +++ b/lua_probject/base_project/Core/tween/DSTween.lua @@ -0,0 +1,398 @@ +--Tween 核心基类 +--author:-- + +local DSAxis = { + None = 0, + X = 2, + Y = 4, + Z = 8, +} + +local DSEase = { + Linear=0, + InSine=1, + OutSine=2, + InOutSine=3, + InQuad=4, + OutQuad=5, + InOutQuad=6, + InCubic=7, + OutCubic=8, + InOutCubic=9, + InQuart=10, + OutQuart=11, + InOutQuart=12, + InQuint=13, + OutQuint=14, + InOutQuint=15, + InExpo=16, + OutExpo=17, + InOutExpo=18, + InCirc=19, + OutCirc=20, + InOutCirc=21, + InElastic=22, + OutElastic=23, + InOutElastic=24, + InBack=25, + OutBack=26, + InOutBack=27, + InBounce=28, + OutBounce=29, + InOutBounce=30, +} + +local DSTweenState = ds.tween.DSTweenState + +local DSTween = { + _from = 0, + _to = 1, + _duration = 0, + _currenTime = 0, + _ease = DSEase.Linear, + _state = DSTweenState.Play, + _autoRemove=true, + _loop = 1, + _currenLoop=1, + _delay = 0, + _currenDelay = 0 +} + +ds.tween.DSAxis = DSAxis +ds.tween.DSEase = DSEase +ds.tween.DSTween = DSTween + +local function new(duration,onUpdate) + local self = {} + setmetatable(self,{__index = DSTween}) + DSTween.init(self,duration,onUpdate) + return self +end + +function DSTween:init( duration,onUpdate) + self._duration = duration + self._onUpdate = onUpdate + self._ease = DSEase.Linear + self._state = DSTweenState.Play + self._autoRemove=true + self._loop = 1 + self._currenLoop = 1 +end + +local _PiOver2 = 1.57079637 +local _TwoPi = 6.28318548 +local _EaseOvershootOrAmplitude = 1.70158 +local _EaseOne = 1 +local _EaseTwo = 2 +local _EaseZPFive = 0.5 + +local function EaseOut(time,duration) + time = time /duration + if (time < 0.363636374) then + return 7.5625 * time * time + end + if (time < 0.727272749) then + time = time -0.545454562 + return 7.5625 * time * time + 0.75 + end + if (time < 0.909090936) then + time = time - 0.8181818 + return 7.5625 * time * time + 0.9375 + end + time =time - 0.954545438 + return 7.5625 * time * time + 0.984375 +end + +local function EaseIn(time,duration) + return _EaseOne - EaseOut(duration - time, duration) +end + + +local function EaseInOut(time,duration) + if (time < duration * _EaseZPFive) then + return EaseIn(time * _EaseTwo, duration) * _EaseZPFive + end + return EaseOut(time * _EaseTwo - duration, duration) * _EaseZPFive + _EaseZPFive +end + + +local function Evaluate(easeType, time, duration) + local period = 0 + if (easeType == DSEase.Linear) then + return time / duration + elseif (easeType == DSEase.InSine) then + return -math.cos((time / duration * _PiOver2)) + _EaseOne + elseif (easeType == DSEase.OutSine) then + return math.sin((time / duration * _PiOver2)) + elseif (easeType == DSEase.InOutSine) then + return -_EaseZPFive * (math.cos((math.pi * time / duration)) - _EaseOne) + elseif (easeType == DSEase.InQuad) then + time = time /duration + return time * time + elseif (easeType == DSEase.OutQuad) then + time = time /duration + return -time * (time - _EaseTwo) + elseif (easeType == DSEase.InOutQuad) then + time = time / (duration * _EaseZPFive) + if (time < _EaseOne) then + return _EaseZPFive * time * time + end + time = time - _EaseOne + return -_EaseZPFive * (time * (time - _EaseTwo) - _EaseOne) + elseif (easeType == DSEase.InCubic) then + time = time / duration + return time * time * time + elseif (easeType == DSEase.OutCubic) then + time = time /duration - _EaseOne + return time * time * time + _EaseOne + elseif (easeType == DSEase.InOutCubic) then + time = time/(duration * _EaseZPFive) + if (time < _EaseOne) then + return _EaseZPFive * time * time * time + end + time = time - _EaseTwo + return _EaseZPFive * (time * time * time + _EaseTwo) + elseif (easeType == DSEase.InQuart) then + time = time /duration + return time* time * time * time + elseif (easeType == DSEase.OutQuart) then + time = time / duration - _EaseOne + return -(time * time * time * time - _EaseOne); + elseif (easeType == DSEase.InOutQuart) then + time = time /( duration * _EaseZPFive) + if (time < _EaseOne) then + return _EaseZPFive * time * time * time * time + end + time = time - _EaseTwo + return -_EaseZPFive * (time * time * time * time - _EaseTwo) + elseif (easeType == DSEase.InQuint) then + time = time / duration + return time * time * time * time * time; + elseif (easeType == DSEase.OutQuint) then + time = time / duration - _EaseOne + return time * time * time * time * time + _EaseOne + elseif (easeType == DSEase.InOutQuint) then + time = time / (duration * _EaseZPFive) + if (time < _EaseOne) then + return _EaseZPFive * time * time * time * time * time + end + time = time - _EaseTwo + return _EaseZPFive * (time * time * time * time * time + _EaseTwo) + elseif (easeType == DSEase.InExpo) then + if (time ~= 0) then + return math.pow(_EaseTwo, 10 * (time / duration - _EaseOne)) + end + return 0 + elseif (easeType == DSEase.OutExpo) then + if (time == duration) then + return 1 + end + return -math.pow(_EaseTwo, (-10 * time / duration)) + _EaseOne + elseif (easeType == DSEase.InOutExpo) then + if (time == 0) then + return 0 + end + if (time == duration) then + return _EaseOne + end + time = time/( duration * _EaseZPFive) + if (time < _EaseOne) then + return _EaseZPFive * math.pow(_EaseTwo, (10 * (time - _EaseOne))) + end + time = time - _EaseOne + return _EaseZPFive * (-math.pow(_EaseTwo, (-10 * time) + 2)) + elseif (easeType == DSEase.InCirc) then + time = time / duration + return -(math.sqrt((_EaseOne - time * time)) - _EaseOne) + elseif (easeType == DSEase.OutCirc) then + time = time / duration - _EaseOne + return math.sqrt((_EaseOne - time * time)) + elseif (easeType == DSEase.InOutCirc) then + time = time / (duration * _EaseZPFive) + if (time < _EaseOne) then + return -_EaseZPFive * (math.sqrt((_EaseOne - time * time)) - _EaseOne) + end + time = time - _EaseTwo + return _EaseZPFive * (math.sqrt((_EaseOne - time * time)) + _EaseOne) + elseif (easeType == DSEase.InElastic) then + if (time == 0) then + return 0 + end + time = time / duration + if (time == _EaseOne) then + return _EaseOne + end + period = duration * 0.3 + local num = period / _TwoPi * math.asin((_EaseOne / _EaseOvershootOrAmplitude)) + time = time -_EaseOne + return -(_EaseOvershootOrAmplitude * math.pow(_EaseTwo, (10.0 * time)) * math.sin((time * duration - num) * _TwoPi / period)) + elseif (easeType == DSEase.OutElastic) then + if (time == 0) then + return 0 + end + time = time / duration + if (time == _EaseOne) then + return _EaseOne + end + period = duration * 0.3 + local num2 = period / _TwoPi * math.asin((_EaseOne / _EaseOvershootOrAmplitude)) + return _EaseOvershootOrAmplitude * math.pow(_EaseTwo, -10 * time) * math.sin((time * duration - num2) * _TwoPi / period) + _EaseOne + elseif (easeType == DSEase.InOutElastic) then + if (time == 0) then + return 0 + end + time = time / (duration * _EaseZPFive) + if (time == _EaseTwo) then + return _EaseOne + end + period = duration * 0.450000018 + local num3 = period / _TwoPi * math.asin(_EaseOne / _EaseOvershootOrAmplitude) + if (time < _EaseOne) then + time = time - _EaseOne + return -_EaseZPFive * (_EaseOvershootOrAmplitude * math.pow(_EaseTwo, (10 * time)) * math.sin(((time * duration - num3) * _TwoPi / period))) + end + time = time - _EaseOne + return _EaseOvershootOrAmplitude * math.pow(_EaseTwo, (-10 * time)) * math.sin(((time * duration - num3) * _TwoPi / period)) * _EaseZPFive + _EaseOne; + elseif (easeType == DSEase.InBack) then + time = time / duration + return time * time * ((_EaseOvershootOrAmplitude + _EaseOne) * time - _EaseOvershootOrAmplitude) + elseif (easeType == DSEase.OutBack) then + time = time / duration - _EaseOne + return time * time * ((_EaseOvershootOrAmplitude + _EaseOne) * time + _EaseOvershootOrAmplitude) + _EaseOne + elseif (easeType == DSEase.InOutBack) then + local overshootOrAmplitude = _EaseOvershootOrAmplitude + time = time / (duration * _EaseZPFive) + if (time < _EaseOne) then + overshootOrAmplitude = overshootOrAmplitude * 1.525 + return _EaseZPFive * (time * time * ((overshootOrAmplitude + _EaseOne) * time - overshootOrAmplitude)) + end + time = time -_EaseTwo + overshootOrAmplitude = overshootOrAmplitude * 1.525 + return _EaseZPFive * (time * time * ((overshootOrAmplitude + _EaseOne) * time + overshootOrAmplitude) + _EaseTwo) + elseif (easeType == DSEase.InBounce) then + return _EaseOne - EaseOut(duration - time, duration) + elseif (easeType == DSEase.OutBounce) then + return EaseOut(time, duration) + elseif (easeType == DSEase.InOutBounce) then + return EaseInOut(time, duration) + else + time = time / duration + return -time * (time - _EaseTwo) + end +end + + +function DSTween:CallUpdate(value) + if (self._onUpdate ~= nil) then + self._onUpdate(value) + end +end + + +function DSTween:Update(deltaTime) + local _state = self._state + local _currenTime = self._currenTime + local _duration = self._duration + if (_state == DSTweenState.Stop) then + return + end + if (_state == DSTweenState.Delay) then + if (_currenDelay >= _delay) then + _state = DSTweenState.Play + else + self._currenDelay = self._currenDelay + deltaTime + return + end + end + + _currenTime = math.min(_currenTime, _duration) + local value = Evaluate(self._ease, _currenTime, _duration) + + local tem = self._from + (self._to - self._from) * value + self:CallUpdate(tem) + if (_currenTime >= _duration) then + if (self._loop == -1 or self._currenLoop < self._loop) then + self._currenTime = 0 + self._currenLoop = self._currenLoop + 1 + return + end + self._state = DSTweenState.Stop + if (self._onComplete ~= nil) then + self._onComplete(self) + end + return + end + self._currenTime = _currenTime + deltaTime + end + +-- 停止 +function DSTween:Stop() + self._state = DSTweenState.Stop + self._currenDelay = 0 + self._currenTime = 0 + self._currenLoop = 1 + return self +end + +-- 重新启动 +function DSTween:Play() + self._state = self._delay>0 and DSTweenState.Delay or DSTweenState.Play + self._currenDelay = 0 + self._currenTime = 0 + self._currenLoop = 1 + return self +end + + +-- 重新启动 +function DSTween:Restart() + return self:Play() +end + +-- 设置循环次数 +function DSTween:SetLoop(loop) + self._loop = loop + return self +end + + +-- 重新设置Tween参数 +function DSTween:ChangeValues(from,to,duration) + self._from = from + self._to = to + self._duration = duration + return self +end + +---设置Tween补间类型 +function DSTween:SetEase(ease) + self._ease = ease + return self +end + + +-- 设置完成事件监听 +function DSTween:OnComplete(onComplete) + self._onComplete = onComplete + return self +end + +function DSTween:SetDelay(delay) + self._delay = delay + return self +end + +function DSTween:GetState() + return self._state +end + + +local DSTweenManager = ds.tween.DSTweenManager + +function DSTween.To(from,to,duration,onUpdate) + local tween = new(duration, onUpdate) + tween._from = from + tween._to = to + DSTweenManager.AddActiveTween(tween); + return tween +end diff --git a/lua_probject/base_project/Core/tween/DSTweenManager.lua b/lua_probject/base_project/Core/tween/DSTweenManager.lua new file mode 100644 index 00000000..9ca183f2 --- /dev/null +++ b/lua_probject/base_project/Core/tween/DSTweenManager.lua @@ -0,0 +1,51 @@ +--Tween 管理 +--author:-- + +local _MaxActiveTween=200 +local _totActiveTweens = 0 +local _activeTweens = {} + +local DSTweenManager = {} + +local DSTweenState = { + Play = 0, + Stop = 1, + Delay = 2 +} +ds.tween.DSTweenState = DSTweenState + +function DSTweenManager.Update(deltaTime) + if (deltaTime == 0) then + return + end + local i = 1 + while i <= #_activeTweens do + local t = _activeTweens[i] + if t ~=nil then + if (not (t._autoRemove and t._state == DSTweenState.Stop)) then + t:Update(deltaTime) + i = i +1 + else + table.remove(_activeTweens,i) + i = i -1 + _totActiveTweens = _totActiveTweens - 1 + end + else + i = i +1 + end + + end +end + +function DSTweenManager.AddActiveTween(t) + _activeTweens[#_activeTweens+1] = t + t:Play() + _totActiveTweens = _totActiveTweens + 1 +end + +function DSTweenManager.ClearTween() + _activeTweens = {} + _totActiveTweens = 0 +end + +ds.tween.DSTweenManager = DSTweenManager \ No newline at end of file diff --git a/lua_probject/base_project/Core/tween/DSTweenQuaternion.lua b/lua_probject/base_project/Core/tween/DSTweenQuaternion.lua new file mode 100644 index 00000000..3d2efbb5 --- /dev/null +++ b/lua_probject/base_project/Core/tween/DSTweenQuaternion.lua @@ -0,0 +1,62 @@ +--Tween Quaternion +--author:-- + +local DSTween = ds.tween.DSTween + +local DSTweenQuaternion = {} + +ds.tween.DSTweenQuaternion = DSTweenQuaternion + +local function new(duration,onUpdate) + local self = {} + setmetatable(DSTweenQuaternion,{__index = DSTween}) + setmetatable(self,{__index = DSTweenQuaternion}) + DSTween.init(self,duration,onUpdate) + return self +end + +function DSTweenQuaternion:CallUpdate(value) + local vector = self._startValue + vector = self._startValue + self._changeValue * value + local r = Quaternion.Euler(vector.x,vector.y,vector.z) + if (self._target ~= null) then + self._target.rotation = r + end + if (self._onUpdate ~= nil) then + self._onUpdate(r) + end +end + +local DSTweenManager = ds.tween.DSTweenManager + +function DSTweenQuaternion.To(target,to,duration,onUpdate) + local tween = new(duration, onUpdate) + tween._startValue = target.rotation.eulerAngles + tween._target = target + local endValue = to + if (endValue.x > 360) then + endValue.x = endValue.x % 360 + end + if (endValue.y > 360) then + endValue.y = endValue.y % 360 + end + if (endValue.z > 360) then + endValue.z = endValue.z % 360 + end + local changeValue = endValue - tween._startValue + local num = (changeValue.x > 0) and changeValue.x or (-changeValue.x) + if (num > 180) then + changeValue.x = ((changeValue.x > 0) and (-(360 - num)) or (360 - num)) + end + num = ((changeValue.y > 0) and changeValue.y or (-changeValue.y)) + if (num > 180) then + changeValue.y = ((changeValue.y > 0) and (-(360 - num)) or (360 - num)) + end + num = ((changeValue.z > 0) and changeValue.z or (-changeValue.z)) + if (num > 180) then + changeValue.z = ((changeValue.z > 0) and (-(360 - num)) or (360 - num)) + end + tween._changeValue = changeValue + DSTweenManager.AddActiveTween(tween) + return tween +end \ No newline at end of file diff --git a/lua_probject/base_project/FairyGUI.lua b/lua_probject/base_project/FairyGUI.lua new file mode 100644 index 00000000..17cb674e --- /dev/null +++ b/lua_probject/base_project/FairyGUI.lua @@ -0,0 +1,141 @@ +EventContext = FairyGUI.EventContext +EventListener = FairyGUI.EventListener +EventDispatcher = FairyGUI.EventDispatcher +InputEvent = FairyGUI.InputEvent +NTexture = FairyGUI.NTexture +Container = FairyGUI.Container +Image = FairyGUI.Image +Stage = FairyGUI.Stage +Controller = FairyGUI.Controller +GObject = FairyGUI.GObject +GGraph = FairyGUI.GGraph +GGroup = FairyGUI.GGroup +GImage = FairyGUI.GImage +GLoader = FairyGUI.GLoader +GMovieClip = FairyGUI.GMovieClip +TextFormat = FairyGUI.TextFormat +GTextField = FairyGUI.GTextField +GRichTextField = FairyGUI.GRichTextField +GTextInput = FairyGUI.GTextInput +GComponent = FairyGUI.GComponent +GList = FairyGUI.GList +GRoot = FairyGUI.GRoot +GLabel = FairyGUI.GLabel +GButton = FairyGUI.GButton +GComboBox = FairyGUI.GComboBox +GProgressBar = FairyGUI.GProgressBar +GSlider = FairyGUI.GSlider +PopupMenu = FairyGUI.PopupMenu +ScrollPane = FairyGUI.ScrollPane +Transition = FairyGUI.Transition +UIPackage = FairyGUI.UIPackage +Window = FairyGUI.Window +GObjectPool = FairyGUI.GObjectPool +Relations = FairyGUI.Relations +RelationType = FairyGUI.RelationType +UIPanel = FairyGUI.UIPanel +UIPainter = FairyGUI.UIPainter +TypingEffect = FairyGUI.TypingEffect +GTween = FairyGUI.GTween +GTweener = FairyGUI.GTweener +EaseType = FairyGUI.EaseType + +fgui = {} + +--[[ +用于继承FairyGUI的Window类,同时派生的Window类可以继续被继承。可以重写的方法有(与Window类里的同名方法含义完全相同) +OnInit、DoHideAnimation、DoShowAnimation、OnShown、OnHide。 +例子: +MyWinClass = fgui.window_class() +function MyWinClass:ctor() + print('MyWinClass-ctor') + self.contentPane = UIPackage.CreateObject("Basics", "WindowA") +end +function MyWinClass:OnShown() + print('MyWinClass-onShown') +end +local win = MyWinClass.New() +win:Show() +]] +function fgui.window_class(base) + local o = {} + + local base = base or FairyGUI.Window + setmetatable(o, base) + + o.__index = o + o.base = base + + o.New = function(...) + local t = {} + setmetatable(t, o) + + local ins = FairyGUI.Window.New() + tolua.setpeer(ins, t) + ins:SetLuaPeer(t) + if t.ctor then + t.ctor(ins,...) + end + + return ins + end + + return o +end + +--[[ +注册组件扩展,用于继承FairyGUI原来的组件类。 + +例子: + +MyButton = fgui.extension_class(GButton) +fgui.register_extension("ui://包名/我的按钮", MyButton) + +function MyButton:ctor() --当组件构建完成时此方法被调用 + print(self:GetChild("n1")) +end + +--添加自定义的方法和字段 +function MyButton:Test() + print('test') +end + +local get = tolua.initget(MyButton) +local set = tolua.initset(MyButton) +get.myProp = function(self) + return self._myProp +end + +set.myProp = function(self, value) + self._myProp = value + self:GetChild('n1').text = value +end + +local myButton = someComponent:GetChild("myButton") --这个myButton的资源是“我的按钮” +myButton:Test() +myButton.myProp = 'hello' + +local myButton2 = UIPackage.CreateObject("包名","我的按钮") +myButton2:Test() +myButton2.myProp = 'world' +]] + +function fgui.register_extension(url, extension) + FairyGUI.UIObjectFactory.SetExtension(url, typeof(extension.base), extension.Extend) +end + +function fgui.extension_class(base) + local o = {} + o.__index = o + + o.base = base or GComponent + + o.Extend = function(ins) + local t = {} + setmetatable(t, o) + tolua.setpeer(ins,t) + return t + end + + return o +end diff --git a/lua_probject/base_project/Game/Controller/GameController.lua b/lua_probject/base_project/Game/Controller/GameController.lua new file mode 100644 index 00000000..b6399ee6 --- /dev/null +++ b/lua_probject/base_project/Game/Controller/GameController.lua @@ -0,0 +1,627 @@ +--- Base GameEvent + +GameEvent = { + -- 状态 + PlayerState = 'PlayerState', + -- 聊天 + Interaction = 'Interaction', + -- 玩家离开 + PlayerLeave = 'PlayerLeave', + -- 玩家进入 + PlayerEnter = 'PlayerEnter', + -- 玩家准备 + PlayerReady = 'PlayerReady', + -- 解散 + DeskBreak = 'DeskBreak', + -- 被踢出房间 + OnKicked = 'OnKicked', + -- 更新玩家信息 + OnUpdateInfo = 'OnUpdateInfo', + + --打开托管 + TupGuanOpen='TupGuanOpen', + --关闭托管 + TupGuanClose='TupGuanClose', + + --麻将修改牌大小 + MJModifySzie='MJModifySzie', +} + +--- Base GameController +GameController = { + _name = '', + --事件MAP + _eventmap = nil, + --事件缓存 + _cacheEvent = nil, + --事件发送器 + _dispatcher = nil +} + +local M = GameController + +setmetatable(M, {__index = IController}) + +function M:init(name) + self._name = name + self.baseType = GameController + self._cacheEvent = Queue.new(1000) + self._eventmap = {} + self._dispatcher = {} + self._eventmap[Protocol.FGMGR_EVT_UPDATE_RECONECT]=self.ResetConnect + + self._eventmap[Protocol.GAME_EVT_PLAYER_JOIN] = self.OnEventPlayerEnter + self._eventmap[Protocol.GAME_EVT_PLAYER_NET_STATE] = self.OnEventOnlineState + self._eventmap[Protocol.GAME_EVT_PLAYER_EXIT] = self.OnEventPlayerLeave + self._eventmap[Protocol.GAME_EVT_READY] = self.OnEventPlayerReady + self._eventmap[Protocol.GAME_EVT_READY_AND_XIPAI] = self.OnEventPlayerXiPaiReady + + self._eventmap[Protocol.GAME_EVT_EXIT_ROOM_DISMISS] = self.OnEventExitRoomDismiss + self._eventmap[Protocol.GAME_EVT_DISMISS_ROOM] = self.OnEventDismissRoom + self._eventmap[Protocol.GAME_EVT_DISMISS_ROOM_VOTE] = self.OnEventDismissRoomVote + self._eventmap[Protocol.GAME_EVT_DISMISS_ROOM_FAIL] = self.OnEventDismissRoomFail + + self._eventmap[Protocol.GAME_EVT_INTERACTION] = self.OnEventInteraction + self._eventmap[Protocol.GAME_EVT_UPDATE_GPS] = self.OnEventUpdateGPS + + self._eventmap[Protocol.GAME_EVT_KICKED] = self.OnEventKicked + self._eventmap[Protocol.GAME_EVT_UPDATE_PLAYERINFO] = self.OnEvtUpdateInfo + + self._eventmap[Protocol.GAME_EVT_READY_ENTRUST] = self.OnEvtOpenTupGTips + self._eventmap[Protocol.GAME_EVT_CANCEL_READY_ENTRUST] = self.OnEvtCloseTupGTips + + --self._eventmap[Protocol.GAME_AUTO_CARD] = self.OnEvtOpenGameHuTuoGtips + + +end + +function DispatchEvent(_dispatcher, evt_name, ...) + local func = _dispatcher[evt_name] + if func then + func(...) + end +end + +function M:AddEventListener(evt_name, func) + self._dispatcher[evt_name] = func +end + + +function M:ResetConnect() +-- print("断线重连================") + --ControllerManager.OnConnect(SocketCode.TimeoutDisconnect) + ViewManager.refreshGameView() +end + +----------------------请求------------------------------------ + +--请求准备 +function M:PlayerReady() + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + _client:send(Protocol.GAME_READY) +end + +function M:PlayerXiPai() + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + _client:send(Protocol.GAME_READY_AND_XIPAI) +end + +--请求准备 +function M:StartGame() + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + _client:send(Protocol.GAME_START) +end + +--聊天 +-- +--1表情 2固定语音 3语音 4文本 5互动 +-- +function M:SendInteraction(playid, type, parm, callback) + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + local _data = {} + _data['playerid'] = playid + _data['type'] = type + _data['parm'] = parm + _client:send(Protocol.GAME_INTERACTION, _data) +end + +--请求离开房间 +function M:LevelRoom(callBack) + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + _client:send( + Protocol.GAME_EXIT_ROOM, + nil, + function(res) + if res.ReturnCode == 0 then + ControllerManager.ChangeController(LoddyController) + end + callBack(res) + end + ) +end + +--请求解散房间 +function M:AskDismissRoom() + local _curren_msg = MsgWindow.new(self._root_view, '是否发起解散?', MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add(function() + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + _client:send(Protocol.GAME_ASK_DISMISS_ROOM,nil,function (res) + if res.ReturnCode == 84 then + ViewUtil.ErrorTip(res.ReturnCode,"解散失败") + end + end) + end) + _curren_msg:Show() +end + +--解散房间投票 +function M:DismissRoomVote(agree) + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + -- print(agree) + local _data = {} + _data['result'] = agree + _client:send(Protocol.GAME_DISMISS_ROOM_VOTE, _data) +end + +--发送GPS坐标 +function M:SendGPS(str) + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + local _data = {} + _data['pos'] = str + _client:send(Protocol.GAME_SEND_GPS, _data) +end + +--------------------事件----------------------------------- + +-- 房主退出 房间解散 +function M:OnEventExitRoomDismiss(evt_data) + self._cacheEvent:Enqueue( + function() + ControllerManager.ChangeController(LoddyController) + DispatchEvent(self._dispatcher, GameEvent.DeskBreak, 1) + end + ) +end + +-- 显示投票选择 +function M:OnEventDismissRoom(evt_data) + self._cacheEvent:Enqueue( + function() + local room = DataManager.CurrenRoom + local req_aid = evt_data['req_aid'] + evt_data.req_p = room:GetPlayerById(req_aid) + local player_list = room.player_list + local tem_list = {} + local list = evt_data['list'] + + for k = 1, #player_list do + local p = nil + for i = 1, #list do + local tem = list[i] + if tem.aid == player_list[k].self_user.account_id then + tem.player = player_list[k] + p = tem + break + end + end + if not p then + p = {} + p.player = player_list[k] + p.result = 0 + end + tem_list[k] = p + end + evt_data['list'] = tem_list + + DispatchEvent(self._dispatcher, GameEvent.DeskBreak, 0, evt_data) + end + ) +end + +-- -- 投票结果 +-- function M:OnEventDismissRoomVote(evt_data) +-- local aid = evt_data["aid"] +-- local result = evt_data["result"] +-- local p = DataManager.CurrenRoom:GetPlayerById(aid) +-- DispatchEvent(self._dispatcher,GameEvent.DeskBreak, 2,p,result) +-- end + +-- 解散失敗 +function M:OnEventDismissRoomFail(evt_data) + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, GameEvent.DeskBreak, 3) + end + ) +end + +-- 玩家进 +function M:OnEventPlayerEnter(evt_data) + --print("进入房间++++++++++++++++++++++++++++++++++++++") + self._cacheEvent:Enqueue( + function() + local p = self._room:NewPlayer() + local _user + _user = User.new() + _user.account_id = evt_data['aid'] + _user.host_ip = evt_data['ip'] + _user.nick_name = evt_data['nick'] + _user.head_url = evt_data['portrait'] + _user.sex = evt_data['sex'] + _user.location = Location.new(evt_data['pos'] or '') + p.seat = evt_data['seat'] + p.ready = evt_data['ready'] == 1 and true or false + p.cur_hp = evt_data['cur_hp'] or 0 + p.spectator = evt_data['spectator'] + -- p.total_hp = evt_data["total_hp"] or 0 + if evt_data['hp_info'] then + p.cur_hp = evt_data.hp_info.cur_hp + -- p.total_hp = evt_data.hp_info.total_hp + end + p.self_user = _user + p.line_state = 1 + DataManager.CurrenRoom:AddPlayer(p) + DispatchEvent(self._dispatcher, GameEvent.PlayerEnter, p) + + end + ) +end + +-- 玩家离开 +function M:OnEventPlayerLeave(evt_data) + self._cacheEvent:Enqueue( + function() + local playerid = evt_data['aid'] + local p = DataManager.CurrenRoom:GetPlayerById(playerid) + self._room:RemovePlayer(p) + DispatchEvent(self._dispatcher, GameEvent.PlayerLeave, p) + end + ) +end + +-- 网络状态更新 +function M:OnEventOnlineState(evt_data) + self._cacheEvent:Enqueue( + function() + local playerid = evt_data['aid'] + local online = evt_data['online'] + local player = DataManager.CurrenRoom:GetPlayerById(playerid) + if player ~= nil then + player.line_state = online + DispatchEvent(self._dispatcher, GameEvent.PlayerState, player) + end + end + ) +end + +-- 玩家准备 +function M:OnEventPlayerReady(evt_data) + self._cacheEvent:Enqueue( + function() + local pid = evt_data['aid'] + local p = self._room:GetPlayerById(pid) + p.ready = true + if evt_data.start~=nil then + if evt_data.start==1 then + p.isSendCardState=true + else + p.isSendCardState=false + end + + else + p.isSendCardState=false + end + + DispatchEvent(self._dispatcher, GameEvent.PlayerReady, p) + end + ) +end + + +function M:OnEventPlayerXiPaiReady(evt_data) + self._cacheEvent:Enqueue( + function() + local pid = evt_data['aid'] + local p = self._room:GetPlayerById(pid) + p.ready = true + if evt_data.start~=nil then + if evt_data.start==1 then + p.isSendCardState=true + else + p.isSendCardState=false + end + + else + p.isSendCardState=false + end + + DispatchEvent(self._dispatcher, GameEvent.PlayerReady, p) + end + ) +end + + + +-- 聊天事件 +function M:OnEventInteraction(evt_data) + if self._room.ban_chat1 == false or self._room.ban_chat2 == false then + self._cacheEvent:Enqueue( + function() + local playerid = evt_data['playerid'] + local p = self._room:GetPlayerById(playerid) + local type1 = evt_data['type'] + local parm = evt_data['parm'] + DispatchEvent(self._dispatcher, GameEvent.Interaction, p, type1, parm) + end + ) + end +end + +-- GPS更新事件 +function M:OnEventUpdateGPS(evt_data) + self._cacheEvent:Enqueue( + function() + local seat = evt_data['seat'] + local pos = evt_data['pos'] + if seat == 0 or seat == 'skip' then + return + end + local p = self._room:GetPlayerBySeat(seat) + p.self_user.location = Location.new(pos) + end + ) +end + + +-- 被踢出房间事件 +function M:OnEventKicked() + if ViewManager.GetCurrenView().dview_class == LobbyView then + DataManager.CurrenRoom = nil + ControllerManager.SetGameNetClient(nil, true) + ControllerManager.ChangeController(LoddyController) + return + end + self._cacheEvent:Enqueue( + function() + DataManager.CurrenRoom = nil + ControllerManager.SetGameNetClient(nil, true) + ControllerManager.ChangeController(LoddyController) + DispatchEvent(self._dispatcher, GameEvent.OnKicked) + end + ) +end + +-- 托管 +function M:Entrust(ok, info) + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + local data = {} + data.ok = ok + data.info = info + _client:send(Protocol.GAME_ENTRUST, data) +end + +-- 入座 +function M:JoinSeat(callback) + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + _client:send(Protocol.GAME_JOIN_SEAT, nil, function(res) + if res.ReturnCode == 0 then + self._room.self_player.spectator = false + end + if callback then + callback(res) + end + end) +end + +-- 更新事件 +function M:OnEvtUpdateInfo(evt_data) + self._cacheEvent:Enqueue( + function() + local pid = evt_data['aid'] + local p = self._room:GetPlayerById(pid) + local t = evt_data['type'] + if t == 5 then + p.entrust = evt_data['entrust'] + end + DispatchEvent(self._dispatcher, GameEvent.OnUpdateInfo, p, t) + end + ) +end + +function M:ClearPlayerData() + local _room = self._room + for i = 1, #_room.player_list do + _room.player_list[i]:Clear() + end +end + +function M:PopEvent() + local _cacheEvent = self._cacheEvent + if (_cacheEvent:Count() > 0) then + return _cacheEvent:Dequeue() + end +end + +local function list_add(list, val) + if not list_check(list, val) then + table.insert(list, val) + end +end +-- 检查 gps距离、ip地址 +function M:CheckGPS() + local plist = {} + local warnList = {} + local ipList = {} + local player_list = self._room.player_list + -- GPS + for i = 1, #player_list do + local player1 = player_list[i] + if player1.self_user ~= DataManager.SelfUser then + local loc1 = player1.self_user.location + if not loc1 or loc1.default then + -- 数据类型:gps警告,只有此处使用了 + -- type:0.没有打开gps,1.距离过近,2.ip地址一样 + local warn = {} + warn.type = 0 + warn.seat = player1.seat + return true + elseif i < #player_list then + for j = i + 1, #player_list do + local player2 = player_list[j] + if player2.self_user ~= DataManager.SelfUser then + local loc2 = player2.self_user.location + if not loc2 or loc2.default then + local warn = {} + warn.type = 0 + warn.seat = player2.seat + return true + else + local dist = loc1:CalcDistance(loc2) + if dist < 0.2 then + local warn = {} + warn.type = 1 + warn.seat = player1.seat + warn.seat2 = player2.seat + return true + end + end + end + end + end + end + local p = player1 + if p.self_user ~= DataManager.SelfUser then + local ip = p.self_user.host_ip + if not list_check(ipList, ip) then + table.insert(ipList, ip) + else + return true + end + end + end + return false +end + +function M:GetGPS() + -- if not DataManager.SelfUser.location.default then return end + -- 获取GPS + get_gps( + function() + self:SendGPS(DataManager.SelfUser.location:Location2String()) + end + ) +end + +function M:OnEnter() + if (debug_print) then + print(self._name .. '进入Game控制器') + end + self._room = DataManager.CurrenRoom + local _client = ControllerManager.GameNetClinet + _client.onevent:Add(self.__OnNetEvent, self) + + -- self:GetGPS() +end + +function M:OnExit() + if (debug_print) then + print(self._name .. ' 离开Game控制器') + end + ControllerManager.SetGameNetClient(nil) + self._cacheEvent:Clear() +end + +function M:__OnNetEvent(msg) + --print("Game消息ID===>>"..msg.Command) + local func = self._eventmap[msg.Command] + if (func ~= nil) then + func(self, msg.Data) + end +end + +function M:ReturnToRoom() + local roomCtr = ControllerManager.GetController(RoomController) + roomCtr:PublicJoinRoom( + Protocol.WEB_FG_JOIN_ROOM, + self.tmpRoomID, + false, + function(response) + if (response.ReturnCode == -1) then + ViewUtil.CloseModalWait('join_room') + RestartGame() + return + end + ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id) + ViewUtil.CloseModalWait('join_room') + end, + self.tmpGroupID + ) + +end + + +function M:OnEvtOpenTupGTips(msg) + --print("显示托管倒计时=====================") + pt(msg) + local pid = msg['aid'] + local p = self._room:GetPlayerById(pid) + local t=msg['time'] + DispatchEvent(self._dispatcher, GameEvent.TupGuanOpen, p,true, t) +end + + +function M:OnEvtCloseTupGTips(msg) + --print("关闭托管倒计时=================") + --pt(msg) + local pid = msg['aid'] + local p = self._room:GetPlayerById(pid) + local t=msg['time'] + DispatchEvent(self._dispatcher, GameEvent.TupGuanOpen, p,false, t) +end + + +function M:DispatchEventTuoGuan(p,isShow,t) + DispatchEvent(self._dispatcher, GameEvent.TupGuanOpen, p,isShow, t) +end + + + +function M:OnEvtOpenGameHuTuoGtips(isAuto) + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + local data = {} + data.autoCard = isAuto + _client:send(Protocol.GAME_AUTO_CARD, data) +end \ No newline at end of file diff --git a/lua_probject/base_project/Game/Controller/GroupMgrController.lua b/lua_probject/base_project/Game/Controller/GroupMgrController.lua new file mode 100644 index 00000000..cedfd908 --- /dev/null +++ b/lua_probject/base_project/Game/Controller/GroupMgrController.lua @@ -0,0 +1,372 @@ +--- Base GameEvent + +GroupMgrEvent = { + AddPlay = "add_play", + DelPlay = "del_play", + UpdatePlay = "update_play", + AddRoom = "add_room", + DelRoom = "del_room", + UpdateRoom = "update_room", + UpdatePlayerInfo = "update_player_info", + UpdateMessage = "update_msg", + BeInvited = "be_invited", + UpdateGroup = "UpdateGroup", + NewMailTip = "NewMailTip", +} + +GroupMgrController = { + _name = "", + --事件MAP + _eventmap = nil, + --事件缓存 + _cacheEvent = nil, + --事件发送器 + _dispatcher = nil +} + +local M = GroupMgrController + +--- Create a new GroupMgrController +function GroupMgrController.new() + setmetatable(M, { __index = IController }) + local self = setmetatable({}, { __index = M }) + self.baseType = GroupMgrController + self._cacheEvent = Queue.new(1000) + self._eventmap = {} + self._dispatcher = {} + + + + self._eventmap[Protocol.FGMGR_EVT_ADD_PLAY] = self.OnEvtAddPlay + self._eventmap[Protocol.FGMGR_EVT_DEL_PLAY] = self.OnEvtDelPlay + self._eventmap[Protocol.FGMGR_EVT_UPDATE_PLAY] = self.OnEvtUpdatePlay + self._eventmap[Protocol.FGMGR_EVT_ADD_ROOM] = self.OnEvtAddRoom + self._eventmap[Protocol.FGMGR_EVT_DEL_ROOM] = self.OnEvtDelRoom + self._eventmap[Protocol.FGMGR_EVT_UPDATE_ROOM] = self.OnEvtUpdateRoom + self._eventmap[Protocol.FGMGR_EVT_UPDATE_PLAYER_INFO] = self.OnEvtUpdatePlayerInfo + self._eventmap[Protocol.FGMGR_EVT_MESSAGE] = self.OnEvtMessage + self._eventmap[Protocol.FGMGR_EVT_INVITED] = self.OnEvtInvited + self._eventmap[Protocol.FGMGR_EVT_UPDATE_GROUP] = self.OnEvtUpdateGroup + self._eventmap[Protocol.FGMGR_EVT_NEW_MAIL] = self.OnEvtNewMailTip + -- self:connect(callback) + return self +end + +function DispatchEvent(_dispatcher, evt_name, ...) + local func = _dispatcher[evt_name] + if func then + func(...) + end +end + +function M:AddEventListener(evt_name, func) + self._dispatcher[evt_name] = func +end + +----------------------请求------------------------------------ +function M:connect(host, groupId, callback) + self.host = host + self.groupId = groupId + self.connecting = true + if self._mgr_client then + self._mgr_client:destroy() + self._mgr_client = nil + end + print("666666666666666666666666666 ", host) + local _mgr_client = NetClient.new(self.host, "mgr_group") + self._mgr_client = _mgr_client + _mgr_client:connect() + _mgr_client.onconnect:Add(function(code) + self.code = code + if (code == SocketCode.Connect) then + local _data = {} + _data.session = ControllerManager.WebClient:getSession() + if _data.session == nil then + self.connecting = false + _mgr_client:destroy() + ViewUtil.ErrorTip(1234567, "圈子数据异常!!!") + return + end + _data.groupId = self.groupId + --printlog(debug.traceback()) + --printlog("session===1111111111>>>", _data.session) + --pt(_data) + _mgr_client:send(Protocol.FGMGR_ENTER_GROUP, _data, function(res) + self.connecting = false + if res.ReturnCode == 0 then + -- printlog("2222222222222222222222222222222") + -- pt(res) + _mgr_client.onevent:Add(self.__OnNetEvent, self) + _mgr_client.onconnect:Add(self.__OnConnect, self) + if callback then + self:OnEnter() + end + local group = DataManager.groups:get(groupId) + group:clearPlay() + local play_list = res.Data.play_list + printlog("2222222222222222") + pt(play_list) + for i = 1, #play_list do + local m = play_list[i] + group:addPlay(m) + end + local rooms = res.Data.rooms + for i = 1, #rooms do + local m = rooms[i] + if m.status ~= 2 then + group:addRoom(m) + end + end + group.ban = res.Data.ban + group.ban_ip = res.Data.ban_ip + group.ban_gps = res.Data.ban_gps + group.hp = res.Data.hp + group.lev = res.Data.lev + group.joins = res.Data.joins + group.kick_opt = res.Data.kick_opt + group.partnerLev = res.Data.partnerLev + group.dissolve_opt = res.Data.dissolve_opt + group.permission = res.Data.permission + group.diamo = res.Data.diamo or 0 + group.apply = res.Data.ban_apply or 0 + group.update_room = true + group.mail_tip = res.Data.mail_tip + group.ban_chat1 = res.Data.ban_chat1 + group.ban_chat2 = res.Data.ban_chat2 + group.isvip = res.Data.isvip + else + self.code = SocketCode.ExceptionOnConnect + _mgr_client:destroy() + end + if callback then + callback(res) + end + end) + else + self.connecting = false + _mgr_client:destroy() + if callback then + callback({ ReturnCode = 101 }) + end + end + end) +end + +function M:disconnect() + self.connecting = false + if self._mgr_client then + self._mgr_client:destroy() + end + self.host = nil + self.groupId = nil + if self._reconnect then + self._reconnect:Stop() + self._reconnect = nil + end +end + +--------------------事件----------------------------------- + + +-- 添加玩法 +function M:OnEvtAddPlay(evt_data) + local group = DataManager.groups:get(self.groupId) + group:addPlay(evt_data) + local pid = evt_data.id + DispatchEvent(self._dispatcher, GroupMgrEvent.AddPlay, pid) +end + +-- 删除玩法 +function M:OnEvtDelPlay(evt_data) + local pid = evt_data.pid + local group = DataManager.groups:get(self.groupId) + group:delPlay(pid) + DispatchEvent(self._dispatcher, GroupMgrEvent.DelPlay) +end + +-- 更新玩法 +function M:OnEvtUpdatePlay(evt_data) + --print("更新玩法=============》》》") + --pt(evt_data) + local pid = evt_data.pid + local group = DataManager.groups:get(self.groupId) + group:addPlay(evt_data) + group.update_play = true + DispatchEvent(self._dispatcher, GroupMgrEvent.UpdatePlay) +end + +-- 添加房间 +function M:OnEvtAddRoom(evt_data) + -- local group = DataManager.groups:get(self.groupId) + -- group:addRoom(evt_data) + -- group.update_room = true + -- DispatchEvent(self._dispatcher,GroupMgrEvent.AddRoom) +end + +-- 删除玩法 +function M:OnEvtDelRoom(evt_data) + -- local roomid = evt_data.roomid + -- local group = DataManager.groups:get(self.groupId) + -- group:delRoom(roomid) + -- group.update_room = true + -- DispatchEvent(self._dispatcher,GroupMgrEvent.DelRoom) +end + +-- 更新房间 +function M:OnEvtUpdateRoom(evt_data) + local group = DataManager.groups:get(self.groupId) + local cmds = evt_data.cmds + for i = 1, #cmds do + local cmd = cmds[i] + local ct = cmd["$ct"] + if ct == 3 then + group:delRoom(cmd.roomid) + else + group:addRoom(cmd) + end + end + group.update_room = true +end + +function M:OnEvtUpdatePlayerInfo(evt_data) + --type:1体力值 2管理员等级 3合伙人等级 + local itype = evt_data.type + local value = evt_data.value + local group = DataManager.groups:get(self.groupId) + local memb = group:getMember(DataManager.SelfUser.account_id) + if itype == 1 then + if memb then + memb.hp = value + end + group.hp = value + elseif itype == 2 then + memb.lev = value + group.lev = value + elseif itype == 3 then + memb.partnerLev = value + group.partnerLev = value + elseif itype == 4 then + group.diamo = evt_data.diamo + end + group.update_info = true + -- DispatchEvent(self._dispatcher,GroupMgrEvent.UpdatePlayerInfo) +end + +-- 更新申请列表 +function M:OnEvtMessage(evt_data) + local group = DataManager.groups:get(self.groupId) + group.joins = evt_data.joins + group.update_joins = true +end + +-- 被邀请事件 +function M:OnEvtInvited(evt_data) + DispatchEvent(self._dispatcher, GroupMgrEvent.BeInvited, evt_data) +end + +-- 更新圈子 +function M:OnEvtUpdateGroup(evt_data) + local group = DataManager.groups:get(self.groupId) + group.name = evt_data.name + group.ban = evt_data.ban == 1 + group.notice = evt_data.notice + group.option = evt_data.option + group.show_num = evt_data.show_num + DispatchEvent(self._dispatcher, GroupMgrEvent.UpdateGroup, evt_data) +end + +-- 未读邮件通知 +function M:OnEvtNewMailTip(evt_data) + local group = DataManager.groups:get(self.groupId) + group.mail_tip = 1 + DispatchEvent(self._dispatcher, GroupMgrEvent.NewMailTip, evt_data) +end + +-- 获取在线玩家 +function M:FG_GetOnlinePlayers(callback) + self._mgr_client:send(Protocol.FGMGR_GET_ONLINE_PLAYERS, nil, function(res) + callback(res) + end) +end + +-- 邀请在线玩家 +function M:FG_InvitePlayer(tag, roomid, pid, game_name, callback) + local _data = {} + _data.tagId = tag + _data.roomid = roomid + _data.pid = pid + _data.g_name = game_name + self._mgr_client:send(Protocol.FGMGR_INVITE_PLAYER, _data, function(res) + callback(res) + end) +end + +-- 回复邀请 +function M:FG_ResponseInvited(id, refuse) + local _data = {} + _data.invi_id = id + _data.refuse = refuse + self._mgr_client:send(Protocol.FGMGR_RESPONSE_INVITE, _data) +end + +function M:PopEvent() + local _cacheEvent = self._cacheEvent + if (_cacheEvent:Count() > 0) then + return _cacheEvent:Dequeue() + end +end + +function M:OnEnter() + self._reconnect = Timer.New(function() + if not self.connecting and self.code ~= SocketCode.Connect then + local _client = self._mgr_client + if _client then + _client:destroy() + end + if not self.host or not self.groupId then return end + self:connect(self.host, self.groupId) + end + end, 2, -1, true) + self._reconnect:Start() + -- self._reconnect = coroutine.start(function() + -- while true do + -- coroutine.wait(2) + -- if not self.connecting and self.code ~= SocketCode.Connect then + -- self:connect() + -- end + -- end + -- end) + local _client = self._mgr_client +end + +function M:OnExit() + if self._reconnect then + self._reconnect:Stop() + self._reconnect = nil + end + local _client = self._mgr_client + if _client then + _client:destroy() + end + local group = DataManager.groups:get(self.groupId) + group:clear() + self._cacheEvent:Clear() +end + +function M:__OnNetEvent(msg) + --print("消息ID===>>"..msg.Command) + local func = self._eventmap[msg.Command] + if (func ~= nil) then func(self, msg.Data) end +end + +function M:__OnConnect(code) + self.code = code + if code ~= SocketCode.Connect then + local _client = self._mgr_client + self._mgr_client = nil + _client:destroy() + self._cacheEvent:Clear() + end +end + +return M diff --git a/lua_probject/base_project/Game/Controller/IController.lua b/lua_probject/base_project/Game/Controller/IController.lua new file mode 100644 index 00000000..16d4c80b --- /dev/null +++ b/lua_probject/base_project/Game/Controller/IController.lua @@ -0,0 +1,16 @@ +--控制器基类 +--author:-- + + +--- +--@type IController +IController = { + +} + + +function IController.OnEnter(self) +end + +function IController.OnExit(self) +end diff --git a/lua_probject/base_project/Game/Controller/LoddyController.lua b/lua_probject/base_project/Game/Controller/LoddyController.lua new file mode 100644 index 00000000..29a8e875 --- /dev/null +++ b/lua_probject/base_project/Game/Controller/LoddyController.lua @@ -0,0 +1,437 @@ + +LoddyController = {} + +local M = {} + +--- Create a new LoddyController +function LoddyController.new() + setmetatable(M, {__index = IController}) + local self = setmetatable({}, {__index = M}) + self.baseType = LoddyController + self.class = "Loddy" + self.recordList = {} + return self +end + +function M.OnEnter(self) + --print(vardump(self,"loddy controller enter")) +end + +function M.OnExit(self) + --print(vardump(self,"loddy controller exit")) +end + +local function __FillRoomData(s2croom) + local room = DataManager.CurrenRoom + local extend = ExtendManager.GetExtendConfig(room.game_id) + extend:FillRoomData(s2croom) +end + +local function __ConntectGameServer(cmd,room, host, _data,callback) + -- local _data = {} + _data["session"] = room.session + local _game_client = NetClient.new(host, "game") + _game_client:connect() + ControllerManager.SetGameNetClient(_game_client) + _game_client.onconnect:Add(function(code) + if (code == SocketCode.Connect) then + _game_client:send(cmd, _data, function (response) + if (response.ReturnCode == 0) then + _game_client.onconnect:Clear() + _game_client.onconnect:Add(ControllerManager.OnConnect) + callback(response) + return + end + _game_client:destroy() + if ControllerManager.GameNetClinet == _game_client then + ControllerManager.GameNetClinet =nil + end + callback(response) + end) + + else + if ControllerManager.GameNetClinet == _game_client then + ControllerManager.GameNetClinet =nil + end + _game_client:destroy() + callback({ReturnCode = 101}) + end + end) +end + + +function M:CreateRoom(game_id, _data, callback) + local _client = ControllerManager.WebClient + local data = {} + data.game_id = game_id + data["platform"] = GetPlatform() + data.config_data = _data + -- local runtime = os.clock() + _client:send(Protocol.WEB_CREATE_ROOM, data, function(res) + if ( res.ReturnCode == Table_Error_code.ERR_IN_ROOM or res.ReturnCode == Table_Error_code.ERR_CREATE_ROOM) then + self:JoinRoom("000000",callback) + return + end + if (res.ReturnCode == 0) then + local json = res.Data + local game_info = json["game_info"] + if ExtendHotupdate.CheckVersion(game_info) ~= ExtendHotupdate.VERSION_NORMAL then + ExtendHotupdate.UpdateGame(game_info,function() + res.ReturnCode = -2 + callback(res) + end) + return + end + local game_id = game_info.game_id + local room_id = json["room_id"] + local server_ip = json["server_ip"] + local server_port = json["server_port"] + + local room = ExtendManager.GetExtendConfig(game_id):NewRoom() + room.game_id = game_id + room.room_id = room_id + room.server_host = string.concat(server_ip, ":", server_port) + room.session = _client:getSession() + DataManager.CurrenRoom = room + + local game_net = nil + + local j_data = {} + j_data["session"] = room.session + if not DataManager.SelfUser.location then + DataManager.SelfUser.location = Location.new() + end + j_data["pos"] = DataManager.SelfUser.location:Location2String() + + -- game_net = + __ConntectGameServer(Protocol.GAME_JOIN_ROOM,room,room.server_host, j_data, function (response) + if (response.ReturnCode == 0) then + -- game_net:clearEvent() + local _s2croom = response.Data + -- ControllerManager.SetGameNetClient(game_net) + room.owner_id = _s2croom["owner"] + room.banker_seat = _s2croom["manor"] + if _s2croom.createTime then + room.create_time = _s2croom["createTime"] + end + room.agent = _s2croom.agent == 1 and true or false + local extend = ExtendManager.GetExtendConfig(room.game_id) + extend:FillRoomData(_s2croom) + ControllerManager.ChangeController(GameController) + -- print("create room:"..(os.clock()-runtime)) + callback(response) + return + end + -- game_net:destroy() + callback(response) + end) + else + if callback then callback(res) end + end + end) +end + +local join_room_frame = 0 +function M:PublicJoinRoom(cmd,room_id,callback,group_id,group_layer) + -- 同一帧不重复调用 + local last_frame = join_room_frame + join_room_frame = Time.frameCount + if join_room_frame == last_frame then + return + end + -- 防止游戏没有离开控制器 + ControllerManager.ChangeController(LoddyController) + local _data = {} + _data["room_id"] = room_id + _data["group_id"] = group_id + _data["floor"] = group_layer + _data["platform"] = GetPlatform() + local _client = ControllerManager.WebClient; + _client:send(cmd, _data, function( res) + if (res.ReturnCode == 0) then + local json = res.Data + local game_info = json["game_info"] + if ExtendHotupdate.CheckVersion(game_info) ~= ExtendHotupdate.VERSION_NORMAL then + ExtendHotupdate.UpdateGame(game_info,function() + res.ReturnCode = -2 + callback(res) + end) + return + end + local game_id = game_info.game_id + local server_ip = json["server_ip"] + local server_port = json["server_port"] + + local room = ExtendManager.GetExtendConfig(game_id):NewRoom() + room.lev = json["lev"] -- 自己在当前房间所在圈子的职位,1盟主,2管理员,3用户,非圈子房间就是3 + room.room_id = json["room_id"] + room.game_id = game_id + room.status = json["status"] + room.server_host = string.concat(server_ip, ":", server_port) + room.session = _client:getSession() + room.group_id = json["groupId"] + room.play_id = json["pid"] + -- 体力值开关 + room.hpOnOff = json["hpOnOff"] + -- 体力值倍数 + room.score_times = json.hp_times and d2ad(json.hp_times) or 1 + DataManager.CurrenRoom = room + local j_data = {} + if not DataManager.SelfUser.location then + DataManager.SelfUser.location = Location.new() + end + j_data["pos"] = DataManager.SelfUser.location:Location2String() + -- local game_net = nil + --print(vardump(room)) + -- game_net = + __ConntectGameServer(Protocol.GAME_JOIN_ROOM,room,room.server_host, j_data,function ( res1) + if (res1.ReturnCode ~= 0 ) then + if (callback) then callback(res1) end + else + local _s2croom = res1.Data + room.owner_id = _s2croom["owner"] + if _s2croom.createTime then + room.create_time = _s2croom["createTime"] + end + if _s2croom.manor then + room.banker_seat = _s2croom.manor + end + room.agent = _s2croom.agent == 1 and true or false + -- ControllerManager.SetGameNetClient(game_net) + local extend = ExtendManager.GetExtendConfig(room.game_id) + extend:FillRoomData(_s2croom) + ControllerManager.ChangeController(GameController) + if callback then callback(res1) end + end + end) + -- callback(res) + else + if callback then callback(res) end + end + end) +end + +function M:JoinRoom(room_id,callback,group_id,group_layer) + self:PublicJoinRoom(Protocol.WEB_JOIN_ROOM,room_id,callback,group_id,group_layer) +end + + +function M:ResetJionRoom(callback) + local _game = ControllerManager.GetController(GameController) + local o_room = DataManager.CurrenRoom + local j_data = {} + if not DataManager.SelfUser.location then + DataManager.SelfUser.location = Location.new() + end + j_data["pos"] = DataManager.SelfUser.location:Location2String() + local room = ExtendManager.GetExtendConfig(o_room.game_id):NewRoom() + room.lev = o_room.lev + room.room_id = o_room.room_id + room.game_id = o_room.game_id + room.status = o_room.status + room.server_host = o_room.server_host + room.session = o_room.session + room.group_id = o_room.group_id + -- 体力值倍数 + room.score_times = o_room.score_times + room.play_id = o_room.play_id + -- 体力值开关 + room.hpOnOff = o_room.hpOnOff + room.owner_id = o_room.owner_id + room.create_time = o_room.create_time + room:SetReloadStatus(true) + DataManager.CurrenRoom = room + __ConntectGameServer(Protocol.GAME_JOIN_ROOM,room,room.server_host, j_data,function ( res1) + room:SetReloadStatus(false) + if (res1.ReturnCode ~= 0 ) then + if (callback) then callback(res1) end + else + printlog("ResetJionRoom==>>>") + pt(res1) + ControllerManager.enterPlayerData=res1.Data.tableInfo.playerData + local _s2croom = res1.Data + local extend = ExtendManager.GetExtendConfig(room.game_id) + extend:FillRoomData(_s2croom) + ControllerManager.ChangeController(GameController) + if callback then callback(res1) end + end + end) +end + +function M:UpdatePlayerInfo(callback) + local _client = ControllerManager.WebClient + _client:send(Protocol.WEB_UPDATE_INFO, nil, function (res) + if res.ReturnCode == 0 then + DataManager.SelfUser.diamo = res.Data.diamo + DataManager.SelfUser.invited = res.Data.invitation + if callback then callback(true, res.Data) end + -- DataManager.SelfUser.raffle = res.Data.raffle + else + if callback then callback(false) end + end + end) +end + +function M:UpdateNotice(id,callback) + local _client = ControllerManager.WebClient + local _data = {} + _data.id = id + _client:send(Protocol.WEB_UPDATE_NOTICE, _data, function (res) + --print("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ",res) + --pt(res) + if res.ReturnCode == 0 and #res.Data.notice_list > 0 then + callback(true, res.Data) + else + callback(false) + end + end) +end + +function M:RequestRecordList(callback, roomid) + local _client = ControllerManager.WebClient + local _data = {} + _data["platform"] = GetPlatform() + local proto + if not roomid then + proto = Protocol.WEB_GET_MILITARY + else + proto = Protocol.WEB_GET_MILITARY_BY_ROOMID + _data.roomId = roomid + end + _client:send(proto, _data, function (res) + self.recordList = nil + -- print(vardump(res)) + if (res.ReturnCode == 0 or res.ReturnCode == 19 ) then + --self:RequestRankList(callback) + self.recordList = {} + if res.ReturnCode == 19 then return end + local recordData = res.Data + local record_info_list = recordData["military_list"] + if record_info_list ~= nil then + for i = 1, #record_info_list do + local record_list_item = record_info_list[i] + local record_list = MResult.new() -- new 战绩 + record_list.GameId = tonumber(record_list_item["game_id"]) + record_list.GameInfo = record_list_item["game_info"] + record_list.RoomId = record_list_item["room_id"] + record_list.group_id = record_list_item["groupId"] + record_list.Time = record_list_item["create_time"] + record_list.PlayBackId = record_list_item["military_id"] + record_list.hpData = record_list_item["hpData"] + record_list.hpOnOff = record_list_item["hpOnOff"] + record_list.hp_times = d2ad(record_list_item["hp_times"]) + local total_score_str = record_list_item["totalScore"] + if total_score_str then + local total_score_item = json.decode(total_score_str) + for j = 1, #total_score_item do + local m_playerScore = MPlayerScore.new() + local total_score_str = total_score_item[j] + m_playerScore.Name = total_score_str["nick"] + m_playerScore.Score = total_score_str["score"] + m_playerScore.Id = total_score_str["accId"] + m_playerScore.Portrait = total_score_str["portrait"] + record_list.TotalScoreList[#record_list.TotalScoreList + 1] = m_playerScore + end + end + local round_count = record_list_item["round"] + + for j = 1,round_count do + local round_score_str = record_list_item["round_"..j] + local m_round_game = MGameTimes.new() + if round_score_str then + local round_score_item = json.decode(round_score_str) + for k = 1, #round_score_item do + local m_player_score = MPlayerScore.new() + m_player_score.Name = round_score_item[k]["nick"] + m_player_score.Score = round_score_item[k]["score"] + m_round_game.PlayerList[#m_round_game.PlayerList + 1] = m_player_score + end + record_list.GameTimes[#record_list.GameTimes + 1] = m_round_game + end + end + self.recordList[#self.recordList + 1] = record_list + end + end + callback(res.ReturnCode) + else + callback(res.ReturnCode) + end + end) +end + + +function M:RequestPlayBack(_data,callback,game_info) + if game_info and ExtendHotupdate.CheckVersion(game_info) ~= ExtendHotupdate.VERSION_NORMAL then + ExtendHotupdate.UpdateGame(game_info,function() + self:RequestPlayBack(_data,callback) + end) + return + else + local _client = ControllerManager.WebClient + _client:send(Protocol.WEB_GET_PLAY_BACK , _data , function (res) + if res.ReturnCode == 0 then + local data = json.decode(res.Data.playback) + local cmdList = data.cmdList + local info = data.info + local extend = ExtendManager.GetExtendConfig(info.game_id) + local room = extend:NewRoom() + room.game_id = info.game_id + DataManager.CurrenRoom = room + extend:FillPlayBackData(data) + if not room.self_player then + room.self_player = room:GetPlayerBySeat(1) + end + callback(res.ReturnCode,data) + else + callback(res.ReturnCode,nil) + end + + end) + end +end + + + +--获取手机验证码 +function M:GetPhoneCode(phone,callback) + local _client = ControllerManager.WebClient + local _data = {} + _data["phone"]=phone + _client:send(Protocol.WEB_GET_VERIFCATION_CODE, _data, function(res) + callback(res) + end) +end + + +function M:GetUserInfo(callback) + local _client = ControllerManager.WebClient + _client:send(Protocol.WEB_GET_USER_INFO, nil, function(res) + if res.ReturnCode == 0 then + local user = DataManager.SelfUser + local data = res.Data + user.real_info = data.real_info + user.address = data.address + user.invitation = data.invitation + user.phone = data.phone + user.password = data.password + end + callback(res) + end) +end + +function M:UpdateUserInfo(_data,callback) + local _client = ControllerManager.WebClient + _client:send(Protocol.WEB_UPDATE_USER_INFO, _data, function(res) + callback(res) + end) +end + +-- 设置被邀请开关 +function M:SetInvited(on, callback) + local _client = ControllerManager.WebClient + local _data = {} + _data["invitation"] = on + _client:send(Protocol.WEB_SET_GROUP_INVITATED, _data, function(res) + callback(res) + end) +end \ No newline at end of file diff --git a/lua_probject/base_project/Game/Controller/LoginController.lua b/lua_probject/base_project/Game/Controller/LoginController.lua new file mode 100644 index 00000000..b7226d07 --- /dev/null +++ b/lua_probject/base_project/Game/Controller/LoginController.lua @@ -0,0 +1,216 @@ +LoginController = {} + + +local M = {} + +--- Create a new LoginController +function LoginController.new() + setmetatable(M, { __index = IController }) + local self = setmetatable({}, { __index = M }) + self.baseType = LoginController + self.class = "Login" + return self +end + +local _LocalConfigAllGame = { + 10, + 66, 86, 87, 88, 89 +} + +local FilterGame = function(games) + local tempGames = {} + for k, v in pairs(games) do + v.bundle = v.bundle:gsub("\r\n", "") + if IsHasDictionary(v.game_id, _LocalConfigAllGame) then + table.insert(tempGames, v) + end + end + return tempGames +end + +local function __Login(cmd, _data, callBack) + local _client = ControllerManager.WebClient + _client:send(cmd, _data, function(res) + printlog("1111111111111111222222222222") + -- pt(cmd) + -- pt(res) + if (res.ReturnCode == 0) then + local data = res.Data + local account = data["account"] + local user = DataManager.SelfUser + user.acc = account.acc + user.account_id = account["id"] + user.diamo = account["diamo"] + user.nick_name = account["nick"] + user.sex = account["sex"] + user.head_url = account["portrait"] + user.room_id = account["roomid"] + user.group_id = account["groupId"] + user.type = account["type"] + user.agent = account["mng"] + + user.real_info = account.real_info + user.phone = account.phone + user.address = account.address + user.games = FilterGame(data.games) + if Application.platform == RuntimePlatform.WindowsPlayer or Application.platform == RuntimePlatform.WindowsEditor then + --GameApplication.Instance.printLog = true + else + --GameApplication.Instance.printLog = user.type == 2 + end + + _client:setSession(data["session_id"] .. "," .. data["token"]) + print("11111111111111111111111111111111") + pt(data) + ControllerManager.GroupClient = NetClient.new(data.groupWeb, "web_group", ConnectionProtocol.Web) + ControllerManager.GroupClient:setSession((data["session_id"] .. "," .. data["token"])) + end + + if (callBack ~= nil) then + callBack(res) + end + end) +end + +local function __LoginNew(cmd, _data, callBack) + local _client = ControllerManager.WebClient + _client:send(cmd, _data, function(res) + printlog("1111111111111111222222222222") + -- pt(cmd) + -- pt(res) + + if (res.Data.type == 0) then + local data = res.Data + print(data.userData) + local userInfo = stringToTAble(data.userData) + printlog("===========================loginuserqian=======================") + for k, v in pairs(userInfo) do + printlog(k) + printlog(v) + end + printlog("===========================loginuserqian=======================") + local user = DataManager.SelfUser + user.acc = userInfo.acc + user.account_id = userInfo.id + user.diamo = userInfo.diamo + user.nick_name = userInfo.nick + user.sex = userInfo.sex + user.head_url = userInfo.portrait + user.room_id = userInfo.roomid + user.group_id = userInfo.groupId + user.type = userInfo.type + user.agent = userInfo.mng + + user.real_info = userInfo.real_info + user.phone = userInfo.phone + user.address = userInfo.address + printlog("===========================loginuser=======================") + printlog(user.acc) + for k, v in pairs(user) do + printlog(k) + printlog(v) + end + printlog("===========================loginuser=======================") + user.games = FilterGame(data.games) + + + + if Application.platform == RuntimePlatform.WindowsPlayer or Application.platform == RuntimePlatform.WindowsEditor then + --GameApplication.Instance.printLog = true + else + --GameApplication.Instance.printLog = user.type == 2 + end + + _client:setSession(data.session_id .. "," .. data.token) + printlog("11111111111111111111111111111111") + pt(data) + ControllerManager.GroupClient = NetClient.new(data.groupWeb, "web_group", ConnectionProtocol.Web) + ControllerManager.GroupClient:setSession((data["session_id"] .. "," .. data["token"])) + end + + if (callBack ~= nil) then + callBack(res) + end + end) +end + +--手机登录 +function M:GetPhoneCode(phone, callback) + --不走登录逻辑 + local _client = ControllerManager.WebClient + local _data = {} + _data["phone"] = phone + _client:send(Protocol.WEB_GET_VERIFCATION_CODE, _data, function(res) + if (callback ~= nil) then + callback(res) + end + end) +end + +function M:PhoneLogin(phone, code, callback) + local _data = {} + _data["phone"] = phone + _data["code"] = code + __LoginNew(Protocol.WEB_PHONE_LOGIN, _data, callback) +end + +--手机密码登录 +function M:PhonePasswordLogin(phone, password, callback) + local _data = {} + _data["phone"] = phone + _data["password"] = password + __Login(Protocol.WEB_PHONE_PASSWORD_LOGIN, _data, callback) +end + +function M:IdPasswordLogin(uid, password, callback) + local _data = {} + _data["id"] = tonumber(uid) + _data["password"] = password + __Login(Protocol.WEB_ID_PASSWORD_LOGIN, _data, callback) +end + +function M:Login(callback) + local user = DataManager.SelfUser + local _data = {} + _data["acc"] = user.acc + _data["nick"] = user.nick_name + _data["sex"] = user.sex + _data["portrait"] = user.head_url + __Login(Protocol.WEB_USER_LOGIN, _data, callback) +end + +function M:QuickLogin(session_id, callback) + local _data = {} + local _client = ControllerManager.WebClient + _client:setSession(session_id) + -- ControllerManager.GroupClient:setSession(session_id) + __Login(Protocol.WEB_QUICK_LOGIN, _data, callback) +end + +function M.OnEnter(self) + --print("login controller enter") +end + +function M.OnExit(self) + --print("login controller exit") +end + +--字符串类json格式转化为表 +function stringToTAble(data) + local returnTable = {} + for key, value in string.gmatch(data, "(%w+)=([^,]*)") do + value = value:gsub("^%s*(.-)%s*$", "%1") -- 去除前后空格 + if value == "" then + returnTable[key] = nil -- 空值转换为 nil + elseif tonumber(value) then + returnTable[key] = tonumber(value) -- 数值转换 + elseif value:match("^https?://") then + returnTable[key] = value -- URL 直接保留 + else + returnTable[key] = value:gsub("\\u(%x%x%x%x)", function(hex) + return utf8.char(tonumber(hex, 16)) -- 处理 Unicode(\u8dc3 -> 跃) + end) + end + end + return returnTable +end diff --git a/lua_probject/base_project/Game/Controller/NewGroupController.lua b/lua_probject/base_project/Game/Controller/NewGroupController.lua new file mode 100644 index 00000000..345dcdae --- /dev/null +++ b/lua_probject/base_project/Game/Controller/NewGroupController.lua @@ -0,0 +1,1497 @@ + +NewGroupController = {} + +local M = {} + +local GroupMgrController = import(".GroupMgrController") + +--- Create a new NewGroupController +function NewGroupController.new() + setmetatable(M, {__index = IController}) + local self = setmetatable({}, {__index = M}) + self.baseType = NewGroupController + self.class = "NewGroup" + return self +end + + +--获取圈列表 +function M:FG_GroupList(callback) + local _client = ControllerManager.GroupClient + printlog("aaaaaaaaaaaaaaaaawwwwwwwwwwwwww") + --pt(_client) + _client:send(Protocol.WEB_FG_GROUP_LIST, nil, function(res) + printlog("aaaaaaaaaaaaaaaaawwwwwwwwwwwwww1111111111111") + pt(res) + if res.ReturnCode == 0 then + local r_groups = res.Data.groups + local l_groups = DataManager.groups + l_groups:clear() + for i=1,#r_groups do + local tem = r_groups[i] + local group = GroupData.new() + group.id = tem.id + group.name = tem.name + group.owner = tem.owner + group.top_time = tem.top_time + group.o_nick = tem.o_nick + group.o_portrait = tem.o_portrait + group.lev = tem.lev + group.pay_type = tem.pay_type + group.type = tem.type + group.total_member_num = tem.member_num + group.room_num = tem.room_num + group.option = tem.option + group.show_num = tem.show_num + l_groups:add(group) + end + end + callback(res) + end) +end + +--创建圈 +function M:FG_CreateGroup(name, pay_type, type, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.name= name + data.pay_type = pay_type + data.type = type + _client:send(Protocol.WEB_FG_CREATE_GROUP, data, function(res) + if res.ReturnCode == 0 then + local l_groups = DataManager.groups + local tem = res.Data.info + local group = GroupData.new() + group.id = tem.id + group.name = tem.name + group.owner = DataManager.SelfUser.account_id + group.o_nick = DataManager.SelfUser.nick_name + group.o_portrait = DataManager.SelfUser.head_url + group.lev = 1 + group.pay_type = pay_type + group.type = type + group.total_member_num = 1 + l_groups:add(group) + end + callback(res) + end) +end + +--删除圈 +function M:FG_RemoveGroup(id,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = id + _client:send(Protocol.WEB_FG_REMOVE_GROUP, data, function(res) + if res.ReturnCode == 0 then + local l_groups = DataManager.groups + l_groups:del(id) + end + callback(res) + end) +end + +--退出圈子 +function M:FG_ExitGroup(group_id, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + _client:send(Protocol.WEB_FG_EXIT_GROUP, data, function(res) + if res.ReturnCode == 0 then + local l_groups = DataManager.groups + l_groups:del(group_id) + end + callback(res) + end) +end + +--加入圈 +function M:FG_JoinGroup(id,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = id + _client:send(Protocol.WEB_FG_JOIN_GROUP, data, function(res) + callback(res) + end) +end + +--置顶圈 +function M:FG_TopGroup(group_id,top,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.top = top + _client:send(Protocol.WEB_FG_GROUP_TOP, data, function(res) + if res.ReturnCode == 0 then + local l_groups = DataManager.groups + local group = l_groups:get(group_id) + group.top_time = res.Data.top_time + end + callback(res) + end) +end + +function M:FG_UpdateGroupInfo(id, name, notice, ban, dissolve_opt, kick_opt, apply, ban_chat1, ban_chat2, option, showNum, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = id + data.name = name + data.notice = notice + data.ban = ban + data.dissolve_opt = dissolve_opt + data.kick_opt = kick_opt + data.ban_apply = apply + data.ban_chat1 = ban_chat1 + data.ban_chat2 = ban_chat2 + data.option = option + data.show_num = showNum + _client:send(Protocol.WEB_FG_UPDATE_GROUP_INFO, data, function(res) + callback(res) + end) +end + +--圈邀请列表 +function M:FG_GroupJoins(id,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = id + _client:send(Protocol.WEB_FG_GROUP_JOINS, data, function(res) + callback(res) + end) +end + +--圈审核玩家加入 +function M:FG_GroupVerifyJoin(id,tagId,allow,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = id + data.tagId = tagId + data.allow = allow + _client:send(Protocol.WEB_FG_GROUP_VERIFY_JOIN, data, function(res) + callback(res) + end) +end + +--圈玩家列表 +function M:FG_GroupMembers(group_id, limit, num, minus_only, sort_type, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.limit = limit + data.num = num + data.minus_only = minus_only + data.type = sort_type + --print(debug.traceback()) + _client:send(Protocol.WEB_FG_GROUP_MEMBERS, data, function(res) + --print("查询圈子玩家列表============") + --pt(res) + if res.ReturnCode == 0 then + local group = DataManager.groups:get(group_id) + local members = res.Data.members + for i=1,#members do + local m = members[i] + group:addMember(m) + end + end + callback(res) + + end) +end + + +function M:FG_GroupMembers11(group_id, limit, num, minus_only, sort_type, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.limit = limit + data.num = num + data.minus_only = minus_only + data.type = sort_type + self.currentGroupMembersData=data + self.currentGroupMembersCallBack=callback + --print(debug.traceback()) + _client:send(Protocol.WEB_FG_GROUP_MEMBERS, data, function(res) + --print("查询圈子玩家列表============") + --pt(res) + if res.ReturnCode == 0 then + local group = DataManager.groups:get(group_id) + local members = res.Data.members + for i=1,#members do + local m = members[i] + group:addMember(m) + end + end + callback(res) + + end) +end + +function M:FG_GroupMembers12(group_id, limit, num,type,online, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.limit = limit + data.num = num + data.online = online + data.type = type + --data.minus_only = minus_only + --data.type = sort_type + self.currentGroupMembersData=data + self.currentGroupMembersCallBack=callback + --print(debug.traceback()) + _client:send(Protocol.WEB_FG_GROUP_MEMBERS1, data, function(res) + --print("查询圈子玩家列表============") + --pt(res) + if res.ReturnCode == 0 then + local group = DataManager.groups:get(group_id) + local members = res.Data.members + for i=1,#members do + local m = members[i] + group:addMember(m) + end + end + callback(res) + + end) +end + +function M:FG_GroupTiChu(group_id,limit, num,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.limit = limit + data.num = num + _client:send(Protocol.WEB_FG_GROUP_TICHU, data, function(res) + if res.ReturnCode == 0 then + + end + callback(res) + end) +end + + +function M:SendGetGroupMembersInfo() + local _client = ControllerManager.GroupClient + if self.currentGroupMembersData and self.currentGroupMembersCallBack then + _client:send(Protocol.WEB_FG_GROUP_MEMBERS1, self.currentGroupMembersData, function(res) + --print("查询圈子玩家列表============") + --pt(res) + if res.ReturnCode == 0 then + local group = DataManager.groups:get(self.currentGroupMembersData.id) + local members = res.Data.members + for i=1,#members do + local m = members[i] + group:addMember(m) + end + end + self.currentGroupMembersCallBack(res) + + end) + end + +end + +-- 查询成员 +function M:FG_FindMember(group_id, member_id, callback, tag_name,tag_type) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tagId = member_id + data.tagName = tag_name + data.tagType = tag_type + _client:send(Protocol.WEB_FG_FIND_MEMBER, data, function(res) + --print("查询圈子单个玩家列表============") + --pt(res) + if res.ReturnCode == 0 then + local group = DataManager.groups:get(group_id) + local m = res.Data + if group.lev == 3 then + if res.Data.parentId == DataManager.SelfUser.account_id then + group:addMember(m) + end + end + end + callback(res) + end) +end + + + +-- 强制提取 +function M:FG_TakeHp1(group_id, tagId, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tagId = tagId + + _client:send(Protocol.WEB_FG_TAKE_HP, data, function(res) + --print("查询圈子单个玩家列表============") + --pt(res) + callback(res) + end) +end + +-- 调配成员 +function M:FG_DeployMember(group_id, member_id, partner_id, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tagId = member_id + data.parId = partner_id + _client:send(Protocol.WEB_FG_DEPLOY_MEMBER, data, function(res) + callback(res) + end) +end + +-- 转移合伙人 +function M:FG_MovePartner(group_id, member_id, partner_id, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tagId = member_id + data.parId = partner_id + _client:send(Protocol.WEB_FG_MOVE_PARTNER, data, function(res) + callback(res) + end) +end + +-- 获取合伙人列表(合伙人管理) +function M:FG_GetPartnerList(group_id, simple_all, limit, num ,callback,tagId) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.simple_all = simple_all + if tagId then + data.tagId = tagId + end + if simple_all == 0 then + data.limit = limit + data.num = num + end + _client:send(Protocol.WEB_FG_GET_PARTNER_DATA, data, function(res) + callback(res) + end) +end + +-- 获取合伙人列表(合伙人管理) +function M:FG_QueryPartnerList(group_id, query_id, query_nick, callback) + local _client = ControllerManager.GroupClient + local data = {} + + data.id = group_id + data.qid = query_id + data.tagName = query_nick + + _client:send(Protocol.WEB_FG_QUERY_PARTNER_DATA, data, function(res) + callback(res) + end) +end + +function M:FG_GetMemberStat(group_id,query_id,partner_id,limit,num,time_type,begin_time,end_time,callback) + + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.qid = query_id + data.partner_id = partner_id + data.tt = time_type + if time_type == 3 then + data.bt = begin_time + data.et = end_time + end + data.limit = limit + data.num = num + _client:send(Protocol.WEB_FG_GET_MEMBER_STAT, data, function(res) + callback(res) + end) +end + + +function M:FG_GetPartnerStat(group_id,limit,num,time_type,begin_time,end_time,callback) + + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tt = time_type + if time_type == 0 then + data.bt = begin_time + data.et = end_time + end + data.limit = limit + data.num = num + _client:send(Protocol.WEB_FG_GET_PARTNER_STAT, data, function(res) + callback(res) + end) +end + +function M:FG_GetZuanShiStat(group_id,limit,num,time_type,begin_time,end_time,callback) + + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tt = time_type + if time_type == 0 then + data.bt = begin_time + data.et = end_time + end + data.limit = limit + data.num = num + _client:send(Protocol.WEB_FG_GET_COST_COUNT_STAT, data, function(res) + callback(res) + end) +end + +-- WEB_FG_FIND_PARTNER_STAT +function M:FG_FindPartnerStat(group_id,member_id,limit,num,time_type,begin_time,end_time,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tagId = member_id + data.limit = limit + data.num = num + data.tt = time_type + + if time_type == 0 then + data.bt = begin_time + data.et = end_time + end + _client:send(Protocol.WEB_FG_FIND_PARTNER_STAT, data, function(res) + callback(res) + end) +end + +function M:FG_FindZuanShiStat(group_id,member_id,limit,num,time_type,begin_time,end_time,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tagId = member_id + data.limit = limit + data.num = num + data.tt = time_type + + if time_type == 0 then + data.bt = begin_time + data.et = end_time + end + _client:send(Protocol.WEB_FG_FIND_COST_COUNT_STAT, data, function(res) + callback(res) + end) +end + +--find_partner_stat_member + +-- WEB_FG_FIND_PARTNER_STAT +function M:FG_FindPartnerStatMember(group_id,uid,root_uid,member_id,limit,num,time_type,begin_time,end_time,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tagId = member_id + data.limit = limit + data.num = num + data.id = group_id + data.tt = time_type + data.uid = uid + data.root_uid = 0 + if time_type == 0 then + data.bt = begin_time + data.et = end_time + end + _client:send(Protocol.WEB_FG_FIND_PARTNER_STAT_Member, data, function(res) + callback(res) + end) +end + +function M:FG_FindPartnerZuanShiMember(group_id,uid,root_uid,member_id,limit,num,time_type,begin_time,end_time,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tagId = member_id + data.limit = limit + data.num = num + data.id = group_id + data.tt = time_type + data.uid = uid + data.root_uid = 0 + if time_type == 0 then + data.bt = begin_time + data.et = end_time + end + _client:send(Protocol.WEB_FG_FIND_PARTNER_COST_COUNT_Member, data, function(res) + callback(res) + end) +end + +function M:FG_GetXingYunStat(group_id,limit,num,time_type,begin_time,end_time,callback) + + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tt = time_type + if time_type == 0 then + data.bt = begin_time + data.et = end_time + end + data.limit = limit + data.num = num + _client:send(Protocol.WEB_FG_GET_XINGYUNHAO_INFO, data, function(res) + callback(res) + end) +end + +function M:FG_GetMembersCount(group_id,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + + _client:send(Protocol.WEB_FG_GET_MEMBERS_COUNT, data, function(res) + callback(res) + end) +end + +function M:FG_GetPartnerStatMember(group_id,uid,root_uid,limit,num,time_type,begin_time,end_time,callback) + + local _client = ControllerManager.GroupClient + local data = {} + + data.id = group_id + data.uid = uid + data.limit = limit + data.num = num + data.root_uid = root_uid + data.tt = time_type + if time_type == 0 then + data.bt = begin_time + data.et = end_time + end + + _client:send(Protocol.WEB_FG_GET_PARTNER_STAT_MEMBER, data, function(res) + callback(res) + end) +end + +function M:FG_GetDirectMemberStat(group_id,uid,root_uid,limit,num,time_type,begin_time,end_time,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.uid = uid + data.limit = limit + data.num = num + data.root_uid = root_uid + data.tt = time_type + if time_type == 0 then + data.bt = begin_time + data.et = end_time + end + _client:send(Protocol.WEB_FG_GET_DIRECT_MEMBER_STAT, data, function(res) + callback(res) + end) +end + +function M:FG_GetPartnerZuanShiMember(group_id,uid,root_uid,limit,num,time_type,begin_time,end_time,callback) + + local _client = ControllerManager.GroupClient + local data = {} + + data.id = group_id + data.uid = uid + data.limit = limit + data.num = num + data.root_uid = root_uid + data.tt = time_type + if time_type == 0 then + data.bt = begin_time + data.et = end_time + end + + _client:send(Protocol.WEB_FG_GET_PARTNER_COST_COUNT, data, function(res) + callback(res) + end) +end + +function M:FG_GetDirectZuanShiStat(group_id,uid,root_uid,limit,num,time_type,begin_time,end_time,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.uid = uid + data.limit = limit + data.num = num + data.root_uid = root_uid + data.tt = time_type + if time_type == 0 then + data.bt = begin_time + data.et = end_time + end + _client:send(Protocol.WEB_FG_GET_DIRECT_COST_COUNT, data, function(res) + callback(res) + end) +end + +function M:FG_GetPartnerStatPlay(group_id,uid,parent_id,limit,num,time_type,begin_time,end_time,callback) + + local _client = ControllerManager.GroupClient + local data = {} + + data.id = group_id + data.uid = uid + data.parent_id = parent_id + data.limit = limit + data.num = num + + data.tt = time_type + if time_type == 0 then + data.bt = begin_time + data.et = end_time + end + + _client:send(Protocol.WEB_FG_GET_PARTNER_STAT_PLAY, data, function(res) + callback(res) + end) +end + + +-- 获取合伙人成员列表 +function M:FG_GetPartnerMembers(group_id, partner_id, limit, num, quary_id, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tagId = partner_id + data.limit = limit + data.num = num + data.qid = quary_id + _client:send(Protocol.WEB_FG_GET_PARTNER_MEMBERS, data, function(res) + callback(res) + end) +end + +-- 获取管理员/合伙人上下分 +function M:FG_GetMngHpLog(group_id, limit, num, hp_type, qid, qName, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.limit = limit + data.num = num + data.type = hp_type + data.qid = qid + data.tagName = qName + _client:send(Protocol.WEB_FG_GET_MNG_HP_LOG, data, function(res) + callback(res) + end) +end + +-- 获取管理员上下分统计 +function M:FG_GetMngHpStatistic(group_id, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + _client:send(Protocol.WEB_FG_MNG_HP_STATISTIC, data, function(res) + callback(res) + end) +end + +-- 获取管理员上下分详情 +function M:FG_GetMngHpInfo(group_id, type, begin_time, end_time, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.type = type + data.beginTime = begin_time + data.endTime = end_time + _client:send(Protocol.WEB_FG_MNG_HP_INFO, data, function(res) + callback(res) + end) +end + +-- 获取整线体力值 +function M:FG_GetTotalHp(group_id, id, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tagId = id + _client:send(Protocol.GET_HP_TOTAL, data, function(res) + callback(res) + end) +end + +-- 获取玩家体力值日统计 +function M:FG_GetPlayerDailyHPCount(group_id, id, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tagId = id + _client:send(Protocol.WEB_FG_GET_PLAYER_DAILY_COUNT, data, function(res) + callback(res) + end) +end + +-- 获取体力值日志牌局明细 +function M:FG_GetHpLogDetail(group_id, id, roomid, time, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tagId = id + data.roomId = roomid + data.time = time + _client:send(Protocol.WEB_FG_HPLOG_DETAIL_INFO, data, function(res) + callback(res) + end) +end + +--获取所有玩法 +function M:FG_GetAllplays(groupid,uid,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = groupid + data.uid = uid + _client:send(Protocol.WEB_FG_GET_ALLPLAYS, data, function(res) + callback(res) + end) +end + +--设置屏蔽玩法 +function M:FG_SetBanPlayid(groupId,pid,ban,uid,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.groupid = groupId + data.pid = pid + data.ban = ban + data.uid = uid + _client:send(Protocol.WEB_FG_SET_BANPLAYID, data, function(res) + callback(res) + end) +end + +-- 获取推广奖励值 +function M:FG_GetRewards(group_id, pid, lev, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tagId = pid + data.partnerLev = lev + _client:send(Protocol.WEB_FG_GET_REWARDS, data, function(res) + callback(res) + end) +end + + + +-- 设置推广奖励值 +function M:FG_SetRewards(group_id, tag, lev, partner_id, all, val, single,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.pid = tag + data.partnerLev = lev + data.value = val + data.tagId = partner_id + data.all = all + data.single = single + _client:send(Protocol.WEB_FG_SET_REWARDS, data, function(res) + callback(res) + end) +end + +function M:FG_SetXIPAI(group_id, tag, lev, partner_id, all, val, single,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.pid = tag + data.partnerLev = lev + data.value = val + data.tagId = partner_id + data.all = all + data.single = single + _client:send(Protocol.WEB_FG_SET_XIPAI, data, function(res) + callback(res) + end) +end + +function M:FG_SetANCHOU(group_id, tag, lev, partner_id, all, val, single,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.pid = tag + data.partnerLev = lev + data.value = val + data.tagId = partner_id + data.all = all + data.single = single + _client:send(Protocol.WEB_FG_SET_ANCHOU, data, function(res) + callback(res) + end) +end + + +-- 获取奖励日志 +function M:FG_GetRewardsLog(group_id, limit, num, begin_time, end_time, tag, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tagId = tag + data.limit = limit + data.num = num + data.beginTime = begin_time + data.endTime = end_time + _client:send(Protocol.WEB_FG_GET_REWARDS_LOG, data, function(res) + callback(res) + end) +end + +-- 获取奖励统计 +function M:FG_GetRewardStatistic(group_id, pid, begin_time, end_time, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.pid = pid + data.beginTime = begin_time + data.endTime = end_time + _client:send(Protocol.WEB_FG_GET_REWARDS_STATISTIC, data, function(res) + callback(res) + end) +end + +-- 排行 +function M:FG_GetMemberRank(group_id, pid, limit, num, begin_time, end_time, type,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.pid = pid + data.beginTime = begin_time + data.endTime = end_time + data.limit = limit + data.num = num + data.type = type + _client:send(Protocol.WEB_FG_MEMBER_RANK, data, function(res) + callback(res) + end) +end + +-- 局数统计 +function M:FG_GetRoundStat(group_id, pid, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.pid = pid + _client:send(Protocol.WEB_FG_GET_ROUND_STATISTIC, data, function(res) + callback(res) + end) +end + +-- 获取成员体力值日志 +function M:FG_GetMemberHpLog(group_id, tag, limit, num, filter, begin_time, end_time, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tagId = tag + data.limit = limit + data.num = num + data.choose = filter + data.beginTime = begin_time + data.endTime = end_time + _client:send(Protocol.WEB_FG_GET_MEMBER_HP_LOG, data, function(res) + callback(res) + end) +end + +-- 获取玩法局数统计 +function M:FG_GetGameStat(group_id, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + _client:send(Protocol.WEB_FG_GET_GAME_ROUND_STATISTIC, data, function(res) + callback(res) + end) +end + +-- 获取消费统计 +function M:FG_GetConsumeStat(group_id,begin_time, end_time, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.beginTime = begin_time + data.endTime = end_time + _client:send(Protocol.WEB_FG_GET_CONSUME_STATISTIC, data, function(res) + callback(res) + end) +end + +-- 获取赢家抽水记录 +function M:FG_GetPropLog(group_id, limit, num, begin_time, end_time, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.limit = limit + data.num = num + data.beginTime = begin_time + data.endTime = end_time + _client:send(Protocol.WEB_FG_GET_PROPORTION_LOG, data, function(res) + callback(res) + end) +end + +-- 获取战绩 +function M:FG_GetGroupRecord(group_id, platform, qid, limit, num, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.qid = qid + data.platform = platform + data.limit = limit + data.num = num + _client:send(Protocol.WEB_FG_GET_RECORD, data, function(res) + callback(res) + end) +end + +-- 获取战绩 +function M:FG_GetGroupRecordSpe(group_id, platform, qid, includeMembers, limit, num, begin_time, end_time, time_type, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.qid = qid + data.platform = platform + data.includeMembers = includeMembers + data.limit = limit + data.num = num + data.bt = begin_time + data.et = end_time + data.tt = time_type + _client:send(Protocol.WEB_FG_GET_RECORD, data, function(res) + callback(res) + end) +end + +-- 获取战绩 +function M:FG_GetGroupPersonRecord(group_id, platform, qid, time_type, begin_time, end_time, limit, num, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.qid = qid + data.tt = time_type + if time_type == 3 then + data.bt = begin_time + data.et = end_time + end + data.platform = platform + data.limit = limit + data.num = num + _client:send(Protocol.WEB_FG_GET_PERSON_RECORD, data, function(res) + callback(res) + end) +end + + +-- 根据房间号查询战绩 +function M:FG_GetRecordByRoomid(group_id, roomid, platform, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.roomid = roomid + data.platform = platform + _client:send(Protocol.WEB_FG_GET_RECORD_BY_ROOMID, data, function(res) + callback(res) + end) +end + +-- 获取能量包数据 +function M:FG_GetTakeInfo(group_id, tagId,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tagId = tagId + _client:send(Protocol.WEB_FG_GET_TAKE_INFO, data, function(res) + callback(res) + end) +end + + +-- 获取银行信息 +function M:FG_GetBankInfo(group_id, tagId,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.tagId = tagId + _client:send(Protocol.GET_BANK_HP, data, function(res) + callback(res) + end) +end + + + +function M:FG_TakeBankInfo(group_id, gethp,tagId,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.hp=gethp + data.tagId = tagId + _client:send(Protocol.TAKE_BANK_HP, data, function(res) + callback(res) + end) +end + + +function M:FG_SAVEBankInfo(group_id, gethp,tagId,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.hp=gethp + data.tagId = tagId + _client:send(Protocol.SAVE_BANK_HP, data, function(res) + callback(res) + end) +end + + + + + +-- 提取体力值 +function M:FG_TakeHp(group_id, num, tagId,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.hp = num + data.tagId = tagId + _client:send(Protocol.WEB_FG_TAKE_FAG, data, function(res) + callback(res) + end) +end + +-- 获取提取记录 +function M:FG_GetTakeLog(group_id, limit, num, begin_time, end_time, tagId,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.limit = limit + data.num = num + data.beginTime = begin_time + data.endTime = end_time + data.tagId = tagId + _client:send(Protocol.WEB_FG_FAG_TAKE_LOG, data, function(res) + callback(res) + end) +end + + +-- 获取提取记录 +function M:FG_GetBankLog(group_id, limit, num, begin_time, end_time, tagId,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + data.limit = limit + data.num = num + data.beginTime = begin_time + data.endTime = end_time + data.tagId = tagId + _client:send(Protocol.WEB_FG_GET_BANK_LOG, data, function(res) + callback(res) + end) +end + + +-- 获取能量包统计 +function M:FG_GetFagPackInfo(group_id, callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = group_id + _client:send(Protocol.WEB_FG_FAG_PACK_INFO, data, function(res) + callback(res) + end) +end + +--圈删除玩家 +function M:FG_GroupRemoveMember(id,tagId,callback) + local _client = ControllerManager.GroupClient + local data = {} + data.id = id + data.tagId = tagId + _client:send(Protocol.WEB_FG_GROUP_KICK, data, function(res) + if res.ReturnCode == 0 then + local group = DataManager.groups:get(id) + group:delMember(tagId) + end + callback(res) + end) +end +function M:FG_GroupSetVip(group_id, member_id, isvip, callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.tagId = member_id + _data.isvip = isvip + _client:send(Protocol.WEB_FG_SET_GROUP_VIP, _data, function(res) + if res.ReturnCode == 0 then + local group = DataManager.groups:get(group_id) + local member = group:getMember(member_id) + if member then + member.isvip = isvip + end + end + callback(res) + end) +end +function M:FG_EnterGroup(group_id,callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + printlog("FG_EnterGroup===>>>",_data.id) + _client:send(Protocol.WEB_ENTER_GROUP, _data, function(res) + if res.ReturnCode == 0 then + -- 获取玩法列表 + local group = DataManager.groups:get(group_id) + group:clear() + group.notice = res.Data.notice + group.hide_action = res.Data.hide_action + + self.mgr_ctr = ControllerManager.GetController(GroupMgrController) + self.mgr_ctr:connect(res.Data.host,group_id,function(res1) + if res1.ReturnCode == 0 then + callback(res) + else + callback(res1) + end + end) + else + callback(res) + end + + end) +end + +function M:FG_ExitGroupMgr() + if self.mgr_ctr then + self.mgr_ctr:disconnect() + end +end + +--指定圈删除房间 +function M:FG_RemoveRoom(group_id,roomid,callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.roomId = roomid + _client:send(Protocol.WEB_FG_DEL_ROOM, _data, function(res) + if res.ReturnCode == 0 then + local _data = {} + _data.room = roomid + callback(res) + else + callback(res) + end + end) +end + +--授权副盟主 opt 1设置 2取消 +function M:FG_SetManager(group_id, member_id, opt, callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.tagId = member_id + _data.opt = opt + _client:send(Protocol.WEB_FG_SET_MANAGER, _data, function(res) + if res.ReturnCode == 0 then + local group = DataManager.groups:get(group_id) + local member = group:getMember(member_id) + if member then + member.lev = opt + 1 + member.permission = res.Data.permission + end + end + callback(res) + end) +end + +-- 设置成员禁止娱乐 +function M:FG_BanMember(group_id, member_id, ban, opType, callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.tagId = member_id + _data.ban = ban + _data.opType = opType + _client:send(Protocol.WEB_FG_BAN_MEMBER, _data, function(res) + if res.ReturnCode == 0 then + local group = DataManager.groups:get(group_id) + local member = group:getMember(member_id) + if member then + member.ban = ban + end + end + callback(res) + self:SendGetGroupMembersInfo() + end) +end + + +-- 获取成员调度 +function M:FG_GetBanMemberHB(group_id, member_id,callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.tagId = member_id + _client:send(Protocol.GROUP_GET_BLACK_MEMBER, _data, function(res) + callback(res) + + end) +end + + +-- 设置成员调度 +function M:FG_BanMemberHB(group_id, member_id,opt,ban_rate,black_max_value,callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.tagId = member_id + _data.ban =opt + _data.opType = 2 + _data.ban_rate = ban_rate + _data.ban_max_value = black_max_value + + _client:send(Protocol.GROUP_BLACK_MEMBER, _data, function(res) + if res.ReturnCode == 0 then + local group = DataManager.groups:get(group_id) + local member = group:getMember(member_id) + if member then + member.group_black=opt + end + end + callback(res) + + end) +end + + +-- 设置禁止同桌 +function M:FG_SetBanTable(group_id, member_id, list, del_list, callback) + if #list == 0 then table.insert(list, 0) end + if #del_list == 0 then table.insert(del_list, 0) end + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.tagId = member_id + _data.ban_list = list + _data.del_list = del_list + _client:send(Protocol.WEB_FG_SET_BAN_TABLE, _data, function(res) + callback(res) + end) +end + +function M:FG_GetBanTable(group_id, member_id, callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.tagId = member_id + _client:send(Protocol.WEB_FG_GET_BAN_TABLE, _data, function(res) + callback(res) + end) +end + + +function M:GetAddMember(group_id,member_id,callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.tagId = member_id + _client:send(Protocol.GET_PLAYER_INFO, _data, function(res) + callback(res) + end) +end + + +--添加成员 +function M:FG_AddMember(group_id,member_id,callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.tagId = member_id + _client:send(Protocol.WEB_FG_INVITE_MEMBER, _data, function(res) + callback(res) + end) +end + +-- 改变体力值 +function M:FG_ChangeFag(group_id,member_id,fag,callback ) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.tag = member_id + _data.hp = fag + _client:send(Protocol.WEB_FG_CHANGE_FAG, _data, function(res) + callback(res) + end) +end + +-- 获取合伙人列表 +function M:FG_PartnerList(group_id, index, num, qid, callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.limit = index + _data.num = num + _data.qid = qid or 0 + _client:send(Protocol.WEB_FG_GET_PARTNERS, _data, function(res) + callback(res) + end) +end + +-- 设置合伙人权限 opt 1设置,2取消 +function M:FG_SetPartner(group_id, id, opt, callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.tagId = id + _data.opt = opt + _client:send(Protocol.WEB_FG_SET_PARTNER, _data, function(res) + if res.ReturnCode == 0 then + local group = DataManager.groups:get(group_id) + local member = group:getMember(id) + if member then + member.partnerLev = res.Data.partnerLev + member.partnerId = DataManager.SelfUser.account_id + end + end + callback(res) + end) +end + +-- 设置管理员权限 +function M:FG_SetMngPermission(group_id, target, permission, callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.tagId = target + _data.permission = permission + _client:send(Protocol.WEB_FG_SET_MNG_PERMISSION, _data, function(res) + if res.ReturnCode == 0 then + local group = DataManager.groups:get(group_id) + local member = group:getMember(target) + if member then + member.permission = permission + end + end + callback(res) + end) +end + +-- 获取圈子邮件列表 +function M:FG_GetMailList(group_id, uid, index, num, callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.uid = uid + _data.limit = index + _data.num = num + _client:send(Protocol.WEB_FG_GET_MAIL_LIST, _data, function(res) + callback(res) + end) +end + +-- 删除所有邮件 +function M:FG_DelAllMail(group_id, uid, callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.uid = uid + _client:send(Protocol.WEB_FG_DEL_ALL_MAIL, _data, function(res) + callback(res) + end) +end + +-- 设置成员备注 +function M:FG_SetMemberTag(group_id, uid, score, callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.tag = uid + _data.score = score + _client:send(Protocol.WEB_FG_SET_MEMBER_TAG, _data, function(res) + callback(res) + end) +end + +-- 设置亲友圈合伙人阀值 + +function M:FG_SetPartnerThreshold(group_id, uid, score, callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.uid = uid + _data.score = score + _client:send(Protocol.WEB_FG_SET_AUTO_SCORE, _data, function(res) + callback(res) + end) +end + +function M:FG_StopService(group_id,ban,callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.ban = ban == 1 and true or false + _client:send(Protocol.WEB_FG_STOP_SERVICE, _data, function(res) + callback(res) + end) +end + +function M:FG_AddPlay(group_id, game_id, config_data, name, hpData, hpOnOff, gtype, deskId, callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.config = config_data + _data.name = name + _data.gameId = game_id + _data.hpData = hpData + _data.hpOnOff = hpOnOff + _data.gtype = gtype + _data.deskId = deskId + _client:send(Protocol.WEB_FG_ADD_PLAY, _data, function(res) + callback(res) + end) +end + +function M:FG_DelPlay(group_id,pid,callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.pid = pid + _client:send(Protocol.WEB_FG_DEL_PLAY, _data, function(res) + callback(res) + end) +end + +function M:FG_BanPlay(group_id, pid, ban, callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.pid = pid + _data.ban = ban + _client:send(Protocol.WEB_FG_BAN_PLAY, _data, function(res) + callback(res) + end) +end + +function M:FG_MarkPlay(group_id, pid, ban, callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.pid = pid + _data.mark = ban + _client:send(Protocol.GROUP_MARK_PLAY, _data, function(res) + callback(res) + end) +end + +function M:FG_UpdatePlay(group_id, game_id, config_data, name, hpData, hpOnOff, pid, gtype, deskId, callback) + local _client = ControllerManager.GroupClient + local _data = {} + _data.id = group_id + _data.config = config_data + _data.name = name + _data.gameId = game_id + _data.hpData = hpData + _data.hpOnOff = hpOnOff + _data.pid = pid + _data.gtype = gtype + _data.deskId = deskId + _client:send(Protocol.WEB_FG_UPDATE_PLAY, _data, function(res) + callback(res) + end) +end \ No newline at end of file diff --git a/lua_probject/base_project/Game/Controller/RoomController.lua b/lua_probject/base_project/Game/Controller/RoomController.lua new file mode 100644 index 00000000..0d2f6a88 --- /dev/null +++ b/lua_probject/base_project/Game/Controller/RoomController.lua @@ -0,0 +1,227 @@ +RoomController = {} + +local M = {} + +--- Create a new RoomController +function RoomController.new() + setmetatable(M, { __index = IController }) + local self = setmetatable({}, { __index = M }) + self.baseType = RoomController + self.class = "Room" + return self +end + +local function __ConntectGameServer(cmd, room, host, _data, callback) + -- local _data = {} + _data["session"] = room.session + local _game_client = NetClient.new(host, "game") + _game_client:connect() + ControllerManager.SetGameNetClient(_game_client) + _game_client.onconnect:Add(function(code) + if (code == SocketCode.Connect) then + _game_client:send(cmd, _data, function(response) + if (response.ReturnCode == 0) then + _game_client.onconnect:Clear() + _game_client.onconnect:Add(ControllerManager.OnConnect) + callback(response) + return + end + _game_client:destroy() + if ControllerManager.GameNetClinet == _game_client then + ControllerManager.GameNetClinet = nil + end + callback(response) + end) + else + if ControllerManager.GameNetClinet == _game_client then + ControllerManager.GameNetClinet = nil + end + _game_client:destroy() + callback({ ReturnCode = 101 }) + end + end) + -- return _game_client +end + + +function M:CreateRoom(game_id, _data, callback) + local _client = ControllerManager.WebClient + local data = {} + data.game_id = game_id + data["platform"] = GetPlatform() + data.config_data = _data + -- local runtime = os.clock() + _client:send(Protocol.WEB_CREATE_ROOM, data, function(res) + -- if ( res.ReturnCode == Table_Error_code.ERR_IN_ROOM or res.ReturnCode == Table_Error_code.ERR_CREATE_ROOM) then + -- self:JoinRoom("000000",callback) + -- return + -- end + if (res.ReturnCode == 0) then + local json = res.Data + local game_info = json["game_info"] + if ExtendHotupdate.CheckVersion(game_info) ~= ExtendHotupdate.VERSION_NORMAL then + ExtendHotupdate.UpdateGame(game_info, function() + res.ReturnCode = -2 + callback(res) + end) + return + end + local game_id = game_info.game_id + local room_id = json["room_id"] + local server_ip = json["server_ip"] + local server_port = json["server_port"] + + local room = ExtendManager.GetExtendConfig(game_id):NewRoom() + room.game_id = game_id + room.room_id = room_id + room.server_host = string.concat(server_ip, ":", server_port) + room.session = _client:getSession() + DataManager.CurrenRoom = room + + local game_net = nil + + local j_data = {} + j_data["session"] = room.session + if not DataManager.SelfUser.location then + DataManager.SelfUser.location = Location.new() + end + j_data["pos"] = DataManager.SelfUser.location:Location2String() + + -- game_net = + __ConntectGameServer(Protocol.GAME_JOIN_ROOM, room, room.server_host, j_data, function(response) + if (response.ReturnCode == 0) then + -- game_net:clearEvent() + local _s2croom = response.Data + -- ControllerManager.SetGameNetClient(game_net) + room.owner_id = _s2croom["owner"] + room.banker_seat = _s2croom["manor"] + if _s2croom.createTime then + room.create_time = _s2croom["createTime"] + end + room.agent = _s2croom.agent == 1 and true or false + local extend = ExtendManager.GetExtendConfig(room.game_id) + extend:FillRoomData(_s2croom) + ControllerManager.ChangeController(GameController) + -- print("create room:"..(os.clock()-runtime)) + callback(response) + return + end + -- game_net:destroy() + callback(response) + end) + else + if callback then callback(res) end + end + end) +end + +local join_room_frame = 0 +function M:PublicJoinRoom(cmd, roomid, tem, callback, group_id, pid) + printlog("公共进入房间接口=============PublicJoinRoom") + -- 同一帧不重复调用 + local last_frame = join_room_frame + join_room_frame = Time.frameCount + if join_room_frame == last_frame then + return + end + -- 防止游戏没有离开控制器 + ControllerManager.ChangeController(LoddyController) + local _data = {} + if cmd == Protocol.WEB_FG_MATCH_ROOM then + _data["is_null"] = tem + elseif cmd == Protocol.WEB_FG_QUEUE_ROOM then + _data["is_null"] = tem + _data["room_id"] = roomid + else + _data["room_id"] = roomid + end + _data["id"] = group_id + _data["pid"] = pid + _data["platform"] = GetPlatform() + pt(_data) + local _client = ControllerManager.GroupClient + _client:send(cmd, _data, function(res) + printlog("++++++++++++111111111111111111111111111111111111") + pt(res) + if (res.ReturnCode == 0) then + local json = res.Data + local game_info = json["game_info"] + pt(game_info) + if ExtendHotupdate.CheckVersion(game_info) ~= ExtendHotupdate.VERSION_NORMAL then + ExtendHotupdate.UpdateGame(game_info, function() + res.ReturnCode = -2 + callback(res) + end) + return + end + local game_id = game_info.game_id + local server_ip = json["server_ip"] + local server_port = json["server_port"] + + local room = ExtendManager.GetExtendConfig(game_id):NewRoom() + room.lev = json["lev"] -- 自己在当前房间所在圈子的职位,1盟主,2管理员,3用户,非圈子房间就是3 + room.room_id = json["room_id"] + room.game_id = game_id + room.status = json["status"] + room.server_host = string.concat(server_ip, ":", server_port) + room.session = _client:getSession() + -- 圈子信息,圈子id和玩法id + room.group_id = json["groupId"] + -- 圈子禁止文字聊天,禁止语音聊天 + room.ban_chat1 = json["ban_chat1"] + room.ban_chat2 = json["ban_chat2"] + -- 玩法id + room.play_id = json["pid"] + -- 体力值开关 + room.hpOnOff = json["hpOnOff"] + -- 体力值倍数 + room.score_times = d2ad(json.hp_times) or 1 + DataManager.CurrenRoom = room + local j_data = {} + if not DataManager.SelfUser.location then + DataManager.SelfUser.location = Location.new() + end + j_data["pos"] = DataManager.SelfUser.location:Location2String() + printlog("++++++++++++++++++++++++++++++++++++++++++") + __ConntectGameServer(Protocol.GAME_JOIN_ROOM, room, room.server_host, j_data, function(res1) + printlog("===============================-------------") + pt(res1) + ControllerManager.IsSendCard = false + if (res1.ReturnCode ~= 0) then + if (callback) then callback(res1) end + else + ControllerManager.enterPlayerData = res1.Data.tableInfo.playerData + local _s2croom = res1.Data + room.owner_id = _s2croom["owner"] + if _s2croom.createTime then + room.create_time = _s2croom["createTime"] + end + if _s2croom.manor then + room.banker_seat = _s2croom.manor + end + room.agent = _s2croom.agent == 1 and true or false + -- ControllerManager.SetGameNetClient(game_net) + local extend = ExtendManager.GetExtendConfig(room.game_id) + extend:FillRoomData(_s2croom) + ControllerManager.ChangeController(GameController) + local gamectr = ControllerManager.GetCurrenController() + gamectr.tmpRoomID = room.room_id + gamectr.tmpGroupID = room.group_id + if callback then callback(res1) end + end + end) + else + if callback then callback(res) end + end + end) +end + +function M:JoinRoom(room_id, callback) + self:PublicJoinRoom(Protocol.WEB_JOIN_ROOM, room_id, false, callback, group_id, group_layer) +end + +function M:ResetJionRoom(callback) + local _game = ControllerManager.GetController(GameController) + local o_room = DataManager.CurrenRoom + self:JoinRoom(o_room.room_id, callback) +end diff --git a/lua_probject/base_project/Game/ControllerManager.lua b/lua_probject/base_project/Game/ControllerManager.lua new file mode 100644 index 00000000..69702a65 --- /dev/null +++ b/lua_probject/base_project/Game/ControllerManager.lua @@ -0,0 +1,112 @@ +import(".Protocol") +import(".Controller.IController") +import(".Controller.LoginController") +import(".Controller.LoddyController") +import(".Controller.GameController") +import(".Controller.NewGroupController") +import(".Controller.RoomController") +import(".Controller.GroupMgrController") +--- +-- a net ControllerManager +ControllerManager = { + + -- http网络连接 + WebClient = nil, + -- game网络长连接 + GameNetClinet = nil, + reset_join_room = 0 +} + + +local _currenController = nil +local _controllerMap = {} + + +function ControllerManager.Init() + _controllerMap[LoginController] = LoginController.new() + _controllerMap[LoddyController] = LoddyController.new() + _controllerMap[NewGroupController] = NewGroupController.new() + _controllerMap[RoomController] = RoomController.new() + _controllerMap[GroupMgrController] = GroupMgrController.new() + + local hostIp = GetGameInfo("login_url") + if (debug_print) then + print("hostIp:::" .. hostIp) + end + ControllerManager.WebClient = NetClient.new(hostIp, "majiang", ConnectionProtocol.Web) + --ControllerManager.GroupClient = nil--NetClient.new("http://192.168.0.1:8081/", "web_group", ConnectionProtocol.Web) +end + +function ControllerManager.ChangeController(type) + if (_currenController ~= nil) then + _currenController:OnExit() + end + _currenController = ControllerManager.GetController(type) + _currenController:OnEnter() + return _currenController +end + +-- 获取当前控制器 +function ControllerManager.GetCurrenController() + return _currenController +end + +--- +--@function [parent=#ControllerManager] GetController +--@return Game.Controller.IController#IController description +function ControllerManager.GetController(cls) + if (cls == GameController) then + if DataManager.CurrenRoom then + local exconfig = ExtendManager.GetExtendConfig(DataManager.CurrenRoom.game_id) + return exconfig.GetGameController() + end + end + local c = _controllerMap[cls] + return c +end + +function ControllerManager.SetGameNetClient(client) + if (ControllerManager.GameNetClinet ~= nil) then + ControllerManager.GameNetClinet:destroy() + end + ControllerManager.GameNetClinet = client + -- if (client ) then + -- client.onconnect:Add(ControllerManager.OnConnect) + -- end +end + +function ControllerManager.OnConnect(code) + print("=======================================ControllerManager", code) + if (code ~= SocketCode.Connect) then + ControllerManager.SetGameNetClient(nil) + if code ~= SocketCode.DisconnectByServer then + ControllerManager.OnGameConnect(SocketCode.TimeoutDisconnect) + ControllerManager.reset_join_room = 0 + ControllerManager.ResetJionRoom() + else + ControllerManager.OnGameConnect(SocketCode.DisconnectByServer) + end + else + ControllerManager.OnGameConnect(SocketCode.Connect) + end +end + +function ControllerManager.ResetJionRoom() + ControllerManager.reset_join_room = ControllerManager.reset_join_room + 1 + if ControllerManager.reset_join_room > 3 then + ControllerManager.OnGameConnect(SocketCode.NetworkException) + return + end + ControllerManager.ChangeController(LoddyController) + local loddyctr = ControllerManager.GetController(LoddyController) + loddyctr:ResetJionRoom(function(res) + if res.ReturnCode == 11 or res.ReturnCode == 81 or res.ReturnCode == 1005 then + ControllerManager.OnGameConnect(SocketCode.Disconnect) + return + elseif res.ReturnCode ~= 0 then + ControllerManager.ResetJionRoom() + return + end + ControllerManager.OnGameConnect(SocketCode.Connect) + end) +end diff --git a/lua_probject/base_project/Game/Data/GroupData.lua b/lua_probject/base_project/Game/Data/GroupData.lua new file mode 100644 index 00000000..362e68a0 --- /dev/null +++ b/lua_probject/base_project/Game/Data/GroupData.lua @@ -0,0 +1,283 @@ +local M = class("GroupData") + +function M:ctor() + self.id = 0 + self.name = "" + -- 盟主ID + self.owner = 0 + --盟主昵称 + self.o_nick = "" + --盟主头像 + self.o_portrait = "" + --自己在圈子的职位 + self.lev = 3 + self.top_time = 0 + --已获取成员数 + self.member_num = 0 + -- 总成员数 + self.total_member_num = 0 + --圈子房间数 + self.room_num = 0 + -- 1普通圈子2大联盟 + self.type = 1 + -- 1是房主支付2AA支付 + self.pay_type = 1 + --成员列表 + self.members = {} + self.memberMap = {} + --房间列表 + self.rooms = {} + --默认房间列表 + self.default_rooms = {} + --玩法列表 + self.playList = {} + --加圈子申请数 + self.joins = 0 + --自动解散 + self.dissolve_opt = 1 + --占座踢出 + self.kick_opt = 1 + --玩家申请 + self.apply = 0 + --盟主钻石 + self.diamo = 0 + --隐藏功能 + self.hide_action = 0 + --是否开启全民推广 + self.promote = false + +end + +-- 添加成员 +function M:addMember(member) + local _tem = self.memberMap[member.uid] + if _tem then + for k, v in pairs(member) do + _tem[k] = v + end + else + self.memberMap[member.uid] = member + self.members[#self.members + 1] = member + self.member_num = #self.members + end +end + +-- 删除成员 +function M:delMember(id) + local _tem = self.memberMap[id] + if _tem then + self.memberMap[id] = nil + for i=1,#self.members do + local member = self.members[i] + if member.uid == id then + table.remove(self.members,i) + break + end + end + self.member_num = #self.members + end +end + +function M:clearMember() + self.members = {} + self.memberMap = {} + self.member_num = 0 +end + +function M:getMember(id) + return self.memberMap[id] +end + +-- 添加房间 +function M:addRoom(room) + local pid = room.pid + local play = self:getPlay(pid) + if not play then return end + for i=1,#self.rooms do + local tem = self.rooms[i] + if room.id == tem.id then + self.rooms[i] = room + for j = 1, #play.rooms do + if room.id == play.rooms[j].id then + play.rooms[j] = room + return + end + end + return + end + end + self.rooms[#self.rooms+1] = room + -- 把房间加入对应的玩法下的列表 + play.rooms[#play.rooms + 1] = room +end + +-- 删除房间 +function M:delRoom(id) + local pid = 0 + for i=1,#self.rooms do + local room = self.rooms[i] + if room.id == id then + pid = room.pid + table.remove(self.rooms,i) + break + end + end + if pid == 0 then return end + local play = self:getPlay(pid) + if not play then return end + for i = 1, #play.rooms do + local room = play.rooms[i] + if room.id == id then + table.remove(play.rooms, i) + break + end + end +end + +-- 添加玩法 +function M:addPlay(play) + --printlog("添加玩法addPlay===>>>") + --pt(play) + local maxRound=0 + if play.maxRound then + maxRound=play.maxRound + else + local hpdata = json.decode(play.hpData) + maxRound=hpdata.maxRound + end + + local pnum = play.maxPlayers + local room = {maxPlayers = pnum, status = -1, default = true, pid = play.id,times=maxRound} + + play.rooms = {} + local index = self:getPlayIndex(play.id) + if index ~= -1 then + self.playList[index] = play + self.default_rooms[index] = room + return + end + self.playList[#self.playList + 1] = play + -- 房间列表中,给每个玩法添加一个对应的空房间 + self.default_rooms[#self.default_rooms + 1] = room + --self.playList=self:SortPlay(self.playList) + --pt(self.playList) + --self.default_rooms=self:SortDefaultPlay(self.default_rooms) + +end + + +function M:SortPlay(list) + local singlePlayList={} + local otherPlayList={} + + for i=1,#list do + local hpdata=json.decode(list[i].hpData) + if hpdata.maxRound and hpdata.maxRound==1 then + table.insert(singlePlayList,list[i]) + else + table.insert(otherPlayList,list[i]) + end + + end + + for i=1,#otherPlayList do + table.insert(singlePlayList,otherPlayList[i]) + end + + return singlePlayList + +end + + +function M:SortDefaultPlay(list) + local singlePlayList={} + local otherPlayList={} + + for i=1,#list do + if list[i].times and list[i].times==1 then + table.insert(singlePlayList,list[i]) + else + table.insert(otherPlayList,list[i]) + end + + end + + for i=1,#otherPlayList do + table.insert(singlePlayList,otherPlayList[i]) + end + + return singlePlayList + +end + +-- 删除玩法 +function M:delPlay(pid) + local index = self:getPlayIndex(pid) + if index ~= -1 then + table.remove(self.playList,index) + table.remove(self.default_rooms, index) + return true + end + return false +end + +-- 禁止玩法 +function M:banPlay(pid, ban) + local play = self:getPlay(pid) + --printlog("禁止玩法===>>>") + --pt(play) + play.ban = ban +end + +-- 标记玩法 +function M:markPlay(pid, ban) + local play = self:getPlay(pid) + --printlog("标记玩法===>>>") + play.mark = ban + --pt(play) +end + +function M:getPlay(pid) + local index = self:getPlayIndex(pid) + if index ~= -1 then + return self.playList[index] + end + return nil +end + +function M:getPlayName(pid) + local index = self:getPlayIndex(pid) + if index ~= -1 then + return self.playList[index].name + end + return "已删除" +end + +function M:getPlayIndex(pid) + for i=1,#self.playList do + local tem = self.playList[i] + if tem.id == pid then + return i + end + end + return -1 +end + +function M:clearPlay() + self.playList = {} + self.rooms = {} + self.default_rooms={} + for i = 1, #self.playList do + self.playList[i].rooms = {} + end +end + +function M:clear() + self.playList = {} + self.members = {} + self.memberMap = {} + self.rooms = {} + self.default_rooms = {} +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/Data/Groups.lua b/lua_probject/base_project/Game/Data/Groups.lua new file mode 100644 index 00000000..0688b582 --- /dev/null +++ b/lua_probject/base_project/Game/Data/Groups.lua @@ -0,0 +1,46 @@ +local M = class("Groups") + +function M:ctor() + self.groupList = {} + self.groupMap = {} +end + +function M:add(group) + local _tem = self.groupMap[group.id] + if _tem then + for k, v in pairs(group) do + _tem[k] = v + end + else + self.groupMap[group.id] = group + self.groupList[#self.groupList + 1] = group + end +end + +function M:del(id) + local _tem = self.groupMap[id] + if _tem then + local list = self.groupList + self.groupMap[id] = nil + for i=1,#list do + local group = list[i] + if group.id == id then + table.remove(list,i) + self.groupMap[id] = nil + break + end + end + end +end + +function M:get(id) + local _tem = self.groupMap[id] + return _tem +end + +function M:clear() + self.groupMap = {} + self.groupList = {} +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/Data/Location.lua b/lua_probject/base_project/Game/Data/Location.lua new file mode 100644 index 00000000..a0a09889 --- /dev/null +++ b/lua_probject/base_project/Game/Data/Location.lua @@ -0,0 +1,83 @@ +-- Edit By ChenGY +-- 记录玩家位置,距离计算 + +Location = { + longitude = 0, + latitude = 0, + default = true, + address = nil, +} + +local M = Location + +function M.new(str) + local self = {} + setmetatable(self, {__index = M}) + self:LoadLocation(str) + if str and str ~= "" then + self.default = false + else + self.default = true + end + return self +end + +-- 获取详细地址 +function M:GetAddress(obj) + if self.address then + obj.text = self.address + else + coroutine.start(self.DownloadAddressInfo, self, obj) + end +end + +function M:DownloadAddressInfo(obj) + -- bd09ll gcj02 wgs84ll + local coordtype = "&coordtype=wgs84ll" + -- if Application.platform == RuntimePlatform.Android then + -- coordtype = "" + -- end + local url = string.format("http://api.map.baidu.com/geocoder/v2/?ak=Z6qXIddQtwO8xaKunX4CURbwcV0GLSrG&location=%s,%s&output=json%s", self.latitude, self.longitude, coordtype) + local www = UnityEngine.WWW(url) + coroutine.www(www) + if string.utf8len(www.error) == 0 then + local txt = www.text + local json_add = json.decode(txt) + self.address = json_add.result.formatted_address + obj.text = self.address + end +end + +-- 计算距离 +function M:CalcDistance(loc) + local EARTH_RADIUS = 6378.137 + + local radLat1 = math.rad(self.latitude) + local radLat2 = math.rad(loc.latitude) + local a = radLat1 - radLat2 + local b = math.rad(self.longitude) - math.rad(loc.longitude) + + local s = 2 * math.asin(math.sqrt(math.pow(math.sin(a/2),2) + math.cos(radLat1)*math.cos(radLat2)*math.pow(math.sin(b/2),2))) + s = s * EARTH_RADIUS + local dist = math.floor(s * 10000 +.5) / 10000 + return dist +end + +function M:Location2String() + if self.default then return "" end + local str = self.longitude .. "," .. self.latitude + return str +end + +function M:String2Location() + local loc = string.split(str, ",") + return loc +end + +function M:LoadLocation(str) + local loc = string.split(str, ",") + self.longitude = tonumber(loc[1]) + self.latitude = tonumber(loc[2]) +end + +return M diff --git a/lua_probject/base_project/Game/Data/Player.lua b/lua_probject/base_project/Game/Data/Player.lua new file mode 100644 index 00000000..c32c66f2 --- /dev/null +++ b/lua_probject/base_project/Game/Data/Player.lua @@ -0,0 +1,38 @@ +--玩家数据对象 + + +local Player ={ + -- 玩家对应的User对象 + self_user = nil, + -- 网络状态 1 在线 0 离线 + line_state = 1, + -- 座位号 + seat = 0, + -- 是否准备 + ready = false, + -- 当前局积分 + curren_score = 0, + -- 总积分 + total_score = 0, + -- 托管 + entrust = false, +} +--- +-- @type Player +local M = Player + + + +--- Create a new Player +function Player.new() + local self = {} + setmetatable(self, {__index = M}) + self.hand_cards = {} + return self +end + +-- 清理玩家数据 +function M:Clear() +end + +return M diff --git a/lua_probject/base_project/Game/Data/RecordData.lua b/lua_probject/base_project/Game/Data/RecordData.lua new file mode 100644 index 00000000..a2ea2555 --- /dev/null +++ b/lua_probject/base_project/Game/Data/RecordData.lua @@ -0,0 +1,45 @@ + +RecordData = class ("RecordData") + +function RecordData:ctor() + self.Result_Map = {} +end + + +MResult = class ("MResult") + +function MResult:ctor() + -- 游戏类型 + self.GameId = 0 + -- 房间ID + self.RoomId = 0 + -- 回放ID + self.PlayBackId = "" + -- 对战时间 + self.Time = "" + + -- 玩家列表 + self.TotalScoreList = {} + + -- 每一小局列表 + self.GameTimes = {} +end + +MPlayerScore = class ("MPlayerScore") + +function MPlayerScore:ctor() + + -- 玩家名称 + self.Name = "" + + -- 分数 + self.Score = 0 +end + +MGameTimes = class ("MGameTimes") +function MGameTimes:ctor() + self.PlayerList = {} + + +end + diff --git a/lua_probject/base_project/Game/Data/Room.lua b/lua_probject/base_project/Game/Data/Room.lua new file mode 100644 index 00000000..d3499f6c --- /dev/null +++ b/lua_probject/base_project/Game/Data/Room.lua @@ -0,0 +1,219 @@ +-- 房间基本数据类 +--author:-- + +StateType = +{ + Ready = 0, + Palying = 1, + PalyingWait = 2 +} + +---房间数据对象 +local Room = { + -- 房间ID + room_id = "", + -- 游戏ID + game_id = 0, + -- 服务器地址 + server_host = "", + -- 玩家session + session = "", + -- 自己 + self_player = nil, + -- 房主ID + owner_id = "", + -- 庄家座位号 + banker_seat = 0, + -- 当前回合 + curren_round = 0, + -- 当前转向的座位号 + curren_turn_seat = 0, + + -- 房间配置 + room_config = nil, + + -- 玩家列表 + player_list = nil, + + -- 游戏中 + playing = false, + + create_time = "", + + group_id = 0, + -- 自己在当前房间所在圈子的职位,1盟主,2管理员,3用户,非圈子房间就是3 + lev = 3, + -- 房间倍数 + score_times = 1, + -- 体力值开关 + hpOnOff = 0, + -- 牌友圈的游戏id + pid = 0, + + -- 房间重连标记 + reloading = false, +} + +--- +-- a RoomConfig +RoomConfig = { + -- 人数 + people_num = 2, + -- 回合数 + opt_round = 1, +} + +--- +-- @type Room +local M = Room + + +--- Create a new Room +function Room.new() + local self = {} + setmetatable(self, {__index = M}) + self:init() + return self +end + +function M:init() + self.player_list = {} + self.room_config ={} +end + +-- 创建玩家 +function M:NewPlayer() + return Player.new() +end + +-- 添加玩家 +function M:AddPlayer(player) + if (not player) then return end + for k , tem in ipairs(self.player_list) do + if(tem.self_user.account_id == player.self_user.account_id) then + -- tem = player + self.player_list[k] = player + return + end + end + self.player_list[#self.player_list+1] = player + + +end + +-- 是否为不可负分房间 +function M:checkHpNonnegative() + local isNonnegative = self.room_config.isNonnegative + if isNonnegative and isNonnegative == 1 then + return true + end + return false +end + + +-- 删除指定玩家 +-- +function M:RemovePlayer(player) + for i , _player in ipairs(self.player_list) do + if _player == player then + table.remove(self.player_list , i) + return + end + end +end + + +-- 获取指定玩家_userid +-- +-- +function M:GetPlayerById(id) + for _ , tem in pairs(self.player_list) do + if (tem.self_user.account_id == id) then + return tem + end + end + return nil; +end + + +-- 获取指定玩家_桌号 +-- +-- +function M:GetPlayerBySeat(seat) + for _ , tem in ipairs(self.player_list) do + if (tem.seat == seat) then + return tem + end + end + return nil +end + +-- 获取大结算显示的积分 +function M:GetTotalScore(score) + if self.hpOnOff == 1 then + return d2ad(score) + else + return score + end +end +-- 获取乘倍数前的积分 +function M:GetOriginScore(total_score) + if self.hpOnOff == 1 then + return total_score / self.score_times + else + return total_score + end +end +-- 设置房间重连状态 +function M:SetReloadStatus(flag) + self.reloading = flag +end +-- 获取房间重连状态 +function M:GetReloadStatus() + return self.reloading +end + +--- Create a new RoomConfig +function RoomConfig:init(config) + --人数 + self.people_num = config["maxPlayers"] + --支付类型 + self.AA = config["AA"] == 1 and true or false + --托管 + self.tuoguan = config["tuoguan"] + self.tuoguan_active_time = config["tuoguan_active_time"] + self.tuoguan_result_type = config["tuoguan_result_type"] + --不可负分 + self.isNonnegative = config["isNonnegative"] + self.pid = config["pid"] + return self +end + +local str_tuoguan = {"当局结算", "二局结算", "三局结算","满局结算"} +function RoomConfig:GetDes(sp, str_people_num) + local str = "" + if not str_people_num and self.people_num then + str = str .. self.people_num .. "人" + --str = str .. sp + end + -- if self.AA then + -- str = str .. "AA支付" .. sp + -- else + -- str = str .. "房主支付" .. sp + -- end + -- if self.isNonnegative == 1 then + -- str = str .. "不可负分" .. sp + -- end + if self.tuoguan then + str = str .. "托管" .. sp + str = str .. "离线" .. self.tuoguan_active_time .. "秒托管" .. sp + str = str .. str_tuoguan[self.tuoguan_result_type] .. sp + end + return str +end + +function RoomConfig:GetGameName() + +end + +return M diff --git a/lua_probject/base_project/Game/Data/RoomResult.lua b/lua_probject/base_project/Game/Data/RoomResult.lua new file mode 100644 index 00000000..6e09fb1a --- /dev/null +++ b/lua_probject/base_project/Game/Data/RoomResult.lua @@ -0,0 +1,29 @@ +--结算数据对象 +local m = class("RoomResult") + +function m:ctor() + -- 房间ID + self.RoomID = 0 + + -- 结果类型 + self.Type = RoomResultType.Normal + + -- 庄家 + self.BankerSeat = 0 + + + -- 剩余牌数 + self.LeftNum = 0 + + -- 当前局 + self.CurrenRound = 0 + + -- 总局 + self.ToalRound = 0 + + -- 玩家列表 + -- list.new() + self.PlayerList = {} +end + +return m diff --git a/lua_probject/base_project/Game/Data/TableBG.lua b/lua_probject/base_project/Game/Data/TableBG.lua new file mode 100644 index 00000000..60add02b --- /dev/null +++ b/lua_probject/base_project/Game/Data/TableBG.lua @@ -0,0 +1,92 @@ +-- Edit By ChenGY +-- 记录各游戏的桌面背景 + +local TableBG = {} + +local M = TableBG +local bg_config = { + {id = 1, url = "base/tablebg/bg/bg1", thumb = "ui://Common/b04"}, + {id = 2, url = "base/tablebg/bg/bg2", thumb = "ui://Common/b05"}, + {id = 3, url = "base/tablebg/bg/bg3", thumb = "ui://Common/b06"}, + {id = 4, url = "base/tablebg/bg/bg7", thumb = "ui://Common/b01"}, + {id = 5, url = "base/tablebg/bg/bg5", thumb = "ui://Common/b02"}, + {id = 6, url = "base/tablebg/bg/bg4", thumb = "ui://Common/b03"}, +} + +function TableBG.GetBGConfig(config) + return config or bg_config +end + +local function GetBG(data, game_id) + local bg_id = 0 + for i = 1, #data do + if data[i].game_id == game_id then + bg_id = data[i].bg_id + break + end + end + return bg_id +end +local function SetBG(data, game_id, bg_id) + local contain_key = false + for i = 1, #data do + if data[i].game_id == game_id then + contain_key = true + if data[i].bg_id ~= bg_id then + data[i].bg_id = bg_id + break + end + end + end + if not contain_key then + local _data = {} + _data.game_id = game_id + _data.bg_id = bg_id + table.insert(data, _data) + end +end + +function TableBG.GetTableBG(game_id) + local id = -1 + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + -- print(DataManager.SelfUser.invite_code, DataManager.SelfUser.account_id) + if json_data ~= nil then + local config_data = json.decode(json_data) + id = GetBG(config_data, game_id) + end + return id +end + +function TableBG.LoadTableBG(id, game_id, main_view, config) + local bg_id = M.GetTableBG(game_id) + local index + if not bg_id then + index = 1 + elseif bg_id > 0 then + index = bg_id + else + index = id + end + + local con + if config then + con = config[index] + else + con = bg_config[index] + end + LoadGameBg(con and con.url or bg_config[1].url, main_view) +end + +function TableBG.SaveTableBG(game_id, bg_id) + local config_data + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + config_data = json.decode(json_data) + else + config_data = {} + end + SetBG(config_data, game_id, bg_id) + Utils.SaveLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code, json.encode(config_data)) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/Data/User.lua b/lua_probject/base_project/Game/Data/User.lua new file mode 100644 index 00000000..8e0b0e63 --- /dev/null +++ b/lua_probject/base_project/Game/Data/User.lua @@ -0,0 +1,110 @@ +--用户账号数据类 +--author:-- + +--- +-- a user +User = { + account_id = "", + -- acc + acc ="", + --头像 + head_url = "", + -- 用户IP + host_ip = "", + -- 经纬度坐标 + location = nil, + -- 昵称 + nick_name = "", + --性别 + sex = 0, + -- 房间ID + room_id = "", + -- 房卡数 + diamo = 0, + -- 代理类型,0不是代理,1普通代理,2大联盟代理 + agent = 0, + invite_code = "1", + -- 当前圈子 + cur_group = nil, + -- 圈子id,重连时用来标记是否在圈子房间中 + group_id = 0, + + playback = {}, + + --弹窗公告 + notices = {}, +} + + +--- +-- @type User +local M = User + + + +--- Create a new User +function User.new() + local self = {} + setmetatable(self, {__index = M}) + return self +end + + +function M:getGameData(game_id) + local game_list = self.games + + for i=1,#game_list do + local game = game_list[i] + if game.game_id == game_id then + return game + end + end +end + +function M:addGameData(data) + local game_list = self.games + for i=1,#game_list do + local game = game_list[i] + if game.game_id == data.game_id then + game_list[i] = data + return + end + end + game_list[#game_list+1] = data +end + + +function M:removeGameData(game_id) + local game_list = self.games + for i=1,#game_list do + local game = game_list[i] + if game.game_id == game_id then + table.remove(game_list,i) + return + end + end +end + +--[[ +local GuildData = { + --公会ID + id = 1, + --公会区名 + zone = "", + --公会名称 + name = "", + --游戏列表 + games =nil +} + +local GameInfo = { + --游戏ID + game_id = 1, + + --服务器版本 + version = "1.0.0", + + table_data = nil +} +]] + diff --git a/lua_probject/base_project/Game/Data/init.lua b/lua_probject/base_project/Game/Data/init.lua new file mode 100644 index 00000000..a8edf8e2 --- /dev/null +++ b/lua_probject/base_project/Game/Data/init.lua @@ -0,0 +1,13 @@ + +local DATA_MODEL_NAME = ... + +Player = import(".Player") +import(".RecordData") + +Room = import(".Room") +RoomResult = import(".RoomResult") +import(".User") +RecordData = import(".RecordData") +Location = import(".Location") +GroupData = import(".GroupData") +Groups = import(".Groups") \ No newline at end of file diff --git a/lua_probject/base_project/Game/DataManager.lua b/lua_probject/base_project/Game/DataManager.lua new file mode 100644 index 00000000..89d04db3 --- /dev/null +++ b/lua_probject/base_project/Game/DataManager.lua @@ -0,0 +1,22 @@ +require "Game.Data.init" + +--- +--@module Game.DataManager + +DataManager= { + + --my user + SelfUser = User.new(), + + CurrenRoom = nil, + -- 互动表情时间,控制cd + InteractTime = 0, + -- 记录各游戏使用牌型的列表,现暂时只保存了麻将的数据. + CardTypeList = nil, + -- 牌友圈列表 + groups = Groups.new(), + -- 禁止互动的房间ID + BanInteractRoom = nil, + -- app版本 + AppVersion = "", +} diff --git a/lua_probject/base_project/Game/ExtendHotupdate.lua b/lua_probject/base_project/Game/ExtendHotupdate.lua new file mode 100644 index 00000000..523e872a --- /dev/null +++ b/lua_probject/base_project/Game/ExtendHotupdate.lua @@ -0,0 +1,126 @@ +local function __ShowTip(_version_view, text, callback) + local ctr_state = _version_view:GetController("state") + ctr_state.selectedIndex = 1 + _version_view:GetChild("tex_tip").text = text + _version_view:GetChild("btn_ok").onClick:Set(function() + ctr_state.selectedIndex = 0 + if (callback ~= null) then + callback:DynamicInvoke() + end + end) + local btn_close = _version_view:GetChild("btn_close") + if btn_close then + btn_close.onClick:Set(function() + _version_view:Dispose() + _version_view = nil + end) + end +end + +local function __update_check(data, onback, _version_view) + print("===================updateCheck") + local tex_tip = _version_view:GetChild("tex_info") + for k, game_data in ipairs(data) do + local asset_path = game_data["bundle"]:gsub("\r\n", "") + asset_path = string.gsub(asset_path, "%.", "/") + local local_version = Version.DEFUALT + local server_version = Version(game_data["version"]) + local version_update = Hotupdate(asset_path .. "/", local_version, server_version) + version_update.AssetName = game_data["name"] + version_update:SetTipCallback(function(text, callback) + __ShowTip(_version_view, text, callback) + end) + version_update:LoadAsset() + while (not version_update.Done) do + onback(version_update.Progress, false) + tex_tip.text = version_update.TextTip + coroutine.step() + end + ResourcesManager.ReadAssetConfig(asset_path) + onback(0, false) + end + onback(1, true) +end + +ExtendHotupdate = { + -- 正常 + VERSION_NORMAL = 0, + -- 下载 + VERSION_DOWN = 1, + -- 更新 + VERSION_UPDATE = 2, +} + +function ExtendHotupdate.UpdateGameList(list, callback) + if (not GameApplication.Instance.buildApp) then + callback() + return + end + + local _version_view = UIPackage.CreateObjectFromURL("ui://Hotupdate/Version") + _version_view.x = (GRoot.inst.width - _version_view.width) / 2 + _version_view:GetChild("tex_info").text = "正在检查资源。。。" + local _pd = _version_view:GetChild("pb_progress") + _pd.value = 0 + GRoot.inst:AddChild(_version_view) + + coroutine.start(__update_check, list, function(progress, finish) + _pd.value = progress * 100 + if (finish) then + callback() + _version_view:Dispose() + _version_view = nil + end + end, _version_view) +end + +function ExtendHotupdate.UpdateGame(data, callback) + if (not GameApplication.Instance.buildApp) then + ExtendManager.UpdateExtend(data) + if callback then callback() end + return + end + ViewUtil.CloseModalWait() + NetResetConnectWindow.CloseNetReset() + local _version_view = UIPackage.CreateObjectFromURL("ui://Common/ExtendHotUpdate") + _version_view:GetChild("tex_info").text = "正在检查资源。。。" + local _pd = _version_view:GetChild("pb_progress") + _pd.value = 0 + _version_view:AddRelation(GRoot.inst, RelationType.Size) + GRoot.inst:AddChild(_version_view) + _version_view:MakeFullScreen() + + coroutine.start(__update_check, { data }, function(progress, finish) + _pd.value = progress * 100 + if (finish) then + ExtendManager.UpdateExtend(data) + if callback then callback() end + _version_view:Dispose() + end + end, _version_view) +end + +function ExtendHotupdate.CheckVersion(game_data) + if (not GameApplication.Instance.buildApp) then + ExtendManager.UpdateExtend(game_data) + return ExtendHotupdate.VERSION_NORMAL + end + if (not game_data) then + return ExtendHotupdate.VERSION_DOWN + end + + local asset_path = game_data.bundle + asset_path = string.gsub(asset_path, '%.', '/') + local local_version = Hotupdate.GetLocalVersion(asset_path .. "/") + local server_version = Version(game_data.version) + if not local_version then + return ExtendHotupdate.VERSION_DOWN + end + + if local_version:ContainAll(server_version) then + return ExtendHotupdate.VERSION_UPDATE + end + ResourcesManager.ReadAssetConfig(asset_path) + ExtendManager.UpdateExtend(game_data) + return ExtendHotupdate.VERSION_NORMAL +end diff --git a/lua_probject/base_project/Game/ExtendManager.lua b/lua_probject/base_project/Game/ExtendManager.lua new file mode 100644 index 00000000..8b4188aa --- /dev/null +++ b/lua_probject/base_project/Game/ExtendManager.lua @@ -0,0 +1,73 @@ +require "Game.IExtendConfig" +require "Game.IGameInfo" +--- +-- a net ExtendManager +ExtendManager = { + +} + +local _extendMap = {} + +local _isUpdate = false +local _isInit = false + +local function __new_config(data) + local ec = reimport(data.bundle ..".ExtendConfig") + --print("初始化ExtendManager===>>>"..data.bundle) + --pt(data) + local config = ec.new() + ec.game_data = data + _extendMap[data.game_id] = config + return config +end + +function ExtendManager.Init(game_list) + print("==========================================================ExtendManager") + pt(game_list) + if _isInit then return end + for i=1,#game_list do + local game = game_list[i] + __new_config(game) + end + + _isInit = true +end + +-- 更新扩展玩法到最新数据 +function ExtendManager.UpdateExtend(data) + if not data then return end + local tem = _extendMap[data.game_id] + if tem and (not GameApplication.Instance.buildApp) then + return + end + if tem and tem.game_data.version ~= data.version then + GameApplication.Instance:UnExtendLua(data) + tem:UnAllAssets() + end + __new_config(data) +end + +function ExtendManager.RemoveExtend(data) + local tem = _extendMap[data.game_id] + if tem then + GameApplication.Instance:UnExtendLua(data) + tem:UnAllAssets() + end +end + +function ExtendManager.GetExtendConfig(id) + return _extendMap[id] +end + +function ExtendManager.GetGameData(id) + local data = _extendMap[id] + if not data then + return nil + end + return data.game_data +end + +function ExtendManager.Destroy() + _extendMap = {} + _isInit = false +end \ No newline at end of file diff --git a/lua_probject/base_project/Game/IExtendConfig.lua b/lua_probject/base_project/Game/IExtendConfig.lua new file mode 100644 index 00000000..ae078071 --- /dev/null +++ b/lua_probject/base_project/Game/IExtendConfig.lua @@ -0,0 +1,77 @@ +--- +IExtendConfig = { + extend_id = 0, + _viewMap = nil +} + +local M = IExtendConfig +-- +function M:GetGameInfo() +end + +--卸载资源 +function M:UnAssets() +end + +function M:NewRoom() + return Room.new() +end + +function M:GetGameController() +end + +function M:FillRoomData(s2croom) +end + +function M:FillPlayerData(info, player) + local room = DataManager.CurrenRoom + local playerList = info + local NewPlayer = player + if not NewPlayer then + NewPlayer = room:NewPlayer() + end + + --printlog("111111111111111111111111111111111111111111") + --pt(info) + + for i = 1,#playerList do + local _jp = playerList[i] + + local p = NewPlayer.new() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + if (DataManager.SelfUser.account_id == pid) then + room.self_player = p + p.self_user = DataManager.SelfUser + else + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + end + p.self_user.location = Location.new(_jp["pos"] or "") + p.self_user.host_ip = _jp["ip"] + p.total_score = _jp["score"] or 0 + p.cur_hp = _jp["cur_hp"] or 0 + p.total_hp = _jp["total_hp"] or 0 + if _jp["hp_info"] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + if _jp["entrust"] then + p.entrust = _jp.entrust + end + + room:AddPlayer(p) + end +end + +function M:GetView(id) + local dview_class = self._viewMap[id] + return dview_class +end \ No newline at end of file diff --git a/lua_probject/base_project/Game/IGameInfo.lua b/lua_probject/base_project/Game/IGameInfo.lua new file mode 100644 index 00000000..b7ac7f12 --- /dev/null +++ b/lua_probject/base_project/Game/IGameInfo.lua @@ -0,0 +1,71 @@ +-- Edit by ChenGY +--@type IGameInfo + +--扩展UI: +--需要两个控制器,agent控制支付类型显示,Cost控制目前选中的支付类型 +--回合数对应的显示价格组件统一命名为:tex_price1、tex_price2、... +--房主支付、AA支付显示价格的组件需要统一名称:tex_owner、tex_aa + +IGameInfo = { + -- 回合选项数量,必填 + _roundChoice = 2, + -- 玩家数量,在子类中赋值,如果玩家数量可选,需要重载 OnChangeOption 方法, 详见长沙麻将 + _maxPlayer = 2, + _game_data = nil, +} + +local M = IGameInfo + +function M:SelectedCardNum() + return 0 +end + +function M:SelectedConfigData() + return {} +end + +function M:FillData() +end + +function M:ShowRoomPrice(ctype) + local list = DataManager.SelfUser.games + if not self._game_data then + for i = 1, #list do + if list[i].game_id == self.game_data.game_id then + self._game_data = list[i] + end + end + end + self:ShowVariablePrice(ctype) +end + +function M:OnChangeOption(ctype) + self:ShowRoomPrice(ctype) + local round = self._config:GetController("round") + round.onChanged:Set(function () + self:ShowVariablePrice(ctype) + end) +end + +function M:ShowVariablePrice(ctype) + -- 显示回合数后面的价格,tex_price1、tex_price2 + + for i = 1, self._roundChoice do + local price = "0" + price = self._game_data[string.format("pay%s_%s", i, self._maxPlayer)] + local tex_price = self._config:GetChild("tex_price" .. i) + if tex_price then + tex_price.text = price + end + end + + -- 显示房主支付、aa支付的价格,tex_aa/tex_owner + -- local tex_aa = self._config:GetChild("tex_aa") + -- local tex_owner = self._config:GetChild("tex_owner") + -- local opt = self._config:GetController("round").selectedIndex + -- local price = self._game_data[string.format("pay%s_%s", opt + 1, self._maxPlayer)] + -- tex_aa.text = math.ceil(price / self._maxPlayer) + -- tex_owner.text = price +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/Protocol.lua b/lua_probject/base_project/Game/Protocol.lua new file mode 100644 index 00000000..8349bbdb --- /dev/null +++ b/lua_probject/base_project/Game/Protocol.lua @@ -0,0 +1,452 @@ + +Protocol = { + -------------------- Web -------------------------- + -------------- acc ----------- + -- 用户登录 + WEB_USER_LOGIN = "acc/regist_login", + -- 快速登录 + WEB_QUICK_LOGIN = "acc/quick_login", + -- 手机密码 + WEB_PHONE_PASSWORD_LOGIN = "acc/phone_pw_login", + -- 手机登录 + WEB_PHONE_LOGIN = "acc/verifyVerificationCode", + -- ID密码 + WEB_ID_PASSWORD_LOGIN = "acc/id_login", + -- 获取手机验证码 + WEB_GET_VERIFCATION_CODE="acc/sendVerificationCode", + --绑定手机号码 + WEB_BINDING_PHONE="acc/binding_phone", + --更换微信 + WEB_change_weChat="acc/change_weChat", + -- 更新用户信息 + WEB_UPDATE_USER_INFO = "acc/update_user_info", + -- 获取用户信息 + WEB_GET_USER_INFO = "acc/get_user_info", + + WEB_UPDATE_INFO = "acc/update_player_info", + + -- 实名认证 + WEB_REAL_NAME_IDENTIFY = "acc/certification", + + ----map mode---- + WEB_GET_PROVINCES = "acc/get_provinces", + + WEB_GET_CITIES = "acc/get_citys", + + WEB_ADD_GAME = "acc/add_game", + + WEB_DEL_GAME = "acc/del_game", + + WEB_GET_AGENT_SECRET = "acc/agent_secret", + -- 设置被邀请开关 + WEB_SET_GROUP_INVITATED = "acc/set_group_invitation", + ----index---- + -- 获取公告 + WEB_UPDATE_NOTICE = "index/get_notice", + + + + + + ----rank---- + + WEB_GET_MILITARY = "military/get_military", + + WEB_GET_MILITARY_BY_ROOMID = "military/get_militaryByRoomId", + --回放 + WEB_GET_PLAY_BACK = "military/get_playBack", + -- 牌友圈排行 + WEB_FG_RANK_LIST = "military/get_rankListByGroup", + -- 局数统计 + WEB_FG_ROUND_LIST = "military/get_roundListByGroup", + -- 设置排行是否可访问 + WEB_FG_SET_RANK_ACCESSIBLE = "military/set_randListRightByGroup", + + ----room---- + -- 创建房间 + WEB_CREATE_ROOM = "room/create_room", + -- 加入房间 + WEB_JOIN_ROOM = "room/join_room", + + + + + --start::::::::::::::牌友圈协议:::::::::::::::::::: + --牌友圈获取组列表 + WEB_FG_GROUP_LIST = "group/get_groups", + --牌友圈创建组 + WEB_FG_CREATE_GROUP = "group/create_group", + --牌友圈加入组 + WEB_FG_JOIN_GROUP = "group/join_group", + --牌友圈删除组 + WEB_FG_REMOVE_GROUP = "group/del_group", + --牌友圈退出圈子 + WEB_FG_EXIT_GROUP = "group/exit_group", + --牌友圈更改组名 + WEB_FG_GROUP_RENAME = "group/group_rename", + --牌友圈邀请列表 + WEB_FG_GROUP_JOINS = "group/get_group_joins", + --牌友圈审核玩家加入 + WEB_FG_GROUP_VERIFY_JOIN = "group/verify_join_group", + --牌友圈玩家列表 + WEB_FG_GROUP_MEMBERS = "group/get_group_members", + --牌友圈玩家列表1 + WEB_FG_GROUP_MEMBERS1 = "group/get_my_members", + --踢出玩家列表 + WEB_FG_GROUP_TICHU = "group/get_kick_log", + --牌友圈删除玩家 + WEB_FG_GROUP_KICK = "group/group_kick", + --牌友圈获取房间列表 + WEB_FG_GROUP_ROOMS = "group/get_group_rooms", + --牌友圈创建房间 + WEB_FG_GROUP_CREATE_ROOM = "group/create_group_room", + --牌友圈删除房间 + WEB_FG_GROUP_DEL_ROOM = "group/del_group_room", + --牌友圈获取战绩列表 + WEB_FG_GROUP_RECORD = "group/group_game_record", + -- 牌友圈创建机器人 + WEB_FG_CREATE_BOT = "group/create_group_bot", + -- 牌友圈获取机器人列表 + WEB_FG_GET_BOTS = "group/get_group_bots", + -- 牌友圈删除机器人 + WEB_FG_DEL_BOT = "group/del_group_bot", + -- 授权副盟主 + WEB_FG_SET_MANAGER = "group/set_member_mgr", + -- 设置合伙人 + WEB_FG_SET_PARTNER = "group/set_partner", + -- 禁止娱乐 + WEB_FG_BAN_MEMBER = "group/ban_member", + --获取heibai + GROUP_GET_BLACK_MEMBER= "group/get_black_member", + --heibai调动 + GROUP_BLACK_MEMBER = "group/black_member", + -- 设置vip + WEB_FG_SET_GROUP_VIP = "group/set_group_vip", + -- 禁止同桌 + WEB_FG_SET_BAN_TABLE = "group/set_ban_desk", + -- 添加玩家 + WEB_FG_INVITE_MEMBER = "group/invite_group_member", + --获取添加玩家 + GET_PLAYER_INFO = "group/get_player_info", + -- 玩家备注 + WEB_FG_NOTE_MEMBER = "group/note_group_member", + -- 圈子备注 + WEB_FG_NOTE_GROUP = "group/group_note", + -- 获取禁止同桌列表 + WEB_FG_GET_BAN_TABLE = "group/get_ban_desk_list", + -- 克隆牌友圈 + WEB_FG_CLONE_GROUP = "group/clone_group", + -- 改变体力值 + WEB_FG_CHANGE_FAG ="group/update_member_hp", + -- 体力值详情 + WEB_FG_FAG_LOG ="group/get_hp_log", + -- 体力值记录 + WEB_FG_FAG_UPDATE_LOG ="group/get_hpUpdate_log", + -- 体力值设置 + WEB_FG_FAG_HPDATA ="group/set_group_hpData", + -- 设置体力值权限 + WEB_FG_SHOW_FAG ="group/show_hp", + -- 查看整线体力值 + GET_HP_TOTAL = "group/get_hp_total", + -- 添加层 + WEB_FG_CREATE_SUB_GROUP = "group/create_subGroup", + -- 删除层 + WEB_FG_DEL_SUB_GROUP = "group/del_subGroup", + -- 置顶 + WEB_FG_GROUP_TOP ="group/stick_group", + -- 查看预览 + WEB_FG_GROUP_PREVIEW = "group/group_preview", + -- 获取排名列表 + WEB_FG_GROUP_HPRANK = "group/group_hp_ranking", + -- 核实转让对象 + WEB_FG_CHECK_REMIT_MEMBER = "group/transfer_accounts_query", + -- 转让体力值 + WEB_FG_REMIT = "group/transfer_accounts", + -- 添加玩法 + WEB_FG_ADD_PLAY = "group/add_play", + -- 删除玩法 + WEB_FG_DEL_PLAY = "group/del_play", + -- 更新玩法 + WEB_FG_UPDATE_PLAY = "group/update_play", + -- 禁止、恢复玩法 + WEB_FG_BAN_PLAY = "group/ban_play", + -- 进入圈子 + WEB_ENTER_GROUP = "group/enter_group", + -- 获取上级合伙人 + WEB_GET_SUPERIOR_PARTNERS = "group/get_member_parents", + --获取积分转移限制 + WEB_GET_TRANS_HP_LIMIT = "group/get_trans_hp_limit", + --设置积分转移限制 + WEB_SET_TRANS_HP_LIMIT = "group/set_trans_hp_limit", + -- 查询成员 + WEB_FG_FIND_MEMBER = "group/find_member", + --搜索 + WEB_FG_FIND_PARTNER_STAT = "group/log/find_partner_stat", + + --搜索 + WEB_FG_FIND_COST_COUNT_STAT = "group/log/find_partner_stat_cost_count", + + --find_partner_stat_member + WEB_FG_FIND_PARTNER_STAT_Member = "group/log/find_partner_stat_member", + + WEB_FG_FIND_PARTNER_COST_COUNT_Member = "group/log/find_partner_stat_member_cost_count", + -- 强制提取 + WEB_FG_TAKE_HP = "group/group_take_hp", + -- 修改牌友圈信息 + WEB_FG_UPDATE_GROUP_INFO = "group/update_info", + -- 获取合伙人列表(推广奖励) + WEB_FG_GET_PARTNERS = "group/get_group_partners", + + -- 获取所有玩法 + WEB_FG_GET_ALLPLAYS = "group/get_panter_allplays", + -- 设置屏蔽玩法 + WEB_FG_SET_BANPLAYID = "group/set_panter_banplay", + + -- 获取推广奖励值 + WEB_FG_GET_REWARDS = "group/get_rewards", + -- 设置推广奖励值 + WEB_FG_SET_REWARDS = "group/set_reward", + + WEB_FG_SET_XIPAI = "group/set_xipai_reward", + + --管理-- + WEB_FG_SET_ANCHOU = "group/set_anchou_reward", + + -- 获取全民推广 + WEB_FG_GET_PROMOTE = "group/get_promotion", + -- 设置全民推广 + WEB_FG_SET_PROMOTE = "group/update_promotion", + -- 牌友圈预览 + WEB_FG_PREVIEW = "group/group_preview", + -- 调配成员 + WEB_FG_DEPLOY_MEMBER = "group/distribute_member", + -- 转移合伙人 + WEB_FG_MOVE_PARTNER = "group/move_partner", + -- 获取合伙人列表(合伙人管理) + WEB_FG_GET_PARTNER_DATA = "group/get_partner_data", + -- 获取合伙人列表(合伙人管理) + WEB_FG_QUERY_PARTNER_DATA = "group/query_partner_data", + -- 获取合伙人成员 + WEB_FG_GET_PARTNER_MEMBERS = "group/get_partner_members", + -- 设置合伙人权限 + WEB_FG_SET_PARTNER_HPOPT = "group/set_partner_hpopt", + -- 查询成员(转账) + WEB_FG_REMIT_FIND_MEMBER = "group/find_member1", + -- 转账 + WEB_FG_REMIT = "group/trade_hp", + -- 获取能量包数据 + WEB_FG_GET_TAKE_INFO = "group/get_take_info", + -- 提取体力值 + WEB_FG_TAKE_FAG = "group/take_hp", + -- 获取能量包统计 + WEB_FG_FAG_PACK_INFO = "group/log/get_hp_count_info", + -- 设置管理员权限 + WEB_FG_SET_MNG_PERMISSION = "group/set_mgr_permission", + -- 获取圈子邮件 + WEB_FG_GET_MAIL_LIST = "group/get_mail_list", + -- 删除圈子邮件 + WEB_FG_DEL_ALL_MAIL = "group/del_mail_all", + -- 设置成员备注 + WEB_FG_SET_MEMBER_TAG = "group/update_member_score", + + --设置亲友圈合伙人阀值 + + WEB_FG_SET_AUTO_SCORE = "group/set_auto_score", + --标记玩法排行 + GROUP_MARK_PLAY = "group/mark_play", + + + GET_BANK_HP = "group/get_bank_hp", --获取银行信息 + TAKE_BANK_HP = "group/take_bank_hp", + SAVE_BANK_HP = "group/save_bake_hp", + -------------- group-log--------------------- + -- 获取奖励日志 + WEB_FG_GET_REWARDS_LOG = "group/log/get_reward_log", + -- 获取奖励统计 + WEB_FG_GET_REWARDS_STATISTIC = "group/log/get_reward_count", + -- 获取成员排名 + WEB_FG_MEMBER_RANK = "group/log/get_member_rank", + -- 获取局数统计 + WEB_FG_GET_ROUND_STATISTIC = "group/log/get_round_count", + -- 成员体力值详情 + WEB_FG_GET_MEMBER_HP_LOG = "group/log/get_hplog_info", + -- 获取玩法局数统计 + WEB_FG_GET_GAME_ROUND_STATISTIC = "group/log/get_play_round_count", + -- 获取消耗统计 + WEB_FG_GET_CONSUME_STATISTIC = "group/log/get_cost_count", + -- 获取抽水记录 + WEB_FG_GET_PROPORTION_LOG = "group/log/get_hplog_pump", + -- 获取战绩 + WEB_FG_GET_RECORD = "group/log/get_records", + -- 获取个人战绩 + WEB_FG_GET_PERSON_RECORD = "group/log/get_person_records", + -- 获取成员战绩 + WEB_FG_GET_MEMBER_STAT = "group/log/get_member_stat", + -- 获取合伙人统计 + WEB_FG_GET_PARTNER_STAT = "group/log/get_partner_stat", + --获取钻石消耗统计 + WEB_FG_GET_COST_COUNT_STAT = "group/log/get_partner_stat_cost_count", + --幸运号数据 + WEB_FG_GET_XINGYUNHAO_INFO = "group/get_xingyunhao_info", + --获取玩家和积分 + WEB_FG_GET_MEMBERS_COUNT = "group/get_members_count", + -- 获取合伙人统计 + WEB_FG_GET_PARTNER_STAT_MEMBER = "group/log/get_partner_stat_member", + -- 获取直属下级统计 + WEB_FG_GET_DIRECT_MEMBER_STAT = "group/log/get_direct_stat_member", + + WEB_FG_GET_DIRECT_COST_COUNT = "group/log/get_direct_stat_member_cost_count", + + WEB_FG_GET_PARTNER_COST_COUNT = "group/log/get_partner_stat_member_cost_count", + -- 获取合伙人统计 + WEB_FG_GET_PARTNER_STAT_PLAY = "group/log/get_partner_stat_play", + -- 根据房间号查询战绩 + WEB_FG_GET_RECORD_BY_ROOMID = "group/log/find_record_room", + -- 获取提取记录 + WEB_FG_FAG_TAKE_LOG = "group/log/get_take_log", + --提取银行记录 + WEB_FG_GET_BANK_LOG = "group/log/get_bank_log", + -- 获取管理上下分记录 + WEB_FG_GET_MNG_HP_LOG = "group/log/get_hplog_mgr", + -- 获取管理员上下分统计 + WEB_FG_MNG_HP_STATISTIC = "group/log/get_hplog_mgr_count", + -- 获取管理员个人上下分统计 + WEB_FG_MNG_HP_INFO = "group/log/get_hplog_mgr_info", + -- 获得玩家输赢分日统计 + WEB_FG_GET_PLAYER_DAILY_COUNT = "group/log/get_hpconsume_count", + -- 体力值日志牌局明细 + WEB_FG_HPLOG_DETAIL_INFO = "group/log/get_hplog_detail_info", + ------------- group-room ------------ + -- 圈子匹配房间 + WEB_FG_MATCH_ROOM = "group/room/match_room", + -- 圈子排队房间 + WEB_FG_QUEUE_ROOM = "group/room/queue_room", + + -- 圈子加入房间 + WEB_FG_JOIN_ROOM = "group/room/join_room", + -- 圈子删除房间 + WEB_FG_DEL_ROOM = "group/room/del__room", + + -------------- group-mgr -------------------- + -- 进入圈子 + FGMGR_ENTER_GROUP = "11001", + -- 更新房间 + FGMGR_EVT_UPDATE_ROOM = "12001", + -- 删除房间 + FGMGR_EVT_DEL_ROOM = "12002", + -- 添加房间 + FGMGR_EVT_ADD_ROOM = "12003", + -- 删除玩法 + FGMGR_EVT_DEL_PLAY = "12004", + -- 添加玩法 + FGMGR_EVT_ADD_PLAY = "12005", + -- 更新玩法 + FGMGR_EVT_UPDATE_PLAY = "12006", + -- 圈子消息 + FGMGR_EVT_MESSAGE = "12007", + -- 刷新圈子 + FGMGR_EVT_UPDATE_GROUP = "12008", + -- 更新体力值 + FGMGR_EVT_UPDATE_PLAYER_INFO = "12009", + -- 获取在线列表 + FGMGR_GET_ONLINE_PLAYERS = "11002", + -- 邀请玩家 + FGMGR_INVITE_PLAYER = "11003", + -- 邀请回复 + FGMGR_RESPONSE_INVITE = "11004", + -- 收到邀请 + FGMGR_EVT_INVITED = "12010", + -- 未读邮件提示事件 + FGMGR_EVT_NEW_MAIL = "update_mail_tip", + + --end::::::::::::::牌友圈协议:::::::::::::::::::: + + -------------------Game ---------------------------- + -- 进入房间 + GAME_JOIN_ROOM = "1002", + + -- 玩家进入房间 + GAME_EVT_PLAYER_JOIN = "2001", + + -- 玩家退出 + GAME_EVT_PLAYER_EXIT = "2002", + + -- 玩家网络状态 + GAME_EVT_PLAYER_NET_STATE = "2003", + + -- 发送聊天 + GAME_INTERACTION = "1006", + + -- 聊天事件 + GAME_EVT_INTERACTION = "2017", + + -- 退出房间 + GAME_EXIT_ROOM = "1005", + + -- 房主退出房间解散 + GAME_EVT_EXIT_ROOM_DISMISS = "2008", + + -- 发送准备 + GAME_READY = "1003", + + -- 准备事件 + GAME_EVT_READY = "2009", + + --洗牌 + GAME_READY_AND_XIPAI = "201004", + GAME_EVT_READY_AND_XIPAI = "202009", + + + -- 请求开始游戏 + GAME_START = "1004", + + -- 请求解散房间 + GAME_ASK_DISMISS_ROOM = "1007", + + -- 解散房间 + GAME_EVT_DISMISS_ROOM = "2005", + + -- 请求解散房间投票 + GAME_DISMISS_ROOM_VOTE = "1008", + + -- 解散房间投票事件 + GAME_EVT_DISMISS_ROOM_VOTE = "2006", + + -- 解散房间失败 + GAME_EVT_DISMISS_ROOM_FAIL = "2027", + + -- 发送GPS坐标 + GAME_SEND_GPS = "1001", + + -- GPS更新事件 + GAME_EVT_UPDATE_GPS = "2000", + + -- 更新庄家协议 + GAME_EVT_UPDATE_BANKER = "2031", + + -- 删除代理房间 + GAME_REMOVE_AGENT_ROOM = "1000", + + -- 获得红包 + GAME_EVT_HONGBAO = "3000", + + -- 被踢出房间 + GAME_EVT_KICKED = "3001", + + --托管 + GAME_ENTRUST = "1301", + --入座 + GAME_JOIN_SEAT = "1302", + --玩家进入观众席 + GAME_EVT_JOIN_SPECTATOR = "3002", + --更新玩家信息 + GAME_EVT_UPDATE_PLAYERINFO = "3003", + + FGMGR_EVT_UPDATE_RECONECT = "3005", + + GAME_EVT_READY_ENTRUST = "22010", --显示托管倒计时 + + GAME_EVT_CANCEL_READY_ENTRUST = "22011", --关闭托管倒计时 + + GAME_AUTO_CARD = "1303", --开启游戏托管 +} \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/ChatView.lua b/lua_probject/base_project/Game/View/ChatView.lua new file mode 100644 index 00000000..52e382d5 --- /dev/null +++ b/lua_probject/base_project/Game/View/ChatView.lua @@ -0,0 +1,88 @@ + +---聊天View对象 +local ChatView = {} + +local M = ChatView + +function ChatView.new(main_view) + UIPackage.AddPackage("base/chat/ui/Chat") + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "ChatView" + self._main_view = main_view + self._blur_view = main_view._root_view + + self:init("ui://Chat/Main") + return self +end + +function M:init(url) + BaseWindow.init(self,url) + local lit_biaoqing1 = self._view:GetChild("lit_biaoqing1") + lit_biaoqing1.onClickItem:Set(function (context) + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendInteraction(DataManager.SelfUser.account_id, 1, context.data.name ) + self:Close() + end) + + + -- local lit_biaoqing2 = self._view:GetChild("lit_biaoqing2") + -- lit_biaoqing2.onClickItem:Set(function (context) + -- local _gamectr = ControllerManager.GetController(GameController) + -- _gamectr:SendInteraction(DataManager.SelfUser.account_id, 1, context.data.name ) + -- self:Close() + -- end) + + + -- local lit_biaoqing3 = self._view:GetChild("lit_biaoqing3") + -- lit_biaoqing3.onClickItem:Set(function (context) + -- local _gamectr = ControllerManager.GetController(GameController) + -- _gamectr:SendInteraction(DataManager.SelfUser.account_id, 1, context.data.name ) + -- self:Close() + -- end) + -- lit_biaoqing3:RemoveChildrenToPool() + + self:FillChatMsg() + + local tex_chat = self._view:GetChild("tex_chat") + local btn_send = self._view:GetChild("btn_send") + btn_send.onClick:Set(function( ... ) + local chat_text = tex_chat.text + if string.utf8len(chat_text) >0 then + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendInteraction(DataManager.SelfUser.account_id, 4,chat_text) + self:Close() + end + end) + +end + +function M:FillChatMsg() + local chat_msg + local language = self._main_view:GetLanguage() + if language == 1 then + chat_msg = self._main_view.Fix_Msg_Chat2 + else + chat_msg = self._main_view.Fix_Msg_Chat + end + local lit_yuyin = self._view:GetChild("lit_yuyin") + lit_yuyin:RemoveChildrenToPool() + for i = 1 , #chat_msg do + local btn = lit_yuyin:AddItemFromPool() + btn.data = tostring(i) + btn.text = chat_msg[i] + btn.onClick:Set(function(context) + local g = context.sender + local _gamectr = ControllerManager.GetController(GameController) + local msg = g.data + language * 100 + _gamectr:SendInteraction(DataManager.SelfUser.account_id, 2, msg) + self:Close() + end) + end +end + +function M:HideInputField() + self._view:GetController("sdk").selectedIndex = 1 +end + +return M diff --git a/lua_probject/base_project/Game/View/Common/BaseView.lua b/lua_probject/base_project/Game/View/Common/BaseView.lua new file mode 100644 index 00000000..3a84e41c --- /dev/null +++ b/lua_probject/base_project/Game/View/Common/BaseView.lua @@ -0,0 +1,79 @@ +--view 基类 +--author:-- + + +--- +--@type BaseView +BaseView = { + -- Id View ID + Id = 0, + -- View 是否被销毁 + _is_destroy = false, + --关闭摧毁 + _close_destroy = false, + -- 全屏 + _full = false, + --全屏偏移 + _full_offset = true, + --view description + _view = nil, + +} + +local M = BaseView + +local view_url = { + "ui://Common/Gcm_BaseView", + "ui://Common/Gcm_BaseView_Full" +} +--- +--@function [parent=#BaseView] InitView +--@param self +--@param #string url +function M:InitView(url) + self._root_view = UIPackage.CreateObjectFromURL(self._full and view_url[2] or view_url[1]) + local contentPane = self._root_view:GetChild("contentPane") + self._view = UIPackage.CreateObjectFromURL(url) + printlog(self._view) + self._close_destroy = true + -- self._view.fairyBatching = true + self._view:AddRelation(contentPane, RelationType.Size) + contentPane:AddChild(self._view) + self._contentPane = contentPane +end + +function M:Show() + self._root_view.visible = true + if not self._root_view.parent then + AddPanel(self._root_view) + if self._full then + local offset = get_offset(self._full_offset) + + self._contentPane.width = GRoot.inst.width - (offset * 2) + self._contentPane.height = GRoot.inst.height + self._contentPane.x = offset + end + end +end + +function M:Close() + self._root_view.visible = false +end + +--游戏暂停 +function M:OnApplicationPause() + +end + +--游戏暂停 +function M:OnApplicationActive() + +end + +--- +--@function [parent=#BaseView] Destroy +--@param self +function M:Destroy() + self._is_destroy = true + self._root_view:Dispose() +end \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/Common/BaseWindow.lua b/lua_probject/base_project/Game/View/Common/BaseWindow.lua new file mode 100644 index 00000000..92f8d336 --- /dev/null +++ b/lua_probject/base_project/Game/View/Common/BaseWindow.lua @@ -0,0 +1,255 @@ +--window 窗口基类 +--author:-- + +BaseWindow = { + --view description + _view = nil, + + --View 是否被销毁 + _is_destroy = false, + --是否播放动画 + _animation = true, + --弹出动画,0关闭,1左边,2右边 + _anim_pop = 0, + --关闭摧毁 + _close_destroy = false, + + --点击窗口以外关闭 + _close_zone = true, + + --队列 + _queue = true, + --全屏 + _full = false, + --全屏偏移 + _full_offset = true, + --新窗口隐藏队列 + _new_hide = true, + --模糊组件对象 + _put_map = true +} + +--window 列表 +local WindowMap = { + +} + +local WindowQueue= { + +} + +local M = BaseWindow + +function BaseWindow.new(url,blur_view) + local self = setmetatable({}, {__index = M}) + self.class = "BaseWindow" + -- self._blur_view = blur_view + self:init(url) + return self +end + +local win_url = { + "ui://Common/Gcm_Window", + "ui://Common/Gcm_Window_Full" +} + +function M:init(url) + self._root_view = UIPackage.CreateObjectFromURL(self._full and win_url[2] or win_url[1]) + local contentPane = self._root_view:GetChild("contentPane") + local ctr_hide_bg = self._root_view:GetController("hide_bg") + if self._anim_pop ~= 0 then + ctr_hide_bg.selectedIndex = 1 + PopPanel = contentPane:GetChild("PopPanel") + else + ctr_hide_bg.selectedIndex = 0 + end + printlog(url) + self._view = UIPackage.CreateObjectFromURL(url) + printlog(self._view) + -- self._view.fairyBatching = true + local btn_close = self._view:GetChild("btn_close") + if(btn_close) then + btn_close.onClick:Set(function() + self:CloseEvent() + end) + end + + + local win_mode = self._root_view:GetChild("win_mode") + win_mode.onClick:Set(function() + if not self._close_zone then + return + end + win_mode.touchable = false + self:CloseEvent() + end) + printlog("======================================",self._full) + if self._full then + local offset = get_offset(self._full_offset) + if self._anim_pop == 0 then + self._view:AddRelation(contentPane, RelationType.Size) + contentPane:AddChild(self._view) + else + contentPane:RemoveRelation(self._root_view, RelationType.Center_Center) + contentPane:AddRelation(self._root_view, RelationType.Middle_Middle) + PopPanel:AddChild(self._view) + local click_item = PopPanel:GetChild("click_item") + if self._anim_pop == 1 then + contentPane:AddRelation(self._root_view, RelationType.Left_Left) + self._view.x = 0 + elseif self._anim_pop == 2 then + contentPane:AddRelation(self._root_view, RelationType.Right_Right) + self._view.x = GRoot.inst.width - self._view.width - offset + end + self._view.y = (PopPanel.height - self._view.height) * 0.5 + click_item.xy = self._view.xy + click_item.width = self._view.width + click_item.height = self._view.height + end + else + contentPane:AddChild(self._view) + contentPane.height = self._view.height + contentPane.width = self._view.width + contentPane:Center() + end + self._contentPane = contentPane + if self._put_map then + WindowMap[#WindowMap + 1] = self + end +end + +-- 显示窗口 +function M:Show() + print("===========================================entershow",M.class) + local contentPane = self._root_view:GetChild("contentPane") + if self._anim_pop == 1 then + contentPane:GetTransition("left_pop"):Play() + elseif self._anim_pop == 2 then + contentPane:GetTransition("right_pop"):Play() + elseif self._animation then + local ani_in = self._root_view:GetTransition("in") + if ani_in then + ani_in:Play() + end + end + -- if self._blur_view then + -- BlurView(self._blur_view,true) + -- end + + -- 判断当前窗口是否已经在队列中,如果在就不重复添加 + local _inQueue = false + + if self._new_hide then + for i=1,#WindowQueue do + local win = WindowQueue[i] + if win == self then + _inQueue = true + end + if win._queue then + win._root_view:RemoveFromParent() + end + end + end + if self._queue and not _inQueue then + WindowQueue[#WindowQueue + 1] = self + end + AddPanel(self._root_view) + if self._full then + local offset = get_offset(self._full_offset) + self._contentPane.width = GRoot.inst.width - 2 * offset + self._contentPane.height = GRoot.inst.height + self._contentPane.x = offset + end +end + +-- 关闭窗口 +function M:Close() + -- if self._blur_view then + -- BlurView(self._blur_view,false) + -- end + if self._queue then + for i,v in ipairs(WindowQueue) do + if v == self then + table.remove(WindowQueue,i) + break + end + end + end + + if self._new_hide then + local win = WindowQueue[#WindowQueue] + if win and win._queue then + AddPanel(win._root_view) + end + end + self._root_view:RemoveFromParent() +end + +local _destroy_all = false +-- 销毁窗口 +function M:Destroy() + if self._is_destroy then + return + end + if not _destroy_all then + self:Close() + if self._put_map then + for i,v in ipairs(WindowMap) do + if v == self then + table.remove(WindowMap,i) + break + end + end + end + end + self._is_destroy = true + self._root_view:Dispose() +end + +function M:CloseEvent() + local win_mode = self._root_view:GetChild("win_mode") + if self._anim_pop == 0 then + if self._close_destroy then + self:Destroy() + else + self:Close() + win_mode.touchable = true + end + else + self:ActionWithAnim(function() + if self._close_destroy then + self:Destroy() + else + self:Close() + win_mode.touchable = true + end + end) + end +end + +function M:ActionWithAnim(callback) + local contentPane = self._root_view:GetChild("contentPane") + if self._anim_pop == 1 then + contentPane:GetTransition("left_pop_back"):Play() + elseif self._anim_pop == 2 then + contentPane:GetTransition("right_pop_back"):Play() + end + if callback then + coroutine.start(function() + coroutine.wait(0.3) + callback() + end) + end +end + +function BaseWindow.DestroyAll() + _destroy_all = true + local list = WindowMap + for i=1,#list do + local win = list[i] + win:Destroy() + end + _destroy_all = false + WindowQueue = {} + WindowMap = {} +end \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/Common/ImageLoad.lua b/lua_probject/base_project/Game/View/Common/ImageLoad.lua new file mode 100644 index 00000000..28af59d8 --- /dev/null +++ b/lua_probject/base_project/Game/View/Common/ImageLoad.lua @@ -0,0 +1,85 @@ +ImageLoad = {} + +local imgAssetMap = {} +local imgQueue = Queue.new(2000) + +local function DownLoadImg(url) + local www = UnityEngine.WWW(url) + coroutine.www(www) + if string.utf8len(www.error) == 0 then + local obj = imgAssetMap[url] + if obj and not obj.load then + local texture = www.texture + www:Dispose() + if (texture ~= null) then + local ntexture = FairyGUI.NTexture(texture) + obj.ntexture = ntexture + obj.load = true + obj.co = nil + end + end + end +end + +local function SetTexture() + if (imgQueue:Count() > 0) then + local tem = imgQueue:Dequeue() + local obj = imgAssetMap[tem.url] + if not tem._iconObject.isDisposed and obj then + if obj.load then + tem._iconObject.texture = obj.ntexture + if tem.callback then + tem.callback() + end + else + imgQueue:Enqueue(tem) + end + end + end +end +UpdateBeat:Add(SetTexture) + +-- group 图片分组 +function ImageLoad.Load(url,_iconObject,group,callback) + if string.utf8len(url) == 0 then + return + end + if not group then + group = "common" + end + + + local asset = imgAssetMap[url] + + if (asset ~= nil) then + if asset.load then + _iconObject.texture = asset.ntexture + if callback then callback() end + else + imgQueue:Enqueue({url = url,_iconObject = _iconObject,callback = callback}) + end + return + end + + local _co = coroutine.start(DownLoadImg,url) + -- local _co_load = coroutine.start(SetTexture,_iconObject,url,callback) + imgAssetMap[url] = {group = group,load=false,co = _co} + imgQueue:Enqueue({url = url,_iconObject = _iconObject,callback = callback}) +end + +function ImageLoad.Clear(group) + for i,v in pairs(imgAssetMap) do + if v.group == group then + if v.co then + coroutine.stop(v.co) + end + -- if v.co_load then + -- coroutine.stop(v.co_load) + -- end + if v.load then + imgAssetMap[i].ntexture:Unload(true) + end + imgAssetMap[i] = nil + end + end +end \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/Common/ModalWaitingWindow.lua b/lua_probject/base_project/Game/View/Common/ModalWaitingWindow.lua new file mode 100644 index 00000000..ad8ad0fc --- /dev/null +++ b/lua_probject/base_project/Game/View/Common/ModalWaitingWindow.lua @@ -0,0 +1,53 @@ + +ModalWaitingWindow = { + +} + +local M = ModalWaitingWindow + +local modal_wait_win_url = "ui://Common/GlobalModalWaiting" +local modal_panel = nil +function ModalWaitingWindow.new() + local self = setmetatable({}, {__index = M}) + self.class = "ModalWaitingWindow" + self._view = UIPackage.CreateObjectFromURL(modal_wait_win_url) + self.txt_title = self._view:GetChild("title") + if not modal_panel then + modal_panel = UIPackage.CreateObjectFromURL("ui://Common/UIPanel") + modal_panel.name = "GlobalModalWaiting_Win" + modal_panel:MakeFullScreen() + modal_panel:AddRelation(GRoot.inst, RelationType.Size) + end + modal_panel:AddChild(self._view) + self._view:Center() + GRoot.inst:AddChild(modal_panel) + return self +end + +function M:Show() + modal_panel.visible = true +end + +function M:Close() + modal_panel.visible = false +end + +local _inst = nil +local _msg = "正在获取数据..." +function ModalWaitingWindow.ShowModal(title) + if (_inst == nil) then + _inst = ModalWaitingWindow.new() + end + if title then + _inst.txt_title.text = title + else + _inst.txt_title.text = _msg + end + _inst:Show() +end + +function ModalWaitingWindow.CloseModal() + if(_inst) then + _inst:Close() + end +end \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/Common/MsgWindow.lua b/lua_probject/base_project/Game/View/Common/MsgWindow.lua new file mode 100644 index 00000000..90b24f30 --- /dev/null +++ b/lua_probject/base_project/Game/View/Common/MsgWindow.lua @@ -0,0 +1,71 @@ +--通用消息弹出框View +--author:-- + +MsgWindow = {} + +MsgWindow.MsgMode = { + OkAndCancel = 1, + OnlyOk = 2 +} +MsgWindow.RES_LIST = { + "MessageBox", + "MessageBox1" +} + +local M = MsgWindow + + +function MsgWindow.new(blur_view,tip,mode,url,showCheck) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "MsgWindow" + self._blur_view = blur_view + self._close_destroy = true + self._tip = tip + self._mode = mode + self.onOk = event("onOk",true) + self.onCancel = event("onCancel",true) + self.showCheck = showCheck + local self_url = url and url or "ui://Common/"..MsgWindow.RES_LIST[self._mode] + self:init(self_url) + return self +end + +function M:init(url) + BaseWindow.init(self,url) + self._close_destroy = true + self._close_zone = false + local view = self._view + local btn_ok = view:GetChild("btn_ok") + btn_ok.onClick:Add(function() + self.onOk() + self:Destroy() + end) + local tex_message = view:GetChild("tex_message") + if (self._tip) then tex_message.text = self._tip end + + local btn_close = view:GetChild('btn_close1') + if (btn_close~=nil) then + btn_close.onClick:Add( + function() + self:CloseEvent() + end + + ) + end + self.btnCheck = view:GetChild("btnCheck") + if self.btnCheck then + self.btnCheck.visible = false + if self.showCheck then + self.btnCheck.selected = true + self.btnCheck.visible = true + end + end +end + +function M:Close() + BaseWindow.Close(self) + if(self._mode == MsgWindow.MsgMode.OkAndCancel) then + self.onCancel() + end +end diff --git a/lua_probject/base_project/Game/View/Common/NetResetConnectWindow.lua b/lua_probject/base_project/Game/View/Common/NetResetConnectWindow.lua new file mode 100644 index 00000000..597b3a29 --- /dev/null +++ b/lua_probject/base_project/Game/View/Common/NetResetConnectWindow.lua @@ -0,0 +1,49 @@ +--通用消息弹出框View +--author:-- + +NetResetConnectWindow = {} + + +local modal_wait_win_url = "ui://Common/GlobalModalWaiting" +local modal_panel = nil +function NetResetConnectWindow.new() + local self = setmetatable({}, {__index = NetResetConnectWindow}) + self.class = "NetResetConnectWindow" + self._view = UIPackage.CreateObjectFromURL(modal_wait_win_url) + self._view:GetChild("title").text = "网络信号太差,正在检查网络中..." + if not modal_panel then + modal_panel = UIPackage.CreateObjectFromURL("ui://Common/UIPanel") + modal_panel.name = "NetResetConnectWindow_Win" + modal_panel:MakeFullScreen() + modal_panel:AddRelation(GRoot.inst, RelationType.Size) + end + -- self._circleLoader = CircleLoader.new(self._view:GetChild("gcm_qiu")) + -- self._circleLoader:start() + modal_panel:AddChild(self._view) + self._view:Center() + GRoot.inst:AddChild(modal_panel) + return self +end + +function NetResetConnectWindow:Show() + modal_panel.visible = true +end + +function NetResetConnectWindow:Close() + modal_panel.visible = false +end + +local _inst = nil + +function NetResetConnectWindow.ShowNetReset() + if (_inst == nil) then + _inst = NetResetConnectWindow.new() + end + _inst:Show() +end + +function NetResetConnectWindow.CloseNetReset() + if(_inst) then + _inst:Close() + end +end \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/DismissRoomWindow.lua b/lua_probject/base_project/Game/View/DismissRoomWindow.lua new file mode 100644 index 00000000..f93b8ad4 --- /dev/null +++ b/lua_probject/base_project/Game/View/DismissRoomWindow.lua @@ -0,0 +1,88 @@ +local DismissRoomWindow = {} + +local M = DismissRoomWindow + + +function DismissRoomWindow.new(blur_view) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "DismissRoomWindow" + self._currenIndex = 0 + self._blur_view = blur_view + self._animation = false + self.onCallback = event("onCallback",true) + self._close_zone = false + self.time = 180 + self:init("ui://Common/dismiss_room") + return self +end + + +function M:init(url) + BaseWindow.init(self,url) + local view = self._view + self.tex_time = view:GetChild("tex_time") + local _btn_aggree = view:GetChild("btn_aggree") + + + _btn_aggree.onClick:Add(function() + local _gamectr = ControllerManager.GetController(GameController) + if _gamectr then + _gamectr:DismissRoomVote(true) + end + end) + + local _btn_reject = view:GetChild("btn_reject") + _btn_reject.onClick:Add(function() + local _gamectr = ControllerManager.GetController(GameController) + if _gamectr then + _gamectr:DismissRoomVote(false) + end + end) +end + +function M:FillData(data) + self.time = data.time + self.tex_time.text = data.time + local room = DataManager.CurrenRoom + local isHidden = false + if room.room_config and room.room_config.isHidden and room.room_config.isHidden == 1 then + isHidden = true + end + if isHidden then + self._view:GetChild("tex_tip").text = string.format("[color=#ff9d02]【%s】[/color]发起了解散房间申请,是否同意?","玩家" .. data.req_p.seat) + else + self._view:GetChild("tex_tip").text = string.format("[color=#ff9d02]【%s】[/color]发起了解散房间申请,是否同意?",data.req_p.self_user.nick_name) + end + local ctr_falg = self._view:GetController("falg") + local lst_player = self._view:GetChild("lst_player") + lst_player:RemoveChildrenToPool() + local list = data.list + for i=1,#list do + local tem = list[i] + if tem.player == DataManager.CurrenRoom.self_player then + ctr_falg.selectedIndex = tem.result + end + -- elseif tem.player ~= data.req_p then + local item = lst_player:AddItemFromPool() + if isHidden then + item:GetChild("tex_name").text = "玩家"..tem.player.seat + else + item:GetChild("tex_name").text = tem.player.self_user.nick_name + end + local ctr_item_falg = item:GetController("falg") + ctr_item_falg.selectedIndex = tem.result + -- end + end +end + +function M:OnUpdate(deltaTime) + if self.time > 0 then + self.time = self.time - deltaTime + self.time = math.max(0, self.time) + end + self.tex_time.text = tostring(math.floor(self.time)) +end + + +return M diff --git a/lua_probject/base_project/Game/View/FGAssistInviteView.lua b/lua_probject/base_project/Game/View/FGAssistInviteView.lua new file mode 100644 index 00000000..7609b15b --- /dev/null +++ b/lua_probject/base_project/Game/View/FGAssistInviteView.lua @@ -0,0 +1,131 @@ +-- 牌友圈助手邀请界面 +local FGAssistInviteView = {} + +local M = FGAssistInviteView +setmetatable(M, {__index = BaseWindow}) + +function FGAssistInviteView.new(blur_view, callback) + local self = setmetatable({}, {__index = M}) + self.class = "FGAssistInviteView" + self._blur_view = blur_view + self._animation = true + self._new_hide = false + self._put_map = false + self._close_destroy = true + self.callback = callback + self:initView("ui://FGAssist/panel_invite") + return self +end + +function M:initView(url) + self:init(url) + self.lst_player = self._view:GetChild("lst_player") + local btn_refresh = self._view:GetChild("btn_refresh") + btn_refresh.onClick:Set(function() + self.lst_player:RemoveChildrenToPool() + self:FillData() + end) + + self._timer = 0 + self:FillData() + UpdateBeat:Add(self.OnUpdate,self) +end + +function M:FillData() + local mgr_ctr = ControllerManager.GetController(GroupMgrController) + if not mgr_ctr._mgr_client then + return + else + self:GetOnlinePlayers() + end +end + +function M:GetOnlinePlayers() + local mgr_ctr = ControllerManager.GetController(GroupMgrController) + mgr_ctr:FG_GetOnlinePlayers(function(res) + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取在线成员失败") + else + self.players = res.Data.onlines + self._view:GetController("empty").selectedIndex = #self.players == 0 and 1 or 0 + self:ShowOnlinePlayers() + end + end) +end + +local function _showLeftTime(item, time) + item:GetChild("tex_left_time").text = time .. "s" +end + +local _list_invite_time = {} +function M:ShowOnlinePlayers() + local players = self.players + for i = 1, #players do + if self.lst_player.isDisposed then return end + local item = self.lst_player:AddItemFromPool() + local p = players[i] + item:GetChild("tex_name").text = p.nick + item:GetChild("tex_id").text = "ID:" .. ViewUtil.HideID(p.uid) + local btn_head = item:GetChild("btn_head") + ImageLoad.Load(p.portrait, btn_head._iconObject) + local ctr_enable = item:GetController("enable") + ctr_enable.selectedIndex = 0 + item:GetChild("btn_invite").onClick:Set(function() + local mgr_ctr = ControllerManager.GetController(GroupMgrController) + local room = DataManager.CurrenRoom + mgr_ctr:FG_InvitePlayer(p.uid, room.room_id, room.play_id, room.room_config:GetGameName(), function() + end) + + local time = os.time() + _list_invite_time[p.uid] = time + ctr_enable.selectedIndex = 1 + _showLeftTime(item, 15) + end) + local invite_time = _list_invite_time[p.uid] + if invite_time then + local i_timer = os.time() - invite_time + if i_timer < 15 then + ctr_enable.selectedIndex = 1 + _showLeftTime(item, 15 - i_timer) + else + _list_invite_time[p.uid] = nil + ctr_enable.selectedIndex = 0 + end + end + end +end + +function M:OnUpdate() + local deltaTime = Time.deltaTime + self._timer = self._timer + deltaTime + if self._timer >= 1 then + self._timer = 0 + + if self.lst_player.numChildren == 0 then return end + for i = 1, #self.players do + local p = self.players[i] + local invite_time = _list_invite_time[p.uid] + if invite_time then + local i_timer = os.time() - invite_time + local item = self.lst_player:GetChildAt(i - 1) + if not item then break end + if i_timer < 15 then + _showLeftTime(item, 15 - i_timer) + else + item:GetController("enable").selectedIndex = 0 + _list_invite_time[p.uid] = nil + end + end + end + end +end + +function M:Destroy() + UpdateBeat:Remove(self.OnUpdate, self) + BaseWindow.Destroy(self) + if self.callback then + self.callback() + end +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/FGAssistView.lua b/lua_probject/base_project/Game/View/FGAssistView.lua new file mode 100644 index 00000000..0bd12bf6 --- /dev/null +++ b/lua_probject/base_project/Game/View/FGAssistView.lua @@ -0,0 +1,153 @@ +-- 牌友圈助手界面 +local FGAssistInviteView = import(".FGAssistInviteView") + +local FGAssistView = {} + +local M = FGAssistView +setmetatable(M, {__index = BaseWindow}) + +function FGAssistView.new(blur_view, callback) + + local self = setmetatable({}, {__index = M}) + self.class = "FGAssistView" + self._blur_view = blur_view + self._full = true + self._anim_pop = 1 + self._animation = true + + self.callback = callback + self:init("ui://FGAssist/panel_assist") + return self +end + +function M:ReloadView() + self._view:GetChild("btn_auto_invite").onClick:Clear() + self.lst_player:RemoveChildrenToPool() + self:FillData() +end + +function M:init(url) + BaseWindow.init(self, url) + self.lst_player = self._view:GetChild("lst_player") + local btn_refresh = self._view:GetChild("btn_refresh") + btn_refresh.onClick:Set(function() + self:ReloadView() + end) + + self._timer = 0 + UpdateBeat:Add(self.OnUpdate,self) +end + +function M:FillData() + local mgr_ctr = ControllerManager.GetController(GroupMgrController) + if not mgr_ctr._mgr_client then + return + else + self:GetOnlinePlayers() + end +end + +function M:GetOnlinePlayers() + local mgr_ctr = ControllerManager.GetController(GroupMgrController) + mgr_ctr:FG_GetOnlinePlayers(function(res) + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取在线成员失败") + else + self.players = res.Data.onlines + -- self._view:GetController("empty").selectedIndex = #self.players == 0 and 1 or 0 + self:ShowOnlinePlayers() + end + end) +end + +local function _showLeftTime(item, time) + item:GetChild("tex_left_time").text = time .. "s" +end + +local _list_invite_time = {} +function M:ShowOnlinePlayers() + local players = self.players + for i = 1, #players do + if self.lst_player.isDisposed then return end + local item = self.lst_player:AddItemFromPool() + local p = players[i] + item:GetChild("tex_name").text = p.nick + item:GetChild("tex_id").text = "ID:" .. ViewUtil.HideID(p.uid) + local btn_head = item:GetChild("btn_head") + ImageLoad.Load(p.portrait, btn_head._iconObject) + local ctr_enable = item:GetController("enable") + ctr_enable.selectedIndex = 0 + item:GetChild("btn_invite").onClick:Set(function() + local mgr_ctr = ControllerManager.GetController(GroupMgrController) + local room = DataManager.CurrenRoom + mgr_ctr:FG_InvitePlayer(p.uid, room.room_id, room.play_id, room.room_config:GetGameName(), function() + end) + + local time = os.time() + _list_invite_time[p.uid] = time + ctr_enable.selectedIndex = 1 + _showLeftTime(item, 15) + end) + local invite_time = _list_invite_time[p.uid] + if invite_time then + local i_timer = os.time() - invite_time + if i_timer < 15 then + ctr_enable.selectedIndex = 1 + _showLeftTime(item, 15 - i_timer) + else + _list_invite_time[p.uid] = nil + ctr_enable.selectedIndex = 0 + end + end + end + local btn_auto_invite = self._view:GetChild("btn_auto_invite") + btn_auto_invite.onClick:Set(function() + local mgr_ctr = ControllerManager.GetController(GroupMgrController) + local room = DataManager.CurrenRoom + for i = 1, #players do + local p = players[i] + mgr_ctr:FG_InvitePlayer(p.uid, room.room_id, room.play_id, room.room_config:GetGameName(), function() + end) + + local time = os.time() + _list_invite_time[p.uid] = time + item = self.lst_player:GetChildAt(i - 1) + item:GetController("enable").selectedIndex = 1 + _showLeftTime(item, 15) + end + end) +end + +function M:OnUpdate() + local deltaTime = Time.deltaTime + self._timer = self._timer + deltaTime + if self._timer >= 1 then + self._timer = 0 + + if self.lst_player.numChildren == 0 then return end + for i = 1, #self.players do + local p = self.players[i] + local invite_time = _list_invite_time[p.uid] + if invite_time then + local i_timer = os.time() - invite_time + local item = self.lst_player:GetChildAt(i - 1) + if not item then break end + if i_timer < 15 then + _showLeftTime(item, 15 - i_timer) + else + item:GetController("enable").selectedIndex = 0 + _list_invite_time[p.uid] = nil + end + end + end + end +end + +function M:Close() + BaseWindow.Close(self) + if self.callback then + self.callback() + end +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/Family/CreatePlayView.lua b/lua_probject/base_project/Game/View/Family/CreatePlayView.lua new file mode 100644 index 00000000..52aa2a18 --- /dev/null +++ b/lua_probject/base_project/Game/View/Family/CreatePlayView.lua @@ -0,0 +1,120 @@ +--设置窗口对象 + +local CreatePlayView = {} + +local M = CreatePlayView +setmetatable(M, { __index = BaseWindow }) + +local PlayInfo = { + { + gameName = "麻将", + playListInfo = { + + }, + playList = { + + } + } +} + +function CreatePlayView.new() + UIPackage.AddPackage("base/Family/ui/Family") + + local self = setmetatable({}, { __index = M }) + self.class = 'CreatePlayView' + self._close_destroy = true + self:initePlayInfo() + self:init('ui://Family/CreatePlay') + return self +end + +function M:init(url) + BaseWindow.init(self, url) + + local view = self._view + -----设置游戏类型------------ + self.gameNameCtl = view:GetController('gameName') + local list_gameName = view:GetChild('list_gameName') + list_gameName:SetVirtual() + list_gameName.itemRenderer = function(index, obj) + obj:GetChild('title').text = PlayInfo[index + 1].gameName + end + -- list_gameName.onClickItem:Add() + list_gameName.numItems = #PlayInfo + list_gameName:GetChildAt(0):GetController('button').selectedIndex = 1 + -----------设置游戏名称------------------- + self.playNameCtr = view:GetController('playName') + local list_playName = view:GetChild('list_playName') + list_playName:SetVirtual() + list_playName.itemRenderer = function(index, obj) + obj:GetChild('title').text = PlayInfo[1].playList[index + 1].playName + end + list_playName.onClickItem:Add(function() + self.showView.visible = false + local index = PlayInfo[1].playList[self.playNameCtr.selectedIndex + 1].playeId + local playDetail = view:GetChild(string.format("Label_Detail_%d",index)) + local playView + if not playDetail then + playDetail = UIPackage.CreateObjectFromURL(string.format("ui//Family/Label_Detail_%d",index)) + if playDetail then + playView = view:AddChild(playDetail) + playView.name = string.format("Label_Detail_%d",index) + end + end + if not playDetail then + view:GetChild('buttom').visible = false + else + view:GetChild('buttom').visible = true + self.showView = playView and playView or playDetail + self.showView.visible = true + end + end) + list_playName.numItems = #PlayInfo[1].playList + list_playName:GetChildAt(0):GetController('button').selectedIndex = 1 + self.showView = view:GetChild(string.format("Label_Detail_%d", + PlayInfo[1].playList[self.playNameCtr.selectedIndex + 1].playeId)) + -----------创建玩法---------- + view:GetChild('btn_Create').onClick:Add(function() + self:CreatePlay() + end) +end + +function M:CreatePlay() + ViewUtil.ShowModalWait(self._root_view,"正在创建房间...") + local loddyCtr = ControllerManager.GetController(LoddyController) + local gameId = PlayInfo[1].playList[self.playNameCtr.selectedIndex+1].playeId + local config = ExtendManager.GetExtendConfig(gameId) + print("==============================config") + pt(config) + local mode = config:GetGameInfo() + print("==============================mode") + pt(mode) + local _data = mode:SelectedConfigData() + print("==============================_data") + pt(_data) + -- loddyCtr:CreateRoom(gameId,_data, function (res) + -- self:__OnCreateRoomAction(res) + -- end) + ViewUtil.CloseModalWait() +end + +function M:initePlayInfo() + --------测试 + PlayInfo[1].playListInfo[10] = { + playeId = 10, + playName = "长沙麻将" + } + PlayInfo[1].playListInfo[86] = { + playeId = 86, + playName = "南城麻将" + } + local games = DataManager.SelfUser.games + for i = 1, #games do + if PlayInfo[1].playListInfo[games[i].game_id] then + table.insert(PlayInfo[1].playList,PlayInfo[1].playListInfo[games[i].game_id]) + end + end + pt(PlayInfo) +end + +return M diff --git a/lua_probject/base_project/Game/View/Family/FamilyInviteFamilyView.lua b/lua_probject/base_project/Game/View/Family/FamilyInviteFamilyView.lua new file mode 100644 index 00000000..b335f1b4 --- /dev/null +++ b/lua_probject/base_project/Game/View/Family/FamilyInviteFamilyView.lua @@ -0,0 +1,28 @@ +--设置窗口对象 + +local FamilyInviteFamilyView = {} + +local M = FamilyInviteFamilyView +setmetatable(M, { __index = BaseWindow }) + +function FamilyInviteFamilyView.new() + local self = setmetatable({}, { __index = M }) + self.class = 'FamilyInviteFamilyView' + self._close_destroy = true + self:init('ui://Family/InviteFamily') + return self +end + +function M:init(url) + BaseWindow.init(self, url) + + local view = self._view + view:GetChild('btn_wx').onClick:Add(function() + ViewUtil.ShowBannerOnScreenCenter("该功能还会开放,敬请期待") + end) + view:GetChild('btn_moments').onClick:Add(function() + ViewUtil.ShowBannerOnScreenCenter("该功能还会开放,敬请期待") + end) +end + +return M diff --git a/lua_probject/base_project/Game/View/FamilyView.lua b/lua_probject/base_project/Game/View/FamilyView.lua new file mode 100644 index 00000000..12548820 --- /dev/null +++ b/lua_probject/base_project/Game/View/FamilyView.lua @@ -0,0 +1,555 @@ +local FamilyInviteFamilyView = import('.Family.FamilyInviteFamilyView') +local CreatePlayView = import('.Family.CreatePlayView') +local GroupMngGameListView = import(".NewGroup.MngView/GroupMngGameListView") + +--设置窗口对象 + +FamilyView = {} + +local M = FamilyView +function FamilyView.new() + UIPackage.AddPackage("base/Family/ui/Family") + + setmetatable(M, { __index = BaseView }) + local self = setmetatable({}, { __index = M }) + self.class = 'FamilyMainView' + self._full = true + self._close_destroy = false + self._fristRoom = true + self:init('ui://Family/Main') + return self +end + +function M:init(url) + BaseView.InitView(self, url) + self._full_offset = false + local view = self._view + local fgCtr = ControllerManager.GetController(NewGroupController) + + self.list_room = self._view:GetChild('list_room') + + local createOrJoin = view:GetController('createOrJoin') + self.familyType = view:GetController('familyType') + local btn_close = view:GetChild('btn_close') + btn_close.onClick:Set(function() + if not self.lastType or self.familyType.selectedIndex == 1 then + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) + else + self.familyType.selectedIndex = self.lastType + if self.lastType == 3 then + self.lastType = 1 + createOrJoin.selectedIndex = (createOrJoin.selectedIndex + 1) % 2 + end + end + end) + + fgCtr:FG_GroupList(function(res) + local groups = res.Data.groups + if #groups > 0 then + self.familyType.selectedIndex = 1 + self:ConnetFamily(1, groups, true) + else + self.familyType.selectedIndex = 3 + end + end) + --------初始化创建和加入亲友圈界面--------------- + self._currenIndex = 0 + self.tex_num = view:GetChild('text_inputNum') + + view:GetChild('btn_joinFamily').onClick:Add(function() + createOrJoin.selectedIndex = 1 + self.lastType = 3 + end) + view:GetChild('btn_createFamily').onClick:Add(function() + createOrJoin.selectedIndex = 0 + self.lastType = 3 + end) + view:GetChild('list_num').onClickItem:Set(handler(self, self.OnNumButtonAction)) + + local input_name = view:GetChild('input_name') + local input_wxId = view:GetChild('input_wxId') + input_name.onChanged:Set(function() + input_name.alpha = 1 + end) + input_name.onFocusOut:Set(function() + if #input_name.text > 0 then + input_name.alpha = 1 + else + input_name.alpha = 0.5 + end + end) + + input_wxId.onChanged:Set(function() + input_wxId.alpha = 1 + end) + input_wxId.onFocusOut:Set(function() + if #input_wxId.text > 0 then + input_wxId.alpha = 1 + else + input_wxId.alpha = 0.5 + end + end) + view:GetChild('btn_create').onClick:Add(function() + fgCtr:FG_GroupList(function(res) + local groups = res.Data.groups + if #groups > 0 then + for i = 1, #groups do + if groups[i].name == input_name.text then + fgCtr:FG_RemoveGroup(groups[i].id, function(res) + fgCtr:FG_CreateGroup(input_name.text, 1, 1, function(res) + if res.ReturnCode == 0 then + self.familyType.selectedIndex = 1 + self:ConnetFamily(1, groups, true) + end + end) + end) + end + end + else + fgCtr:FG_CreateGroup(input_name.text, 1, 1, function(res) + if res.ReturnCode == 0 then + self.familyType.selectedIndex = 1 + self:ConnetFamily(1, groups, true) + end + end) + end + end) + + -- fgCtr:FG_CreateGroup(input_name.text, 1, 1, function(res) + -- if res.ReturnCode == 0 then + -- local l_groups = DataManager.groups + -- local tem = res.Data.info + -- local group = GroupData.new() + -- group.id = tem.id + -- group.name = tem.name + -- group.owner = DataManager.SelfUser.account_id + -- group.o_nick = DataManager.SelfUser.nick_name + -- group.o_portrait = DataManager.SelfUser.head_url + -- group.lev = 1 + -- group.pay_type = pay_type + -- group.type = type + -- group.total_member_num = 1 + -- l_groups:add(group) + -- self.familyType.selectedIndex = 0 + -- self:ConnetFamily(1, l_groups, true) + -- end + -- end) + end) +end + +function ShareWx(view) + local familyInviteFamilyView = FamilyInviteFamilyView.new() + familyInviteFamilyView:Show() +end + +function CreateFamily(view) + view.familyType.selectedIndex = 3 + view.lastType = 1 + view._view:GetController('createOrJoin').selectedIndex = 0 +end + +function JoinFamily(view) + view.familyType.selectedIndex = 3 + view.lastType = 1 + view._view:GetController('createOrJoin').selectedIndex = 1 +end + +function PlayEdit(view) + view.familyType.selectedIndex = 2 + view.lastType = 1 +end + +local IDENTITY_LIST = { + { + level = 0, --圈主 + + }, + { + level = 1, --副圈主 + otherList = { + { + name = "邀请朋友", + Fct = ShareWx + }, + { + name = "游戏记录", + Fct = ShareWx + }, + { + name = "玩法管理", + Fct = PlayEdit + }, + { + name = "充值房卡", + Fct = ShareWx + }, + { + name = "申请消息", + Fct = ShareWx + }, + { + name = "查看成员", + Fct = ShareWx + }, + { + name = "创建亲友圈", + Fct = CreateFamily + }, + { + name = "高级选项", + Fct = CreateFamily + }, + { + name = "添加助理", + Fct = CreateFamily + }, + { + name = "加入亲友圈", + Fct = JoinFamily + }, + } + + }, + { + level = 2, --管理员 + otherList = { + { + name = "邀请朋友", + Fct = ShareWx + }, + { + name = "游戏记录", + Fct = ShareWx + }, + { + name = "玩法管理", + Fct = PlayEdit + }, + { + name = "充值房卡", + Fct = ShareWx + }, + { + name = "申请消息", + Fct = ShareWx + }, + { + name = "查看成员", + Fct = ShareWx + }, + { + name = "创建亲友圈", + Fct = CreateFamily + }, + { + name = "高级选项", + Fct = CreateFamily + }, + { + name = "添加助理", + Fct = CreateFamily + }, + { + name = "加入亲友圈", + Fct = JoinFamily + }, + } + + }, + { + level = 3, --成员 + otherList = { + { + name = "邀请朋友", + Fct = ShareWx + }, + { + name = "创建亲友圈", + Fct = CreateFamily + }, + { + name = "加入亲友圈", + Fct = JoinFamily + }, + } + + }, +} + +function M:ChangeOther(i) + local otherList = IDENTITY_LIST[i].otherList + local list_other = self._view:GetChild('list_other') + self._lev = i + list_other:SetVirtual() + list_other.itemRenderer = function(index, obj) + obj:GetChild('text').text = otherList[index + 1].name + obj.onClick:Add(handler(self, otherList[index + 1].Fct)) + end + list_other.numItems = #otherList +end + +function M:ChangeNumber(fgCtr, group_id, limit, num, minus_only, sort_type) + local list_familyNumber = self._view:GetChild('list_familyNumber') + list_familyNumber:SetVirtual() + fgCtr:FG_GroupMembers(group_id, limit, num, minus_only, sort_type, function(res) + local members = res.Data.members + print("==========================res.Data.members") + pt(res.Data.members) + ViewUtil:CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取成员列表失败") + else + list_familyNumber.itemRenderer = function(index, obj) + obj:GetChild('text_name').text = members[index + 1].nick + if self._lev ~= 3 then + if members[index + 1].hp < 777777 then + fgCtr:FG_ChangeFag(group_id, members[index + 1].uid, members[index + 1].hp + 777777, + function(res) + if res.ReturnCode == 0 then + + else + ViewUtil.CloseModalWait('join_room') + ViewUtil.ErrorMsg(self._root_view, res.ReturnCode, '默认分配积分失败') + end + end) + end + end + end + list_familyNumber.numItems = res.Data.member_num + return 1 + end + end) + return 0 +end + +function M:ConnetFamilyRoom(fgCtr, id) + fgCtr:FG_EnterGroup(id, function(res) + ViewUtil:CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取房间列表列表失败") + else + self:UpdateFamilyRoom(fgCtr, id) + return 1 + end + end) + return 0 +end + +function M:UpdateFamilyRoom(fgCtr, id) + local list_room = self.list_room + list_room:SetVirtual() + local list_gamePlay = self._view:GetChild('list_gamePlay') + list_gamePlay:SetVirtual() + local playList = DataManager.groups:get(id).playList + local roomList = DataManager.groups:get(id).rooms + list_room.itemRenderer = function(index, obj) + if index < #roomList then + -- local config = ExtendManager.GetExtendConfig(roomList[index + 1].pid) + -- local mode = config:GetGameInfo() + -- local gamePlay = mode:LoadConfigToDetail("这是房间") + -- obj:GetChild('Label_gameRule').title = gamePlay + obj:GetChild('game_type').text = string.format("房间-%s", roomList[index + 1].id) + obj:GetChild('btn_joinGame'):GetController('type').selectedIndex = 1 + obj:GetChild('btn_joinGame').onClick:Add(function() + ViewUtil.ShowModalWait(self._root_view, "匹配房间中", 'join_room') + local roomCtr = ControllerManager.GetController(RoomController) + roomCtr:PublicJoinRoom( + Protocol.WEB_FG_MATCH_ROOM, + roomList[index + 1].id, + true, + function(response) + ViewUtil.CloseModalWait('join_room') + if (response.ReturnCode == -1) then + -- RestartGame() + return + end + + if response.ReturnCode ~= 0 then + ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, '进入房间失败') + -- ViewManager.ChangeView(ViewManager.View_Lobby) + return + else + ViewManager.ChangeView(ViewManager.View_Main, playList[index + 1].gameId) + end + end, + id, + playList[index + 1].id + ) + end) + else + -- local config = ExtendManager.GetExtendConfig(playList[index - #roomList + 1].gameId) + -- local mode = config:GetGameInfo() + -- local gamePlay = mode:LoadConfigToDetail("随便甜点") + -- obj:GetChild('Label_gameRule').title = gamePlay + obj:GetChild('game_type').text = playList[index - #roomList + 1].name + obj:GetChild('btn_joinGame'):GetController('type').selectedIndex = 0 + obj:GetChild('btn_joinGame').onClick:Add(function() + ViewUtil.ShowModalWait(self._root_view, "匹配房间中", 'join_room') + local roomCtr = ControllerManager.GetController(RoomController) + fgCtr:FG_ChangeFag(id, DataManager.SelfUser.acc, 777777, function() + roomCtr:PublicJoinRoom( + Protocol.WEB_FG_MATCH_ROOM, + "", + true, + function(response) + ViewUtil.CloseModalWait('join_room') + if (response.ReturnCode == -1) then + -- RestartGame() + return + end + + if response.ReturnCode ~= 0 then + ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, '进入房间失败') + -- ViewManager.ChangeView(ViewManager.View_Lobby) + return + else + ViewManager.ChangeView(ViewManager.View_Main, playList[index + 1].gameId) + end + end, + id, + playList[index + 1].id + ) + end) + end) + end + end + list_gamePlay.itemRenderer = function(index, obj) + if index == 0 then + obj:GetChild('num').text = string.format("%d/7", #playList) + obj:GetChild('btn_addPlay').onClick:Add(function() + local gl_view = GroupMngGameListView.new(id) + gl_view:Show() + gl_view:CreateCallBack(function() + self:UpdateFamilyRoom(fgCtr, id) + end) + end) + return + end + obj:GetChild('text_title').text = playList[index].game_name + obj:GetChild('Label_details'):GetChild('title').text = playList[index].config + obj:GetController('type').selectedIndex = 1 + obj:GetChild('btn_del').onClick:Add(function() + fgCtr:FG_DelPlay(id, playList[index].id, function() + ViewUtil.ShowBannerOnScreenCenter("删除成功") + self:UpdateFamilyRoom(fgCtr, id) + end) + end) + end + list_room.numItems = #playList + #roomList + list_gamePlay.numItems = #playList + 1 +end + +function M:ConnetFamily(index, groups, isCreate) + UpdateBeat:Remove(self.OnUpdate, self) + ViewUtil:CloseModalWait() + + local list_family = self._view:GetChild('list_family') + self._group = DataManager.groups:get(groups[index].id) + self._roomNum = self._group.room_num + + if isCreate then + for i = 1, #groups do + local j = i + local child = UIPackage.CreateObjectFromURL('ui://Family/btn_familyName') + child:GetChild('name').text = groups[i].name + child.onClick:Add(function() + self:ConnetFamily(j, groups, false) + end) + if i == index then + child:GetController('button').selectedIndex = 1 + end + list_family:AddChild(child) + end + end + + local fgCtr = ControllerManager.GetController(NewGroupController) + + ViewUtil.ShowModalWait(self._root_view, "正在加载亲友圈权限中......") + self:ChangeOther(tonumber(groups[index].lev) + 1) + allLoad = 1 + + ViewUtil.ShowModalWait(self._root_view, "正在加载成员列表中......") + allLoad = allLoad + + self:ChangeNumber(fgCtr, groups[index].id, 0, groups[index].total_member_num or groups[index].member_num, false, + 1) + + ViewUtil.ShowModalWait(self._root_view, "正在加载房间列表中......") + + allLoad = allLoad + self:ConnetFamilyRoom(fgCtr, groups[index].id) + UpdateBeat:Add(self.OnUpdate, self) +end + +----------创建和加入--------------------- +function M:OnNumButtonAction(context) + local item = context.data + local index = self._view:GetChild('list_num'):GetChildIndex(item) + if index < 9 or index == 10 then + if (self._currenIndex < 6) then + self._currenIndex = self._currenIndex + 1 + self.tex_num.text = self.tex_num.text .. (index < 9 and index + 1 or index - 9) + if (self._currenIndex == 6) then + self:JoinRoom(self.tex_num.text) + end + end + elseif index == 9 then + self:ClearNumTex() + else + if (self._currenIndex > 0) then + self._currenIndex = self._currenIndex - 1 + self.tex_num.text = string.sub(self.tex_num.text, 0, self._currenIndex) + end + end +end + +function M:ClearNumTex() + self.tex_num.text = "" + self._currenIndex = 0 +end + +function M:JoinRoom(roomId) + local fgCtr = ControllerManager.GetController(NewGroupController) + --后端似乎还未调通 + -- fgCtr:FG_JoinGroup(roomId, function(res) + -- ViewUtil.ShowBannerOnScreenCenter("加入房间回调") + -- end) + --先换成邀请玩家 + fgCtr:FG_AddMember(self._group.id, tonumber(roomId), function() + self:ChangeNumber(fgCtr, self._group.id, 0, (self._group.total_member_num or self._group.member_num) + 1, false, + 1) + end) +end + +function M:OnUpdate() + -- --12001事件 + if self._group.update_room then + local fgCtr = ControllerManager.GetController(NewGroupController) + if self._roomNum == self._group.room_num then + for i = 1, self._group.room_num do + if self._group.rooms[i] and #self._group.rooms[i].plist == 0 then + fgCtr:FG_RemoveRoom( + self._group.id, + self._group.rooms[i].id, + function(res) + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, string.format('删除房间-%s失败!', self._group.rooms[i].id)) + else + self._roomNum = #self._group.rooms + self._group.update_room = false + end + end + ) + end + end + else + self._group.update_room = false + end + if self._fristRoom then + self._group.update_room = false + self._fristRoom = true + end + self:UpdateFamilyRoom(fgCtr, self._group.id) + end +end + +return M diff --git a/lua_probject/base_project/Game/View/HeadView.lua b/lua_probject/base_project/Game/View/HeadView.lua new file mode 100644 index 00000000..600ff593 --- /dev/null +++ b/lua_probject/base_project/Game/View/HeadView.lua @@ -0,0 +1,124 @@ +--玩家头像窗口 +HeadView = {} + +local M = HeadView + +function HeadView.new(blur_view, user, isHideIpAdds) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = 'HeadView' + self._blur_view = blur_view + self._user = user + self._isHideIpAdds = isHideIpAdds + self:init('ui://Common/Win_headinfo') + return self +end + +function M:init(url) + BaseWindow.init(self, url) + self._close_destroy = true + self._close_zone = true + local view = self._view + local ct_state = view:GetController('state') + view:GetChild('tex_nickname').text = self._user.nick_name + local str_playerid = ViewUtil.HideID(self._user.account_id) + if DataManager.SelfUser.account_id == self._user.account_id or DataManager.CurrenRoom.lev < 3 then + str_playerid = self._user.account_id + end + view:GetChild('tex_id').text = str_playerid + view:GetChild('tex_ip').text = self._user.host_ip + local tex_add = view:GetChild('tex_add') + + if self._isHideIpAdds then + view:GetChild('tex_ip').visible = false + view:GetChild('n12').visible = false + view:GetChild('n54').visible = false + + tex_add.visible = false + else + view:GetChild('tex_ip').visible = true + view:GetChild('n12').visible = true + view:GetChild('n54').visible = true + + tex_add.visible = true + end + -- view:GetChild("tex_distance").text = "" + local btn_head = view:GetChild('btn_head') + ImageLoad.Load(self._user.head_url, btn_head._iconObject) + + + if DataManager.CurrenRoom and not DataManager.CurrenRoom.playback then + -- 显示3人、4人玩法距离 + -- local n = 0 + -- if DataManager.CurrenRoom.room_config.people_num <= 4 and DataManager.CurrenRoom.room_config.people_num >= 3 then + -- n = 2 + -- -- 显示玩家间距离 + -- self:ShowPlayerDistance() + -- end + if DataManager.CurrenRoom.self_player.seat ~= 0 then + -- if self._user.account_id ~= DataManager.SelfUser.account_id and DataManager.CurrenRoom.self_player.seat ~= 0 then + ct_state.selectedIndex = 1 + + if self._user.account_id == DataManager.SelfUser.account_id then + view:GetChild('btn_all').selected = true + view:GetChild('btn_all').touchable = false + end + -- 桌面投掷物面板 + local lst_missile = view:GetChild('lst_missile') + lst_missile.onClickItem:Add( + function(context) + if os.time() - DataManager.InteractTime > 3 then + + local bAll = view:GetChild('btn_all').selected + + local targetId = self._user.account_id + if bAll then + targetId = DataManager.SelfUser.account_id + end + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendInteraction( + DataManager.SelfUser.account_id, + 5, + context.data.name .. '_' .. targetId + ) + -- cd + DataManager.InteractTime = os.time() + ct_state.selectedIndex = 3 + end + self:Destroy() + end + ) + else + ct_state.selectedIndex = 2 + end + -- 显示详细地址 + -- self._user.location:GetAddress() + + if self._user.location and not self._user.location.default then + self._user.location:GetAddress(tex_add) + else + tex_add.text = '无法获取玩家位置' + end + end + + + if os.time() - DataManager.InteractTime < 3 and DataManager.CurrenRoom.self_player.seat ~= 0 then + ct_state.selectedIndex = 3 + UpdateBeat:Add(self.OnUpdate, self) + end +end + +function M:OnUpdate() + if os.time() - DataManager.InteractTime > 3 and DataManager.CurrenRoom.self_player.seat ~= 0 then + self._view:GetController('state').selectedIndex = 1 + -- UpdateBeat.Remove(self.OnUpdate, self) + end +end + +function M:Destroy() + if self._verifyView then + self._verifyView:Destroy() + end + BaseWindow.Destroy(self) + UpdateBeat:Remove(self.OnUpdate, self) +end diff --git a/lua_probject/base_project/Game/View/Lobby/CreateRoomView.lua b/lua_probject/base_project/Game/View/Lobby/CreateRoomView.lua new file mode 100644 index 00000000..2ad6f8ba --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/CreateRoomView.lua @@ -0,0 +1,88 @@ +---创建房间View对象 +local GameListView = import(".GameListView") +local CreateRoomView = {} + +local M = CreateRoomView + +function CreateRoomView.new(index) + setmetatable(M, { __index = BaseWindow }) + local self = setmetatable({}, { __index = M }) + self.class = "CreateRoomView" + self._animation = false + self._full = true + self._full_offset = false + self._modeMap = {} + self.selectedIndex = index + self._close_destroy = true + self._put_map = false + self._new_hide = false + self._queue = false + -- self:init("ui://Lobby/Win_CreateRoom") + self:init("ui://Lobby/CreatePlay") + + return self +end + +function M:init(url) + BaseWindow.init(self, url) + self.gl_view = GameListView.new(self._view, self.selectedIndex, nil, function(mode_data) + self:OnCreateRoom(mode_data) + end, true) + --self.gl_view.IsHallGame=true +end + +function M:OnCreateRoom(mode_data) + if mode_data.type == 0 then + local mode = mode_data.data + --点击建房按钮后保存当前游戏的config + local _data = mode:SelectedConfigData() + --print("OnCreateRoom================") + --pt(_data) + if not _data["stamina"] then _data["stamina"] = 0 end + local user_id = DataManager.SelfUser.account_id + local config_data = {} + local game_id = mode.game_data.game_id + config_data["game_id"] = game_id + config_data["version"] = mode.game_data.version + config_data["config"] = _data + Utils.SaveLocalFile(user_id, json.encode(config_data)) + local loddyCtr = ControllerManager.GetController(LoddyController) + + -- 对强制开启gps的玩法进行判断 + if not DataManager.SelfUser.location then + DataManager.SelfUser.location = Location.new() + end + if _data["GPSDetection"] and _data["GPSDetection"] > 0 and DataManager.SelfUser.location:Location2String() == "" then + -- if DataManager.SelfUser.location:Location2String() == "" then + ViewUtil.ErrorTip(nil, "正在获取GPS定位,请稍候重试。") + get_gps() + return + end + + + ViewUtil.ShowModalWait(self._root_view, "正在创建房间...") + loddyCtr:CreateRoom(game_id, _data, function(res) + self:__OnCreateRoomAction(res) + end) + end +end + +function M:__OnCreateRoomAction(response) + ViewUtil.CloseModalWait() + if (response.ReturnCode == -2) then + return + end + if (response.ReturnCode ~= 0) then + ViewUtil.ErrorTip(response.ReturnCode, "创建房间失败") + return + end + self:Destroy() + if self.onCeateRoom then self.onCeateRoom() end +end + +function M:Destroy() + self.gl_view:Destroy() + BaseWindow.Destroy(self) +end + +return M diff --git a/lua_probject/base_project/Game/View/Lobby/EditNickView.lua b/lua_probject/base_project/Game/View/Lobby/EditNickView.lua new file mode 100644 index 00000000..155145cc --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/EditNickView.lua @@ -0,0 +1,49 @@ +--修改玩家昵称 + +local EditNickView = {} + +local M = EditNickView + +function EditNickView.new(callback) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "EditNickView" + self._callback = callback + self._close_destroy = true + self:init("ui://Lobby/win_edit_nick") + + return self +end + +function M:init(url) + BaseWindow.init(self,url) + + local tex_edit = self._view:GetChild("tex_edit") + tex_edit.text = DataManager.SelfUser.nick_name + + local btn_confirm = self._view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + local nick = tex_edit.text + if nick == "" then + ViewUtil.ErrorTip(nil, "昵称不能为空") + return + end + ViewUtil.ShowModalWait(self._root_view, "正在连接服务器") + local loddyctr = ControllerManager.GetController(LoddyController) + local _data = {} + _data.type = 7 + _data.nick = nick + loddyctr:UpdateUserInfo(_data,function( res) + ViewUtil.CloseModalWait() + if (res.ReturnCode ==0) then + DataManager.SelfUser.nick_name = nick + else + ViewUtil.ErrorTip(res.ReturnCode, "修改失败") + end + self._callback() + self:Destroy() + end) + end) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/Lobby/EditPortraitView.lua b/lua_probject/base_project/Game/View/Lobby/EditPortraitView.lua new file mode 100644 index 00000000..b40bfc27 --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/EditPortraitView.lua @@ -0,0 +1,28 @@ +--修改玩家头像 + +local EditPortraitView = {} + +local M = EditPortraitView + +function EditPortraitView.new(callback) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "EditPortraitView" + self._callback = callback + self._close_destroy = true + self:init("ui://Lobby/win_edit_portrait") + + return self +end + +function M:init(url) + BaseWindow.init(self,url) + + local lst_portrait = self._view:GetChild("lst_portrait") + lst_portrait.selectedIndex = 0 + + local btn_confirm = self._view:GetChild("btn_confirm") + +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/Lobby/GameListView.lua b/lua_probject/base_project/Game/View/Lobby/GameListView.lua new file mode 100644 index 00000000..37a7dfad --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/GameListView.lua @@ -0,0 +1,174 @@ +---创建房间View对象 + +local GameListView = {} + +local M = GameListView + +local liantiaoBool = false + +function GameListView.new(view, index, room_config, callback, isHall) + local self = {} + setmetatable(self, { __index = M }) + self._view = view + self._modeMap = {} + self.selectedIndex = index + self.room_config = room_config + self.IsHallGame = isHall or false + self._callback = callback + self:init() + return self +end + +function M:init() + local btn_createroom = self._view:GetChild("btn_create") + btn_createroom.onClick:Set(function() + if self._callback then + local index = self.selectedIndex + local mode_data = self._modeMap[index] + if not mode_data then return end + self._callback(mode_data) + end + end) + + if liantiaoBool then + self.create_panel = self._view:GetChild("create_panel") + self.lst_play = self._view:GetChild("lst_play") + self:__sysinit() + else + self.create_panel = self._view:GetChild("list_playPanel") + self.lst_play = self._view:GetChild("list_playName") + self:__sysinit() + end +end + +function M:__fill_panel() + local create_panel = self.create_panel + -- local ctr_update = self.ctr_update + local mode_data = self._modeMap[self.selectedIndex] + -- ctr_update.selectedIndex = mode_data.type + create_panel:RemoveChildren() + + local mode = mode_data.data + if mode and not mode._config then + mode:FillData() + if self.room_config and self.room_config.game_id == mode.game_data.game_id then + mode:LoadConfigData(self.room_config) + end + end + --local ctr_play_list = mode._config:GetController("play_list") + --self.lst_play:RemoveChildrenToPool() + --[[local p_list = mode:GetPlayList() + for i = 1, #p_list do + local item = self.lst_play:AddItemFromPool() + item.text = p_list[i] + end--]] + --self.lst_play.onClickItem:Set(function () + --ctr_play_list.selectedIndex = self.lst_play.selectedIndex + -- end) + --self.lst_play.selectedIndex = ctr_play_list.selectedIndex + self:ShowPayOption(mode) + create_panel:AddChild(mode_data.data._config) + --mode._config:AddRelation(create_panel, RelationType.Size) +end + +function M:__sysinit() + local games = DataManager.SelfUser.games + + local tempGame = {} + for k, v in ipairs(games) do + if v.game_id == 201 and self.IsHallGame == true then + + else + table.insert(tempGame, v) + end + end + + + local create_panel = self.create_panel + + local lst_game = self.lst_play + for i = 1, #tempGame do + local tem = tempGame[i] + local item = lst_game:AddItemFromPool() + item.text = tem.name + local config = ExtendManager.GetExtendConfig(tem.game_id) + config.game_data = tem + local mode = config:GetGameInfo() + item.icon = mode:GetIconUrl() + + local mode_data = {} + mode_data.type = 0 + mode_data.data = mode + mode.game_data = tem + self._modeMap[i] = mode_data + end + + lst_game.selectedIndex = self.selectedIndex - 1 + + lst_game.onClickItem:Set(function() + self.selectedIndex = lst_game.selectedIndex + 1 + self:__fill_panel() + end) + + -- local btn_game_info = self._view:GetChild("btn_game_info") + -- btn_game_info.onClick:Set(function() + -- self:__ShowHelp() + -- end) + + if lst_game.numChildren > 0 then + lst_game:ScrollToView(self.selectedIndex - 1) + self:__fill_panel() + end +end + +function M:__ShowHelp() + local index = self.selectedIndex + if #self._modeMap == 0 then return end + local mode = self._modeMap[index] + if mode.type == 0 then + local url = mode.data:GetHelpUrl() + local help_win = BaseWindow.new("ui://Lobby/Win_help", self._root_view) + help_win._close_destroy = true + help_win:Show() + local info_panel = help_win._view:GetChild("info_panel") + local info_obj = UIPackage.CreateObjectFromURL(url) + info_panel:AddChild(info_obj) + end +end + +function M:ShowPayType(mode) +end + +-- 显示支付类型 +function M:ShowPayOption(mode) + self:ShowPayType(mode) + mode:OnChangeOption(self._ctype) +end + +function M:GetModeData() + local index = self.selectedIndex + local mode_data = self._modeMap[index] + return mode_data +end + +function M:__dispose_mode() + for i = 1, #self._modeMap do + local mode_data = self._modeMap[i] + if mode_data.type == 0 then + local mode = mode_data.data + if mode._config then + mode._config:Dispose() + mode._config = nil + end + end + end + self._modeMap = {} +end + +function M:Destroy() + local create_panel = self.create_panel + create_panel:RemoveChildren() + self:__dispose_mode() +end + +return M diff --git a/lua_probject/base_project/Game/View/Lobby/JoinRoomView.lua b/lua_probject/base_project/Game/View/Lobby/JoinRoomView.lua new file mode 100644 index 00000000..49053828 --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/JoinRoomView.lua @@ -0,0 +1,90 @@ + +--进入房间View对象 + + +local JoinRoomView = {} + +local M = JoinRoomView +local KEY_DEL = "del" +local KEY_CLEAR = "reset" + +function JoinRoomView.new() + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "JoinRoomView" + self._currenIndex = 0 + self._close_destroy = true + self:init("ui://Lobby/JoinRoom") + return self +end + +function M:init(url) + BaseWindow.init(self,url) + + self.tex_num = self._view:GetChild("show_text") + self:ClearNumTex() + + for i = 0 , 9 do + local obj = self._view:GetChild("btn_num_"..i) + obj.onClick:Add(handler(self , self.OnNumButtonAction)) + i = i + 1 + end + local btn_reset = self._view:GetChild("btn_reset") + btn_reset.onClick:Add(handler(self , self.OnNumButtonAction)) + local btn_del = self._view:GetChild("btn_del") + btn_del.onClick:Add(handler(self , self.OnNumButtonAction)) +end + +function M:OnNumButtonAction(context) + local typer = string.sub(context.sender.name ,5) + printlog("==========================OnNumButtonAction==============================") + printlog(typer) + if typer == KEY_DEL then + if (self._currenIndex > 0) then + self._currenIndex = self._currenIndex - 1 + printlog("==================test=================") + print("ok") + printlog(#self._texnum_str) + printlog(self._currenIndex) + printlog("==================test=================") + self._texnum_str = string.sub(self._texnum_str,0,self._currenIndex) + self.tex_num.text = self._texnum_str + end + elseif typer == KEY_CLEAR then + self:ClearNumTex() + else + if (self._currenIndex < 6) then + self._currenIndex = self._currenIndex + 1 + self._texnum_str = self._texnum_str .. string.sub(typer,-1) + self.tex_num.text = self._texnum_str + if(self._currenIndex == 6) then + self:JoinRoom(self._texnum_str) + end + end + end +end + +function M:JoinRoom(str) + ViewUtil.ShowModalWait(self._root_view,"正在加入房间...") + local boddyCtr = ControllerManager.GetController(LoddyController) + boddyCtr:JoinRoom(str, function (response) + ViewUtil.CloseModalWait() + if response.ReturnCode == -2 then + self:JoinRoom(str) + return + elseif response.ReturnCode ~=0 then + ViewUtil.ErrorTip(response.ReturnCode,"进入房间失败") + return + end + self:Destroy() + ViewManager.ChangeView(ViewManager.View_Main,DataManager.CurrenRoom.game_id) + end) +end + +function M:ClearNumTex() + self._texnum_str = "" + self._currenIndex = 0 + self.tex_num.text = self._texnum_str +end + +return JoinRoomView diff --git a/lua_probject/base_project/Game/View/Lobby/LobbyAuthenticateView.lua b/lua_probject/base_project/Game/View/Lobby/LobbyAuthenticateView.lua new file mode 100644 index 00000000..09a1c08c --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/LobbyAuthenticateView.lua @@ -0,0 +1,74 @@ +--设置窗口对象 + +local LobbyAuthenticateView = {} + +local M = LobbyAuthenticateView +setmetatable(M, {__index = BaseWindow}) + +function LobbyAuthenticateView.new() + local self = setmetatable({}, {__index = M}) + self.class = 'AuthenticateView' + self._close_destroy = true + --假效果 + self.authenticate = 0 + self.authenticateName = "" + self.authenticateId = "" + self:init('ui://Lobby/Authentication') + return self +end + +function M:init(url) + BaseWindow.init(self, url) + + local view = self._view + + local input_name = view:GetChild('input_name'); + input_name.onChanged:Set(function() + input_name.alpha = 1 + end) + input_name.onFocusOut:Set(function() + if #input_name.text > 0 then + input_name.alpha = 1 + else + input_name.alpha = 0.5 + end + end) + + local input_idInfo = view:GetChild('input_idInfo'); + input_idInfo.onChanged:Set(function() + input_idInfo.alpha = 1 + end) + input_idInfo.onFocusOut:Set(function() + if #input_idInfo.text > 0 then + input_idInfo.alpha = 1 + else + input_idInfo.alpha = 0.5 + end + end) + + local btn_send = view:GetChild('btn_send') + btn_send.onClick:Set(function() + if false then + --发送身份证 + else + --假发送 + ViewUtil.ShowModalWait(self._root_view,"正在验证身份证...") + coroutine.start(function() + coroutine.wait(3) + ViewUtil.CloseModalWait() + self.authenticate = 1 + self.authenticateName=input_name.text + self.authenticateId=input_idInfo.text + input_name.grayed = true + input_name.touchable=false + input_idInfo.grayed = true + input_idInfo.touchable=false + ViewUtil.ShowBannerOnScreenCenter("验证身份证成功") + end) + end + end) +end + + + +return M diff --git a/lua_probject/base_project/Game/View/Lobby/LobbyHeadView.lua b/lua_probject/base_project/Game/View/Lobby/LobbyHeadView.lua new file mode 100644 index 00000000..9f279043 --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/LobbyHeadView.lua @@ -0,0 +1,168 @@ +-- 玩家信息窗口(大厅点击头像进入) + +local RealAddressView = import(".RealAddressView") +local PhoneBindView = import(".PhoneBindView") +local PhonePasswordView = import(".PhonePasswordView") +local WeChatView = import(".WeChatView") +local UserEditView = import(".UserEditView") + +local LobbyHeadView = {} + +local M = LobbyHeadView + +function LobbyHeadView.new(user,agent,callback) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "LobbyHeadView" + self._user = user + self._agent = agent + --self._full = true + self._full_offset = false + self._animation = false + self._put_map = false + self._new_hide = false + self._queue = false + self.callback = callback + self:init("ui://Lobby/UserInfo") + + return self +end + +function M:fill_item(item_name, title, callback) + local item = self.user_info:GetChild(item_name) + local btn_opt = item:GetChild("btn_opt") + local ctr_c1 = item:GetController("c1") + if title then + item.text = title + ctr_c1.selectedIndex = 1 + end + btn_opt.onClick:Set(function () + callback() + end) +end + +function M:fill_user_info() + local real_info = self._user.real_info + self:fill_item("item_real",real_info and real_info.name or nil,function () + local real_view = RealAddressView.new(0,function () + self:fill_user_info() + end) + real_view:Show() + end) + + local address = self._user.address + self:fill_item("item_address",address,function () + local real_view = RealAddressView.new(1,function () + self:fill_user_info() + end) + real_view:Show() + end) + + local phone = self._user.phone + self:fill_item("item_phone",phone and ViewUtil.phone_hide(phone) or nil,function () + local phone_view = PhoneBindView.new(function () + self:fill_user_info() + end) + phone_view:Show() + end) + + local password = self._user.password + self:fill_item("item_password",password,function () + -- if not phone then + -- ViewUtil.ShowTips("请绑定手机号") + -- return + -- end + local pw_view = PhonePasswordView.new(function() + self:fill_user_info() + end) + pw_view:Show() + end) + + local invitation = self._user.invitation + local item_invte = self.user_info:GetChild("item_invte") + local ctr_invte = item_invte:GetController("c1") + ctr_invte.selectedIndex = invitation + ctr_invte.onChanged:Set(function () + ViewUtil.ShowModalWait() + local loddyctr = ControllerManager.GetController(LoddyController) + local _data = {} + _data.type =5 + _data.invitation = ctr_invte.selectedIndex + loddyctr:UpdateUserInfo(_data,function( res) + ViewUtil.CloseModalWait() + if (res.ReturnCode ==0) then + DataManager.SelfUser.invitation = ctr_invte.selectedIndex + else + ViewUtil.ErrorTip(res.ReturnCode,"提交失败") + end + end) + end) + + local acc = self._user.acc + self:fill_item("item_wx",acc and "(绑定:"..self._user.nick_name..")" or "",function () + local wx_view = WeChatView.new(function() + self:fill_user_info() + end) + wx_view:Show() + end) + + local _btn_logout = self._view:GetChild('btn_logout') + _btn_logout.onClick:Set(function() + local _curren_msg = MsgWindow.new(self._root_view, '您是否退出当前账号?', MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add(function() + PlayerPrefs.DeleteKey('session_id') + PlayerPrefs.Save() + RestartGame() + end) + _curren_msg:Show() + end) +end + + +function M:ChangeToLogin() + local _curren_msg = MsgWindow.new(self._root_view, '您是否退出当前账号?', MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add(function() + PlayerPrefs.DeleteKey('session_id') + PlayerPrefs.Save() + RestartGame() + end) + _curren_msg:Show() +end + +function M:init(url) + BaseWindow.init(self,url) + self._close_destroy = true + self._close_zone = true + local view = self._view + + local ctr_nav = view:GetController("nav") + --ctr_nav.selectedIndex = self._agent and 1 or 0 + local ct_state = view:GetController("state") + view:GetChild("tex_nickname").text = self._user.nick_name + local str_playerid = self._user.account_id + view:GetChild("tex_id").text = "ID:"..str_playerid + + + local btn_head = view:GetChild("btn_head") + ImageLoad.Load(self._user.head_url, btn_head._iconObject) + btn_head.onClick:Set(function() + local user_edit_view = UserEditView.new(function() + view:GetChild("tex_nickname").text = self._user.nick_name + ImageLoad.Load(self._user.head_url, btn_head._iconObject) + self.callback() + end) + user_edit_view:Show() + end) + + local ctr_load = view:GetController("load") + local loddyCtr1 = ControllerManager.GetController(LoddyController) + loddyCtr1:GetUserInfo(function(res) + if res.ReturnCode == 0 then + ctr_load.selectedIndex = 1 + self:fill_user_info() + end + end) + self.user_info = view:GetChild("user_info") +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/Lobby/LobbyMessagesView.lua b/lua_probject/base_project/Game/View/Lobby/LobbyMessagesView.lua new file mode 100644 index 00000000..5cead09c --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/LobbyMessagesView.lua @@ -0,0 +1,27 @@ +--设置窗口对象 + +local LobbyMessagesView = {} + +local M = LobbyMessagesView +setmetatable(M, {__index = BaseWindow}) + +function LobbyMessagesView.new(Fct_UpdateDiamo) + local self = setmetatable({}, {__index = M}) + self.class = 'LobbyMessagesView' + self._close_destroy = true + self:init('ui://Lobby/Messages') + self.UpdateDiamo = Fct_UpdateDiamo + return self +end + +function M:init(url) + BaseWindow.init(self, url) + + local view = self._view + local messageList = view:GetChild('main') + +end + + + +return M diff --git a/lua_probject/base_project/Game/View/Lobby/LobbyPlayerInfoView.lua b/lua_probject/base_project/Game/View/Lobby/LobbyPlayerInfoView.lua new file mode 100644 index 00000000..4dddcb56 --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/LobbyPlayerInfoView.lua @@ -0,0 +1,86 @@ +--设置窗口对象 + +local LobbyPlayerInfoView = {} + +local M = LobbyPlayerInfoView +setmetatable(M, { __index = BaseWindow }) + +function LobbyPlayerInfoView.new(user, callback) + local self = setmetatable({}, { __index = M }) + self.class = 'LobbyPlayerInfoView' + self._close_destroy = true + self.user = user + self._callback = callback + self:init('ui://Lobby/PlayerInfo') + return self +end + +function M:init(url) + BaseWindow.init(self, url) + + local view = self._view + local user = self.user; + + print("================phone=====================") + for k, v in pairs(user) do + print(string.format("k:%s|v:%s", k, v)) + end + + --show + view:GetChild('name').text = user.nick_name + view:GetChild('phone').text = user.phone + view:GetChild('id').text = user.account_id + view:GetChild('diamo').text = user.diamo + view:GetChild('sex').text = user.sex and "男" or "女" + ImageLoad.Load(DataManager.SelfUser.head_url, view:GetChild("btn_PlayerHead")._iconObject) + + --change + view:GetChild('choose_id').text = user.account_id + view:GetChild('choose_diamo').text = user.diamo + self.Lable_name = view:GetChild('Lable_name'):GetChild('text') + self.Lable_name.text = user.nick_name + self.group_sex = view:GetController('group_sex') + self.group_sex.selectedIndex = user.sex + self.Lable_phone = view:GetChild('Lable_phone'):GetChild('text') + local bind = view:GetController('bind') + if user.phone then + bind.selectedIndex = 1 + self.Lable_phone.text = user.phone + else + bind.selectedIndex = 0 + self.Lable_phone.text = "" + end + view:GetChild('btn_headChange').onClick:Add(function() + ViewUtil.ShowOneChooose("暂不支持更换头像", 1) + end) + view:GetChild('btn_changePhone').onClick:Add(function() + ViewUtil.ShowOneChooose("绑定页面正在优化中,请稍后绑定", 1) + end) + view:GetChild('btn_bindPhone').onClick:Add(function() + ViewUtil.ShowOneChooose("绑定页面正在优化中,请稍后绑定", 1, function() + bind.selectedIndex = 1 + end) + end) + local type = view:GetController('type') + view:GetChild('btn_save').onClick:Add(function() + local cnt = 0 + if self.Lable_name.text ~= user.nick_name then + cnt = 1 + end + if self.group_sex.selectedIndex ~= tonumber(user.sex) then + cnt = cnt + 2 + end + if cnt > 0 then + ViewUtil.ShowOneChooose( + string.format("确定要修改%s%s%s吗?", cnt % 2 == 1 and "昵称" or "", cnt == 3 and "、" or "", + cnt >= 2 and "性别" or ""), + 1, function() + type.selectedIndex = 0 + end) + else + type.selectedIndex = 0 + end + end) +end + +return M diff --git a/lua_probject/base_project/Game/View/Lobby/LobbyRecordView.lua b/lua_probject/base_project/Game/View/Lobby/LobbyRecordView.lua new file mode 100644 index 00000000..c3d47fa4 --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/LobbyRecordView.lua @@ -0,0 +1,25 @@ +--设置窗口对象 + +local LobbyRecordView = {} + +local M = LobbyRecordView +setmetatable(M, { __index = BaseWindow }) + +function LobbyRecordView.new(Fct_UpdateDiamo) + local self = setmetatable({}, { __index = M }) + self.class = 'LobbyRecordView' + self._close_destroy = true + self:init('ui://Lobby/Record') + self.UpdateDiamo = Fct_UpdateDiamo + return self +end + +function M:init(url) + BaseWindow.init(self, url) + + local view = self._view + + local LbC = ControllerManager.GetCurrenController() +end + +return M diff --git a/lua_probject/base_project/Game/View/Lobby/LobbySettingView.lua b/lua_probject/base_project/Game/View/Lobby/LobbySettingView.lua new file mode 100644 index 00000000..2f1a84fe --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/LobbySettingView.lua @@ -0,0 +1,89 @@ +--设置窗口对象 + +local LobbySettingView = {} + +local M = LobbySettingView +setmetatable(M, {__index = BaseWindow}) + +function LobbySettingView.new() + local self = setmetatable({}, {__index = M}) + self.class = 'SettingView' + self._close_destroy = true + self:init('ui://Lobby/Setting') + return self +end + +function M:init(url) + BaseWindow.init(self, url) + + local view = self._view + local slider_sound = view:GetChild('slider_vedio_sound') + local slider_music = view:GetChild('slider_vedio_music') + local btn_music = view:GetChild('btn_vedio_music') + local btn_sound = view:GetChild('btn_vedio_sound') + print(GameApplication.Instance.MusicMute) + + slider_sound.value = GameApplication.Instance.SoundValue + slider_music.value = GameApplication.Instance.MusicValue + + slider_music.onChanged:Add(function() + GameApplication.Instance.MusicValue = slider_music.value + btn_music.selected = false + GameApplication.Instance.MusicMute = false; + end) + + slider_sound.onChanged:Add(function() + GameApplication.Instance.SoundValue = slider_sound.value + btn_sound.selected = false + GameApplication.Instance.SoundMute = false; + end) + + btn_sound.onClick:Add(function() + GameApplication.Instance.SoundMute = btn_sound.selected; + end) + + btn_music.onClick:Add(function() + GameApplication.Instance.MusicMute = btn_music.selected; + end) + + local _btn_logout = self._view:GetChild('btn_switchAccount') + _btn_logout.onClick:Set(function() + local _curren_msg = MsgWindow.new(self._root_view, '您是否退出当前账号?', MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add(function() + PlayerPrefs.DeleteKey('session_id') + PlayerPrefs.Save() + RestartGame() + end) + _curren_msg:Show() + end) + + local btn_quit = view:GetChild('btn_exitAccount') + btn_quit.onClick:Set( + function() + GameApplication.Instance:QuitGameOnUnity(); + end + ) + --[[ + + local _btn_logout = self._view:GetChild('btn_del') + _btn_logout.onClick:Set(function() + local _curren_msg = MsgWindow.new(self._root_view, '您是否退出当前账号?', MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add(function() + PlayerPrefs.DeleteKey('session_id') + PlayerPrefs.Save() + RestartGame() + end) + _curren_msg:Show() + end) + + --]] + + + + + +end + + + +return M diff --git a/lua_probject/base_project/Game/View/Lobby/LobbyShopView.lua b/lua_probject/base_project/Game/View/Lobby/LobbyShopView.lua new file mode 100644 index 00000000..8f1c0d4c --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/LobbyShopView.lua @@ -0,0 +1,64 @@ +--设置窗口对象 + +local LobbyShopView = {} + +local M = LobbyShopView +setmetatable(M, {__index = BaseWindow}) + +local SHOP_LIST = { + { + num=2000, + price=300 + }, + { + num=1000, + price=165 + }, + { + num=300, + price=50 + }, +} + +function LobbyShopView.new(Fct_UpdateDiamo) + local self = setmetatable({}, {__index = M}) + self.class = 'ShopView' + self._close_destroy = true + self:init('ui://Lobby/Shop') + self.UpdateDiamo = Fct_UpdateDiamo + return self +end + +function M:init(url) + BaseWindow.init(self, url) + + local view = self._view + local shopList = view:GetChild("main") + + for i = 1, #SHOP_LIST do + local shopChild = UIPackage.CreateObjectFromURL('ui://Lobby/c_shop_child') + shopChild:GetChild('num').text = string.format("%s 张",SHOP_LIST[i].num) + local shopBuyBtn = shopChild:GetChild('btn_buy') + shopBuyBtn:GetChild('sprite').icon = string.format("ui://Lobby/shop_buy_%s",SHOP_LIST[i].price) + shopBuyBtn.onClick:Set(function() + local index = i; + if false then + --发送购买给后端 + else + --假数据 + print("===================shop====================") + print(SHOP_LIST[index].num) + print(DataManager.SelfUser.diamo) + DataManager.SelfUser.diamo = DataManager.SelfUser.diamo + SHOP_LIST[index].num + print(DataManager.SelfUser.diamo) + self.UpdateDiamo() + end + + end) + shopList:AddChild(shopChild) + end +end + + + +return M diff --git a/lua_probject/base_project/Game/View/Lobby/NoticeView.lua b/lua_probject/base_project/Game/View/Lobby/NoticeView.lua new file mode 100644 index 00000000..ff7db124 --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/NoticeView.lua @@ -0,0 +1,69 @@ +local NoticeView = {} +local M = NoticeView + +function NoticeView.new(blur_view) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "NoticeView" + -- self._blur_view = blur_view + self:init("ui://Lobby/pop_notice") + + return self +end + +function M:init(url) + BaseWindow.init(self,url) + self._close_destroy = true + self._close_zone = true +end + +function M:FillData(data) + if not data then return end + self._notices = data + local list = self._view:GetChild("list") + for i = 1, #data do + local info = data[i] + local item = list:AddItemFromPool() + item:GetChild("title").text = info.name + + if info.type == "NEW" then + item:GetChild("icon").url = "ui://27vd145bildu7e" + elseif info.type == "ACTIVITY" then + item:GetChild("icon").url = "ui://27vd145bildu74" + else + item:GetChild("icon").url = "" + end + + item.onClick:Add(function() + self:ShowIndex(i) + end) + end + list.selectedIndex = 0 + self:ShowIndex(1) + +end + +function M:ShowIndex(index) + local title = self._view:GetChild("tex_title") + local pic = self._view:GetChild("img") + local content = self._view:GetChild("com_content"):GetChild("tex_content") + local notices = self._notices + + if index <= #notices then + title.text = notices[index].title + content.text = notices[index].content + end + + -- pic.text = "" + -- pic.text = "" + -- print(pic.text) + + +end + +function M:Destroy(flag) + -- ImageLoad.Clear(self.class) + BaseWindow.Destroy(self, flag) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/Lobby/PhoneBindView.lua b/lua_probject/base_project/Game/View/Lobby/PhoneBindView.lua new file mode 100644 index 00000000..58e39cc2 --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/PhoneBindView.lua @@ -0,0 +1,119 @@ +local PhoneBindView = {} + +local M = PhoneBindView + +function PhoneBindView.new(callback) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "PhoneBindView" + self._callback = callback + self._close_destroy = true + local url = "ui://Lobby/win_phone" + self:init(url) + return self +end + +function M:init(url) + BaseWindow.init(self,url) + + if DataManager.SelfUser.phone then + local ctr_update = self._view:GetController("update") + ctr_update.selectedIndex = 1 + end + + local btn_getCode = self._view:GetChild("btn_getCode") + btn_getCode.onClick:Set(function() + self:GetCode() + end) + + local btn_ok = self._view:GetChild("btn_ok") + btn_ok.onClick:Set(function() + self:Bind() + end) +end + +--获取验证码 +function M:GetCode() + local phone = self:CheckInputPhone() + if not phone then + return + end + local loddyctr = ControllerManager.GetController(LoddyController) + loddyctr:GetPhoneCode(phone,function( res) + if res.ReturnCode == 0 then + self._view:GetController("code").selectedIndex = 1 + self._left_time = 120 + UpdateBeat:Add(self.OnUpdate, self) + else + ViewUtil.ErrorTip(res.ReturnCode, "请输入正确的手机号") + end + end) +end + +function M:OnUpdate() + local deltaTime = Time.deltaTime + local _left_time = self._left_time + if (_left_time > 0) then + _left_time = _left_time - deltaTime + _left_time = math.max(0, _left_time) + local leftTime = math.floor(_left_time) + self._view:GetChild("tex_time").text = tostring(leftTime).."后重新发送" + self._left_time = _left_time + else + self._view:GetController("code").selectedIndex=0 + UpdateBeat:Remove(self.OnUpdate, self) + end +end + +function M:Destroy() + BaseWindow.Destroy(self) + UpdateBeat:Remove(self.OnUpdate, self) +end + +--绑定 +function M:Bind() + local phone = self:CheckInputPhone() + if not phone then + return + end + local code = self:CheckInputCode() + if not code then + return + end + ViewUtil.ShowModalWait(self._root_view,"正在提交...") + local loddyctr = ControllerManager.GetController(LoddyController) + local _data = {} + _data.type =4 + _data.phone = phone + _data.code = code + loddyctr:UpdateUserInfo(_data,function( res) + ViewUtil.CloseModalWait() + if (res.ReturnCode ==0) then + DataManager.SelfUser.phone = phone + if self._callback then self._callback() end + else + ViewUtil.ErrorTip(res.ReturnCode,"提交失败") + end + self:Close() + end) +end + +function M:CheckInputPhone() + local phone = self._view:GetChild("tex_phone").text + if not (string.len(phone) == 11 or string.len(phone) == 12) then + ViewUtil.ShowTips("请输入正确的手机号") + return + end + return phone +end + +function M:CheckInputCode() + local code = self._view:GetChild("tex_code").text + if not (string.len(code) == 6) then + ViewUtil.ShowTips("请输入正确的验证码") + return + end + return code +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/Lobby/PhonePasswordView.lua b/lua_probject/base_project/Game/View/Lobby/PhonePasswordView.lua new file mode 100644 index 00000000..e7298f28 --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/PhonePasswordView.lua @@ -0,0 +1,123 @@ +local PhonePasswordView = {} + +local M = PhonePasswordView + +function PhonePasswordView.new(callback) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "PhonePasswordView" + self._callback = callback + self._close_destroy = true + local url = "ui://Lobby/win_phone_password" + self:init(url) + return self +end + +function M:init(url) + BaseWindow.init(self,url) + self.ctr_update = self._view:GetController("update") + if DataManager.SelfUser.password then + --self.ctr_update.selectedIndex = 1 + --print("DataManager.SelfUser.account_idDataManager.SelfUser.account_idDataManager.SelfUser.account_id ",DataManager.SelfUser.account_id) + --self._view:GetChild("tex_phone").text = DataManager.SelfUser.account_id--ViewUtil.phone_hide(DataManager.SelfUser.phone) + end + + self._view:GetChild("tex_phone").text = DataManager.SelfUser.account_id + + local btn_getCode = self._view:GetChild("btn_getCode") + btn_getCode.onClick:Set(function() + self:GetCode() + end) + + local btn_ok = self._view:GetChild("btn_ok") + btn_ok.onClick:Set(function() + self:Bind() + end) +end + +--获取验证码 +function M:GetCode() + local phone = self:CheckInputPhone() + if not phone then + return + end + local loddyctr = ControllerManager.GetController(LoddyController) + loddyctr:GetPhoneCode(phone,function( res) + if res.ReturnCode == 0 then + self._view:GetController("code").selectedIndex = 1 + self._left_time = 120 + UpdateBeat:Add(self.OnUpdate, self) + else + ViewUtil.ErrorTip(res.ReturnCode, "请输入正确的手机号") + end + end) +end + +function M:OnUpdate() + local deltaTime = Time.deltaTime + local _left_time = self._left_time + if (_left_time > 0) then + _left_time = _left_time - deltaTime + _left_time = math.max(0, _left_time) + local leftTime = math.floor(_left_time) + self._view:GetChild("tex_time").text = tostring(leftTime).."后重新发送" + self._left_time = _left_time + else + self._view:GetController("code").selectedIndex=0 + UpdateBeat:Remove(self.OnUpdate, self) + end +end + +function M:Destroy() + BaseWindow.Destroy(self) + UpdateBeat:Remove(self.OnUpdate, self) +end + +--绑定 +function M:Bind() + + local tex_passwd = self._view:GetChild("tex_passwd") + local password = tex_passwd.text + if string.len(password) <6 then + ViewUtil.ShowTips("请输入5位以上的密码") + return + end + local _data = {} + + -- if self.ctr_update.selectedIndex == 1 then + + -- local code = self:CheckInputCode() + -- if not code then + -- return + -- end + -- _data.phone = DataManager.SelfUser.phone + -- _data.code = code + -- end + ViewUtil.ShowModalWait(self._root_view,"正在提交...") + local loddyctr = ControllerManager.GetController(LoddyController) + _data.password = password + _data.type =3 + + loddyctr:UpdateUserInfo(_data,function( res) + ViewUtil.CloseModalWait() + if (res.ReturnCode ==0) then + DataManager.SelfUser.password = "123" + if self._callback then self._callback() end + else + ViewUtil.ErrorTip(res.ReturnCode,"提交失败") + end + self:Close() + end) +end + + +function M:CheckInputCode() + local code = self._view:GetChild("tex_code").text + if not (string.len(code) == 6) then + ViewUtil.ShowTips("请输入正确的验证码") + return + end + return code +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/Lobby/RankView.lua b/lua_probject/base_project/Game/View/Lobby/RankView.lua new file mode 100644 index 00000000..ff2765f3 --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/RankView.lua @@ -0,0 +1,403 @@ +-- 排行和战绩窗口 +-- author:谌建军 + +RankView = {} + + +local M = RankView + +function RankView.new( main_view,video ) + UIPackage.AddPackage("base/rank/ui/Rank") + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "RankView" + self._animation = false + self._full = true + self._full_offset = false + self._close_destroy = true + self._main_view = main_view + self._video = video + self._put_map = false + self._new_hide = false + self._queue = false + self:init("ui://Rank/Main") + return self +end + +function M:init( url ) + + BaseWindow.init(self,url) + + self._view:GetController("tab").selectedIndex = self._video and 1 or 0 + self._curren_tex = "" + self._curren_len = 0 + local develop_panel = self._view:GetChild("n70") + self.tex_roomid = develop_panel:GetChild("tex_roomid") + self.tex_roomid.text = "" + for i = 0, 9 do + local btn = develop_panel:GetChild("btn_" .. i) + btn.onClick:Add(function() + + if self._curren_len < 6 then + + self._curren_tex = self._curren_tex .. i + self._curren_len = self._curren_len + 1 + self.tex_roomid.text = self._curren_tex + + if self._curren_len == 6 then + + ViewUtil.ShowModalWait(self._root_view) + local loddyCtr1 = ControllerManager.GetController(LoddyController) + loddyCtr1:RequestRecordList(function (result) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if result == Table_Error_code.ERR_TIMEOUT then + self:readData() + return + end + if result == 0 then + self:InitRecord1(loddyCtr1.recordList, true) + end + end, self._curren_tex) + end + end + end) + end + + develop_panel:GetChild("btn_del").onClick:Add(function() + if self._curren_len > 0 then + self._curren_len = self._curren_len - 1 + self._curren_tex = string.sub(self._curren_tex, 0, self._curren_len) + self.tex_roomid.text = self._curren_tex + end + end) + + develop_panel:GetChild("btn_retype").onClick:Add(function() + self._curren_tex = "" + self._curren_len = 0 + self.tex_roomid.text = self._curren_tex + end) + + +end + +function M:readData() + local view = self._view + + local record_list_1 = view:GetChild("n26") + record_list_1:RemoveChildrenToPool() + + local loddyCtr1 = ControllerManager.GetController(LoddyController) + loddyCtr1:RequestRecordList(function (result) + if self._is_destroy then + return + end + if result == Table_Error_code.ERR_TIMEOUT then + self:readData() + return + end + + + self:InitRecord1(loddyCtr1.recordList) + + end) +end + +function M:Show() + BaseWindow.Show(self) + UpdateBeat:Remove(self._main_view.OnUpdate, self._main_view) + -- self:readData() +end + +function M:Destroy() + BaseWindow.Destroy(self) + UpdateBeat:Add(self._main_view.OnUpdate, self._main_view) +end + +local load_head_num = 0 +function M:InitRecord1(recordList, develop_tool) + + --print("InitRecord1=========") + pt(recordList) + local main_view = self._view + -- 战绩 list + local record_list_1, ctr_recored, ctr_no_record + if develop_tool then + + ctr_recored = main_view:GetController("developer") + ctr_recored.selectedIndex = 1 + + record_list_1 = main_view:GetChild("lst_record") + local btn_backto_search = main_view:GetChild("btn_backto_search") + btn_backto_search.onClick:Set(function() + + ctr_recored.selectedIndex = 0 + + self._curren_tex = "" + self._curren_len = 0 + self.tex_roomid.text = "" + end) + ctr_no_record = self._view:GetController("noRecordData2") + else + record_list_1 = main_view:GetChild("n26") + ctr_no_record = self._view:GetController("noRecordData") + end + record_list_1:RemoveChildrenToPool() + ctr_no_record.selectedIndex = #recordList == 0 and 1 or 0 + for i=1, #recordList do + + local record_list_item = recordList[i] + local total_score_list = record_list_item.TotalScoreList + local item = record_list_1:AddItemFromPool() + + local player_item_list = item:GetChild("big_round") + local more_person = #total_score_list >= 6 + if more_person then + item:GetController("person_num").selectedIndex = 1 + else + item:GetController("person_num").selectedIndex = 0 + end + + + local game_id = record_list_item.GameId + local game_data = ExtendManager.GetGameData(game_id) + local room_type_str = record_list_item.GameInfo.name + local room_id_str = record_list_item.RoomId + local time =tonumber(record_list_item.Time) + local room_time_str = os.date("%Y-%m-%d %H:%M", time) + local item_score_list = record_list_item.GameTimes + local play_back_id = record_list_item.PlayBackId + -- 显示 房间号 房间类型 时间 + item:GetChild("RoomType").asTextField.text = room_type_str + item:GetChild("RoomID").asTextField.text = room_id_str + item:GetChild("Time").asTextField.text = room_time_str + if record_list_item.hp_times and record_list_item.hp_times ~= 0 then + item:GetChild("tex_times").text = record_list_item.hp_times .. "倍" + else + item:GetChild("tex_times").text = "" + end + player_item_list:RemoveChildrenToPool() + local hpOnOff = record_list_item.hpOnOff + local hpType = record_list_item.GameInfo.hpType + -- 显示 每个玩家的 名字和 分数 + -- player_list 是聊天室数据 + local player_list = {} + for j=1,#total_score_list do + local player_list_item = total_score_list[j] + local player_item = player_item_list:AddItemFromPool() + player_item:GetChild("n0").text = player_list_item.Name + local player_score = player_item:GetChild("n1") + local score = player_list_item.Score + if hpOnOff == 1 and hpType > 1 then + score = score / 10 + end + if score < 0 then + player_item:GetController("num_color").selectedIndex = 1 + else + player_item:GetController("num_color").selectedIndex = 0 + end + + player_score.text = score >= 0 and "+"..score or score + player_list[j] = {} + player_list[j].id = player_list_item.Id + player_list[j].score = score + player_list[j].house = 0 + player_list[j].nick = player_list_item.Name + end + -- 点击事件 + item.onClick:Add(function () + + self:ShowRecord2(play_back_id, room_type_str, room_id_str, room_time_str,item_score_list, game_id, develop_tool, record_list_item) + end) + -- 分享 + item:GetChild("btn_screenshot").onClick:Set(function() + ViewUtil.ShowModalWait(self._view, "正在分享...") + local result_view = UIPackage.CreateObjectFromURL("ui://Rank/ResultView") + result_view.visible = false + self._view:AddChild(result_view) + result_view:GetChild("tex_roomnum").text = room_id_str .. " " .. room_type_str + result_view:GetChild("tex_data").text = room_time_str + result_view:GetChild("btn_confirm").onClick:Set(function() result_view:Dispose() end) + local lst_p = result_view:GetChild("list_result") + local lst_p2 = result_view:GetChild("list_result2") + load_head_num = #total_score_list + local count = #total_score_list + for j = 1, count do + local p = total_score_list[j] + local item = nil + if count < 6 or (count >= 6 and j <= math.ceil(count / 2)) then + item = lst_p:AddItemFromPool() + else + item = lst_p2:AddItemFromPool() + end + item:GetChild("name").text = p.Name + local score = p.Score + if hpOnOff == 1 and hpType > 1 then + score = score / 10 + end + item:GetChild("score").text = score + if score < 0 then item:GetController("di").selectedIndex = 1 end + if p.Portrait and p.Portrait ~= "" then + ImageLoad.Load(p.Portrait, item:GetChild("n9")._iconObject, 1, function( ... ) + load_head_num = load_head_num - 1 + end) + else + load_head_num = load_head_num - 1 + end + end + coroutine.start(function ( ... ) + local left_time = 4 + while (true) do + if load_head_num == 0 or left_time == 0 then + result_view.visible = true + coroutine.wait(0.2) + ShareScreenShotWithOption(function() + result_view:Dispose() + end) + ViewUtil.CloseModalWait() + break + end + coroutine.wait(1) + left_time = left_time - 1 + end + end) + end) + item:GetChild("btn_link").onClick:Set(function() + local group_id = record_list_item.group_id and tonumber(record_list_item.group_id) or 0 + ShareChatRoom(record_list_item.RoomId, tostring(os.time()), #item_score_list, room_type_str, group_id, player_list, self._root_view) + end) + end +end + +function M:ShowRecord2(playback_id, room_type, room_id, room_time, item_score, game_id, develop_tool, record_item) + local record_list_2 + if develop_tool then + record_list_2 = self._view:GetChild("lst_round") + self._view:GetController("developer").selectedIndex = 2 + else + record_list_2 = self._view:GetChild("n29") + self._view:GetController("Record").selectedIndex = 1 + end + + local hpOnOff = record_item.hpOnOff + local hpType = record_item.GameInfo.hpType + + record_list_2:RemoveChildrenToPool() + for i=1,#item_score do + local item_player_info = item_score[i] + local play_back_id = item_player_info.PlayBackId + local player_score = item_player_info.PlayerList + + local record_item_2 = record_list_2:AddItemFromPool("ui://Rank/Record_Item_2") + local player_item_list = record_item_2:GetChild("List") + local more_person = #player_score >= 6 + + if more_person then + record_item_2:GetController("person_num").selectedIndex = 1 + else + record_item_2:GetController("person_num").selectedIndex = 0 + end + + -- 设置房间信息 + record_item_2:GetChild("RoomType").text = room_type + record_item_2:GetChild("RoomID").text = room_id + --record_item_2:GetChild("Time").text = room_time + record_item_2:GetChild("Number").text = tostring(i) + + player_item_list:RemoveChildrenToPool() + for j=1,#player_score do + + local player_item = player_item_list:AddItemFromPool() + player_item:GetChild("n0").text = player_score[j].Name + local player_score_text = player_item:GetChild("n1") + local score = player_score[j].Score + if hpOnOff == 1 and hpType > 1 then + score = score / 10 + end + if score < 0 then + player_item:GetController("num_color").selectedIndex = 1 + else + player_item:GetController("num_color").selectedIndex = 0 + end + player_score_text.text = score >= 0 and "+"..score or score + + end + local btn_play_back = record_item_2:GetChild("btn_play_back") + btn_play_back.onClick:Set(function() + --print("点击进入回放=====") + if DataManager.SelfUser.playback[playback_id] ~= nil and DataManager.SelfUser.playback[playback_id][i] ~= nil then + --print("1111111111111111") + local room = ExtendManager.GetExtendConfig(game_id):NewRoom() + DataManager.CurrenRoom = room + room.game_id = game_id + local extend = ExtendManager.GetExtendConfig(game_id) + extend:FillPlayBackData(DataManager.SelfUser.playback[playback_id][i]) + if not room.self_player then + room.self_player = room:GetPlayerBySeat(1) + end + local main = self:GenaratePlayBack(ViewManager.View_PlayBack, game_id) + main._currentId = playback_id + main._currentRound = i + main._totalRound = #item_score + main:FillRoomData(DataManager.SelfUser.playback[playback_id][i]) + else + --print("2222222222222") + ViewUtil.ShowModalWait(self._view) + local _data = {} + _data["military_id"] = playback_id + _data["round"] = tostring(i) + local loddyCtr1 = ControllerManager.GetController(LoddyController) + loddyCtr1:RequestPlayBack(_data,function(code,data) + ViewUtil.CloseModalWait() + if code == 0 then + if DataManager.SelfUser.playback[playback_id] ~= nil then + DataManager.SelfUser.playback[playback_id][i] = data + else + local playback_data = {} + playback_data[i] = data + DataManager.SelfUser.playback[playback_id] = playback_data + end + + local main = self:GenaratePlayBack(ViewManager.View_PlayBack, game_id) + main._currentId = playback_id + main._currentRound = i + main._totalRound = #item_score + --print(main) + main:FillRoomData(data) + elseif code == 25 then + ViewUtil.ErrorTip(code, "回放未找到!") + btn_play_back.grayed = true + end + end, record_item.GameInfo) + + end + end) + end +end + +function M:GenaratePlayBack(id, game_id, ...) + local tem =nil + local dview_class = nil + if not dview_class then + local exconfig = ExtendManager.GetExtendConfig(game_id) + dview_class = exconfig:GetView(id) + --print(dview_class) + end + if not dview_class then + return + end + local arg = {...} + tem = dview_class.new(...) + tem.Id = id + tem:Show() + return tem +end + +function M:Destroy() + BaseWindow.Destroy(self) + UIPackage.RemovePackage("base/rank/ui/Rank") +end + +return M diff --git a/lua_probject/base_project/Game/View/Lobby/RealAddressView.lua b/lua_probject/base_project/Game/View/Lobby/RealAddressView.lua new file mode 100644 index 00000000..fe1bacf7 --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/RealAddressView.lua @@ -0,0 +1,143 @@ +--实名认证窗口 + +local RealAddressView = {} + +local M = RealAddressView + +function RealAddressView.new(type,callback) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "RealAddressView" + self._type = type + self._callback = callback + self._close_destroy = true + self:init("ui://Lobby/win_real_address") + + return self +end + +function M:init(url) + BaseWindow.init(self,url) + local view = self._view + + local btn_real = view:GetChild("btn_real") + btn_real.onClick:Set(function() + self:real_action() + end) + + local btn_address = view:GetChild("btn_address") + btn_address.onClick:Set(function () + self:address_action() + end) + + self.ctr_update = view:GetController("update") + + local ctr_nav = view:GetController("nav") + ctr_nav.onChanged:Set(function() + if ctr_nav.selectedIndex ==0 then + self:fill_real() + else + local user = DataManager.SelfUser + if user.address then + self._view:GetChild("tex_address").text = user.address + end + end + end) + + if self._type == 0 then + self:fill_real() + end + ctr_nav.selectedIndex = self._type +end + +function M:fill_real() + local user = DataManager.SelfUser + if user.real_info then + self.ctr_update.selectedIndex = 1 + self._view:GetChild("tex_name1").text ="姓名:".. user.real_info.name + self._view:GetChild("tex_identity1").text = "身份证号:"..ViewUtil.identity_hide(user.real_info.identity) + else + self.ctr_update.selectedIndex = 0 + end +end +function M:SetCallBack(callback) + self._CB = callback +end + +function M:real_action() + local check,str = self:CheckInputValidity() + if not check then + ViewUtil.ShowTips(str) + return + end + ViewUtil.ShowModalWait(self._root_view,"正在提交认证...") + local loddyctr = ControllerManager.GetController(LoddyController) + local _data = {} + _data.type =1 + local real_info = {} + real_info.name =self._view:GetChild("tex_name").text + real_info.identity = self._view:GetChild("tex_identity").text + _data.real_info = real_info + loddyctr:UpdateUserInfo(_data,function( res) + ViewUtil.CloseModalWait() + if (res.ReturnCode ==0) then + DataManager.SelfUser.real_info = real_info + if self._callback then self._callback() end + else + ViewUtil.ErrorTip(res.ReturnCode, "认证失败,请重试") + end + self:Close() + end) +end + +function M:CheckInputValidity() + local name = self._view:GetChild("tex_name").text + local id = self._view:GetChild("tex_identity").text + + if name then + local l = string.len(name) + if l == 0 then return false, "请输入名字" end + -- 中文长度是3 + if l == 3 then return false, "名字过短" end + for i = 1, l do + local c = string.byte(string.sub(name, i, i)) + --if not ((65 <= c and c <= 90) or (97 <= c and c <= 122) or c > 127) then + if not (c > 127) then + return false, "名字中不能包含英文、数字或特殊符号" + end + end + end + if id then + local l = string.len(id) + if l ~= 18 then return false, "请输入18位身份证号码" end + if not (tonumber(id) or string.sub(id,18,18) == "X") then + return false, "请输入正确的身份证号码" + end + end + return true +end + +function M:address_action() + local tex_address = self._view:GetChild("tex_address").text + if string.len(tex_address) <=0 then + ViewUtil.ShowTips("请输入详细地址") + return + end + ViewUtil.ShowModalWait(self._root_view,"正在提交...") + local loddyctr = ControllerManager.GetController(LoddyController) + local _data = {} + _data.type =2 + _data.address = tex_address + loddyctr:UpdateUserInfo(_data,function( res) + ViewUtil.CloseModalWait() + if (res.ReturnCode ==0) then + DataManager.SelfUser.address = _data.address + if self._callback then self._callback() end + else + ViewUtil.ErrorTip(res.ReturnCode,"提示失败") + end + self:Close() + end) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/Lobby/UserEditView.lua b/lua_probject/base_project/Game/View/Lobby/UserEditView.lua new file mode 100644 index 00000000..a5936f2c --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/UserEditView.lua @@ -0,0 +1,52 @@ +--修改玩家昵称头像 +local EditPortraitView = import(".EditPortraitView") +local EditNickView = import(".EditNickView") + +local UserEditView = {} + +local M = UserEditView + +function UserEditView.new(callback) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "UserEditView" + self._callback = callback + self._close_destroy = true + self:init("ui://Lobby/win_user_edit") + + return self +end + +function M:init(url) + BaseWindow.init(self,url) + + local btn_head = self._view:GetChild("btn_head") + ImageLoad.Load(DataManager.SelfUser.head_url, btn_head._iconObject) + + local tex_nick = self._view:GetChild("tex_nick") + tex_nick.text = DataManager.SelfUser.nick_name + + local tex_id = self._view:GetChild("tex_id") + tex_id.text = string.format("玩家ID:%s", DataManager.SelfUser.account_id) + + local btn_edit_nick = self._view:GetChild("btn_edit_nick") + btn_edit_nick.onClick:Set(function() + local edit_nick_view = EditNickView.new(function() + tex_nick.text = DataManager.SelfUser.nick_name + self._callback() + end) + edit_nick_view:Show() + end) + + local btn_edit_portrait = self._view:GetChild("btn_edit_portrait") + btn_edit_portrait.onClick:Set(function() + -- local edit_portrait_view = EditPortraitView.new(function() + -- ImageLoad.Load(DataManager.SelfUser.head_url, btn_head._iconObject) + -- --print(DataManager.SelfUser.head_url) + -- self._callback() + -- end) + -- edit_portrait_view:Show() + end) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/Lobby/WeChatView.lua b/lua_probject/base_project/Game/View/Lobby/WeChatView.lua new file mode 100644 index 00000000..4c487a65 --- /dev/null +++ b/lua_probject/base_project/Game/View/Lobby/WeChatView.lua @@ -0,0 +1,79 @@ +-- 同步微信信息 + +local WeChatView = {} + +local M = WeChatView + +function WeChatView.new(callback) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "WeChatView" + self._close_destroy = true + self._close_zone = true + self._callback =callback + self:init("ui://Lobby/win_user_wx") + return self +end + +function M:init(url) + BaseWindow.init(self,url) + + local btn_ok = self._view:GetChild("btn_ok") + btn_ok.onClick:Set(function () + ViewUtil.ShowModalWait(self._root_view,"正在同步数据...") + GameApplication.Instance:WXLogin(handler(self,self.WXCallBack)) + end) + +end + +function M:WXCallBack(result,data) + + if (not result) or result ~= 0 then + if result == 10 then + ViewUtil.ShowModalWait(self._root_view) + return + end + ViewUtil.CloseModalWait() + return + end + + if not data then + ViewUtil.CloseModalWait() + return + end + local jd = json.decode(data) + local headurl = jd["headimgurl"] + local unionid = jd["unionid"] + local sex = jd["sex"] + if (sex == 0) then sex = 1 end + local nickname = jd["nickname"] + + if not unionid or string.len(unionid)<1 then + ViewUtil.CloseModalWait() + return + end + local _data = {} + _data.type =6 + _data["acc"] = unionid + _data["nick"] = nickname + _data["sex"] = sex + _data["portrait"] = headurl + local loddyctr = ControllerManager.GetController(LoddyController) + loddyctr:UpdateUserInfo(_data,function( res) + ViewUtil.CloseModalWait() + if (res.ReturnCode ==0) then + local user = DataManager.SelfUser + user.acc = unionid + user.nick_name = nickname + user.sex = sex + user.head_url = headurl + if self._callback then self._callback() end + else + ViewUtil.ErrorTip(res.ReturnCode, "同步失败,请重试") + end + self:Close() + end) +end + + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/LobbyView.lua b/lua_probject/base_project/Game/View/LobbyView.lua new file mode 100644 index 00000000..be59aba4 --- /dev/null +++ b/lua_probject/base_project/Game/View/LobbyView.lua @@ -0,0 +1,497 @@ +--大厅View对象 +--author:-- +local JoinRoomView = import(".Lobby.JoinRoomView") +local LobbySettingView = import(".Lobby.LobbySettingView") +local LobbyShopView = import(".Lobby.LobbyShopView") +local LobbyAuthenticateView = import(".Lobby.LobbyAuthenticateView") +local LobbyMessagesView = import(".Lobby.LobbyMessagesView") +local LobbyRecordView = import(".Lobby.LobbyRecordView") +local LobbyPlayerInfoView = import(".Lobby.LobbyPlayerInfoView") +local CreatePlayView = import(".Family.CreatePlayView") + +local CreateRoomView = import(".Lobby.CreateRoomView") +local RankView = import(".Lobby.RankView") +local GroupMainView = import(".NewGroup.GroupMainView") +local NoticeView = import(".Lobby.NoticeView") +local HeadView = import(".Lobby.LobbyHeadView") +local PhoneBindView = import(".Lobby.PhoneBindView") +local RealAddressView = import(".Lobby.RealAddressView") +local LobbyHeadView = import(".Lobby.LobbyHeadView") + +LobbyView = {} + +local M = {} + +function LobbyView.new() + -- print("new lobbyView!!!!") + setmetatable(M, { __index = BaseView }) + local self = setmetatable({}, { __index = M }) + self.class = "LobbyView" + + UIPackage.AddPackage("base/lobby/ui/Lobby") + self.lobby_pause_time = 0 + self._full = true + self:InitView("ui://Lobby/Main_New") + -- self._close_destroy = false + + return self +end + +function M:InitView(url) + -- print("init lobbyView!!!!") + BaseView.InitView(self, url) + self._full_offset = false + local view = self._view + + local btn_joinroom = self._view:GetChild("btn_join") + btn_joinroom.onClick:Add(handler(self, self.OnJoinRoomAction)) + + local btn_setting = self._view:GetChild("btn_setting") + btn_setting.onClick:Set(handler(self, function() + local settingView = LobbySettingView.new() + settingView:Show() + end)) + + local btn_shop = self._view:GetChild("btn_shop") + btn_shop.onClick:Add(handler(self, function() + local shopView = LobbyShopView.new(function() + ViewUtil.ShowBannerOnScreenCenter("该功能还会开放,敬请期待") + -- self:ShowPlayerInfo(1, DataManager.SelfUser.diamo, 1) + end) + shopView:Show() + end)) + + local btn_authenticate = self._view:GetChild("btn_authenticate") + btn_authenticate.onClick:Add(handler(self, function() + local authenticateView = LobbyAuthenticateView.new() + authenticateView:Show() + end)) + + local btn_notice = self._view:GetChild("btn_notice") + + btn_notice.onClick:Set(function() + local noticeView = LobbyMessagesView.new(self._root_view) + -- noticeView:FillData(DataManager.SelfUser.notices.data) + noticeView:Show() + end) + + local btn_record = self._view:GetChild("btn_record") + btn_record.onClick:Add(handler(self, function() + local lobbyRecordView = LobbyRecordView.new(self, true) + lobbyRecordView:Show() + end)) + btn_record.displayObject.gameObject:SetActive(true) + + local btn_gamePlay = self._view:GetChild("btn_gamePlay") + btn_gamePlay.onClick:Add(function() + ViewUtil.ErrorTip(self._view, "该功能还会开放,敬请期待") + end) + + local btn_more = self._view:GetChild("btn_more") + btn_more.onClick:Add(function() + ViewUtil.ErrorTip(self._view, "该功能还会开放,敬请期待") + end) + + local btn_family = self._view:GetChild("btn_family") + btn_family.onClick:Add(function() + ControllerManager.ChangeController(NewGroupController) + ViewManager.ChangeView(ViewManager.View_Family) + end) + + -- local btn_createRoom = self._view:GetChild("btn_createRoom") + -- btn_createRoom.onClick:Add(function() + -- local createPlayView = CreatePlayView.new() + + -- createPlayView:Show() + -- end) + + local createRoomBtn = self._view:GetChild("btn_createRoom") + createRoomBtn.touchable = true + createRoomBtn.onClick:Set(function() + local _createRoomView = CreateRoomView.new(1) + _createRoomView.onCeateRoom = function() + ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id) + end + _createRoomView:Show() + end) + + local btn_diamo = self._view:GetChild("btn_diamo") + btn_diamo.onClick:Add(function() + ViewUtil.ErrorTip(self._view, string.format("当前房卡一共%s张", DataManager.SelfUser.diamo)) + end) + + local btn_customerService = self._view:GetChild("btn_customerService") + btn_customerService.onClick:Add(function() + ViewUtil.ShowModalWait(self._root_view, "正在跳转微信中......") + coroutine.start(function() + coroutine.wait(3) + ViewUtil.CloseModalWait() + ViewUtil.ShowBannerOnScreenCenter("微信跳转失败") + end) + end) + + local btn_invite = self._view:GetChild("btn_invite") + btn_invite.onClick:Add(function() + ViewUtil.ShowOneChooose("下载地址已复制,请到浏览器粘贴", 1) + end) + + local btn_head = view:GetChild("btn_head") + ImageLoad.Load(DataManager.SelfUser.head_url, btn_head._iconObject) + btn_head.onClick:Set(function() + -- local headView = HeadView.new(DataManager.SelfUser, nil, function() + -- view:GetChild("tex_name").text = DataManager.SelfUser.nick_name + -- ImageLoad.Load(DataManager.SelfUser.head_url, btn_head._iconObject) + -- end) + -- headView:Show() + local lobbyPlayerInfoView = LobbyPlayerInfoView.new(DataManager.SelfUser, function() + ImageLoad.Load(DataManager.SelfUser.head_url, btn_head._iconObject) + end) + lobbyPlayerInfoView:Show() + end) + + + + local btn_teamwork = view:GetChild("btn_teamwork") + btn_teamwork.onClick:Set(function() + -- local headView = HeadView.new(DataManager.SelfUser, nil, function() + -- view:GetChild("tex_name").text = DataManager.SelfUser.nick_name + -- ImageLoad.Load(DataManager.SelfUser.head_url, btn_head._iconObject) + -- end) + -- headView:Show() + local lobbyHeadView = LobbyHeadView.new(DataManager.SelfUser, DataManager.SelfUser.agent, function() + ImageLoad.Load(DataManager.SelfUser.head_url, btn_head._iconObject) + end) + lobbyHeadView:Show() + end) + + view:GetChild("tex_name").text = DataManager.SelfUser.nick_name + view:GetChild("tex_id").text = tostring(DataManager.SelfUser.account_id) + + view:GetChild("btn_diamo"):GetChild("num").text = tostring(DataManager.SelfUser.diamo) + + --btn_joinroom.displayObject.gameObject:SetActive(false) + + --未知 ,原来未启用,未测试 + -- local btn_record = self._view:GetChild("btn_record") + -- --[[ btn_record.onClick:Set(function() + -- local headView = HeadView.new(DataManager.SelfUser,true) + -- headView:Show() + -- end)--]] + -- btn_record.displayObject.gameObject:SetActive(false) + + --录像,原来未启用,未测试 + -- local btn_video = self._view:GetChild("btn_video") + -- --[[btn_video.onClick:Set(function () + -- local _rankView = RankView.new(self,true) + -- _rankView:Show() + -- end)--]] + -- btn_video.displayObject.gameObject:SetActive(false) + + local btn_exit = self._view:GetChild("btn_exit") + btn_exit.onClick:Set(handler(self, function() + local _curren_msg = MsgWindow.new(self._root_view, '确认退出游戏', MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add(function() + Application.Quit() + end) + _curren_msg:Show() + end)) + + --可能是我的好友,未调测 + -- local lst_userBG = self._view:GetChild("n118") + -- lst_userBG.displayObject.gameObject:SetActive(false) + -- local lst_user = self._view:GetChild("lst_user") + -- lst_user.displayObject.gameObject:SetActive(false) + --[[ lst_user.onClickItem:Set(function (context) + if context.data.name == "real" then + local real_view = RealAddressView.new(0) + real_view:Show() + elseif context.data.name == "address" then + local real_view = RealAddressView.new(1) + real_view:Show() + elseif context.data.name == "phone" then + local phone_view = PhoneBindView.new() + phone_view:Show() + end + end)--]] + -- self:__ShowShare() + + -- btn_notice.displayObject.gameObject:SetActive(false) + + --可能未游戏服务客服,未调测 + -- local btn_service = self._view:GetChild("btn_service") + --[[btn_service.onClick:Set(function() + self:__show_service() + end)--]] + -- btn_service.displayObject.gameObject:SetActive(false) + + --联盟,未调测,原可以使用 + -- self.groupMainView = GroupMainView.new(self._view:GetChild("group"),self._root_view,self._view) + --self.groupMainView:Show() + + -- local btn_more_group = self._view:GetChild("btn_more_group") + -- btn_more_group.onClick:Set(function() + -- --self.groupMainView._view.visible = true + -- ViewUtil.ShowModalWait(self._root_view,"请稍等,获取牌友圈中...") + -- local enterGroupCallBackFunc=function (code) + -- ViewUtil.CloseModalWait() + -- if code==0 then + -- self.groupMainView._view.visible = true + -- else + -- ViewUtil.ErrorTip(10000000,"获取牌友圈失败,请检查网络设置!") + -- printlog("获取圈子数据失败=======>>>>") + -- end + -- end + -- self.groupMainView:Show(nil,enterGroupCallBackFunc) + -- end) + + --================================================ + + + ---[[ + -- self.btn_joingroup.onClick:Set(function() + -- local groups = DataManager.groups.groupList + -- if #groups == 0 then + -- local jgv = JoinGroupView.new(self._root_view) + -- jgv:Show() + -- else + -- local info = GroupInfoView.new(groups[1], self.fg_info) + -- self._groupInfoView = info + -- info:SetCallBack(function() + -- self._groupInfoView = nil + -- self:Show() + -- self._view.visible = true + -- end) + -- info:Show() + -- self._view.visible = false + -- end + -- if not DataManager.SelfUser.phone then + -- --local phone_view = PhoneBindView.new() + -- --phone_view:Show() + -- -- return + -- end + -- end) + -- self.btn_joingroup.touchable = true + --]] + + --游戏列表,原有界面,未调测 + -- local lst_game = self._view:GetChild("lst_game") + -- lst_game.displayObject.gameObject:SetActive(false) + --[[local games = DataManager.SelfUser.games + for i = 1, math.min( 4,#games ) do + local tem = games[i] + local item = lst_game:AddItemFromPool() + item.text = tem.name + local config = ExtendManager.GetExtendConfig(tem.game_id) + config.game_data = tem + local mode = config:GetGameInfo() + item.icon = mode:GetIconUrl() + item.onClick:Set(function () + local _createRoomView = CreateRoomView.new(i) + _createRoomView.onCeateRoom = function () + ViewManager.ChangeView(ViewManager.View_Main,DataManager.CurrenRoom.game_id) + end + _createRoomView:Show() + end) + end--]] + + local message = self._view:GetChild("c_message") + --message.visible = true + self._message = message:GetChild("message") + self._tex_message = message:GetChild("text") + self:__GetMessage() +end + +function M:OnJoinRoomAction(context) + local joinRoomView = JoinRoomView.new(self._root_view) + joinRoomView:Show() +end + +function M:__show_service() + local _buy_win = BaseWindow.new("ui://Lobby/Win_service", self._root_view) + _buy_win._close_destroy = true + _buy_win:Show() + local sview = _buy_win._view + local btn_copy = sview:GetChild("btn_copy") + btn_copy.onClick:Set(function() + GameApplication.Instance:CopyToClipboard("xbkf888108") --湘北 + -- GameApplication.Instance:CopyToClipboard("ttwmq008")--fb + _buy_win:Destroy() + end) +end + +function M:__GetMessage(data) + -- print("on GetMessage~~~~~~~~~~~~~~~~~~~~~~~~~~~") + if not data or not data.notice_list then + self._mesList = "" + else + local message = self._view:GetChild("com_message") + message.visible = true + local mesl = {} + for i = 1, #data.notice_list do + mesl[i] = data.notice_list[i].informContent + end + self._mesList = mesl + end + + self:__moveMsg(0) +end + +function M:__PopMsg(index) + local num = #self._mesList + index = index + 1 + if index > num then index = 1 end + local str = tostring(self._mesList[index]) + if str == nil or str == "nil" then str = "" end + return index, string.gsub(str, "\r", "") +end + +function M:__moveMsg(index) + -- print("on moveMsg!!!!!!!!!!!!!!!!!!!!!!!!!") + if not self._tex_message then return end + index, self._tex_message.text = self:__PopMsg(index) + self._tex_message.x = self._message.width + + if self._mesTw then + TweenUtils.Kill(self._mesTw) + end + local change = -self._message.width * 2 + local dd = self._tex_message.width / self._message.width + if dd < 1 then dd = 1 end + self._mesTw = TweenUtils.TweenFloat(0, 1 * dd, 10 * dd, function(value) + self._tex_message.x = self._message.width + (change * value) + end) + TweenUtils.OnComplete(self._mesTw, function() + self._mesTw = nil + if (#self._mesList == 0) then + self:__GetMessage() + else + self:__PopMsg(index) + self:__moveMsg(index) + end + end) +end + +function M:__ShowShare() + local pop_share = self._view:GetChild("pop_share") + local shareUrl = GetGameInfo("invite_link") .. "?uid=" .. DataManager.SelfUser.account_id + --print("shareUrl=================") + --print(shareUrl) + local btn_wx_session = pop_share:GetChild("btn_wx_session") + btn_wx_session.onClick:Add(function() + shareQRCodePicture(shareUrl, 0) + end) + local btn_wx_line = pop_share:GetChild("btn_wx_line").asButton + btn_wx_line.onClick:Add(function() + shareQRCodePicture(shareUrl, 1) + end) +end + +function M:OnUpdate() + local roomid = GameApplication.Instance:GetRoomID() + if roomid and string.len(roomid) > 1 then + ControllerManager.WebClient:clearActionQueue() + local joinRoomView = JoinRoomView.new(self._root_view) + joinRoomView:JoinRoom(roomid) + end +end + +function M:Close() + BaseView.Close(self) + UpdateBeat:Remove(self.OnUpdate, self) + coroutine.stopAll() + if self._mesTw then + TweenUtils.Kill(self._mesTw) + end + BaseWindow.DestroyAll() + DSTweenManager.ClearTween() +end + +function M:Destroy() + UpdateBeat:Remove(self.OnUpdate, self) + if self._mesTw then + TweenUtils.Kill(self._mesTw) + end + self._tex_message = nil + coroutine.stopAll() + BaseView.Destroy(self) + BaseWindow.DestroyAll() + DSTweenManager.ClearTween() +end + +function M:Show() + --print("on lobbyView show~~~~~~") + BaseView.Show(self) + ViewUtil.PlaySoundBg() + UpdateBeat:Add(self.OnUpdate, self) + + -- 如果在圈子内的房间,显示tip + local user = DataManager.SelfUser + local tem = user.notices + if user.group_id ~= 0 then + local msg_tip = MsgWindow.new(self._root_view, "还在圈子的房间中,现在重连吗?", MsgWindow.MsgMode.OkAndCancel) + msg_tip.onOk:Add(function() + if self.groupMainView ~= nil then + self.groupMainView:Show(user.group_id) + end + end) + msg_tip:Show() + tem.auto_show = false + else + local lobbyCtr1 = ControllerManager.GetController(LoddyController) + lobbyCtr1:UpdateNotice(DataManager.SelfUser.account_id, function(result, data) + -- local data1 = {} + -- data1.notice_list = {} + -- data1.notice_list[1] = "ccccccccccccccccccccccccccc" + if result then + self:__GetMessage(data) + end + end) + end + + local loddyCtr1 = ControllerManager.GetController(LoddyController) + self:GetPlayerInfoData() + + -- 获取GPS坐标 + if not DataManager.SelfUser.location or DataManager.SelfUser.location:Location2String() == "" then + get_gps() + end + + if self.groupMainView and self.groupMainView._groupInfoView then + self.groupMainView._groupInfoView:hidePipei() + end +end + +function M:GetPlayerInfoData() + local loddyCtr1 = ControllerManager.GetController(LoddyController) + loddyCtr1:UpdatePlayerInfo(function(result, data) + if result then + self:ShowPlayerInfo(data.raffle, data.diamo, data.newMail) + end + end) +end + +function M:ShowPlayerInfo(raffle, diamo, newMail) + self._view:GetChild("btn_diamo"):GetChild("num").text = diamo or 0 +end + +function M:OnApplicationPause() + ControllerManager.WebClient:clearActionQueue() + -- 切后台时间 + if DataManager.SelfUser.cur_group then + self.lobby_pause_time = os.time() + DataManager.SelfUser.cur_group.pause = true + end +end + +function M:OnApplicationActive() + ControllerManager.WebClient:clearActionQueue() + self:GetPlayerInfoData() + -- 切后台太久牌友圈重连 + if DataManager.SelfUser.cur_group then + DataManager.SelfUser.cur_group.pause = false + if os.time() - self.lobby_pause_time > 15 then + self.lobby_pause_time = os.time() + DataManager.SelfUser.cur_group:Reconnect() + end + end +end diff --git a/lua_probject/base_project/Game/View/LoginView.lua b/lua_probject/base_project/Game/View/LoginView.lua new file mode 100644 index 00000000..bac293ff --- /dev/null +++ b/lua_probject/base_project/Game/View/LoginView.lua @@ -0,0 +1,279 @@ +local PhoneLoginView = import(".PhoneLoginView") +LoginView = {} + + +local M = {} + +--- Create a new LoginView +function LoginView.new() + setmetatable(M, { __index = BaseView }) + local self = setmetatable({}, { __index = M }) + self.class = "LoginView" + self._full = true + self:init() + return self +end + +--- +--@function [parent=#LoginView] init +--@param self +function M:init() + UIPackage.AddPackage("base/login/ui/Login") + + --UIPackage.AddPackage("UI/Card") + ViewUtil.PlaySoundBg() + self:InitView("ui://Login/Main") + + local view = self._view + -- view:GetChild("tex_version").text = "Version:" .. GetGameInfoPlatform("version") + -- print(GameApplication.Instance.accountTest and 1 or 0) + view:GetController("test").selectedIndex = GameApplication.Instance.accountTest and 1 or 0 + self.agree = view:GetController("agree"); + -- Utils.LoadBg("loginbg", view) + if GameApplication.Instance.accountTest then + local json_data = Utils.LoadLocalFile("userId") + if json_data then + local _data = json.decode(json_data) + view:GetChild("tex_unionid").text = _data.userId + end + end + + local _btn_login = view:GetChild("btn_wx") + + _btn_login.onClick:Add(function() + if self.agree.selectedIndex == 0 then + ViewUtil.ErrorTip(self._root_view, "请勾选同意《用户协议》") + return + end + ViewUtil.ShowModalWait(self._root_view, "正在登录游戏...") + coroutine.start(function() + coroutine.wait(8) + if self.isWXCallBackMark then + return + end + ViewUtil.CloseModalWait() + ViewUtil.ErrorTip(10000, "微信登录失败!") + end) + if (not GameApplication.Instance.accountTest) then + GameApplication.Instance:WXLogin(handler(self, self.LoginCallBack)) + else + --local ctr_user = view:GetController("user") + + local _tex_unionid = view:GetChild("tex_unionid") + + local utez = _tex_unionid.text --.. (ctr_user.selectedIndex + 1) + + local _data = {} + _data["userId"] = utez + local key = "userId" + local s, e = pcall(function() + Utils.SaveLocalFile(key, json.encode(_data)) + end) + if not s then + print("Error:" .. e) + end + + DataManager.SelfUser.acc = utez + DataManager.SelfUser.nick_name = utez + DataManager.SelfUser.sex = 1 + DataManager.SelfUser.head_url = "" + self:LoginCallBack(0) + end + end) + + --按钮取消,功能暂时不用 + -- local btn_passwrod = view:GetChild("btn_passwrod") + -- btn_passwrod.onClick:Set(function() + -- self:PhoneLogin() + -- end) + + local btn_phone_code = view:GetChild("btn_phone_code") + btn_phone_code.onClick:Set(function() + if self.agree.selectedIndex == 0 then + ViewUtil.ErrorTip(self._root_view, "请勾选同意《用户协议》") + return + end + self:PhoneCodeLogin() + end) +end + +function M:Destroy() + if self._agreement then + self._agreement:Destroy() + end + BaseView.Destroy(self) +end + +function M:Show() + BaseView.Show(self) + -- self:QuickLogin() +end + +local function __goto_lobby(response) + if response.Data then + local notices = response.Data.notice_list + if notices and #notices > 0 then + local tem = {} + tem.data = notices + tem.auto_show = true + DataManager.SelfUser.notices = tem + end + end + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) +end + +local function __join_room(roomid, res) + local loddyctr = ControllerManager.GetController(LoddyController) + loddyctr:JoinRoom(roomid, function(res1) + ViewUtil.CloseModalWait() + if res1.ReturnCode == -2 then + __join_room(roomid, res) + elseif res1.ReturnCode == 0 then + ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id) + elseif res1.ReturnCode == 101 or res1.ReturnCode == 6 then + __goto_lobby(res) + else + ViewUtil.ErrorTip(res1.ReturnCode, "登录失败!") + end + end) +end + +local function __login_response(self, response) + ViewUtil.CloseModalWait() + local skey = "session_id" + if (response.ReturnCode == 0) then + local user = DataManager.SelfUser + -- if (user.guild) then + ExtendManager.Destroy() + + local function f_enterLobby(...) + -- body + local _client = ControllerManager.WebClient + + PlayerPrefs.SetString(skey, _client:getSession()) + PlayerPrefs.Save() + + ExtendManager.Init(user.games) + + local roomid = user.room_id + if (string.len(roomid) > 1) then + if user.group_id == 0 then + ViewUtil.ShowModalWait(self._root_view, "正在加入房间...") + __join_room(roomid, response) + return + end + end + __goto_lobby(response) + end + + + if user.update ~= 0 then + ExtendHotupdate.UpdateGameList(user.games, f_enterLobby) + else + f_enterLobby() + end + else + if (response.ReturnCode == Table_Error_code.ERR_SERVER or response.ReturnCode == Table_Error_code.ERR_LOGOUT) then + PlayerPrefs.DeleteKey(skey) + PlayerPrefs.Save() + end + ViewUtil.ErrorTip(response.ReturnCode, "登录失败!") + end +end + +function M:PhoneLogin() + local _phoneView = nil + _phoneView = PhoneLoginView.new(0, function(res) + if res.ReturnCode == 0 then + _phoneView:Destroy() + end + __login_response(self, res) + end) + _phoneView:Show() +end + +function M:PhoneCodeLogin() + local _phoneCodeView = nil + _phoneCodeView = PhoneLoginView.new(1, function(res) + if res.ReturnCode == 0 then + _phoneCodeView:Destroy() + end + __login_response(self, res) + end) + _phoneCodeView.agree = self.agree; + _phoneCodeView:Show() +end + +function M:IDLogin() + local _idView = nil + _idView = IDLoginView.new(function(res) + if res.ReturnCode == 0 then + _idView:Destroy() + end + __login_response(self, res) + end) + _idView:Show() +end + +function M:QuickLogin() + if (not GameApplication.Instance.accountTest) then + local session_id = PlayerPrefs.GetString("session_id") + print("session_id:" .. session_id) + if session_id and string.len(session_id) > 3 then + ViewUtil.ShowModalWait(self._root_view, "正在登录游戏...") + local loginCtr = ControllerManager.GetController(LoginController) + loginCtr:QuickLogin(session_id, function(response) + __login_response(self, response) + end) + end + end +end + +function M:LoginCallBack(result, data) + self.isWXCallBackMark = true + --print("微信登录返回================================================================") + --print("result===>"..result) + --pt(data) + if (not result) or result ~= 0 then + if result == 10 then + ViewUtil.ShowModalWait(self._root_view) + return + end + ViewUtil.CloseModalWait() + return + end + + if data then + local jd = json.decode(data) + pt(jd) + local headurl = jd["headimgurl"] + local unionid = jd["unionid"] + local sex = jd["sex"] + if (sex == 0) then sex = 1 end + local nickname = jd["nickname"] + + DataManager.SelfUser.acc = unionid + DataManager.SelfUser.nick_name = nickname + DataManager.SelfUser.sex = sex + DataManager.SelfUser.head_url = headurl + if not DataManager.SelfUser.acc or string.len(DataManager.SelfUser.acc) < 1 then + ViewUtil.CloseModalWait() + return + end + end + + + + local loginCtr = ControllerManager.GetController(LoginController) + loginCtr:Login(function(response) + __login_response(self, response) + end) +end + +function M:Destroy() + BaseView.Destroy(self) + -- UIPackage.RemovePackage("base/embed/ui/Hotupdate") + UIPackage.RemovePackage("base/login/ui/Login") + -- ResourcesManager.UnLoad("base/ui/Login.bytes") +end diff --git a/lua_probject/base_project/Game/View/MainRightPanelView.lua b/lua_probject/base_project/Game/View/MainRightPanelView.lua new file mode 100644 index 00000000..b94bf18e --- /dev/null +++ b/lua_probject/base_project/Game/View/MainRightPanelView.lua @@ -0,0 +1,127 @@ +local MainRightPanelView = { + -- 查看记录 + onLogCallback = nil +} + +local M = MainRightPanelView + +local function __init(self, mainView, view) + + local right_panel = view + + local btn_setting = right_panel:GetChild('btn_setting') + btn_setting.onClick:Set( + function() + local _settingView = mainView:NewSettingView() + _settingView.stateIndex = (mainView._room.curren_round >= 1 and mainView._allow_dissmiss) and 2 or 1 + _settingView.cd_time = mainView.dismiss_room_cd_time + _settingView:Show() + + local room = DataManager.CurrenRoom + _settingView.onCallback:Add( + function(context) + local _gamectr = ControllerManager.GetController(GameController) + if (room.CurnrenState == StateType.Ready) then + _gamectr:LevelRoom( + function(response) + if (response.ReturnCode == 0) then + ViewManager.ChangeView(ViewManager.View_Lobby) + GameApplication.Instance:ShowTips('房间已解散!') + end + end + ) + else + _gamectr:AskDismissRoom() + end + end + ) + end + ) + + self._tex_data = right_panel:GetChild('tex_data') + self._tex_time = right_panel:GetChild('tex_time') + self._pb_batteryLevel = right_panel:GetChild('pb_batteryLevel') + self._xinhao = right_panel:GetController('xinhao') + self.ctr_xh = right_panel:GetChild('gcm_xinhao'):GetController('c1') + self.ctr_wifi = right_panel:GetChild('gcm_wifi'):GetController('c1') + self._tex_ping = right_panel:GetChild('gcm_xinhao'):GetChild('n7') + + self.ctr_log = right_panel:GetController('log') + local btn_log = right_panel:GetChild('btn_log') + btn_log.onClick:Set( + function() + if self.onLogCallback then + self.onLogCallback() + end + end + ) + self._total_time = 0 + self:__UpdateTime() + + -- self._timer = Timer.New(handler(self,self.__UpdateTime),10,-1,true) + -- self._timer:Start() +end + +--- Create a new MainRightPanelView +function MainRightPanelView.new(mainView, view) + local self = setmetatable({}, {__index = M}) + self.class = 'MainRightPanelView' + -- 显示选项,1是正常,2的ping没有括号 + self._opt = 1 + __init(self, mainView, view) + return self +end + +function M:__UpdateTime() + if self._total_time >= 10 then + self._total_time = 0 + else + return + end + self:_ShowTime() +end + +function M:_ShowTime() + self._tex_data.text = os.date('%Y-%m-%d') + self._tex_time.text = os.date('%H:%M') + if Application.platform == RuntimePlatform.IPhonePlayer or Application.platform == RuntimePlatform.Android then + self._pb_batteryLevel.value = GameApplication.Instance:GetBatteryLevel() + end + + local NetworkReachability = UnityEngine.NetworkReachability + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + local ping = _client:getAveragePingTime() + if not ping then + return + end + ping = math.floor(ping / 2) + if ping > 300 then + ping = 300 + end + if ping <= 100 then + self.ctr_xh.selectedIndex = 0 + elseif ping <= 300 then + self.ctr_xh.selectedIndex = 1 + else + self.ctr_xh.selectedIndex = 2 + end + local str_ping = '(' .. ping .. 'ms)' + if self._opt == 2 then + str_ping = ping .. 'ms' + end + self._tex_ping.text = str_ping +end +-- +function M:OnUpdate(deltaTime) + self:__UpdateTime() + self._total_time = self._total_time + deltaTime +end + +function M:Destroy() + -- self._timer:Stop() +end + +return M diff --git a/lua_probject/base_project/Game/View/MainView.lua b/lua_probject/base_project/Game/View/MainView.lua new file mode 100644 index 00000000..8c5cf628 --- /dev/null +++ b/lua_probject/base_project/Game/View/MainView.lua @@ -0,0 +1,1152 @@ +local MainRightPanelView = import('.MainRightPanelView') +local PlayerInfoView = import('.PlayerInfoView') +local ChatView = import('.ChatView') +local DismissRoomWindow = import('.DismissRoomWindow') +local SettingView = import('.SettingView') +local PlayerDistanceView = import('.PlayerDistanceView') +local FGAssistView = import('.FGAssistView') + +-- MainView +MainView = {} + +-- 继承 BaseView +setmetatable(MainView, {__index = BaseView}) + +local M = MainView + +-- 语音是否禁止 +local record_baned = 0 + +function M:init() + TimerManager.Clear() + self._gamectr = ControllerManager.GetController(GameController) + self._room = DataManager.CurrenRoom + self._allow_dissmiss = true -- 游戏开始后显示解散房间按钮 + self._multilingual = false -- 游戏支持多语言切换 + self._language = 0 -- 语言默认0,1可以设为需要的方言 + self._style = 1 -- 游戏风格 + self._hide_assist = false -- 是否隐藏牌友圈助手 + self._gps_style = 1 + self.dismiss_cd = 0 + UIPackage.AddPackage('base/chat/ui/Chat') + self.Fix_Msg_Chat = ViewUtil.Fix_Msg_Chat -- 自动回复消息列表 + self.Fix_Msg_Chat2 = nil -- 自动回复列表2 + self:InitView() + self:SetTuoGuanState() +end + +function M:SetTuoGuanState() + --printlog("初始化设置托管状态") + if ControllerManager.enterPlayerData and #ControllerManager.enterPlayerData>0 then + --pt(ControllerManager.enterPlayerData) + for i=1,#ControllerManager.enterPlayerData do + local p =self._player_info[self:GetPos(ControllerManager.enterPlayerData[i].seat)] + --p.seat=ControllerManager.enterPlayerData[i].seat + local t=ControllerManager.enterPlayerData[i].entrust_time + --local isShow=ControllerManager.enterPlayerData[i].entrust + --if isShow==nil then return end + + if t and t>0 then + p:IsShowTGTips(true,t) + else + + end + + end + ControllerManager.enterPlayerData=nil + end +end + +function M:InitView(url, isHideIpAdds) + --print("url===>>>") + --print(url) + --print(debug.traceback()) + BaseView.InitView(self, url) + -- + + --[[ 多语言切换(适用于设置界面使用Main_Majiang中SettingView2的游戏) + 在EXMainView中进行以下操作 + 1.在调用 MainView.InitView()前设置self._multilingual = true + 2.(没重写M:NewSettingView()就无视这条) + 2.1在NewSettingView方法中,创建SettingView对象时第二个参数传true,SettingView.new(self._root_view, true) + 2.2加上切换语言回调 settingView.onChangeLanguageCallback:Add(function(languauge) self._language = languauge end) + 3.在扩展EXMainView中直接使用self._language判断语言,根据需要重写PlaySound和PlayChatSound + ]] + if self._multilingual then + self:SetLanguage(PlayerPrefs.GetInt('Languauge' .. DataManager.CurrenRoom.game_id)) + end + + self._gcm_chat = self._view:GetChild('gcm_chat') + if self._gcm_chat then + if self._room.ban_chat2 then + self._gcm_chat:GetController('sdk').selectedIndex = 1 + self._gcm_chat.visible = false + end + if self._room.room_config and self._room.room_config.isHidden and self._room.room_config.isHidden == 1 then + self._gcm_chat.visible = false + end + end + + local _view = self._view + local _room = self._room + self._state = _view:GetController('state') + self._ctr_action = _view:GetController("action") + + self:InitPlayerInfoView(isHideIpAdds) + + -- 风格1是屏幕上方左右两个组件显示信息 + if self._style == 1 then + -- 风格2,屏幕上方一个组件显示信息,所有按钮放在一个单独的下拉菜单中 + local rightpanel = self._view:GetChild('right_panel') + if rightpanel then + self._rightPanelView = MainRightPanelView.new(self, rightpanel) + if self._rightPanelView then + self._rightPanelView:_ShowTime() + end + end + local roominfo_panel = _view:GetChild('roominfo_panel') + self:FillRoomConfig(roominfo_panel, _room) + local roominfo_panel1 = _view:GetChild('roominfo_panel1') + self:FillRoomConfig(roominfo_panel1, _room) + + -- 显示玩家距离 + self.btn_distance = self._view:GetChild('btn_distance') + --self.btn_distance.displayObject.gameObject:SetActive(false) + if self.btn_distance then + self.btn_distance.onClick:Add(function() + if self._room.self_player.seat == 0 then + return + end + self.distance_view = PlayerDistanceView.new(false, self._gps_style, function(v) + self:continue_game(v) + end) + self.distance_view._view:GetController("state").selectedIndex = self._state.selectedIndex > 0 and self._state.selectedIndex < 3 and 1 or 0 + self.distance_view:Show() + end) + end + + local btn_rule = self._view:GetChild('btn_rule') + if btn_rule ~= nil then + btn_rule.onClick:Set(function() + if self.RuleView == nil or self.RuleView._is_destroy then + self.RuleView = RoomInfoView.new(self._room) + end + self.RuleView:Show() + end) + end + + if _view:GetChild('tex_version') ~= nil then + _view:GetChild('tex_version').text = 'v' .. ExtendManager.GetGameData(_room.game_id).version + end + elseif self._style == 2 then + local com_roominfo = self._view:GetChild('com_roominfo') + com_roominfo:GetChild('tex_roomid').text = _room.room_id + local times = _room.score_times + local str_des = _room.room_config:GetGameName() + if times ~= 1 then + str_des = string.format('%s %s倍', str_des, times) + end + str_des = string.format('%s %s', str_des, _room.room_config:GetDes()) + com_roominfo:GetChild('tex_detail').text = str_des + local tex_time = com_roominfo:GetChild('tex_time') + self._co_timer =coroutine.start(function() + while true do + tex_time.text = os.date('%m-%d %H:%M') + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + local ping = _client:getAveragePingTime() + if not ping then + return + end + local ctr_xh = com_roominfo:GetChild('gcm_xinhao'):GetController('c1') + ping = math.floor(ping / 2) + if ping > 300 then + ping = 300 + end + if ping <= 100 then + ctr_xh.selectedIndex = 0 + elseif ping <= 300 then + ctr_xh.selectedIndex = 1 + else + ctr_xh.selectedIndex = 2 + end + coroutine.wait(10) + end + end) + end + + local list = _room.player_list + for i = 1, #list do + local p = list[i] + if (p.seat ~= 0) then + local info = self._player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + end + end + + -- 语音Stard + local gcm_chat = _view:GetChild('gcm_chat') + --gcm_chat.displayObject.gameObject:SetActive(false) + if gcm_chat then + gcm_chat.visible = false + local _btn_chat = gcm_chat:GetChild('n1') + _btn_chat.onClick:Add(function() + if self.chat_view == nil then + self.chat_view = ChatView.new(self) + end + if self._room.ban_chat1 then + if self.chat_view.HideInputField then + self.chat_view:HideInputField() + end + end + self.chat_view:Show() + end) + + self._ctr_voice = gcm_chat:GetController('voice') + + self._btn_record = gcm_chat:GetChild('btn_record') + self._btn_record.displayObject.gameObject:SetActive(false) + self.ctr_record_ban = self._btn_record:GetController('ban') + self.ctr_record_ban.selectedIndex = record_baned + self._record_time = 0 + --[[self._btn_record.onTouchBegin:Set(function() + if record_baned == 1 then + self:__SetRecordEnable() + else + self._record_time = 0 + GameApplication.Instance.StopMusic = GameApplication.Instance.StopMusic + 1 + self._btn_record.onTouchEnd:Set(self.__RecordTouchEnd, self) + Voice.BeginRecord() + self._ctr_voice.selectedIndex = 1 + self.__runwait_record = nil + self.__runwait_record = coroutine.start(self.__WaitRecord, self) + end + end)--]] + end + + local btn_ready = _view:GetChild('btn_ready') + btn_ready.onClick:Set(function() + self._gamectr:PlayerReady() + end) + + local btn_xipai = _view:GetChild('btn_xipai') + if btn_xipai then + btn_xipai.onClick:Set(function() + self._gamectr:PlayerXiPai() + end) + end + + + local btn_start = _view:GetChild('btn_start') + btn_start.onClick:Set(function() + self._gamectr:StartGame() + end) + + local _btn_wxyqhy = _view:GetChild('btn_wxyqhy') + if _btn_wxyqhy then + _btn_wxyqhy.visible = false + end + + self:EventInit() + self._popEvent = true + self._left_time = 0 + self.dismiss_room_cd_time = 0 + local btn_back_exit = _view:GetChild('btn_back_exit') + --btn_back_exit.displayObject.gameObject:SetActive(false) + if btn_back_exit ~= nil then + btn_back_exit.onClick:Set( + function() + local tip_owner = '您是否退出房间?\n(退出房间后房间将解散)' + local tip = '您是否退出房间?' + local tipStr = '' + if self._room.agent then + tipStr = '您是否退出房间?' + else + tipStr = self._room.owner_id == self._room.self_player.self_user.account_id and tip_owner or tip + end + local _curren_msg = MsgWindow.new(self._root_view, tipStr, MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add( + function() + if self._state.selectedIndex > 0 and self._state.selectedIndex < 3 then + ViewUtil.ErrorTip(nil, '房间已开始,无法退出游戏。') + else + ViewUtil.ShowModalWait(self._root_view) + self._gamectr:LevelRoom( + function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode == 0 then + ViewManager.ChangeView(ViewManager.View_Lobby) + else + ViewUtil.ErrorTip(res.ReturnCode) + end + end + ) + end + end + ) + _curren_msg:Show() + end + ) + end + local btn_back_lobby = _view:GetChild('btn_back_lobby') + if btn_back_lobby ~= nil then + btn_back_lobby.onClick:Set( + function() + local tip_owner = '您是否退出房间?\n(退出房间后房间将解散)' + local tip = '您是否退出房间?' -- \n (请注意,申请洗牌后退出,不会返还洗牌分) + local tipStr = '' + if self._room.agent then + tipStr = '您是否退出房间?' + else + tipStr = self._room.owner_id == self._room.self_player.self_user.account_id and tip_owner or tip + end + local _curren_msg = MsgWindow.new(self._root_view, tipStr, MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add( + function() + if self._state.selectedIndex > 0 and self._state.selectedIndex < 3 then + ViewUtil.ErrorTip(nil, '房间已开始,无法退出游戏。') + else + ViewUtil.ShowModalWait(self._root_view) + self._gamectr:LevelRoom( + function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode == 0 then + ViewManager.ChangeView(ViewManager.View_Lobby) + else + ViewUtil.ErrorTip(res.ReturnCode) + end + end + ) + end + end + ) + _curren_msg:Show() + end + ) + end + --[[local btn_back_lobby = _view:GetChild('btn_back_lobby') + btn_back_lobby.displayObject.gameObject:SetActive(false) + if btn_back_lobby ~= nil then + btn_back_lobby.onClick:Set( + function() + if self._state.selectedIndex > 0 and self._state.selectedIndex < 3 then + ViewUtil.ErrorTip(nil, '房间已开始,无法退出游戏。') + else + self._gamectr.tmpRoomID = self._room.room_id + self._gamectr.tmpGroupID = self._room.group_id + ViewManager.ChangeView(ViewManager.View_Lobby) + end + end + ) + end--]] + + UpdateBeat:Add(self.OnUpdate, self) + if self._room.room_config.people_num <= 4 and self._room.room_config.people_num >= 3 and self._gamectr:CheckGPS() then + self._show_distance = true + end + + -- 显示牌友圈助手 + if self._room.group_id ~= 0 and not self._hide_assist then + + local bShow = true + local l_groups = DataManager.groups + local group = l_groups:get(self._room.group_id) + if group ~= nil then + local option = group.option or 0 + if bit:_and(option,8) > 0 then + bShow = false + end + end + if bShow then + --self:ShowFGAssist() + end + + end + if self._room.self_player.entrust then + self:MarkSelfTuoguan() + end + + + --[[local gameCommonBtn = UIPackage.CreateObjectFromURL('ui://Common/gameCommonPanel') + if gameCommonBtn then + self._view:AddChild(gameCommonBtn) + local shuaxingameBtn=gameCommonBtn:GetChild("shuaxinbtn") + if shuaxingameBtn then + shuaxingameBtn.onClick:Set( + function () + ViewManager.refreshGameView() + end + ) + end + end--]] + + + + + +end + +function M:continue_game(continue) + if continue then + self.distance_view:Destroy() + else + local tip_owner = '您是否退出房间?\n(退出房间后房间将解散)' + local tip = '您是否退出房间?' + local tipStr = '' + if self._room.agent then + tipStr = '您是否返回大厅?' + else + tipStr = self._room.owner_id == self._room.self_player.self_user.account_id and tip_owner or tip + end + local _curren_msg = MsgWindow.new(self._root_view, tipStr, MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add( + function() + if self._state.selectedIndex > 0 and self._state.selectedIndex < 3 then + ViewUtil.ErrorTip(nil, '房间已开始,无法退出游戏。') + else + ViewUtil.ShowModalWait(self._root_view) + self._gamectr:LevelRoom( + function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode == 0 then + ViewManager.ChangeView(ViewManager.View_Lobby) + else + ViewUtil.ErrorTip(res.ReturnCode) + end + end + ) + end + end + ) + _curren_msg:Show() + end +end + +-- 公用的playerinfoview方法,如果扩展有改动可以重写 +function M:InitPlayerInfoView(isHideIpAdds) + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild('player_info' .. i) + _player_info[i] = PlayerInfoView.new(tem, self, isHideIpAdds) + tem.visible = false + end +end + +-- 显示牌友圈助手 +function M:ShowFGAssist() + UIPackage.AddPackage('base/newgroup/ui/FGAssist') + local btn_assist = UIPackage.CreateObjectFromURL('ui://FGAssist/btn_assist') + self.btn_assist = btn_assist + self._view:AddChild(btn_assist) + local panel_assist = + FGAssistView.new( + self._root_view, + function() + btn_assist.touchable = true + end + ) + if self._full then + btn_assist.x = 40 + else + btn_assist.x = (GRoot.inst.width - 1334) * -0.5 + 40 + + end + btn_assist.y = panel_assist._root_view.height / 3 - 0.5 * btn_assist.height + + btn_assist.onClick:Set( + function() + panel_assist:ReloadView() + panel_assist:Show() + btn_assist.touchable = false + end + ) + self.panel_assist = panel_assist + self._state.onChanged:Set( + function() + btn_assist.visible = self._state.selectedIndex == 0 + if self._state.selectedIndex == 1 then + if panel_assist then + panel_assist:Close() + end + end + end + ) +end + +-- 设置助手按钮的位置 +function M:SetBtnAssistPos(x, y) + if not self.btn_assist then + return + end + if self._full then + self.btn_assist.x = x + else + self.btn_assist.x = (GRoot.inst.width - 1334) * -0.5 + x + end + self.btn_assist.y = y +end + +function M:NewSettingView() + local settingView = SettingView.new(self._root_view) + settingView:FillBgSection( + function(url) + LoadGameBg(url, self._root_view) + end, + self._room.game_id, + 5 + ) + return settingView +end + +function M:__RecordTouchEnd() + if (self.__runwait_record ~= nil) then + coroutine.stop(self.__runwait_record) + end + if self._record_time < 0.3 then + self:__SetRecordEnable() + end + self.__runwait_record = nil + self._ctr_voice.selectedIndex = 0 + GameApplication.Instance.StopMusic = GameApplication.Instance.StopMusic - 1 + self._btn_record.onTouchEnd:Remove(self.__RecordTouchEnd, self) + local room = self._room + Voice.EndRecord( + room.room_id, + DataManager.SelfUser.account_id, + function(filename) + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendInteraction(DataManager.SelfUser.account_id, 3, filename) + end + ) +end + +function M:__WaitRecord() + coroutine.wait(20) + self:__RecordTouchEnd() +end + +function M:__SetRecordEnable() + record_baned = 1 - record_baned + self.ctr_record_ban.selectedIndex = record_baned +end + +function M:FillRoomConfig(roominfo_panel, _room) + if roominfo_panel ~= nil then + local tex_roomid = roominfo_panel:GetChild('tex_roomid') + tex_roomid.text = _room.room_id + if _room.room_config.isHidden and _room.room_config.isHidden == 1 then + --tex_roomid.text = "000000" + end + local tex_gametype = roominfo_panel:GetChild('tex_gametype') + if (tex_gametype ~= nil) then + tex_gametype.text = _room.room_config:GetGameName() + end + local tex_roomconfig = roominfo_panel:GetChild('tex_roomconfig') + if (tex_roomconfig ~= nil) then + tex_roomconfig.text = _room.room_config:GetDes() + end + local tex_times = roominfo_panel:GetChild('tex_times') + if DataManager.CurrenRoom.hpOnOff == 1 and DataManager.CurrenRoom.score_times ~= 1 then + if tex_times then + tex_times.text = DataManager.CurrenRoom.score_times .. '倍' + end + end + end +end + +function M:EventInit() + local _gamectr = self._gamectr + local _player_info = self._player_info + local _room = self._room + + _gamectr:AddEventListener(GameEvent.PlayerEnter, handler(self, self.OnPlayerEnter)) + + _gamectr:AddEventListener( + GameEvent.PlayerState, + function(...) + local arg = {...} + local p = arg[1] + local info = _player_info[self:GetPos(p.seat)] + info._ctr_offline.selectedIndex = p.line_state == 0 and 1 or 0 + self:PlayerChangeLineState() + end + ) + _gamectr:AddEventListener(GameEvent.OnUpdateInfo, handler(self, self.OnUpdateInfo)) + + _gamectr:AddEventListener(GameEvent.PlayerLeave, handler(self, self.OnPlayerLeave)) + + _gamectr:AddEventListener(GameEvent.PlayerReady, handler(self, self.OnPlayerReady)) + + _gamectr:AddEventListener( + GameEvent.DeskBreak, + function(...) + local arg = {...} + local code = arg[1] + if code == 0 then + if self.dismissWin == nil then + self.dismissWin = DismissRoomWindow.new(self._root_view) + end + self.dismissWin:FillData(arg[2]) + self.dismissWin:Show() + elseif code == 1 then + ViewManager.ChangeView(ViewManager.View_Lobby) + ViewUtil.ShowTips('房间已解散!') + elseif code == 2 then + -- self:DismissRoomAgree(p,result) + local p = arg[2] + local result = arg[3] + elseif code == 3 then + if self.dismissWin ~= nil then + self.dismissWin:Destroy() + end + self.dismissWin = nil + self.dismiss_room_cd_time = 30 + ViewUtil.ShowTips('解散失败!') + end + end + ) + + _gamectr:AddEventListener( + GameEvent.Interaction, + function(...) + local arg = {...} + local p = arg[1] + if not p or not p.seat or p.seat == 0 then + return + end + if DataManager.BanInteractRoom == _room.room_id and p.seat ~= _room.self_player.seat then + return + end + local info = self._player_info[self:GetPos(p.seat)] + local ttype = arg[2] + if ttype == 5 then + local parm = arg[3] + local array = split(parm, '_') + local tp = self._room:GetPlayerById(tonumber(array[2])) + if not tp or not tp.seat or tp.seat == 0 then + return + end + local pos = self._view:GlobalToLocal(info._view:LocalToGlobal(info:GetHeadCenter())) + if tp.seat == p.seat then + for i = 1, #_room.player_list do + local player = _room.player_list[i] + if player.seat ~= tp.seat then + tinfo = self._player_info[self:GetPos(player.seat)] + tpos = self._view:GlobalToLocal(tinfo._view:LocalToGlobal(tinfo:GetHeadCenter())) + self:PlayInteractAnimation(array[1], pos, tpos) + end + end + else + local tinfo = self._player_info[self:GetPos(tp.seat)] + local tpos = self._view:GlobalToLocal(tinfo._view:LocalToGlobal(tinfo:GetHeadCenter())) + self:PlayInteractAnimation(array[1], pos, tpos) + end + elseif ttype == 3 then + if record_baned == 0 then + info:ShowInteraction(ttype, arg[3]) + end + else + info:ShowInteraction(ttype, arg[3]) + end + end + ) + + _gamectr:AddEventListener( + GameEvent.OnKicked, + function() + printlog("GameEvent.OnKicked====》》》》》") + self:UnmarkSelfTuoguan() + local _curren_msg = MsgWindow.new(self._root_view, '由于长时间未准备,你已被踢出房间!', MsgWindow.MsgMode.OnlyOk) + _curren_msg.onOk:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + _curren_msg:Show() + end + ) + + _gamectr:AddEventListener( + GameEvent.TupGuanOpen, + function(...) + --print("刷新托管数据=====") + local arg = {...} + local p = arg[1] + local info = self._player_info[self:GetPos(p.seat)] + + if info and info.IsShowTGTips then + info:IsShowTGTips(arg[2],arg[3]) + end + + if info and info.SetShowTGTips then + info:SetShowTGTips(arg[2],arg[3]) + end + + end + ) + + +end + +-- 设置能否互动,1允许,0禁止 +function M:SetInteractEnabled(val) + if val == 0 then + DataManager.BanInteractRoom = self._room.room_id + else + DataManager.BanInteractRoom = nil + end +end + +-- 获取能否互动状态 +function M:GetInteractEnabled() + return DataManager.BanInteractRoom == self._room.room_id and 0 or 1 +end + +-- 桌面动画效果 +function M:PlayInteractAnimation(str, mypos, pos) + local eff = UIPackage.CreateObjectFromURL('ui://Common/Eff' .. str) + local myEff = UIPackage.CreateObjectFromURL('ui://Common/myEff' .. str) + self._view:AddChild(myEff) + myEff.x = mypos.x + myEff.y = mypos.y + local offsetX = pos.x - mypos.x + local offsetY = pos.y - mypos.y + + if str ~= '5' and str ~= '1' then + local total_rotation = (offsetY + offsetX) / 100 * 50 + self._run_move = + TweenUtils.TweenFloat( + 0, + 1, + 0.5, + function(value) + myEff.x = mypos.x + offsetX * value + myEff.y = mypos.y + offsetY * value + if str == '2' then + myEff.rotation = total_rotation * value + end + end + ) + end + + self._run_eff = + coroutine.start( + function() + if str ~= '1' then + coroutine.wait(0.5) + else + local degree = math.atan2(offsetX, offsetY) * 180 / math.pi - 90 + if degree < -180 then + degree = 360 + degree + end + degree = degree * -1 + if degree > 90 or degree < -90 then + degree = degree + 180 * (degree > 90 and -1 or 1) + myEff.scaleX = -1 + end + myEff.rotation = degree + coroutine.wait(0.2) + end + self._view:AddChild(eff) + eff.x = pos.x + eff.y = pos.y + coroutine.wait(1.5) + eff:Dispose() + myEff:Dispose() + end + ) +end + +function M:GetReadyNum() + local readyNum = 0 + local list = self._room.player_list + for i = 1, #list do + local p = list[i] + if p.ready then + readyNum = readyNum + 1 + end + end + return readyNum +end + +function M:OnPlayerEnter(...) + printlog("进入房间222222222222222222++++++++++++++++++++++++++++") + local arg = {...} + local p = arg[1] + if + p ~= self._room.self_player and self._room.room_config.people_num <= 4 and + self._room.room_config.people_num >= 3 and + self._gamectr:CheckGPS() + then + if self._room.self_player.seat == 0 then + return + end + if self.distance_view then + self.distance_view:Destroy() + end + self.distance_view = PlayerDistanceView.new(true, self._gps_style, function(v) + self:continue_game(v) + end) + self.distance_view._view:GetController("state").selectedIndex = self._state.selectedIndex > 0 and self._state.selectedIndex < 3 and 1 or 0 + self.distance_view:Show() + if self.btn_distance then + self.btn_distance:GetController("state").selectedIndex = 1 + end + end + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info._view.visible = true +end + +function M:OnPlayerReady(...) + local arg = {...} + local p = arg[1] + + if p.isSendCardState~=nil and p.isSendCardState==true then + p.isSendCardState=false + ControllerManager.IsSendCard=false + --print("进入设置计时器控制==========") + coroutine.start(function() + --print("计时器倒计时5s=============") + coroutine.wait(5) + --print("当前状态==============") + --print(ControllerManager.IsSendCard) + if ControllerManager.IsSendCard==true then + --print("以发送开牌======================") + return + else + --print("开始断线重连") + --ControllerManager.OnConnect(SocketCode.TimeoutDisconnect) + ViewManager.refreshGameView() + end + ControllerManager.IsSendCard=false + end) + end + + if p.seat == self._room.self_player.seat then + if self._ctr_action then + self._ctr_action.selectedIndex = 0 + end + end + local info = self._player_info[self:GetPos(p.seat)] + info:Ready(true) + printlog("基类准备++++++++++++++++++++++++++") +end + +function M:OnUpdateInfo(...) + local arg = {...} + local p = arg[1] + local t = arg[2] + -- 托管状态变化 + if t == 5 then + if p == DataManager.CurrenRoom.self_player then + if p.entrust then + self:closeTipOnTuoguan() + self:MarkSelfTuoguan() + else + self:UnmarkSelfTuoguan() + end + else + local player_info = self._player_info[self:GetPos(p.seat)] + if p.entrust then + player_info:MarkTuoguan() + else + player_info:UnmarkTuoguan() + end + end + end +end + +-- 标记自己托管 +function M:MarkSelfTuoguan() + if self._com_tuoguan then + return + end + + + self._com_tuoguan = UIPackage.CreateObjectFromURL('ui://Common/com_tuoguan_self') + local com_tuoguan = self._com_tuoguan + GRoot.inst:AddChild(com_tuoguan) + --com_tuoguan:Center() + --com_tuoguan.y = GRoot.inst.height - com_tuoguan.height + --com_tuoguan.x = (GRoot.inst.width - com_tuoguan.width) * 0.5 + local _msg_view = nil + com_tuoguan:GetChild('n0').onClick:Set( + function() + if _msg_view then + _msg_view:Dispose() + end + local _curren_msg = UIPackage.CreateObjectFromURL('ui://Common/MessageBox') + _msg_view = _curren_msg + _msg_view:GetChild('btn_ok').onClick:Set( + function() + _msg_view:Dispose() + _msg_view = nil + self._gamectr:Entrust(false) + end + ) + _msg_view:GetChild('btn_close').onClick:Set( + function() + _msg_view:Dispose() + _msg_view = nil + end + ) + + _msg_view:GetChild('btn_close1').onClick:Set( + function() + _msg_view:Dispose() + _msg_view = nil + end + ) + local roate=GRoot.inst.width/GRoot.inst.height + local num=100 + if roate<1.9 then + num=250 + end + com_tuoguan:AddChild(_msg_view) + _msg_view:GetChild('tex_message').text = '确定要取消托管吗?' + _msg_view.x = (com_tuoguan.width - _msg_view.width) * 0.5-num + _msg_view.y = (com_tuoguan.height - com_tuoguan.y - _msg_view.height) * 0.5 + end + ) +end + +-- 取消标记自己托管 +function M:UnmarkSelfTuoguan() + if self._com_tuoguan then + self._com_tuoguan:Dispose() + self._com_tuoguan = nil + end +end + +function M:OnPlayerLeave(...) + local arg = {...} + local p = arg[1] + local info = self._player_info[self:GetPos(p.seat)] + info._view.visible = false + if not self._gamectr:CheckGPS() then + self.btn_distance:GetController("state").selectedIndex = 0 + end +end + +function M:PlayerChangeLineState() +end + +function M:ReloadInteractView() + if self.chat_view then + self.chat_view:FillChatMsg() + end +end + +function M:PlayChatSound(sex, chat_index) + local sex_path = ViewUtil.Sex_Chat[sex] + local path1 = string.format('base/common/sound/%s/chat_%s.mp3', sex_path, tostring(chat_index - 1)) + GameApplication.Instance:PlaySound('base_chat', path1) + -- GameApplication.Instance:PlaySound(path1) +end + +-- 获取语言 +function M:GetLanguage() + if self._multilingual then + return self._language + else + return 0 + end +end + +-- 设置语言 +function M:SetLanguage(language) + if self._multilingual then + self._language = language + end +end + +-- 获取消息使用的语言、序号 +function M:GetChatMsgLanguage(msg_index) + local language = math.modf(msg_index / 100) + local index = math.fmod(msg_index, 100) + return language, index +end + +function M:DismissRoomAgree(p, result) + local index = self:GetPos(p.seat) + self._player_info[index]:DismissRoom(result) +end + +function M:PlaySound(sex, path) +end + +function M:OnUpdate() + local deltaTime = Time.deltaTime + if (self._popEvent) then + local func = self._gamectr:PopEvent() + if (func ~= nil) then + if pcall(func) then + + else + self._gamectr = ControllerManager.GetController(GameController) + if self._gamectr then + self._gamectr:ResetConnect() + end + end + --func() + end + end + if self._view:GetChild('gcm_chat') then + self._record_time = self._record_time + deltaTime + end + local _left_time = self._left_time + if (_left_time > 0) then + _left_time = _left_time - deltaTime + _left_time = math.max(0, _left_time) + local leftTime = math.floor(_left_time) + if leftTime < 10 then + self._tex_leftTime.text = '0' .. tostring(leftTime) + for i=2,4 do + local text = self["_tex_leftTime"..i] + if text then + text.text = '0' .. tostring(leftTime) + end + end + else + self._tex_leftTime.text = tostring(leftTime) + for i=2,4 do + local text = self["_tex_leftTime"..i] + if text then + text.text = tostring(leftTime) + end + end + end + self._left_time = _left_time + -- 桌面計時器聲音 + if not self._curtime then + self._curtime = 15 + end + if leftTime <= 3 and self._curtime ~= leftTime and leftTime ~= 0 then + self._curtime = leftTime + GameApplication.Instance:PlaySound('base/sound/daojishi1.mp3') + end + else + self:onLeftTimeOver() + if self._tex_leftTime then + self._tex_leftTime.text = '00' + end + for i=2,4 do + local text = self["_tex_leftTime"..i] + if text then + text.text = '00' + end + end + end + if (self.dismiss_room_cd_time > 0) then + self.dismiss_room_cd_time = self.dismiss_room_cd_time - deltaTime + self.dismiss_room_cd_time = math.max(0, self.dismiss_room_cd_time) + end + + if self._style == 1 then + if (self._rightPanelView) then + self._rightPanelView:OnUpdate(deltaTime) + end + end + + if (self.dismissWin) then + -- local ctr = ControllerManager.GetCurrenController() + -- if(ctr.baseType ~= GameController) then + -- self.dismissWin:Destroy() + -- self.dismissWin = nil + -- else + self.dismissWin:OnUpdate(deltaTime) + -- end + end + + if self.OnMuShiUpdate then + self:OnMuShiUpdate() + end +end +function M:onLeftTimeOver() + +end +function M:Clear() + -- self:__CloseTip() + for i = 1, #self._player_info do + self._player_info[i]:Clear() + end +end + + +function M:DestroyPlayerInfo() + for i = 1, #self._player_info do + self._player_info[i]:Destroy() + end +end + + +function M:GetPos(seat) + return ViewUtil.GetPos(self._room.self_player.seat, seat, self._room.room_config.people_num) +end + +-- 托管时关闭一些提示窗口,如起手胡、吃碰提示、海底,由扩展实现 +function M:closeTipOnTuoguan() +end + +local last_pause_time = 0 +--游戏暂停 +function M:OnApplicationPause() + if self.panel_assist then + self.panel_assist:Close() + end + last_pause_time = os.time() +end + +--游戏激活 +function M:OnApplicationActive() + --print("游戏激活================") + if os.time() - last_pause_time > 15 then + last_pause_time = os.time() + ControllerManager.WebClient:clearActionQueue() + local ctr = ControllerManager.GetCurrenController() + if (ctr.baseType == GameController) then + ControllerManager.OnConnect(SocketCode.TimeoutDisconnect) + end + end +end + +function M:Show() + BaseView.Show(self) + if self._state.selectedIndex == 0 and self._show_distance then + if self._room.self_player.seat == 0 then + return + end + self.distance_view = PlayerDistanceView.new(true, self._gps_style, function(v) + self:continue_game(v) + end) + self.distance_view._view:GetController("state").selectedIndex = self._state.selectedIndex > 0 and self._state.selectedIndex < 3 and 1 or 0 + self.distance_view:Show() + self.btn_distance:GetController("state").selectedIndex = 1 + end +end + +function M:Destroy() + TimerManager.Clear() + self:UnmarkSelfTuoguan() + self:DestroyPlayerInfo() + DSTweenManager.ClearTween() + + NetResetConnectWindow.CloseNetReset() + Voice.CrealRecord() + ControllerManager.resetJionRoom = false + self._popEvent = false + GRoot.inst:HidePopup() + ViewUtil.CloseModalWait() + GameApplication.Instance.StopMusic = 0 + coroutine.stopAll() + UpdateBeat:Remove(self.OnUpdate, self) + BaseView.Destroy(self) + BaseWindow.DestroyAll() + ResourcesManager.UnLoadGroup('base_chat') + +end diff --git a/lua_probject/base_project/Game/View/NewGroup/CreateGroupView.lua b/lua_probject/base_project/Game/View/NewGroup/CreateGroupView.lua new file mode 100644 index 00000000..6a94e2bf --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/CreateGroupView.lua @@ -0,0 +1,70 @@ +--创建牌友圈View对象 +--author:-- + +local CreateGroupView = {} + + +local M = CreateGroupView + +local url = {"ui://NewGroup/Win_CreateGroup","ui://NewGroup/Win_UpdateGroup"} +function CreateGroupView.new(blur_view,default_str) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "CreateGroupView" + self._close_destroy = true + self._close_zone = false + self._blur_view = blur_view + self.default_str = default_str + self:init(url[self.is_update and 2 or 1]) + return self +end + +function M:init(url) + BaseWindow.init(self,url) + local tex_name = self._view:GetChild("tex_name") + + local ctr_agent = self._view:GetController("agent") + local user = DataManager.SelfUser + + + self._view:GetController("index").selectedIndex = 2 + self._view:GetController("alliance").selectedIndex = 1 + + local btn_ok = self._view:GetChild("btn_ok") + btn_ok.onClick:Set(function() + if string.utf8len(tex_name.text) == 0 then + ViewUtil.ErrorTip(-12,"请输入圈子名称!") + return + end + if MsgParser:checkString(tex_name.text) then + ViewUtil.ErrorTip(-12,"您输入的名称存在敏感字!") + return + end + -- if not self.is_update and not self.config then + -- ViewUtil.ErrorTip(-12,"请选择玩法!") + -- return + -- end + if self.callback then + local ctr_index = self._view:GetController("index") + local index = ctr_index.selectedIndex + 1 + local pay_type = index + local fg_type = 1 + if index == 3 then + pay_type = 1 + fg_type = 2 + end + self.callback(tex_name.text, pay_type, fg_type) + end + self:Destroy() + end) + local btn_cal = self._view:GetChild("btn_cal") + btn_cal.onClick:Set(function() + self:Destroy() + end) +end + +function M:SetCallback(callback) + self.callback = callback +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/FGInvitedMsgView.lua b/lua_probject/base_project/Game/View/NewGroup/FGInvitedMsgView.lua new file mode 100644 index 00000000..683e4a15 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/FGInvitedMsgView.lua @@ -0,0 +1,79 @@ +-- 被邀请界面 +local FGInvitedMsgView = {} + +local M = FGInvitedMsgView +setmetatable(M, {__index = BaseWindow}) + +function FGInvitedMsgView.new(blur_view, group_id, callback) + + local self = setmetatable({}, {__index = M}) + self.class = "FGInvitedMsgView" + self._blur_view = blur_view + self._animation = true + self._close_destroy = true + self._close_time = 15 + + self.group_id = group_id + self.callback = callback + UIPackage.AddPackage("base/newgroup/ui/FGAssist") + self:init("ui://FGAssist/panel_invited") + return self +end + +function M:FillData(data) + self._view:GetChild("tex_name").text = data.nick + self._view:GetChild("tex_id").text = "ID:" .. data.uid + local btn_head = self._view:GetChild("btn_head") + ImageLoad.Load(data.portrait, btn_head._iconObject) + + local group = DataManager.groups:get(self.group_id) + local play = group:getPlay(data.pid) + self._view:GetChild("tex_play_name").text = play and play.name or pid + self._view:GetChild("tex_game_name").text = data.g_name + + local btn_refuse = self._view:GetChild("btn_refuse") + local id = data.invi_id + local btn_yes = self._view:GetChild("btn_yes") + btn_yes.onClick:Set(function() + local refuse = btn_refuse.selected and 1 or 0 + self:SendResponse(id, refuse) + self:Destroy() + if self.callback then + self.callback(data.roomid) + end + end) + local btn_no = self._view:GetChild("btn_no") + btn_no.onClick:Set(function() + local refuse = btn_refuse.selected and 1 or 0 + self:SendResponse(id, refuse) + self:Destroy() + end) + + self._co = coroutine.start(function() + while self._close_time > 0 do + coroutine.wait(1) + self._close_time = self._close_time - 1 + self:ShowLeftTime() + end + self:Destroy() + end) +end + +function M:ShowLeftTime() + self._view:GetChild("tex_left_time").text = self._close_time .. "s" +end + +function M:SendResponse(id, refuse) + local mgr_ctr = ControllerManager.GetController(GroupMgrController) + mgr_ctr:FG_ResponseInvited(id, refuse) +end + +function M:Destroy() + if self._co then + coroutine.stop(self._co) + self._co = nil + end + BaseWindow.Destroy(self) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua new file mode 100644 index 00000000..46176d49 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/GroupInfoView.lua @@ -0,0 +1,2058 @@ +local JoinGroupView = import('.JoinGroupView') +local GroupJoinsView = import('.GroupJoinsView') +local GroupSetDefaultGameView = import('.GroupSetDefaultGameView') +local GroupManagerView = import('.GroupManagerView') +local GroupRemitView = import('.GroupRemitView') +local RoomItem = import('.RoomItem') +local FGInvitedMsgView = import('.FGInvitedMsgView') +local GroupMemberFagLogView = import('./MngView/GroupMemberFagLogView') +local GroupMngGameListView = import(".MngView/GroupMngGameListView") +local GroupMngFagPackView = import('.GroupMngFagPackView') +local GroupMailView = import('.GroupMailView') +local GroupSelectPlayView = import('.GroupSelectPlayView') +local GroupMngSettingView = import('.GroupMngSettingView') +-- local HeadView = require('Game/View/LobbyHeadView') +GroupNumberInputView_Game = import(".MngView.GroupNumberInputView") + +local GroupInfoView = {} +local M = GroupInfoView + +local currentSelectPlay=0 + +function GroupInfoView.new(curGroup, fg_info) + setmetatable(M, {__index = BaseView}) + local self = setmetatable({}, {__index = M}) + self.class = 'GroupInfoView' + self.curGroup = curGroup + curGroup.layer = 0 + self.fg_info = fg_info + self.roominfo = {} + self.gameIdList = {} + self.playIdList = {} + self._full = true + self._get_data = false -- 标记是否已获取到数据 + self._showVipRooms = 0 + self.lstgameVisible = false + self.isShowRoomItem = (self.curGroup.lev == 1 or self.curGroup.lev == 2) + DataManager.SelfUser.cur_group = self + self.FillGameItemList={} + self:InitView('ui://NewGroup/Main_GroupInfo') + + return self +end + +-- 获取玩法名 +local function __getLayerName(self, pid) + if pid == 0 then + return '全 部' + end + --if not self._get_data then + -- return self.playNames[pid] or '已删除' + --end + local p_data = self.curGroup:getPlay(pid) + return p_data and p_data.name or '已删除' +end + +-- 加载背景图 +local bg_pref = 'base/newgroup/bg/bg0' +local function __setBG(url) + local tex_bg = ResourcesManager.LoadObjectByGroup(url .. '.png', typeof(UnityEngine.Texture), url) + local bg = GImage() + bg.texture = FairyGUI.NTexture(tex_bg) + bg.width = 1751 + bg.height = 1001 + return bg +end +-- 显示背景 +local function __showBG(main_view) + local num = PlayerPrefs.GetInt('fgroup_bg') + if num == 0 then + num = 1 + end + local url = bg_pref .. num + local anchor = main_view:GetChild('bg_anchor') + anchor:RemoveChildren(0, -1, true) + local bg = __setBG(url) + anchor:AddChild(bg) + bg.x = -50 + bg.y = 0 +end + + + + +local function RoomWeight(room) + local weight = 0 + if room.status == 1 then + weight = weight + 1 + elseif room.default then + weight = weight + 0 + elseif #room.plist == 0 then + weight = weight + 0 + elseif room.maxPlayers > #room.plist then + weight = weight + (10 - room.maxPlayers + #room.plist) + elseif room.maxPlayers == #room.plist then + weight = weight + 1 + end + room.weight = weight + return weight +end + + +local function RoomWeight1(room) + --printlog("aaaaaaaaawwwwwwwwwwwwwwwwwwwwwwwwwwwww") + --pt(room) + local weight = 0 + if room.status == 1 then + weight = weight + 20 + elseif room.default then + weight = weight + 0 + elseif #room.plist == 0 then + weight = weight + 0 + elseif room.maxPlayers > #room.plist then + weight = 0.5--weight + (10 - room.maxPlayers + #room.plist) + elseif room.maxPlayers == #room.plist then + weight = weight + 1 + end + room.weight = weight + -- printlog("aaaaaaaaaaaaaaaaaaaccccccccccccccccccccccc ",weight) + --pt(room) + return weight +end + + +-- 房间排序 +local function SortRooms(a, b) + -- printlog("SortRooms====》》》》",currentSelectPlay) + if currentSelectPlay==0 then + local rwa = RoomWeight(a) + local rwb = RoomWeight(b) + if rwa ~= rwb then + return rwa > rwb + else + return a.pid=-1 and string.format('%s/%s', room.round, room.times) or "" + local name = __getLayerName(self, room.pid) + room_item.tex_gamename.text = name + room_item.tex_limit.text = str + + -- local currentNum = 0 + -- if plist ~= nil then + -- currentNum = #plist + -- end + -- room_item.tex_roomid.text = tostring(currentNum) .. '/' .. tostring(room.maxPlayers) + + -- local desk = __fillDesk(room.maxPlayers,item) + local desk = room_item.desk + --local play = self.curGroup:getPlay(room.pid) + local isHidden = 0 + if play then + if play.isHidden and play.isHidden == 1 then + isHidden = 1 + elseif play.config then + local config = json.decode(play.config) + if config.isHidden and config.isHidden == 1 then + isHidden = 1 + end + end + play.isHidden = isHidden + end + room_item.ctr_color.selectedIndex = play and play.deskId or room.color or 0 + + if not room.default then + for i = 1, room.maxPlayers do + local p_head = room_item.heads[i] + local p_item = p_head.p_item + local btn_head = p_head.btn_head + btn_head._iconObject.texture = room_item.def_icon + if i > #plist then + p_item.visible = false + else + p_item.visible = true + local p = plist[i] + if isHidden == 0 then + p_head.tex_name.text = ViewUtil.stringEllipsis(p.nick) + p_head.tex_id.text = "ID:"..p.aid + ImageLoad.Load(p.portrait, btn_head._iconObject, self.class) + + if p.hp then + local str1="积分:" + local hp=p.hp/1000 + p_head.text_score.text=str1..hp + end + + else + p_head.tex_name.text = "智能" + p_head.tex_id.text = "防作弊" + -- btn_head._iconObject.url = "ui://Common/hiddenHead" + -- ImageLoad.Load("ui://Common/hiddenHead", btn_head._iconObject, self.class) + end + if p.off_time and p.off_time > 0 then + p_item:GetController('offline').selectedIndex = 1 + local cur_time = os.time() + local tex_time = p_item:GetChild('tex_time') + tex_time.text = (cur_time - math.min(p.off_time, cur_time)) .. '秒' + local tem = {} + tem.time = math.min(p.off_time, cur_time) + tem.item = tex_time + table.insert(list_offline, tem) + else + p_item:GetController('offline').selectedIndex = 0 + end + end + end + else + for i = 1, room.maxPlayers do + local p_head = room_item.heads[i] + local p_item = p_head.p_item + p_item.visible = false + end + end + -- desk.touchable = false + desk.onClick:Set( + function() + if room.default or self.curGroup.lev == 3 then + -- 房间点击:假房间 匹配,真房间 加入 + if room.default or isHidden == 1 then + self:__startGame(room.id,room.pid, true, isHidden) + else + self:__joinRoom(roomid) + end + else + if self.roominfo.view and not self.roominfo.view.isDisposed then + self.roominfo.view:Dispose() + end + local riv = UIPackage.CreateObjectFromURL('ui://NewGroup/Win_roomInfo') + self.roominfo.view = riv + self.roominfo.room = room + riv:GetChild('tex_room_id').text = room.id and '房间号:' .. room.id or '' + local play = self.curGroup:getPlay(room.pid) + riv:GetChild('tex_room_name').text = play.name + self:InitRoomInfoView() + riv:GetChild('btn_enter').onClick:Set( + function() + riv:Dispose() + if room.default or isHidden == 1 then + self:__startGame(room.id,room.pid, true, isHidden) + else + self:__joinRoom(roomid) + end + end + ) + riv:GetChild('btn_del').onClick:Set( + function() + local _curren_msg = + MsgWindow.new( + self._root_view, + '确定解散该桌子吗?\r(解散该桌子没有任何结算信息,请谨慎操作)', + MsgWindow.MsgMode.OkAndCancel + ) + _curren_msg.onOk:Add( + function() + ViewUtil.ShowModalWait(self._root_view) + local fgCtr = ControllerManager.GetController(NewGroupController) + + fgCtr:FG_RemoveRoom( + self.curGroup.id, + roomid, + function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, '删除房间失败!') + return + else + riv:Dispose() + end + end + ) + end + ) + _curren_msg:Show() + end + ) + riv:GetChild('btn_close').onClick:Set( + function() + riv:Dispose() + end + ) + self._view:AddChild(riv) + riv:Center() + end + + + local key = tostring(self.curGroup.id) + self.fg_info[key] = room.pid + local filename = 'fginfo_' .. DataManager.SelfUser.account_id + Utils.SaveLocalFile(filename, json.encode(self.fg_info)) + + end + ) +end + +local ROOM_ITEM = {} +ROOM_ITEM[2] = 'ui://NewGroup/Item_room2' +ROOM_ITEM[3] = 'ui://NewGroup/Item_room3' +ROOM_ITEM[4] = 'ui://NewGroup/Item_room4' +ROOM_ITEM[5] = 'ui://NewGroup/Item_room5' +ROOM_ITEM[6] = 'ui://NewGroup/Item_room6' +ROOM_ITEM[8] = 'ui://NewGroup/Item_room8' +ROOM_ITEM[9] = 'ui://NewGroup/Item_room9' +ROOM_ITEM[10] = 'ui://NewGroup/Item_room10' + + +-- 填充房间列表 +-- 全部玩法和单个玩法的假房间填充方式不同 +local function __fillRoomData(self) + local curGroup = self.curGroup + local lst_room = self.lst_room + local currentPlayID = self:GetSelectedPlayID() + local currentGameID = self:GetSelectedGameID() + + -- self.lst_layer.visible = currentGameID > 0 + --self.line1.visible = currentGameID > 0 + if currentPlayID > 0 then + --printlog("aaaaaaaaaaaaaaaaa11111111111111111111111111111111") + -- 单个玩法 + local rooms = self.curGroup:getPlay(currentPlayID).rooms + local trooms = {} + for i=1,#rooms do + local room = rooms[i] + local play = self.curGroup:getPlay(room.pid) + local isvip = 0 + local isHidden = 0 + if play then + if play.isvip and play.isvip == 1 then + isvip = 1 + end + if play.isHidden and play.isHidden == 1 then + isHidden = 1 + end + + if (play.isvip == nil or play.isHidden == nil) and play.config then + local config = json.decode(play.config) + if config.isvip and config.isvip == 1 then + isvip = 1 + end + if config.isHidden and config.isHidden == 1 then + isHidden = 1 + end + end + play.isHidden = isHidden + play.isvip = isvip + + + ----------- + if isvip == self._showVipRooms then + if isHidden == 1 then + if #room.plist == room.maxPlayers or self.curGroup.lev < 3 then + table.insert( trooms,room ) + end + else + table.insert( trooms,room ) + end + end + + + end + + end + self.curRooms = membe_clone(trooms) + + local room = membe_clone(self.curGroup.default_rooms[self.curGroup:getPlayIndex(currentPlayID)]) + local play = self.curGroup:getPlay(room.pid) + local isvip = 0 + if play then + if play.isvip and play.isvip == 1 then + isvip = 1 + elseif play.config then + local config = json.decode(play.config) + if config.isvip and config.isvip == 1 then + isvip = 1 + end + end + play.isvip = isvip + + ------ + if isvip == self._showVipRooms then + local hp=json.decode(play.hpData) + if hp and hp.maxRound then + room.times=hp.maxRound + end + + if hp and hp.limitInRoom then + room.limitInRoom=hp.limitInRoom + end + + + table.insert( self.curRooms,room ) + + end + ----- + end + + else + if currentGameID == 0 then + --printlog("aaaaaaaaaaaaaaaaa222222222222222222222222222") + local rooms = curGroup.rooms + local trooms = {} + for i=1,#rooms do + local room = rooms[i] + local play = self.curGroup:getPlay(room.pid) + local isvip = 0 + local isHidden = 0 + if play then + if play.isvip and play.isvip == 1 then + isvip = 1 + end + if play.isHidden and play.isHidden == 1 then + isHidden = 1 + end + + if (play.isvip == nil or play.isHidden == nil) and play.config then + local config = json.decode(play.config) + if config.isvip and config.isvip == 1 then + isvip = 1 + end + if config.isHidden and config.isHidden == 1 then + isHidden = 1 + end + end + play.isHidden = isHidden + play.isvip = isvip + + ----- + if isvip == self._showVipRooms then + if play.isHidden == 1 then + if #room.plist == room.maxPlayers or self.curGroup.lev < 3 then + table.insert( trooms,room ) + end + else + table.insert( trooms,room ) + end + end + + end + + end + self.curRooms = membe_clone(trooms) + + for i = 1, #self.curGroup.playList do + local defaultRoom = self.curGroup.default_rooms[i] + + local play = self.curGroup:getPlay(defaultRoom.pid) + local isvip = 0 + if play then + if play.isvip and play.isvip == 1 then + isvip = 1 + elseif play.config then + local config = json.decode(play.config) + if config.isvip and config.isvip == 1 then + isvip = 1 + end + end + play.isvip = isvip + end + if isvip == self._showVipRooms then + local hp=json.decode(self.curGroup.playList[i].hpData) + defaultRoom.limitInRoom=hp.limitInRoom + if hp.maxRound then + defaultRoom.times=hp.maxRound + end + local totalNum=1 + if hp.tex_times_room then + totalNum=hp.tex_times_room/1000 + end + + for i=1,totalNum do + self.curRooms[#self.curRooms + 1] = defaultRoom + end + + end + end + else + --printlog("aaaaaaaaaaaaaaaaa33333333333333333333333333333333") + self.curRooms = {} + + for i = 1, #self.curGroup.playList do + local p_data = self.curGroup.playList[i] + local isvip = 0 + local isHidden = 0 + if p_data.isvip and p_data.isvip == 1 then + isvip = 1 + end + if p_data.isHidden and p_data.isHidden == 1 then + isHidden = 1 + end + if (p_data.isvip == nil or p_data.isHidden == nil) and p_data.config then + local config = json.decode(p_data.config) + if config.isvip and config.isvip == 1 then + isvip = 1 + end + if config.isHidden and config.isHidden == 1 then + isHidden = 1 + end + end + p_data.isvip = isvip + p_data.isHidden = isHidden + + if p_data.gameId == currentGameID and isvip == self._showVipRooms then + local tempRooms = membe_clone(p_data.rooms) + if #tempRooms > 0 then + for j = 1, #tempRooms do + local tempRoom = tempRooms[j] + if isHidden == 1 then + if tempRoom.maxPlayers == #tempRoom.plist or self.curGroup.lev < 3 then + self.curRooms[#self.curRooms + 1] = tempRoom + end + else + self.curRooms[#self.curRooms + 1] = tempRoom + end + end + end + + local hp=json.decode(p_data.hpData) + if hp and hp.maxRound then + self.curGroup.default_rooms[i].times=hp.maxRound + end + + if hp and hp.limitInRoom then + self.curGroup.default_rooms[i].limitInRoom=hp.limitInRoom + end + + local totalNum=1 + if hp and hp.tex_times_room then + totalNum=hp.tex_times_room/1000 + end + for j=1,totalNum do + self.curRooms[#self.curRooms + 1] = self.curGroup.default_rooms[i] + end + + end + end + end + end + + currentSelectPlay=self:GetSelectedPlayID() + table.sort(self.curRooms,SortRooms ) + list_offline = {} + + if self.curGroup.lev < 3 then + self.lst_room.numItems = #self.curRooms + else + if self.curGroup.show_num > 0 and #self.curRooms > self.curGroup.show_num then + + local tr = {} + + for j = 1, #self.curRooms do + if #tr < self.curGroup.show_num or self.curRooms[j].default == true then + table.insert(tr,self.curRooms[j]) + end + end + + self.curRooms = tr + end + self.lst_room.numItems = #self.curRooms + end + + + + -- if self._ctr_search.selectedIndex == 1 then + -- self.lst_room_search:RemoveChildrenToPool() + -- for i = 1, #curGroup.rooms do + -- local room = curGroup.rooms[i] + -- if room.id == self.search_key then + -- local item = self.lst_room_search:AddItemFromPool(ROOM_ITEM[room.maxPlayers]) + -- __fillRoomItem(self, nil, item, room) + -- else + -- for i = 1, #room.plist do + -- local p = room.plist[i] + -- if self.search_key == tostring(p.aid) then + -- local item = self.lst_room_search:AddItemFromPool(ROOM_ITEM[room.maxPlayers]) + -- __fillRoomItem(self, nil, item, room) + -- break + -- end + -- end + -- end + -- end + -- end + + if self.roominfo.view and not self.roominfo.view.isDisposed then + for i = 1, #curGroup.rooms do + if curGroup.rooms[i].id == self.roominfo.room.id then + self.roominfo.room = curGroup.rooms[i] + self:InitRoomInfoView() + end + end + end +end + +function M:InitRoomInfoView() + local room = self.roominfo.room + if not room.default then + printlog("wwwwwwwwwww22222222222222222 ",room.round," ",room.times) + self.roominfo.view:GetChild('tex_round').text = string.format('(%s/%s)', room.round, room.times) + local lst_player = self.roominfo.view:GetChild('lst_player') + lst_player:RemoveChildrenToPool() + if room.plist and #room.plist > 0 then + for i = 1, #room.plist do + local p = room.plist[i] + local item = lst_player:AddItemFromPool() + item:GetChild('tex_name').text = ViewUtil.stringEllipsis(p.nick) + local play = self.curGroup:getPlay(room.pid) + -- local score = play.hpOnOff == 0 and p.score or d2ad(p.score * play.hp_times) + -- score = score >= 0 and '+' .. score or score + -- item:GetController('nega').selectedIndex = p.score >= 0 and 0 or 1 + -- item:GetChild('tex_score').text = score + item:GetChild('tex_score').visible = false + ImageLoad.Load(p.portrait, item:GetChild('btn_head')._iconObject, self.class) + end + end + end +end + +-- 显示默认选择的玩法 +function M:ShowSelectedGame() + do return end + + local btn_choose = self._view:GetChild('btn_choose') + local tex_gamename = btn_choose:GetChild('tex_gamename') + local pid = self.fg_info[tostring(self.curGroup.id)] + local play = self.curGroup:getPlay(pid) + if play then + tex_gamename.text = play.name + else + btn_choose:GetController('null').selectedIndex = 1 + end +end + +-- 玩法名字显示 +local function __fillPlayItem(self, index, item) + local tex_game = item:GetChild('tex_game') + local pipeijoin = item:GetChild('pipeijoin') + + if (index == 0) then + tex_game.text = __getLayerName(self, 0) + else + + pipeijoin.onClick:Add( + function() + local currentPlayID = self:GetSelectedPlayID() + if currentPlayID == 0 then + if self.lst_layer.selectedIndex == 0 and self.lst_game.selectedIndex > 0 then + local pid = self.fg_info[tostring(self.curGroup.id)] + if pid == 0 then + ViewUtil.ErrorTip(nil, '没有选择玩法') + return + end + local p_data = self.curGroup:getPlay(pid) + local currentGameID = self:GetSelectedGameID() + if currentGameID == p_data.gameId then + currentPlayID = pid + end + end + if currentPlayID == 0 then + ViewUtil.ErrorTip(nil, '没有选择玩法') + return + end + end + + self:__startGame("",currentPlayID, false) + end + ) + tex_game.text = __getLayerName(self, self.playIdList[index]) + end +end + +local _iconMap = {} +local function __fillExtendIcon(id, callback) + + local File = System.IO.File + local path = Application.persistentDataPath .. '/UserData/Icon' + if not System.IO.Directory.Exists(path) then + System.IO.Directory.CreateDirectory(path) + end + local file = path .. '/icon_' .. id .. '.png' + local version + for k, v in pairs(DataManager.SelfUser.games) do + if v.game_id == id then + version = v.version + break + end + end + local loc_version + local ver_file = path .. '/Icon_' .. id + if _iconMap[id] then + callback(_iconMap[id].ntexture) + else + if File.Exists(ver_file) then + loc_version = File.ReadAllText(ver_file) + end + if not File.Exists(file) or not loc_version or loc_version ~= version then + coroutine.start( + function() + Utils.DownloadFile( + GetGameInfo('pack_url') .. '/icons/icon_' .. id .. '.png', + file, + function(...) + File.WriteAllText(ver_file, version) + local bytes = File.ReadAllBytes(file) + local texture = UnityEngine.Texture2D(128, 128) + texture:LoadImage(bytes) + local ntexture = FairyGUI.NTexture(texture) + _iconMap[id] = {texture = texture, ntexture = ntexture} + callback(ntexture) + end + ) + end + ) + else + local bytes = File.ReadAllBytes(file) + local texture = UnityEngine.Texture2D(128, 128) + texture:LoadImage(bytes) + local ntexture = FairyGUI.NTexture(texture) + _iconMap[id] = {texture = texture, ntexture = ntexture} + callback(ntexture) + end + end +end + +local function GetGameName(index) + if index==0 then return "全 部" end + local list = DataManager.SelfUser.games + for k,v in ipairs(list) do + if v.game_id==index then + return v.name + end + end + return "" +end + + +-- 玩法名字显示 +local function __fillGameItem(self, index, item) + local gameName="" + if (index == 0) then + item.icon = 'ui://NewGroup/quyxtb' + gameName=GetGameName(0) + item:GetChild("n11").text=gameName + if self.currentGameItemName==nil then + item.icon = 'ui://NewGroup/quyxtb-1' + end + else + local gameId = self.gameIdList[index] + local config = ExtendManager.GetExtendConfig(gameId) + local mode = config:GetGameInfo() + local iconName=mode:GetIconUrl1() + item.icon = iconName + gameName=GetGameName(gameId) + item:GetChild("n11").text=gameName + end + + if item.icon==self.currentGameItemName then + item.icon=self.currentGameItemName.."-1" + item:GetChild("n11").text=gameName + end + item:GetChild("n22").text=index+1 + +end + +local function __analysePlayListData(self) + self.playIdList = {} + DataManager.SelfUser.PlayLocalList={} + + local playName="playfaconfig"..self.curGroup.id + local json_data = Utils.LoadLocalFile(playName) + if json_data then + local data = json.decode(json_data) + DataManager.SelfUser.PlayLocalList=data + end + + + + local count = 0 + local curGroup = self.curGroup + local gameid = self:GetSelectedGameID() + for i = 1, #curGroup.playList do + local p_data = curGroup.playList[i] + local isvip = 0 + if p_data.isvip and p_data.isvip == 1 then + isvip = 1 + elseif p_data.config then + local config = json.decode(p_data.config) + if config.isvip and config.isvip == 1 then + isvip = 1 + end + end + p_data.isvip = isvip + + local isHasPlayC=true + --[[for k,v in pairs(DataManager.SelfUser.PlayLocalList) do + if tonumber(k)==p_data.id then + isHasPlayC=v + end + end--]] + + if (gameid == 0 or p_data.gameId == gameid) and isHasPlayC and isvip == self._showVipRooms then + count = count + 1 + self.playIdList[count] = p_data.id + end + end + + local lst_layer = self.lst_layer + -- printlog("添加玩法====>>>>",count) + -- pt(curGroup.playList) + lst_layer.numItems = count + 1 +end + +local function __analyseGameListData(self) + self.gameIdList = {} + + local count = 0 + local curGroup = self.curGroup + + for i = 1, #curGroup.playList do + local p_data = curGroup.playList[i] + local isvip = 0 + if p_data.isvip and p_data.isvip == 1 then + isvip = 1 + elseif p_data.config then + local config = json.decode(p_data.config) + if config.isvip and config.isvip == 1 then + isvip = 1 + end + end + p_data.isvip = isvip + + if isvip == self._showVipRooms then + local existed = false + for j = 1, #self.gameIdList do + if self.gameIdList[j] == p_data.gameId then + existed = true + end + end + + if existed == false then + self.gameIdList[#self.gameIdList + 1] = p_data.gameId + end + end + end + + self.lst_game.numItems = #self.gameIdList + 1 +end + +function M:GetSelectedGameID() + if self.lst_game.selectedIndex == -1 or self.lst_game.selectedIndex == 0 then + return 0 + else + if self.lst_game.selectedIndex <= #self.gameIdList then + return self.gameIdList[self.lst_game.selectedIndex] + else + return 0 + end + end +end + +function M:GetSelectedPlayID() + local lst_layer = self.lst_layer + + if lst_layer.selectedIndex == 0 or lst_layer.selectedIndex == -1 then + return 0 + else + if lst_layer.selectedIndex <= #self.playIdList then + return self.playIdList[lst_layer.selectedIndex] + else + return 0 + end + end +end + +function M:InitView(url) + BaseView.InitView(self, url) + self._full_offset = false + -- __showBG(self._view) + + -- local btndel = self._view:GetChild("btn_del") + -- local texroomid = self._view:GetChild('tex_roomid') + + + + -- btndel.onClick:Set( + + -- function() + -- local delroomid + -- delroomid = (texroomid.text) or 0 + -- if texroomid.text == "" then + -- ViewUtil.CloseModalWait() + -- ViewUtil.ErrorTip(nil, '输入不能为空') + -- return + -- end + -- local _curren_msg = + -- MsgWindow.new( + -- self._root_view, + -- '确定解散该桌子吗?\r(解散该桌子没有任何结算信息,请谨慎操作)', + -- MsgWindow.MsgMode.OkAndCancel + -- ) + -- _curren_msg.onOk:Add( + -- function() + + -- ViewUtil.ShowModalWait(self._root_view) + -- local fgCtr = ControllerManager.GetController(NewGroupController) + -- fgCtr:FG_RemoveRoom( + -- self.curGroup.id, + -- delroomid, + -- function(res) + -- if self._is_destroy then + -- return + -- end + -- ViewUtil.CloseModalWait() + -- if res.ReturnCode ~= 0 then + -- ViewUtil.ErrorTip(res.ReturnCode, '删除房间失败!') + -- return + -- else + -- ViewUtil.ErrorTip(res.ReturnCode, '删除房间成功!') + -- end + -- end + -- ) + -- end + -- ) + -- _curren_msg:Show() + -- end + -- ) + + + + self._view:GetChild('tex_id').text = "ID:"..self.curGroup.id + + self._view:GetChild('tex_name').text = self.curGroup.name + + -- self._view:GetChild('tex_p_name').text = ViewUtil.stringEllipsis(DataManager.SelfUser.nick_name) + + -- self._view:GetChild('tex_p_id').text = DataManager.SelfUser.account_id + + -- local player_diamond = self._view:GetChild('player_diamond') + -- player_diamond.onClick:Add( + -- function() + -- local pay_url = GetGameInfo('pay_url') .. 'accId=' .. DataManager.SelfUser.account_id + -- UnityEngine.Application.OpenURL(pay_url) + -- end + -- ) + + --local btn_head = self._view:GetChild('btn_head') + --ImageLoad.Load(DataManager.SelfUser.head_url, btn_head._iconObject) + -- btn_head.onClick:Set( + -- function() + -- local headView = HeadView.new(self._root_view, DataManager.SelfUser) + -- headView:Show() + -- end + -- ) + + -- self._view:GetChild('player_diamond').text = self.curGroup.diamo + + self._view:GetController('alliance').selectedIndex = self.curGroup.type == 2 and 1 or 0 + self.ctr_newmail = self._view:GetController('new_mail') + + self.lst_game = self._view:GetChild('game_list') + self.lst_game:SetVirtual() + self.lst_game.itemRenderer = function(index, item) + __fillGameItem(self, index, item) + end + + -- local btn_remit = self._view:GetChild('btn_remit') + -- btn_remit.visible = false + + self.lst_game.onClickItem:Add( + function(pas) + if self.currentSelectItem == pas.data then return end + local name=pas.data.icon + self.currentSelectItem = pas.data + self.currentGameItemName=name + self.lst_layer.selectedIndex = 0 + self:__refreshPay() + __analyseGameListData(self) + __analysePlayListData(self) + __fillRoomData(self) + end + ) + -- self.line1 = self._view:GetChild('line1') + --self.line1.visible = false + self.lst_layer = self._view:GetChild('lst_layer') + self.lst_layer:SetVirtual() + self.lst_layer.itemRenderer = function(index, item) + __fillPlayItem(self, index, item) + --if index>0 then + -- __fillPlayItem(self, index, item) + --else + -- item.width = 0 + -- item.height = 0 + -- item.visible = false + -- end + end + + + + self.lst_layer.onClickItem:Add( + function() + self:__loadPlayData() + end + ) + + + local btn_quanbu = self._view:GetChild('btn_quanbu') + btn_quanbu.onClick:Set( + function () + self.lst_layer.selectedIndex=0 + self:__loadPlayData() + end + ) + + + self.roomItems = {} + self.lst_room = self._view:GetChild('lst_room') + self.lst_room:SetVirtual() + self.lst_room.itemRenderer = function(index, item) + __fillRoomItem(self, index, item) + end + self.lst_room.itemProvider = function(index) + local rooms = self.curRooms + if not rooms then + return + end + + local room = rooms[index + 1] + if not room then + return + end + return ROOM_ITEM[room.maxPlayers] + end + self.lst_room.fairyBatching = true + + -- 全部玩法的快速开始按钮 + local btn_start = self._view:GetChild('btn_start') + btn_start.onClick:Set( + function() + local pid = self.fg_info[tostring(self.curGroup.id)] + + if pid == 0 then + ViewUtil.ErrorTip(nil, '没有选择玩法') + return + end + self:__startGame("",pid, false) + end + ) + + -- 快速开始按钮 + local btn_start2 = self._view:GetChild('btn_start2') + btn_start2.onClick:Set( + function() + + local currentPlayID = self:GetSelectedPlayID() + if currentPlayID == 0 then + if self.lst_layer.selectedIndex == 0 and self.lst_game.selectedIndex > 0 then + local pid = self.fg_info[tostring(self.curGroup.id)] + if pid == 0 then + ViewUtil.ErrorTip(nil, '没有选择玩法') + return + end + local p_data = self.curGroup:getPlay(pid) + local currentGameID = self:GetSelectedGameID() + if currentGameID == p_data.gameId then + currentPlayID = pid + end + end + if currentPlayID == 0 then + ViewUtil.ErrorTip(nil, '没有选择玩法') + return + end + end + + self:__startGame("",currentPlayID, false) + end + ) + + -- 选择玩法按钮 + local btn_choose = self._view:GetChild('btn_choose') + btn_choose.onClick:Set( + function () + self.lstgameVisible = not self.lstgameVisible + if (self.lstgameVisible) then + self.lst_game:TweenMove(Vector2.New(3,100), 0.3) + else + self.lst_game:TweenMove(Vector2.New(3,760), 0.3) + end + + end + -- function() + -- local sgv = + -- GroupSetDefaultGameView.new( + -- self.curGroup.id, + -- self._root_view, + -- function(num) + -- if num == 0 then + -- return + -- end + -- local pid = 0 + -- pid = self.curGroup.playList[num].id + -- btn_choose:GetChild('tex_gamename').text = __getLayerName(self, pid) + -- btn_choose:GetController('null').selectedIndex = 0 + -- local key = tostring(self.curGroup.id) + -- self.fg_info[key] = pid + -- local filename = 'fginfo_' .. DataManager.SelfUser.account_id + -- Utils.SaveLocalFile(filename, json.encode(self.fg_info)) + -- end + -- ) + -- local tem = self.fg_info[tostring(self.curGroup.id)] + -- local play_index = self.curGroup:getPlayIndex(tem) + -- if play_index == -1 then + -- play_index = 1 + -- end + + -- local setCallBackFunc=function() + -- __analysePlayListData(self) + -- end + -- sgv:FillData(self.curGroup.playList, play_index,setCallBackFunc) + -- sgv:Show() + -- end + ) + + local btn_close = self._view:GetChild('btn_close') + btn_close.onClick:Set( + function() + self:Destroy() + end + ) + + -- local btn_cancel = self._view:GetChild('node_matching'):GetChild('btn_cancel') + -- btn_cancel.onClick:Set( + -- function() + -- local _gameCtrl = ControllerManager.GetController(GameController) + -- local _currentCtrl = ControllerManager.GetCurrenController() + -- if _gameCtrl == _currentCtrl then + -- _gameCtrl:LevelRoom( + -- function(res) + -- if res.ReturnCode == 0 then + -- self._view:GetController('pipei').selectedIndex = 0 + -- end + -- end + -- ) + -- return + -- end + -- self._view:GetController('pipei').selectedIndex = 0 + -- end + -- ) + + local lst_layer = self._view:GetChild('lst_layer') + + self._layer_index = self.curGroup.layer + + + -- self._ctr_search = self._view:GetController('search') + -- self.lst_room_search = self._view:GetChild('lst_room_search') + -- local btn_search = self._view:GetChild('btn_search') + -- btn_search.onClick:Set( + -- function() + -- local search_key = self._view:GetChild('tex_id_search').text + -- if (self._ctr_search.selectedIndex == 1 and search_key == self.search_key) or search_key == '' then + -- return + -- end + -- self.search_key = search_key + -- self._ctr_search.selectedIndex = 1 + -- __fillRoomData(self) + -- end + -- ) + + self.tex_fag = self._view:GetChild('tex_fag') + -- self.tex_diamo = self._view:GetChild('player_diamond') + + -- self:__loadLastData() + + self:__loadGroupData() + self:__refreshManager() + UpdateBeat:Add(self.__onUpdate, self) + self._view.visible=false +end + +function M:__saveLastData() + if not self._get_data then self._get_data = true end + local data = json.encode(self.curGroup.playList) + Utils.SaveLocalFile(self.curGroup.id .. "fg_table_info", data) +end + +function M:__loadLastData() + local json_data = Utils.LoadLocalFile(self.curGroup.id .. "fg_table_info") + if not json_data then return end + pcall(function() + local data = json.decode(json_data) + self.curRooms = {} + self.playNames = {} + for i = 1, #data do + local t = data[i] + if not list_check(self.gameIdList, t.gameId) then + table.insert(self.gameIdList, t.gameId) + end + table.insert(self.playIdList, t.id) + local room = {maxPlayers = t.maxPlayers, status = 0, default = true, pid = t.id, color = t.deskId} + table.insert(self.curRooms, room) + self.playNames[t.id] = t.name + end + self.lst_game.numItems = #self.gameIdList + 1 + self.lst_layer.visible = false + --self.line1.visible = false + self.lst_layer.numItems = #self.playIdList + 1 + self.lst_room.numItems = #self.curRooms + end) +end + +local CLASS_LOBBT = 'LobbyView' +local timer = 0 +function M:__onUpdate() + if self.pause then + return + end + if self._pipeiTime and self._pipeiTime > 0 then + local deltaTime = Time.deltaTime + self._pipeiTime = self._pipeiTime - deltaTime + self._pipeiTime = math.max( self._pipeiTime,0 ) + if self._pipeiTime == 0 then + self._view:GetChild('node_matching'):GetChild('text_time').text = "当前排位时间较长,请耐心等待..." + self._view:GetChild('node_matching'):GetController('quxiao').selectedIndex = 1 + else + local time = math.floor(self._pipeiTime) + self._view:GetChild('node_matching'):GetChild('text_time').text = "玩家排位中,".. time .."秒后可退出..." + end + end + if self.__join_room then + local cview = ViewManager.GetCurrenView() + if (cview.class == CLASS_LOBBT) then + self.__join_room = false + self._view.visible = true + self:__ShowNotice() + end + else + if self.curGroup then + if self.curGroup.update_room then + self.curGroup.update_room = false + __fillRoomData(self) + end + if self.curGroup.update_info then + self.curGroup.update_info = false + self:_evtUpdatePlayerInfo() + end + if self.curGroup.update_joins then + self.curGroup.update_joins = false + self:_setHongDian(false) + if self.curGroup.lev < 3 then + self:_evtUpdateMsg() + end + end + if self.curGroup.update_play then + self.curGroup.update_play = false + self:_evtAddPlay() + if self.mng_view4 then + self.mng_view4:RefreshPage(4) + end + end + local deltaTime = Time.deltaTime + timer = timer + deltaTime + if timer > 1 then + timer = 0 + for i = 1, #list_offline do + local tem = list_offline[i] + if tem and not tem.item.isDisposed then + tem.item.text = (os.time() - tem.time) .. '秒' + end + end + end + end + end +end + +function M:__joinRoom(room_id) + ViewUtil.ShowModalWait(self._root_view, '正在加入游戏...', 'join_room') + local roomCtr = ControllerManager.GetController(RoomController) + local _gameCtrl = ControllerManager.GetController(GameController) + local _currentCtrl = ControllerManager.GetCurrenController() + if _gameCtrl == _currentCtrl then + if _gameCtrl.tmpRoomID ~= room_id then + _gameCtrl:LevelRoom( + function(res) + roomCtr:PublicJoinRoom( + Protocol.WEB_FG_JOIN_ROOM, + room_id, + false, + function(response) + if (response.ReturnCode == -1) then + ViewUtil.CloseModalWait('join_room') + RestartGame() + return + end + + if response.ReturnCode == -2 then + self:__joinRoom(room_id) + return + elseif response.ReturnCode ~= 0 then + ViewUtil.CloseModalWait('join_room') + ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, '进入房间失败') + return + end + self.__join_room = true + -- local mgr_ctr = ControllerManager.GetController(GroupMgrController) + -- mgr_ctr:disconnect() + self._view.visible = false + ImageLoad.Clear(self.class) + ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id) + ViewUtil.CloseModalWait('join_room') + timer = 0 + end, + self.curGroup.id + ) + end + ) + return + end + end + roomCtr:PublicJoinRoom( + Protocol.WEB_FG_JOIN_ROOM, + room_id, + false, + function(response) + printlog("进入房间返回事件==========》》》") + pt(response) + if (response.ReturnCode == -1) then + ViewUtil.CloseModalWait('join_room') + RestartGame() + return + end + + if response.ReturnCode == -2 then + self:__joinRoom(room_id) + return + elseif response.ReturnCode ~= 0 then + ViewUtil.CloseModalWait('join_room') + ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, '进入房间失败') + return + end + self.__join_room = true + -- local mgr_ctr = ControllerManager.GetController(GroupMgrController) + -- mgr_ctr:disconnect() + self._view.visible = false + ImageLoad.Clear(self.class) + ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id) + ViewUtil.CloseModalWait('join_room') + timer = 0 + end, + self.curGroup.id + ) +end + +function M:__joinRoom_match(roomid,pid, is_null, isHidden, callback) + if isHidden == nil then + isHidden = 0 + local play = self.curGroup:getPlay(pid) + if play then + if play.isHidden and play.isHidden == 1 then + isHidden = 1 + elseif play.config then + local config = json.decode(play.config) + if config.isHidden and config.isHidden == 1 then + isHidden = 1 + end + end + play.isHidden = isHidden + end + end + if isHidden == 1 then + ViewUtil.CloseModalWait() + if not DataManager.SelfUser.location then + DataManager.SelfUser.location = Location.new() + end + if DataManager.SelfUser.location:Location2String() == "" then + -- if DataManager.SelfUser.location:Location2String() == "" then + ViewUtil.ErrorTip(nil, "没有打开GPS定位,不能参与该游戏") + get_gps() + return + end + + if self.wait_Pipei ~= nil then + coroutine.stop(self.wait_Pipei) + end + self.wait_Pipei = nil + self.wait_Pipei = coroutine.start(function() + -- local t = math.random( 1, 3 ) + -- coroutine.wait(t) + local roomCtr = ControllerManager.GetController(RoomController) + roomCtr:PublicJoinRoom( + Protocol.WEB_FG_QUEUE_ROOM, + roomid, + is_null, + function(response) + if (response.ReturnCode == -1) then + self._view:GetController('pipei').selectedIndex = 0 + ViewUtil.CloseModalWait('join_room') + RestartGame() + return + end + + if response.ReturnCode ~= 0 then + self._view:GetController('pipei').selectedIndex = 0 + callback(response.ReturnCode) + return + else + self:showPipei(self.curGroup:getPlay(pid)) + ControllerManager.GetCurrenController():PlayerReady() + -- UpdateBeat:Add(__checkExitRoom,self) + -- local mgr_ctr = ControllerManager.GetController(GroupMgrController) + -- mgr_ctr:disconnect() + + -- self.__join_room = true + -- self._view.visible = false + -- ImageLoad.Clear(self.class) + -- ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id) + -- callback(response.ReturnCode) + -- ViewUtil.CloseModalWait('join_room') + -- timer = 0 + end + end, + self.curGroup.id, + pid + ) + end) + + return + end + + local roomCtr = ControllerManager.GetController(RoomController) + roomCtr:PublicJoinRoom( + Protocol.WEB_FG_MATCH_ROOM, + roomid, + is_null, + function(response) + if (response.ReturnCode == -1) then + ViewUtil.CloseModalWait('join_room') + RestartGame() + return + end + + if response.ReturnCode ~= 0 then + callback(response.ReturnCode) + return + else + -- UpdateBeat:Add(__checkExitRoom,self) + self.__join_room = true + -- local mgr_ctr = ControllerManager.GetController(GroupMgrController) + -- mgr_ctr:disconnect() + self._view.visible = false + ImageLoad.Clear(self.class) + ViewManager.ChangeView(ViewManager.View_Main, DataManager.CurrenRoom.game_id) + callback(response.ReturnCode) + ViewUtil.CloseModalWait('join_room') + timer = 0 + end + end, + self.curGroup.id, + pid + ) +end + +function M:_evtAddPlay() + local lst_layer = self.lst_layer + __analyseGameListData(self) + __analysePlayListData(self) + + __fillRoomData(self) +end + +function M:_evtDelPlay() + local lst_layer = self.lst_layer + __analyseGameListData(self) + __analysePlayListData(self) + __fillRoomData(self) +end + +function M:_evtUpdatePlay() + local lst_layer = self.lst_layer + __analyseGameListData(self) + __analysePlayListData(self) + __fillRoomData(self) +end + +function M:_evtDelRoom() + local lst_room = self.lst_room + __fillRoomData(self) +end + +function M:_evtAddRoom() + local lst_room = self.lst_room + __fillRoomData(self) +end + +function M:_evtUpdateRoom() + local lst_room = self.lst_room + __fillRoomData(self) +end + +function M:_evtUpdatePlayerInfo() + self.tex_fag.text = '' .. d2ad(self.curGroup.hp) + -- self.tex_diamo.text = self.curGroup.diamo + -- self._view:GetController("manager").selectedIndex = (self.curGroup.lev < 3 or self.curGroup.partnerLev > 0) and 1 or 0 +end + +function M:_evtUpdateMsg() + local joins = self.curGroup.joins + self._view:GetChild('btn_msg'):GetController('tip').selectedIndex = joins > 0 and 1 or 0 + if joins > 0 and self.curGroup.apply == 0 then + local msg = '有玩家申请加入您的大联盟,请尽快处理' + local msg_view = MsgWindow.new(self._root_view, msg, MsgWindow.MsgMode.OnlyOk) + msg_view:Show() + self:_setHongDian(true) + end +end +function M:_setHongDian(isShow) + --红点提示 + local member_tips = self._view:GetChild('member_tips') + member_tips.visible = isShow +end +function M:_evtInvited(...) + local arg = {...} + local data = arg[1] + local imv = + FGInvitedMsgView.new( + self._root_view, + self.curGroup.id, + function(roomid) + self:__joinRoom(roomid) + end + ) + imv:FillData(data) + imv:Show() +end + +-- 更新牌友圈事件 +function M:_evtUpdateGroup(...) + + -- local btn_remit = self._view:GetChild('btn_remit') + -- local option = self.curGroup.option or 0 + + -- btn_remit.visible = self.curGroup.hide_action == 0 and true or false + + -- if bit:_and(option,4) > 0 then + -- btn_remit.visible = false + -- else + -- btn_remit.visible = true + -- end +end + +-- 未读邮件通知 +function M:_evtNewMailTip(...) + self.ctr_newmail.selectedIndex = 1 +end + +function M:SetRoomListVisible(visible) + self.lst_room.visible = visible +end + +function M:__refreshManager() + local btn_manager = self._view:GetChild('btn_manager') + btn_manager.onClick:Set(function() + local win = GroupMngSettingView.new(self.curGroup.id) + win:Show() + end) + local btn_stat = self._view:GetChild('btn_stat') + btn_stat.onClick:Set( + function() + if not self.mng_view2 then + self.mng_view2 = GroupManagerView.new(self._root_view, self.curGroup.id, 2) + end + -- self:SetRoomListVisible(false) + self.mng_view2:Show() + end + ) + local btn_partner = self._view:GetChild('btn_partner') + btn_partner.onClick:Set( + function() + --print("成员..........................................") + if not self.mng_view3 then + self.mng_view3 = GroupManagerView.new(self._root_view, self.curGroup.id, 5) + self.mng_view3:SetCurrentGroupInfoViewIns(function () + self:OnclickMember() + end) + end + self.mng_view3:Show() + -- self:SetRoomListVisible(false) + end + ) + + + local btn_play = self._view:GetChild('btn_play') + btn_play.onClick:Set(function() + local gl_view =GroupMngGameListView.new(self.curGroup.id) + gl_view:Show() + -- self:SetRoomListVisible(false) + end) + local btn_fginfo = self._view:GetChild('btn_fginfo') + btn_fginfo.onClick:Set( + function() + local m = {} + m.uid = DataManager.SelfUser.account_id + m.portrait = DataManager.SelfUser.head_url + m.nick = DataManager.SelfUser.nick_name + local mflv = GroupMemberFagLogView.new(self.curGroup.id, m, true) + mflv:Show() + end + ) +end + + +function M:OnclickMember() + if not self.mng_view3 then + self.mng_view3 = GroupManagerView.new(self._root_view, self.curGroup.id, 5) + end + self.mng_view3:Show() +end + +-- 显示公告 +function M:__ShowNotice() + local group = DataManager.groups:get(self.curGroup.id) + local str_notice = group.notice + local empty_notice = not str_notice or str_notice == '' + local com_notice = self._view:GetChild('com_notice') + local com_message = com_notice:GetChild('message') + com_notice.visible = not empty_notice + local tex_notice = com_message:GetChild('tex_message') + tex_notice.text = str_notice + local speed_x = 100 + local start_x = com_message.width + 100 + -- local dd = tex_notice.width / com_message.width + local dur_time = (start_x + tex_notice.width + 100) / speed_x + if self._tw_notice then + self._tw_notice:Stop() + end + self._tw_notice = + DSTween.To( + 0, + 1, + dur_time, + function(value) + tex_notice.x = start_x - speed_x * value * dur_time + end + ):OnComplete( + function() + self._tw_notice = nil + self:__ShowNotice() + end + ) +end + +-- 显示玩法信息 +function M:__loadPlayData() + -- 体力值显示 + self:__refreshPay() + -- 房间对象填充 + __fillRoomData(self) +end + +-- 初始化圈子信息 +function M:__loadGroupData() + if self.mng_view then + self.mng_view:Close() + end + local curGroup = self.curGroup + curGroup.update_room = false + curGroup.update_info = false + curGroup.update_joins = false + ViewUtil.ShowModalWait(self._root_view,"正在进入牌友圈,请稍等...") + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_EnterGroup( + curGroup.id, + function(res) + -- if self._is_destroy then + -- return + -- end + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + --self._view.visible=false + --ViewUtil.ErrorTip(res.ReturnCode, "获取圈子数据失败") + else + self._view.visible=true + self:Show() + self:__saveLastData() + local mgr_ctr = ControllerManager.GetController(GroupMgrController) + mgr_ctr:AddEventListener(GroupMgrEvent.AddPlay, handler(self, self._evtAddPlay)) + mgr_ctr:AddEventListener(GroupMgrEvent.DelPlay, handler(self, self._evtDelPlay)) + mgr_ctr:AddEventListener(GroupMgrEvent.UpdatePlay, handler(self, self._evtUpdatePlay)) + mgr_ctr:AddEventListener(GroupMgrEvent.AddRoom, handler(self, self._evtAddRoom)) + mgr_ctr:AddEventListener(GroupMgrEvent.DelRoom, handler(self, self._evtDelRoom)) + mgr_ctr:AddEventListener(GroupMgrEvent.UpdateRoom, handler(self, self._evtUpdateRoom)) + mgr_ctr:AddEventListener(GroupMgrEvent.UpdatePlayerInfo, handler(self, self._evtUpdatePlayerInfo)) + -- mgr_ctr:AddEventListener(GroupMgrEvent.UpdateMessage, handler(self,self._evtUpdateMsg)) + mgr_ctr:AddEventListener(GroupMgrEvent.BeInvited, handler(self, self._evtInvited)) + mgr_ctr:AddEventListener(GroupMgrEvent.UpdateGroup, handler(self, self._evtUpdateGroup)) + mgr_ctr:AddEventListener(GroupMgrEvent.NewMailTip, handler(self, self._evtNewMailTip)) + local ctr_manager = self._view:GetController('manager') + + ctr_manager.selectedIndex = + self.curGroup.lev < 3 and self.curGroup.lev or (self.curGroup.partnerLev > 0 and 3 or 0) + if self.curGroup.lev < 3 then + local ctr_msg = self._view:GetController('msg') + ctr_msg.selectedIndex = 1 + end + + local btn_vip = self._view:GetChild("btn_vip") + if self.curGroup.isvip == 1 then + local vip = self.fg_info[tostring(self.curGroup.id).."vip"] or 0 + self._showVipRooms = vip + btn_vip:GetController("vip").selectedIndex = math.abs( self._showVipRooms - 1) + btn_vip.onClick:Set(function () + btn_vip:GetController("vip").selectedIndex = self._showVipRooms + self._showVipRooms = math.abs( self._showVipRooms - 1 ) + self:_evtUpdatePlay() + local key = tostring(self.curGroup.id) .. "vip" + self.fg_info[key] = self._showVipRooms + local filename = 'fginfo_' .. DataManager.SelfUser.account_id + Utils.SaveLocalFile(filename, json.encode(self.fg_info)) + end) + end + + -- 玩法列表初始化 + __analyseGameListData(self) + __analysePlayListData(self) + + self.lst_layer.selectedIndex = 0 + self.lst_game.selectedIndex = 0 + + self._view:GetController('all').selectedIndex = 1 + + self:ShowSelectedGame() + -- 加载玩法信息 + self:__loadPlayData() + -- 显示公告 + self:__ShowNotice() + curGroup.update_room = false + + local btn_msg = self._view:GetChild('btn_msg') + btn_msg.onClick:Set( + function() + if not self.mng_view1 then + self.mng_view1 = GroupManagerView.new(self._root_view, self.curGroup.id, 1) + end + self.mng_view1:Show(5) + -- self:SetRoomListVisible(false) + end + ) + local btn_invite = self._view:GetChild('btn_invite') + btn_invite.displayObject.gameObject:SetActive(false) + --[[btn_invite.onClick:Set(function() + if not self.mng_view3 then + self.mng_view3 = GroupManagerView.new(self._root_view, self.curGroup.id, 3) + end + self.mng_view3:Show(1) + end)--]] + + -- local btn_rank = self._view:GetChild("btn_rank") + -- btn_rank.onClick:Set(function() + -- local rv = GroupRank.new(self._root_view, self.curGroup.id) + -- rv:Show() + -- end) + -- local btn_remit = self._view:GetChild('btn_remit') + -- btn_remit.onClick:Set( + -- function() + -- local remit_view = GroupRemitView.new(self._root_view, self.curGroup) + -- remit_view:Show() + -- end + -- ) + local option = self.curGroup.option or 0 + + if self.curGroup.lev < 3 then + self:_evtUpdateMsg() + end + + -- btn_remit.visible = self.curGroup.hide_action == 0 and true or false + + -- if bit:_and(option,4) > 0 then + -- btn_remit.visible = false + -- else + -- btn_remit.visible = true + -- end + + -- 选择玩法面板 + local btn_mail = self._view:GetChild('btn_mail') + self.ctr_newmail.selectedIndex = self.curGroup.mail_tip or -1 + btn_mail.onClick:Set( + function() + self.ctr_newmail.selectedIndex = 0 + local gmv = GroupMailView.new(self._root_view, self.curGroup) + gmv:SetCallback( + function() + btn_mail.selected = false + end + ) + gmv:Show() + end + ) + + local btn_bxx = self._view:GetChild('btn_bxx') + btn_bxx.onClick:Set( + function() + local ctrNum=1 + -- if self.curGroup.lev==3 and self.curGroup.partnerLev>0 or self.curGroup.lev==1 or self.curGroup.lev==2 then + -- ctrNum=2 + -- end + if self.curGroup.lev==1 then + ctrNum=2 + end + ctrNum=2 + local gmv = GroupMngFagPackView.new(self.curGroup.id, self._root_view,ctrNum,DataManager.SelfUser.account_id) + gmv:SetCallback( + function() + btn_bxx.selected = false + end + ) + gmv:Show() + end + ) + end + end + ) +end + +-- 匹配游戏 +function M:__startGame(roomid,pid, is_null,isHidden, callback) + ViewUtil.ShowModalWait(self._root_view, '正在加入游戏...', 'join_room') + local _gameCtrl = ControllerManager.GetController(GameController) + local _currentCtrl = ControllerManager.GetCurrenController() + if _gameCtrl == _currentCtrl then + _gameCtrl:LevelRoom( + function(res) + self:__joinRoom_match( + roomid, + pid, + is_null, + isHidden, + function(code) + if code == -2 then + self:__startGame(roomid,pid, is_null, isHidden, callback) + elseif code ~= 0 then + ViewUtil.ErrorMsg(self._root_view, code, '进入房间失败') + ViewUtil.CloseModalWait('join_room') + end + if callback then + callback() + end + end + ) + end + ) + return + end + self:__joinRoom_match( + roomid, + pid, + is_null, + isHidden, + function(code) + if code == -2 then + self:__startGame(roomid, pid, is_null, isHidden, callback) + elseif code ~= 0 then + ViewUtil.ErrorMsg(self._root_view, code, '进入房间失败') + ViewUtil.CloseModalWait('join_room') + end + if callback then + callback() + end + end + ) +end + +-- 显示各玩法体力值信息 +function M:__refreshPay() + --printlog("1111111111111111111111111111",self.curGroup.hp) + self.tex_fag.text = '' .. d2ad(self.curGroup.hp or 0) + -- self.tex_diamo.text = self.curGroup.diamo + + local ctr_all = self._view:GetController('all') + + local currentPlayID = self:GetSelectedPlayID() + local currentGameID = self:GetSelectedGameID() + + if currentPlayID > 0 then + --self._view:GetChild("tex_name").text = __getLayerName(self,currentPlayID) + ctr_all.selectedIndex = 0 + else + if currentGameID == 0 then + ctr_all.selectedIndex = 1 + else + ctr_all.selectedIndex = 0 + end + + -- self._view:GetChild("tex_name").text = __getLayerName(self,0) + self._view:GetChild('tex_name').text = self.curGroup.name + end +end + +-- 分享牌友圈 +function M:__share() + local tem = self.curGroup + local str = string.format('【%s】 邀请您加入!', tem.name) + local url = + string.format( + '%s?type=t1&playerId=%s&groupId=%s', + GetGameInfo('share_group_link'), + DataManager.SelfUser.account_id, + tem.id + ) + local json_data = {} + json_data['title'] = string.format('大联盟号【%s】', tem.id) + local mediaObject = {} + mediaObject['url'] = url + mediaObject['type'] = 0 + json_data['mediaObject'] = mediaObject + json_data['description'] = str + json_data['scene'] = 0 + GameApplication.Instance:ShareLink(1, json.encode(json_data), nil) +end + +function M:showPipei(play) + self._view:GetController('pipei').selectedIndex = 1 + self._view:GetChild('node_matching'):GetController('quxiao').selectedIndex = 0 + if play then + self._view:GetChild('node_matching'):GetChild('text_title').text = play.name + self._view:GetChild('node_matching'):GetChild('text_des').text = DataManager.CurrenRoom.room_config:GetDes() + end + self._pipeiTime = 20 +end +function M:hidePipei() + --print("hidePipei=============") + --print(self._view) + --print(self._view:GetController('pipei')) + if self._view:GetController('pipei') then + self._view:GetController('pipei').selectedIndex = 0 + end + +end +function M:SetCallBack(callback) + self._callback = nil + self._callback = callback +end + +function M:Reconnect() + self:__loadGroupData() +end + +function M:Show() + get_gps() + BaseView.Show(self) + local user = DataManager.SelfUser + local roomid = user.room_id + if user.group_id == self.curGroup.id and string.len(roomid) > 1 then + self:__joinRoom(roomid) + user.group_id = 0 + end +end + +function M:Destroy() + BaseView.Destroy(self) + UpdateBeat:Remove(self.__onUpdate, self) + ImageLoad.Clear(self.class) + GRoot.inst:HidePopup() + timer = 0 + self.pause = true + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_ExitGroupMgr() + if self._pm_mgr_view then + self._pm_mgr_view:Dispose() + end + if self._pm_set_view then + self._pm_set_view:Dispose() + end + if self._pm_rs_view then + self._pm_rs_view:Dispose() + end + if self._callback then + self._callback() + end + if self.mng_view1 then + self.mng_view1:Destroy() + end + if self.mng_view2 then + self.mng_view2:Destroy() + end + if self.mng_view3 then + self.mng_view3:Destroy() + end + if self.mng_view4 then + self.mng_view4:Destroy() + end + DataManager.SelfUser.cur_group = nil + if self._tw_notice then + self._tw_notice:Stop() + end + + for i, v in pairs(_iconMap) do + v.texture:Destroy() + v.ntexture:Unload() + end + _iconMap = {} +end + +return M + diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupJoinsView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupJoinsView.lua new file mode 100644 index 00000000..2a8c8201 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/GroupJoinsView.lua @@ -0,0 +1,103 @@ +--进入牌友圈View对象 +--author:-- + + +local GroupJoinsView = {} + +local M = GroupJoinsView + +function GroupJoinsView.new(blur_view) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupJoinsView" + self._close_destroy = true + self._blur_view = blur_view + self:init("ui://NewGroup/Win_GroupJoins") + self.change = false + return self +end + +local function __fillJoins(self,curGroup,joins) + local lst_joins = self._view:GetChild("lst_joins") + lst_joins:RemoveChildrenToPool() + local fgCtr = ControllerManager.GetController(FriendGroupController) + + for i=1,#joins do + local rdata = joins[i] + local item = lst_joins:AddItemFromPool() + item:GetChild("tex_name").text = rdata.nick + item:GetChild("tex_id").text = "ID:"..rdata.id + local btn_yes = item:GetChild("btn_yes") + btn_yes.data = rdata + btn_yes.onClick:Set(function(context) + local _rd = context.sender.data + ViewUtil.ShowModalWait(self._root_view) + fgCtr:FG_GroupVerifyJoin(curGroup.id,_rd.id,true,function(res1) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res1.ReturnCode == 0 then + curGroup.joins = #res1.Data.joins + self.change = true + __fillJoins(self,curGroup,res1.Data.joins) + else + ViewUtil.ErrorTip(res.ReturnCode,"邀请失败!") + end + end) + end) + local btn_del = item:GetChild("btn_del") + btn_del.data = rdata + btn_del.onClick:Set(function(context) + local _rd = context.sender.data + ViewUtil.ShowModalWait(self._root_view) + fgCtr:FG_GroupVerifyJoin(curGroup.id,_rd.id,false,function(res1) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res1.ReturnCode == 0 then + curGroup.joins = #res1.Data.joins + self.change = true + __fillJoins(self,curGroup,res1.Data.joins) + else + ViewUtil.ErrorTip(res.ReturnCode,"邀请失败!") + end + end) + end) + local btn_head = item:GetChild("btn_head") + ImageLoad.Load(rdata.portrait, btn_head._iconObject) + end +end + +function M:FillData(curGroup) + local lst_joins = self._view:GetChild("lst_joins") + lst_joins:RemoveChildrenToPool() + + local fgCtr = ControllerManager.GetController(FriendGroupController) + fgCtr:FG_GroupJoins(curGroup.id,function( res) + if self._is_destroy then + return + end + if (res.ReturnCode == 0) then + __fillJoins(self,curGroup,res.Data.joins) + else + ViewUtil.ErrorTip(res.ReturnCode,"获取邀请列表失败!") + end + end) +end + +function M:SetCallback(callback) + self.callback = callback +end + + +-- 销毁窗口 +function M:Destroy(remove_map) + if self.change and self.callback then + self.callback() + end + BaseWindow.Destroy(self,remove_map) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupMailView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupMailView.lua new file mode 100644 index 00000000..8cf0f7a6 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/GroupMailView.lua @@ -0,0 +1,107 @@ +--牌友圈邮件View + + +local GroupMailView = {} + +local M = GroupMailView + +function GroupMailView.new(blur_view, curGroup) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupMailView" + self._close_destroy = true + self._blur_view = blur_view + self.curGroup = curGroup + self.mail_data = {} + self._full = true + self:init("ui://NewGroup/Win_Mail") + self:FillView() + return self +end + +function M:FillView() + self.lst_mail = self._view:GetChild("lst_mail") + self.lst_mail:SetVirtual() + self.lst_mail.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + self.lst_mail.scrollPane.onPullUpRelease:Set(function() + self:GetMailData(#self.mail_data) + end) + self:GetMailData(#self.mail_data) + + local btn_delete = self._view:GetChild("btn_delete") + btn_delete.onClick:Set(function() + local msg_tip = MsgWindow.new(self._root_view, "确定要删除所有邮件吗?", MsgWindow.MsgMode.OkAndCancel) + msg_tip.onOk:Add(function() + self:DelAllMail() + end) + msg_tip:Show() + end) +end + +function M:GetMailData(index) + ViewUtil.ShowModalWait(nil) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetMailList(self.curGroup.id, DataManager.SelfUser.account_id, index, 20, function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode == 0 then + if #res.Data.mail_list > 0 then + list_concat(self.mail_data, res.Data.mail_list) + self.lst_mail.numItems = #self.mail_data + end + else + ViewUtil.ErrorTip(res.ReturnCode, "获取邮件列表失败") + end + end) +end + +function M:DelAllMail() + ViewUtil.ShowModalWait(nil) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_DelAllMail(self.curGroup.id, DataManager.SelfUser.account_id, function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode == 0 then + self.mail_data = {} + self.lst_mail.numItems = 0 + else + ViewUtil.ErrorTip(res.ReturnCode, "删除邮件失败") + end + end) +end + +function M:OnRenderItem(index, obj) + local tex_title = obj:GetChild("tex_title") + local tex_content = obj:GetChild("tex_content") + local data = json.decode(self.mail_data[index + 1]) + ImageLoad.Load(data.headurl, obj:GetChild("btn_head")._iconObject, self.class) + local nick = data.nick + local id = data.mgr_id + local hp = d2ad(data.hp) + if data.type == 1 then + local str_lev = data.lev == 3 and "合伙人" or "管理员" + local act = hp >= 0 and "给您增加了" or "扣除了您" + tex_title.text = "消息内容为:"--string.format("%s(%s) %s%s积分", nick, id, act, math.abs(hp)) + tex_content.text = string.format("%s [color=#08a446]%s[/color](%s) %s[color=#08a446] %s [/color]积分", str_lev, nick, id, act, math.abs(hp)) + else + tex_title.text = "消息内容为:"--string.format("%s(%s) 转账给您%s积分", nick, id, math.abs(hp)) + tex_content.text = string.format("[color=#08a446]%s[/color](%s) 转账给您[color=#08a446] %s [/color]积分", nick, id, math.abs(hp)) + end + obj:GetChild("tex_data").text = os.date("%Y-%m-%d %H:%M", data.time) +end + +function M:SetCallback(callback) + self.callback = callback +end + + +-- 销毁窗口 +function M:Destroy(remove_map) + if self.callback then + self.callback() + end + BaseWindow.Destroy(self,remove_map) + ImageLoad.Clear(self.class) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupMainView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupMainView.lua new file mode 100644 index 00000000..57b9fb98 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/GroupMainView.lua @@ -0,0 +1,314 @@ +local JoinGroupView = import('.JoinGroupView') +local GroupSettingView = import('.GroupSettingView') +local CreateGroupView = import('.CreateGroupView') +local GroupInfoView = import('.GroupInfoView') +local PhoneBindView = import("Game.View.Lobby.PhoneBindView") + +local GroupMainView = {} + +local M = GroupMainView + +function GroupMainView.new(main_view, root_view,par_veiw) + --print(debug.traceback()) + local self = setmetatable({}, {__index = M}) + self.class = 'GroupMainView' + UIPackage.AddPackage('base/newgroup/ui/NewGroup') + self._view = main_view + self._root_view = root_view + self._par_veiw = par_veiw + self:InitView() + return self +end + +function M:InitView(url) + --print(url) + -- BlurView(self._view:GetChild("bg"),true) + if DataManager.SelfUser.agent > 0 then + self._view:GetController('agent').selectedIndex = 1 + end + -- local btn_close = self._view:GetChild("btn_close") + -- btn_close.onClick:Set(function() + -- self:Destroy() + -- end) + local fgCtr = ControllerManager.GetController(NewGroupController) + local btn_creategroup = self._view:GetChild('btn_creategroup') + btn_creategroup.onClick:Set(function() + local cgv = CreateGroupView.new(self._root_view) + cgv:Show() + cgv:SetCallback(function(name, pay_type, fg_type) + ViewUtil.ShowModalWait(cgv._root_view) + fgCtr:FG_CreateGroup(name,pay_type,fg_type,function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode == 0 then + cgv:Destroy() + self:FillData() + else + ViewUtil.ErrorTip(res.ReturnCode, '创建大联盟失败!') + end + end) + end) + end) + + self.btn_joingroup = self._par_veiw:GetChild('btn_join_group') + self.btn_joingroup.displayObject.gameObject:SetActive(false) + --[[self.btn_joingroup.onClick:Set(function() + local groups = DataManager.groups.groupList + if #groups == 0 then + local jgv = JoinGroupView.new(self._root_view) + jgv:Show() + else + local info = GroupInfoView.new(groups[1], self.fg_info) + self._groupInfoView = info + info:SetCallBack(function() + self._groupInfoView = nil + self:Show() + self._view.visible = true + end) + info:Show() + self._view.visible = false + end + if not DataManager.SelfUser.phone then + --local phone_view = PhoneBindView.new() + --phone_view:Show() + -- return + end + end)--]] + + -- local btn_setting = self._view:GetChild('btn_setting') + -- btn_setting.onClick:Set( + -- function() + -- local gsv = GroupSettingView.new(self._root_view) + -- gsv:FillData() + -- gsv:SetCallback( + -- function() + -- self:FillData() + -- end + -- ) + -- gsv:Show() + -- end + -- ) + + local btn_refresh = self._view:GetChild('btn_refresh') + btn_refresh.onClick:Set(function() + ViewUtil.ShowModalWait(self._root_view) + fgCtr:FG_GroupList(function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode == 0 then + -- self:__fillTopGroups(res.Data.groups,res.Data.stickGroups) + self:FillData(res.Data.groups) + end + end) + end) + + local lst_group = self._view:GetChild('lst_group') + lst_group.onClickItem:Add(function(context) + local curGroup = context.data.data + local info = GroupInfoView.new(curGroup, self.fg_info) + self._groupInfoView = info + info:SetCallBack(function() + self._groupInfoView = nil + self:Show() + self._view.visible = true + end) + --info:Show() + --self._view.visible = false + end) + + local ctr_empty_group = self._view:GetController('empty_group') + ctr_empty_group.selectedIndex = 1 + + local btn_close = self._view:GetChild("btn_close") + btn_close.onClick:Set(function() + self._view.visible = false + end) +end + +function M:DEnterGroup() + local groups = DataManager.groups.groupList + if #groups == 0 then + --local jgv = JoinGroupView.new(self._root_view) + --jgv:Show() + else + local info = GroupInfoView.new(groups[1], self.fg_info) + self._groupInfoView = info + info:SetCallBack(function() + self._groupInfoView = nil + self:Show() + self._view.visible = true + end) + --info:Show() + --self._view.visible = false + end +end + + +local function SortGroups(a, b) + local sort_a = 0 + local sort_b = 0 + sort_a = a.top and 2000 or 0 + sort_b = b.top and 2000 or 0 + + return sort_a > sort_b +end + +function M:__fill_item(item,group) + item:GetChild('tex_name').text = group.name + item:GetChild('tex_id').text = "ID:".. group.id + local p_num = group.total_member_num + item:GetChild('tex_p_num').text = p_num > 99 and '99+' or p_num + + if group.lev < 3 then + if group.lev == 1 then + item:GetChild('tex_room_num').text = group.room_num + else + item:GetChild('tex_room_num').text = group.room_num > 99 and '99+' or group.room_num + end + else + if group.show_num > 0 and group.room_num > group.show_num then + item:GetChild('tex_room_num').text = group.show_num > 99 and '99+' or group.show_num--group.show_num + else + item:GetChild('tex_room_num').text = group.room_num > 99 and '99+' or group.room_num + end + end + + local btn_head = item:GetChild('btn_head') + btn_head.icon = 'ui://Common/Head0' + ImageLoad.Load(group.o_portrait, btn_head._iconObject, self.class) +end + +function M:FillData() + local groups = DataManager.groups.groupList + -- 读取牌友圈信息 + local filename = 'fginfo_' .. DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(filename) + local fg_info = not json_data and {} or json.decode(json_data) + local fg_info_changed = not json_data and true or (table.nums(fg_info) ~= #groups and true or false) + local new_info = {} + for i = 1, #groups do + local key = tostring(groups[i].id) + local key1 = tostring(groups[i].id).."vip" + if not fg_info[key] then + new_info[key] = 0 + if not fg_info_changed then + fg_info_changed = true + end + else + new_info[key] = fg_info[key] + end + if not fg_info[key1] then + new_info[key1] = 0 + else + new_info[key1] = fg_info[key1] + end + end + self.fg_info = new_info + if fg_info_changed and table.nums(new_info) > 0 then + Utils.SaveLocalFile(filename, json.encode(new_info)) + end + + local ctr_empty_group = self._view:GetController('empty_group') + if #groups == 0 then + self.btn_joingroup:GetController("info").selectedIndex = 0 + ctr_empty_group.selectedIndex = 1 + return + else + self.btn_joingroup:GetController("info").selectedIndex = 1 + ctr_empty_group.selectedIndex = 0 + self:__fill_item(self.btn_joingroup,groups[1]) + end + + local lst_group = self._view:GetChild('lst_group') + lst_group:RemoveChildrenToPool() + for i = 1, #groups do + local group = groups[i] + + local item = lst_group:AddItemFromPool() + item.data = group + self:__fill_item(item,group) + + local btn_top = item:GetChild('btn_top') + local ctr_select = btn_top:GetController('select') + ctr_select.selectedIndex = group.top_time > 0 and 1 or 0 + -- item:GetController('select_index').selectedIndex = group.top_time > 0 and 1 or 0 + btn_top.onClick:Set(function(context) + context:StopPropagation() + local fgCtr = ControllerManager.GetController(NewGroupController) + ViewUtil.ShowModalWait(self._root_view) + fgCtr:FG_TopGroup(group.id,ctr_select.selectedIndex == 0,function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode == 0 then + ctr_select.selectedIndex = group.top_time > 0 and 1 or 0 + self:FillData() + else + ViewUtil.ErrorTip(res.ReturnCode, '置顶大联盟失败!') + end + end) + end) + end + -- end +end + +function M:OnFGChanged(callback) + self._onFGChange = callback +end + +function M:EnterGroup(fg_id) + local curGroup = DataManager.groups:get(fg_id) + local info = GroupInfoView.new(curGroup, self.fg_info) + self._groupInfoView = info + info:SetCallBack(function() + self._groupInfoView = nil + self:FillData() + self._view.visible = true + end) + info:Show() + --self._view.visible = false +end + +function M:Show(fg_id,callback) + local fgCtr1 = ControllerManager.GetController(NewGroupController) + fgCtr1:FG_GroupList(function(res) + if self._is_destroy then + return + end + if res.ReturnCode == 0 then + self:FillData() + if fg_id then + self:EnterGroup(fg_id) + else + if callback then + callback(0) + end + end + else + if callback then + callback(-1) + end + end + + end) +end + +function M:Destroy() + if self._onFGChange then + self._onFGChange() + end + ImageLoad.Clear(self.class) + UIPackage.RemovePackage('base/newgroup/ui/NewGroup') + local num = PlayerPrefs.GetInt('fgroup_bg') + if num == 0 then + num = 1 + end + ResourcesManager.UnLoadGroup('base/newgroup/bg/bg0' .. num) +end + +return M diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua new file mode 100644 index 00000000..5a83267a --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/GroupManagerView.lua @@ -0,0 +1,249 @@ +-- 牌友圈管理界面 +local MngPageConfig = import(".MngView.MngPageConfig") + +local GroupManagerView = {} + +local M = GroupManagerView + +function GroupManagerView.new(blur_view, gid, btn_type, callback) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupManagerView" + -- self._close_destroy = true + self._put_map = false + self._new_hide = false + self._queue = false + self._full = true + self._animation = false + self._blur_view = blur_view + self.group_id = gid + self.partnerList = {} + self.callback = callback + self:init("ui://NewGroup/Win_ManagerView", btn_type) + return self +end + +-- 获取界面配置 +local function getPageConfig(id) + --pt(MngPageConfig.PageList) + for i=1,#MngPageConfig.PageList do + local tem = MngPageConfig.PageList[i] + if tem.id == id then + return tem + end + end +end + +function M:init(url, btn_type) + BaseWindow.init(self,url) + self.titleTxt = self._view:GetChild("n79") + -- if btn_type == 2 then + -- self._view:GetChild("n0"):GetChild("icon").url = "ui://m7iejg46p41ohx8" + -- elseif btn_type == 3 then + -- self._view:GetChild("n0"):GetChild("icon").url = "ui://m7iejg46p41ohx7" + -- elseif btn_type == 4 then + -- self._view:GetChild("n0"):GetChild("icon").url = "ui://m7iejg46p41ohx9" + -- end + local lst_index = self._view:GetChild("lst_index") + lst_index:RemoveChildrenToPool() + local group = DataManager.groups:get(self.group_id) + --根据玩家权限,加载不同的界面配置 + local lev = group.lev + if lev == 3 and group.partnerLev == 0 then + lev = 4 + end + + self.page_config = MngPageConfig.Config[btn_type][lev] + + -- 初始化标题列表 + for i = 1, #self.page_config do + -- print("page_config:"..self.page_config[i]) + local page = getPageConfig(self.page_config[i]) + --如果界面无show_key,或圈子中对应的key为true才显示界面 + if not page.show_key or (page.show_key and group[page.show_key]) then + --如果allicance为ture,则只有大联盟才显示界面 + if (page.alliance and group.type == 2) or not page.alliance then + local item = lst_index:AddItemFromPool() + local title = page.title + item:GetChild("title").text = title + if i == 1 then + item.selected = true + end + end + end + end + + -- coroutine.start(function() + -- coroutine.wait(0) + -- local anchor = self._view:GetChild("anchor") + -- -- 初始界面 + -- local first_page_config = getPageConfig(self.page_config[1]) + -- local gmsv = first_page_config.view.new(self.group_id, self._root_view) + -- self._view_map = {} + -- self._view_map[1] = gmsv + -- gmsv.id = first_page_config.id + -- anchor:AddChild(gmsv._view) + -- printlog("tttttttttttttttttttttt :" , gmsv._view.displayObject.gameObject.name," ",gmsv._view.parent.displayObject.gameObject.name) + -- -- gmsv._view:AddRelation(anchor, RelationType.Size) + -- local offset = get_offset(self._full_offset) + -- gmsv._view.width = GRoot.inst.width -300 - 2 * offset + -- gmsv._view.height = GRoot.inst.height + -- gmsv._view.x = offset + + -- end) + -- 所有子界面加载点 + local anchor = self._view:GetChild("anchor") + -- 初始界面 + local first_page_config = getPageConfig(self.page_config[1]) + local gmsv = first_page_config.view.new(self.group_id, self._root_view) + self._view_map = {} + self._view_map[1] = gmsv + gmsv.id = first_page_config.id + anchor:AddChild(gmsv._view) + --printlog("tttttttttttttttttttttt :" , gmsv._view.displayObject.gameObject.name," ",gmsv._view.parent.displayObject.gameObject.name) + --gmsv._view:AddRelation(anchor, RelationType.Size) + local offset = get_offset(self._full_offset) + gmsv._view.width = GRoot.inst.width - 2 * offset - first_page_config.anchorOffset + gmsv._view.height = GRoot.inst.height + gmsv._view.x = 0--offset + + -- first_page_config = getPageConfig(self.page_config[2]) + -- gmsv = first_page_config.view.new(self.group_id, self._root_view) + -- self._view_map[2] = gmsv + -- gmsv.id = first_page_config.id + -- gmsv._view.visible = false + + -- anchor:AddChild(gmsv._view) + -- gmsv._view:AddRelation(anchor, RelationType.Size) + + + + + -- if first_page_config.refresh then gmsv:initData() end + + -- if #self.page_config == 1 then + -- self._view:GetController("single").selectedIndex = 1 + -- lst_index.visible = false + -- self._view:GetChild("n0"):GetController("v_menu").selectedIndex = 1 + -- end + + + -- 切换界面 + self.ctr_index = self._view:GetController("index") + self.ctr_index.onChanged:Set(function(pas) + local anchor = self._view:GetChild("anchor") + anchor:RemoveChildren() + + + local index = self.ctr_index.selectedIndex + local page_info = getPageConfig(self.page_config[index + 1]) + if not self._view_map[index + 1] then + + local tem = page_info.view.new(self.group_id, self._root_view) + + -- anchor:AddRelation(self._root_view, RelationType.Size,true) + --tem._view:Center(true) + + --print("222222222222222",anchor._view) + anchor:AddChild(tem._view) + -- tem._view.parent = anchor + + local offset = get_offset(self._full_offset) + tem._view.width = GRoot.inst.width - 2 * offset - page_info.anchorOffset + tem._view.height = GRoot.inst.height + tem._view.x = 0--offset + --tem._view:AddRelation(self._root_view, RelationType.Size) + -- tem._view:MakeFullScreen() + + tem.id = page_info.id + self._view_map[index + 1] = tem + -- + -- anchor:SetBoundsChangedFlag() + -- anchor:EnsureBoundsCorrect() + -- tem._view:RemoveRelation(anchor, RelationType.Size) + --tem._view:AddRelation(anchor, RelationType.Size) + else + --self._view_map[index + 1]._view:AddRelation(anchor, RelationType.Size) + anchor:AddChild(self._view_map[index + 1]._view) + end + + --self._view:AddRelation(anchor, RelationType.Size) + -- 如果refresh为true,重新加载界面时执行初始化数据方法initData + if page_info.refresh then + self._view_map[index + 1]:initData() + end + self.titleTxt.text = page_info.title + end) +end + + +function M:SetCurrentGroupInfoViewIns(groupInfoViewCallBack) + self.groupInfoViewCallBack=groupInfoViewCallBack +end + + +-- 获取指定ID的页面 +function M:GetPageByID(id) + for i, v in pairs(self._view_map) do + if v.id == id then + return v + end + end + return nil +end + +-- 根据ID刷新页面 +function M:RefreshPage(id) + local page = self:GetPageByID(id) + if not page then + return + end + page:initData() +end + +function M:Close() + if self.callback then self.callback() end + BaseWindow.Close(self) +end + +function M:Destroy() + for i = 1, #self.page_config do + if self._view_map[i] then + self._view_map[i]._view:Dispose() + if self._view_map[i].clear_image then + ImageLoad.Clear(self._view_map[i].class) + end + end + end + BaseWindow.Destroy(self) +end + +-- quick_access_id 是快速访问标志,打开对应id的页面 +function M:Show(quick_access_id) + local index = self.ctr_index.selectedIndex + printlog("index+1index+1index+1index+1 ",index+1) + if not quick_access_id then + local page_info = getPageConfig(self.page_config[index + 1]) + if page_info.refresh then self._view_map[index + 1]:initData() end + self.titleTxt.text = page_info.title + else + -- 如果是 快速访问 + for i, v in pairs(self.page_config) do + if getPageConfig(v).id == quick_access_id then + self.ctr_index.selectedIndex = i - 1 + if not self._view_map[i] then + local tem = page_info.view.new(self.group_id, self._root_view) + self._view_map[i] = tem + end + local anchor = self._view:GetChild("anchor") + anchor:AddChild(self._view_map[i]._view) + self._view_map[i]:navigation() + --self._view:AddRelation(anchor, RelationType.Size) + break + end + end + end + BaseWindow.Show(self) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupMngFagPackView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupMngFagPackView.lua new file mode 100644 index 00000000..067a0189 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/GroupMngFagPackView.lua @@ -0,0 +1,291 @@ +-- 能量包 +local GroupTakeLogView = import(".MngView.GroupTakeLogView") +local GroupRewardsLogView = import(".MngView.GroupRewardsLogView") +local GroupNumberInputView = import(".MngView.GroupNumberInputView") +local GroupBankLogView = import(".MngView.GroupBankLogView") + +local GroupMngFagPackView = {} + +local M = GroupMngFagPackView + +function GroupMngFagPackView.new(gid, blur_view,ctrNum,uid) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + + self.class = "GroupMngFagPackView" + self._close_destroy = true + self.group_id = gid + self.blur_view = blur_view + self.ctrNum=ctrNum + self.shouyiData = {} + self.uid = uid + self:init("ui://NewGroup/Win_bxx") + self:FillView() + return self +end + +function M:FillView() + + self.Ctr=self._view:GetController("ctr") + self.Ctr.selectedIndex=1 + + self.lst_bxx = self._view:GetChild('bxx_list') + self.lst_bxx:SetVirtual() + self.lst_bxx.itemRenderer = function(index, item) + self:fillGameItem(index, item) + end + + + self.lst_bxx.onClickItem:Add( + function(pas) + if self.currentSelectItem == pas.data then return end + local name=pas.data.icon + self.currentGameItemName=name + self.lst_bxx.numItems=self.ctrNum + end + ) + + + self.playerJF=self._view:GetChild('tex_player') + self.bankJF=self._view:GetChild('tex_bank') + + self.ctr_page = self._view:GetController("type") + self.ctr_page.onChanged:Set(function() + if self.ctr_page.selectedIndex == 0 then + if self.shouyiData.day_rewad then + self._view:GetChild("tex_total").text = d2ad(self.shouyiData.day_rewad) + end + elseif self.ctr_page.selectedIndex == 1 then + if self.shouyiData.day_rewad_1 then + self._view:GetChild("tex_total").text = d2ad(self.shouyiData.day_rewad_1) + end + elseif self.ctr_page.selectedIndex == 2 then + if self.shouyiData.day_rewad_2 then + self._view:GetChild("tex_total").text = d2ad(self.shouyiData.day_rewad_2) + end + end + end) + + self._view:GetChild("btn_bankinfo").onClick:Set(function() + local gtlv = GroupBankLogView.new(self.blur_view, self.group_id,self.uid) + gtlv:Show() + end) + + local btn_cr = self._view:GetChild('btn_qd') + btn_cr.onClick:Set( + function() + + local gniv = GroupNumberInputView.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_SAVEBankInfo(self.group_id, value,self.uid ,function(res1) + ViewUtil.CloseModalWait() + pt(res1) + if (res1.ReturnCode == 0) then + self:SetBank(res1.Data.hp,res1.Data.b_hp) + ViewUtil.ErrorTip(100011000,"积分存取成功!") + else + ViewUtil.ErrorTip(res1.ReturnCode,"存取积分失败!") + end + end) + + end, 0, nil) + gniv:Show() + + + end + ) + + + local btn_qc = self._view:GetChild('btn_qc') + btn_qc.onClick:Set( + function() + + local gniv = GroupNumberInputView.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_TakeBankInfo(self.group_id, value,self.uid, function(res1) + ViewUtil.CloseModalWait() + pt(res1) + if (res1.ReturnCode == 0) then + self:SetBank(res1.Data.hp,res1.Data.b_hp) + ViewUtil.ErrorTip(100011000,"积分取出成功!") + else + ViewUtil.ErrorTip(res1.ReturnCode,"获取积分失败!") + end + end) + + end, 0, nil) + gniv:Show() + + end + ) + + + --------------------------- + self._view:GetChild("btn_take_log").onClick:Set(function() + local gtlv = GroupTakeLogView.new(self.blur_view, self.group_id,self.uid) + gtlv:Show() + end) + self._view:GetChild("btn_hp_info").onClick:Set(function() + local grlv = GroupRewardsLogView.new(self.blur_view, self.group_id,self.uid) + grlv:Show() + end) + self._view:GetChild("btn_take").onClick:Set(function() + local gniv = GroupNumberInputView.new(self.blur_view, function(num) + if ad2d(num) > self._total_hp then + ViewUtil.ErrorTip(nil, "奖励池积分不足") + return + end + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_TakeHp(self.group_id, ad2d(num), self.uid,function(res) + if num == 0 then + ViewUtil.ErrorTip(nil, "提取值必须大于0") + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "提取能量包失败") + else + self._total_hp = res.Data.r_hp + self._view:GetChild("tex_left").text = d2ad(self._total_hp) + end + end) + end, 1, d2ad(self._total_hp), "ui://NewGroup/Win_TakeHp") + gniv:Show() + end) + + --self:initBankData() + self:initShouyiData() + self.lst_bxx.numItems=self.ctrNum +end + + + +function M:initBankData() + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetBankInfo(self.group_id, self.uid,function(res) + pt(res) + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取银行数据失败") + else + self:SetBank(res.Data.total_hp,res.Data.bank_hp) + self.Ctr.selectedIndex=0 + + end + + end) +end + + + + +function M:initShouyiData() + ViewUtil.ShowModalWait() + self.shouyiData = {} + self._view:GetChild("tex_total").text = 0 + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetTakeInfo(self.group_id,self.uid ,function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取保险箱数据失败") + else + local data = res.Data + self.ctr_page.selectedIndex = 0 + self.shouyiData = data + self._view:GetChild("tex_left").text = d2ad(data.total_hp) + self._view:GetChild("tex_total").text = d2ad(data.day_rewad) + --self._view:GetChild("tex_totalshouyi").text = 0 + self._total_hp = data.total_hp + self.Ctr.selectedIndex=1 + end + end) +end + +function M:SetCallback(callback) + self.callback = callback +end + + +function M:SetBank(totalHp,bankHp) + self.playerJF.text=totalHp/1000 + self.bankJF.text=bankHp/1000 +end + + + +function M:fillGameItem(index, item) + if index~=0 then + item.icon="ui://NewGroup/button_cqg" + if self.currentGameItemName==nil then + item.icon="ui://NewGroup/button_cqg_xz" + end + else + item.icon="ui://NewGroup/button_sjjl" + end + + + + if self.currentGameItemName==item.icon then + item.icon=item.icon.."_xz" + if index~=0 then + self:initBankData() + else + self:initShouyiData() + end + end + + + +end + + + + + + + + + + + + +-- 销毁窗口 +function M:Destroy(remove_map) + if self.callback then + self.callback() + end + BaseWindow.Destroy(self,remove_map) + ImageLoad.Clear(self.class) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupMngSettingView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupMngSettingView.lua new file mode 100644 index 00000000..ff2d3e3f --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/GroupMngSettingView.lua @@ -0,0 +1,125 @@ +-- 牌友圈设置界面 +local GroupMngSettingView = {} + +local M = GroupMngSettingView + +function GroupMngSettingView.new(gid) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupMngSettingView" + self._close_destroy = true + self.group_id = gid + -- self._full = true + self:init("ui://NewGroup/Win_GroupSetting") + self:FillView() + return self +end + +function M:initData() + +end + +function M:FillView() + local tex_name = self._view:GetChild("tex_name") + local tex_notice = self._view:GetChild("tex_notice") + local ctr_ban = self._view:GetController("ban") + local ctr_dissolve_time = self._view:GetController("dissolve_time") + local ctr_kick_time = self._view:GetController("kick_time") + local ctr_apply = self._view:GetController("apply") + local ctr_alliance = self._view:GetController("alliance") + + local ctr_pt = self._view:GetController("pt") + local ctr_wq = self._view:GetController("wq") + local ctr_es = self._view:GetController("es") + local ctr_ua = self._view:GetController("ua") + + local ctl_show_num = self._view:GetController("showAll") + + local btn_chat_input = self._view:GetChild("btn_chat_input") + local btn_chat_voice = self._view:GetChild("btn_chat_voice") + local group = DataManager.groups:get(self.group_id) + tex_name.text = group.name + tex_notice.text = group.notice + ctr_ban.selectedIndex = group.ban and 1 or 0 + ctr_dissolve_time.selectedIndex = group.dissolve_opt - 1 + ctr_kick_time.selectedIndex = group.kick_opt - 1 + ctr_alliance.selectedIndex = group.type - 1 + ctr_apply.selectedIndex = group.apply or 0 + btn_chat_input.selected = not group.ban_chat1 + btn_chat_voice.selected = not group.ban_chat2 + + if group.show_num == 0 then + ctl_show_num.selectedIndex = 0 + else + ctl_show_num.selectedIndex = 1 + self._view:GetChild("txt_show_num").text = tostring(group.show_num) + end + + local option = group.option or 0 + + ctr_pt.selectedIndex = bit:_and(option,1) > 0 and 1 or 0 + ctr_wq.selectedIndex = bit:_and(option,2) > 0 and 1 or 0 + ctr_es.selectedIndex = bit:_and(option,4) > 0 and 1 or 0 + ctr_ua.selectedIndex = bit:_and(option,8) > 0 and 1 or 0 + + self._view:GetChild("btn_ok").onClick:Set(function() + ViewUtil.ShowModalWait() + local gid = self.group_id + local name = tex_name.text + local notice = tex_notice.text + local ban = ctr_ban.selectedIndex == 1 + local dissolve_opt = ctr_dissolve_time.selectedIndex + 1 + local kick_opt = ctr_kick_time.selectedIndex + 1 + local apply = ctr_alliance.selectedIndex == 1 and ctr_apply.selectedIndex or 0 + local ban_chat1 = not btn_chat_input.selected + local ban_chat2 = not btn_chat_voice.selected + local fgCtr = ControllerManager.GetController(NewGroupController) + + local pt = ctr_pt.selectedIndex + local wq = ctr_wq.selectedIndex + local es = ctr_es.selectedIndex + local ua = ctr_ua.selectedIndex + + local option = 0 + if ctr_pt.selectedIndex == 1 then + option = bit:_or(option,1) + end + if ctr_wq.selectedIndex == 1 then + option = bit:_or(option,2) + end + if ctr_es.selectedIndex == 1 then + option = bit:_or(option,4) + end + if ctr_ua.selectedIndex == 1 then + option = bit:_or(option,8) + end + + local showNum = 0 + if ctl_show_num.selectedIndex == 1 then + local strShowNum = self._view:GetChild("txt_show_num").text + if strShowNum ~= nil and strShowNum ~= "" then + showNum = tonumber(self._view:GetChild("txt_show_num").text) + end + end + + fgCtr:FG_UpdateGroupInfo(gid, name, notice, ban, dissolve_opt, kick_opt, apply, ban_chat1, ban_chat2, option,showNum, function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode,"设置大联盟失败。") + else + ViewUtil.ShowBannerOnScreenCenter("设置成功") + group.name = name + group.notice = notice + group.ban = ban + group.ban_ip = ban_ip + group.ban_gps = ban_gps + group.apply = apply + group.option = option + group.ban_chat1 = ban_chat1 + group.ban_chat2 = ban_chat2 + end + end) + end) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupQuickStartView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupQuickStartView.lua new file mode 100644 index 00000000..04093d3c --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/GroupQuickStartView.lua @@ -0,0 +1,41 @@ +-- 快速上桌 +local GroupQuickStartView = {} + +local M = GroupQuickStartView + +function GroupQuickStartView.new(blur_view,callback) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupQuickStartView" + self._close_destroy = true + self._blur_view = blur_view + self._callback = callback + local url = "ui://NewGroup/Win_QuickStart" + self:init(url) + return self +end + +function M:init(url) + BaseWindow.init(self,url) +end + +function M:FillData(list, index) + self._index = index + local lst_game = self._view:GetChild("lst_game") + lst_game:RemoveChildrenToPool() + for i = 1, #list do + local tem = list[i] + local item = lst_game:AddItemFromPool() + item.title = tem.name + item.selected = index == i + end + local btn_confirm = self._view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + if self._callback then + self._callback(lst_game.selectedIndex + 1) + end + self:Destroy() + end) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupRecordView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupRecordView.lua new file mode 100644 index 00000000..95587a7f --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/GroupRecordView.lua @@ -0,0 +1,307 @@ +--牌友圈选择玩法View + + +local GroupRecordView = {} + +local M = GroupRecordView + +function GroupRecordView.new(curGroup, qid, includeMembers, begin_time, end_time, time_type) + + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupRecordView" + self._close_destroy = true + self.curGroup = curGroup + self.qid = qid + self.includeMembers = includeMembers + self.begin_time = begin_time + self.end_time = end_time + self.time_type = time_type + self:init("ui://NewGroup/View_GroupStatSpe") + return self +end + +function M:init(url) + BaseWindow.init(self,url) + + self.record_data = {} --回放数据 + + self.lst_record = self._view:GetChild("lst_record") + self.lst_record:SetVirtual() + self.lst_record.itemRenderer = function(index, obj) + self:OnRenderRecordItem(index, obj) + end + self.lst_record.scrollPane.onPullUpRelease:Set(function() + self:GetRecordData(self.lst_record.numItems) + end) + + self:GetRecordData(0) +end + +function M:OnRenderRecordItem(index, obj) + local data = self.record_data[index + 1] + self:FillRecordItem(data, obj) +end + +function M:GetRecordData(index) + + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetGroupRecordSpe(self.curGroup, GetPlatform(), self.qid, self.includeMembers, index, 6, self.begin_time, self.end_time, self.time_type, function(res) + + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取回放数据失败") + else + local records = res.Data.records + for i = 1, #records do + self.record_data[#self.record_data + 1] = records[i] + end + self.lst_record.numItems = #self.record_data + end + end) +end + +function M:FillRecordItem(data, obj) + + local game_id = data.game_id + local room_id = data.room_id + local create_time = data.create_time + local room_type_str = data.game_info.name + local time =tonumber(create_time) + local room_time_str = os.date("%Y-%m-%d\n%H:%M", time) + local totalScore = json.decode(data.totalScore) + local hpOnOff = data.hpOnOff + local hpType = data.game_info.hpType + local player_list = {} + for i = 1, #totalScore do + local p = totalScore[i] + player_list[i] = {} + player_list[i].id = p.accId + local score = p.score + if hpOnOff == 1 and hpType > 1 then + score = score / 10 + end + player_list[i].score = score + player_list[i].house = 0 + player_list[i].nick = p.nick + end + local play_name = DataManager.groups:get(self.curGroup):getPlayName(data.groupPid) + + obj:GetChild("tex_time").text = room_time_str + obj:GetChild("tex_roomid").text = room_id + obj:GetChild("tex_times").text = d2ad(data.hp_times).."倍" + obj:GetChild("tex_game").text = play_name + local lst_total = obj:GetChild("lst_total") + lst_total:RemoveChildrenToPool() + for j=1,#totalScore do + local titem = lst_total:AddItemFromPool() + local trdata = totalScore[j] + titem:GetChild("tex_name").text = ViewUtil.stringEllipsis(trdata.nick) + titem:GetChild("tex_id").text = "ID:"..trdata.accId + local score = trdata.score + if trdata.hp == nil then + if hpOnOff == 1 and hpType > 1 then + score = score / 10 + end + else + score = d2ad(trdata.hp) + end + + titem:GetChild("tex_score").text = score + + if score >= 0 then + titem:GetController("num_color").selectedIndex = 0 + else + titem:GetController("num_color").selectedIndex = 1 + end + end + + if #totalScore >= 6 then + obj:GetController("person_num").selectedIndex = 1 + else + obj:GetController("person_num").selectedIndex = 0 + end + + obj:GetChild("btn_screenshot").onClick:Set(function() + self:OnShareScreenShot(room_id, room_type_str, room_time_str, totalScore, hpOnOff, hpType) + end) + + obj:GetChild("btn_share").onClick:Set(function() + ShareChatRoom(room_id, tostring(os.time()), data.round, room_type_str, self.group_id, player_list) + end) + obj.onClick:Set(function() + self:OnShowRecordInfo(data) + end) +end + +function M:OnShareScreenShot(room_id, room_type_str, room_time_str, totalScore, hpOnOff, hpType) + ViewUtil.ShowModalWait(self._view, "正在分享...") + UIPackage.AddPackage("base/rank/ui/Rank") + local result_view = UIPackage.CreateObjectFromURL("ui://Rank/ResultView") + result_view.visible = false + self._view:AddChild(result_view) + result_view.x = -308 + result_view.y = -47 + result_view:GetChild("tex_roomnum").text = "房间号:" .. room_id .. " " .. room_type_str + result_view:GetChild("tex_data").text = room_time_str + result_view:GetChild("btn_confirm").onClick:Set(function() result_view:Dispose() end) + local lst_p = result_view:GetChild("list_result") + local load_head_num = #totalScore + for j = 1, #totalScore do + local p = totalScore[j] + local item = lst_p:AddItemFromPool() + item:GetChild("name").text = p.nick + local score = p.score + if hpOnOff == 1 and hpType > 1 then + score = score / 10 + end + item:GetChild("score").text = score + if score < 0 then item:GetController("di").selectedIndex = 1 end + if p.portrait and p.portrait ~= "" then + ImageLoad.Load(p.portrait, item:GetChild("n9")._iconObject, self.class, function( ... ) + load_head_num = load_head_num - 1 + end) + else + load_head_num = load_head_num - 1 + end + end + coroutine.start(function ( ... ) + local left_time = 4 + while (true) do + if load_head_num == 0 or left_time == 0 then + result_view.visible = true + coroutine.wait(0.2) + ShareScreenShotWithOption(function() + result_view:Dispose() + end) + ViewUtil.CloseModalWait() + break + end + coroutine.wait(1) + left_time = left_time - 1 + end + end) +end + +function M:OnShowRecordInfo(rdata) + local ctr_record = self._view:GetController("record") + ctr_record.selectedIndex = 1 + + local lst_recordInfo = self._view:GetChild("lst_recordInfo") + lst_recordInfo:RemoveChildrenToPool() + -- lst_recordInfo.scrollPane.currentPageX = 0 + local round_count = tonumber(rdata.round) + local game_id = rdata.game_info.game_id + local playback_id = rdata.military_id + local hpOnOff = rdata.hpOnOff + local hpType = rdata.game_info.hpType + local play_name = DataManager.groups:get(self.curGroup):getPlayName(rdata.groupPid) + for i = 1,round_count do + local item = lst_recordInfo:AddItemFromPool() + item:GetChild("tex_num").text = tostring(i) + item:GetChild("tex_game").text = play_name + item:GetChild("tex_times").text = d2ad(rdata.hp_times).."倍" + item:GetChild("tex_roomid").text = rdata.room_id + local round_score_str = rdata["round_"..i] + local round_score_item = json.decode(round_score_str) + local lst_total = item:GetChild("lst_total") + lst_total:RemoveChildrenToPool() + for k=1,#round_score_item do + local titem = lst_total:AddItemFromPool() + local trdata = round_score_item[k] + titem:GetChild("tex_name").text = ViewUtil.stringEllipsis(trdata.nick) + titem:GetChild("tex_id").text = trdata.accId and ("ID:"..trdata.accId) or "" + local score = trdata.score + if trdata.hp == nil then + if hpOnOff == 1 and hpType > 1 then + score = score / 10 + end + else + score = d2ad(trdata.hp) + end + + titem:GetChild("tex_score").text = score + end + + if #round_score_item >= 6 then + item:GetController("person_num").selectedIndex = 1 + else + item:GetController("person_num").selectedIndex = 0 + end + + local btn_play =item:GetChild("btn_play") + btn_play.onClick:Set(function() + local group = DataManager.groups:get(self.curGroup) + if DataManager.SelfUser.playback[playback_id] ~= nil and DataManager.SelfUser.playback[playback_id][i] ~= nil then + local room = ExtendManager.GetExtendConfig(game_id):NewRoom() + DataManager.CurrenRoom = room + room.lev = group.lev + room.game_id = game_id + local extend = ExtendManager.GetExtendConfig(game_id) + extend:FillPlayBackData(DataManager.SelfUser.playback[playback_id][i]) + if not room.self_player then + room.self_player = room:GetPlayerBySeat(1) + end + local main = self:GenaratePlayBack(ViewManager.View_PlayBack, game_id) + main._currentId = playback_id + main._currentRound = i + main._totalRound = tonumber(rdata.round) + main:FillRoomData(DataManager.SelfUser.playback[playback_id][i]) + else + ViewUtil.ShowModalWait(self._view) + local _data = {} + _data["military_id"] = playback_id + _data["round"] = tostring(i) + local loddyCtr1 = ControllerManager.GetController(LoddyController) + loddyCtr1:RequestPlayBack(_data,function(code,data) + ViewUtil.CloseModalWait() + if code == 0 then + if DataManager.SelfUser.playback[playback_id] ~= nil then + DataManager.SelfUser.playback[playback_id][i] = data + else + local playback_data = {} + playback_data[i] = data + DataManager.SelfUser.playback[playback_id] = playback_data + end + + local main = self:GenaratePlayBack(ViewManager.View_PlayBack, game_id) + main._currentId = playback_id + main._currentRound = i + main._totalRound = tonumber(rdata.round) + main:FillRoomData(data) + main._room.lev = group.lev + elseif code == 25 then + ViewUtil.ErrorTip(-1, "回放未找到!") + -- btn_play_back.grayed = true + end + end, rdata.game_info) + end + end) + end +end + + +function M:GenaratePlayBack(id, game_id, ...) + local tem =nil + local dview_class = nil + if not dview_class then + local exconfig = ExtendManager.GetExtendConfig(game_id) + dview_class = exconfig:GetView(id) + end + if not dview_class then + return + end + local arg = {...} + tem = dview_class.new(...) + tem.Id = id + tem:Show() + return tem +end + + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupRemitView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupRemitView.lua new file mode 100644 index 00000000..ee812b6a --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/GroupRemitView.lua @@ -0,0 +1,124 @@ +--牌友圈转让View + + +local GroupRemitView = {} +local GroupNumberInputView = import(".MngView.GroupNumberInputView") + +local M = GroupRemitView + +function GroupRemitView.new(blur_view, curGroup) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupRemitView" + self._close_destroy = true + self._blur_view = blur_view + self.curGroup = curGroup + self:init("ui://NewGroup/Win_Remit") + self:FillView() + return self +end + +function M:FillView() + local fgCtr = ControllerManager.GetController(NewGroupController) + self._ctr_result = self._view:GetController("result") + local remite_id, remite_num + + local btn_id = self._view:GetChild("btn_id") + btn_id.onClick:Set(function() + local gfv = GroupNumberInputView.new(self._root_view, function(num) + remite_id = num + btn_id.title = num + self._ctr_result.selectedIndex = 0 + end) + gfv:Show() + end) + + local btn_num = self._view:GetChild("btn_num") + btn_num.onClick:Set(function() + local gfv = GroupNumberInputView.new(self._root_view, function(num) + remite_num = num + btn_num.title = num + end) + gfv:Show() + end) + + local btn_search = self._view:GetChild("btn_search") + btn_search.onClick:Set(function() + self._ctr_result.selectedIndex = 0 + if not remite_id then + ViewUtil.ErrorTip(nil, "请输入玩家ID") + return + end + ViewUtil.ShowModalWait(nil) + fgCtr:FG_RemitFindMember(self.curGroup.id, remite_id, function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "查询玩家失败") + return + else + if not res.Data.uid then + ViewUtil.ErrorTip(nil, "查询玩家失败") + return + end + self._ctr_result.selectedIndex = 1 + self._view:GetChild("tex_id").text = res.Data.uid + self._view:GetChild("tex_name").text = res.Data.nick + if res.Data.portrait then + ImageLoad.Load(res.Data.portrait, self._view:GetChild("btn_head")._iconObject) + end + end + end) + end) + + local btn_ok = self._view:GetChild("btn_ok") + btn_ok.onClick:Set(function() + local msgbox = MsgWindow.new(self._root_view, "确定要转让积分吗?", MsgWindow.MsgMode.OkAndCancel) + msgbox.onOk:Add(function( ... ) + if not remite_id then + ViewUtil.ErrorTip(nil, "请输入玩家ID") + return + end + if self._ctr_result.selectedIndex == 0 then + ViewUtil.ErrorTip(nil, "请先搜索玩家") + return + end + if not remite_num then + ViewUtil.ErrorTip(nil, "请输入转让数量") + return + end + ViewUtil.ShowModalWait(nil) + fgCtr:FG_FagRemit(self.curGroup.id, remite_id, ad2d(remite_num), function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "转让失败") + return + else + local msgbox2 = MsgWindow.new(self._root_view, "转让积分成功", MsgWindow.MsgMode.OnlyOk) + msgbox2:Show() + end + end) + end) + msgbox:Show() + end) +end + +function M:SetCallback(callback) + self.callback = callback +end + + +-- 销毁窗口 +function M:Destroy(remove_map) + if self.change and self.callback then + self.callback() + end + BaseWindow.Destroy(self,remove_map) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupSelectPlayView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupSelectPlayView.lua new file mode 100644 index 00000000..74d906b1 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/GroupSelectPlayView.lua @@ -0,0 +1,60 @@ +--牌友圈选择玩法View + + +local GroupSelectPlayView = {} + +local M = GroupSelectPlayView + +function GroupSelectPlayView.new(blur_view, curGroup, i) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupSelectPlayView" + self._close_destroy = true + self._blur_view = blur_view + self.curGroup = curGroup + self:init("ui://NewGroup/Win_SelectGame") + self:FillView(i) + return self +end + +function M:FillView(i) + self.lst_game = self._view:GetChild("lst_game") + self.lst_game:SetVirtual() + self.lst_game.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + self.lst_game.numItems = #self.curGroup.playList + 1 + self.lst_game.selectedIndex = i +end + +function M:OnRenderItem(index, obj) + if index == 0 then + obj.title = "全部" + else + local play = self.curGroup.playList[index] + obj.title = play.name + end + obj.onClick:Set(function() + if self.lst_game.selectedIndex ~= index then + self._update = index + end + self:Destroy() + end) +end + +function M:SetCallback(callback) + self.callback = callback +end + + +-- 销毁窗口 +function M:Destroy(remove_map) + if self._update then + self.callback(self._update) + else + self.callback() + end + BaseWindow.Destroy(self,remove_map) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupSetDefaultGameView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupSetDefaultGameView.lua new file mode 100644 index 00000000..7bdc0968 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/GroupSetDefaultGameView.lua @@ -0,0 +1,126 @@ +-- 牌友圈默认玩法设置界面 +local GroupSetDefaultGameView = {} + +local M = GroupSetDefaultGameView + +function GroupSetDefaultGameView.new(gid,blur_view,callback) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupSetDefaultGameView" + self._close_destroy = true + self.group_id = gid + self._blur_view = blur_view + self._callback = callback + local url = "ui://NewGroup/Win_SetDefaultGame" + self:init(url) + return self +end + +function M:init(url) + BaseWindow.init(self,url) +end + +function M:FillData(list, index,callbackFill) + self.callbackFill=callbackFill + self._index = index + local lst_game = self._view:GetChild("lst_game") + lst_game:RemoveChildrenToPool() + + local playName="playfaconfig"..self.group_id + local json_data = Utils.LoadLocalFile(playName) + local localDataPlay=nil + if json_data then + localDataPlay = json.decode(json_data) + end + + + for i = 1, #list do + local tem = list[i] + local item = lst_game:AddItemFromPool() + item.title = tem.name + item.selected = index == i + + local group = DataManager.groups:get(self.group_id) + local MarkSelect=item:GetChild("btn_select") + + --if group.lev==1 then + -- MarkSelect.visible=true + --else + -- MarkSelect.visible=false + --end + + MarkSelect.visible=true + if localDataPlay and localDataPlay[tostring(tem.id)] then + MarkSelect.selected=localDataPlay[tostring(tem.id)] + else + MarkSelect.selected=false + end + + MarkSelect.onClick:Set(function() + self:MarkPlay(MarkSelect,tem.id,MarkSelect.selected) + end) + + + + end + local btn_confirm = self._view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + if self._callback then + self._callback(lst_game.selectedIndex + 1) + end + self:Destroy() + end) + + + + +end + + + + + + +function M:MarkPlay(markS,pid,isMark) + --[[local fgCtr = ControllerManager.GetController(NewGroupController) + ViewUtil.ShowModalWait() + fgCtr:FG_MarkPlay(self.group_id, pid, isMark, function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode == 0 then + local group = DataManager.groups:get(self.group_id) + group:markPlay(pid, isMark) + if self.callbackFill then + self.callbackFill() + end + else + markS.selected=not isMark + ViewUtil.ErrorTip(res.ReturnCode,"设置失败,或已达设置上限") + end + end)--]] + + if DataManager.SelfUser.PlayLocalList==nil then + DataManager.SelfUser.PlayLocalList={} + end + + DataManager.SelfUser.PlayLocalList[tostring(pid)]=isMark + --printlog("111111111122222222222223333333333333") + --pt(DataManager.SelfUser.PlayLocalList) + + local playName="playfaconfig"..self.group_id + + Utils.SaveLocalFile(playName, json.encode(DataManager.SelfUser.PlayLocalList)) + + if self.callbackFill then + self.callbackFill() + end + + +end + + + + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupSetTagView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupSetTagView.lua new file mode 100644 index 00000000..b87b35ec --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/GroupSetTagView.lua @@ -0,0 +1,45 @@ +-- 备注界面 +local GroupSetTagView = {} + +local M = GroupSetTagView + +function GroupSetTagView.new(group_id, member, callback) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupSetTagView" + self._close_destroy = true + self.callback = callback + self.group_id = group_id + self:init("ui://NewGroup/Win_SetTag", member) + return self +end + +function M:init(url, member) + BaseWindow.init(self,url) + + local tex_tag = self._view:GetChild("tex_tag") + if tag ~= 0 then + tex_tag.text = member.score + end + self._view:GetChild("btn_ok").onClick:Set(function() + ViewUtil.ShowModalWait(nil) + local score = tonumber(tex_tag.text) or 0 + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_SetMemberTag(self.group_id, member.uid, score, function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "备注失败") + else + ViewUtil.ShowBannerOnScreenCenter("备注成功") + member.score = score + self:Destroy() + self.callback(true) + end + end) + end) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/GroupSettingView.lua b/lua_probject/base_project/Game/View/NewGroup/GroupSettingView.lua new file mode 100644 index 00000000..5d3993fc --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/GroupSettingView.lua @@ -0,0 +1,132 @@ +--牌友圈设置View对象 +--author:-- + +local CreateGroupView = import(".CreateGroupView") + +local GroupSettingView = {} + +local M = GroupSettingView + +function GroupSettingView.new(blur_view) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupSettingView" + self._close_destroy = true + self._blur_view = blur_view + + self:init("ui://NewGroup/Win_GroupSetting") + return self +end + + +local function __removeGroup(self,msg,curData) + local fgCtr = ControllerManager.GetController(NewGroupController) + local _curren_msg = MsgWindow.new(self._root_view, msg, MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add(function() + ViewUtil.ShowModalWait(self._root_view) + local func = curData.owner == DataManager.SelfUser.account_id and fgCtr.FG_RemoveGroup or fgCtr.FG_ExitGroup + func(fgCtr, curData.id, function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode == 0 then + self.change = true + local groups = DataManager.groups.groupList + if #groups > 0 then + self:FillData() + else + self:Destroy() + end + else + ViewUtil.ErrorTip(res.ReturnCode,"删除大联盟失败!") + end + end) + end) + _curren_msg:Show() + +end + +function M:init(url) + BaseWindow.init(self,url) + local lst_group = self._view:GetChild("lst_group") + + local btn_remove = self._view:GetChild("btn_remove") + btn_remove.onClick:Set(function() + local group = lst_group:GetChildAt(lst_group.selectedIndex).data + __removeGroup(self,"您确定解散该大联盟吗?",group) + end) + local btn_exit = self._view:GetChild("btn_exit") + btn_exit.onClick:Set(function() + local group = lst_group:GetChildAt(lst_group.selectedIndex).data + __removeGroup(self,"您确定退出该大联盟吗?",group) + end) + lst_group.onClickItem:Add(function(context) + local group = context.data.data + + if group.lev == 1 then + self._view:GetController("opt").selectedIndex = 2 + else + local option = group.option or 0 + if bit:_and(option,2) > 0 then + self._view:GetController("opt").selectedIndex = 1 + + else + self._view:GetController("opt").selectedIndex = 0 + end + end + end) + +end + +function M:FillData() + local groups = DataManager.groups.groupList + local lst_group = self._view:GetChild("lst_group") + lst_group:RemoveChildrenToPool() + local fgCtr = ControllerManager.GetController(NewGroupController) + + for i = 1, #groups do + local group = groups[i] + local item = lst_group:AddItemFromPool() + item:GetChild("tex_name").text = group.name + item:GetChild("tex_id").text = group.id + item:GetChild("tex_nick").text ="创建人:" .. group.o_nick + item.data = group + end + + if #groups > 0 and lst_group.selectedIndex == -1 then + lst_group.selectedIndex = 0 + + if groups[1].lev == 1 then + self._view:GetController("opt").selectedIndex = 2 + else + local option = groups[1].option or 0 + if bit:_and(option,2) > 0 then + self._view:GetController("opt").selectedIndex = 1 + else + self._view:GetController("opt").selectedIndex = 0 + end + end + end + if #groups == 0 then + self._view:GetController("opt").selectedIndex = 0 + end + + +end + +function M:SetCallback(callback) + self.callback = callback +end + + +-- 销毁窗口 +function M:Destroy(remove_map) + if self.change and self.callback then + self.callback() + end + BaseWindow.Destroy(self,remove_map) +end + + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/JoinGroupView.lua b/lua_probject/base_project/Game/View/NewGroup/JoinGroupView.lua new file mode 100644 index 00000000..c26b9b57 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/JoinGroupView.lua @@ -0,0 +1,84 @@ +--进入牌友圈View对象 +--author:-- + + +local JoinGroupView = {} + +local M = JoinGroupView +local KEY_DEL = "del" +local KEY_CLEAR = "c" + +function JoinGroupView.new(blur_view) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "JoinGroupView" + self._currenIndex = 0 + self._close_destroy = true + self._blur_view = blur_view + self:init("ui://NewGroup/Win_FGJoin") + return self +end + +function M:init(url) + BaseWindow.init(self,url) + + self.tex_num = self._view:GetChild("tex_num") + self:ClearNumTex() + + local cnt = self._view.numChildren - 1 + + for i = 0 , 9 do + local obj = self._view:GetChild("btn_"..i) + obj.onClick:Add(handler(self , self.OnNumButtonAction)) + i = i + 1 + end + local btn_ok = self._view:GetChild("btn_ok") + btn_ok.onClick:Set(function() + if self._currenIndex <6 then + ViewUtil.ErrorTip(-12,"您输入的大联盟ID少于六位!") + return + end + ViewUtil.ShowModalWait(self._root_view) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_JoinGroup(tonumber(self._texnum_str),function(response) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if (response.ReturnCode == 0) then + ViewUtil.ErrorTip("请等待盟主审核") + self:Destroy() + else + ViewUtil.ErrorTip(response.ReturnCode,"加入大联盟失败!") + end + end) + end) + local btn_del = self._view:GetChild("btn_del") + btn_del.onClick:Add(handler(self , self.OnNumButtonAction)) +end + +function M:OnNumButtonAction(context) + local typer = string.sub(context.sender.name ,5) + if typer == KEY_DEL then + if (self._currenIndex > 0) then + self._currenIndex = self._currenIndex - 1 + self._texnum_str = string.sub(self._texnum_str,0,self._currenIndex) + self.tex_num.text = self._texnum_str + end + else + if (self._currenIndex < 6) then + self._currenIndex = self._currenIndex + 1 + self._texnum_str = self._texnum_str .. typer + self.tex_num.text = self._texnum_str + + end + end +end + +function M:ClearNumTex() + self._texnum_str = "" + self._currenIndex = 0 + self.tex_num.text = self._texnum_str +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupAddMemberInfoView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupAddMemberInfoView.lua new file mode 100644 index 00000000..c4358ccd --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupAddMemberInfoView.lua @@ -0,0 +1,60 @@ +local GroupAddMemberInfoView = {} + +local M = GroupAddMemberInfoView + +function GroupAddMemberInfoView.new(group_id,member_id) + setmetatable(M, {__index = BaseView}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupAddMemberInfoView" + self.group_id = group_id + self.member_id = member_id + self:init("ui://NewGroup/Win_PlayerInfoForAdd") + return self +end + +function M:init(url) + BaseWindow.init(self,url) + self.Tx=self._view:GetChild("btn_head") + self.Name=self._view:GetChild("tex_name") + self.Id=self._view:GetChild("tex_id") + self._view:GetChild("btn_close").onClick:Set( + function () + self:Destroy() + end + ) + self._view:GetChild("btn_qc").onClick:Set( + function () + self:Destroy() + end + ) + self._view:GetChild("btn_qd").onClick:Set( + function () + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_AddMember( + self.group_id, + self.member_id, + function (response) + ViewUtil.CloseModalWait() + if (response.ReturnCode == 0) then + ViewUtil.ShowBannerOnScreenCenter('添加成功!', 1) + else + ViewUtil.ErrorTip(response.ReturnCode, '邀请玩家失败!') + end + end + ) + end + ) + +end + + +function M:SetAddMember(data) + ImageLoad.Load(data.portrait, self.Tx._iconObject) + self.Name.text=data.nick + self.Id.text=data.uid + self:Show() +end + + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupBanSameTableView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupBanSameTableView.lua new file mode 100644 index 00000000..9c4b78f8 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupBanSameTableView.lua @@ -0,0 +1,232 @@ +-- 禁止同桌界面 + +local GroupBanSameTableView = {} + +local M = GroupBanSameTableView + +function GroupBanSameTableView.new(blur_view, group_id, member_id, data) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupBanSameTableView" + self._close_destroy = true + self._blur_view = blur_view + self.group_id = group_id + self.ori_ban = data.ban_list + self.ban_list = membe_deep_clone(data.ban_list) + self.member_id = member_id + self:init("ui://NewGroup/Win_BanSameTable") + return self +end + +function M:init(url) + BaseWindow.init(self,url) + -- 搜索结果 + self._search_member_data = {} + self._search_ban_data = {} + + local group = DataManager.groups:get(self.group_id) + self.all_members = group.members + self.member_data = {} + self:getMemberData(#self.all_members) + + self.ctr_search_m = self._view:GetController("search_m") + self.ctr_search_b = self._view:GetController("search_b") + + self.lst_member = self._view:GetChild("lst_member") + self.lst_member:SetVirtual() + self.lst_member.itemRenderer = function(index, obj) + self:OnRenderMemberItem(index, obj) + end + self.lst_member.scrollPane.onPullUpRelease:Set(function() + self:getMemberData(#self.all_members) + end) + + self.lst_ban = self._view:GetChild("lst_ban") + self.lst_ban:SetVirtual() + self.lst_ban.itemRenderer = function(index, obj) + self:OnRenderBanItem(index, obj) + end + self:refreshList() + + self._view:GetChild("btn_back").onClick:Set(function() + self._search_member_data = {} + self.ctr_search_m.selectedIndex = 0 + self:refreshList() + end) + + self._view:GetChild("btn_back_ban").onClick:Set(function() + self._search_ban_data = {} + self.ctr_search_b.selectedIndex = 0 + self:refreshList() + end) + + local fgCtr = ControllerManager.GetController(NewGroupController) + self._view:GetChild("btn_search_member").onClick:Set(function() + ViewUtil.ShowModalWait(nil) + local qid = tonumber(self._view:GetChild("tex_find_memb").text) + if not qid then + ViewUtil.CloseModalWait() + ViewUtil.ErrorTip(nil, "输入ID进行搜索") + return + end + fgCtr:FG_FindMember(self.group_id, qid, function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "找不到成员") + self._search_member_data = {} + self:refreshList() + else + self.ctr_search_m.selectedIndex = 1 + self._search_member_data[1] = res.Data.members[1] + self:refreshList() + end + end) + end) + + self._view:GetChild("btn_search_ban").onClick:Set(function() + local qid = tonumber(self._view:GetChild("tex_find_ban").text) + if not qid then + ViewUtil.ErrorTip(nil, "输入ID进行搜索") + return + end + for i = 1, #self.ban_list do + local data = self.ban_list[i] + if data.uid == qid then + self.ctr_search_b.selectedIndex = 1 + self._search_ban_data[1] = data + self:refreshList() + return + end + end + ViewUtil.ErrorTip(nil, "找不到成员") + self._search_ban_data = {} + self:refreshList() + end) + + self._view:GetChild("btn_ok").onClick:Set(function() + local set_list = {} + local del_list = {} + for i = 1, #self.ban_list do + table.insert(set_list, self.ban_list[i].uid) + end + for i = 1, #self.ori_ban do + local tem = self.ori_ban[i] + if not list_check(set_list, tem.uid) then + table.insert(del_list, tem.uid) + end + end + ViewUtil.ShowModalWait() + fgCtr:FG_SetBanTable(self.group_id, self.member_id, set_list, del_list, function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode == 0 then + self:Destroy() + ViewUtil.ShowBannerOnScreenCenter("禁止同桌设置成功") + else + ViewUtil.ErrorTip(res.ReturnCode, "禁止同桌设置失败") + end + end) + end) +end + +local function checkList(list, data) + for i = 1, #list do + if list[i].uid == data.uid then + return true + end + end + return false +end +function M:refreshList() + local all_members = self.all_members + if #self._search_member_data > 0 then + all_members = self._search_member_data + end + self.member_data = {} + for i = 1, #all_members do + local data = all_members[i] + if not checkList(self.ban_list, data) and data.uid ~= DataManager.SelfUser.account_id and data.uid ~= self.member_id then + local mdata = {} + mdata.nick = data.nick + mdata.uid = data.uid + mdata.portrait = data.portrait + if not checkList(self.member_data, mdata) then + table.insert(self.member_data, mdata) + end + end + end + self.lst_member.numItems = #self.member_data + + if self.ctr_search_b.selectedIndex == 1 then + self.lst_ban.numItems = #self._search_ban_data + else + self.lst_ban.numItems = #self.ban_list + end +end + +function M:getMemberData(index) + local group = DataManager.groups:get(self.group_id) + -- if index == 0 then + -- group:clearMember() + -- end + ViewUtil.ShowModalWait(nil) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GroupMembers(self.group_id, index, 10, false, 1, function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取成员列表失败") + else + list_concat(self.all_members, res.Data.members) + self:refreshList() + end + end) +end + +function M:OnRenderMemberItem(index, obj) + local data + if #self._search_member_data > 0 then + data = self._search_member_data[index + 1] + else + data = self.member_data[index + 1] + end + self:FillItem(data, obj, 0) +end + +function M:OnRenderBanItem(index, obj) + local data + if self.ctr_search_b.selectedIndex == 1 then + data = self._search_ban_data[index + 1] + else + data = self.ban_list[index + 1] + end + self:FillItem(data, obj, 1) +end + +function M:FillItem(data, item, act) + item:GetController("act").selectedIndex = act + item:GetChild("tex_name").text = ViewUtil.stringEllipsis(data.nick) + item:GetChild("tex_id").text = "ID:" .. data.uid + btn_head = item:GetChild("btn_head") + ImageLoad.Load(data.portrait, btn_head._iconObject) + item:GetChild("btn_del").onClick:Set(function() + if self.ctr_search_b.selectedIndex == 1 then + list_remove(self.ban_list, data) + list_remove(self._search_ban_data, data) + else + list_remove(self.ban_list, data) + end + self:refreshList() + end) + item:GetChild("btn_set").onClick:Set(function() + if #self.ban_list >= 20 then + ViewUtil.ErrorTip(nil, "最多添加20个禁止同桌对象") + return + end + table.insert(self.ban_list, data) + self:refreshList() + end) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupBankLogView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupBankLogView.lua new file mode 100644 index 00000000..7171e66b --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupBankLogView.lua @@ -0,0 +1,67 @@ + +local TimeSettingPanel = import(".TimeSettingPanel") + +local GroupBankLogView = {} + +local M = GroupBankLogView + +function GroupBankLogView.new(blur_view,group_id,uid) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupBankLogView" + self._close_destroy = true + self.uid = uid + self._blur_view = blur_view + self.group_id = group_id + self:init("ui://NewGroup/Win_Banklog") + return self +end + +function M:init(url) + BaseWindow.init(self,url) + self.take_log = {} + self.lst_log = self._view:GetChild("lst_log") + self.lst_log:SetVirtual() + self.lst_log.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + self.lst_log.scrollPane.onPullUpRelease:Set(function() + self:getTakeLog(self.lst_log.numItems) + end) + + self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0) + self._view:GetChild("btn_search").onClick:Set(function() + self.take_log = {} + self:getTakeLog(0) + end) + + self:getTakeLog(0) +end + +function M:getTakeLog(index) + local begin_time, end_time = self.time_panel:GetDate() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetBankLog(self.group_id, index, 6, begin_time, end_time, self.uid,function(res) + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取提取详情失败") + else + local hp_logs = res.Data.hp_logs + if #hp_logs > 0 then + for i = 1, #hp_logs do + table.insert(self.take_log, hp_logs[i]) + end + self.lst_log.numItems = #self.take_log + end + end + end) +end + +function M:OnRenderItem(index, obj) + local data = self.take_log[index + 1] + obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(DataManager.SelfUser.nick_name) + obj:GetChild("tex_id").text = DataManager.SelfUser.account_id + obj:GetChild("tex__hp").text = d2ad(data.hp) + obj:GetChild("tex_data").text = os.date("%Y-%m-%d\r%H:%M", data.time) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView.lua new file mode 100644 index 00000000..1b3e12d4 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupGameSettingView.lua @@ -0,0 +1,824 @@ +-- 牌友圈玩法设置 +local GroupNumberInputView = import(".GroupNumberInputView") +local GroupRoomColorView = import(".GroupRoomColorView") +local GameListView = require "Game/View/Lobby/GameListView" +local GroupGameSettingView = {} + +local M = GroupGameSettingView + +function GroupGameSettingView.new(blur_view, gid, pid , room_config, callback) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupGameSettingView" + self._animation = false + self._full = true + self._full_offset = false + self.selectedIndex = index + self._close_destroy = true + self._put_map = false + self._new_hide = false + self._queue = false + self.group_id = gid + self.play = DataManager.groups:get(gid):getPlay(pid) + self.table_color = self.play and self.play.deskId or 0 + if room_config then + self.room_config = json.decode(room_config) + end + self.rewards_data = {} + self.callback = callback + self._full = true + self:init("ui://NewGroup/View_GroupGameSetting") + return self +end + +function M:init(url) + BaseWindow.init(self,url) + self.hpData = {} + + self:FillGameData() + + self._view:GetChild("btn_next").onClick:Set(function() + if self._view:GetChild("tex_name").text == "" then + ViewUtil.ErrorTip(nil, "输入玩法名才能进入下一步") + return + end + + local game_data = self.gl_view:GetModeData().data.game_data + if not game_data then + ViewUtil.ErrorTip(nil, "请先下载游戏") + return + end + self.rewards_data = {} + self:FillFagData() + self._view:GetController("page").selectedIndex = 1 + end) + + self._view:GetChild("btn_color").onClick:Set(function() + local grcv = GroupRoomColorView.new(self._root_view, self.table_color, function(index) + self.table_color = index + end) + grcv:Show() + end) +end + +-- 显示游戏列表 +function M:FillGameData() + local index = 1 + -- 显示所有游戏 + local games = DataManager.SelfUser.games + local lst_game = self._view:GetChild("lst_game") + -- local n65 = lst_game:GetChild("n65") + printlog("jefe all games") + pt(games) + -- n65.visible = false + for i = 1, #games do + local game = games[i] + if (self.room_config and self.room_config.game_id == game.game_id) or i == 1 then + index = i + end + end + self.gl_view = GameListView.new(lst_game,index,self.room_config) + local btn_close = lst_game:GetChild("btn_close") + btn_close.onClick:Set(function() + self:Destroy() + end) + -- 玩法名 + if self.play then + local tex_name = self._view:GetChild("tex_name") + tex_name.text = self.play.name + end +end + +local tuoguanTimeList={10,30,60,120,180,240,300} +-- 显示玩法体力值配置 +function M:FillFagData() + + local mod = self.gl_view:GetModeData() + local game_id = mod.data.game_data.game_id + + local panel_play_set = self._view:GetChild("panel_play_set") + local ctr_show_nonnegative = panel_play_set:GetController("show_nonnegative") --玩法不可负分开关 + local btn_nonnegative = panel_play_set:GetChild("btn_nonnegative") --不可负分开关 + local btn_no_upper = panel_play_set:GetChild("btn_no_upper") --没有上限 + local btn_tuoguan = panel_play_set:GetChild("btn_tuoguan") --托管开关 + btn_tuoguan.selected = true + + local btn_BanDismiss = panel_play_set:GetChild("btn_BanDismiss") + local cb_tuoguan_time = panel_play_set:GetChild("comb_offline") --托管时间 + local cb_tuoguan_type = panel_play_set:GetChild("comb_result") --托管结算类型 + local btn_hidden = panel_play_set:GetChild("btn_hidden") --防作弊开关 + local btn_vip = panel_play_set:GetChild("btn_vip") --vip房间开关 + --根据hpType显示 + local game_data = mod.data.game_data + panel_play_set:GetController("game_type").selectedIndex = game_data and game_data.hpType or 0 + --体力值开关 + local ctr_switch = panel_play_set:GetController("hp_switch") + local group = DataManager.groups:get(self.group_id) + if group.type == 2 then + ctr_switch.selectedIndex = 1 + panel_play_set:GetController("type").selectedIndex = 1 + end + local hpData + + if self.play then + -- 如果有玩法信息,加载玩法的hpdata + if self.play.hpOnOff == 1 then + hpData = json.decode(self.play.hpData) + end + local config = json.decode(self.play.config) + ctr_switch.selectedIndex = self.play.hpOnOff + + btn_BanDismiss.selected = (config.isBanDismiss and config.isBanDismiss ~= 0) and true or false + btn_tuoguan.selected = (config.tuoguan and config.tuoguan ~= 0) and true or false + if btn_tuoguan.selected then + cb_tuoguan_time.value = config.tuoguan_active_timeIndex or 1 + cb_tuoguan_type.value = config.tuoguan_result_type + end + + if btn_hidden then + btn_hidden.selected = (config.isHidden and config.isHidden ~= 0) and true or false + end + if btn_vip then + btn_vip.selected = (config.isvip and config.isvip ~= 0) and true or false + end + + btn_nonnegative.selected = config.isNonnegative and config.isNonnegative == 1 + btn_no_upper.selected = config.hp_no_limit and config.hp_no_limit == 1 + end + local game = DataManager.SelfUser:getGameData(game_id) + ctr_show_nonnegative.selectedIndex = game.isNonnegative + if game.isNonnegative == 0 then + btn_nonnegative.selected = false + btn_no_upper.selected = false + else + btn_nonnegative.selected = true + end + + + local panel_fag = panel_play_set:GetChild("panel_fag") + -- 加入限制 + local btn_join_limit = panel_play_set:GetChild("btn_join_limit") + local tex_join_limit = panel_play_set:GetChild("tex_join_limit") + tex_join_limit.text = hpData and d2ad(hpData.limitInRoom) or 0 + btn_join_limit.onClick:Set(function() + self:__input_num(tex_join_limit,"limitInRoom") + end) + --机器人 + local btn_robot_room = panel_fag:GetChild("robot_room") + local tex_robot_room = panel_fag:GetChild("tex_robot_room") + tex_robot_room.text = hpData and (hpData.robot_room and (hpData.robot_room) or 0) or 0 + btn_robot_room.onClick:Set(function() + self:__input_num(tex_robot_room,"robot_room") + end) + + --抢庄限制 + -- local btn_bank_limit = panel_play_set:GetChild("btn_bank_limit") + --local tex_bank_limit = panel_play_set:GetChild("tex_bank_limit") + -- tex_bank_limit.text = hpData and hpData.limitloot and d2ad(hpData.limitloot) or 0 + -- btn_bank_limit.onClick:Set(function() + -- self:__input_num(tex_bank_limit,"limitloot") + -- end) + + -- 退出限制 + local btn_exit_limit = panel_play_set:GetChild("btn_exit_limit") + local tex_exit_limit = panel_play_set:GetChild("tex_exit_limit") + tex_exit_limit.text = hpData and hpData.limitPlay and d2ad(hpData.limitPlay) or 1 + btn_exit_limit.onClick:Set(function() + -- self:__input_num(tex_exit_limit, "limitPlay") + local gfiv = GroupNumberInputView.new(self._root_view,function(num) + if num == 0 then + ViewUtil.ErrorMsg(nil,-9,"不能输入0") + return + end + tex_exit_limit.text = num + end) + gfiv:Show() + end) + --体力值倍数 + local tex_times = panel_play_set:GetChild("tex_times") + if game_id ~= 41 then + tex_times.text = hpData and d2ad(hpData.times) or 1 + local btn_times_input = panel_play_set:GetChild("btn_times_input") + btn_times_input.onClick:Set(function() + self:__input_num(tex_times, "times", 3) + end) + else + tex_times.text = 1 + end + + local btn_sub = panel_play_set:GetChild("btn_sub") + btn_sub.onClick:Set(function() + local value = tonumber(tex_times.text) + if value > 1 then + value = value - 1 + tex_times.text = tostring(value) + end + + end) + + local btn_add = panel_play_set:GetChild("btn_add") + btn_add.onClick:Set(function() + local value = tonumber(tex_times.text) + value = value + 1 + tex_times.text = tostring(value) + end) + + + --显示创建空房间 + local tex_times_room = panel_play_set:GetChild("tex_times_room") + + if hpData and hpData.tex_times_room then + tex_times_room.text = hpData.tex_times_room/1000 + else + tex_times_room.text = 1 + end + + + local btn_sub_room = panel_play_set:GetChild("btn_sub_room") + btn_sub_room.onClick:Set(function() + local value = tonumber(tex_times_room.text) + if value > 1 then + value = value - 1 + tex_times_room.text = tostring(value) + end + + end) + + local btn_add_room = panel_play_set:GetChild("btn_add_room") + btn_add_room.onClick:Set(function() + local value = tonumber(tex_times_room.text) + value = value + 1 + tex_times_room.text = tostring(value) + end) + + + -- 显示抽水列表 + if hpData and hpData.rewards_list then + self.rewards_data = hpData.rewards_list + else + local tem = {} + -- tem.limitPump = hpData and hpData.limitPump or 0 + -- tem.type = hpData and hpData.type or 1 + tem.pumpProportion = hpData and hpData.pumpProportion or 0 + tem.UpperLimit = hpData and hpData.UpperLimit or 0 + table.insert(self.rewards_data, tem) + end + self._type = hpData and hpData.type or 1 + self._limitPump = hpData and tonumber(hpData.limitPump) or 0 + self:UpdateRewards() + + -- 编辑类型,0是全显示,1是显示百分比,2是显示人头制, 3是全民推广 + local ctr_edit_type = panel_fag:GetController("edit_type") + local ctr_edit_value_type = panel_fag:GetController("edit_value_type") + if not self.play then + ctr_edit_type.selectedIndex = 0 + ctr_edit_value_type.selectedIndex = 0 + elseif hpData then + ctr_edit_type.selectedIndex = self.play.rewardType + ctr_edit_value_type.selectedIndex = self.play.rewardValueType or 1 + end + + local ctr_edit_type1 = panel_fag:GetController("edit_type1") + local ctr_edit_value_type1 = panel_fag:GetController("edit_value_type1") + if not self.play then + ctr_edit_type1.selectedIndex = 0 + ctr_edit_value_type1.selectedIndex = 0 + elseif hpData then + ctr_edit_type1.selectedIndex = self.play.xipai_rewardType + ctr_edit_value_type1.selectedIndex = self.play.xipai_rewardValueType or 1 + end + + local ctr_rewards1 = panel_fag:GetController("rewards1") + ctr_rewards1.selectedIndex = 2 + local ctr_rewards_value1 = panel_fag:GetController("rewards_value1") + -- 奖励类型:0百分比 1人头制 2全民推广 + if self.play then + ctr_rewards1.selectedIndex = self.play.xipai_rewardType - 1 + ctr_rewards_value1.selectedIndex = (self.play.xipai_rewardValueType or 1) - 1 + end + + local ctr_rewards2 = panel_fag:GetController("rewards2") + ctr_rewards2.selectedIndex = 2 + local ctr_rewards_value2 = panel_fag:GetController("rewards_value2") + -- 奖励类型:0百分比 1人头制 2全民推广 + if self.play then + -- ctr_rewards1.selectedIndex = self.play.xipai_rewardType - 1 + ctr_rewards_value2.selectedIndex = (self.play.anchou_rewardValueType or 1) - 1 + end + + + + local base_pump = 0 + if hpData ~= nil and hpData.basePump ~= nil then + base_pump = d2ad(hpData.basePump) + end + local tex_base_pump = panel_fag:GetChild("tex_base_pump") + tex_base_pump.text = ""..base_pump + + local btn_base_pump = panel_fag:GetChild("btn_base_pump") + btn_base_pump.onClick:Set(function() + self:__input_num(tex_base_pump, "basePump", 3) + end) + + -- panel_fag:GetController("alliance").selectedIndex = group.type == 2 and 1 or 0 + panel_fag:GetController("alliance").selectedIndex = 0 + local ctr_rewards = panel_fag:GetController("rewards") + local ctr_rewards_value = panel_fag:GetController("rewards_value") + -- 奖励类型:0百分比 1人头制 2全民推广 + if self.play then + ctr_rewards.selectedIndex = self.play.rewardType - 1 + ctr_rewards_value.selectedIndex = (self.play.rewardValueType or 1) - 1 + end + + -- 点击确定按钮 更新玩法数据 + local btn_ok = self._view:GetChild("btn_ok") + btn_ok.onClick:Set(function() + local _data = mod.data:SelectedConfigData() + _data.game_id = game_id + _data.isNonnegative = btn_nonnegative.selected and 1 or 0 + _data.hp_no_limit = (btn_nonnegative.selected and btn_no_upper.selected) and 1 or 0 + _data.tuoguan = btn_tuoguan.selected + + _data.tuoguan_active_time = _data.tuoguan and tuoguanTimeList[(tonumber(cb_tuoguan_time.value))] or 0 + _data.tuoguan_active_timeIndex=tonumber(cb_tuoguan_time.value) + _data.tuoguan_result_type = _data.tuoguan and tonumber(cb_tuoguan_type.value) or 0 + if btn_BanDismiss.selected then + _data.isBanDismiss = 1 + end + + if btn_hidden then + _data.isHidden = btn_hidden.selected and 1 or 0 + else + _data.isHidden=0 + end + + if btn_vip then + _data.isvip = btn_vip.selected and 1 or 0 + else + _data.isvip=0 + end + + + local hpType = mod.data.game_data.hpType + self.hpData.limitInRoom = ad2d(tonumber(panel_play_set:GetChild("tex_join_limit").text)) + self.hpData.limitPlay = ad2d(tonumber(panel_play_set:GetChild("tex_exit_limit").text)) + self.hpData.limitloot = 0-- ad2d(tonumber(panel_play_set:GetChild("tex_bank_limit").text)) + self.hpData.robot_room = (tonumber(panel_fag:GetChild("tex_robot_room").text)) + self.hpData.type = self._type + self.hpData.limitPump = self._limitPump + local hpOnOff = ctr_switch.selectedIndex + if game_id == 41 then + if self.hpData.limitloot < ad2d(_data.up_bank) then + ViewUtil.ErrorMsg(self._root_view,-9,"抢庄限制必须大于等于" .. _data.up_bank) + return + end + end + if hpType > 1 and hpOnOff == 1 then + if self.hpData.limitInRoom < self.hpData.limitPlay then + ViewUtil.ErrorMsg(self._root_view,-9,"进入限制必须大于等于退出限制") + return + end + if self.hpData.limitPlay == 0 then + ViewUtil.ErrorMsg(self._root_view,-9,"退出房间限制不能为0") + return + end + end + local times = tonumber(tex_times.text) + self.hpData.times = ad2d(tonumber(times)) + + local tex_times_room = tonumber(tex_times_room.text) + self.hpData.tex_times_room = ad2d(tonumber(tex_times_room)) + + + local base_pump = tonumber(tex_base_pump.text) + self.hpData.basePump = ad2d(tonumber(base_pump)) + + self.hpData.rewards_list = {} + local lst_rewards = panel_fag:GetChild("lst_rewards") + for i = 1, lst_rewards.numItems do + local r_item = lst_rewards:GetChildAt(i - 1) + local tem = {} + -- 大赢家 + -- self.hpData.limitPump = tonumber(cb_type.value) + -- tem.limitPump = tonumber(r_item:GetChild("cb_type").value) + -- 抽水次数 固定抽水要发小数 + local cb_method = r_item:GetChild("cb_method") + local proportion = string.gsub(string.gsub(r_item:GetChild("cb_proportion" .. cb_method.value).title, "抽", ""), "次", "") + if cb_method.value == "1" then proportion = ad2d(proportion) end + -- 抽水分数 + -- self.hpData.pumpProportion = tonumber(proportion) + tem.pumpProportion = tonumber(proportion) + if tonumber(cb_method.value) == 1 then + local v = string.gsub(r_item:GetChild("cb_min").title, "分", "") + -- self.hpData.UpperLimit = ad2d(tonumber(v)) + tem.UpperLimit = ad2d(tonumber(v)) + + local vsend = string.gsub(r_item:GetChild("cb_min_send").title, "分", "") + tem.UpperLimitReward = ad2d(tonumber(vsend)) + + else + local v = string.gsub(r_item:GetChild("cb_max").title, "分", "") + -- self.hpData.UpperLimit = ad2d(tonumber(v)) + tem.UpperLimit = ad2d(tonumber(v)) + end + -- tem.type = cb_method.value + table.insert(self.hpData.rewards_list, tem) + end + + self.hpData.rewards_type = ctr_rewards.selectedIndex + 1 + self.hpData.rewardValueType = ctr_rewards_value.selectedIndex + 1 + + self.hpData.xipai_rewardType = ctr_rewards1.selectedIndex + 1 + self.hpData.xipai_rewardValueType = ctr_rewards_value1.selectedIndex + 1 + + self.hpData.anchou_rewardType = ctr_rewards2.selectedIndex + 1 + self.hpData.anchou_rewardValueType = ctr_rewards_value2.selectedIndex + 1 + + + if self.hpData.rewardValueType == 1 then + self.hpData.rewards_val = 100 + else + self.hpData.rewards_val = ad2d(10000) + end + + if self.hpData.xipai_rewardValueType == 1 then + self.hpData.xipai_rewards_val = 100 + else + self.hpData.xipai_rewards_val = ad2d(10000) + end + + + if self.hpData.anchou_rewardValueType == 1 then + self.hpData.anchou_rewards_val = 100 + else + self.hpData.anchou_rewards_val = ad2d(10000) + end + + + local tex_name = self._view:GetChild("tex_name") + local name = tex_name.text + print("jefe:") + pt(self.hpData) + + local fgCtr = ControllerManager.GetController(NewGroupController) + ViewUtil.ShowModalWait(self._root_view) + if not self.play then + -- 新增玩法 + fgCtr:FG_AddPlay(self.group_id, game_id, _data, name, self.hpData, hpOnOff, group.type, self.table_color, function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + --print("======新增玩法=============") + --pt(res) + if res.ReturnCode == 0 then + local play = {} + play.name = name + play.deskId = self.table_color + play.game_name = mod.data.game_data.name + play.gameId = game_id + play.hpOnOff = hpOnOff + play.hpData= json.encode(self.hpData) + play.id = res.Data.pid + play.xipai_rewards_val = self.hpData.xipairewards_val + play.anchou_rewards_val = self.hpData.anchou_rewards_val + play.reward = self.hpData.rewards_val + play.rewardType = self.hpData.rewards_type + play.rewardValueType = self.hpData.rewardValueType + play.xipai_rewardType = self.hpData.xipai_rewardType + play.anchou_rewardType = 3 + play.xipai_rewardValueType = self.hpData.xipai_rewardValueType + play.anchou_rewardValueType = 1 + _data.maxPlayers = res.Data.maxPlayers + play.config = json.encode(_data) + play.hp_times = self.hpData.times + play.maxPlayers = _data.maxPlayers + play.roomNum=self.hpData.tex_times_room/1000 + play.maxRound=res.Data.maxRound + ViewUtil.ShowBannerOnScreenCenter("添加玩法成功") + self.callback(play) + self:Destroy() + else + ViewUtil.ErrorTip(res.ReturnCode,"添加玩法失败!") + end + end) + else + -- 修改玩法 + fgCtr:FG_UpdatePlay(self.group_id,game_id,_data,name,self.hpData,hpOnOff,self.play.id, group.type, self.table_color, function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + --print("======修改玩法=============") + --pt(res) + if res.ReturnCode == 0 then + local play = {} + play.name = name + play.deskId = self.table_color + play.game_name = mod.data.game_data.name + play.gameId = game_id + play.id = self.play.id + play.hpOnOff = hpOnOff + play.hpData= json.encode(self.hpData) + play.xipai_rewards_val = self.hpData.xipairewards_val + play.anchou_rewards_val = self.hpData.anchou_rewards_val + play.reward = self.hpData.rewards_val + play.rewardType = self.hpData.rewards_type + play.rewardValueType = self.hpData.rewardValueType + play.xipai_rewardType = self.hpData.xipai_rewardType + play.anchou_rewardType = 3 + play.xipai_rewardValueType = self.hpData.xipai_rewardValueType + play.anchou_rewardValueType = 1 + _data.maxPlayers = res.Data.maxPlayers + play.config = json.encode(_data) + play.hp_times = self.hpData.times + play.maxPlayers = _data.maxPlayers + play.roomNum=self.hpData.tex_times_room/1000 + play.maxRound=res.Data.maxRound + self.callback(play) + self:Destroy() + else + ViewUtil.ErrorTip(res.ReturnCode,"修改玩法失败!") + end + end) + end + end) +end + +function M:UpdateRewards() + local lst_rewards = self._view:GetChild("panel_play_set"):GetChild("panel_fag"):GetChild("lst_rewards") + lst_rewards:RemoveChildrenToPool() + for i = 1, #self.rewards_data do + local item = lst_rewards:AddItemFromPool() + self:OnRenderItem(i, item) + end + lst_rewards.height = 120 * #self.rewards_data +end + +function M:OnRenderItem(index, obj) + local data = self.rewards_data[index] + -- 抽水方法,固定、浮动 + local cb_method = obj:GetChild("cb_method") + cb_method.value = tostring(self._type) + cb_method.onChanged:Set(function() + local tem = membe_clone(self.rewards_data[1]) + tem.pumpProportion = 0 + self._type = tonumber(cb_method.value) + self.rewards_data = {} + self.rewards_data[1] = tem + self:UpdateRewards() + end) + --大赢家 + local tem = obj:GetController("c1").selectedIndex + for i = 1, 2 do + local cb_type = obj:GetChild("cb_type" .. i) + if self._limitPump <= 4 - tem then + cb_type.value = tostring(self._limitPump) + else + self._limitPump = tonumber(cb_type.value) + end + cb_type.onChanged:Set(function() + local limitPump = cb_type.value + self._limitPump = tonumber(limitPump) + self:UpdateRewards() + end) + end + -- hptype控制器,根据不同的hptype显示 + local ctr_type = obj:GetController("type") + ctr_type.selectedIndex = self.gl_view:GetModeData().data.game_data.hpType + self._type = tonumber(cb_method.value) + --抽水次数 + local val = data.pumpProportion + if cb_method.value ~= tostring(self._type) then + val = 0 + elseif cb_method.value == "1" then + val = d2ad(val) + end + local cb_proportion1 = obj:GetChild("cb_proportion1") + local cb_proportion2 = obj:GetChild("cb_proportion2") + obj:GetChild("cb_proportion" .. cb_method.value).title = "抽" .. val .. "次" + cb_proportion1.onChanged:Set(function() + data.pumpProportion = ad2d(string.gsub(string.gsub(cb_proportion1.title, "抽", ""), "次", "")) + end) + cb_proportion2.onChanged:Set(function() + local v = string.gsub(string.gsub(cb_proportion2.title, "抽", ""), "次", "") + data.pumpProportion = tonumber(v) + end) + --抽水上限 + local cb_max = obj:GetChild("cb_max") + --抽水门槛 + local cb_min = obj:GetChild("cb_min") + local cb_min_send = obj:GetChild("cb_min_send") + local UpperLimit = d2ad(data.UpperLimit) + local UpperLimitReward = d2ad(data.UpperLimitReward or 0) + if tonumber(cb_method.value) == 1 then + cb_min.title = UpperLimit .. "分" or "0分" + cb_min_send.title = UpperLimitReward .. "分" or "0分" + if UpperLimitReward == 0 then + obj:GetController("give_owner").selectedIndex = 0 + else + obj:GetController("give_owner").selectedIndex = 1 + end + else + cb_max.value = UpperLimit .. "分" + self:SetIndex(cb_max, d2ad(data.UpperLimit)) + end + + obj:GetController("give_owner").onChanged:Add(function() + + if obj:GetController("give_owner").selectedIndex == 0 then + data.UpperLimitReward = 0 + self:UpdateRewards() + end + end) + + if cb_max.selectedIndex == -1 then + cb_max.selectedIndex = 0 + end + if cb_min.selectedIndex == -1 then + cb_min.selectedIndex = 0 + end + + if cb_min_send.selectedIndex == -1 then + cb_min_send.selectedIndex = 0 + end + + -- 显示备注 + local str_min_tip, str_max_tip + if index == 1 then + local tem = "" + local next_data = self.rewards_data[index + 1] + if next_data then + tem = string.format("小于%s", d2ad(next_data.UpperLimit)) + end + local tem1 ="" + if UpperLimitReward ~= 0 then + tem1 = string.format(",每个玩家赠送盟主%s分",UpperLimitReward) + end + str_min_tip = string.format("(低于%s分不抽水%s)", UpperLimit,tem1) + -- str_max_tip = string.format("(低于%s按此设置抽水)", UpperLimit) + elseif index == #self.rewards_data then + str_min_tip = string.format("(大于等于%s按此设置抽水)", UpperLimit) + -- str_max_tip = string.format("(大于等于%s,小于%s按此设置抽水)", last_upper, UpperLimit) + else + local next_upper = d2ad(self.rewards_data[index + 1].UpperLimit) + str_min_tip = string.format("(大于等于%s,小于%s按此设置抽水)", UpperLimit, next_upper) + -- str_max_tip = string.format("(大于等于%s,小于%s按此设置抽水)", last_upper, UpperLimit) + end + obj:GetChild("tex_min_tip").text = str_min_tip + -- obj:GetChild("tex_max_tip").text = str_max_tip + + + local input_limit = 1000 + local btn_input = obj:GetChild("btn_input") + btn_input.onClick:Set(function() + local gfiv = GroupNumberInputView.new(self._root_view,function(num) + if num > input_limit then + ViewUtil.ErrorMsg(self._root_view,-9,"输入最大不能超过" .. input_limit) + return + end + cb_proportion1.title = "抽" .. num .. "次" + data.pumpProportion = ad2d(num) + end, 3) + gfiv:Show() + end) + + local input_limit2 = 1000 + local min_v, max_v = 0, input_limit2 + 1 + if index > 1 then + local last_data = self.rewards_data[index - 1] + min_v = d2ad(last_data.UpperLimit) + end + if index < #self.rewards_data then + local next_data = self.rewards_data[index + 1] + max_v = d2ad(next_data.UpperLimit) + end + local btn_input2 = obj:GetChild("btn_input2") + btn_input2.onClick:Set(function() + local gfiv = GroupNumberInputView.new(self._root_view,function(num) + if num > input_limit2 then + ViewUtil.ErrorMsg(nil,-9,"输入值不能超过" .. input_limit2) + return + elseif num >= max_v then + ViewUtil.ErrorMsg(nil,-9,"输入值必须小于" .. max_v) + return + elseif num <= min_v then + ViewUtil.ErrorMsg(nil,-9,"输入值必须大于" .. min_v) + return + end + -- cb_min.title = num .. "分" + data.UpperLimit = ad2d(num) + self:UpdateRewards() + end, 3) + gfiv:Show() + end) + + local btn_input2_send = obj:GetChild("btn_input2_send") + btn_input2_send.onClick:Set(function() + local gfiv = GroupNumberInputView.new(self._root_view,function(num) + + data.UpperLimitReward = ad2d(num) + self:UpdateRewards() + end, 3) + gfiv:Show() + end) + cb_min.onChanged:Set(function() + local tem = string.gsub(cb_min.title, "分", "") + local tem = tonumber(tem) + if tem > input_limit2 then + ViewUtil.ErrorMsg(nil,-9,"输入值不能超过" .. input_limit2) + return + elseif tem >= max_v then + cb_min.title = d2ad(data.UpperLimit) .. "分" + ViewUtil.ErrorMsg(nil,-9,"输入值必须小于" .. max_v) + return + elseif tem <= min_v then + cb_min.title = d2ad(data.UpperLimit) .. "分" + ViewUtil.ErrorMsg(nil,-9,"输入值必须大于" .. min_v) + return + end + data.UpperLimit = ad2d(string.gsub(cb_min.title, "分", "")) + self:UpdateRewards() + end) + + cb_min_send.onChanged:Set(function() + local tem = string.gsub(cb_min_send.title, "分", "") + local tem = tonumber(tem) + + data.UpperLimitReward = ad2d(string.gsub(cb_min_send.title, "分", "")) + self:UpdateRewards() + end) + + cb_max.onChanged:Set(function() + local tem = string.gsub(cb_max.title, "分", "") + local tem = tonumber(tem) + if tem > max_v then + self:SetIndex(cb_max, d2ad(data.UpperLimit)) + ViewUtil.ErrorMsg(nil,-9,"输入值必须小于" .. max_v) + return + -- elseif tem <= min_v then + -- self:SetIndex(cb_max, d2ad(data.UpperLimit)) + -- ViewUtil.ErrorMsg(nil,-9,"输入值必须大于" .. min_v) + -- return + end + data.UpperLimit = ad2d(tem) + self:UpdateRewards() + end) + + obj:GetController("first").selectedIndex = self._type == 1 and #self.rewards_data ~= 1 and 1 or 0 + obj:GetController("last").selectedIndex = self._type == 1 and index == #self.rewards_data and 1 or 0 + local btn_add = obj:GetChild("btn_add") + btn_add.onClick:Set(function() + -- 如果UpperLimit达到最大值,无法再增加 + if (cb_method.value == "1" and data.UpperLimit >= ad2d(input_limit2)) or (cb_method.value == "2" and cb_max.selectedIndex == cb_max.values.Length - 1) then + ViewUtil.ErrorTip(nil, "已达到上限,无法再增加") + return + end + local ul = cb_method.value == "1" and data.UpperLimit + 10 or ad2d(cb_max.values[cb_max.selectedIndex + 1]) + local tem = {type = data.type, pumpProportion = data.pumpProportion, UpperLimit = ul} + table.insert(self.rewards_data, tem) + self:UpdateRewards() + end) + local btn_remove = obj:GetChild("btn_remove") + btn_remove.onClick:Set(function() + local msg_tip = MsgWindow.new(self._root_view, "确定删除该项吗?", MsgWindow.MsgMode.OkAndCancel) + msg_tip.onOk:Add(function() + table.remove(self.rewards_data, index) + self:UpdateRewards() + end) + msg_tip:Show() + end) +end + +function M:SetIndex(cb, value) + local str = tostring(value) + for i = 1, cb.values.Length do + if cb.values[i - 1] == str then + cb.selectedIndex = i - 1 + return + end + end + cb.selectedIndex = 0 +end + +function M:__input_num(tex, filed, itype) + itype = itype or 0 + local gfiv = GroupNumberInputView.new(self._root_view,function(num) + tex.text = num + if filed == "robot_room" then + --printlog("cccccccccccccccc ",num) + self.hpData[filed] = (num) + else + self.hpData[filed] = ad2d(num) + end + + end, itype) + gfiv:Show() +end + +function M:Destroy() + BaseWindow.Destroy(self) + self.gl_view:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMemberFagLogView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMemberFagLogView.lua new file mode 100644 index 00000000..b0972386 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMemberFagLogView.lua @@ -0,0 +1,319 @@ +-- 牌友圈成员体力值记录 +local TimeSettingPanel = import("Game.View.NewGroup.MngView.TimeSettingPanel") +local GroupMemberFagLogView = {} + +local M = GroupMemberFagLogView + +function GroupMemberFagLogView.new(group_id, member, not_manager) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupMemberFagLogView" + self._close_destroy = true + -- self._blur_view = blur_view + self.member = member + self.nick = nick + self._full = true + self._animation = false + self.group_id = group_id + self.hp_log = {} + self.daily_count = {} + self.not_manager = not_manager + self._full = true + self.m_index = 0 + self:init("ui://NewGroup/Win_MemberFagLog") + return self +end + +function M:init(url) + BaseWindow.init(self,url) + + local btn_close = self._view:GetChild("btn_close") + btn_close.onClick:Set(function() + self:Destroy() + end) + + for i = 1, 8 do + local tem = math.pow(2, i - 1) + local btn_filter = self._view:GetChild("btn_filter" .. tem) + if btn_filter then + btn_filter.onClick:Set(function() + self.hp_log = {} + self.m_index = 0 + self.lst_fag.numItems = 0 + self:GetData(0) + end) + end + end + + self.lst_fag = self._view:GetChild("lst_fag") + self.lst_fag:SetVirtual() + self.lst_fag.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + self.lst_fag.scrollPane.onPullUpRelease:Set(function() + self:GetData(self.lst_fag.numItems+self.m_index) + + end) + if not self.not_manager then + self._view:GetController("manager").selectedIndex = 1 + else + self._view:GetChild("btn_filter1").selected = false + self._view:GetChild("btn_filter8").selected = false + self._view:GetChild("btn_filter16").selected = false + end + + self.lst_daily_count = self._view:GetChild("lst_daily_count") + self.lst_daily_count:SetVirtual() + self.lst_daily_count.itemRenderer = function(index, obj) + self:OnRenderDailyItem(index, obj) + end + + self.ctr_index = self._view:GetController("index") + self.ctr_index.onChanged:Set(function() + if self.ctr_index.selectedIndex == 1 then + self:GetDailyData() + end + end) + + self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0) + self.begin_time, self.end_time = self.time_panel:GetDate() + + self._view:GetChild("btn_search").onClick:Set(function() + self.hp_log = {} + self.lst_fag.numItems = 0 + self.m_index = 0 + self.begin_time, self.end_time = self.time_panel:GetDate() + self:GetData(0) + end) + self:GetData(0) +end + +-- 获取过滤值,根据多选框计算 +function M:GetFilter() + local filter = 0 + for i = 1, 8 do + local tem = math.pow(2, i - 1) + --print("aaaaaaaaaaaaaaaaaaaaaaaa ",tem) + local btn_filter = self._view:GetChild("btn_filter" .. tem) + if btn_filter and btn_filter.selected then + filter = filter + tem + end + end + return filter +end + +-- 显示原因文本 +local function __getReason(data) + -- return "玩家操作" + local s_nick = string.utf8sub(data.m_nick, 6) + if data.reason == 6 then + return data.info + elseif data.reason == 7 then + return string.format("系统衰减(%s)", data.roomid) + elseif data.reason == 8 then + return string.format("[color=#FF6600]%s[/color](%s) %s", s_nick, data.mgr_id, "操作增加") + elseif data.reason == 9 then + return string.format("[color=#FF6600]%s[/color](%s) %s", s_nick, data.mgr_id, "操作减少") + -- return "退出圈子" + elseif data.reason == 10 then + return string.format("[color=#FF6600]%s[/color](%s) %s", s_nick, data.mgr_id, "操作增加") + elseif data.reason == 11 then + return string.format("[color=#FF6600]%s[/color](%s) %s", s_nick, data.mgr_id, "操作减少") + -- return "每日提取" + elseif data.reason == 12 then + return "推广奖励" + elseif data.reason == 13 then + if data.hp < 0 then + return string.format("转账给 [color=#FF6600]%s(%s)[/color]", s_nick, data.mgr_id) + else + return string.format("收到 [color=#FF6600]%s(%s)[/color] 转账", s_nick, data.mgr_id) + end + elseif data.reason == 14 then + return "提取能量包" + elseif data.reason == 15 then + return "" + elseif data.reason == 20 then + return "洗牌" + elseif data.reason == 21 then + return "洗牌奖励" + elseif data.reason == 22 then + return "暗抽奖励" + elseif data.reason == 23 then + return string.format("系统衰减ac(%s)", data.roomid) + --return "管理费" + end +end + +-- 获取体力值详情数据 +function M:GetData(index) + local filter = self:GetFilter() + if filter == 0 then return end + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetMemberHpLog(self.group_id, self.member.uid, index, 6, filter, self.begin_time, self.end_time, function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取积分详情失败") + else + local data = res.Data.hp_logs + if #data == 0 then return end + -- print("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") + -- pt(data) + -- pt(self.member) + for i = 1, #data do + self.hp_log[#self.hp_log + 1] = data[i] + end + --self:GuoLv(data) + + self.lst_fag.numItems = #self.hp_log + end + end) +end + +function M:GuoLv(data) + if self.member.lev == 1 then + local m_data_other = {} + local m_data_my = {} + for i=1,#data do + if self.member.uid ~= data[i].mgr_id then + table.insert(m_data_other,data[i]) + else + table.insert(m_data_my,data[i]) + end + end + -- printlog("比较计算=========m_data_my>>>",#m_data_my) + -- printlog("比较计算=========m_data_other>>>",#m_data_other) + + + if #m_data_my>0 and #m_data_other==0 then + for i = 1, #m_data_my do + self.hp_log[#self.hp_log + 1] = m_data_my[i] + end + self.m_index = #data - #m_data_my + self.m_index + else + for i = 1, #m_data_other do + self.hp_log[#self.hp_log + 1] = m_data_other[i] + end + self.m_index = #data - #m_data_other + self.m_index + end + else + local m_data_other = {} + local m_data_my = {} + + for i=1,#data do + if self.member.uid ~= data[i].mgr_id then + table.insert(m_data_other,data[i]) + end + end + + -- printlog("比较计算11=========m_data_my>>>",#m_data_my) + -- printlog("比较计算11=========m_data_other>>>",#m_data_other) + + for i = 1, #m_data_other do + self.hp_log[#self.hp_log + 1] = m_data_other[i] + end + self.m_index = #data - #m_data_other + self.m_index + end + +end + +local function fillItem(data, obj) + local num = d2ad(data.hp) + obj:GetChild("tex_num").text = num >= 0 and ('+' .. num) or num + obj:GetChild("tex_time").text = os.date("%Y-%m-%d\n%H:%M",data.time) + obj:GetChild("tex_reason").text = __getReason(data) +end + +-- 填充体力值详情对象 +function M:OnRenderItem(index, obj) + local data = self.hp_log[index + 1] + obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(self.member.nick) + local num = d2ad(data.hp) + obj:GetChild("tex_num").text = num >= 0 and ('+' .. num) or num + obj:GetController("add").selectedIndex = num >= 0 and 1 or 0 + obj:GetChild("tex_fag").text = d2ad(data.cur_hp) + obj:GetChild("tex_reason").text = __getReason(data) + obj:GetChild("tex_time").text = os.date("%Y-%m-%d\n%H:%M",data.time) + local btn_head = obj:GetChild("btn_head") + btn_head.icon = "ui://Common/Head0" + ImageLoad.Load(self.member.portrait, btn_head._iconObject) + obj:GetController("show_check").selectedIndex = data.reason == 15 and 1 or 0 + local btn_check = obj:GetChild("btn_check") + if data.reason ~= 15 or not data.detail then + btn_check.selected = false + obj:GetController("c1").selectedIndex = 0 + obj.height = 94 + end + btn_check.onClick:Set(function() + local lst = obj:GetChild("lst") + lst:RemoveChildrenToPool() + if not btn_check.selected then + obj.height = 94 + self.lst_fag:RefreshVirtualList() + return + end + if data.detail then + lst:RemoveChildrenToPool() + for i = 1, #data.detail do + local item = lst:AddItemFromPool() + fillItem(data.detail[i], item) + end + obj.height =95 * (#data.detail+1) + self.lst_fag:RefreshVirtualList() + self.lst_fag:ScrollToView(index) + else + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetHpLogDetail(self.group_id, self.member.uid, data.roomid, data.time, function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取积分详情失败") + else + data.detail = res.Data.hp_logs + lst:RemoveChildrenToPool() + for i = 1, #data.detail do + local item = lst:AddItemFromPool() + fillItem(data.detail[i], item) + end + obj.height =95 * (#data.detail+1) + self.lst_fag:RefreshVirtualList() + self.lst_fag:ScrollToView(index) + end + end) + end + end) +end + +-- 获取日统计数据 +function M:GetDailyData() + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetPlayerDailyHPCount(self.group_id, self.member.uid, function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取积分详情失败") + else + self.daily_count = res.Data.list + self.lst_daily_count.numItems = #self.daily_count + end + end) +end + +-- 填充日统计对象 +function M:OnRenderDailyItem(index, obj) + local data = self.daily_count[#self.daily_count - index] + obj:GetChild("tex_date").text = os.date("%Y-%m-%d",data.time) + local num = d2ad(data.num) + obj:GetChild("tex_num").text = num >= 0 and ('+' .. num) or num +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMemberOperateView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMemberOperateView.lua new file mode 100644 index 00000000..4a383a22 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMemberOperateView.lua @@ -0,0 +1,508 @@ +local GroupNumberInputView = import(".GroupNumberInputView") +local GroupMemberFagLogView = import(".GroupMemberFagLogView") +local GroupSetPermissionView = import(".GroupSetPermissionView") +local GroupBanSameTableView = import(".GroupBanSameTableView") +local MngPermission = import(".MngPermission") +local GroupSetTagView = import("../GroupSetTagView") +local GroupSetMemberInfoDiaoduView=import('.GroupSetMemberInfoDiaoduView') +local GroupPartnerBanPlaysView = import(".GroupPartnerBanPlaysView") + +-- 牌友圈成员体力值记录 +local GroupMemberOperateView = {} + +local M = GroupMemberOperateView + +function GroupMemberOperateView.new(group_id, member, callBack,callBack1) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupMemberOperateView" + self._close_destroy = true + -- self._blur_view = blur_view + --print("GroupMemberOperateView==============") + --pt(member) + self.member = member + self.group_id = group_id + self.callBack = callBack + self.callBack1 = callBack1 + self:init("ui://NewGroup/Win_PlayerInfo") + return self +end + +-- 管理员权限 +local MngPermissionList = { + DeleteMember = 1,-- 删除成员 + AddMember = 2,--添加成员 + SetFag = 3,--设置体力值 + BanPlaying = 4,--禁止游戏 + BanSameTable = 5--禁止同桌 +} + +local function CheckPermission(lev, permission) + if lev == 2 and not permission then + ViewUtil.ErrorTip(nil, "您无权操作!如有需要请联系盟主。", 1) + return false + end + return true +end + +function M:init(url) + BaseWindow.init(self,url) + + local member = self.member + local group = DataManager.groups:get(self.group_id) + --print("DataManager.groups:get(self.group_id)") + --pt(group) + local perm_array = MngPermission.getPermData(group.permission) + + local btn_close = self._view:GetChild("btn_close") + btn_close.onClick:Set(function() + self:Destroy() + end) + + self._view:GetChild("tex_id").text = "ID:" .. member.uid + + self._view:GetChild("tex_name").text = ViewUtil.stringEllipsis(member.nick) + self._view:GetChild("btn_head").icon = "ui://Common/Head0" + ImageLoad.Load(member.portrait, self._view:GetChild("btn_head")._iconObject, self.class) + + -- obj.data = member.id + -- 显示玩家标签,合伙人、管理员 + local ctr_type = self._view:GetController("type") + if member.lev < 3 then + ctr_type.selectedIndex = member.lev + elseif member.partnerLev ~= 0 then + ctr_type.selectedIndex = 3 + else + ctr_type.selectedIndex = 0 + end + + local ctr_superior = self._view:GetController("show_superior") + if member.superior then + ctr_superior.selectedIndex = 2 + if #member.superior > 0 then + local lst_superior = self._view:GetChild("lst_superior") + lst_superior:RemoveChildrenToPool() + for i = 1, #member.superior do + local item = lst_superior:AddItemFromPool() + item:GetChild("tex_id").text = member.superior[i] + -- item:GetChild("tex_num").text = tostring(#member.superior - i + 1) .. "级" + end + end + elseif member.parentId ~= 0 then + self._view:GetChild("tex_superior_id").text = member.parentId + if group.owner == member.parentId or member.uid == DataManager.SelfUser.account_id then + ctr_superior.selectedIndex = 0 + else + ctr_superior.selectedIndex = 1 + end + elseif member.lev == 3 then + self._view:GetChild("tex_superior_id").text = "" + ctr_superior.selectedIndex = 3 + else + ctr_superior.selectedIndex = 0 + self._view:GetChild("tex_superior_id").text = "" + end + + local fgCtr = ControllerManager.GetController(NewGroupController) + self._view:GetChild("btn_deploy").onClick:Set(function() + + local gniv = GroupNumberInputView.new(nil, function(num) + ViewUtil.ShowModalWait() + local parent_id = tonumber(num) + fgCtr:FG_FindMember(self.group_id, parent_id, function(res) + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.CloseModalWait() + ViewUtil.ErrorTip(res.ReturnCode, "找不到成员") + elseif res.Data.partnerLev == 0 then + ViewUtil.CloseModalWait() + ViewUtil.ErrorTip(res.ReturnCode, "目标不是合伙人") + else + fgCtr:FG_DeployMember(self.group_id, member.uid, parent_id, function(res1) + ViewUtil.CloseModalWait() + if (res1.ReturnCode == 0) then + member.parentId = parent_id + self._view:GetChild("tex_superior_id").text = parent_id + ctr_superior.selectedIndex = 1 + ViewUtil.ShowBannerOnScreenCenter("调配玩家成功") + else + ViewUtil.ErrorTip(res1.ReturnCode,"调配玩家失败") + end + end) + end + end) + end, 0, nil, "ui://NewGroup/Win_AddFriend") + gniv:Show() + end) + local vipbtn = self._view:GetChild("btn_vip") + if vipbtn ~= nil then + if (group.lev < member.lev) or (group.lev == 3 and group.partnerLev > 0 and member.uid ~= DataManager.SelfUser.account_id) or (group.lev < 3 and member.uid == DataManager.SelfUser.account_id ) then + vipbtn.visible = true + vipbtn.selected = member.isvip == 1 and true or false + vipbtn.onClick:Set(function() + local selected = vipbtn.selected and 1 or 0 + fgCtr:FG_GroupSetVip(self.group_id, member.uid, selected, function(res1) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res1.ReturnCode == 0 then + member.isvip = selected + self.callBack() + else + vipbtn.selected = not vipbtn.selected + ViewUtil.ErrorTip(res1.ReturnCode,"设置vip失败") + end + end) + end) + else + vipbtn.visible = false + end + end + + -- 管理功能列表 + local lst_mng = self._view:GetChild("lst_mng") + lst_mng:RemoveChildrenToPool() + -- 删除按钮 + local option = group.option or 0 + if (group.partnerLev > 0 and member.uid ~= DataManager.SelfUser.account_id and bit:_and(option,1) == 1) or group.lev < member.lev then + local btn_del = lst_mng:AddItemFromPool() + btn_del.icon = "ui://NewGroup/mng_del" + btn_del.onClick:Set(function() + if not CheckPermission(group.lev, perm_array[MngPermissionList.DeleteMember]) then + return + end + local _curren_msg = MsgWindow.new(nil, "确定删除该成员吗?", MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add(function() + ViewUtil.ShowModalWait() + fgCtr:FG_GroupRemoveMember(self.group_id, member.uid, function(res1) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res1.ReturnCode == 0 then + self.callBack(true) + ViewUtil.ShowBannerOnScreenCenter("已成功删除玩家") + self:Destroy() + else + ViewUtil.ErrorTip(res1.ReturnCode,"删除成员失败") + end + end) + end) + _curren_msg:Show() + + end) + end + + -- 禁止游戏 + -- + if (group.lev < member.lev) or (group.lev == 3 and group.partnerLev > 0 and member.uid ~= DataManager.SelfUser.account_id) then + --if group.lev == 1 and member.lev > 1 and member.partnerLev >0 and member.uid ~= DataManager.SelfUser.account_id then + local btn_ban = lst_mng:AddItemFromPool() + local pic = member.ban == 1 and "mng_del_ban" or "mng_ban" + btn_ban.icon = "ui://NewGroup/" .. pic + btn_ban.onClick:Set(function() + if not CheckPermission(group.lev, perm_array[MngPermissionList.BanPlaying]) then + return + end + + local str = member.ban == 1 and "确定恢复娱乐吗?" or "确定禁止娱乐吗?" + local _curren_msg = MsgWindow.new(nil, str, MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add(function() + ViewUtil.ShowModalWait() + local val = 1 - member.ban + fgCtr:FG_BanMember(self.group_id, member.uid, val, 1, function(res1) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res1.ReturnCode == 0 then + member.ban = val + pic = member.ban == 1 and "mng_del_ban" or "mng_ban" + btn_ban.icon = "ui://NewGroup/" .. pic + self.callBack() + else + ViewUtil.ErrorTip(res1.ReturnCode,"禁止娱乐失败!") + end + end) + end) + _curren_msg:Show() + end) + end + + --print("group.type=====================") + --print(group.type) + --pt(group) + if member.partnerLev > 0 and group.type == 2 and member.uid ~= DataManager.SelfUser.account_id then + local btn_ban = lst_mng:AddItemFromPool() + local pic = member.group_ban == 1 and "mng_del_ban_group" or "mng_ban_group" + btn_ban.icon = "ui://NewGroup/" .. pic + --printlog("jefe member.partnerLev",member.partnerLev) + --if member.partnerLev==1 then + btn_ban.onClick:Set(function() + -- if not CheckPermission(group.lev, perm_array[MngPermissionList.BanPlaying]) then + -- return + -- end + + + local str = member.group_ban == 1 and "确定恢复该合伙人整组娱乐吗?" or "确定禁止该合伙人整组娱乐吗?" + local _curren_msg = MsgWindow.new(nil, str, MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add(function() + ViewUtil.ShowModalWait() + local val = member.group_ban == 1 and 0 or 1 + fgCtr:FG_BanMember(self.group_id, member.uid, val, 2, function(res1) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res1.ReturnCode == 0 then + member.group_ban = val + pic = member.group_ban == 1 and "mng_del_ban_group" or "mng_ban_group" + btn_ban.icon = "ui://NewGroup/" .. pic + self.callBack() + else + ViewUtil.ErrorTip(res1.ReturnCode,val == 1 and "禁止整组娱乐失败!" or "恢复整组娱乐失败!") + end + end) + end) + _curren_msg:Show() + end) + -- end + end + -- 禁止同桌 + if group.lev < 3 then + local btn_ban_table = lst_mng:AddItemFromPool() + btn_ban_table.icon = "ui://NewGroup/mng_ban_table" + btn_ban_table.onClick:Set(function() + if not CheckPermission(group.lev, perm_array[MngPermissionList.BanSameTable]) then + return + end + ViewUtil.ShowModalWait() + fgCtr:FG_GetBanTable(self.group_id, member.uid, function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode == 0 then + local btv = GroupBanSameTableView.new(self.blur_view, self.group_id, member.uid, res.Data) + btv:Show() + else + ViewUtil.ErrorTip(res.ReturnCode,"获取禁止同桌列表失败!") + end + end) + end) + end + + + if group.lev == 1 and member.lev > 1 and member.partnerLev >0 and member.uid ~= DataManager.SelfUser.account_id then + --if false then + local btn_set_mng = lst_mng:AddItemFromPool() + btn_set_mng.icon = "ui://NewGroup/zhengzu" + btn_set_mng.onClick:Set( + function() + ViewUtil.ShowModalWait() + fgCtr:FG_GetBanMemberHB(self.group_id, member.uid, function(res) + ViewUtil.CloseModalWait() + --pt(res) + if res.ReturnCode == 0 then + local diaoduView=GroupSetMemberInfoDiaoduView.new(self.group_id, member.uid) + diaoduView:SetCurrentState(res.Data.group_black+1,res.Data) + else + ViewUtil.ErrorTip(res.ReturnCode,"获取整组调度失败!") + end + + end) + + end) + + end + + + + -- 设置管理员 + if group.lev == 1 and member.lev > 1 and member.partnerLev >= 0 then + local btn_set_mng = lst_mng:AddItemFromPool() + local pic = member.lev == 2 and "mng_del_mng" or "mng_set_mng" + btn_set_mng.icon = "ui://NewGroup/" .. pic + btn_set_mng.onClick:Set(function() + local str = member.lev == 3 and "确定设置玩家为副盟主吗?" or "确定取消玩家副盟主身份吗?" + local _curren_msg = MsgWindow.new(nil, str, MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add(function() + ViewUtil.ShowModalWait() + local val = 4 - member.lev + fgCtr:FG_SetManager(self.group_id, member.uid, val, function(res1) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res1.ReturnCode == 0 then + member.lev = val + 1 + self.callBack() + if val == 1 then + ctr_superior.selectedIndex = 0 + else + ctr_superior.selectedIndex = 3 + end + self:Destroy() + else + ViewUtil.ErrorTip(res1.ReturnCode,"设置副群主失败!") + end + end) + end) + _curren_msg:Show() + end) + end + + + if ((group.lev < 3 and member.parentId == 0) or (group.type == 2 and member.parentId == DataManager.SelfUser.account_id)) and member.partnerLev == 0 and member.lev == 3 then + local btn_set_partner = lst_mng:AddItemFromPool() + local pic = member.partnerLev == 0 and "mng_set_partner" or "mng_del_partner" + btn_set_partner.icon = "ui://NewGroup/" .. pic + btn_set_partner.onClick:Set(function() + local str = member.partnerLev == 0 and "确定设置玩家为合伙人吗?" or "确定取消玩家合伙人身份吗?" + local _curren_msg = MsgWindow.new(nil, str, MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add(function() + ViewUtil.ShowModalWait() + local val = member.partnerLev > 0 and 2 or 1 + fgCtr:FG_SetPartner(self.group_id, member.uid, val, function(res1) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res1.ReturnCode == 0 then + member.parentId = res1.Data.parentId + member.partnerLev = res1.Data.partnerLev + self.callBack() + ctr_superior.selectedIndex = 1 + + self:Destroy() + else + ViewUtil.ErrorTip(res1.ReturnCode,"设置合伙人失败失败!") + end + end) + end) + _curren_msg:Show() + end) + end + + if ((group.lev < 3 and member.parentId == 0) or (group.type == 2 and member.parentId == DataManager.SelfUser.account_id)) and member.partnerLev == 0 and member.lev == 2 then + local btn_set_permission = lst_mng:AddItemFromPool() + btn_set_permission.icon = "ui://NewGroup/mng_set_permission" + btn_set_permission.onClick:Set(function() + local gspv = GroupSetPermissionView.new(self.blur_view, self.group_id, member) + gspv:Show() + end) + end + + local btn_fag_info = lst_mng:AddItemFromPool() + btn_fag_info.icon = "ui://NewGroup/mng_fag" + btn_fag_info.onClick:Set(function() + local mflv = GroupMemberFagLogView.new(self.group_id, member) + mflv:Show() + end) + + if group.lev == 1 and member.partnerLev > 0 and group.type == 2 then + local btn_move = lst_mng:AddItemFromPool() + btn_move.icon = "ui://NewGroup/mng_move" + btn_move.onClick:Set(function() + local gniv = GroupNumberInputView.new(nil, function(num) + local parent_id = tonumber(num) + if parent_id == member.parentId then + ViewUtil.ErrorTip(nil, "已经在该合伙人名下") + return + elseif parent_id == member.id then + ViewUtil.ErrorTip(nil, "目标的上级不能是自己") + return + elseif parent_id == DataManager.SelfUser.account_id then + self:MovePartner(parent_id, member, self._view) + return + end + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_FindMember(self.group_id, parent_id, function(res) + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.CloseModalWait() + ViewUtil.ErrorTip(res.ReturnCode, "找不到成员") + elseif res.Data.partnerLev == 0 then + ViewUtil.CloseModalWait() + ViewUtil.ErrorTip(res.ReturnCode, "目标不是合伙人") + else + self:MovePartner(parent_id, member, self._view) + end + end) + end, 0, nil, "ui://NewGroup/Win_AddFriend") + gniv:Show() + end) + end + + if member.parentId == DataManager.SelfUser.account_id then + local btn_set_tag = lst_mng:AddItemFromPool() + btn_set_tag.icon = "ui://NewGroup/mng_set_tag" + btn_set_tag.onClick:Set(function() + local stv = GroupSetTagView.new(self.group_id, member, function(refresh) + if refresh then + self.callBack() + end + end) + stv:Show() + end) + end + + if group.lev == 1 then + local btn_banplays = lst_mng:AddItemFromPool() + btn_banplays.icon = "ui://NewGroup/mng_ban_plays" + btn_banplays.onClick:Set(function() + local banplays = GroupPartnerBanPlaysView.new(self.group_id,member.uid) + banplays:Show() + end) + end + + if group.lev == 1 then + local btn_qiangzhi = lst_mng:AddItemFromPool() + btn_qiangzhi.icon = "ui://NewGroup/mng_qiangzhi" + btn_qiangzhi.onClick:Set(function() + local msg_tip = MsgWindow.new(self._root_view,"确定全部提取吗?", MsgWindow.MsgMode.OnlyOk) + msg_tip.onOk:Add(function( ... ) + ViewUtil.ShowModalWait() + fgCtr:FG_TakeHp1(self.group_id, member.uid, function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "提取失败") + else + ViewUtil.ErrorTip(res.ReturnCode, "提取成功") + self:Destroy() + if self.callBack1 then + self.callBack1() + end + end + end) + msg_tip:Close() + end) + msg_tip:Show() + end) + end +end + +function M:MovePartner(parent_id, member, obj) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_MovePartner(self.group_id, member.uid, parent_id, function(res1) + ViewUtil.CloseModalWait() + if (res1.ReturnCode == 0) then + member.parentId = parent_id + member.partnerLev = res1.Data.partnerLev + obj:GetChild("tex_superior_id").text = parent_id + obj:GetController("show_superior").selectedIndex = 1 + ViewUtil.ShowBannerOnScreenCenter("转移成功") + else + ViewUtil.ErrorTip(res1.ReturnCode,"转移失败") + end + end) +end + + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngAddMemberView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngAddMemberView.lua new file mode 100644 index 00000000..121001ce --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngAddMemberView.lua @@ -0,0 +1,166 @@ +-- 牌友圈添加成员 +local MngPermission = import(".MngPermission") +local GroupMngAddMemberView = {} + +local M = GroupMngAddMemberView + +function GroupMngAddMemberView.new(gid) + local self = M + self.class = "GroupMngAddMemberView" + self.group_id = gid + self:FillView() + return self +end + +-- 初始化数据 +function M:initData() + local ctr_page = self._view:GetController("page") + if ctr_page.selectedIndex == 1 then + self:GetJoinsData() + end +end + +-- 快速访问 +function M:navigation() + self._view:GetController("page").selectedIndex = 1 + self:initData() +end + +local function CheckPermission(lev, permission) + if lev == 2 and not permission then + ViewUtil.ErrorTip(nil, "您无权操作!如有需要请联系盟主。", 1) + return false + end + return true +end + +function M:FillView() + local group = DataManager.groups:get(self.group_id) + local perm_array = MngPermission.getPermData(group.permission) + + self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupAddMember") + + self.tex_num = self._view:GetChild("tex_num") + self:ClearNumTex() + + local cnt = self._view.numChildren - 1 + + for i = 0 ,9 do + local obj = self._view:GetChild("btn_"..i) + obj.onClick:Add(handler(self , self.OnNumButtonAction)) + i = i + 1 + end + local btn_ok = self._view:GetChild("btn_ok") + btn_ok.onClick:Set(function() + if not CheckPermission(group.lev, perm_array[2]) then + return + end + if self._texnum_str == "" then return end + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_AddMember(self.group_id, tonumber(self._texnum_str), function(response) + ViewUtil.CloseModalWait() + if (response.ReturnCode == 0) then + ViewUtil.ShowBannerOnScreenCenter("添加成功!", 1) + else + ViewUtil.ErrorTip(response.ReturnCode,"邀请玩家失败!") + end + end) + end) + local btn_del = self._view:GetChild("btn_del") + btn_del.onClick:Add(handler(self , self.OnNumButtonAction)) + + local ctr_mng = self._view:GetController("mng") + if group.lev < 3 then + ctr_mng.selectedIndex = 1 + end + local ctr_page = self._view:GetController("page") + ctr_page.onChanged:Set(function() + if ctr_page.selectedIndex == 1 then + self:GetJoinsData() + end + end) +end + +--获取申请列表 +function M:GetJoinsData() + local group = DataManager.groups:get(self.group_id) + if group.joins > 0 then + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GroupJoins(self.group_id, function(res) + ViewUtil.CloseModalWait() + if (res.ReturnCode == 0) then + local joins = res.Data.joins + group.joins = #joins + if #joins == 0 then + group.update_joins = true + end + self:FillJoinList(joins) + else + ViewUtil.ErrorTip(res.ReturnCode,"获取申请列表失败!") + self:FillJoinList({}) + end + end) + else + self:FillJoinList({}) + end +end + +--填充申请 +function M:FillJoinList(data) + local lst_joins = self._view:GetChild("lst_joins") + lst_joins:RemoveChildrenToPool() + for i = 1, #data do + local item = lst_joins:AddItemFromPool() + item:GetChild("tex_name").text = ViewUtil.stringEllipsis(data[i].nick) + item:GetChild("tex_id").text = data[i].id + local btn_head = item:GetChild("btn_head") + ImageLoad.Load(data[i].portrait, btn_head._iconObject) + item:GetChild("btn_yes").onClick:Set(function() + self:VerifyPlayerJoin(data[i].id, true) + end) + item:GetChild("btn_no").onClick:Set(function() + self:VerifyPlayerJoin(data[i].id, false) + end) + end +end + +function M:VerifyPlayerJoin(id, allow) + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GroupVerifyJoin(self.group_id, id, allow, function(res) + ViewUtil.CloseModalWait() + if (res.ReturnCode == 0) then + self:GetJoinsData() + else + ViewUtil.ErrorTip(res.ReturnCode, "操作申请失败") + end + end) +end + +function M:OnNumButtonAction(context) + local typer = string.sub(context.sender.name ,5) + if typer == "del" then + if (self._currenIndex > 0) then + self._currenIndex = self._currenIndex - 1 + self._texnum_str = string.sub(self._texnum_str,0,self._currenIndex) + self.tex_num.text = self._texnum_str + end + else + if (self._currenIndex < 6) then + self._currenIndex = self._currenIndex + 1 + self._texnum_str = self._texnum_str .. typer + self.tex_num.text = self._texnum_str + + end + end +end + +function M:ClearNumTex() + self._texnum_str = "" + self._currenIndex = 0 + self.tex_num.text = self._texnum_str +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngAddPartner.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngAddPartner.lua new file mode 100644 index 00000000..78b57cfc --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngAddPartner.lua @@ -0,0 +1,54 @@ +-- 牌友圈成员体力值记录 +local GroupMngAddPartner = {} + +local M = GroupMngAddPartner + +function GroupMngAddPartner.new(group_id, member,callback) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupMngAddPartner" + self._close_destroy = true + -- self._blur_view = blur_view + self.member = member + self.group_id = group_id + self.callback = callback + self:init("ui://NewGroup/Win_AddPartner") + return self +end + + +function M:init(url) + + BaseWindow.init(self,url) + + local member = self.member + local group = DataManager.groups:get(self.group_id) + + + self._view:GetChild("tex_id").text = "ID:" .. member.uid + + self._view:GetChild("tex_name").text = ViewUtil.stringEllipsis(member.nick) + self._view:GetChild("btn_head").icon = "ui://Common/Head0" + ImageLoad.Load(member.portrait, self._view:GetChild("btn_head")._iconObject, self.class) + + self._view:GetChild("btn_ok").onClick:Set(function() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_SetPartner(self.group_id, member.uid, 1, function(res1) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res1.ReturnCode == 0 then + member.parentId = res1.Data.parentId + member.partnerLev = res1.Data.partnerLev + self.callback() + self:Destroy() + else + ViewUtil.ErrorTip(res1.ReturnCode,"设置合伙人失败失败!") + end + end) + end) +end + + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngFagListView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngFagListView.lua new file mode 100644 index 00000000..43eb97fd --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngFagListView.lua @@ -0,0 +1,227 @@ +--牌友圈体力值记录 +local TimeSettingPanel = import(".TimeSettingPanel") +local GroupMngFagListView = {} + +local M = GroupMngFagListView + +function GroupMngFagListView.new(group_id) + local self = M + self.class = "GroupMngFagListView" + self.group_id = group_id + -- 体力值数据 + self.fag_data = {} + -- 体力值查询结果 + self.fag_result_data = {} + -- 查询id + self.quary_id = 0 + self.query_nick = "" + self:FillView() + return self +end + +function M:initData() + + self.fag_result_data = {} + self.fag_data = {} + + if self._view:GetController("page").selectedIndex < 2 then + self:GetFagData(0) + else + self:GetMngFagInfo() + end + local group = DataManager.groups:get(self.group_id) + if group.lev < 3 then + self:GetHpStatistic() + end +end + +function M:FillView() + + + + self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupFagList") + local group = DataManager.groups:get(self.group_id) + if group.lev < 3 then + self._view:GetController("mng").selectedIndex = 1 + end + -- 初始化列表 + self.lst_fag = self._view:GetChild("lst_fag") + self.lst_fag:SetVirtual() + self.lst_fag.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + self.lst_fag.scrollPane.onPullUpRelease:Set(function() + self:GetFagData(self.lst_fag.numItems) + end) + self.lst_fag_result = self._view:GetChild("lst_fag_result") + self.lst_fag_result:SetVirtual() + self.lst_fag_result.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + self.lst_fag_result.scrollPane.onPullUpRelease:Set(function() + self:GetFagData(self.lst_fag_result.numItems) + end) + + -- 切换页面事件,1,2页为上下分,3页是管理员总计 + self._view:GetController("page").onChanged:Set(function() + if self._view:GetController("page").selectedIndex < 2 then + if self._view:GetController("search").selectedIndex == 0 then + self.quary_id = 0 + self.query_nick = "" + + self.fag_data = {} + self:GetFagData(0) + else + + self.quary_id = 0 + self.query_nick = "" + + self.fag_result_data = {} + self:GetFagData(0) + end + else + self:GetMngFagInfo() + end + end) + + self._view:GetChild("btn_search").onClick:Set(function() + local qid = self._view:GetChild("tex_id").text + qid = tonumber(qid) + self.quary_id = qid or 0 + self.query_nick = self._view:GetChild("tex_id").text or "" + self.fag_result_data = {} + self._view:GetChild("tex_id").text = "" + self:GetFagData(0) + end) + self._view:GetChild("btn_back").onClick:Set(function() + self.quary_id = 0 + self.query_nick = "" + end) + + self.time_panel1 = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0, function() + self:GetMngFagInfo() + end) +end + +-- 获取上下分数据 +local num = 8 +function M:GetFagData(index) + qid = self.quary_id or 0 + qName = self.query_nick or "" + -- 重新获取数据时,清空数据列表 + if index == 0 then + if qid == 0 then + self.fag_data = {} + else + self.fag_result_data = {} + end + end + ViewUtil.ShowModalWait(nil) + + --type:1管理员加分,2管理员减分,3合伙人加分,4合伙人减分 + local type = self._view:GetController("page").selectedIndex + 1 + local group = DataManager.groups:get(self.group_id) + if group.lev == 3 then + type = type + 2 + end + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetMngHpLog(self.group_id, index, num, type, qid, qName, function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取积分记录失败") + else + if res.Data.hp_logs ~= nil then + local data = res.Data.hp_logs + -- if #data == 0 then return end + local local_data = self.fag_data + local lst = self.lst_fag + if qid ~= 0 or self.query_nick ~= "" then + local_data = self.fag_result_data + lst = self.lst_fag_result + self._view:GetController("search").selectedIndex = 1 + else + self._view:GetController("search").selectedIndex = 0 + end + for i = 1, #data do + local_data[#local_data + 1] = data[i] + end + lst.numItems = #local_data + end + end + end) +end + +-- 获取体力值统计 +function M:GetHpStatistic() + -- ViewUtil.ShowModalWait(nil, "正在获取数据") + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetMngHpStatistic(self.group_id, function(res) + -- ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取积分记录失败") + else + self._view:GetChild("tex_yd_cost").text = d2ad(res.Data.last_hp_cost) + self._view:GetChild("tex_td_cost").text = d2ad(res.Data.hp_cost) + self._view:GetChild("tex_add").text = d2ad(res.Data.hp_upper) + self._view:GetChild("tex_minus").text = d2ad(res.Data.hp_sub) + end + end) +end + +-- 获取管理员总计/合伙人总计 +function M:GetMngFagInfo() + ViewUtil.ShowModalWait(nil) + local begin_time, end_time = self.time_panel1:GetDate() + local group = DataManager.groups:get(self.group_id) + local type = group.lev < 3 and 1 or 2 + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetMngHpInfo(self.group_id, type, begin_time, end_time, function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取积分详情失败") + else + local add_count = 0 + local minus_count = 0 + local lst_fag_info = self._view:GetChild("lst_mgr_data") + lst_fag_info:RemoveChildrenToPool() + for i = 1, #res.Data.infos do + local data = res.Data.infos[i] + local item = lst_fag_info:AddItemFromPool() + item:GetChild("tex_mgr").text = not data.lev and "合伙人" or (data.lev == 1 and "盟主" or "副盟主") + item:GetChild("tex_name").text = ViewUtil.stringEllipsis(data.nick) + item:GetChild("tex_add").text = d2ad(data.hp_upper) + item:GetChild("tex_minus").text = d2ad(data.hp_sub) + add_count = add_count + data.hp_upper + minus_count = minus_count + data.hp_sub + end + self._view:GetChild("tex_add2").text = d2ad(add_count) + self._view:GetChild("tex_minus2").text = d2ad(minus_count) + end + end) +end + +-- 填充对象 +function M:OnRenderItem(index, obj) + local local_data = (self.quary_id == 0 and self.query_nick == "" ) and self.fag_data or self.fag_result_data + local rdata = local_data[index + 1] + local num = d2ad(rdata.hp) + obj:GetChild("tex_mgr_name").text = ViewUtil.stringEllipsis(rdata.m_nick) + obj:GetChild("tex_mgr_id").text = rdata.mgr_id + obj:GetChild("tex_obj_name").text = ViewUtil.stringEllipsis(rdata.t_nick) + obj:GetChild("tex_id").text = rdata.uid + obj:GetChild("tex_num").text = num >= 0 and "+".. num or num + obj:GetController("add").selectedIndex = num >=0 and 1 or 0 + obj:GetChild("tex_left").text = d2ad(rdata.cur_hp) + obj:GetChild("tex_time").text = os.date("%Y-%m-%d\n%H:%M",rdata.time) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngFagPackStatView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngFagPackStatView.lua new file mode 100644 index 00000000..74552aa8 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngFagPackStatView.lua @@ -0,0 +1,38 @@ +-- 能量包统计 +local GroupTakeLogView = import(".GroupTakeLogView") +local GroupRewardsLogView = import(".GroupRewardsLogView") +local GroupNumberInputView = import(".GroupNumberInputView") + +local GroupMngFagPackStatView = {} + +local M = GroupMngFagPackStatView + +function GroupMngFagPackStatView.new(gid, blur_view) + local self = M + self.class = "GroupMngFagPackStatView" + self.group_id = gid + self.blur_view = blur_view + self:InitView() + return self +end + +function M:InitView() + self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupFagPackStat") +end + +function M:initData() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetFagPackInfo(self.group_id, function(res) + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取能量包失败") + else + local data = res.Data + self._view:GetChild("tex_total_fag").text = d2ad(data.hp_num1) + self._view:GetChild("tex_minus_fag").text = d2ad(data.hp_num2) + self._view:GetChild("tex_fagpack").text = d2ad(data.hp_num3) + self._view:GetChild("tex_group_total_fag").text = d2ad(data.hp_num1 + data.hp_num3) + end + end) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngGameListView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngGameListView.lua new file mode 100644 index 00000000..a4c1a605 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngGameListView.lua @@ -0,0 +1,253 @@ +-- 牌友圈玩法列表 +local GroupGameSettingView = import(".GroupGameSettingView") +local GroupMngGameListView = {} + +local M = GroupMngGameListView + +function GroupMngGameListView.new(gid, blur_view) + UIPackage.AddPackage("base/newgroup/ui/NewGroup") + + setmetatable(M, { __index = BaseWindow }) + local self = setmetatable({}, { __index = M }) + self.class = "GroupMngGameListView" + self.group_id = gid + self.blur_view = blur_view + self._close_destroy = true + self._put_map = false + self._new_hide = false + self._queue = false + self._full = true + self:init("ui://NewGroup/View_GroupGameList") + self:InitView() + return self +end + +function M:InitView() + self._view:GetChild("btn_add").onClick:Set(function() + self:EditPlay() + end) + self:FillView() +end + +function M:FillView() + -- 填充玩法对象 + self.lst_play = self._view:GetChild("lst_play") + self.lst_play:SetVirtual() + self.lst_play.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + self:initData() + local group = DataManager.groups:get(self.group_id) + if group.lev == 1 then + self._view:GetController("owner").selectedIndex = 1 + end +end + +function M:initData() + local group = DataManager.groups:get(self.group_id) + + self.lst_play.numItems = #group.playList +end + +function M:OnRenderItem(index, obj) + local group = DataManager.groups:get(self.group_id) + local play = group.playList[index + 1] + + if not play then + self:initData() + end + obj:GetChild("tex_num").text = index + 1 + obj:GetChild("tex_name").text = play.name + obj:GetChild("tex_play").text = play.game_name + local game = DataManager.SelfUser:getGameData(play.gameId) + local data + + local hpStr + local hpData = json.decode(play.hpData) + if play.hpOnOff == 1 then + -- print(vardump(play)) + local str_reward_type = play.rewardType == 1 and "赢家返点" or (play.rewardType == 2 and "人头返点") + local str_reward_val = play.rewardValueType == 1 and "百分比返点" or "固定值返点" + local str_hp_type = hpData.type == 1 and "固定抽水" or "浮动抽水" + local str_base_pump = (hpData.basePump ~= nil and hpData.basePump > 0) and "抽水保障" .. d2ad(hpData.basePump) or "" + local str_pump = "" + local str_hp_winner = hpData.limitPump == 0 and "大赢家" or hpData.limitPump == 1 and "所有赢家" or + hpData.limitPump == 2 and "两个赢家" or hpData.limitPump == 2 and "三个赢家" or "所有玩家平分" + if hpData.rewards_list then + -- for i = 1, #hpData.rewards_list do + local rd = hpData.rewards_list[#hpData.rewards_list] + local pump = hpData.type == 2 and rd.pumpProportion or d2ad(rd.pumpProportion) + str_pump = str_pump .. string.format(" 抽%s次 %s分", pump, d2ad(rd.UpperLimit)) + -- end + else + local pump = hpData.type == 2 and hpData.pumpProportion or d2ad(hpData.pumpProportion) + str_pump = string.format(" 抽%s次 %s分", pump, d2ad(hpData.UpperLimit)) + end + local str_fag = string.format("%s %s%s", str_hp_type, str_hp_winner, str_pump) + local str = string.format("%s %s 进入门槛%s 倍数%s %s %s", str_reward_type, str_reward_val, d2ad(hpData.limitInRoom), + d2ad(hpData.times), str_base_pump, str_fag) + -- local str = string.format("进入门槛%s 倍数%s %s %s", d2ad(hpData.limitInRoom), d2ad(hpData.times), str_reward_type, str_reward_val) + if game and game.hpType > 1 then + str = string.format("%s 抢庄限制%s 退出限制%s", str, d2ad(hpData.limitloot), d2ad(hpData.limitPlay)) + end + -- if data and data.isNonnegative == 1 then + -- str = str .. " 不可负分" + -- if data.hp_no_limit == 1 then + -- str = str .. " 赢分无上限" + -- end + -- end + + hpStr = "[color=#08a805]积分设置:[/color]" .. "[color=#2365bb]" .. str .. "[/color]" + else + hpStr = "[color=#08a805]积分设置:[/color]" .. "积分关闭" + end + --obj:GetChild("tex_fag_info").text = "积分关闭" + local gameStr + if not game then + gameStr = "没有添加该玩法" + else + -- 副圈主初始化扩展 + if group.lev == 2 then + ExtendManager.Init(DataManager.SelfUser.games) + end + local exconfig = ExtendManager.GetExtendConfig(play.gameId) + + data = json.decode(play.config) + local r = {} + exconfig:FillRoomConfig(r, data) + gameStr = string.gsub(r.room_config:GetDes(), "\r", "") + + gameStr = "[color=#08a805]玩法说明:[/color]" .. "[color=#2365bb]" .. gameStr .. "[/color]" + end + + obj:GetChild("com_gameinfo"):GetChild("tex_room_info").text = hpStr .. "\n" .. gameStr + + + obj:GetChild("btn_del").onClick:Set(function() + local msg_del = MsgWindow.new(nil, "删除该玩法,该玩法的相关数据也会被清除。\r确定要删除吗?", MsgWindow.MsgMode.OkAndCancel) + msg_del.onOk:Add(function(...) + local fgCtr = ControllerManager.GetController(NewGroupController) + ViewUtil.ShowModalWait() + fgCtr:FG_DelPlay(self.group_id, play.id, function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode == 0 then + group:delPlay(play.id) + self.lst_play.numItems = #group.playList + local group = DataManager.groups:get(self.group_id) + group.update_play = true + else + ViewUtil.ErrorTip(res.ReturnCode, "删除玩法失败") + end + end) + end) + msg_del:Show() + end) + obj:GetChild("btn_edit").onClick:Set(function() + self:EditPlay(play.id, play.config) + end) + obj:GetChild("btn_ban").onClick:Set(function() + self:BanPlay(play.id, 1) + end) + obj:GetChild("btn_cancel_ban").onClick:Set(function() + self:BanPlay(play.id, 0) + end) + obj:GetController("ban").selectedIndex = play.ban or 0 + + + -- local MarkSelect=obj:GetChild("btn_select") + -- if play.mark then + -- MarkSelect.selected=true + -- else + -- MarkSelect.selected=false + -- end + -- obj:GetChild("btn_select").onClick:Set(function() + -- self:MarkPlay(MarkSelect,play.id,MarkSelect.selected) + -- end) +end + +function M:MarkPlay(markS, pid, isMark) + local fgCtr = ControllerManager.GetController(NewGroupController) + ViewUtil.ShowModalWait() + fgCtr:FG_MarkPlay(self.group_id, pid, isMark, function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode == 0 then + local group = DataManager.groups:get(self.group_id) + group:markPlay(pid, isMark) + self:SetSortOrder(group.playList) + self.lst_play.numItems = #group.playList + else + markS.selected = not isMark + ViewUtil.ErrorTip(res.ReturnCode, "设置失败,或已达设置上限") + end + end) +end + +function M:SetSortOrder(playList) + if playList and #playList > 0 then + local oldList = {} + local newList = {} + for i = 1, #playList do + if playList[i].mark then + table.insert(newList, playList[i]) + else + table.insert(oldList, playList[i]) + end + end + + if #newList > 0 then + for i = 1, #newList do + table.insert(oldList, newList[i]) + end + end + DataManager.groups:get(self.group_id).playList = oldList + end +end + +-- 设置玩法 +function M:EditPlay(pid, config) + if #DataManager.SelfUser.games == 0 then + ViewUtil.ErrorTip(nil, "请先至游戏大厅创建房间添加玩法") + return + end + local tem = GroupGameSettingView.new(self.blur_view, self.group_id, pid, config, function(play) + local group = DataManager.groups:get(self.group_id) + group:addPlay(play) + self:FillView() + printlog("刷新玩法===>>>>") + group.update_play = true + self.createBack() + end) + tem:Show() +end + +-- 禁止、恢复玩法 +function M:BanPlay(pid, ban) + local fgCtr = ControllerManager.GetController(NewGroupController) + ViewUtil.ShowModalWait() + fgCtr:FG_BanPlay(self.group_id, pid, ban, function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode == 0 then + local group = DataManager.groups:get(self.group_id) + group:banPlay(pid, ban) + self.lst_play.numItems = #group.playList + else + ViewUtil.ErrorTip(res.ReturnCode, "设置失败") + end + end) +end + +--回调填充 +function M:CreateCallBack(Fct) + self.createBack = Fct +end + +return M diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberInfoView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberInfoView.lua new file mode 100644 index 00000000..833d90f7 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberInfoView.lua @@ -0,0 +1,41 @@ + +-- 开桌统计 +local GroupMngMemberInfoView = {} + +local M = GroupMngMemberInfoView + +function GroupMngMemberInfoView.new(gid) + local self = M + self.class = "GroupMngMemberInfoView" + self.group_id = gid + self:InitView() + return self +end + +function M:initData() + self:ShowPeopleNum() +end + +function M:ShowPeopleNum() + ViewUtil.ShowModalWait(nil) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetMembersCount(self.group_id,function(res) + + ViewUtil.CloseModalWait() + + if res.ReturnCode == 0 then + self._view:GetChild('tex_memb_num').text = res.Data.member_num + self._view:GetChild('tex_total_hp').text = d2ad(res.Data.hp_num1+res.Data.otherHp) + end + end) +end + +function M:InitView() + self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupMemberInfo") + +end + + + + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberListView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberListView.lua new file mode 100644 index 00000000..d92c4ee6 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberListView.lua @@ -0,0 +1,543 @@ +-- 牌友圈成员列表 +local GroupNumberInputView = import('.GroupNumberInputView') +local GroupMemberFagLogView = import('.GroupMemberFagLogView') +local GroupSetPermissionView = import('.GroupSetPermissionView') +local GroupBanSameTableView = import('.GroupBanSameTableView') +local GroupMemberOperateView = import('.GroupMemberOperateView') +local GroupAddMemberInfoView=import('.GroupAddMemberInfoView') + + +local MngPermission = import('.MngPermission') + +local GroupMngMemberListView = {} + +local M = GroupMngMemberListView + +local gid +function GroupMngMemberListView.new(group_id, blur_view) + local self = M + self.class = 'GroupMngMemberListView' + self.group_id = group_id + self.member_data = {} + self:FillView() + return self +end + +function M:initData() + if self._view:GetController('page').selectedIndex == 0 then + self:GetMemberData(0) + elseif self._view:GetController('page').selectedIndex == 1 then + self:GetJoinsData() + end +end + +-- 管理员权限 +local MngPermissionList = { + DeleteMember = 1, + -- 删除成员 + AddMember = 2, + --添加成员 + SetFag = 3, + --设置体力值 + BanPlaying = 4, + --禁止游戏 + BanSameTable = 5 + --禁止同桌 +} +local function CheckPermission(lev, permission) + if lev == 2 and not permission then + ViewUtil.ErrorTip(nil, '您无权操作!如有需要请联系盟主。', 1) + return false + end + return true +end + +function M:FillView() + self._view = UIPackage.CreateObjectFromURL('ui://NewGroup/View_GroupMemberList') + -- 初始化成员列表 + self.lst_member = self._view:GetChild('lst_member') + self.lst_member:SetVirtual() + self.lst_member.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + self.lst_member.scrollPane.onPullUpRelease:Set( + function() + --print("aaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbb ",self.lst_member.numItems) + self:GetMemberData(self.lst_member.numItems) + end + ) + + --local n50=self._view:GetChild('n50') + --print(n50) + --n50.displayObject.gameObject.transform.localPosition.x=214 + --print(n50.displayObject.gameObject.transform.localPosition.x) + -- 搜索玩家 + local ctr_search = self._view:GetController('search') + self._view:GetChild('btn_search').onClick:Set( + function() + ViewUtil.ShowModalWait(nil) + local text = self._view:GetChild('tex_id').text + local qid, qnick + if text == "" then + ViewUtil.CloseModalWait() + ViewUtil.ErrorTip(nil, '输入不能为空') + return + end + qid = tonumber(text) or 0 + qnick = text + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_FindMember( + self.group_id, + qid, + function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, '找不到成员') + else + self._view:GetChild('tex_id').text = '' + ctr_search.selectedIndex = 1 + local item_result = self._view:GetChild('lst_member_find') + item_result:RemoveChildrenToPool() + + for j = 1, #res.Data.members do + local tem = item_result:AddItemFromPool() + self:FillItem(tem, res.Data.members[j], true) + end + end + end, + qnick + ) + end + ) + local btn_back = self._view:GetChild('btn_back') + btn_back.onClick:Set( + function() + self.lst_member.numItems = #self.member_data + end + ) + + local group = DataManager.groups:get(self.group_id) + local perm_array = MngPermission.getPermData(group.permission) + + self.tex_num = self._view:GetChild('tex_num') + self:ClearNumTex() + + local cnt = self._view.numChildren - 1 + + for i = 0, 9 do + local obj = self._view:GetChild('btn_' .. i) + obj.onClick:Add(handler(self, self.OnNumButtonAction)) + i = i + 1 + end + local btn_ok = self._view:GetChild('btn_ok') + btn_ok.onClick:Set( + function() + if not CheckPermission(group.lev, perm_array[2]) then + return + end + if self._texnum_str == '' then + return + end + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:GetAddMember( + self.group_id, + tonumber(self._texnum_str), + function(response) + printlog("响应获取添加玩家==》》》") + pt(response) + ViewUtil.CloseModalWait() + if (response.ReturnCode and response.ReturnCode == 0) then + GroupAddMemberInfoView.new(self.group_id,tonumber(self._texnum_str)):SetAddMember(response.Data) + self:ClearNumTex() + --ViewUtil.ShowBannerOnScreenCenter('添加成功!', 1) + else + ViewUtil.ErrorTip(123456, '获取玩家失败') + end + end + ) + end + ) + local btn_del = self._view:GetChild('btn_del') + btn_del.onClick:Add(handler(self, self.OnNumButtonAction)) + + local ctr_mng = self._view:GetController('mng') + if group.lev < 3 then + ctr_mng.selectedIndex = 1 + end + local ctr_page = self._view:GetController('page') + ctr_page.onChanged:Set( + function() + self:initData() + end + ) + + + +end + +-- 快速访问 +function M:navigation() + self._view:GetController('page').selectedIndex = 2 + self:initData() +end + +-- 获取成员数据 +function M:GetMemberData(index) + --print("11111111111111111111") + --print(debug.traceback()) + local group = DataManager.groups:get(self.group_id) + if index == 0 then + group:clearMember() + end + + ViewUtil.ShowModalWait(nil) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GroupMembers11( + self.group_id, + index, + 6, + false, + 1, + function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, '获取成员列表失败') + else + self.member_data = group.members + self.lst_member.numItems = group.member_num + if index == 0 then + self._view:GetChild('tex_memb_num').text = res.Data.member_num + self._view:GetChild('tex_total_hp').text = d2ad(res.Data.hp_num1) + end + end + end + ) +end + +-- 修改体力值 +local function __change_fag(gid, pid, is_add, cur_hp, callback) + local gniv = + GroupNumberInputView.new( + nil, + function(num) + num = ad2d((is_add and num or -num)) + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_ChangeFag( + gid, + pid, + num, + function(res1) + ViewUtil.CloseModalWait() + -- if gniv._is_destroy then + -- return + -- end + if (res1.ReturnCode == 0) then + callback(res1.Data) + else + ViewUtil.ErrorTip(res1.ReturnCode, '更改积分失败!') + end + end + ) + -- item:GetChild("tex_fag").text = (self_user or show_fag) and num or show_fag_str + end, + is_add and 1 or 2, + cur_hp and d2ad(cur_hp) or nil + ) + gniv:Show() +end + +-- 填充成员对象 +function M:FillItem(obj, member, refresh) + local group = DataManager.groups:get(self.group_id) + obj:GetChild('tex_name').text = ViewUtil.stringEllipsis(member.nick) + obj:GetChild('btn_head').icon = 'ui://Common/Head0' + ImageLoad.Load(member.portrait, obj:GetChild('btn_head')._iconObject, self.class) + -- obj.data = member.id + -- 显示玩家标签,合伙人、管理员 + local ctr_type = obj:GetController('type') + if member.lev < 3 then + ctr_type.selectedIndex = member.lev + elseif member.partnerLev ~= 0 then + ctr_type.selectedIndex = 3 + else + ctr_type.selectedIndex = 0 + end + + -- 体力值数据 + local tex_fag = obj:GetChild('tex_fag') + tex_fag.text = d2ad(member.hp) + + obj:GetChild('tex_id').text = '' .. member.uid + --obj:GetChild("tex_cost_count").text = d2ad(member.last_hp_cost) + + if member.online == 1 then + obj:GetChild('tex_last_login').text = '在线' + else + if member.last_time ~= 0 then + obj:GetChild('tex_last_login').text = '最近登录\n' .. os.date('%Y/%m/%d', member.last_time) + else + obj:GetChild('tex_last_login').text = '加入时间\n' .. os.date('%Y/%m/%d', member.join_time) + end + end + + + --上级 + obj:GetChild('tex_shangjiName').text=member.parentId_nick or "" + if member.parentId==0 then + obj:GetChild('tex_shangjiID').text="" + else + obj:GetChild('tex_shangjiID').text=member.parentId + end + + + local perm_array = MngPermission.getPermData(group.permission) + -- 体力值操作按钮事件 + if group.lev < 3 or member.parentId == DataManager.SelfUser.account_id then + obj:GetController('fag').selectedIndex = 1 + else + obj:GetController('fag').selectedIndex = 0 + end + + obj:GetChild("btn_tag").title = member.score + + local fgCtr = ControllerManager.GetController(NewGroupController) + local p = group:getMember(member.uid) + local mp = group:getMember(DataManager.SelfUser.account_id) + obj:GetChild('btn_fag_add').onClick:Set( + function() + if not CheckPermission(group.lev, perm_array[MngPermissionList.SetFag]) then + return + end + __change_fag( + self.group_id, + member.uid, + true, + nil, + function(data) + local hp = data.hp + member.hp = hp + if p then + p.hp = hp + if mp and mp ~= p then + local mhp = data.mhp + mp.hp = mhp + end + end + self.lst_member.numItems = #self.member_data + -- 搜索出的玩家显示 + if self._view:GetController('search').selectedIndex == 1 then + obj:GetChild('tex_fag').text = d2ad(hp) + end + end + ) + end + ) + obj:GetChild('btn_fag_minus').onClick:Set( + function() + if not CheckPermission(group.lev, perm_array[MngPermissionList.SetFag]) then + return + end + __change_fag( + self.group_id, + member.uid, + false, + member.hp, + function(data) + local hp = data.hp + member.hp = hp + if p then + p.hp = hp + if mp and mp ~= p then + local mhp = data.mhp + mp.hp = mhp + end + end + self.lst_member.numItems = #self.member_data + -- 搜索出的玩家显示 + if self._view:GetController('search').selectedIndex == 1 then + obj:GetChild('tex_fag').text = d2ad(hp) + end + end + ) + end + ) + + obj:GetChild('btn_score_detail').onClick:Set( + function() + local mflv = GroupMemberFagLogView.new(self.group_id, member) + mflv:Show() + end + ) + + obj:GetChild('btn_operate').onClick:Set( + function() + local mflv = + GroupMemberOperateView.new( + self.group_id, + member, + function(delete) + if delete ~= nil and delete == true then + local group = DataManager.groups:get(self.group_id) + self.member_data = group.members + self.lst_member.numItems = #self.member_data + self._view:GetController('search').selectedIndex = 0 + else + self.lst_member.numItems = self.lst_member.numItems + if refresh then + self:FillItem(obj, member) + end + end + end + ) + mflv:Show() + end + ) + + obj:GetChild("super_btn").onClick:Set( + function() + ViewUtil.ShowModalWait(nil) + local text = member.uid + local qid, qnick + if text == "" then + ViewUtil.CloseModalWait() + ViewUtil.ErrorTip(nil, '输入不能为空') + return + end + qid = tonumber(text) or 0 + qnick = tostring(text) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_FindMember( + self.group_id, + qid, + function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, '找不到成员') + else + self._view:GetChild('tex_id').text = '' + self._view:GetController('search').selectedIndex = 1 + local item_result = self._view:GetChild('lst_member_find') + item_result:RemoveChildrenToPool() + + for j = 1, #res.Data.members do + local tem = item_result:AddItemFromPool() + self:FillItem(tem, res.Data.members[j], true) + end + end + end, + qnick, + 1 + ) + end + ) +end + +function M:OnRenderItem(index, obj) + local member = self.member_data[index + 1] + + if member then + self:FillItem(obj, member) + end +end + +--获取申请列表 +function M:GetJoinsData() + local group = DataManager.groups:get(self.group_id) + if group.joins > 0 then + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GroupJoins( + self.group_id, + function(res) + ViewUtil.CloseModalWait() + if (res.ReturnCode == 0) then + local joins = res.Data.joins + group.joins = #joins + if #joins == 0 then + group.update_joins = true + end + self:FillJoinList(joins) + else + ViewUtil.ErrorTip(res.ReturnCode, '获取申请列表失败!') + self:FillJoinList({}) + end + end + ) + else + self:FillJoinList({}) + end +end + +--填充申请 +function M:FillJoinList(data) + local lst_joins = self._view:GetChild('lst_joins') + lst_joins:RemoveChildrenToPool() + for i = 1, #data do + local item = lst_joins:AddItemFromPool() + item:GetChild('tex_name').text = ViewUtil.stringEllipsis(data[i].nick) + item:GetChild('tex_id').text = data[i].id + local btn_head = item:GetChild('btn_head') + ImageLoad.Load(data[i].portrait, btn_head._iconObject) + item:GetChild('btn_yes').onClick:Set( + function() + self:VerifyPlayerJoin(data[i].id, true) + end + ) + item:GetChild('btn_no').onClick:Set( + function() + self:VerifyPlayerJoin(data[i].id, false) + end + ) + end +end + +function M:VerifyPlayerJoin(id, allow) + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GroupVerifyJoin( + self.group_id, + id, + allow, + function(res) + ViewUtil.CloseModalWait() + if (res.ReturnCode == 0) then + self:GetJoinsData() + else + ViewUtil.ErrorTip(res.ReturnCode, '操作申请失败') + end + end + ) +end + +function M:OnNumButtonAction(context) + local typer = string.sub(context.sender.name, 5) + if typer == 'del' then + if (self._currenIndex > 0) then + self._currenIndex = self._currenIndex - 1 + self._texnum_str = string.sub(self._texnum_str, 0, self._currenIndex) + self.tex_num.text = self._texnum_str + end + else + if (self._currenIndex < 6) then + self._currenIndex = self._currenIndex + 1 + self._texnum_str = self._texnum_str .. typer + self.tex_num.text = self._texnum_str + end + end +end + +function M:ClearNumTex() + self._texnum_str = '' + self._currenIndex = 0 + self.tex_num.text = self._texnum_str +end + +return M diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberListView1.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberListView1.lua new file mode 100644 index 00000000..1474a2a8 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberListView1.lua @@ -0,0 +1,617 @@ +-- 牌友圈成员列表 +local GroupNumberInputView = import('.GroupNumberInputView') +local GroupMemberFagLogView = import('.GroupMemberFagLogView') +local GroupSetPermissionView = import('.GroupSetPermissionView') +local GroupBanSameTableView = import('.GroupBanSameTableView') +local GroupMemberOperateView = import('.GroupMemberOperateView') +local GroupAddMemberInfoView=import('.GroupAddMemberInfoView') +local GroupStatMember = import('.GroupStatMember') +local GroupMngFagPackView = import('../GroupMngFagPackView') + + +local MngPermission = import('.MngPermission') + +local GroupMngMemberListView1 = {} + +local M = GroupMngMemberListView1 + +local gid +function GroupMngMemberListView1.new(group_id, blur_view) + local self = M + self.class = 'GroupMngMemberListView1' + self.group_id = group_id + self.curGroup = DataManager.groups:get(self.group_id) + self.member_data = {} + self.online = 2 + self.stype = 1 + self:FillView() + return self +end + +function M:initData() + if self._view:GetController('page').selectedIndex == 0 then + self:GetMemberData(0) + elseif self._view:GetController('page').selectedIndex == 1 then + self:GetMemberData(0) + --self:GetJoinsData() + end +end + +-- 管理员权限 +local MngPermissionList = { + DeleteMember = 1, + -- 删除成员 + AddMember = 2, + --添加成员 + SetFag = 3, + --设置体力值 + BanPlaying = 4, + --禁止游戏 + BanSameTable = 5 + --禁止同桌 +} +local function CheckPermission(lev, permission) + if lev == 2 and not permission then + ViewUtil.ErrorTip(nil, '您无权操作!如有需要请联系盟主。', 1) + return false + end + return true +end + +function M:FillView() + self._view = UIPackage.CreateObjectFromURL('ui://NewGroup/View_GroupMemberList1') + + local rtype = self._view:GetChild("n132") + rtype.visible = false + + rtype.onChanged:Set(function () + if tostring(self.online) == rtype.value then + return + end + self.online = tonumber(rtype.value) + self:GetMemberData(0) + --printlog("aaaaaaaa222222222222222222222222222222") + + end) + + -- 初始化成员列表 + self.lst_member = self._view:GetChild('lst_member') + self.lst_member:SetVirtual() + self.lst_member.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + self.lst_member.scrollPane.onPullUpRelease:Set( + function() + --printlog("aaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbb ",self.lst_member.numItems) + self:GetMemberData(self.lst_member.numItems) + end + ) + + --local n50=self._view:GetChild('n50') + --print(n50) + --n50.displayObject.gameObject.transform.localPosition.x=214 + --print(n50.displayObject.gameObject.transform.localPosition.x) + -- 搜索玩家 + local ctr_search = self._view:GetController('search') + self._view:GetChild('btn_search').onClick:Set( + function() + ViewUtil.ShowModalWait(nil) + local text = self._view:GetChild('tex_id').text + local qid, qnick + if text == "" then + ViewUtil.CloseModalWait() + ViewUtil.ErrorTip(nil, '输入不能为空') + return + end + qid = tonumber(text) or 0 + qnick = text + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_FindMember( + self.group_id, + qid, + function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, '找不到成员') + else + self._view:GetChild('tex_id').text = '' + ctr_search.selectedIndex = 1 + local item_result = self._view:GetChild('lst_member_find') + item_result:RemoveChildrenToPool() + + for j = 1, #res.Data.members do + local tem = item_result:AddItemFromPool() + self:FillItem(tem, res.Data.members[j], true) + end + end + end, + qnick + ) + end + ) + local btn_back = self._view:GetChild('btn_back') + btn_back.onClick:Set( + function() + self.lst_member.numItems = #self.member_data + end + ) + + local group = DataManager.groups:get(self.group_id) + local perm_array = MngPermission.getPermData(group.permission) + + self.tex_num = self._view:GetChild('tex_num') + self:ClearNumTex() + + local cnt = self._view.numChildren - 1 + + for i = 0, 9 do + local obj = self._view:GetChild('btn_' .. i) + obj.onClick:Add(handler(self, self.OnNumButtonAction)) + i = i + 1 + end + local btn_ok = self._view:GetChild('btn_ok') + btn_ok.onClick:Set( + function() + if not CheckPermission(group.lev, perm_array[2]) then + return + end + if self._texnum_str == '' then + return + end + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:GetAddMember( + self.group_id, + tonumber(self._texnum_str), + function(response) + printlog("响应获取添加玩家==》》》") + pt(response) + ViewUtil.CloseModalWait() + if (response.ReturnCode and response.ReturnCode == 0) then + GroupAddMemberInfoView.new(self.group_id,tonumber(self._texnum_str)):SetAddMember(response.Data) + self:ClearNumTex() + --ViewUtil.ShowBannerOnScreenCenter('添加成功!', 1) + else + ViewUtil.ErrorTip(123456, '获取玩家失败') + end + end + ) + end + ) + local btn_del = self._view:GetChild('btn_del') + btn_del.onClick:Add(handler(self, self.OnNumButtonAction)) + + local ctr_mng = self._view:GetController('mng') + local ctr_page = self._view:GetController('page') + if group.lev == 1 then + ctr_mng.selectedIndex = 1 + --ctr_page.selectedIndex = 0 + --self.stype = 1 + else + ctr_mng.selectedIndex = 0 + --ctr_page.selectedIndex = 1 + --self.stype = 2 + end + + + --self._view:GetChild("n50").selected = true + ctr_page.onChanged:Set( + function() + + self.stype = ctr_page.selectedIndex + 1 + self:initData() + end + ) + + +end + +-- 快速访问 +function M:navigation() + self._view:GetController('page').selectedIndex = 2 + self:initData() +end + +-- 获取成员数据 +function M:GetMemberData(index) + --print("11111111111111111111") + --print(debug.traceback()) + -- local iClear = false + -- local rtype = self._view:GetChild("n132").value + -- if tostring(self.online) ~= rtype then + -- iClear = true + -- end + + local group = DataManager.groups:get(self.group_id) + if index == 0 then + group:clearMember() + end + + ViewUtil.ShowModalWait(nil) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GroupMembers12( + self.group_id, + index, + 6, + self.stype, + self.online, + function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, '获取成员列表失败') + else + self.member_data = group.members + self.lst_member.numItems = group.member_num + if index == 0 then + -- self._view:GetChild('tex_memb_num').text = res.Data.member_num + -- self._view:GetChild('tex_total_hp').text = d2ad(res.Data.hp_num1+res.Data.otherHp) + end + end + end + ) +end + +-- 修改体力值 +local function __change_fag(gid, pid, is_add, cur_hp, callback) + local gniv = + GroupNumberInputView.new( + nil, + function(num) + num = ad2d((is_add and num or -num)) + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_ChangeFag( + gid, + pid, + num, + function(res1) + ViewUtil.CloseModalWait() + -- if gniv._is_destroy then + -- return + -- end + if (res1.ReturnCode == 0) then + callback(res1.Data) + else + ViewUtil.ErrorTip(res1.ReturnCode, '更改积分失败!') + end + end + ) + -- item:GetChild("tex_fag").text = (self_user or show_fag) and num or show_fag_str + end, + is_add and 1 or 2, + cur_hp and d2ad(cur_hp) or nil + ) + gniv:Show() +end + +-- 填充成员对象 +function M:FillItem(obj, member, refresh) + local group = DataManager.groups:get(self.group_id) + obj:GetChild('tex_name').text = ViewUtil.stringEllipsis(member.nick) + obj:GetChild('btn_head').icon = 'ui://Common/Head0' + ImageLoad.Load(member.portrait, obj:GetChild('btn_head')._iconObject, self.class) + -- obj.data = member.id + -- 显示玩家标签,合伙人、管理员 + local ctr_type = obj:GetController('type') + + if member.lev < 3 then + ctr_type.selectedIndex = member.lev + elseif member.partnerLev ~= 0 then + ctr_type.selectedIndex = 3 + else + ctr_type.selectedIndex = 0 + end + + -- 体力值数据 + local tex_fag = obj:GetChild('tex_fag') + tex_fag.text = d2ad(member.hp) + + obj:GetChild('tex_id').text = '' .. member.uid + --obj:GetChild("tex_cost_count").text = d2ad(member.last_hp_cost) + + --if member.online == 1 then + -- obj:GetChild('tex_last_login').text = '在线' + -- else + if member.last_time ~= 0 then + -- local now_time = os.date("*t",now) + -- local today = os.time({year=now_time.year, month=now_time.month, day=now_time.day, hour=0,min=0,sec=0}) + -- local cha = math.ceil((today - member.last_time) / (24 * 60 *60)) + -- if (cha > 0) then + -- obj:GetChild('tex_last_login').text = cha.."天前" --'最近登录\n' .. os.date('%Y/%m/%d', member.last_time) + -- else + -- obj:GetChild('tex_last_login').text = os.date('%Y/%m/%d', member.last_time) + -- end + --print("11111aaaaaaaaaaaaaaaaaaaa ",os.date('%Y/%m/%d', member.last_time)) + obj:GetChild('tex_last_login').text = "最近登录:"..os.date('%Y/%m/%d', member.last_time) + else + obj:GetChild('tex_last_login').text = '加入时间\n' .. os.date('%Y/%m/%d', member.join_time) + end + -- end + + + obj:GetChild('tex_zongchangci').text = member.total_round + obj:GetChild('tex_ruhui').text = os.date('%Y/%m/%d %H:%M:%S', member.join_time) + + --上级 + obj:GetChild('tex_shangjiName').text=member.parentId_nick or "" + if member.parentId==0 then + obj:GetChild('tex_shangjiID').text="" + else + obj:GetChild('tex_shangjiID').text=member.parentId + end + + + local perm_array = MngPermission.getPermData(group.permission) + -- 体力值操作按钮事件 + if group.lev < 3 or member.parentId == DataManager.SelfUser.account_id then + obj:GetController('fag').selectedIndex = 1 + else + obj:GetController('fag').selectedIndex = 0 + end + + --obj:GetChild("btn_tag").title = member.score + + local fgCtr = ControllerManager.GetController(NewGroupController) + local p = group:getMember(member.uid) + local mp = group:getMember(DataManager.SelfUser.account_id) + obj:GetChild('btn_fag_add').onClick:Set( + function() + if not CheckPermission(group.lev, perm_array[MngPermissionList.SetFag]) then + return + end + __change_fag( + self.group_id, + member.uid, + true, + nil, + function(data) + local hp = data.hp + member.hp = hp + if p then + p.hp = hp + if mp and mp ~= p then + local mhp = data.mhp + mp.hp = mhp + end + end + self.lst_member.numItems = #self.member_data + -- 搜索出的玩家显示 + if self._view:GetController('search').selectedIndex == 1 then + obj:GetChild('tex_fag').text = d2ad(hp) + end + end + ) + end + ) + obj:GetChild('btn_fag_minus').onClick:Set( + function() + if not CheckPermission(group.lev, perm_array[MngPermissionList.SetFag]) then + return + end + __change_fag( + self.group_id, + member.uid, + false, + member.hp, + function(data) + local hp = data.hp + member.hp = hp + if p then + p.hp = hp + if mp and mp ~= p then + local mhp = data.mhp + mp.hp = mhp + end + end + self.lst_member.numItems = #self.member_data + -- 搜索出的玩家显示 + if self._view:GetController('search').selectedIndex == 1 then + obj:GetChild('tex_fag').text = d2ad(hp) + end + end + ) + end + ) + + obj:GetChild('btn_score_detail').onClick:Set( + function() + local mflv = GroupMemberFagLogView.new(self.group_id, member) + mflv:Show() + end + ) + + obj:GetChild('btn_operate').onClick:Set( + function() + local mflv = + GroupMemberOperateView.new( + self.group_id, + member, + function(delete) + if delete ~= nil and delete == true then + local group = DataManager.groups:get(self.group_id) + self.member_data = group.members + self.lst_member.numItems = #self.member_data + self._view:GetController('search').selectedIndex = 0 + else + self.lst_member.numItems = self.lst_member.numItems + if refresh then + self:FillItem(obj, member) + end + end + end, + function() + self:GetMemberData(0) + end + ) + mflv:Show() + end + ) + + local btnBxx = obj:GetChild('btn_bxx') + btnBxx.visible = (not (member.lev == 3 and member.partnerLev == 0)) and not (DataManager.SelfUser.account_id == member.uid) + --btnBxx.visible = not (DataManager.SelfUser.account_id == member.uid) + obj:GetChild('btn_bxx').onClick:Set( + function() + local ctrNum=1 + -- if not (member.lev == 3 and member.partnerLev == 0) then + -- ctrNum = 2 + -- end + ctrNum=2 + local gmv = GroupMngFagPackView.new(self.curGroup.id, self._root_view,ctrNum,member.uid) + gmv:SetCallback( + function() + btnBxx.selected = false + end + ) + gmv:Show() + end + ) + + local superBtn = obj:GetChild('super_btn') + superBtn.visible = group.lev == 1 + obj:GetChild("super_btn").onClick:Set( + function() + ViewUtil.ShowModalWait(nil) + local text = member.uid + local qid, qnick + if text == "" then + ViewUtil.CloseModalWait() + ViewUtil.ErrorTip(nil, '输入不能为空') + return + end + qid = tonumber(text) or 0 + qnick = tostring(text) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_FindMember( + self.group_id, + qid, + function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, '找不到成员') + else + self._view:GetChild('tex_id').text = '' + self._view:GetController('search').selectedIndex = 1 + local item_result = self._view:GetChild('lst_member_find') + item_result:RemoveChildrenToPool() + + for j = 1, #res.Data.members do + local tem = item_result:AddItemFromPool() + self:FillItem(tem, res.Data.members[j], true) + end + end + end, + qnick, + 1 + ) + end + ) +end + +function M:OnRenderItem(index, obj) + --printlog("aaaaaaaaaawwwwwwwwwwwwwwwwwwwwwwwwwwww ",index) + local member = self.member_data[index + 1] + if member then + self:FillItem(obj, member) + end +end + +--获取申请列表 +function M:GetJoinsData() + local group = DataManager.groups:get(self.group_id) + if group.joins > 0 then + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GroupJoins( + self.group_id, + function(res) + ViewUtil.CloseModalWait() + if (res.ReturnCode == 0) then + local joins = res.Data.joins + group.joins = #joins + if #joins == 0 then + group.update_joins = true + end + self:FillJoinList(joins) + else + ViewUtil.ErrorTip(res.ReturnCode, '获取申请列表失败!') + self:FillJoinList({}) + end + end + ) + else + self:FillJoinList({}) + end +end + +--填充申请 +function M:FillJoinList(data) + local lst_joins = self._view:GetChild('lst_joins') + lst_joins:RemoveChildrenToPool() + for i = 1, #data do + local item = lst_joins:AddItemFromPool() + item:GetChild('tex_name').text = ViewUtil.stringEllipsis(data[i].nick) + item:GetChild('tex_id').text = data[i].id + local btn_head = item:GetChild('btn_head') + ImageLoad.Load(data[i].portrait, btn_head._iconObject) + item:GetChild('btn_yes').onClick:Set( + function() + self:VerifyPlayerJoin(data[i].id, true) + end + ) + item:GetChild('btn_no').onClick:Set( + function() + self:VerifyPlayerJoin(data[i].id, false) + end + ) + end +end + +function M:VerifyPlayerJoin(id, allow) + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GroupVerifyJoin( + self.group_id, + id, + allow, + function(res) + ViewUtil.CloseModalWait() + if (res.ReturnCode == 0) then + self:GetJoinsData() + else + ViewUtil.ErrorTip(res.ReturnCode, '操作申请失败') + end + end + ) +end + +function M:OnNumButtonAction(context) + local typer = string.sub(context.sender.name, 5) + if typer == 'del' then + if (self._currenIndex > 0) then + self._currenIndex = self._currenIndex - 1 + self._texnum_str = string.sub(self._texnum_str, 0, self._currenIndex) + self.tex_num.text = self._texnum_str + end + else + if (self._currenIndex < 6) then + self._currenIndex = self._currenIndex + 1 + self._texnum_str = self._texnum_str .. typer + self.tex_num.text = self._texnum_str + end + end +end + +function M:ClearNumTex() + self._texnum_str = '' + self._currenIndex = 0 + self.tex_num.text = self._texnum_str +end + +return M diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberStatView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberStatView.lua new file mode 100644 index 00000000..65567c9a --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMemberStatView.lua @@ -0,0 +1,129 @@ +local TimeSettingPanel = import(".TimeSettingPanel") +-- 开桌统计 +local GroupMngMemberStatView = {} + +local M = GroupMngMemberStatView + +function GroupMngMemberStatView.new(gid) + local self = M + self.class = "GroupMngMemberStatView" + self.group_id = gid + self:InitView() + return self +end + +function M:initData() + self.lst_record.numItems = 0 + self.record_data = {} + + + self:GetPartnerData(function (res) + self:GetRecordData(0,true) + end) +end + +function M:InitView() + self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupMemberStat") + + self.lst_record = self._view:GetChild("lst_record") + self.lst_record:SetVirtual() + self.lst_record.itemRenderer = function(index, obj) + self:OnRenderRecordItem(index, obj) + end + self.lst_record.scrollPane.onPullUpRelease:Set(function() + self:GetRecordData(self.lst_record.numItems) + end) + + self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0) + + local ctr_page = self._view:GetController("type") + ctr_page.onChanged:Set(function() + self.record_data = {} + self.lst_record.numItems = 0 + self.begin_time = nil + self.end_time = nil + self._view:GetChild("tex_id").text = "" + self:GetRecordData(0) + end) + + self._view:GetChild("btn_search").onClick:Set(function() + self.record_data = {} + self.lst_record.numItems = 0 + + self.begin_time, self.end_time = self.time_panel:GetDate() + self:GetRecordData(0) + end) + +end + +-- 获取合伙人数据 +function M:GetPartnerData(callback) + + ViewUtil.ShowModalWait(nil) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetPartnerList(self.group_id, 1, nil, nil, function(res) + + ViewUtil.CloseModalWait() + callback(res) + end) +end + +function M:GetRecordData(index,init) + + if init == nil or init == false then + ViewUtil.ShowModalWait() + end + + quary_id = tonumber(self._view:GetChild("tex_id").text) + quary_id = quary_id or 0 + + local partner_id = DataManager.SelfUser.account_id + + + local time_type = self._view:GetController("type").selectedIndex + if self.begin_time ~= nil and self.end_time ~= nil then + time_type = 3 + end + + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetMemberStat(self.group_id, quary_id,partner_id, index, 6, time_type,self.begin_time,self.end_time,function(res) + if init == nil or init == false then + ViewUtil.CloseModalWait() + end + + if res.ReturnCode == 0 then + + local members = res.Data.members + for i = 1, #members do + self.record_data[#self.record_data + 1] = members[i] + end + self.lst_record.numItems = #self.record_data + end + end) +end + +function M:FillRecordItem(data, obj) + + obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(data.nick) + obj:GetChild("tex_round").text = ""..data.round + obj:GetChild("tex_win").text = ""..data.win + obj:GetChild("tex_score").text = ""..d2ad(data.score) + obj:GetChild("tex_current_score").text = ""..d2ad(data.hp) + + local ctr_type = obj:GetController("type") + if data.lev < 3 then + ctr_type.selectedIndex = data.lev + elseif data.partnerLev ~= 0 then + ctr_type.selectedIndex = 3 + else + ctr_type.selectedIndex = 0 + end +end + +function M:OnRenderRecordItem(index, obj) + local data = self.record_data[index + 1] + self:FillRecordItem(data, obj) +end + + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMmeberImportView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMmeberImportView.lua new file mode 100644 index 00000000..f5de2eb8 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngMmeberImportView.lua @@ -0,0 +1,22 @@ +-- 牌友圈玩家导入 +local GroupMngMmeberImportView = {} + +local M = GroupMngMmeberImportView + +function GroupMngMmeberImportView.new(gid) + local self = M + self.class = "GroupMngMmeberImportView" + self.group_id = gid + self:FillView() + return self +end + +function M:initData() + +end + +function M:FillView() + self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupCopy") +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerListView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerListView.lua new file mode 100644 index 00000000..0455ec2e --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerListView.lua @@ -0,0 +1,359 @@ +-- 牌友圈合伙人列表 +local GroupPartnerMemberListView = import(".GroupPartnerMemberListView") +local GroupPartnerRewardsView = import(".GroupPartnerRewardsView") +local GroupNumberInputView = import(".GroupNumberInputView") +local GroupMngAddPartner = import(".GroupMngAddPartner") +local MngPermission = import(".MngPermission") +local GroupSetTagView = import("../GroupSetTagView") +local GroupMngPartnerListView2 = import(".GroupMngPartnerListView2") + +local GroupMngPartnerListView = {} + +local M = GroupMngPartnerListView + +function GroupMngPartnerListView.new(gid, blur_view) + --setmetatable(M, {__index = BaseView}) + --local self = setmetatable({}, {__index = M}) + local self = M + self.class = "GroupMngPartnerListView" + self.group_id = gid + self.blur_view = blur_view + self.partner_data = {} + self:InitView() + return self +end + +function M:initData() + --self._view.visible = true + self:GetPartnerData(0) +end + +function M:InitView() + self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupPartnerList") + + -- 初始化合伙人列表 + self.lst_partner = self._view:GetChild("lst_partner") + self.lst_partner:SetVirtual() + self.lst_partner.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + self.lst_partner.scrollPane.onPullUpRelease:Set(function() + self:GetPartnerData(self.lst_partner.numItems) + end) + + local btn_search = self._view:GetChild("btn_search") + btn_search.onClick:Set(function() + local text = self._view:GetChild("tex_id").text + local query_id = tonumber(text) or 0 + local query_nick = text + self._view:GetChild("tex_id").text = "" + self:QueryPartnerData(query_id, query_nick) + end) + local btn_back = self._view:GetChild("btn_back") + btn_back.onClick:Set(function() + self._view:GetController("search").selectedIndex = 0 + end) + + + local group = DataManager.groups:get(self.group_id) + local perm_array = MngPermission.getPermData(group.permission) + + self.tex_num = self._view:GetChild("tex_num") + self:ClearNumTex() + + for i = 0 ,9 do + local obj = self._view:GetChild("btn_"..i) + obj.onClick:Add(handler(self , self.OnNumButtonAction)) + i = i + 1 + end + local btn_ok = self._view:GetChild("btn_ok") + btn_ok.onClick:Set(function() + + ViewUtil.ShowModalWait(nil) + local qid = tonumber(self._view:GetChild("tex_num").text) + if not qid then + ViewUtil.CloseModalWait() + ViewUtil.ErrorTip(nil, "输入ID进行搜索!") + return + end + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_FindMember(self.group_id, qid, function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "找不到成员!") + else + + local member = res.Data + if member.parentId ~= 0 and member.parentId ~= DataManager.SelfUser.account_id then + ViewUtil.ErrorTip(res.ReturnCode, "找不到成员!") + return + end + + if member.partnerLev > 0 then + ViewUtil.ErrorTip(res.ReturnCode, "该玩家已经是代理!") + return + end + + local mflv = GroupMngAddPartner.new(self.group_id, member,function () + self:GetPartnerData(self.lst_partner.numItems) + self._view:GetController("page").selectedIndex = 0 + end) + mflv:Show() + end + end) + end) + local btn_del = self._view:GetChild("btn_del") + btn_del.onClick:Add(handler(self , self.OnNumButtonAction)) +end + +function M:ClearNumTex() + self._texnum_str = "" + self._currenIndex = 0 + self.tex_num.text = self._texnum_str +end + +function M:OnNumButtonAction(context) + local typer = string.sub(context.sender.name ,5) + if typer == "del" then + if (self._currenIndex > 0) then + self._currenIndex = self._currenIndex - 1 + self._texnum_str = string.sub(self._texnum_str,0,self._currenIndex) + self.tex_num.text = self._texnum_str + end + else + if (self._currenIndex < 6) then + + self._currenIndex = self._currenIndex + 1 + self._texnum_str = self._texnum_str .. typer + self.tex_num.text = self._texnum_str + + end + end +end + + +-- 获取合伙人数据 +function M:GetPartnerData(index,callback) + + local group = DataManager.groups:get(self.group_id) + if index == 0 then + self.partner_data = {} + end + ViewUtil.ShowModalWait(nil) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetPartnerList(self.group_id, 0, index, 10, function(res) + + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取合伙人列表失败") + else + local partners = res.Data.members + for i = 1, #partners do + self.partner_data[#self.partner_data + 1] = partners[i] + end + self.lst_partner.numItems = #self.partner_data + end + end) +end + +-- 获取合伙人数据 +function M:QueryPartnerData(query_id,query_nick) + + query_nick = query_nick or "" + query_id = query_id or 0 + + local group = DataManager.groups:get(self.group_id) + + ViewUtil.ShowModalWait(nil) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_QueryPartnerList(self.group_id, query_id, query_nick, function(res) + + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取合伙人列表失败") + else + + if res.Data.members ~= nil and #res.Data.members > 0 then + self._view:GetController("search").selectedIndex = 1 + local lst_partner_search = self._view:GetChild("lst_partner_search") + lst_partner_search:RemoveChildrenToPool() + for i = 1, #res.Data.members do + local tem = lst_partner_search:AddItemFromPool() + self:FillItem(tem,res.Data.members[i]) + end + else + ViewUtil.ErrorTip(res.ReturnCode, "找不到指定的玩家") + end + end + end) +end + +-- 管理员权限 +local MngPermissionList = { + DeleteMember = 1,-- 删除成员 + AddMember = 2,--添加成员 + SetFag = 3,--设置体力值 + BanPlaying = 4,--禁止游戏 + BanSameTable = 5--禁止同桌 +} +local function CheckPermission(lev, permission) + if lev == 2 and not permission then + ViewUtil.ErrorTip(nil, "您无权操作!如有需要请联系盟主。", 1) + return false + end + return true +end + +-- 修改体力值 +local function __change_fag(gid, pid, is_add, cur_hp, callback) + local gniv = GroupNumberInputView.new(nil, function(num) + num = ad2d((is_add and num or -num)) + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_ChangeFag(gid, pid, num, function(res1) + ViewUtil.CloseModalWait() + -- if gniv._is_destroy then + -- return + -- end + if (res1.ReturnCode == 0) then + callback(res1.Data) + else + ViewUtil.ErrorTip(res1.ReturnCode,"更改积分失败!") + end + end) + -- item:GetChild("tex_fag").text = (self_user or show_fag) and num or show_fag_str + end, is_add and 1 or 2, cur_hp and d2ad(cur_hp) or nil) + gniv:Show() +end + + +-- 显示奖励 +local function __showRewardsValue(rtype, cur_value, max_value, mng) + local str = "" + if not mng then + str = string.format("%s%%/%s%%", cur_value, max_value) + else + str = string.format("%s%%", cur_value) + end + return str +end + +-- 填充合伙人对象 +function M:FillItem(obj, partner) + + local group = DataManager.groups:get(self.group_id) + local perm_array = MngPermission.getPermData(group.permission) + + obj:GetChild("tex_id").text = partner.uid + obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(partner.nick) + obj:GetChild("btn_head").icon = "ui://Common/Head0" + ImageLoad.Load(partner.portrait, obj:GetChild("btn_head")._iconObject, self.class) + -- 体力值操作按钮事件 + if group.lev == 1 or group.lev < 3 or (partner.uid ~= DataManager.SelfUser.account_id and group.partnerLev > 0) then + obj:GetController("fag").selectedIndex = 1 + else + obj:GetController("fag").selectedIndex = 0 + end + + local fgCtr = ControllerManager.GetController(NewGroupController) + local p = group:getMember(partner.uid) + local mp = group:getMember(DataManager.SelfUser.account_id) + obj:GetChild("btn_fag_add").onClick:Set(function() + if not CheckPermission(group.lev, perm_array[MngPermissionList.SetFag]) then + return + end + __change_fag(self.group_id, partner.uid, true, nil, function(data) + local hp = data.hp + partner.hp = hp + if p then + p.hp = hp + if mp and mp ~= p then + local mhp = data.mhp + mp.hp = mhp + end + end + self.lst_partner.numItems = #self.partner_data + -- 搜索出的玩家显示 + if self._view:GetController("search").selectedIndex == 1 then + obj:GetChild("tex_fag").text = d2ad(hp) + end + end) + end) + obj:GetChild("btn_fag_minus").onClick:Set(function() + + if not CheckPermission(group.lev, perm_array[MngPermissionList.SetFag]) then + return + end + __change_fag(self.group_id, partner.uid, false, partner.hp, function(data) + local hp = data.hp + partner.hp = hp + if p then + p.hp = hp + if mp and mp ~= p then + local mhp = data.mhp + mp.hp = mhp + end + end + self.lst_partner.numItems = #self.partner_data + -- 搜索出的玩家显示 + if self._view:GetController("search").selectedIndex == 1 then + obj:GetChild("tex_fag").text = d2ad(hp) + end + end) + end) + + obj:GetChild("tex_fag").text = d2ad(partner.hp) + + obj:GetChild("tex_member_count").text = ""..partner.total + + + obj:GetChild("btn_percent").onClick:Set(function() + self:ShowPartnerRewards(partner.uid, partner.partnerLev) + end) + + local btn_tag = obj:GetChild("btn_tag") + btn_tag.title = partner.score + btn_tag.onClick:Set(function() + local stv = GroupSetTagView.new(self.group_id, partner, function(refresh) + if refresh then + btn_tag.title = partner.score + end + end) + stv:Show() + end) + + local btnDetail = obj:GetChild("btn_detail") + btnDetail.visible = partner.total > 0 + btnDetail.onClick:Set(function() + local GroupMngPartnerListView2 = GroupMngPartnerListView2.new(self.group_id,partner.uid) + GroupMngPartnerListView2:Show() + end) + + +end + + + + +-- 列表对象填充 +function M:OnRenderItem(index, obj) + local partner = self.partner_data[index + 1] + self:FillItem(obj, partner) +end + +-- 显示合伙人成员列表 +function M:ShowPartnerMemberList(partner_id) + local pmlv = GroupPartnerMemberListView.new(self.group_id, partner_id) + pmlv:Show() +end + +-- 显示合伙人奖励 +function M:ShowPartnerRewards(partner_id, partnerLev) + local prv = GroupPartnerRewardsView.new(self.group_id, partner_id, partnerLev) + prv:Show() +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerListView1.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerListView1.lua new file mode 100644 index 00000000..ec6321df --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerListView1.lua @@ -0,0 +1,355 @@ +-- 牌友圈合伙人列表 +local GroupPartnerMemberListView = import(".GroupPartnerMemberListView") +local GroupPartnerRewardsView = import(".GroupPartnerRewardsView") +local GroupNumberInputView = import(".GroupNumberInputView") +local GroupMngAddPartner = import(".GroupMngAddPartner") +local MngPermission = import(".MngPermission") +local GroupSetTagView = import("../GroupSetTagView") + +local GroupMngPartnerListView1 = {} + +local M = GroupMngPartnerListView1 + +function GroupMngPartnerListView1.new(gid, blur_view) + --setmetatable(M, {__index = BaseView}) + --local self = setmetatable({}, {__index = M}) + local self = M + self.class = "GroupMngPartnerListView1" + self.group_id = gid + self.blur_view = blur_view + self.partner_data = {} + self:InitView() + return self +end + +function M:initData() + --self._view.visible = true + self:GetPartnerData(0) +end + +function M:InitView() + self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupPartnerList1") + + -- 初始化合伙人列表 + self.lst_partner = self._view:GetChild("lst_partner") + self.lst_partner:SetVirtual() + self.lst_partner.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + self.lst_partner.scrollPane.onPullUpRelease:Set(function() + self:GetPartnerData(self.lst_partner.numItems) + end) + + local btn_search = self._view:GetChild("btn_search") + btn_search.onClick:Set(function() + local text = self._view:GetChild("tex_id").text + local query_id = tonumber(text) or 0 + local query_nick = text + self._view:GetChild("tex_id").text = "" + self:QueryPartnerData(query_id, query_nick) + end) + local btn_back = self._view:GetChild("btn_back") + btn_back.onClick:Set(function() + --self._view:GetController("search").selectedIndex = 0 + end) + + + local group = DataManager.groups:get(self.group_id) + local perm_array = MngPermission.getPermData(group.permission) + + self.tex_num = self._view:GetChild("tex_num") + self:ClearNumTex() + + for i = 0 ,9 do + local obj = self._view:GetChild("btn_"..i) + obj.onClick:Add(handler(self , self.OnNumButtonAction)) + i = i + 1 + end + local btn_ok = self._view:GetChild("btn_ok") + btn_ok.onClick:Set(function() + + ViewUtil.ShowModalWait(nil) + local qid = tonumber(self._view:GetChild("tex_num").text) + if not qid then + ViewUtil.CloseModalWait() + ViewUtil.ErrorTip(nil, "输入ID进行搜索!") + return + end + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_FindMember(self.group_id, qid, function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "找不到成员!") + else + + local member = res.Data + if member.parentId ~= 0 and member.parentId ~= DataManager.SelfUser.account_id then + ViewUtil.ErrorTip(res.ReturnCode, "找不到成员!") + return + end + + if member.partnerLev > 0 then + ViewUtil.ErrorTip(res.ReturnCode, "该玩家已经是代理!") + return + end + + local mflv = GroupMngAddPartner.new(self.group_id, member,function () + self:GetPartnerData(self.lst_partner.numItems) + --self._view:GetController("page").selectedIndex = 0 + end) + mflv:Show() + end + end) + end) + local btn_del = self._view:GetChild("btn_del") + btn_del.onClick:Add(handler(self , self.OnNumButtonAction)) +end + +function M:ClearNumTex() + self._texnum_str = "" + self._currenIndex = 0 + self.tex_num.text = self._texnum_str +end + +function M:OnNumButtonAction(context) + local typer = string.sub(context.sender.name ,5) + if typer == "del" then + if (self._currenIndex > 0) then + self._currenIndex = self._currenIndex - 1 + self._texnum_str = string.sub(self._texnum_str,0,self._currenIndex) + self.tex_num.text = self._texnum_str + end + else + if (self._currenIndex < 6) then + + self._currenIndex = self._currenIndex + 1 + self._texnum_str = self._texnum_str .. typer + self.tex_num.text = self._texnum_str + + end + end +end + + +-- 获取合伙人数据 +function M:GetPartnerData(index,callback) + + local group = DataManager.groups:get(self.group_id) + if index == 0 then + self.partner_data = {} + end + ViewUtil.ShowModalWait(nil) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GroupTiChu(self.group_id, index, 10, function(res) + + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取踢出列表失败") + else + --printlog("aaaaaaaaaaaaa1111111111111111111111") + --pt(res) + local partners = res.Data.data + for i = 1, #partners do + self.partner_data[#self.partner_data + 1] = partners[i] + end + self.lst_partner.numItems = #self.partner_data + end + end) +end + +-- 获取合伙人数据 +function M:QueryPartnerData(query_id,query_nick) + + query_nick = query_nick or "" + query_id = query_id or 0 + + local group = DataManager.groups:get(self.group_id) + + ViewUtil.ShowModalWait(nil) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_QueryPartnerList(self.group_id, query_id, query_nick, function(res) + + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取合伙人列表失败") + else + + if res.Data.members ~= nil and #res.Data.members > 0 then + -- self._view:GetController("search").selectedIndex = 1 + local lst_partner_search = self._view:GetChild("lst_partner_search") + lst_partner_search:RemoveChildrenToPool() + for i = 1, #res.Data.members do + local tem = lst_partner_search:AddItemFromPool() + self:FillItem(tem,res.Data.members[i]) + end + else + ViewUtil.ErrorTip(res.ReturnCode, "找不到指定的玩家") + end + end + end) +end + +-- 管理员权限 +local MngPermissionList = { + DeleteMember = 1,-- 删除成员 + AddMember = 2,--添加成员 + SetFag = 3,--设置体力值 + BanPlaying = 4,--禁止游戏 + BanSameTable = 5--禁止同桌 +} +local function CheckPermission(lev, permission) + if lev == 2 and not permission then + ViewUtil.ErrorTip(nil, "您无权操作!如有需要请联系盟主。", 1) + return false + end + return true +end + +-- 修改体力值 +local function __change_fag(gid, pid, is_add, cur_hp, callback) + local gniv = GroupNumberInputView.new(nil, function(num) + num = ad2d((is_add and num or -num)) + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_ChangeFag(gid, pid, num, function(res1) + ViewUtil.CloseModalWait() + -- if gniv._is_destroy then + -- return + -- end + if (res1.ReturnCode == 0) then + callback(res1.Data) + else + ViewUtil.ErrorTip(res1.ReturnCode,"更改积分失败!") + end + end) + -- item:GetChild("tex_fag").text = (self_user or show_fag) and num or show_fag_str + end, is_add and 1 or 2, cur_hp and d2ad(cur_hp) or nil) + gniv:Show() +end + + +-- 显示奖励 +local function __showRewardsValue(rtype, cur_value, max_value, mng) + local str = "" + if not mng then + str = string.format("%s%%/%s%%", cur_value, max_value) + else + str = string.format("%s%%", cur_value) + end + return str +end + +-- 填充合伙人对象 +function M:FillItem(obj, partner) + + local group = DataManager.groups:get(self.group_id) + local perm_array = MngPermission.getPermData(group.permission) + + obj:GetChild("tex_id").text = "("..partner.id..")"--partner.uid + + obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(partner.nick) + obj:GetChild("btn_head").icon = "ui://Common/Head0" + ImageLoad.Load(partner.portrait, obj:GetChild("btn_head")._iconObject, self.class) + -- 体力值操作按钮事件 + if group.lev == 1 or group.lev < 3 or (partner.uid ~= DataManager.SelfUser.account_id and group.partnerLev > 0) then + --obj:GetController("fag").selectedIndex = 1 + else + --obj:GetController("fag").selectedIndex = 0 + end + + local fgCtr = ControllerManager.GetController(NewGroupController) + local p = group:getMember(partner.uid) + local mp = group:getMember(DataManager.SelfUser.account_id) + obj:GetChild("btn_fag_add").onClick:Set(function() + if not CheckPermission(group.lev, perm_array[MngPermissionList.SetFag]) then + return + end + __change_fag(self.group_id, partner.uid, true, nil, function(data) + local hp = data.hp + partner.hp = hp + if p then + p.hp = hp + if mp and mp ~= p then + local mhp = data.mhp + mp.hp = mhp + end + end + self.lst_partner.numItems = #self.partner_data + -- 搜索出的玩家显示 + -- if self._view:GetController("search").selectedIndex == 1 then + -- obj:GetChild("tex_fag").text = d2ad(hp) + -- end + end) + end) + obj:GetChild("btn_fag_minus").onClick:Set(function() + + if not CheckPermission(group.lev, perm_array[MngPermissionList.SetFag]) then + return + end + __change_fag(self.group_id, partner.uid, false, partner.hp, function(data) + local hp = data.hp + partner.hp = hp + if p then + p.hp = hp + if mp and mp ~= p then + local mhp = data.mhp + mp.hp = mhp + end + end + self.lst_partner.numItems = #self.partner_data + -- 搜索出的玩家显示 + -- if self._view:GetController("search").selectedIndex == 1 then + -- obj:GetChild("tex_fag").text = d2ad(hp) + -- end + end) + end) + +-- obj:GetChild("tex_fag").text = d2ad(partner.hp) + + obj:GetChild("tex_member_count").text = ""..partner.round + obj:GetChild("tex_fenzu").text = partner.group + obj:GetChild("tex_caozuo").text = partner.opnick + obj:GetChild("tex_tuichu").text = os.date('%Y/%m/%d %H:%M', partner.deltime) + + + obj:GetChild("btn_percent").onClick:Set(function() + self:ShowPartnerRewards(partner.uid, partner.partnerLev) + end) + + local btn_tag = obj:GetChild("btn_tag") + btn_tag.title = partner.score + btn_tag.onClick:Set(function() + local stv = GroupSetTagView.new(self.group_id, partner, function(refresh) + if refresh then + btn_tag.title = partner.score + end + end) + stv:Show() + end) +end + + + + +-- 列表对象填充 +function M:OnRenderItem(index, obj) + local partner = self.partner_data[index + 1] + self:FillItem(obj, partner) +end + +-- 显示合伙人成员列表 +function M:ShowPartnerMemberList(partner_id) + local pmlv = GroupPartnerMemberListView.new(self.group_id, partner_id) + pmlv:Show() +end + +-- 显示合伙人奖励 +function M:ShowPartnerRewards(partner_id, partnerLev) + local prv = GroupPartnerRewardsView.new(self.group_id, partner_id, partnerLev) + prv:Show() +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerListView2.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerListView2.lua new file mode 100644 index 00000000..b8fd2761 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerListView2.lua @@ -0,0 +1,277 @@ +-- 牌友圈合伙人列表 +local GroupPartnerMemberListView = import(".GroupPartnerMemberListView") +local GroupPartnerRewardsView = import(".GroupPartnerRewardsView") +local GroupNumberInputView = import(".GroupNumberInputView") +local GroupMngAddPartner = import(".GroupMngAddPartner") +local MngPermission = import(".MngPermission") +local GroupSetTagView = import("../GroupSetTagView") +local GroupMngFagPackView = import('../GroupMngFagPackView') + +local GroupMngPartnerListView2 = {} + +local M = GroupMngPartnerListView2 + +function GroupMngPartnerListView2.new(gid,tagId) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupMngPartnerListView2" + self._full = true + self.group_id = gid + self.tagId = tagId + self.partner_data = {} + self.curGroup = DataManager.groups:get(self.group_id) + self:InitView() + return self +end + + + +function M:InitView() + -- self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/Win_StatMember") + BaseWindow.init(self,"ui://NewGroup/Win_StatMember") + -- 初始化合伙人列表 + self.lst_partner = self._view:GetChild("lst_partner") + self.lst_partner:SetVirtual() + self.lst_partner.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + self.lst_partner.scrollPane.onPullUpRelease:Set(function() + self:GetPartnerData(self.lst_partner.numItems) + end) + + + + local group = DataManager.groups:get(self.group_id) + local perm_array = MngPermission.getPermData(group.permission) + self:GetPartnerData(0) +end + + + +-- 获取合伙人数据 +function M:GetPartnerData(index,callback) + + local group = DataManager.groups:get(self.group_id) + if index == 0 then + self.partner_data = {} + end + ViewUtil.ShowModalWait(nil) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetPartnerList(self.group_id, 0, index, 10, function(res) + + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取合伙人列表失败") + else + local partners = res.Data.members + for i = 1, #partners do + self.partner_data[#self.partner_data + 1] = partners[i] + end + self.lst_partner.numItems = #self.partner_data + end + end, + self.tagId) +end + +-- 获取合伙人数据 +function M:QueryPartnerData(query_id,query_nick) + + query_nick = query_nick or "" + query_id = query_id or 0 + + local group = DataManager.groups:get(self.group_id) + + ViewUtil.ShowModalWait(nil) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_QueryPartnerList(self.group_id, query_id, query_nick, function(res) + + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取合伙人列表失败") + else + + if res.Data.members ~= nil and #res.Data.members > 0 then + + local lst_partner_search = self._view:GetChild("lst_partner_search") + lst_partner_search:RemoveChildrenToPool() + for i = 1, #res.Data.members do + local tem = lst_partner_search:AddItemFromPool() + self:FillItem(tem,res.Data.members[i]) + end + else + ViewUtil.ErrorTip(res.ReturnCode, "找不到指定的玩家") + end + end + end) +end + +-- 管理员权限 +local MngPermissionList = { + DeleteMember = 1,-- 删除成员 + AddMember = 2,--添加成员 + SetFag = 3,--设置体力值 + BanPlaying = 4,--禁止游戏 + BanSameTable = 5--禁止同桌 +} +local function CheckPermission(lev, permission) + if lev == 2 and not permission then + ViewUtil.ErrorTip(nil, "您无权操作!如有需要请联系盟主。", 1) + return false + end + return true +end + +-- 修改体力值 +local function __change_fag(gid, pid, is_add, cur_hp, callback) + local gniv = GroupNumberInputView.new(nil, function(num) + num = ad2d((is_add and num or -num)) + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_ChangeFag(gid, pid, num, function(res1) + ViewUtil.CloseModalWait() + -- if gniv._is_destroy then + -- return + -- end + if (res1.ReturnCode == 0) then + callback(res1.Data) + else + ViewUtil.ErrorTip(res1.ReturnCode,"更改积分失败!") + end + end) + -- item:GetChild("tex_fag").text = (self_user or show_fag) and num or show_fag_str + end, is_add and 1 or 2, cur_hp and d2ad(cur_hp) or nil) + gniv:Show() +end + + +-- 显示奖励 +local function __showRewardsValue(rtype, cur_value, max_value, mng) + local str = "" + if not mng then + str = string.format("%s%%/%s%%", cur_value, max_value) + else + str = string.format("%s%%", cur_value) + end + return str +end + +-- 填充合伙人对象 +function M:FillItem(obj, partner) + + local group = DataManager.groups:get(self.group_id) + local perm_array = MngPermission.getPermData(group.permission) + + obj:GetChild("tex_id").text = partner.uid + obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(partner.nick) + obj:GetChild("btn_head").icon = "ui://Common/Head0" + ImageLoad.Load(partner.portrait, obj:GetChild("btn_head")._iconObject, self.class) + -- 体力值操作按钮事件 + -- if group.lev == 1 or group.lev < 3 or (partner.uid ~= DataManager.SelfUser.account_id and group.partnerLev > 0) then + -- obj:GetController("fag").selectedIndex = 1 + -- else + -- obj:GetController("fag").selectedIndex = 0 + -- end + obj:GetController("fag").selectedIndex = 0 + + local fgCtr = ControllerManager.GetController(NewGroupController) + local p = group:getMember(partner.uid) + local mp = group:getMember(DataManager.SelfUser.account_id) + obj:GetChild("btn_fag_add").onClick:Set(function() + if not CheckPermission(group.lev, perm_array[MngPermissionList.SetFag]) then + return + end + __change_fag(self.group_id, partner.uid, true, nil, function(data) + local hp = data.hp + partner.hp = hp + if p then + p.hp = hp + if mp and mp ~= p then + local mhp = data.mhp + mp.hp = mhp + end + end + self.lst_partner.numItems = #self.partner_data + -- 搜索出的玩家显示 + + end) + end) + obj:GetChild("btn_fag_minus").onClick:Set(function() + + if not CheckPermission(group.lev, perm_array[MngPermissionList.SetFag]) then + return + end + __change_fag(self.group_id, partner.uid, false, partner.hp, function(data) + local hp = data.hp + partner.hp = hp + if p then + p.hp = hp + if mp and mp ~= p then + local mhp = data.mhp + mp.hp = mhp + end + end + self.lst_partner.numItems = #self.partner_data + -- 搜索出的玩家显示 + + end) + end) + + obj:GetChild("tex_fag").text = d2ad(partner.hp) + + obj:GetChild("tex_member_count").text = ""..partner.total + + + obj:GetChild("btn_percent").onClick:Set(function() + self:ShowPartnerRewards(partner.uid, partner.partnerLev) + end) + + local btnDetail = obj:GetChild("btn_detail") + btnDetail.visible = partner.total > 0 + + btnDetail.onClick:Set(function() + local GroupMngPartnerListView2 = GroupMngPartnerListView2.new(self.group_id,partner.uid) + GroupMngPartnerListView2:Show() + end) + + local btn_bxx = obj:GetChild("btn_bxx") + btn_bxx.onClick:Set( + function() + local ctrNum=1 + if not (partner.lev == 3 and partner.partnerLev == 0) then + ctrNum = 2 + end + ctrNum=2 + printlog("cccccccccccccccccccccccccc") + local gmv = GroupMngFagPackView.new(self.curGroup.id, self._root_view,ctrNum,partner.uid) + gmv:SetCallback( + function() + btn_bxx.selected = false + end + ) + gmv:Show() + end + ) +end + + + + +-- 列表对象填充 +function M:OnRenderItem(index, obj) + local partner = self.partner_data[index + 1] + self:FillItem(obj, partner) +end + +-- 显示合伙人成员列表 +function M:ShowPartnerMemberList(partner_id) + local pmlv = GroupPartnerMemberListView.new(self.group_id, partner_id) + pmlv:Show() +end + +-- 显示合伙人奖励 +function M:ShowPartnerRewards(partner_id, partnerLev) + local prv = GroupPartnerRewardsView.new(self.group_id, partner_id, partnerLev) + prv:Show() +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerRewardsView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerRewardsView.lua new file mode 100644 index 00000000..70477170 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerRewardsView.lua @@ -0,0 +1,483 @@ +-- 牌友圈合伙人界面 +local GroupNumberInputView = import(".GroupNumberInputView") +local TimeSettingPanel = import(".TimeSettingPanel") +local GroupMngPartnerRewardsView = {} + +local M = GroupMngPartnerRewardsView + +function GroupMngPartnerRewardsView.new(gid, blur_view) + local self = M + self.class = "GroupMngPartnerRewardsView" + self.group_id = gid + self.blur_view = blur_view + self:InitView() + return self +end + +function M:initData() + self.rewards_data = {} + self.rewards_log = {} + self.search_rewards_data = {} + self.search_rewards_log = {} + self.partner_data = {} + self.partner_data2 = {} + self.search_partner_data = {} + self.lst_partner.numItems = 0 + self.lst_partner2.numItems = 0 + self.lst_rewards.numItems = 0 + self.lst_log.numItems = 0 + local group = DataManager.groups:get(self.group_id) + -- if group.lev == 3 then + -- local mdata = {} + -- mdata.portrait = DataManager.SelfUser.head_url + -- mdata.uid = DataManager.SelfUser.account_id + -- mdata.nick = DataManager.SelfUser.nick_name + -- self.partner_data2[1] = mdata + -- self.lst_partner2.numItems = 1 + -- self.lst_partner2.selectedIndex = 0 + -- end + + local index = self._view:GetController("index").selectedIndex + if index < 2 then + self:GetPartnerData(0) + else + self:GetRewardsStatistic() + -- self._view:GetController("index").selectedIndex = 0 + end +end + +function M:InitView() + self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_PartnerRewards") + -- 根据权限显示功能 + local ctr_index = self._view:GetController("index") + local group = DataManager.groups:get(self.group_id) + if group.lev == 1 then + self._view:GetController("mng").selectedIndex = 1 + else + if group.type == 2 then + self._view:GetController("alliance").selectedIndex = 1 + else + ctr_index.selectedIndex = 1 + self._view:GetController("mng").selectedIndex = 0 + end + end + self.ctr_search = self._view:GetController("search") + + -- 切换页面时,1,2页需要先清理数据,再加载当前页 + ctr_index.onChanged:Set(function() + if ctr_index.selectedIndex == 0 then + if self.ctr_search.selectedIndex == 0 then + if #self.partner_data ~= 0 then + self.rewards_data = {} + self.lst_rewards.numItems = 0 + self:GetRewardsData() + else + self:GetPartnerData(0) + end + else + self.search_rewards_data = {} + self.lst_rewards.numItems = 0 + self:GetRewardsData() + end + elseif ctr_index.selectedIndex == 1 then + if self.ctr_search.selectedIndex == 0 then + self.rewards_log = {} + else + self.search_rewards_log = {} + end + self.lst_log.numItems = 0 + self:GetRewardsLog() + else + self:GetRewardsStatistic() + end + end) + -- 初始化数据 + self.partner_data = {} + self.partner_data2 = {} + local group = DataManager.groups:get(self.group_id) + -- if group.lev == 3 then + -- local mdata = {} + -- mdata.portrait = DataManager.SelfUser.head_url + -- mdata.uid = DataManager.SelfUser.account_id + -- mdata.nick = DataManager.SelfUser.nick_name + -- self.partner_data2[1] = mdata + -- end + self.rewards_data = {} + self.rewards_log = {} + -- 各个列表的初始化 + self.lst_partner = self._view:GetChild("lst_partner") + self.lst_partner:SetVirtual() + self.lst_partner.itemRenderer = function(index, obj) + self:OnRenderPartnerItem(index, obj) + end + self.lst_partner.scrollPane.onPullUpRelease:Set(function() + self:GetPartnerData(self.lst_partner.numItems) + end) + self.lst_partner.onClickItem:Set(function() + self.rewards_data = {} + self.lst_rewards.numItems = 0 + self:GetRewardsData() + end) + + self.lst_partner2 = self._view:GetChild("lst_partner2") + self.lst_partner2:SetVirtual() + self.lst_partner2.itemRenderer = function(index, obj) + self:OnRenderPartnerItem2(index, obj) + end + self.lst_partner2.scrollPane.onPullUpRelease:Set(function() + self:GetPartnerData(self.lst_partner.numItems) + end) + self.lst_partner2.onClickItem:Set(function() + self.rewards_log = {} + self.lst_log.numItems = 0 + self:GetRewardsLog() + end) + + self.lst_rewards = self._view:GetChild("lst_rewards") + self.lst_rewards:SetVirtual() + self.lst_rewards.itemRenderer = function(index, obj) + self:OnRenderRewardsItem(index, obj) + end + + self.lst_log = self._view:GetChild("lst_rewards_record") + self.lst_log:SetVirtual() + self.lst_log.itemRenderer = function(index, obj) + self:OnRenderLogItem(index, obj) + end + self.lst_log.scrollPane.onPullUpRelease:Set(function() + self:GetRewardsLog(self.lst_log.numItems) + end) + + -- 初始化玩法下拉框 + local items = {} + local values = {} + table.insert(items, "全部") + table.insert(values, "0") + -- if #group.playList > 0 then + for i = 1, #group.playList do + local play = group.playList[i] + table.insert(items, play.name) + table.insert(values, tostring(play.id)) + end + -- end + local cb_play = self._view:GetChild("cb_play") + cb_play.items = items + cb_play.values = values + cb_play.selectedIndex = 0 + + -- 搜索按钮事件 + self._view:GetChild("btn_search").onClick:Set(function() + self.rewards_log = {} + self.lst_log.numItems = 0 + self:GetRewardsLog() + end) + self._view:GetChild("btn_search2").onClick:Set(function() + self:GetRewardsStatistic() + end) + self._view:GetChild("btn_search3").onClick:Set(function() + local quary_id = tonumber(self._view:GetChild("tex_id").text) + if not quary_id then + ViewUtil.ErrorTip(nil, "请输入正确的ID") + return + end + self.search_rewards_data = {} + self.search_rewards_log = {} + self:GetPartnerData(0, quary_id) + end) + self._view:GetChild("btn_back").onClick:Set(function() + self.lst_rewards.numItems = #self.rewards_data + self.lst_log.numItems = #self.rewards_log + self.search_partner_data = {} + end) + self._view:GetChild("btn_all").onClick:Set(function() + self.time_panel1:SetTenDay() + self.rewards_log = {} + self.lst_log.numItems = 0 + self:GetRewardsLog() + end) + -- 时间组件初始化 + self.time_panel1 = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0) + self.time_panel2 = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date3"), self._view:GetChild("btn_date4"), -308, 0) +end + +-- 获取合伙人数据 +function M:GetPartnerData(index, qid) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_PartnerList(self.group_id, index, 6, qid, function(res) + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取合伙人信息失败") + else + local members = res.Data.members + if not qid then + -- if #members == 0 then return end + for i = 1, #members do + self.partner_data[#self.partner_data + 1] = members[i] + self.partner_data2[#self.partner_data2 + 1] = members[i] + end + self.lst_partner.numItems = #self.partner_data + self.lst_partner2.numItems = #self.partner_data2 + if index == 0 then + local tem = self._view:GetController("index").selectedIndex + self.lst_partner.selectedIndex = 0 + self.lst_partner2.selectedIndex = 0 + if tem == 0 and #self.partner_data > 0 then + self:GetRewardsData() + elseif tem == 1 and #self.partner_data2 > 0 then + self:GetRewardsLog() + end + end + else + if #members == 0 then + ViewUtil.ErrorTip(nil, "找不到该合伙人") + return + end + self.search_partner_data = members + local data = members[1] + local obj = self._view:GetChild("item_search") + obj:GetChild("tex_name").text = data.nick + local btn_head = obj:GetChild("btn_head") + local portrait = data.portrait + if portrait == "" then + btn_head.icon = "ui://Common/Head0" + else + ImageLoad.Load(portrait, btn_head._iconObject, self.class) + end + obj.selected = true + self:GetRewardsData() + self:GetRewardsLog() + self.ctr_search.selectedIndex = 1 + end + end + end) +end + +-- 获取奖励设置数据 +function M:GetRewardsData() + local data + if #self.search_partner_data == 0 then + if #self.partner_data == 0 then return end + ViewUtil.ShowModalWait() + data = self.partner_data[self.lst_partner.selectedIndex + 1] + else + data = self.search_partner_data[1] + end + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetRewards(self.group_id, data.uid, data.partnerLev, function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取合伙人奖励失败") + else + local rewards = res.Data.rewards + -- if #rewards == 0 then return end + local rdata + if self.ctr_search.selectedIndex == 0 then + rdata = self.rewards_data + else + rdata = self.search_rewards_data + end + for i = 1, #rewards do + rdata[#rdata + 1] = rewards[i] + end + self.lst_rewards.numItems = #rdata + end + end) +end + +-- 获取奖励日志 +function M:GetRewardsLog() + local data + if #self.search_partner_data == 0 then + if #self.partner_data2 == 0 then return end + ViewUtil.ShowModalWait() + data = self.partner_data2[self.lst_partner2.selectedIndex + 1] + else + data = self.search_partner_data[1] + end + local begin_time, end_time = self.time_panel1:GetDate() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetRewardsLog(self.group_id, #self.rewards_log, 6, begin_time, end_time, data.uid, function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取奖励日志失败") + else + local logs = res.Data.reward_logs + -- if #logs == 0 then return end + local rdata + if self.ctr_search.selectedIndex == 0 then + rdata = self.rewards_log + else + rdata = self.search_rewards_log + end + if #rdata == 0 then + self._view:GetChild("tex_num1").text = res.Data.total_num / 100 + self._view:GetChild("tex_num2").text = d2ad(res.Data.total_hp) + end + for i = 1, #logs do + rdata[#rdata + 1] = logs[i] + end + self.lst_log.numItems = #rdata + end + end) +end + +-- 获取奖励统计 +function M:GetRewardsStatistic() + ViewUtil.ShowModalWait() + local data = self.partner_data2[self.lst_partner2.selectedIndex + 1] + local begin_time, end_time = self.time_panel2:GetDate() + local pid = tonumber(self._view:GetChild("cb_play").value) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetRewardStatistic(self.group_id, pid, begin_time, end_time, function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取奖励日志失败") + else + self._view:GetChild("tex_total_round").text = res.Data.round + self._view:GetChild("tex_total_rewards_round").text = res.Data.v_round + self._view:GetChild("tex_total_rewards_fag").text = d2ad(res.Data.hp_cost) + self._view:GetChild("tex_total_rewards").text = d2ad(res.Data.gains) + end + end) +end + +-- 填充合伙人对象 +function M:OnRenderPartnerItem(index, obj) + local data = self.partner_data[index + 1] + obj:GetChild("tex_name").text = data.nick + local btn_head = obj:GetChild("btn_head") + local portrait = data.portrait + if portrait == "" then + btn_head.icon = "ui://Common/Head0" + else + ImageLoad.Load(portrait, btn_head._iconObject, self.class) + end +end + +-- 填充第2页合伙人对象 +function M:OnRenderPartnerItem2(index, obj) + local data = self.partner_data2[index + 1] + obj:GetChild("tex_name").text = data.nick + local btn_head = obj:GetChild("btn_head") + local portrait = data.portrait + if portrait == "" then + btn_head.icon = "ui://Common/Head0" + else + ImageLoad.Load(portrait, btn_head._iconObject, self.class) + end +end + +-- 显示奖励 +local function __showRewardsValue(rtype, cur_value, max_value, mng, value_type) + local str = "" + local tem = value_type == 1 and "%" or "" + if not mng then + str = string.format("%s%s/%s%s", cur_value, tem, max_value, tem) + else + str = string.format("%s%s", cur_value, tem) + end + return str +end +-- 填充奖励设置对象 +function M:OnRenderRewardsItem(index, obj) + local data + if self.ctr_search.selectedIndex == 0 then + data = self.rewards_data[index + 1] + else + data = self.search_rewards_data[index + 1] + end + local pdata + if self.ctr_search.selectedIndex == 0 then + pdata = self.partner_data[self.lst_partner.selectedIndex + 1] + else + pdata = self.search_partner_data[1] + end + local group = DataManager.groups:get(self.group_id) + + obj:GetChild("tex_rewards").text = __showRewardsValue(data.rewardType, data.cur_value, data.max_value, group.lev < 3, data.rewardValueType or 1) + local play_name = group:getPlayName(data.pid) + obj:GetChild("tex_name").text = play_name + if data.rewardType == 3 or pdata.uid == DataManager.SelfUser.account_id then + obj:GetController("promote").selectedIndex = 1 + else + obj:GetController("promote").selectedIndex = 0 + end + local input_type = data.rewardType == 1 and 0 or 3 + obj:GetChild("btn_set").onClick:Set(function() + local gfiv = GroupNumberInputView.new(self._root_view,function(num) + local tem = num + if data.rewardType == 2 then + tem = ad2d(tem) + end + if tem > data.max_value then + ViewUtil.ErrorTip(nil, "输入值超过上限") + return + end + + local fgCtr = ControllerManager.GetController(NewGroupController) + ViewUtil.ShowModalWait() + fgCtr:FG_SetRewards(self.group_id, data.pid, pdata.partnerLev, pdata.uid, false, tem, function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "设置合伙人奖励失败") + else + data.cur_value = tem + obj:GetChild("tex_rewards").text = __showRewardsValue(data.rewardType, tem, data.max_value, group.lev < 3, data.rewardValueType or 1) + end + end) + end, input_type) + gfiv:Show() + end) + obj:GetChild("btn_set_all").onClick:Set(function() + local msg_win = MsgWindow.new(nil, "你是否为名下所有合伙人设定此奖励数值?", MsgWindow.MsgMode.OkAndCancel) + msg_win.onOk:Add(function( ... ) + local pdata + if self.ctr_search.selectedIndex == 0 then + pdata = self.partner_data[self.lst_partner.selectedIndex + 1] + else + pdata = self.search_partner_data[1] + end + local fgCtr = ControllerManager.GetController(NewGroupController) + ViewUtil.ShowModalWait() + fgCtr:FG_SetRewards(self.group_id, data.pid, pdata.partnerLev, pdata.uid, true, data.cur_value, function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "设置合伙人奖励失败") + else + ViewUtil.ShowBannerOnScreenCenter("设置合伙人奖励成功") + end + end) + end) + msg_win:Show() + + end) +end + +-- 填充奖励日志 +function M:OnRenderLogItem(index, obj) + local data + if self.ctr_search.selectedIndex == 0 then + data = self.rewards_log[index + 1] + else + data = self.search_rewards_log[index + 1] + end + obj:GetChild("tex_rewards").text = d2ad(data.hp) + local play_name = DataManager.groups:get(self.group_id):getPlayName(data.pid) + obj:GetChild("tex_game").text = play_name + obj:GetChild("tex_num").text = data.round / 100 + obj:GetChild("tex_roomid").text = data.roomid + obj:GetChild("tex_date").text = os.date("%m月%d日\r%H:%M",data.time) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatView.lua new file mode 100644 index 00000000..58bcf70c --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPartnerStatView.lua @@ -0,0 +1,291 @@ +local TimeSettingPanel = import(".TimeSettingPanel") +local GroupPartnerStatMember = import(".GroupPartnerStatMember") +local GroupPartnerStatPlay = import(".GroupPartnerStatPlay") +local GroupNumberInputView = import(".GroupNumberInputView") +-- 开桌统计 +local GroupMngPartnerStatView = {} + +local M = GroupMngPartnerStatView + +function GroupMngPartnerStatView.new(gid) + local self = M + self.class = "GroupMngPartnerStatView" + self.group_id = gid + self:InitView() + return self +end + +function M:initData() + self.lst_record.numItems = 0 + self.record_data = {} + + local now_time = os.date("*t",now) + local today = os.time({year=now_time.year, month=now_time.month, day=now_time.day, hour=0,min=0,sec=0}) + self.begin_time = today + self.end_time = today + 86400 + self:GetRecordData(0) + --self:ShowPeopleNum() +end + +-- function M:ShowPeopleNum() +-- local fgCtr = ControllerManager.GetController(NewGroupController) +-- fgCtr:FG_GetMembersCount(self.group_id,function(res) + +-- ViewUtil.CloseModalWait() + +-- if res.ReturnCode == 0 then +-- self._view:GetChild('tex_memb_num').text = res.Data.member_num +-- self._view:GetChild('tex_total_hp').text = d2ad(res.Data.hp_num1+res.Data.otherHp) +-- end +-- end) +-- end + +function M:InitView() + self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupPartnerStat") + + local group = DataManager.groups:get(self.group_id) + -- if group.lev ~= 3 then + -- self._view:GetController("mng").selectedIndex = 1 + -- end + + local lst_mgr_index = self._view:GetChild("lst_mgr_index") + -- lst_mgr_index.visible = false + -- if group.lev == 1 then + -- lst_mgr_index.visible = true + -- end + + self.lst_record = self._view:GetChild("lst_record") + self.lst_record:SetVirtual() + self.lst_record.itemRenderer = function(index, obj) + self:OnRenderRecordItem(index, obj) + end + self.lst_record.scrollPane.onPullUpRelease:Set(function() + self:GetRecordData(self.lst_record.numItems) + end) + + self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0, nil, true) + + local ctr_page = self._view:GetController("type") + ctr_page.onChanged:Set(function() + self.record_data = {} + self.lst_record.numItems = 0 + if ctr_page.selectedIndex == 0 then + local now_time = os.date("*t",now) + local today = os.time({year=now_time.year, month=now_time.month, day=now_time.day, hour=0,min=0,sec=0}) + self.begin_time = today + self.end_time = today + 86400 + else + local now_time = os.date("*t",now) + local today = os.time({year=now_time.year, month=now_time.month, day=now_time.day, hour=0,min=0,sec=0}) + self.begin_time = today - 86400 * ctr_page.selectedIndex + self.end_time = today - 86400 * (ctr_page.selectedIndex - 1) + end + self:GetRecordData(0) + end) + + -- self._view:GetChild("btn_search").onClick:Set(function() + -- self.record_data = {} + -- self.lst_record.numItems = 0 + + -- self.begin_time, self.end_time = self.time_panel:GetDate() + -- self:GetRecordData(0) + -- end) + + -- 搜索玩家 + local ctr_search = self._view:GetController('search') + self._view:GetChild('btn_search').onClick:Set( + function() + --printlog("aaaaaaaaaa1111111111111111111111111111111111111111111111") + ViewUtil.ShowModalWait(nil) + local text = self._view:GetChild('tex_id').text + local qid, qnick + if text == "" then + ViewUtil.CloseModalWait() + ViewUtil.ErrorTip(nil, '输入不能为空') + return + end + qid = tonumber(text) or 0 + qnick = text + local time_type = self._view:GetController("type").selectedIndex + if self.begin_time ~= nil and self.end_time ~= nil then + time_type = 0 + end + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_FindPartnerStat( + self.group_id, + qid,0, 6, time_type,self.begin_time,self.end_time, + function(res) + -- printlog("aaaaaaaaaaaaaaaa22222222222222222222222222222") + -- pt(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, '找不到成员') + else + self._view:GetChild('tex_id').text = '' + ctr_search.selectedIndex = 1 + local item_result = self._view:GetChild('lst_member_find') + item_result:RemoveChildrenToPool() + + for j = 1, #res.Data.members do + local tem = item_result:AddItemFromPool() + self:FillRecordItem(res.Data.members[j],tem) + end + end + end + ) + end + ) + + local btn_back = self._view:GetChild('btn_back') + btn_back.onClick:Set( + function() + self.lst_record.numItems = #self.record_data + end + ) +end + + +function M:GetRecordData(index) + + ViewUtil.ShowModalWait() + + local time_type = self._view:GetController("type").selectedIndex + if self.begin_time ~= nil and self.end_time ~= nil then + time_type = 0 + end + + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetPartnerStat(self.group_id, index, 6, time_type,self.begin_time,self.end_time,function(res) + + ViewUtil.CloseModalWait() + + if res.ReturnCode == 0 then + + local members = res.Data.members + -- printlog("aaaaaaaaaaaaaacccccccccccccccccccccccccccccccc") + -- pt(members) + for i = 1, #members do + self.record_data[#self.record_data + 1] = members[i] + end + self.lst_record.numItems = #self.record_data + end + end) +end + +-- 显示奖励 +local function __showRewardsValue(rtype, cur_value, max_value, mng) + local str = "" + if not mng then + str = string.format("%s%%/%s%%", cur_value, max_value) + else + str = string.format("%s%%", cur_value) + end + return str +end + +function M:FillRecordItem(data, obj) + + local group = DataManager.groups:get(self.group_id) + + obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(data.nick).."("..data.total..")" + obj:GetChild("tex_id").text = "ID:" .. data.uid + + local tex_total_score = obj:GetChild("tex_total_score") + local ctr_show_total = obj:GetController("show_total") + if data._total_hp then + + tex_total_score.text = data._total_hp + ctr_show_total.selectedIndex = 1 + else + ctr_show_total.selectedIndex = 0 + end + + obj:GetChild("tex_round_valid").text = d2ad(data.reward_hp+data.total_win)--d2ad(data.reward_hp) --data.valid_round / 100 + obj:GetChild("tex_round_total").text = data.total_round + obj:GetChild("tex_total").text = d2ad(data.total_win) + obj:GetChild("tex_round_youxiao").text = data.valid_round / 100 + + + local btn_check_members = obj:GetChild("btn_check_members") + btn_check_members.onClick:Set(function() + ViewUtil.ShowModalWait(self._root_view) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetTotalHp(self.group_id, data.uid, function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode == 0 then + + local hp = d2ad(res.Data.hp) + tex_total_score.text = hp + data._total_hp = hp + data.total = res.Data.total_member - 1 + obj:GetChild("tex_name").text = data.nick.."("..data.total..")" + ctr_show_total.selectedIndex = 1 + end + end) + end) + + + local btn_award = obj:GetChild("btn_award") + btn_award.text = d2ad(data.reward_hp)--d2ad(data.reward_hp+data.total_win) + btn_award.onClick:Set(function() + + local time_type = self._view:GetController("type").selectedIndex + local gniv = GroupPartnerStatPlay.new(self.group_id, data.uid, data.partnerLev, DataManager.SelfUser.account_id, time_type,self.begin_time,self.end_time) + gniv:Show() + end) + + local btn_detail = obj:GetChild("btn_detail") + btn_detail.onClick:Set(function() + local time_type = self._view:GetController("type").selectedIndex + --printlog("ccccccccccwwwwwwwwwwwwwwwwwwwwwwwwwwww ",self.begin_time," ",self.end_time) + local gniv = GroupPartnerStatMember.new(self.group_id,data.uid, 0,self.begin_time,self.end_time) + gniv:Show() + end) + + local btnMen = obj:GetChild("btnMen") + -- btnMen.text = d2ad(data.autoscore) + local menControl = obj:GetController("menkan") + + if group.lev==1 or (group.lev==3 and group.partnerLev>0) then + if (DataManager.SelfUser.account_id ~= data.uid) then + menControl.selectedIndex = 1 + btnMen.text = d2ad(data.autoscore) + btnMen.touchable = true + + else + btnMen.text = d2ad(data.autoscore) + menControl.selectedIndex = 1 + btnMen.touchable = false + end + else + menControl.selectedIndex = 0 + end + + btnMen.onClick:Set(function() + local gfiv = GroupNumberInputView.new(self._root_view,function(num) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_SetPartnerThreshold(self.group_id, data.uid, num, function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode,"设置失败") + else + ViewUtil.ShowBannerOnScreenCenter("设置成功") + btnMen.text = num + data.autoscore = ad2d(num) + end + end) + end, 0) + gfiv:Show() + end) +end + +function M:OnRenderRecordItem(index, obj) + local data = self.record_data[index + 1] + self:FillRecordItem(data, obj) +end + + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPersonStatView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPersonStatView.lua new file mode 100644 index 00000000..e83121a9 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPersonStatView.lua @@ -0,0 +1,343 @@ +local TimeSettingPanel = import(".TimeSettingPanel") +-- 开桌统计 +local GroupMngPersonStatView = {} + +local M = GroupMngPersonStatView + +function GroupMngPersonStatView.new(gid) + local self = M + self.class = "GroupMngPersonStatView" + self.group_id = gid + self:InitView() + return self +end + +function M:initData() + self.lst_record.numItems = 0 + self.record_data = {} + self._view:GetController("record").selectedIndex = 0 + self:GetRecordData(0) +end + +function M:InitView() + self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupPersonStat") + + self.lst_record = self._view:GetChild("lst_record") + self.lst_record:SetVirtual() + self.lst_record.itemRenderer = function(index, obj) + self:OnRenderRecordItem(index, obj) + end + self.lst_record.scrollPane.onPullUpRelease:Set(function() + self:GetRecordData(self.lst_record.numItems) + end) + + self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0) + self.begin_time, self.end_time = self.time_panel:GetDate() + local ctr_page = self._view:GetController("type") + ctr_page.onChanged:Set(function() + self.record_data = {} + self.lst_record.numItems = 0 + self.begin_time = nil + self.end_time = nil + self:GetRecordData(0) + end) + + self._view:GetChild("btn_search").onClick:Set(function() + self.record_data = {} + self.lst_record.numItems = 0 + + self.begin_time, self.end_time = self.time_panel:GetDate() + self:GetRecordData(0) + end) +end + +function M:GetRecordData(index) + + ViewUtil.ShowModalWait() + + local time_type = self._view:GetController("type").selectedIndex + + if self.begin_time ~= nil and self.end_time ~= nil then + time_type = 3 + end + + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetGroupPersonRecord(self.group_id, GetPlatform(), DataManager.SelfUser.account_id, time_type, self.begin_time, self.end_time, index, 6, function(res) + + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取回放数据失败") + else + local records = res.Data.records + for i = 1, #records do + self.record_data[#self.record_data + 1] = records[i] + end + self.lst_record.numItems = #self.record_data + + printlog("ccccccccccccccccccccccccccccccccccc2222223333333333333333333333333333333",res.Data.total_round," ",res.Data.valid_round) + pt(res.Data) + if index == 0 then + --self._view:GetChild("tex_num1").text = ""..res.Data.total + --self._view:GetChild("tex_num3").text = ""..d2ad(res.Data.consume) + self._view:GetChild("tex_winner_count").text = res.Data.total_round + self._view:GetChild("tex_valid_count").text = res.Data.valid_round / 100 + + self._view:GetChild("tex_total_proportion").text = d2ad(res.Data.total_win) + end + end + end) +end + +function M:FillRecordItem(data, obj) + local game_id = data.game_id + local room_id = data.room_id + local create_time = data.create_time + local room_type_str = data.game_info.name + local time =tonumber(create_time) + local room_time_str = os.date("%Y-%m-%d %H:%M:%S", time) + local totalScore = json.decode(data.totalScore) + local hpOnOff = data.hpOnOff + local hpType = data.game_info.hpType + local player_list = {} + for i = 1, #totalScore do + local p = totalScore[i] + player_list[i] = {} + player_list[i].id = p.accId + local score = p.score + if hpOnOff == 1 and hpType > 1 then + score = score / 10 + end + player_list[i].score = score + player_list[i].house = 0 + player_list[i].nick = p.nick + end + local play_name = DataManager.groups:get(self.group_id):getPlayName(data.groupPid) + + obj:GetChild("tex_time").text = room_time_str + obj:GetChild("tex_roomid").text = room_id + obj:GetChild("tex_times").text = d2ad(data.hp_times).."倍" + obj:GetChild("tex_game").text = play_name + local lst_total = obj:GetChild("lst_total") + lst_total:RemoveChildrenToPool() + local ids = {} + for j=1,#totalScore do + local titem = lst_total:AddItemFromPool() + local trdata = totalScore[j] + titem:GetChild("tex_name").text = ViewUtil.stringEllipsis(trdata.nick) + titem:GetChild("tex_id").text = "ID:"..trdata.accId + table.insert( ids, trdata.accId ) + + local score = trdata.score + if trdata.hp == nil then + if hpOnOff == 1 and hpType > 1 then + score = score / 10 + end + else + score = d2ad(trdata.hp) + end + + titem:GetChild("tex_score").text = score + + if score >= 0 then + titem:GetController("num_color").selectedIndex = 0 + else + titem:GetController("num_color").selectedIndex = 1 + end + end + + if #totalScore >= 6 then + obj:GetController("person_num").selectedIndex = 1 + else + obj:GetController("person_num").selectedIndex = 0 + end + + obj:GetChild("btn_screenshot").onClick:Set(function() + self:OnShareScreenShot(room_id, room_type_str, room_time_str, totalScore, hpOnOff, hpType) + end) + + obj:GetChild("btn_share").onClick:Set(function() + ShareChatRoom(room_id, tostring(os.time()), data.round, room_type_str, self.group_id, player_list) + end) + obj.onClick:Set(function() + self:OnShowRecordInfo(data,ids) + end) +end + +function M:OnRenderRecordItem(index, obj) + local data = self.record_data[index + 1] + self:FillRecordItem(data, obj) +end + + +function M:OnShareScreenShot(room_id, room_type_str, room_time_str, totalScore, hpOnOff, hpType) + ViewUtil.ShowModalWait(self._view, "正在分享...") + UIPackage.AddPackage("base/rank/ui/Rank") + local result_view = UIPackage.CreateObjectFromURL("ui://Rank/ResultView") + result_view.visible = false + self._view:AddChild(result_view) + result_view.x = -308 + result_view.y = -47 + result_view:GetChild("tex_roomnum").text = "房间号:" .. room_id .. " " .. room_type_str + result_view:GetChild("tex_data").text = room_time_str + result_view:GetChild("btn_confirm").onClick:Set(function() result_view:Dispose() end) + local lst_p = result_view:GetChild("list_result") + local load_head_num = #totalScore + for j = 1, #totalScore do + local p = totalScore[j] + local item = lst_p:AddItemFromPool() + item:GetChild("name").text = ViewUtil.stringEllipsis(p.nick) + local score = p.score + if hpOnOff == 1 and hpType > 1 then + score = score / 10 + end + item:GetChild("score").text = score + if score < 0 then item:GetController("di").selectedIndex = 1 end + if p.portrait and p.portrait ~= "" then + ImageLoad.Load(p.portrait, item:GetChild("n9")._iconObject, self.class, function( ... ) + load_head_num = load_head_num - 1 + end) + else + load_head_num = load_head_num - 1 + end + end + coroutine.start(function ( ... ) + local left_time = 4 + while (true) do + if load_head_num == 0 or left_time == 0 then + result_view.visible = true + coroutine.wait(0.2) + ShareScreenShotWithOption(function() + result_view:Dispose() + end) + ViewUtil.CloseModalWait() + break + end + coroutine.wait(1) + left_time = left_time - 1 + end + end) +end + +function M:OnShowRecordInfo(rdata,ids) + local ctr_record = self._view:GetController("record") + ctr_record.selectedIndex = 1 + + local lst_recordInfo = self._view:GetChild("lst_recordInfo") + lst_recordInfo:RemoveChildrenToPool() + -- lst_recordInfo.scrollPane.currentPageX = 0 + local round_count = tonumber(rdata.round) + local game_id = rdata.game_info.game_id + local playback_id = rdata.military_id + local hpOnOff = rdata.hpOnOff + local hpType = rdata.game_info.hpType + for i = 1,round_count do + local item = lst_recordInfo:AddItemFromPool() + item:GetChild("tex_num").text = tostring(i) + + local play_name = DataManager.groups:get(self.group_id):getPlayName(rdata.groupPid) + item:GetChild("tex_game").text = play_name + + item:GetChild("tex_roomid").text = rdata.room_id + + item:GetChild("tex_times").text = d2ad(rdata.hp_times).."倍" + + local round_score_str = rdata["round_"..i] + local round_score_item = json.decode(round_score_str) + local lst_total = item:GetChild("lst_total") + lst_total:RemoveChildrenToPool() + for k=1,#round_score_item do + local titem = lst_total:AddItemFromPool() + local trdata = round_score_item[k] + titem:GetChild("tex_name").text = ViewUtil.stringEllipsis(trdata.nick) + titem:GetChild("tex_id").text = "ID:".. ids[k] + + local score = trdata.score + if trdata.hp == nil then + if hpOnOff == 1 and hpType > 1 then + score = score / 10 + end + else + score = d2ad(trdata.hp) + end + + + titem:GetChild("tex_score").text = score + end + + if #round_score_item >= 6 then + item:GetController("person_num").selectedIndex = 1 + else + item:GetController("person_num").selectedIndex = 0 + end + local btn_play =item:GetChild("btn_play") + btn_play.onClick:Set(function() + local group = DataManager.groups:get(self.group_id) + if DataManager.SelfUser.playback[playback_id] ~= nil and DataManager.SelfUser.playback[playback_id][i] ~= nil then + local room = ExtendManager.GetExtendConfig(game_id):NewRoom() + DataManager.CurrenRoom = room + room.lev = group.lev + room.game_id = game_id + local extend = ExtendManager.GetExtendConfig(game_id) + extend:FillPlayBackData(DataManager.SelfUser.playback[playback_id][i]) + if not room.self_player then + room.self_player = room:GetPlayerBySeat(1) + end + local main = self:GenaratePlayBack(ViewManager.View_PlayBack, game_id) + main._currentId = playback_id + main._currentRound = i + main._totalRound = tonumber(rdata.round) + main:FillRoomData(DataManager.SelfUser.playback[playback_id][i]) + else + ViewUtil.ShowModalWait(self._view) + local _data = {} + _data["military_id"] = playback_id + _data["round"] = tostring(i) + local loddyCtr1 = ControllerManager.GetController(LoddyController) + loddyCtr1:RequestPlayBack(_data,function(code,data) + ViewUtil.CloseModalWait() + if code == 0 then + if DataManager.SelfUser.playback[playback_id] ~= nil then + DataManager.SelfUser.playback[playback_id][i] = data + else + local playback_data = {} + playback_data[i] = data + DataManager.SelfUser.playback[playback_id] = playback_data + end + + local main = self:GenaratePlayBack(ViewManager.View_PlayBack, game_id) + main._currentId = playback_id + main._currentRound = i + main._totalRound = tonumber(rdata.round) + main:FillRoomData(data) + main._room.lev = group.lev + elseif code == 25 then + ViewUtil.ErrorTip(-1, "回放未找到!") + -- btn_play_back.grayed = true + end + end, rdata.game_info) + end + end) + end +end + +function M:GenaratePlayBack(id, game_id, ...) + local tem =nil + local dview_class = nil + if not dview_class then + local exconfig = ExtendManager.GetExtendConfig(game_id) + dview_class = exconfig:GetView(id) + end + if not dview_class then + return + end + local arg = {...} + tem = dview_class.new(...) + tem.Id = id + tem:Show() + return tem +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPlayStatView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPlayStatView.lua new file mode 100644 index 00000000..81024764 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPlayStatView.lua @@ -0,0 +1,89 @@ +-- 开桌统计 +local TimeSettingPanel = import(".TimeSettingPanel") +local GroupMngPlayStatView = {} + +local M = GroupMngPlayStatView + +function GroupMngPlayStatView.new(gid) + local self = M + self.class = "GroupMngPlayStatView" + self.group_id = gid + self:InitView() + return self +end + +function M:initData() + + self:GetConsumeStatData() +end + +function M:InitView() + self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupPlayStat") + + self.consume_stat = {} --消耗统计 + + self.lst_consume_stat = self._view:GetChild("lst_consume_stat") + self.lst_consume_stat:SetVirtual() + self.lst_consume_stat.itemRenderer = function(index, obj) + self:OnRenderConsumeItem(index, obj) + end + + self._view:GetChild("btn_search").onClick:Set(function() + self.consume_stat = {} + self.lst_consume_stat.numItems = 0 + self:GetConsumeStatData() + end) + + self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0) +end + +function M:GetConsumeStatData() + ViewUtil.ShowModalWait() + local begin_time, end_time = self.time_panel:GetDate() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetConsumeStat(self.group_id,begin_time,end_time, function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取统计数据失败") + else + self.consume_stat = res.Data.cosume_logs + + local top = #self.consume_stat + 1 + self.consume_stat[top] = {round=0,valid=0,no_valid=0,diamo_cost=0,pid=0} + + for i = 1,#self.consume_stat - 1 do + self.consume_stat[top].round = (self.consume_stat[top].round + self.consume_stat[i].round) + self.consume_stat[top].valid = (self.consume_stat[top].valid + self.consume_stat[i].valid) + self.consume_stat[top].no_valid = (self.consume_stat[top].no_valid + self.consume_stat[i].no_valid) + self.consume_stat[top].diamo_cost = (self.consume_stat[top].diamo_cost + self.consume_stat[i].diamo_cost) + end + + self.lst_consume_stat.numItems = #self.consume_stat + + end + end) +end + +function M:OnRenderConsumeItem(index, obj) + local ci = index + 1 + local data = self.consume_stat[ci] + + local play = DataManager.groups:get(self.group_id):getPlay(data.pid) + obj:GetChild("title").text = play and play.name or "总计" + + if ci ~= #self.consume_stat then + obj:GetController("total").selectedIndex = 0 + else + obj:GetController("total").selectedIndex = 1 + end + + obj:GetChild("tex_round").text = data.round / 100 + obj:GetChild("tex_finish").text = data.valid / 100 + obj:GetChild("tex_unfinish").text = data.no_valid / 100 + obj:GetChild("tex_diamond").text = data.diamo_cost / 100 +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPromoteSetView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPromoteSetView.lua new file mode 100644 index 00000000..ae112506 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngPromoteSetView.lua @@ -0,0 +1,200 @@ +-- 全民推广 设置界面 +local GroupNumberInputView = import(".GroupNumberInputView") + +local GroupMngPromoteSetView = {} + +local M = GroupMngPromoteSetView + +local STR_TIP = { + IsNull = "至少要添加一条推广奖励项。", + SameNum = "设置了相同的推广人数,相同项只有一条会生效,是否继续?", + SameVal = "设置了相同的推广奖励比例,是否继续?", +} + +function GroupMngPromoteSetView.new(gid, blur_view) + local self = M + self.class = "GroupMngPromoteSetView" + self.group_id = gid + self.blur_view = blur_view + self.promote_data = {} + self.old_data = nil + self:InitView() + return self +end + +local function FillPromoteItem(self, index, item) + local min_p, min_v, max_p, max_v = -1, -1, 999999, 100 + local data = self.promote_data[index + 1] + if index > 0 then + local last_data = self.promote_data[index] + min_p = last_data.num + min_v = last_data.val + end + if index < #self.promote_data - 1 then + local next_data = self.promote_data[index + 2] + max_p = next_data.num + max_v = next_data.val + end + if #self.promote_data == 1 and index == 0 then + item:GetController("last").selectedIndex = 1 + else + item:GetController("last").selectedIndex = 0 + end + item:GetChild("btn_remove").onClick:Set(function() + local msg_tip = MsgWindow.new(self._root_view, "确定要移除该条奖励吗?", MsgWindow.MsgMode.OkAndCancel) + msg_tip.onOk:Add(function() + table.remove(self.promote_data, index + 1) + self.lst_promote.numItems = #self.promote_data + end) + msg_tip:Show() + end) + + local btn_p = item:GetChild("btn_p") + local btn_v = item:GetChild("btn_v") + local tex_p = btn_p:GetChild("tex_num") + local tex_v = btn_v:GetChild("tex_num") + tex_p.text = data.num + tex_v.text = string.format("%d%%", data.val) + btn_p.onClick:Set(function() + local gfiv = GroupNumberInputView.new(self._root_view,function(num) + if num <= min_p then + ViewUtil.ErrorTip(nil, "输入值必须大于" .. min_p) + return + end + if num >= max_p then + ViewUtil.ErrorTip(nil, "输入值必须小于" .. max_p) + return + end + tex_p.text = num + data.num = num + end, 0) + gfiv:Show() + end) + btn_v.onClick:Set(function() + local gfiv = GroupNumberInputView.new(self._root_view,function(num) + if num <= min_v then + ViewUtil.ErrorTip(nil, "输入值必须大于" .. min_v) + return + end + if num >= max_v then + ViewUtil.ErrorTip(nil, "输入值必须小于" .. max_v) + return + end + if num > 100 then + ViewUtil.ErrorTip(nil, "输入值不能超过100") + return + end + tex_v.text = string.format("%d%%", num) + data.val = num + end, 0) + gfiv:Show() + end) +end + +function M:InitView() + self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupPromoteSet") + + self.lst_promote = self._view:GetChild("lst_promote") + self.lst_promote:SetVirtual() + self.lst_promote.itemRenderer = function(index, item) + FillPromoteItem(self, index, item) + end + self.lst_promote.numItems = 0 + + self._view:GetChild("btn_add").onClick:Set(function() + local last_data = self.promote_data[#self.promote_data] + if last_data.val == 100 then + ViewUtil.ErrorTip(nil, "奖励最大为100%,无法再新增。") + return + end + local tem = {num = last_data.num + 1, val = last_data.val + 1} + table.insert(self.promote_data, tem) + self.lst_promote.numItems = #self.promote_data + end) + self._view:GetChild("btn_confirm").onClick:Set(function() + local msg_confirm = MsgWindow.new(self._root_view, "确定修改吗?", MsgWindow.MsgMode.OkAndCancel) + msg_confirm.onOk:Add(function() + self:CheckData(function() + self:SetPromote() + end) + end) + msg_confirm:Show() + end) + self._view:GetChild("btn_cancel").onClick:Set(function() + local msg_cancel = MsgWindow.new(self._root_view, "确定恢复所有改动吗?", MsgWindow.MsgMode.OkAndCancel) + msg_cancel.onOk:Add(function() + self.promote_data = membe_deep_clone(self.old_data) + self.lst_promote.numItems = #self.promote_data + end) + msg_cancel:Show() + end) +end + +function M:CheckData(callback) + local str_tip + if #self.promote_data == 0 then + str_tip = STR_TIP.IsNull + local msg_tip = MsgWindow.new(self._root_view, str_tip, MsgWindow.MsgMode.OnlyOk) + msg_tip.onOk:Add(function( ... ) + msg_tip:Dispose() + end) + msg_tip:Show() + else + local tn, tv = {}, {} + for i = 1, #self.promote_data do + local data = self.promote_data[i] + if tn[data.num] then + tn[data.num] = tn[data.num] + 1 + else + tn[data.num] = 1 + end + if tv[data.val] then + tv[data.val] = tv[data.val] + 1 + else + tv[data.val] = 1 + end + end + if table.nums(tn) < #self.promote_data then + str_tip = STR_TIP.SameNum + elseif table.nums(tv) < #self.promote_data then + str_tip = STR_TIP.SameVal + end + if str_tip then + local msg_tip = MsgWindow.new(self._root_view, str_tip, MsgWindow.MsgMode.OkAndCancel) + msg_tip.onOk:Add(function() + callback() + end) + msg_tip:Show() + else + callback() + end + end +end + +function M:initData() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetPromote(self.group_id, function(res) + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取推广奖励失败") + else + local data = res.Data.data + self.old_data = data + self.promote_data = membe_deep_clone(data) + self.lst_promote.numItems = #self.promote_data + self._view:GetController("not_null").selectedIndex = 1 + end + end) +end + +function M:SetPromote() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_SetPromote(self.group_id, self.promote_data, function(res) + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "设置推广奖励失败") + else + self.old_data = membe_deep_clone(self.promote_data) + end + end) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngProportionView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngProportionView.lua new file mode 100644 index 00000000..0d5dc6ca --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngProportionView.lua @@ -0,0 +1,83 @@ +-- 赢家管理界面(抽水明细) +local TimeSettingPanel = import(".TimeSettingPanel") + +local GroupMngProportionView = {} + +local M = GroupMngProportionView + +function GroupMngProportionView.new(gid) + local self = M + self.class = "GroupMngProportionView" + self.group_id = gid + self:FillView() + return self +end + +function M:initData() + self.prop_data = {} + self.lst_prop.numItems = 0 + self:GetPropData(0) +end + +function M:FillView() + self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupProportion") + + self.prop_data = {} + self._view:GetChild("btn_search").onClick:Set(function() + self:initData() + end) + + self.lst_prop = self._view:GetChild("lst_proportion") + self.lst_prop:SetVirtual() + self.lst_prop.itemRenderer = function(index, obj) + self:OnRenderPropItem(index, obj) + end + self.lst_prop.scrollPane.onPullUpRelease:Set(function() + self:GetPropData(self.lst_prop.numItems) + end) + + self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0) +end + +-- 获取抽水数据 +function M:GetPropData(index) + ViewUtil.ShowModalWait() + local begin_time, end_time = self.time_panel:GetDate() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetPropLog(self.group_id, index, 8, begin_time, end_time, function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取排名信息失败") + else + local props = res.Data.hp_logs + if index == 0 then + self._view:GetChild("tex_winner_count").text = res.Data.count + self._view:GetChild("tex_valid_count").text = res.Data.valid_count + self._view:GetChild("tex_winner_proportion").text = d2ad(res.Data.pump) + self._view:GetChild("tex_total_proportion").text = d2ad(res.Data.gains) + end + if #props == 0 then return end + for i = 1, #props do + self.prop_data[#self.prop_data + 1] = props[i] + end + self.lst_prop.numItems = #self.prop_data + end + end) +end + +-- 填充抽水对象 +function M:OnRenderPropItem(index, obj) + local tem = index + 1 + local data = self.prop_data[tem] + obj:GetChild("tex_num").text = d2ad(math.abs(data.hp)) + obj:GetChild("tex_winner").text = ViewUtil.stringEllipsis(data.nick) + local play_name = DataManager.groups:get(self.group_id):getPlayName(data.pid) + obj:GetChild("tex_game").text = play_name + obj:GetChild("tex_roomid").text = data.roomid + obj:GetChild("tex_date").text = os.date("%m月%d日\r%H:%M", data.time) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngRankView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngRankView.lua new file mode 100644 index 00000000..de4c1adb --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngRankView.lua @@ -0,0 +1,261 @@ +-- 牌友圈排行界面 +local TimeSettingPanel = import(".TimeSettingPanel") + +local GroupMngRankView = {} + +local M = GroupMngRankView + +function GroupMngRankView.new(gid) + local self = M + self.class = "GroupMngRankView" + self.group_id = gid + self:FillView() + return self +end + +function M:clearRankData() + self.rank_data = {} + self.lst_rank.numItems = 0 + self.win_data = {} + self.lst_winrank.numItems = 0 +end + +-- 初始化数据 +function M:initData() + self.rank_data = {} + self.round_data = {} + self.win_data = {} + self.lst_rank.numItems = 0 + self.lst_round.numItems = 0 + local page = self._view:GetController("page").selectedIndex + if page == 0 then + self:GetRankData(0) + elseif page == 1 then + self:GetRoundData() + elseif page == 2 then + self:GetWinRankData(0) + end +end + +-- 快速访问 +function M:navigation() + self._view:GetController("page").selectedIndex = 0 + self:initData() +end + +function M:FillView() + self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupRank") + local group = DataManager.groups:get(self.group_id) + if group.lev ~= 3 then + self._view:GetController("mng").selectedIndex = 1 + end + + self.zongren = self._view:GetChild("zongren") + + self.rank_data = {} + self.round_data = {} + self.win_data = {} + self._view:GetChild("btn_search").onClick:Set(function() + self:clearRankData() + self:GetRankData(#self.rank_data) + end) + + self._view:GetChild("btn_search1").onClick:Set(function() + self:clearRankData() + + self:GetWinRankData(#self.win_data) + end) + + self.lst_rank = self._view:GetChild("lst_rank") + self.lst_rank:SetVirtual() + self.lst_rank.itemRenderer = function(index, obj) + self:OnRenderRankItem(index, obj) + end + self.lst_rank.scrollPane.onPullUpRelease:Set(function() + self:GetRankData(self.lst_rank.numItems) + end) + self.lst_round = self._view:GetChild("lst_round") + self.lst_round:SetVirtual() + self.lst_round.itemRenderer = function(index, obj) + self:OnRenderRoundItem(index, obj) + end + + + self.lst_winrank = self._view:GetChild("lst_winrank") + self.lst_winrank:SetVirtual() + self.lst_winrank.itemRenderer = function(index, obj) + self:OnRenderWinRankItem(index, obj) + end + self.lst_winrank.scrollPane.onPullUpRelease:Set(function() + self:GetWinRankData(self.lst_winrank.numItems) + end) + + local ctr_page = self._view:GetController("page") + ctr_page.onChanged:Set(function() + if ctr_page.selectedIndex == 0 then + self.rank_data = {} + self.lst_rank.numItems = 0 + self:GetRankData(0) + elseif ctr_page.selectedIndex == 1 then + self:GetRoundData() + else + self.win_data = {} + self.lst_winrank.numItems = 0 + self:GetWinRankData(0) + end + end) + + local items = {} + local values = {} + table.insert(items, "全部游戏统计") + table.insert(values, "0") + local group = DataManager.groups:get(self.group_id) + if #group.playList > 0 then + for i = 1, #group.playList do + local play = group.playList[i] + table.insert(items, play.name) + table.insert(values, tostring(play.id)) + end + end + local cb_play = self._view:GetChild("cb_play") + cb_play.items = items + cb_play.values = values + cb_play.selectedIndex = 0 + + self._view:GetChild("cb_play").onChanged:Set(function() + self.rank_data = {} + self.round_data = {} + self.win_data = {} + self.lst_rank.numItems = 0 + self.lst_round.numItems = 0 + self.lst_winrank.numItems = 0 + if ctr_page.selectedIndex == 0 then + self:GetRankData(0) + elseif ctr_page.selectedIndex == 1 then + self:GetRoundData() + else + self:GetWinRankData(0) + end + end) + + self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0) + self.time_panel1 = TimeSettingPanel.new(self._view, self._view:GetChild("btndate1"), self._view:GetChild("btndate2"), -308, 0) +end + +function M:GetRankData(index) + ViewUtil.ShowModalWait() + local begin_time, end_time = self.time_panel:GetDate() + local pid = tonumber(self._view:GetChild("cb_play").value) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetMemberRank(self.group_id, pid, index, 6, begin_time, end_time, nil,function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取排名信息失败") + else + local ranks = res.Data.ranks + if #ranks == 0 then return end + for i = 1, #ranks do + self.rank_data[#self.rank_data + 1] = ranks[i] + end + self.lst_rank.numItems = #self.rank_data + self.zongren.text = "总人数:"..res.Data.allActiveNum + end + end) +end + +function M:GetWinRankData(index) + ViewUtil.ShowModalWait() + local begin_time, end_time = self.time_panel1:GetDate() + local pid = tonumber(self._view:GetChild("cb_play").value) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetMemberRank(self.group_id, pid, index, 6, begin_time, end_time, 1,function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取总输赢排名信息失败") + else + local ranks = res.Data.ranks + if #ranks == 0 then return end + for i = 1, #ranks do + self.win_data[#self.win_data + 1] = ranks[i] + end + -- table.sort(self.win_data,function (a,b) + -- return a.win > b.win + -- end) + self.lst_winrank.numItems = #self.win_data + self.zongren.text = "总人数:"..res.Data.allActiveNum + end + end) +end + +function M:OnRenderRankItem(index, obj) + local tem = index + 1 + local data = self.rank_data[tem] + if tem < 4 then + obj:GetController("order").selectedIndex = tem + else + obj:GetController("order").selectedIndex = 0 + obj:GetChild("tex_order").text = tem + end + local group = DataManager.groups:get(self.group_id) + local str_nick = ViewUtil.stringEllipsis(data.nick) + if group.lev ~= 3 then + obj:GetController("mng").selectedIndex = 1 + str_nick = string.format("%s\r%s%s", str_nick, "id:", data.uid) + end + obj:GetChild("tex_name").text = str_nick + obj:GetChild("tex_score").text = d2ad(data.score) + obj:GetChild("tex_round").text = data.round +end + +function M:OnRenderWinRankItem(index, obj) + local tem = index + 1 + local data = self.win_data[tem] + if tem < 4 then + obj:GetController("order").selectedIndex = tem + else + obj:GetController("order").selectedIndex = 0 + obj:GetChild("tex_order").text = tem + end + local group = DataManager.groups:get(self.group_id) + local str_nick = ViewUtil.stringEllipsis(data.nick) + if group.lev ~= 3 then + obj:GetController("mng").selectedIndex = 1 + str_nick = string.format("%s\r%s%s", str_nick, "id:", data.uid) + end + obj:GetChild("tex_name").text = str_nick + obj:GetChild("tex_score").text = d2ad(data.score) + obj:GetChild("tex_round").text = data.round +end + +function M:GetRoundData() + ViewUtil.ShowModalWait() + local pid = tonumber(self._view:GetChild("cb_play").value) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetRoundStat(self.group_id, pid, function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取排名信息失败") + else + self.round_data = res.Data.rounds + self.lst_round.numItems = #self.round_data + end + end) +end + +function M:OnRenderRoundItem(index, obj) + local tem = #self.round_data - index + local data = self.round_data[tem] + obj:GetChild("tex_time").text = os.date("%Y-%m-%d", data.time) + obj:GetChild("tex_round").text = data.num +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngRoomStatView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngRoomStatView.lua new file mode 100644 index 00000000..deda722d --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngRoomStatView.lua @@ -0,0 +1,396 @@ +-- 开桌统计 +local GroupMngRoomStatView = {} + +local M = GroupMngRoomStatView + +function GroupMngRoomStatView.new(gid) + local self = M + self.class = "GroupMngRoomStatView" + self.group_id = gid + self:InitView() + return self +end + +function M:initData() + self.lst_record.numItems = 0 + self.record_data = {} + self.lst_player_record.numItems = 0 + self.player_record_data = {} + self.qid = 0 + self._view:GetController("search").selectedIndex = 0 + self._view:GetController("record").selectedIndex = 0 + self._view:GetChild("tex_id").text = "" + self:GetRecordData(0, self.qid) +end + +function M:InitView() + self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupStat") + + self.record_data = {} --回放数据 + self.player_record_data = {} --指定玩家的回放数据 + self.qid = 0 --查询玩家id + + self.lst_record_find = self._view:GetChild("lst_record_find") + self.lst_record_find:SetVirtual() + self.lst_record_find.itemRenderer = function(index, obj) + self:OnRenderRecordItem1(index, obj) + end + + self.lst_record = self._view:GetChild("lst_record") + self.lst_record:SetVirtual() + self.lst_record.itemRenderer = function(index, obj) + self:OnRenderRecordItem(index, obj) + end + self.lst_record.scrollPane.onPullUpRelease:Set(function() + self:GetRecordData(self.lst_record.numItems) + end) + + self.lst_player_record = self._view:GetChild("lst_player_record") + self.lst_player_record:SetVirtual() + self.lst_player_record.itemRenderer = function(index, obj) + self:OnRenderPlayerRecordItem(index, obj) + end + self.lst_player_record.scrollPane.onPullUpRelease:Set(function() + self:GetRecordData(self.lst_player_record.numItems, self.qid) + + end) + + self._view:GetChild("btn_search").onClick:Set(function() + local qid = self._view:GetChild("tex_id").text + local rtype = self._view:GetChild("cb_type").value + if (qid == "" and rtype == "1") or (string.len(qid) < 6 and rtype == "2") then + ViewUtil.ErrorTip(nil, "请输入正确的ID") + return + end + if rtype == "1" then + self.lst_player_record.numItems = 0 + self.player_record_data = {} + self.qid = tonumber(qid) + self:GetRecordData(0, self.qid) + else + self:GetRecordByRoomid() + end + end) + self._view:GetChild("btn_search_back").onClick:Set(function() + self.qid = 0 + self.player_record_data = {} + self.lst_player_record.numItems = 0 + self.isFindCode=false + + end) +end + +function M:GetRecordData(index, qid) + qid = qid or 0 + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetGroupRecord(self.group_id, GetPlatform(), qid, index, 6, function(res) + printlog("ccccccccccccccccccccccccccccccccccccc") + pt(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取回放数据失败") + else + local ctr_search = self._view:GetController("search") + local records = res.Data.records + if qid == 0 then + for i = 1, #records do + self.record_data[#self.record_data + 1] = records[i] + end + self.lst_record.numItems = #self.record_data + if ctr_search.selectedIndex ~= 0 then + ctr_search.selectedIndex = 0 + end + else + for i = 1, #records do + self.player_record_data[#self.player_record_data + 1] = records[i] + end + self.lst_player_record.numItems = #self.player_record_data + ctr_search.selectedIndex = 2 + end + end + end) +end + +function M:FillRecordItem(data, obj) + local game_id = data.game_id + local room_id = data.room_id + local create_time = data.create_time + local room_type_str = data.game_info.name + local time =tonumber(create_time) + local room_time_str = os.date("%Y-%m-%d %H:%M:%S", time) + local totalScore = json.decode(data.totalScore) + local hpOnOff = data.hpOnOff + local hpType = data.game_info.hpType + local player_list = {} + for i = 1, #totalScore do + local p = totalScore[i] + player_list[i] = {} + player_list[i].id = p.accId + local score = p.score + if hpOnOff == 1 and hpType > 1 then + score = score / 10 + end + player_list[i].score = score + player_list[i].house = 0 + player_list[i].nick = p.nick + end + local play_name = DataManager.groups:get(self.group_id):getPlayName(data.groupPid) + + obj:GetChild("tex_time").text = room_time_str + obj:GetChild("tex_roomid").text = room_id + obj:GetChild("tex_times").text = d2ad(data.hp_times).."倍" + obj:GetChild("tex_game").text = play_name + local lst_total = obj:GetChild("lst_total") + lst_total:RemoveChildrenToPool() + local ids = {} + for j=1,#totalScore do + local titem = lst_total:AddItemFromPool() + local trdata = totalScore[j] + titem:GetChild("tex_name").text = ViewUtil.stringEllipsis(trdata.nick) + titem:GetChild("tex_id").text = trdata.accId and ("ID:"..trdata.accId) or "" + + table.insert( ids,trdata.accId ) + local score = trdata.score + if trdata.hp == nil then + if hpOnOff == 1 and hpType > 1 then + score = score / 10 + end + else + score = d2ad(trdata.hp) + end + + titem:GetChild("tex_score").text = score + + if score >= 0 then + titem:GetController("num_color").selectedIndex = 0 + else + titem:GetController("num_color").selectedIndex = 1 + end + end + + if #totalScore >= 6 then + obj:GetController("person_num").selectedIndex = 1 + else + obj:GetController("person_num").selectedIndex = 0 + end + + obj:GetChild("btn_screenshot").onClick:Set(function() + self:OnShareScreenShot(room_id, room_type_str, room_time_str, totalScore, hpOnOff, hpType) + end) + + obj:GetChild("btn_share").onClick:Set(function() + ShareChatRoom(room_id, tostring(os.time()), data.round, room_type_str, self.group_id, player_list) + end) + obj.onClick:Set(function() + self:OnShowRecordInfo(data,ids) + end) +end + +function M:OnRenderRecordItem(index, obj) + local data = self.record_data[index + 1] + self:FillRecordItem(data, obj) +end + +function M:OnRenderRecordItem1(index, obj) + local data=self.tempRec[index+1] + self:FillRecordItem(data, obj) +end + +function M:OnRenderPlayerRecordItem(index, obj) + local data = self.player_record_data[index + 1] + self:FillRecordItem(data, obj) +end + + +function M:GetRecordByRoomid() + local qid = self._view:GetChild("tex_id").text + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetRecordByRoomid(self.group_id, qid, GetPlatform(), function(res) + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取回放数据失败") + else + if not res.Data.is_rec then + ViewUtil.ErrorTip(nil, "没有找到回放") + return + end + self.tempRec=res.Data.rec + self.lst_record_find.numItems = #res.Data.rec + + self._view:GetController("search").selectedIndex = 1 + end + end) +end + +function M:OnShareScreenShot(room_id, room_type_str, room_time_str, totalScore, hpOnOff, hpType) + ViewUtil.ShowModalWait(self._view, "正在分享...") + UIPackage.AddPackage("base/rank/ui/Rank") + local result_view = UIPackage.CreateObjectFromURL("ui://Rank/ResultView") + result_view.visible = false + self._view:AddChild(result_view) + result_view.x = -308 + result_view.y = -47 + result_view:GetChild("tex_roomnum").text = "房间号:" .. room_id .. " " .. room_type_str + result_view:GetChild("tex_data").text = room_time_str + result_view:GetChild("btn_confirm").onClick:Set(function() result_view:Dispose() end) + local lst_p = result_view:GetChild("list_result") + local load_head_num = #totalScore + for j = 1, #totalScore do + local p = totalScore[j] + local item = lst_p:AddItemFromPool() + item:GetChild("name").text = p.nick + local score = p.score + if hpOnOff == 1 and hpType > 1 then + score = score / 10 + end + item:GetChild("score").text = score + if score < 0 then item:GetController("di").selectedIndex = 1 end + if p.portrait and p.portrait ~= "" then + ImageLoad.Load(p.portrait, item:GetChild("n9")._iconObject, self.class, function( ... ) + load_head_num = load_head_num - 1 + end) + else + load_head_num = load_head_num - 1 + end + end + coroutine.start(function ( ... ) + local left_time = 4 + while (true) do + if load_head_num == 0 or left_time == 0 then + result_view.visible = true + coroutine.wait(0.2) + ShareScreenShotWithOption(function() + result_view:Dispose() + end) + ViewUtil.CloseModalWait() + break + end + coroutine.wait(1) + left_time = left_time - 1 + end + end) +end + +function M:OnShowRecordInfo(rdata,ids) + local ctr_record = self._view:GetController("record") + ctr_record.selectedIndex = 1 + + local lst_recordInfo = self._view:GetChild("lst_recordInfo") + lst_recordInfo:RemoveChildrenToPool() + -- lst_recordInfo.scrollPane.currentPageX = 0 + local round_count = tonumber(rdata.round) + local game_id = rdata.game_info.game_id + local playback_id = rdata.military_id + local hpOnOff = rdata.hpOnOff + local hpType = rdata.game_info.hpType + local play_name = DataManager.groups:get(self.group_id):getPlayName(rdata.groupPid) + for i = 1,round_count do + local item = lst_recordInfo:AddItemFromPool() + item:GetChild("tex_num").text = tostring(i) + item:GetChild("tex_game").text = play_name + item:GetChild("tex_times").text = d2ad(rdata.hp_times).."倍" + item:GetChild("tex_roomid").text = rdata.room_id + local round_score_str = rdata["round_"..i] + local round_score_item = json.decode(round_score_str) + local lst_total = item:GetChild("lst_total") + lst_total:RemoveChildrenToPool() + for k=1,#round_score_item do + local titem = lst_total:AddItemFromPool() + local trdata = round_score_item[k] + titem:GetChild("tex_name").text = ViewUtil.stringEllipsis(trdata.nick) + titem:GetChild("tex_id").text = "ID:".. ids[k] + local score = trdata.score + if trdata.hp == nil then + if hpOnOff == 1 and hpType > 1 then + score = score / 10 + end + else + score = d2ad(trdata.hp) + end + + titem:GetChild("tex_score").text = score + end + + if #round_score_item >= 6 then + item:GetController("person_num").selectedIndex = 1 + else + item:GetController("person_num").selectedIndex = 0 + end + + local btn_play =item:GetChild("btn_play") + btn_play.onClick:Set(function() + local group = DataManager.groups:get(self.group_id) + if DataManager.SelfUser.playback[playback_id] ~= nil and DataManager.SelfUser.playback[playback_id][i] ~= nil then + local room = ExtendManager.GetExtendConfig(game_id):NewRoom() + DataManager.CurrenRoom = room + room.lev = group.lev + room.game_id = game_id + local extend = ExtendManager.GetExtendConfig(game_id) + extend:FillPlayBackData(DataManager.SelfUser.playback[playback_id][i]) + if not room.self_player then + room.self_player = room:GetPlayerBySeat(1) + end + local main = self:GenaratePlayBack(ViewManager.View_PlayBack, game_id) + main._currentId = playback_id + main._currentRound = i + main._totalRound = tonumber(rdata.round) + main:FillRoomData(DataManager.SelfUser.playback[playback_id][i]) + else + ViewUtil.ShowModalWait(self._view) + local _data = {} + _data["military_id"] = playback_id + _data["round"] = tostring(i) + local loddyCtr1 = ControllerManager.GetController(LoddyController) + loddyCtr1:RequestPlayBack(_data,function(code,data) + ViewUtil.CloseModalWait() + if code == 0 then + if DataManager.SelfUser.playback[playback_id] ~= nil then + DataManager.SelfUser.playback[playback_id][i] = data + else + local playback_data = {} + playback_data[i] = data + DataManager.SelfUser.playback[playback_id] = playback_data + end + + local main = self:GenaratePlayBack(ViewManager.View_PlayBack, game_id) + main._currentId = playback_id + main._currentRound = i + main._totalRound = tonumber(rdata.round) + main:FillRoomData(data) + main._room.lev = group.lev + elseif code == 25 then + ViewUtil.ErrorTip(-1, "回放未找到!") + -- btn_play_back.grayed = true + end + end, rdata.game_info) + end + end) + end +end + +function M:GenaratePlayBack(id, game_id, ...) + local tem =nil + local dview_class = nil + if not dview_class then + local exconfig = ExtendManager.GetExtendConfig(game_id) + dview_class = exconfig:GetView(id) + end + if not dview_class then + return + end + local arg = {...} + tem = dview_class.new(...) + tem.Id = id + tem:Show() + return tem +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngXingYunStatView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngXingYunStatView.lua new file mode 100644 index 00000000..54cb956c --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngXingYunStatView.lua @@ -0,0 +1,131 @@ +local TimeSettingPanel = import(".TimeSettingPanel") +local GroupPartnerStatMember = import(".GroupPartnerStatMember") +local GroupPartnerStatPlay = import(".GroupPartnerStatPlay") +local GroupNumberInputView = import(".GroupNumberInputView") +-- 开桌统计 +local GroupMngXingYunStatView = {} + +local M = GroupMngXingYunStatView + +function GroupMngXingYunStatView.new(gid) + local self = M + self.class = "GroupMngXingYunStatView" + self.group_id = gid + self:InitView() + return self +end + +function M:initData() + self.lst_record.numItems = 0 + self.record_data = {} + + local now_time = os.date("*t",now) + local today = os.time({year=now_time.year, month=now_time.month, day=now_time.day, hour=0,min=0,sec=0}) + self.begin_time = today + self.end_time = today + 86400 + self:GetRecordData(0) + +end + + + +function M:InitView() + self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupXingYunStat") + + local group = DataManager.groups:get(self.group_id) + -- if group.lev ~= 3 then + -- self._view:GetController("mng").selectedIndex = 1 + -- end + + local lst_mgr_index = self._view:GetChild("lst_mgr_index") + + + self.lst_record = self._view:GetChild("lst_record") + self.lst_record:SetVirtual() + self.lst_record.itemRenderer = function(index, obj) + self:OnRenderRecordItem(index, obj) + end + self.lst_record.scrollPane.onPullUpRelease:Set(function() + self:GetRecordData(self.lst_record.numItems) + end) + + self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0, nil, true) + + local ctr_page = self._view:GetController("type") + ctr_page.onChanged:Set(function() + self.record_data = {} + self.lst_record.numItems = 0 + if ctr_page.selectedIndex == 0 then + local now_time = os.date("*t",now) + local today = os.time({year=now_time.year, month=now_time.month, day=now_time.day, hour=0,min=0,sec=0}) + self.begin_time = today + self.end_time = today + 86400 + else + local now_time = os.date("*t",now) + local today = os.time({year=now_time.year, month=now_time.month, day=now_time.day, hour=0,min=0,sec=0}) + self.begin_time = today - 86400 * ctr_page.selectedIndex + self.end_time = today - 86400 * (ctr_page.selectedIndex - 1) + end + self:GetRecordData(0) + end) + + self._view:GetChild("btn_search").onClick:Set(function() + self.record_data = {} + self.lst_record.numItems = 0 + + self.begin_time, self.end_time = self.time_panel:GetDate() + self:GetRecordData(0) + end) + + self.totalwin = self._view:GetChild("tex_alltotal") + +end + + +function M:GetRecordData(index) + + ViewUtil.ShowModalWait() + + local time_type = self._view:GetController("type").selectedIndex + if self.begin_time ~= nil and self.end_time ~= nil then + time_type = 0 + end + + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetXingYunStat(self.group_id, index, 6, time_type,self.begin_time,self.end_time,function(res) + + ViewUtil.CloseModalWait() + + if res.ReturnCode == 0 then + + local members = res.Data.members + + self.totalwin.text = d2ad(res.Data.all_total_win) + for i = 1, #members do + self.record_data[#self.record_data + 1] = members[i] + end + self.lst_record.numItems = #self.record_data + end + end) +end + + +function M:FillRecordItem(data, obj) + + local group = DataManager.groups:get(self.group_id) + + obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(data.nick) + obj:GetChild("tex_id").text = "ID:" .. data.uid + obj:GetChild("tex_round_total").text = data.total_round + obj:GetChild("tex_total").text = d2ad(data.total_win) + obj:GetChild("tex_round_youxiao").text = data.valid_round / 100 + +end + +function M:OnRenderRecordItem(index, obj) + local data = self.record_data[index + 1] + self:FillRecordItem(data, obj) +end + + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngZuanShiStatView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngZuanShiStatView.lua new file mode 100644 index 00000000..c83fa0a2 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupMngZuanShiStatView.lua @@ -0,0 +1,204 @@ +local TimeSettingPanel = import(".TimeSettingPanel") +local GroupPartnerZuanShiMember = import(".GroupPartnerZuanShiMember") + + +-- 开桌统计 +local GroupMngZuanShiStatView = {} + +local M = GroupMngZuanShiStatView + +function GroupMngZuanShiStatView.new(gid) + local self = M + self.class = "GroupMngZuanShiStatView" + self.group_id = gid + self:InitView() + return self +end + +function M:initData() + self.lst_record.numItems = 0 + self.record_data = {} + + local now_time = os.date("*t",now) + local today = os.time({year=now_time.year, month=now_time.month, day=now_time.day, hour=0,min=0,sec=0}) + self.begin_time = today + self.end_time = today + 86400 + self:GetRecordData(0) + +end + + + +function M:InitView() + self._view = UIPackage.CreateObjectFromURL("ui://NewGroup/View_GroupZuanShi") + + local group = DataManager.groups:get(self.group_id) + -- if group.lev ~= 3 then + -- self._view:GetController("mng").selectedIndex = 1 + -- end + + local lst_mgr_index = self._view:GetChild("lst_mgr_index") + -- lst_mgr_index.visible = false + -- if group.lev == 1 then + -- lst_mgr_index.visible = true + -- end + + self.lst_record = self._view:GetChild("lst_record") + self.lst_record:SetVirtual() + self.lst_record.itemRenderer = function(index, obj) + self:OnRenderRecordItem(index, obj) + end + self.lst_record.scrollPane.onPullUpRelease:Set(function() + self:GetRecordData(self.lst_record.numItems) + end) + + self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0, nil, true) + + local ctr_page = self._view:GetController("type") + ctr_page.onChanged:Set(function() + self.record_data = {} + self.lst_record.numItems = 0 + if ctr_page.selectedIndex == 0 then + local now_time = os.date("*t",now) + local today = os.time({year=now_time.year, month=now_time.month, day=now_time.day, hour=0,min=0,sec=0}) + self.begin_time = today + self.end_time = today + 86400 + else + local now_time = os.date("*t",now) + local today = os.time({year=now_time.year, month=now_time.month, day=now_time.day, hour=0,min=0,sec=0}) + self.begin_time = today - 86400 * ctr_page.selectedIndex + self.end_time = today - 86400 * (ctr_page.selectedIndex - 1) + end + self:GetRecordData(0) + end) + + + -- 搜索玩家 + local ctr_search = self._view:GetController('search') + self._view:GetChild('btn_search').onClick:Set( + function() + --printlog("aaaaaaaaaa1111111111111111111111111111111111111111111111") + ViewUtil.ShowModalWait(nil) + local text = self._view:GetChild('tex_id').text + local qid, qnick + if text == "" then + ViewUtil.CloseModalWait() + ViewUtil.ErrorTip(nil, '输入不能为空') + return + end + qid = tonumber(text) or 0 + qnick = text + local time_type = self._view:GetController("type").selectedIndex + if self.begin_time ~= nil and self.end_time ~= nil then + time_type = 0 + end + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_FindZuanShiStat( + self.group_id, + qid,0, 6, time_type,self.begin_time,self.end_time, + function(res) + -- printlog("aaaaaaaaaaaaaaaa22222222222222222222222222222") + -- pt(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, '找不到成员') + else + self._view:GetChild('tex_id').text = '' + ctr_search.selectedIndex = 1 + local item_result = self._view:GetChild('lst_member_find') + item_result:RemoveChildrenToPool() + + for j = 1, #res.Data.members do + local tem = item_result:AddItemFromPool() + self:FillRecordItem(res.Data.members[j],tem) + end + end + end + ) + end + ) + + local btn_back = self._view:GetChild('btn_back') + btn_back.onClick:Set( + function() + self.lst_record.numItems = #self.record_data + end + ) +end + + +function M:GetRecordData(index) + + ViewUtil.ShowModalWait() + + local time_type = self._view:GetController("type").selectedIndex + if self.begin_time ~= nil and self.end_time ~= nil then + time_type = 0 + end + + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetZuanShiStat(self.group_id, index, 6, time_type,self.begin_time,self.end_time,function(res) + + ViewUtil.CloseModalWait() + + if res.ReturnCode == 0 then + + local members = res.Data.members + --printlog("aaaaaaaaaaaaaacccccccccccccccccccccccccccccccc") + --pt(res) + for i = 1, #members do + self.record_data[#self.record_data + 1] = members[i] + end + self.lst_record.numItems = #self.record_data + local single_total_count = self._view:GetChild("single_total_count") + single_total_count.text = res.Data.all_single_diamo_cost / 100 + local other_total_count = self._view:GetChild("other_total_count") + other_total_count.text = res.Data.all_other_diamo_cost / 100 + end + end) +end + +-- 显示奖励 +local function __showRewardsValue(rtype, cur_value, max_value, mng) + local str = "" + if not mng then + str = string.format("%s%%/%s%%", cur_value, max_value) + else + str = string.format("%s%%", cur_value) + end + return str +end + +function M:FillRecordItem(data, obj) + + local group = DataManager.groups:get(self.group_id) + + obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(data.nick).."("..data.total..")" + obj:GetChild("tex_id").text = "ID:" .. data.uid + + + + obj:GetChild("tex_round_valid").text = data.single_diamo_cost / 100 + obj:GetChild("tex_round_total").text = data.other_diamo_cost / 100 + obj:GetChild("tex_total").text = data.single_diamo_cost / 100 + data.other_diamo_cost / 100 + + local btn_detail = obj:GetChild("btn_detail") + btn_detail.onClick:Set(function() + local time_type = self._view:GetController("type").selectedIndex + --printlog("ccccccccccwwwwwwwwwwwwwwwwwwwwwwwwwwww ",self.begin_time," ",self.end_time) + local gniv = GroupPartnerZuanShiMember.new(self.group_id,data.uid, 0,self.begin_time,self.end_time) + gniv:Show() + end) + +end + +function M:OnRenderRecordItem(index, obj) + local data = self.record_data[index + 1] + self:FillRecordItem(data, obj) +end + + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupNumberInputView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupNumberInputView.lua new file mode 100644 index 00000000..d82ffd6a --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupNumberInputView.lua @@ -0,0 +1,118 @@ +-- 数字输入界面 +local GroupNumberInputView = {} + +local M = GroupNumberInputView +local KEY_DEL = "del" +local KEY_CLEAR = "c" + +local InputType = +{ + -- 普通输入框 + Default = 0, + -- 增加体力值 + FagAdd = 1, + -- 减少体力值 + FagMinus = 2, + -- 体力值抽成,有小数点 + FagDeduct = 3, + -- 其他传入的组件 + Other = 4, +} + +function GroupNumberInputView.new(blur_view,callback,itype,fag,com) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupNumberInputView" + self._currenIndex = 0 + self._close_destroy = true + self._blur_view = blur_view + self._callback = callback + itype = itype or InputType.Default + local url = "ui://NewGroup/Win_FagInput" .. itype + if com then url = com end + self._str_len_limit = itype == InputType.FagDeduct and 8 or 6 + self._type = itype + self._fag = fag + self:init(url) + return self +end + +function M:init(url) + BaseWindow.init(self,url) + + self.tex_num = self._view:GetChild("tex_num") + self:ClearNumTex() + + local cnt = self._view.numChildren - 1 + + for i = 0 , 10 do + local obj = self._view:GetChild("btn_"..i) + if obj then + obj.onClick:Set(handler(self , self.OnNumButtonAction)) + end + i = i + 1 + end + local btn_ok = self._view:GetChild("btn_ok") + btn_ok.onClick:Set(function() + if self._currenIndex <1 then + return + end + self:Destroy() + if self._callback then + self._callback(tonumber(self._texnum_str)) + end + end) + local btn_del = self._view:GetChild("btn_del") + btn_del.onClick:Set(handler(self , self.OnNumButtonAction)) + local btn_c = self._view:GetChild("btn_c") + if btn_c then btn_c.onClick:Set(handler(self, self.OnNumButtonAction)) end +end + +function M:OnNumButtonAction(context) + local typer = string.sub(context.sender.name ,5) + if typer == KEY_DEL then + if (self._currenIndex > 0) then + self._currenIndex = self._currenIndex - 1 + self._texnum_str = string.sub(self._texnum_str,0,self._currenIndex) + self.tex_num.text = self._texnum_str + end + elseif typer == KEY_CLEAR then + -- local msg = "你确定要减少" .. self._fag .. "体力值吗?" + -- local _curren_msg = MsgWindow.new(self._view, msg, MsgWindow.MsgMode.OkAndCancel,"ui://NewGroup/MessageBox") + -- _curren_msg.onOk:Add(function() + -- self._callback(self._fag) + -- self:Destroy() + -- end) + -- _curren_msg:Show() + self._currenIndex = string.len(self._fag) + self._texnum_str = self._fag + self.tex_num.text = self._texnum_str + else + -- 限制只能输入3位小数 + if self._type == 3 then + local _, i = string.find(self._texnum_str, '%.') + if i then + if context.sender.title == "." then + return + end + if self._currenIndex - i == 3 then + return + end + end + end + if (self._currenIndex < self._str_len_limit) then + self._currenIndex = self._currenIndex + 1 + self._texnum_str = self._texnum_str .. context.sender.title + self.tex_num.text = self._texnum_str + + end + end +end + +function M:ClearNumTex() + self._texnum_str = "" + self._currenIndex = 0 + self.tex_num.text = self._texnum_str +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerBanPlaysView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerBanPlaysView.lua new file mode 100644 index 00000000..769cb833 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerBanPlaysView.lua @@ -0,0 +1,84 @@ +-- 合伙人玩法奖励 + +local GroupPartnerBanPlaysView = {} + +local M = GroupPartnerBanPlaysView + +function GroupPartnerBanPlaysView.new(group_id,uid) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupPartnerBanPlaysView" + self._close_destroy = true + self.group_id = group_id + self.uid = uid + self.allplays_data = {} + self:initView() + return self +end + +function M:initView(url) + BaseWindow.init(self, "ui://NewGroup/Win_PartnerBanPlays") + + self.lst_allplays = self._view:GetChild("lst_allplays") + self.lst_allplays:SetVirtual() + self.lst_allplays.itemRenderer = function(index, obj) + + self:OnRenderAllPlaysItem(index, obj) + end + self:GetBanPlaysData() +end + +-- 获取奖励设置数据 +function M:GetBanPlaysData() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetAllplays(self.group_id,self.uid, function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取所有玩法失败") + else + local allplays = res.Data.allplays + for i=1,#allplays do + self.allplays_data[i] = allplays[i] + end + self.lst_allplays.numItems = #self.allplays_data + end + end) +end + + + +-- 填充奖励设置对象 +function M:OnRenderAllPlaysItem(index, obj) + local data = self.allplays_data[index + 1] + local group = DataManager.groups:get(self.group_id) + + local play_name = group:getPlayName(data.pid) + obj:GetChild("tex_name").text = data.playname + + obj:GetChild("gxbtn").selected = data.ban==1 + + obj:GetChild("gxbtn").onClick:Set(function() + local bans = data.ban + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_SetBanPlayid(self.group_id,data.pid,data.ban,self.uid, function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "设置玩法失败") + else + local banoks = res.Data.allplays + obj:GetChild("gxbtn").selected = banoks[1].banok==1 + self:GetBanPlaysData() + end + end) + end) + + +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerMemberListView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerMemberListView.lua new file mode 100644 index 00000000..c055e892 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerMemberListView.lua @@ -0,0 +1,130 @@ +-- 合伙人成员列表 +local GroupNumberInputView = import(".GroupNumberInputView") + +local GroupPartnerMemberListView = {} + +local M = GroupPartnerMemberListView + +function GroupPartnerMemberListView.new(group_id, partner_id) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupPartnerMemberListView" + self._close_destroy = true + self._blur_view = blur_view + self.group_id = group_id + self.partner_id = {} + self.partner_id[1] = partner_id + self.top = 1 + self.member_data = {} + self:initView() + return self +end + +function M:initView(url) + BaseWindow.init(self, "ui://NewGroup/Win_PartnerMemberList") + -- 合伙人列表 + self.lst_member = self._view:GetChild("lst_member") + self.lst_member:SetVirtual() + self.lst_member.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + self.lst_member.scrollPane.onPullUpRelease:Set(function() + self:GetMemberData(self.lst_member.numItems) + end) + + local btn_back_pre = self._view:GetChild("btn_back_pre") + btn_back_pre.onClick:Set(function() + if self.top > 1 then + self.partner_id[self.top] = nil + self.top = self.top - 1 + end + + if self.top == 1 then + self._view:GetController("pre").selectedIndex = 0 + end + self:GetMemberData(0) + end) + -- 搜索按钮 + local btn_search = self._view:GetChild("btn_search") + local ctr_search = self._view:GetController("search") + btn_search.onClick:Set(function() + local gfiv = GroupNumberInputView.new(self._root_view,function(num) + self:GetMemberData(0, num, function(data) + if #data == 0 then + ViewUtil.ErrorTip(nil, "没有找到成员") + else + ctr_search.selectedIndex = 1 + self:FillItem(self._view:GetChild("item_result"), data[1]) + end + end) + end) + gfiv:Show() + end) + local btn_back = self._view:GetChild("btn_back") + btn_back.onClick:Set(function() + ctr_search.selectedIndex = 0 + end) + + -- 初始化数据 + self:GetMemberData(0) +end + +-- 获取合伙人成员数据 +function M:GetMemberData(index, quary_id, callback) + quary_id = quary_id or 0 + local group = DataManager.groups:get(self.group_id) + if index == 0 then + self.member_data = {} + end + ViewUtil.ShowModalWait(nil) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetPartnerMembers(self.group_id, self.partner_id[self.top], index, 8, quary_id, function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取合伙人成员列表失败") + else + local members = res.Data.members + if quary_id == 0 then + for i = 1, #members do + self.member_data[#self.member_data + 1] = members[i] + end + self.lst_member.numItems = #self.member_data + else + callback(members) + end + end + end) +end + + +-- 填充合伙人成员对象 +function M:FillItem(obj, data) + + obj:GetChild("tex_id").text = data.uid + obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(data.nick) + + obj:GetChild("btn_head").icon = "ui://Common/Head0" + ImageLoad.Load(data.portrait, obj:GetChild("btn_head")._iconObject, self.class) + + obj:GetChild("tex_last_total").text = data.round or "0" + + obj:GetChild("tex_status").text = data.online == 1 and "在线" or "离线" + + obj:GetChild("tex_join_time").text = os.date("%Y/%m/%d", data.join_time) + + obj:GetController("partner").selectedIndex = data.partnerLev > 0 and 1 or 0 + + obj:GetChild("btn_check_members").onClick:Set(function() + self.partner_id[#self.partner_id + 1] = data.uid + self.top = #self.partner_id + self._view:GetController("pre").selectedIndex = 1 + self:GetMemberData(0) + end) +end +-- 填充列表 +function M:OnRenderItem(index, obj) + local data = self.member_data[index + 1] + self:FillItem(obj, data) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerRewardsView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerRewardsView.lua new file mode 100644 index 00000000..54013f53 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerRewardsView.lua @@ -0,0 +1,284 @@ +-- 合伙人玩法奖励 +local GroupNumberInputView = import(".GroupNumberInputView") + +local GroupPartnerRewardsView = {} + +local M = GroupPartnerRewardsView + +function GroupPartnerRewardsView.new(group_id, partner_id, partner_lev) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupPartnerRewardsView" + self._close_destroy = true + self._blur_view = blur_view + self.group_id = group_id + self.partner_id = partner_id + self.partner_lev = partner_lev + self.rewards_data = {} + self.showxipai = 1 + self:initView() + return self +end + +function M:initView(url) + BaseWindow.init(self, "ui://NewGroup/Win_PartnerRewards") + + self.lst_rewards = self._view:GetChild("lst_rewards") + self.lst_rewards:SetVirtual() + self.lst_rewards.itemRenderer = function(index, obj) + self:OnRenderRewardsItem(index, obj) + end + self.fandianControl = self._view:GetController("fandian") + self:GetRewardsData() +end + +-- 获取奖励设置数据 +function M:GetRewardsData() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetRewards(self.group_id, self.partner_id, self.partner_lev, function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取合伙人奖励失败") + else + local rewards = res.Data.rewards + self.showxipai = res.Data.showxipai == true and 1 or 0 + --pt(res) + if rewards and #rewards == 0 then printlog("服务器未设置合伙人奖励===>>>") return end + --printlog("获取奖励===>>>",res.Data.rewards) + --pt(res.Data.rewards) + -- local rdata = self.rewards_data + -- for i = 1, #rewards do + -- rdata[#rdata + 1] = rewards[i] + -- end + for i=1,#rewards do + self.rewards_data[i] = rewards[i] + end + self.lst_rewards.numItems = #self.rewards_data + self.fandianControl.selectedIndex = self.showxipai + end + end) +end + +-- 显示奖励 +local function __showRewardsValue(rtype, cur_value, max_value, mng, value_type) + local str = "" + local tem = value_type == 1 and "%" or "" + if not mng then + if value_type == 2 then + str = string.format("%s%s/%s%s", d2ad(cur_value), tem, d2ad(max_value), tem) + else + str = string.format("%s%s/%s%s", cur_value, tem, max_value, tem) + end + else + if value_type == 2 then + str = string.format("%s%s", d2ad(cur_value), tem) + else + str = string.format("%s%s", cur_value, tem) + end + end + return str +end + +-- 填充奖励设置对象 +function M:OnRenderRewardsItem(index, obj) + local data = self.rewards_data[index + 1] + local group = DataManager.groups:get(self.group_id) + obj:GetController("fandian").selectedIndex = self.showxipai + --printlog("aaaaaaaaaaaaaaaaaaaaa ",__showRewardsValue(data.xipai_rewardType, data.xipai_cur_value, data.xipai_max_value, group.lev < 3, data.xipai_rewardValueType or 1)) + obj:GetChild("tex_xipai").text = __showRewardsValue(data.xipai_rewardType, data.xipai_cur_value, data.xipai_max_value, group.lev < 3, data.xipai_rewardValueType or 1) + obj:GetChild("tex_rewards").text = __showRewardsValue(data.rewardType, data.cur_value, data.max_value, group.lev < 3, data.rewardValueType or 1) + obj:GetChild("tex_anchou").text = __showRewardsValue(data.anchou_rewardType, data.anchou_cur_value, data.anchou_max_value, group.lev < 3, data.anchou_rewardValueType or 1) + local play_name = group:getPlayName(data.pid) + obj:GetChild("tex_name").text = play_name + if data.rewardType == 3 or self.partner_id == DataManager.SelfUser.account_id then + obj:GetController("promote").selectedIndex = 1 + else + obj:GetController("promote").selectedIndex = 0 + end + local input_type = data.rewardValueType == 1 and 0 or 3 + obj:GetChild("btn_set").onClick:Set(function() + local gfiv = GroupNumberInputView.new(self._root_view,function(num) + local tem = num + if data.rewardValueType == 2 then + tem = ad2d(tem) + end + if tem > data.max_value then + ViewUtil.ErrorTip(nil, "输入值超过上限") + return + -- elseif tem < data.cur_value then + -- ViewUtil.ErrorTip(nil, "不能下调奖励") + -- return + end + + local fgCtr = ControllerManager.GetController(NewGroupController) + ViewUtil.ShowModalWait() + fgCtr:FG_SetRewards(self.group_id, data.pid, self.partner_lev, self.partner_id, false, tem, 0,function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "设置合伙人奖励失败") + else + data.cur_value = tem + obj:GetChild("tex_rewards").text = __showRewardsValue(data.rewardType, tem, data.max_value, group.lev < 3, data.rewardValueType or 1) + end + end) + end, input_type) + gfiv:Show() + end) + obj:GetChild("btn_set_all").onClick:Set(function() + + local msg_win = MsgWindow.new(nil, string.format("是否设定所有玩法奖励为%s%%?", data.cur_value), MsgWindow.MsgMode.OkAndCancel,nil,true) + + msg_win.onOk:Add(function( ... ) + local single = msg_win.btnCheck.selected and 1 or 0 + local fgCtr = ControllerManager.GetController(NewGroupController) + ViewUtil.ShowModalWait() + fgCtr:FG_SetRewards(self.group_id, data.pid, self.partner_lev, self.partner_id, true, data.cur_value,single ,function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "设置奖励失败") + else + ViewUtil.ShowBannerOnScreenCenter("设置奖励成功") + -- for i = 1, #self.rewards_data do + -- if self.rewards_data[i].rewardValueType == data.rewardValueType then + -- self.rewards_data[i].cur_value = data.cur_value + -- end + -- end + -- self.lst_rewards.numItems = #self.rewards_data + self:GetRewardsData() + end + end) + end) + msg_win:Show() + + end) + + + --xipai_reward + local input_type1 = data.xipai_rewardValueType == 1 and 0 or 3 + obj:GetChild("btn_set1").onClick:Set(function() + local gfiv = GroupNumberInputView.new(self._root_view,function(num) + local tem = num + if data.xipai_rewardValueType == 2 then + tem = ad2d(tem) + end + + if tem > data.xipai_max_value then + ViewUtil.ErrorTip(nil, "输入值超过上限") + return + -- elseif tem < data.cur_value then + -- ViewUtil.ErrorTip(nil, "不能下调奖励") + -- return + end + + local fgCtr = ControllerManager.GetController(NewGroupController) + ViewUtil.ShowModalWait() + fgCtr:FG_SetXIPAI(self.group_id, data.pid, self.partner_lev, self.partner_id, false, tem, 0,function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "设置洗牌奖励失败") + else + data.xipai_cur_value = tem + obj:GetChild("tex_xipai").text = __showRewardsValue(data.xipai_rewardType, tem, data.xipai_max_value, group.lev < 3, data.xipai_rewardValueType or 1) + end + end) + end, input_type1) + gfiv:Show() + end) + + obj:GetChild("btn_set_all1").onClick:Set(function() + local msg_win = MsgWindow.new(nil, string.format("是否设定所有洗牌奖励为%s%%?", data.xipai_cur_value), MsgWindow.MsgMode.OkAndCancel) + msg_win.onOk:Add(function( ... ) + local single = 0--msg_win.btnCheck.selected and 1 or 0 + + local fgCtr = ControllerManager.GetController(NewGroupController) + ViewUtil.ShowModalWait() + fgCtr:FG_SetXIPAI(self.group_id, data.pid, self.partner_lev, self.partner_id, true, data.xipai_cur_value,single,function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "设置洗牌失败") + else + ViewUtil.ShowBannerOnScreenCenter("设置洗牌成功") + -- printlog("ccccccccccccccccc11111111111111111111111") + -- pt(res) + -- for i = 1, #self.rewards_data do + -- if self.rewards_data[i].xipai_rewardValueType == data.xipai_rewardValueType then + -- self.rewards_data[i].xipai_cur_value = data.xipai_cur_value + -- end + -- end + -- self.lst_rewards.numItems = #self.rewards_data + self:GetRewardsData() + end + end) + end) + msg_win:Show() + + end) + + + --xipai_reward + local input_type2 = data.anchou_rewardValueType == 1 and 0 or 3 + obj:GetChild("btn_set2").onClick:Set(function() + local gfiv = GroupNumberInputView.new(self._root_view,function(num) + local tem = num + if data.anchou_rewardValueType == 2 then + tem = ad2d(tem) + end + + if tem > data.xipai_max_value then + ViewUtil.ErrorTip(nil, "输入值超过上限") + return + -- elseif tem < data.cur_value then + -- ViewUtil.ErrorTip(nil, "不能下调奖励") + -- return + end + printlog("jefe btn_set2") + local fgCtr = ControllerManager.GetController(NewGroupController) + ViewUtil.ShowModalWait() + fgCtr:FG_SetANCHOU(self.group_id, data.pid, self.partner_lev, self.partner_id, false, tem, 0,function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "设置管理奖励失败") + else + data.anchou_cur_value = tem + obj:GetChild("tex_anchou").text = __showRewardsValue(data.anchou_rewardType, tem, data.anchou_max_value, group.lev < 3, data.anchou_rewardValueType or 1) + end + end) + end, input_type2) + gfiv:Show() + end) + + obj:GetChild("btn_set_all2").onClick:Set(function() + local msg_win = MsgWindow.new(nil, string.format("是否设定所有管理奖励为%s%%?", data.anchou_cur_value), MsgWindow.MsgMode.OkAndCancel) + msg_win.onOk:Add(function( ... ) + local single = 0--msg_win.btnCheck.selected and 1 or 0 + + local fgCtr = ControllerManager.GetController(NewGroupController) + ViewUtil.ShowModalWait() + fgCtr:FG_SetANCHOU(self.group_id, data.pid, self.partner_lev, self.partner_id, true, data.anchou_cur_value,single,function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "设置管理失败") + else + ViewUtil.ShowBannerOnScreenCenter("设置管理成功") + -- printlog("ccccccccccccccccc11111111111111111111111") + -- pt(res) + -- for i = 1, #self.rewards_data do + -- if self.rewards_data[i].xipai_rewardValueType == data.xipai_rewardValueType then + -- self.rewards_data[i].xipai_cur_value = data.anchou_cur_value + -- end + -- end + -- self.lst_rewards.numItems = #self.rewards_data + self:GetRewardsData() + end + end) + end) + msg_win:Show() + + end) + +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerScoreMgnView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerScoreMgnView.lua new file mode 100644 index 00000000..961eead0 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerScoreMgnView.lua @@ -0,0 +1,128 @@ +local GroupNumberInputView = import(".GroupNumberInputView") + +-- 牌友圈成员体力值记录 +local GroupPartnerScoreMgnView = {} + +local M = GroupPartnerScoreMgnView + +function GroupPartnerScoreMgnView.new(group_id, member) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupPartnerScoreMgnView" + self._close_destroy = true + -- self._blur_view = blur_view + self.member = member + self.group_id = group_id + self.limit = 0 + self:init("ui://NewGroup/Win_PartnerLimit") + return self +end + + +-- 修改体力值 +local function __change_limit(gid, pid, otype, limit,callback) + + local gniv = GroupNumberInputView.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"更改失败!") + end + + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_SetTransHPLimit(gid, pid, value, function(res1) + ViewUtil.CloseModalWait() + + if (res1.ReturnCode == 0) then + callback(res1.Data) + else + ViewUtil.ErrorTip(res1.ReturnCode,"更改失败!") + end + end) + + end, 0, nil) + gniv:Show() +end + +function M:init(url) + + BaseWindow.init(self,url) + + local member = self.member + + local btn_close = self._view:GetChild("btn_close") + btn_close.onClick:Set(function() + self:Destroy() + end) + + self._view:GetChild("tex_id").text = "ID:" .. member.uid + + self._view:GetChild("tex_name").text = ViewUtil.stringEllipsis(member.nick) + + self._view:GetChild("tex_score").text = d2ad(member.hp) + + self._view:GetChild("btn_head").icon = "ui://Common/Head0" + ImageLoad.Load(member.portrait, self._view:GetChild("btn_head")._iconObject, self.class) + + self._view:GetChild("btn_fag_add").onClick:Set(function() + + __change_limit(self.group_id, member.uid, 1, self.limit,function(data) + self.limit = data.limit + self._view:GetChild("tex_fag").text = d2ad(self.limit) + end) + end) + + self._view:GetChild("btn_fag_minus").onClick:Set(function() + + + __change_limit(self.group_id, member.uid, -1, self.limit,function(data) + self.limit = data.limit + self._view:GetChild("tex_fag").text = d2ad(self.limit) + end) + end) + + self._view:GetChild("btn_manager").onClick:Set(function() + + + __change_limit(self.group_id, member.uid, 0, self.limit,function(data) + self.limit = data.limit + self._view:GetChild("tex_fag").text = d2ad(self.limit) + end) + end) + + self:GetTransHPLimit() +end + +function M:GetTransHPLimit() + + ViewUtil.ShowModalWait() + + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetTransHPLimit(self.group_id, self.member.uid, function(res) + + if self._is_destroy then + return + end + ViewUtil.CloseModalWait() + + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取数据失败") + self:Destroy() + else + self.limit = res.Data.limit + self._view:GetChild("tex_fag").text = d2ad(res.Data.limit) + end + end) +end + + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerStatMember.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerStatMember.lua new file mode 100644 index 00000000..af62fd13 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerStatMember.lua @@ -0,0 +1,255 @@ +local GroupPartnerStatPlay = import(".GroupPartnerStatPlay") +local GroupRecordView = require "Game/View/NewGroup/GroupRecordView" +local GroupPartnerStatMember = {} + +local M = GroupPartnerStatMember + +function GroupPartnerStatMember.new(group_id, uid, time_type, begin_time, end_time) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupPartnerStatMember" + self._close_destroy = true + self.group_id = group_id + self.uids = {} + self.uids[#self.uids + 1] = uid + self.top = #self.uids + self.time_type = time_type + self.begin_time = begin_time + self.end_time = end_time + self.check_member = false -- true的话是查询直属成员统计 + self._full = true + + self:init("ui://NewGroup/Win_PartnerStatMember") + return self +end + + +function M:init(url) + BaseWindow.init(self,url) + self.members_log = {} + self.lst_member = self._view:GetChild("lst_member") + self.lst_member:SetVirtual() + self.lst_member.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + self.lst_member.scrollPane.onPullUpRelease:Set(function() + self:getRewardsLog(self.lst_member.numItems) + end) + + self:getRewardsLog(0) + self._view:GetChild("btn_back").onClick:Set(function() + --printlog("aaaaaaaaaaaaaaa1111111111111111111") + self.check_member = false + if self.top > 1 then + self.uids[#self.uids] = nil + self.top = #self.uids + end + + if self.top == 1 then + self._view:GetController("pre").selectedIndex = 0 + end + + self.members_log = {} + self.lst_member.numItems = 0 + + self:getRewardsLog(0) + end) + + -- 搜索玩家 + local ctr_search = self._view:GetController('search') + self._view:GetChild('btn_search').onClick:Set( + function() + -- printlog("aaaaaaaaaa1111111111111111111111111111111111111111111111") + ViewUtil.ShowModalWait(nil) + local text = self._view:GetChild('tex_id').text + local qid, qnick + if text == "" then + ViewUtil.CloseModalWait() + ViewUtil.ErrorTip(nil, '输入不能为空') + return + end + qid = tonumber(text) or 0 + qnick = text + local time_type = 0 + + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_FindPartnerStatMember( + self.group_id,self.uids[#self.uids],0, + qid,0, 6, time_type,self.begin_time,self.end_time, + function(res) + -- printlog("aaaaaaaaaaaaaaaa22222222222222222222222222222") + -- pt(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, '找不到成员') + else + self._view:GetChild('tex_id').text = '' + ctr_search.selectedIndex = 1 + local item_result = self._view:GetChild('lst_member_find') + item_result:RemoveChildrenToPool() + + for j = 1, #res.Data.members do + local tem = item_result:AddItemFromPool() + self:FillRecordItem(res.Data.members[j],tem) + end + end + end + ) + end + ) + + local btn_back1 = self._view:GetChild('btn_back1') + btn_back1.onClick:Set( + function() + + end + ) +end + +function M:getRewardsLog(index) + + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + local func = self.check_member and fgCtr.FG_GetDirectMemberStat or fgCtr.FG_GetPartnerStatMember + func(fgCtr, self.group_id,self.uids[self.top],self.uids[1], index, 6, self.time_type, self.begin_time, self.end_time, function(res) + + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取数据失败") + else + local member_logs = res.Data.members + if #member_logs > 0 then + for i = 1, #member_logs do + table.insert(self.members_log, member_logs[i]) + end + self.lst_member.numItems = #self.members_log + end + end + end) +end + +-- function M:SortBy(data) +-- local first = {} +-- local second = {} +-- for i=1,#data do +-- if list_check(self.uids, data.uid) and not self.check_member then +-- table.insert(first,data[i]) +-- else +-- table.insert(second,data[i]) +-- end +-- end +-- end + +function M:OnRenderItem(index, obj) + local data = self.members_log[index + 1] + --pt(data) + obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(data.nick) + obj:GetChild("tex_id").text = "ID:" .. data.uid + obj:GetChild("tex_score").text = d2ad(data.total_win) + obj:GetChild("tex_total_round").text = ""..data.total_round + obj:GetChild("tex_perfect_round").text = "" + obj:GetChild("tex_valid_round").text = ""..d2ad(data.reward_tongji)--""..d2ad(data.reward_hp)--(data.valid_round / 100) + + local tex_reward = obj:GetChild("tex_reward") + tex_reward.text = d2ad(data.reward_tongji)+d2ad(data.total_win)--d2ad(data.reward_tongji) + + if data.partnerLev > 0 and data.uid ~= self.uids[self.top] then + obj:GetController("mng").selectedIndex = 1 + elseif list_check(self.uids, data.uid) and not self.check_member then + obj:GetController("mng").selectedIndex = 2 + else + obj:GetController("mng").selectedIndex = 0 + end + + local btn_detail = obj:GetChild("btn_detail") + btn_detail.onClick:Set(function() + self.uids[#self.uids + 1] = data.uid + self.top = #self.uids + + self._view:GetController("pre").selectedIndex = 1 + + self.members_log = {} + self.lst_member.numItems = 0 + + self:getRewardsLog(0) + end) + + local btn_member_detail = obj:GetChild("btn_member_detail") + btn_member_detail.onClick:Set(function() + self.uids[#self.uids + 1] = data.uid + self.top = #self.uids + + self._view:GetController("pre").selectedIndex = 1 + + self.members_log = {} + self.lst_member.numItems = 0 + self.check_member = true + self:getRewardsLog(0) + end) + + local btn_zhanji = obj:GetChild("btn_zhanji") + btn_zhanji.onClick:Set(function() + + local groupRecordView = GroupRecordView.new(self.group_id,data.uid,data.partnerLev > 0 and 1 or 0, self.begin_time, self.end_time, self.time_type) + groupRecordView:Show() + end) +end + +function M:FillRecordItem(data, obj) + --pt(data) + obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(data.nick) + obj:GetChild("tex_id").text = "ID:" .. data.uid + obj:GetChild("tex_score").text = d2ad(data.total_win) + obj:GetChild("tex_total_round").text = ""..data.total_round + obj:GetChild("tex_perfect_round").text = "" + obj:GetChild("tex_valid_round").text = ""..d2ad(data.reward_tongji)--""..d2ad(data.reward_hp)--(data.valid_round / 100) + + local tex_reward = obj:GetChild("tex_reward") + tex_reward.text = d2ad(data.reward_tongji)+d2ad(data.total_win)--d2ad(data.reward_tongji) + + if data.partnerLev > 0 and data.uid ~= self.uids[self.top] then + obj:GetController("mng").selectedIndex = 1 + elseif list_check(self.uids, data.uid) and not self.check_member then + obj:GetController("mng").selectedIndex = 2 + else + obj:GetController("mng").selectedIndex = 0 + end + + local btn_detail = obj:GetChild("btn_detail") + btn_detail.onClick:Set(function() + self.uids[#self.uids + 1] = data.uid + self.top = #self.uids + + self._view:GetController("pre").selectedIndex = 1 + + self.members_log = {} + self.lst_member.numItems = 0 + + self:getRewardsLog(0) + end) + + local btn_member_detail = obj:GetChild("btn_member_detail") + btn_member_detail.onClick:Set(function() + self.uids[#self.uids + 1] = data.uid + self.top = #self.uids + + self._view:GetController("pre").selectedIndex = 1 + + self.members_log = {} + self.lst_member.numItems = 0 + self.check_member = true + self:getRewardsLog(0) + end) + + local btn_zhanji = obj:GetChild("btn_zhanji") + btn_zhanji.onClick:Set(function() + + local groupRecordView = GroupRecordView.new(self.group_id,data.uid,data.partnerLev > 0 and 1 or 0, self.begin_time, self.end_time, self.time_type) + groupRecordView:Show() + end) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerStatPlay.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerStatPlay.lua new file mode 100644 index 00000000..8e2ac682 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerStatPlay.lua @@ -0,0 +1,108 @@ +local GroupPartnerStatPlay = {} + +local M = GroupPartnerStatPlay + +function GroupPartnerStatPlay.new(group_id, uid, partner_lev, parent_id, time_type, begin_time, end_time) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupPartnerStatPlay" + self._close_destroy = true + self.group_id = group_id + self.uid = uid + self.partner_lev = partner_lev + self.parent_id = parent_id + self.time_type = time_type + self.begin_time = begin_time + self.end_time = end_time + + self:init("ui://NewGroup/Win_PartnerStatPlay") + return self +end + +function M:init(url) + BaseWindow.init(self,url) + self.members_log = {} + self.lst_member = self._view:GetChild("lst_member") + self.lst_member:SetVirtual() + self.lst_member.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + + self.rewards_data = {} + self:getPartnerRewards(function() + self:getRewardsLog(0) + end) +end + +function M:getPartnerRewards(callback) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetRewards(self.group_id, self.uid, self.partner_lev, function(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取合伙人奖励失败") + else + local rewards = res.Data.rewards + local rdata = self.rewards_data + for i = 1, #rewards do + rdata[#rdata + 1] = rewards[i] + end + end + callback() + end) +end + +function M:getRewardsLog(index) + + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetPartnerStatPlay(self.group_id,self.uid, self.parent_id, index, 6, self.time_type, self.begin_time, self.end_time, function(res) + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取数据失败") + else + local member_logs = res.Data.members + if #member_logs > 0 then + for i = 1, #member_logs do + table.insert(self.members_log, member_logs[i]) + end + self.lst_member.numItems = #self.members_log + end + end + end) +end + + +function M:OnRenderItem(index, obj) + local data = self.members_log[index + 1] + + local play_name = DataManager.groups:get(self.group_id):getPlayName(data.pid) + obj:GetChild("tex_name").text = play_name + obj:GetChild("tex_round").text = ""..(data.round / 100) + obj:GetChild("tex_total_pump").text = ""..d2ad(data.pump) + obj:GetChild("tex_total").text = ""..d2ad(data.award) + + for i = 1, #self.rewards_data do + local rdata = self.rewards_data[i] + if rdata.pid == data.pid then + if rdata.rewardValueType == 2 then + local cur_value = d2ad(rdata.cur_value) + local max_value = d2ad(rdata.max_value) + if self.partner_lev < 3 then + obj:GetChild("tex_percent").text = cur_value + else + obj:GetChild("tex_percent").text = string.format("%s/%s", cur_value, max_value) + end + else + if self.partner_lev < 3 then + obj:GetChild("tex_percent").text = rdata.cur_value .."%" + else + obj:GetChild("tex_percent").text = string.format("%s%%/%s%%", rdata.cur_value, rdata.max_value) + end + end + end + end + +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerZuanShiMember.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerZuanShiMember.lua new file mode 100644 index 00000000..e648626f --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupPartnerZuanShiMember.lua @@ -0,0 +1,223 @@ +local GroupPartnerStatPlay = import(".GroupPartnerStatPlay") +local GroupPartnerZuanShiMember = {} + +local M = GroupPartnerZuanShiMember + +function GroupPartnerZuanShiMember.new(group_id, uid, time_type, begin_time, end_time) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupPartnerZuanShiMember" + self._close_destroy = true + self.group_id = group_id + self.uids = {} + self.uids[#self.uids + 1] = uid + self.top = #self.uids + self.time_type = time_type + self.begin_time = begin_time + self.end_time = end_time + self.check_member = false -- true的话是查询直属成员统计 + self._full = true + + self:init("ui://NewGroup/Win_PartnerZuanShiMember") + return self +end + + +function M:init(url) + BaseWindow.init(self,url) + self.members_log = {} + self.lst_member = self._view:GetChild("lst_member") + self.lst_member:SetVirtual() + self.lst_member.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + self.lst_member.scrollPane.onPullUpRelease:Set(function() + self:getRewardsLog(self.lst_member.numItems) + end) + + self:getRewardsLog(0) + self._view:GetChild("btn_back").onClick:Set(function() + --printlog("aaaaaaaaaaaaaaa1111111111111111111") + self.check_member = false + if self.top > 1 then + self.uids[#self.uids] = nil + self.top = #self.uids + end + + if self.top == 1 then + self._view:GetController("pre").selectedIndex = 0 + end + + self.members_log = {} + self.lst_member.numItems = 0 + + self:getRewardsLog(0) + end) + + -- 搜索玩家 + local ctr_search = self._view:GetController('search') + self._view:GetChild('btn_search').onClick:Set( + function() + -- printlog("aaaaaaaaaa1111111111111111111111111111111111111111111111") + ViewUtil.ShowModalWait(nil) + local text = self._view:GetChild('tex_id').text + local qid, qnick + if text == "" then + ViewUtil.CloseModalWait() + ViewUtil.ErrorTip(nil, '输入不能为空') + return + end + qid = tonumber(text) or 0 + qnick = text + local time_type = 0 + + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_FindPartnerZuanShiMember( + self.group_id,self.uids[#self.uids],0, + qid,0, 6, time_type,self.begin_time,self.end_time, + function(res) + -- printlog("aaaaaaaaaaaaaaaa22222222222222222222222222222") + -- pt(res) + ViewUtil.CloseModalWait() + if self._is_destroy then + return + end + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, '找不到成员') + else + self._view:GetChild('tex_id').text = '' + ctr_search.selectedIndex = 1 + local item_result = self._view:GetChild('lst_member_find') + item_result:RemoveChildrenToPool() + + for j = 1, #res.Data.members do + local tem = item_result:AddItemFromPool() + self:FillRecordItem(res.Data.members[j],tem) + end + end + end + ) + end + ) + + local btn_back1 = self._view:GetChild('btn_back1') + btn_back1.onClick:Set( + function() + + end + ) +end + +function M:getRewardsLog(index) + + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + local func = self.check_member and fgCtr.FG_GetDirectZuanShiStat or fgCtr.FG_GetPartnerZuanShiMember + func(fgCtr, self.group_id,self.uids[self.top],self.uids[1], index, 6, self.time_type, self.begin_time, self.end_time, function(res) + + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取数据失败") + else + local member_logs = res.Data.members + if #member_logs > 0 then + for i = 1, #member_logs do + table.insert(self.members_log, member_logs[i]) + end + self.lst_member.numItems = #self.members_log + end + end + end) +end + +function M:OnRenderItem(index, obj) + local data = self.members_log[index + 1] + --pt(data) + obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(data.nick) + obj:GetChild("tex_id").text = "ID:" .. data.uid + obj:GetChild("tex_round_valid").text = data.single_diamo_cost / 100 + obj:GetChild("tex_round_total").text = data.other_diamo_cost / 100 + obj:GetChild("tex_total").text = data.single_diamo_cost / 100 + data.other_diamo_cost / 100 + + + + if data.partnerLev > 0 and data.uid ~= self.uids[self.top] then + obj:GetController("mng").selectedIndex = 1 + elseif list_check(self.uids, data.uid) and not self.check_member then + obj:GetController("mng").selectedIndex = 2 + else + obj:GetController("mng").selectedIndex = 0 + end + + local btn_detail = obj:GetChild("btn_detail") + btn_detail.onClick:Set(function() + self.uids[#self.uids + 1] = data.uid + self.top = #self.uids + + self._view:GetController("pre").selectedIndex = 1 + + self.members_log = {} + self.lst_member.numItems = 0 + + self:getRewardsLog(0) + end) + + local btn_member_detail = obj:GetChild("btn_member_detail") + btn_member_detail.onClick:Set(function() + self.uids[#self.uids + 1] = data.uid + self.top = #self.uids + + self._view:GetController("pre").selectedIndex = 1 + + self.members_log = {} + self.lst_member.numItems = 0 + self.check_member = true + self:getRewardsLog(0) + end) +end + +function M:FillRecordItem(data, obj) + --pt(data) + obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(data.nick) + obj:GetChild("tex_id").text = "ID:" .. data.uid + obj:GetChild("tex_round_valid").text = data.single_diamo_cost / 100 + obj:GetChild("tex_round_total").text = data.other_diamo_cost / 100 + obj:GetChild("tex_total").text = data.single_diamo_cost / 100 + data.other_diamo_cost / 100 + + + if data.partnerLev > 0 and data.uid ~= self.uids[self.top] then + obj:GetController("mng").selectedIndex = 1 + elseif list_check(self.uids, data.uid) and not self.check_member then + obj:GetController("mng").selectedIndex = 2 + else + obj:GetController("mng").selectedIndex = 0 + end + + local btn_detail = obj:GetChild("btn_detail") + btn_detail.onClick:Set(function() + self.uids[#self.uids + 1] = data.uid + self.top = #self.uids + + self._view:GetController("pre").selectedIndex = 1 + + self.members_log = {} + self.lst_member.numItems = 0 + + self:getRewardsLog(0) + end) + + local btn_member_detail = obj:GetChild("btn_member_detail") + btn_member_detail.onClick:Set(function() + self.uids[#self.uids + 1] = data.uid + self.top = #self.uids + + self._view:GetController("pre").selectedIndex = 1 + + self.members_log = {} + self.lst_member.numItems = 0 + self.check_member = true + self:getRewardsLog(0) + end) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupRewardsLogView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupRewardsLogView.lua new file mode 100644 index 00000000..62ff39c8 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupRewardsLogView.lua @@ -0,0 +1,126 @@ +-- 能量包体力值详情 +local TimeSettingPanel = import(".TimeSettingPanel") + +local GroupRewardsLogView = {} + +local M = GroupRewardsLogView + +function GroupRewardsLogView.new(blur_view,group_id,uid) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupRewardsLogView" + self._close_destroy = true + self._blur_view = blur_view + self.group_id = group_id + self.uid = uid + self.lev = DataManager.groups:get(self.group_id).lev + self.m_index = 0 + self:init("ui://NewGroup/Win_RewardsFaglog") + return self +end + +function M:init(url) + BaseWindow.init(self,url) + self.rewards_log = {} + self.lst_log = self._view:GetChild("lst_log") + self.lst_log:SetVirtual() + self.lst_log.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + self.lst_log.scrollPane.onPullUpRelease:Set(function() + self:getRewardsLog(self.lst_log.numItems+self.m_index) + end) + + self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0) + self._view:GetChild("btn_search").onClick:Set(function() + self.rewards_log = {} + self:getRewardsLog(0) + end) + + self:getRewardsLog(0) +end + +function M:getRewardsLog(index) + local begin_time, end_time = self.time_panel:GetDate() + local fgCtr = ControllerManager.GetController(NewGroupController) + ViewUtil.ShowModalWait(nil) + local limit = 6 + if self.lev == 1 then + limit = 20 + end + fgCtr:FG_GetRewardsLog(self.group_id, index, limit, begin_time, end_time, self.uid, function(res) + + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取提取详情失败") + else + local reward_logs = res.Data.reward_logs + if #reward_logs > 0 then + -- for i = 1, #reward_logs do + -- table.insert(self.rewards_log, reward_logs[i]) + -- end + -- self.lst_log.numItems = #self.rewards_log + self:GuoLv(reward_logs) + end + end + end) +end + +function M:GuoLv(data) + pt(data) + local tempList={} + if self.lev == 1 then + + local m_data = {} + for i=1,#data do + if m_data[data[i].roomid] == nil then + m_data[data[i].roomid] = {} + end + table.insert(m_data[data[i].roomid],data[i]) + end + local m_otherdata = {} + for k, v in pairs(m_data) do + if #v == 2 then + if tonumber(v[1]["hp"]) + tonumber(v[2]["hp"]) ~=0 then + table.insert(m_otherdata,v[1]) + table.insert(m_otherdata,v[2]) + end + else + table.insert(m_otherdata,v[1]) + end + end + self.m_index = #data - #m_otherdata + self.m_index + tempList=m_otherdata + else + tempList=data + end + tempList=data + if #tempList > 0 then + for i = 1, #tempList do + table.insert(self.rewards_log, tempList[i]) + end + end + self.lst_log.numItems = #self.rewards_log +end + +function M:OnRenderItem(index, obj) + local data = self.rewards_log[index + 1] + local play_name = DataManager.groups:get(self.group_id):getPlayName(data.pid) + obj:GetChild("tex_name").text = play_name + obj:GetChild("tex_roomid").text = data.roomid + obj:GetChild("tex_get_hp").text = d2ad(data.hp) + obj:GetChild("tex_data").text = os.date("%Y-%m-%d\r%H:%M", data.time) + if data.reason == 12 then + obj:GetChild("tex_xiang").text = "合伙人奖励\n".."("..data.info..")" + elseif data.reason == 7 then + obj:GetChild("tex_xiang").text = "抽水\n".."("..data.info..")" + elseif data.reason == 20 then + obj:GetChild("tex_xiang").text = "洗牌\n".."("..data.info..")" + elseif data.reason == 21 then + obj:GetChild("tex_xiang").text = "合伙人洗牌奖励\n".."("..data.info..")" + elseif data.reason == 22 then + obj:GetChild("tex_xiang").text = "合伙人管理奖励\n".."("..data.info..")" + end +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupRoomColorView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupRoomColorView.lua new file mode 100644 index 00000000..5e521a79 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupRoomColorView.lua @@ -0,0 +1,31 @@ + +local GroupRoomColorView = {} + +local M = GroupRoomColorView + +function GroupRoomColorView.new(curGroup, index, callback) + + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupRoomColorView" + self._close_destroy = true + self.curGroup = curGroup + self.index = index + self.callback = callback + self:init("ui://NewGroup/Win_ColorSelect") + return self +end + +function M:init(url) + BaseWindow.init(self,url) + + self.lst_color = self._view:GetChild("lst_color") + self.lst_color.selectedIndex = self.index or 0 + + self._view:GetChild("btn_confirm").onClick:Set(function() + self.callback(self.lst_color.selectedIndex) + self:Destroy() + end) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupSetMemberInfoDiaoduView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupSetMemberInfoDiaoduView.lua new file mode 100644 index 00000000..72c2f6ab --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupSetMemberInfoDiaoduView.lua @@ -0,0 +1,218 @@ +local GroupNumberInputView = import('.GroupNumberInputView') +local GroupSetMemberInfoDiaoduView = {} + +local M = GroupSetMemberInfoDiaoduView + +function GroupSetMemberInfoDiaoduView.new(group_id,member_id,group_black) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupSetMemberInfoDiaoduView" + self.group_id = group_id + self.member_id = member_id + self.currentSelect = 0 + self.blackList = {{0,0},{25,0},{15,0}} + self:init("ui://NewGroup/Win_SetAddPlayerHBView") + return self +end + +function M:init(url) + BaseWindow.init(self,url) + + self.n99 = self._view:GetChild("n99") + + self.btnRate = self._view:GetChild("btnRate") + self.n118 = self._view:GetChild("n118") + self.n99.visible = false + + self.btnRate.visible = false + self.n118.visible = false + self._view:GetChild("btn_close").onClick:Set( + function () + self:Destroy() + end + ) + + self.txtRate = self._view:GetChild("txtRate") + self.txtRate.visible = false + self.txtBlack = self._view:GetChild("txtBlack") + self.txtBan = self._view:GetChild("txtBan") + self.currentSelectState=self._view:GetChild("btn_current") + self.currentSelectStateText=self._view:GetChild("diaodongtext") + + self._view:GetChild("btn_qd1").onClick:Set( + function () + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_BanMemberHB( + self.group_id, + self.member_id, + 0, + function (response) + ViewUtil.CloseModalWait() + if (response.ReturnCode == 0) then + self.currentSelectStateText.text="整组调动 "..(response.Data.black+1) + ViewUtil.ShowBannerOnScreenCenter('设置成功!', 1) + else + ViewUtil.ErrorTip(response.ReturnCode, '设置失败!') + end + end + ) + end + ) + + + self._view:GetChild("btn_qd2").onClick:Set( + function () + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_BanMemberHB( + self.group_id, + self.member_id, + 1, + function (response) + ViewUtil.CloseModalWait() + if (response.ReturnCode == 0) then + self.currentSelectStateText.text="整组调动 "..(response.Data.black+1) + ViewUtil.ShowBannerOnScreenCenter('设置成功!', 1) + else + ViewUtil.ErrorTip(response.ReturnCode, '设置失败!') + end + end + ) + end + ) + + self._view:GetChild("btn_qd3").onClick:Set( + function () + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_BanMemberHB( + self.group_id, + self.member_id, + 2, + function (response) + ViewUtil.CloseModalWait() + if (response.ReturnCode == 0) then + self.currentSelectStateText.text="整组调动 "..(response.Data.black+1) + ViewUtil.ShowBannerOnScreenCenter('设置成功!', 1) + else + ViewUtil.ErrorTip(response.ReturnCode, '设置失败!') + end + end + ) + end + ) + + self._view:GetChild("btnRate").onClick:Set( + function () + local gniv = + GroupNumberInputView.new( + self._root_view, + function(num) + if num >100 then + ViewUtil.ShowBannerOnScreenCenter('设置失败,不能超过100', 1) + return + end + self.txtRate.text = num + end + ) + gniv:Show() + end + ) + + self._view:GetChild("btnBlack").onClick:Set( + function () + local gniv = + GroupNumberInputView.new( + self._root_view, + function(num) + self.txtBlack.text = num + end, + 3 + + ) + gniv:Show() + end + ) + self.zm = self._view:GetController('zm') + self.zhengzu = self._view:GetChild("zhengzu") + + + self.zhengzu.onChanged:Set(function () + local zzValue = tonumber(self.zhengzu.value) + self.zm.selectedIndex = zzValue - 1 + self.currentSelect = zzValue - 1 + self.txtRate.text = self.blackList[zzValue][1] + self.txtBlack.text = self.blackList[zzValue][2] + self:ChangeOrate() + end) + + self._view:GetChild("btn_ok").onClick:Set( + function () + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_BanMemberHB( + self.group_id, + self.member_id, + self.currentSelect, + tonumber(self.txtRate.text), + tonumber(self.txtBlack.text), + function (response) + ViewUtil.CloseModalWait() + if (response.ReturnCode == 0) then + self.currentSelectStateText.text="整组调动 "..(response.Data.ban+1) + self.blackList = {{0,0},{25,0},{15,0}} + self.blackList[response.Data.ban+1][1] = response.Data.ban_rate + self.blackList[response.Data.ban+1][2] = response.Data.ban_max_value + ViewUtil.ShowBannerOnScreenCenter('设置成功!', 1) + else + ViewUtil.ErrorTip(response.ReturnCode, '设置失败!') + end + end + ) + end + ) +end + + +function M:SetCurrentState(selectID,data) + self.blackList = {{0,0},{25,0},{15,0}} + self.currentSelectStateText.text="整组调动 "..selectID + self.currentSelect = selectID - 1 + self.blackList[selectID][1] = data.ban_rate + self.blackList[selectID][2] = data.ban_max_value + + self.txtRate.text = data.ban_rate + self.txtBlack.text = data.ban_max_value + self.txtBan.text = data.ban_value + + self.zhengzu.value = selectID + self.zm.selectedIndex = selectID - 1 + self:ChangeOrate() + self:Show() +end + +function M:ChangeOrate() + + if tonumber(self.zhengzu.value) == 2 then + + self.n99.visible = true + self.btnRate.visible = true + self.n118.visible = true + self.txtRate.visible = true + else + self.n99.visible = false + self.btnRate.visible = false + self.n118.visible = false + self.txtRate.visible = false + end + + +end + +function M:ChangeZ(num) + self.zhengzu.visibleItemCount = num +end + + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupSetPermissionView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupSetPermissionView.lua new file mode 100644 index 00000000..1e67b4e9 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupSetPermissionView.lua @@ -0,0 +1,52 @@ +-- 设置管理员权限界面 +local MngPermission = import(".MngPermission") + +local GroupSetPermissionView = {} + +local M = GroupSetPermissionView + +function GroupSetPermissionView.new(blur_view, group_id, member) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupSetPermissionView" + self._close_destroy = true + self._blur_view = blur_view + self.group_id = group_id + self.member = member + self:init("ui://NewGroup/Win_Permission") + return self +end + +function M:init(url) + BaseWindow.init(self,url) + local perm_array = MngPermission.getPermData(self.member.permission) + for i = 1, 5 do + local btn_perm = self._view:GetChild("btn_" .. i) + btn_perm.selected = perm_array[i] + end + local btn_ok = self._view:GetChild("btn_ok") + btn_ok.onClick:Set(function() + local permission = MngPermission.getPermValue(self:getPermission()) + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_SetMngPermission(self.group_id, self.member.uid, permission, function(res) + if res.ReturnCode == 0 then + ViewUtil.ShowBannerOnScreenCenter("设置成功") + self.member.permission = permission + self:Destroy() + else + ViewUtil.ErrorTip(nil, "设置权限失败") + end + end) + end) +end + +function M:getPermission() + local perm_array = {} + for i = 1, 5 do + local tem = self._view:GetChild("btn_" .. i).selected + table.insert(perm_array, tem) + end + return perm_array +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupStatMember.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupStatMember.lua new file mode 100644 index 00000000..a648027a --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupStatMember.lua @@ -0,0 +1,57 @@ + +local GroupStatMember = {} + +local M = GroupStatMember + +function GroupStatMember.new(group_id, uid) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupStatMember" + self._close_destroy = true + self.group_id = group_id + self.uids = {} + self._full = true + + self:init("ui://NewGroup/Win_StatMember") + return self +end + + +function M:init(url) + BaseWindow.init(self,url) + self.members_log = {} + self.lst_member = self._view:GetChild("lst_member") + self.lst_member:SetVirtual() + self.lst_member.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + self.lst_member.scrollPane.onPullUpRelease:Set(function() + self:getRewardsLog(self.lst_member.numItems) + end) + + self:getRewardsLog(0) + self._view:GetChild("btn_back").onClick:Set(function() + self.lst_member.numItems = 0 + self:getRewardsLog(0) + end) + +end + +function M:getRewardsLog(index) + ViewUtil.ShowModalWait() + local fgCtr = ControllerManager.GetController(NewGroupController) +end + + +function M:OnRenderItem(index, obj) + local data = self.members_log[index + 1] + --pt(data) + obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(data.nick) + obj:GetChild("tex_id").text = "ID:" .. data.uid + local btn_detail = obj:GetChild("btn_detail") + btn_detail.onClick:Set(function() + + end) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/GroupTakeLogView.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupTakeLogView.lua new file mode 100644 index 00000000..0d1869a2 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/GroupTakeLogView.lua @@ -0,0 +1,67 @@ +-- 能量包提取记录 +local TimeSettingPanel = import(".TimeSettingPanel") + +local GroupTakeLogView = {} + +local M = GroupTakeLogView + +function GroupTakeLogView.new(blur_view,group_id,uid) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "GroupTakeLogView" + self._close_destroy = true + self.uid = uid + self._blur_view = blur_view + self.group_id = group_id + self:init("ui://NewGroup/Win_Takelog") + return self +end + +function M:init(url) + BaseWindow.init(self,url) + self.take_log = {} + self.lst_log = self._view:GetChild("lst_log") + self.lst_log:SetVirtual() + self.lst_log.itemRenderer = function(index, obj) + self:OnRenderItem(index, obj) + end + self.lst_log.scrollPane.onPullUpRelease:Set(function() + self:getTakeLog(self.lst_log.numItems) + end) + + self.time_panel = TimeSettingPanel.new(self._view, self._view:GetChild("btn_date1"), self._view:GetChild("btn_date2"), -308, 0) + self._view:GetChild("btn_search").onClick:Set(function() + self.take_log = {} + self:getTakeLog(0) + end) + + self:getTakeLog(0) +end + +function M:getTakeLog(index) + local begin_time, end_time = self.time_panel:GetDate() + local fgCtr = ControllerManager.GetController(NewGroupController) + fgCtr:FG_GetTakeLog(self.group_id, index, 6, begin_time, end_time, self.uid,function(res) + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "获取提取详情失败") + else + local hp_logs = res.Data.hp_logs + if #hp_logs > 0 then + for i = 1, #hp_logs do + table.insert(self.take_log, hp_logs[i]) + end + self.lst_log.numItems = #self.take_log + end + end + end) +end + +function M:OnRenderItem(index, obj) + local data = self.take_log[index + 1] + obj:GetChild("tex_name").text = ViewUtil.stringEllipsis(DataManager.SelfUser.nick_name) + obj:GetChild("tex_id").text = DataManager.SelfUser.account_id + obj:GetChild("tex__hp").text = d2ad(data.hp) + obj:GetChild("tex_data").text = os.date("%Y-%m-%d\r%H:%M", data.time) +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/MngPageConfig.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/MngPageConfig.lua new file mode 100644 index 00000000..4103490b --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/MngPageConfig.lua @@ -0,0 +1,104 @@ +-- 管理界面配置 +local GroupMngFagListView = import(".GroupMngFagListView") +local GroupMngGameListView = import(".GroupMngGameListView") +local GroupMngMemberListView = import(".GroupMngMemberListView") +local GroupMngMemberListView1 = import(".GroupMngMemberListView1") +local GroupMngAddMemberView = import(".GroupMngAddMemberView") +local GroupMngRankView = import(".GroupMngRankView") +local GroupMngRoomStatView = import(".GroupMngRoomStatView") +local GroupMngProportionView = import(".GroupMngProportionView") +local GroupMngPartnerListView = import(".GroupMngPartnerListView") +local GroupMngPartnerListView1 = import(".GroupMngPartnerListView1") +local GroupMngFagPackStatView = import(".GroupMngFagPackStatView") +local GroupMngPlayStatView = import(".GroupMngPlayStatView") +local GroupMngPersonStatView = import(".GroupMngPersonStatView") +local GroupMngMemberStatView = import(".GroupMngMemberStatView") +local GroupMngPartnerStatView = import(".GroupMngPartnerStatView") +local GroupMngMemberInfoView = import(".GroupMngMemberInfoView") +local GroupMngXingYunStatView = import(".GroupMngXingYunStatView") +local GroupMngZuanShiStatView = import(".GroupMngZuanShiStatView") +local MngPageConfig = {} + +-- 界面配置表 +-- id 界面标识,title 界面标题,view 界面脚本,refresh 再次选中界面时是否刷新, clear_image 清理图片缓存, show_key 只有圈子对应的key为true时才显示界面, alliance 为ture则只有大联盟才显示 +MngPageConfig.PageList = { + + {id = 1, title = "成员列表", view = GroupMngMemberListView, refresh = true, clear_image = true,anchorOffset = 300}, + {id = 2, title = "成员列表", view = GroupMngMemberListView, refresh = true, clear_image = true,anchorOffset = 300}, + {id = 3, title = "赢家管理费", view = GroupMngProportionView, refresh = true, clear_image = false,anchorOffset = 300}, + {id = 4, title = "房间玩法", view = GroupMngGameListView, refresh = true, clear_image = false,anchorOffset = 300}, + {id = 5, title = "添加玩家", view = GroupMngAddMemberView, refresh = true, clear_image = false,anchorOffset = 300}, + {id = 6, title = "--del--", view = GroupMngMemberListView, refresh = false, clear_image = false,anchorOffset = 300}, + {id = 7, title = "积分记录", view = GroupMngFagListView, refresh = true, clear_image = false,anchorOffset = 300}, + {id = 8, title = "开桌明细", view = GroupMngRoomStatView, refresh = true, clear_image = true,anchorOffset = 300}, + {id = 9, title = "战绩排行", view = GroupMngRankView, refresh = true, clear_image = false,anchorOffset = 300}, + {id = 10, title = "战队队长", view = GroupMngPartnerListView, refresh = true, clear_image = false,anchorOffset = 300}, + {id = 11, title = "--del--", view = GroupMngMemberListView, refresh = true, clear_image = true,anchorOffset = 300}, + {id = 13, title = "保险箱统计", view = GroupMngFagPackStatView, refresh = true, clear_image = false,anchorOffset = 300}, + {id = 14, title = "开桌明细", view = GroupMngRoomStatView, refresh = true, clear_image = true,anchorOffset = 300}, + {id = 16, title = "玩法统计", view = GroupMngPlayStatView, refresh = true, clear_image = true,anchorOffset = 300}, + {id = 17, title = "个人战绩", view = GroupMngPersonStatView, refresh = true, clear_image = true,anchorOffset = 300}, + {id = 18, title = "成员战绩", view = GroupMngMemberStatView, refresh = true, clear_image = true,anchorOffset = 300}, + {id = 19, title = "合伙人统计", view = GroupMngPartnerStatView, refresh = true, clear_image = true,anchorOffset = 300}, + {id = 20, title = "亲友圈队员", view = GroupMngMemberListView1, refresh = true, clear_image = true,anchorOffset = 300}, + {id = 21, title = "踢出队员", view = GroupMngPartnerListView1, refresh = true, clear_image = true,anchorOffset = 300}, + {id = 22, title = "数据统计", view = GroupMngMemberInfoView, refresh = true, clear_image = true,anchorOffset = 300}, + {id = 23, title = "玩家数据", view = GroupMngXingYunStatView, refresh = true, clear_image = true,anchorOffset = 300}, + {id = 24, title = "局数统计", view = GroupMngZuanShiStatView, refresh = true, clear_image = true,anchorOffset = 300}, +} + +-- Config定义不同职位的人,通过不同按钮进入显示的内容 +-- 配置表的一级对象是三个按钮 管理、统计、合伙人 +-- 二级对象对应不同职位的人 盟主、管理员、合伙人 +MngPageConfig.Config = { + -- 管理按钮 + { + -- 盟主 + {2}, + -- 管理员 + {}, + -- 合伙人 + {}, + }, + -- 统计按钮 + { + -- 盟主 + --{19, 16, 7, 3, 8, 9, 13, 17}, + {19,16, 7, 3, 8, 13, 17,9,22}, + -- 管理员 + --{19, 16, 7, 3, 8, 9, 13, 17}, + {19, 16, 7, 3, 8, 13, 17,9,22}, + -- 合伙人 + {19, 9, 7, 17}, + --{19,16,7, 8,17,22}, + -- 普通玩家 + --{9, 17}, + {17,9}, + }, + -- 成员按钮 + { + -- 盟主 + {1, 10}, + -- 管理员 + {1, 10}, + -- 合伙人 + {1, 10}, + }, + -- 管理按钮 + { + -- 盟主 + {4}, + -- 管理员 + {4}, + -- 合伙人 + {}, + }, + + { + {20,10,21}, + {20,10,21}, + {20,10,21}, + }, +} + +return MngPageConfig diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/MngPermission.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/MngPermission.lua new file mode 100644 index 00000000..c246ecb8 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/MngPermission.lua @@ -0,0 +1,26 @@ +-- 管理员权限 +local MngPermission = {} + +-- 按钮对应的权限为,{btn_1 删除玩家 1}{btn_2 添加玩家 2}{btn_3 增减体力值 4}{btn_4 禁止游戏 8}{btn_5 禁止同桌 16} +function MngPermission.getPermData(perm) + local perm_array = {} + for i = 5, 1, -1 do + local tem = math.pow(2, i - 1) + local flag = perm >= tem + table.insert(perm_array, 1, flag) + perm = flag and perm - tem or perm + end + return perm_array +end + +function MngPermission.getPermValue(array) + local val = 0 + for i = 1, 5 do + if array[i] then + val = val + math.pow(2, i - 1) + end + end + return val +end + +return MngPermission \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/MngView/TimeSettingPanel.lua b/lua_probject/base_project/Game/View/NewGroup/MngView/TimeSettingPanel.lua new file mode 100644 index 00000000..58efb820 --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/MngView/TimeSettingPanel.lua @@ -0,0 +1,123 @@ +-- 选择时间按钮、选择时间界面 +local TimeSettingPanel = {} + +local M = TimeSettingPanel + +function TimeSettingPanel.new(parent, btn_date1, btn_date2, posX, posY, callback, flag) + local self = setmetatable({}, {__index = M}) + self.class = "TimeSettingPanel" + self.parent = parent + self.btn1 = btn_date1 + self.btn2 = btn_date2 + self.posX = posX or 0 + self.posY = posY or 0 + self.callback = callback + self.show_day = flag and 3 or 3 + self:initView() + return self +end + +local function initButton(self, btn_date, today) + btn_date.data = today + btn_date.title = os.date("%Y年%m月%d日", today) + btn_date.onClick:Set(function() + self:ShowSetDatePanel(btn_date) + end) +end + +function M:initView() + local now_time = os.date("*t",now) + local today = os.time({year=now_time.year, month=now_time.month, day=now_time.day, hour=0,min=0,sec=0}) + initButton(self, self.btn1, today) + initButton(self, self.btn2, today) +end + +function M:GetDate() + local time1 = self.btn1.data + local time2 = self.btn2.data + local begin_time = math.min(time1, time2) + local end_time = math.max(time1, time2) + 86400 + return begin_time, end_time +end + +function M:SetTenDay() + local now_time = os.date("*t",now) + local today = os.time({year=now_time.year, month=now_time.month, day=now_time.day, hour=0,min=0,sec=0}) + local nine_day_ago = today - 86400 * 9 + self.btn1.data = nine_day_ago + self.btn1.title = os.date("%Y年%m月%d日", nine_day_ago) + self.btn2.data = today + self.btn2.title = os.date("%Y年%m月%d日", today) +end + +local max_pos, min_pos = 0.2, 2.2 +-- 添加列表特效:中部的组件放大,两边的渐渐透明 +local function addListEffect(lst) + local mid_y = 0.5 * lst.height + local cnt = lst.numChildren + for i = 0, cnt - 1 do + local item = lst:GetChildAt(i) + local index = lst.scrollPane.percY * (lst.numChildren - 5) + local dist = math.abs(index + 2 - i) -- 距离列表中点的位置 + if dist <= max_pos then + item.alpha = 1 + item:GetChild("title"):SetScale(1, 1) + elseif dist <= min_pos then + local scale = dist / min_pos + item.alpha = 1 - 0.7 * scale + item:GetChild("title"):SetScale(1 - 0.5 * scale, 1 - 0.5 * scale) + else + item.alpha = 0.3 + item:GetChild("title"):SetScale(0.5, 0.5) + end + lst.data = lst:GetChildAt(2).data - math.floor(index + 0.5) * 86400 + end +end +-- 显示日期 +-- +/-2的原因是列表中需要两个看不见的组件 +local function initList(lst, date, show_day) + local now_time = os.date("*t",now) + local today = os.time({year=now_time.year, month=now_time.month, day=now_time.day, hour=0,min=0,sec=0}) + lst:RemoveChildrenToPool() + local index = -1 + local num = show_day - 1 + for i = 0 - 2, num + 2 do + local item = lst:AddItemFromPool() + if i >= 0 and i <= num then + local time = today - 86400 * i + item.data = time + item.title = os.date("%Y年%m月%d日", time) + if time == date then + index = i + end + else + item.title = " " + end + end + lst.scrollPane.percY = index / num + addListEffect(lst) + lst.scrollPane.onScroll:Add(function() + addListEffect(lst) + end) +end + +-- 显示设置时间面板 +function M:ShowSetDatePanel(btn) + local date = btn.data + local com_set_date = UIPackage.CreateObjectFromURL("ui://NewGroup/com_set_time") + local lst_y = com_set_date:GetChild("lst_year") + initList(lst_y, date, self.show_day) + com_set_date:GetChild("btn_confirm").onClick:Set(function() + local time = os.date("%Y年%m月%d日", lst_y.data) + btn.title = time + btn.data = lst_y.data + com_set_date:Dispose() + if self.callback then self.callback() end + end) + AddPanel(com_set_date) + -- self.parent:AddChild(com_set_date) + -- com_set_date.x = self.posX + -- com_set_date.y = GRoot.inst.height - com_set_date.height - (GRoot.inst.height - self.parent.height) * 0.5 + self.posY +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/NewGroup/RoomItem.lua b/lua_probject/base_project/Game/View/NewGroup/RoomItem.lua new file mode 100644 index 00000000..04879a1b --- /dev/null +++ b/lua_probject/base_project/Game/View/NewGroup/RoomItem.lua @@ -0,0 +1,77 @@ +local RoomItem = {} + +local M = RoomItem + +function RoomItem.new(item,max,ishow) + local self = setmetatable({}, {__index = M}) + self.class = "RoomItem" + self.item = item + self.ishow = ishow + self.play = nil + self:init(max) + return self +end + +function M:init(max) + local item = self.item + self.ctr_state = item:GetController("state") + self.tex_round = item:GetChild("tex_round") + self.tex_gamename = item:GetChild("tex_gamename") + self.tex_roomid = item:GetChild("tex_roomid") + self.btn_set = item:GetChild("btn_set") + self.desk = item:GetChild("desk") + self.ctr_color = self.desk:GetController("color") + self.tex_limit = item:GetChild("tex_limit") + self.btn_detail = item:GetChild("btn_detail") + --self.btn_detail.visible = false + if self.btn_detail then + self.btn_detail.onClick:Set(function () + local str = self:ShowDetails(self.play) + local _curren_msg = MsgWindow.new(self._root_view, str, MsgWindow.MsgMode.OnlyOk) + + _curren_msg:Show() + end) + end + + self.heads = {} + + for i=1,max do + --printlog("==================================",i) + local p_item = self.desk:GetChild("head"..i) + local btn_head = p_item:GetChild("btn_head") + self.def_icon = btn_head._iconObject.texture + local tex_name = p_item:GetChild("tex_name") + local tex_id = p_item:GetChild("tex_id") + --tex_id.visible = self.ishow + local text_score=p_item:GetChild("tex_score") + text_score.visible = false + self.heads[i] = {p_item = p_item,btn_head = btn_head,tex_name = tex_name,tex_id = tex_id,text_score=text_score} + end + + +end + +function M:SetPlay(play) + self.play = play + -- if play.gameId == 203 then + -- self.desk.touchable = false + -- end +end + +function M:ShowDetails(play) + if not play then return "" end + local gameStr + local data + local exconfig = ExtendManager.GetExtendConfig(play.gameId) + + data = json.decode(play.config) + local r = {} + exconfig:FillRoomConfig(r, data) + gameStr = string.gsub(r.room_config:GetDes(), "\r", "") + + gameStr = "[color=#f22d3c]玩法说明:[/color]".."[color=#776a5e]"..gameStr.."[/color]" + + return gameStr +end + +return M \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/PhoneLoginView.lua b/lua_probject/base_project/Game/View/PhoneLoginView.lua new file mode 100644 index 00000000..e8198a77 --- /dev/null +++ b/lua_probject/base_project/Game/View/PhoneLoginView.lua @@ -0,0 +1,188 @@ +local PhoneLoginView = {} + +local M = PhoneLoginView + +function PhoneLoginView.new(type, callback) + setmetatable(M, { __index = BaseWindow }) + local self = setmetatable({}, { __index = M }) + self.class = "PhoneLoginView" + self._callback = callback + self._close_destroy = true + self.codeType = type + self:init("ui://Login/PhnoeLogin") + + return self +end + +function M:init(url) + BaseWindow.init(self, url) + self.login_type = self._view:GetController("type") + self.login_type.selectedIndex = self.codeType; + + local btn_login = self._view:GetChild("btn_login") + btn_login.onClick:Add(handler(self, function() + self:login() + end)) + + local btn_getCode = self._view:GetChild("btn_code_send") + btn_getCode.onClick:Add(handler(self, function() + self:getCode() + end)) +end + +function M:login() + if self.codeType == 0 then + local uid = self:CheckInputId() + if not uid then + return + end + ViewUtil.ShowModalWait(self._root_view, "正在登录游戏...") + local loginCtr = ControllerManager.GetController(LoginController) + local passwd = self:CheckInputPasswd() + if not passwd then + return + end + loginCtr:IdPasswordLogin(uid, passwd, function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(res.ReturnCode, "ID或者密码错误") + return + end + self._callback(res) + end) + else + ---[[ + --直接登入 + local loginCtr = ControllerManager.GetController(LoginController) + + local phone = self._view:GetChild("phone_input").text + if not phone then + ViewUtil.ShowTips("请输入账号") + return + end + + loginCtr:IdPasswordLogin(phone, "123456", function(res) + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(self._root_view, "ID或者密码错误") + return + end + self._callback(res) + end) + --]] + local code = self:CheckInputPhoneCode() + if not code then + return + end + ViewUtil.ShowModalWait(self._root_view, "正在登录游戏...") + local phone = self:CheckInputPhone() + if not phone then + return + end + + local loginCtr = ControllerManager.GetController(LoginController) + if false then + loginCtr:PhoneLogin(phone, code, function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode == "100" then + ViewUtil.ErrorTip(self._root_view, "验证码错误") + elseif res.ReturnCode == "101" then + ViewUtil.ErrorTip(self._root_view, "验证码失效") + end + self._callback(res) + end) + else + --测试先假验证 + if code == "7777" then + loginCtr:IdPasswordLogin("168168", "123456", function(res) + if res.ReturnCode ~= 0 then + ViewUtil.ErrorTip(self._root_view, "ID或者密码错误") + return + end + self._callback(res) + end) + elseif code == "6666" then + ViewUtil.ErrorTip(self._root_view, "验证码错误") + else + ViewUtil.ErrorTip(self._root_view, "验证码失效") + end + ViewUtil.CloseModalWait() + end + end +end + +function M:getCode() + local phone = self:CheckInputPhone() + if not phone then + return + end + --发送电话给后端 + local loginCtr = ControllerManager.GetController(LoginController) + loginCtr:GetPhoneCode(phone, function(res) + if res.ReturnCode == 0 then + self.code = self._view:GetController("code") + self.code.selectedIndex = 1; + self._left_time = 15 + UpdateBeat:Add(self.OnUpdate, self) + else + ViewUtil.ErrorTip(self._root_view, "验证码发送失败") + end + end) +end + +function M:OnUpdate() + local deltaTime = Time.deltaTime + local _left_time = self._left_time + if (_left_time > 0) then + _left_time = _left_time - deltaTime + _left_time = math.max(0, _left_time) + local leftTime = math.floor(_left_time) + self._view:GetChild("code_send_text").text = tostring(leftTime) .. "后重新发送" + self._left_time = _left_time + else + self.code.selectedIndex.selectedIndex = 0 + UpdateBeat:Remove(self.OnUpdate, self) + end +end + +function M:Destroy() + BaseWindow.Destroy(self) + UpdateBeat:Remove(self.OnUpdate, self) +end + +function M:CheckInputId() + local uid = self._view:GetChild("phone_input").text + if not (string.len(uid) >= 6) then + ViewUtil.ShowTips("请输入正确的用户ID") + return + end + return uid +end + +function M:CheckInputPasswd() + local tex_passwd = self._view:GetChild("tex_passwd").text + if string.len(tex_passwd) < 6 then + ViewUtil.ShowTips("密码最少六位") + return + end + return tex_passwd +end + +function M:CheckInputPhone() + local phone = self._view:GetChild("phone_input").text + if not (string.len(phone) == 11) then + ViewUtil.ShowTips("请输入正确的电话号码") + return + end + return phone +end + +function M:CheckInputPhoneCode() + local code = self._view:GetChild("code_input").text + if not (string.len(code) >= 4) then + ViewUtil.ShowTips("请输入正确的验证码") + return + end + return code +end + +return M diff --git a/lua_probject/base_project/Game/View/PlayBackView.lua b/lua_probject/base_project/Game/View/PlayBackView.lua new file mode 100644 index 00000000..2ce322b2 --- /dev/null +++ b/lua_probject/base_project/Game/View/PlayBackView.lua @@ -0,0 +1,379 @@ +-- Edit By ChenGY +-- 回放界面,实现上一局、下一局,加速、减速播放 按钮逻辑 +-- 定义了ShowStep()方法,作用是播放录像,需要在子类中自己定义逻辑 +-- + +local MainRightPanelView = import('.MainRightPanelView') +local PlayerInfoView = import('.PlayerInfoView') + +PlayBackView = { + _currentStep = 0, + _lastStep = 0, + _currentId = '', + _currentRound = 0, + _totalRound = 0, + _play = false, + _playFoward = true, + _speed = 1, + _timer = 0 +} + +local M = PlayBackView + +function M:init() + self._gamectr = ControllerManager.GetController(GameController) + self._room = DataManager.CurrenRoom + self._room.playback = true + UIPackage.AddPackage('base/chat/ui/Chat') + self.cmdList = self._room.cmdList + self._eventmap = {} + -- self._full = true + self._put_map = false + self._new_hide = false + self._queue = false + self._style = 1 + self:InitView() +end + +function M:InitView(url) + BaseView.InitView(self, url) + local contentPane = self._root_view:GetChild('contentPane') + contentPane:AddChild(self._view) + contentPane.height = self._view.height + contentPane:Center() + + local panel_record = self._view:GetChild('panel_record') + self._record = panel_record + local btn_LastRound = panel_record:GetChild('btn_LastRound') + local btn_NextRound = panel_record:GetChild('btn_NextRound') + local btn_LastStep = panel_record:GetChild('btn_LastStep') + local btn_NextStep = panel_record:GetChild('btn_NextStep') + local btn_return = panel_record:GetChild('btn_return') + local btn_play = panel_record:GetChild('btn_play') + btn_return.onClick:Add(handler(self, self.CmdBackToLobby)) + btn_LastStep.onClick:Add(handler(self, self.CmdLeftArrows)) + btn_NextStep.onClick:Add(handler(self, self.CmdRightArrows)) + btn_LastRound.onClick:Add(handler(self, self.LastRecordPlay)) + btn_NextRound.onClick:Add(handler(self, self.NextRecordPlay)) + btn_play.onClick:Add(handler(self, self.Play)) + + local _view = self._view + local _room = self._room + self._player_info = {} + + local _player_info = self._player_info + for i = 1, _room.room_config.people_num do + local tem = _view:GetChild('player_info' .. i) + _player_info[i] = PlayerInfoView.new(tem, self) + tem.visible = false + end + + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = _player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + end + + local btn_back_lobby = _view:GetChild('btn_back_lobby') + if btn_back_lobby then + btn_back_lobby.onClick:Set(handler(self, self.CmdBackToLobby)) + end + + if self._style == 1 then + local rightpanel = self._view:GetChild('right_panel') + local btn_rule = self._view:GetChild('btn_rule') + if btn_rule then + btn_rule.onClick:Set( + function() + self.RuleView = RoomInfoView.new(self._room) + self.RuleView:Show() + end + ) + end + elseif self._style == 2 then + local com_roominfo = self._view:GetChild('com_roominfo') + com_roominfo:GetChild('tex_roomid').text = _room.room_id + local times = _room.score_times + local str_des = _room.room_config:GetGameName() + if times ~= 1 then + str_des = string.format('%s %s倍', str_des, times) + end + str_des = string.format('%s %s', str_des, _room.room_config:GetDes()) + com_roominfo:GetChild('tex_detail').text = str_des + local tex_time = com_roominfo:GetChild('tex_time') + self._co_timer = + coroutine.start( + function() + tex_time.text = os.date('%m-%d %H:%M') + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + local ping = _client:getAveragePingTime() + if not ping then + return + end + local ctr_xh = com_roominfo:GetChild('gcm_xinhao'):GetController('c1') + ping = math.floor(ping / 2) + if ping > 300 then + ping = 300 + end + if ping <= 100 then + ctr_xh.selectedIndex = 0 + elseif ping <= 300 then + ctr_xh.selectedIndex = 1 + else + ctr_xh.selectedIndex = 2 + end + coroutine.wait(10) + end + ) + end + + self._eventmap = {} +end + +local function __CmdAction(self, currentStep) + if self._currentStep > #self.cmdList then + return + end + self:ShowStep(currentStep) +end + +function M:ShowStep(step) +end + +function M:Play() +end + +function M:CmdLeftArrows() +end + +function M:CmdRightArrows() +end + +function M:NextCmdAction() + self._lastStep = self._currentStep + self._currentStep = self._currentStep + 1 + if self._currentStep > #self.cmdList then + self._currentStep = #self.cmdList + return + end + self:ChangeButtonEnabled() + __CmdAction(self, self._currentStep) +end + +function M:BackCmdAction() + self._lastStep = self._currentStep + self._currentStep = self._currentStep - 1 + if self._currentStep < 0 then + self._currentStep = 0 + return + end + self:ChangeButtonEnabled() + __CmdAction(self, self._currentStep) +end + +function M:NextRecordPlay() + if self._currentRound < self._totalRound then + if DataManager.SelfUser.playback[self._currentId][self._currentRound + 1] ~= nil then + -- self:ChangeButtonEnabled() + self._currentRound = self._currentRound + 1 + local game_id = DataManager.CurrenRoom.game_id + local room = ExtendManager.GetExtendConfig(game_id):NewRoom() + local extend = ExtendManager.GetExtendConfig(game_id) + room.game_id = game_id + DataManager.CurrenRoom = room + self._room = DataManager.CurrenRoom + extend:FillPlayBackData(DataManager.SelfUser.playback[self._currentId][self._currentRound]) + if not room.self_player then + room.self_player = room:GetPlayerBySeat(1) + end + self.cmdList = self._room.cmdList + self:FillRoomData(DataManager.SelfUser.playback[self._currentId][self._currentRound]) + self:ChangeAlpha() + else + ViewUtil.ShowModalWait(self._view) + local _data = {} + _data['military_id'] = self._currentId + _data['round'] = tostring(self._currentRound + 1) + local loddyCtr = ControllerManager.GetController(LoddyController) + loddyCtr:RequestPlayBack( + _data, + function(code, data) + ViewUtil.CloseModalWait() + if code == 0 then + -- self:ChangeButtonEnabled() + self._currentRound = self._currentRound + 1 + + DataManager.SelfUser.playback[self._currentId][self._currentRound] = data + local game_id = DataManager.CurrenRoom.game_id + local room = ExtendManager.GetExtendConfig(game_id):NewRoom() + local extend = ExtendManager.GetExtendConfig(game_id) + room.game_id = game_id + DataManager.CurrenRoom = room + self._room = DataManager.CurrenRoom + extend:FillPlayBackData(data) + if not room.self_player then + room.self_player = room:GetPlayerBySeat(1) + end + self.cmdList = self._room.cmdList + self:FillRoomData(data) + self:ChangeAlpha() + elseif code == 25 then + ViewUtil.ErrorTip(res.ReturnCode, '回放未找到!') + end + end + ) + end + return true + else + ViewUtil.ErrorTip(nil, '当前已经是最后一局了') + return false + end +end + +function M:LastRecordPlay() + if self._currentRound > 1 then + if DataManager.SelfUser.playback[self._currentId][self._currentRound - 1] ~= nil then + -- self:ChangeButtonEnabled() + self._currentRound = self._currentRound - 1 + local game_id = DataManager.CurrenRoom.game_id + local room = ExtendManager.GetExtendConfig(game_id):NewRoom() + local extend = ExtendManager.GetExtendConfig(game_id) + room.game_id = game_id + DataManager.CurrenRoom = room + self._room = DataManager.CurrenRoom + extend:FillPlayBackData(DataManager.SelfUser.playback[self._currentId][self._currentRound]) + if not room.self_player then + room.self_player = room:GetPlayerBySeat(1) + end + self.cmdList = self._room.cmdList + self:FillRoomData(DataManager.SelfUser.playback[self._currentId][self._currentRound]) + self:ChangeAlpha() + else + ViewUtil.ShowModalWait(self._view) + local _data = {} + _data['military_id'] = self._currentId + _data['round'] = tostring(self._currentRound - 1) + local loddyCtr = ControllerManager.GetController(LoddyController) + loddyCtr:RequestPlayBack( + _data, + function(code, data) + ViewUtil.CloseModalWait() + if code == 0 then + -- self:ChangeButtonEnabled() + self._currentRound = self._currentRound - 1 + DataManager.SelfUser.playback[self._currentId][self._currentRound] = data + local game_id = DataManager.CurrenRoom.game_id + local room = ExtendManager.GetExtendConfig(game_id):NewRoom() + local extend = ExtendManager.GetExtendConfig(game_id) + room.game_id = game_id + DataManager.CurrenRoom = room + self._room = DataManager.CurrenRoom + extend:FillPlayBackData(data) + if not room.self_player then + room.self_player = room:GetPlayerBySeat(1) + end + self.cmdList = self._room.cmdList + self:FillRoomData(data) + self:ChangeAlpha() + elseif code == 25 then + ViewUtil.ErrorTip(res.ReturnCode, '回放未找到!') + end + end + ) + end + return true + else + ViewUtil.ErrorTip(nil, '当前已经是第一局了') + return false + end +end + +function M:CmdBackToLobby() + self:ChangeAlpha() + local tipStr = '是否返回大厅' + local _curren_msg = MsgWindow.new(self._root_view, tipStr, MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add( + function() + ExtendManager.GetExtendConfig(self._room.game_id):UnAssets() + self:Destroy() + end + ) + _curren_msg:Show() +end + +function M:GetPos(seat,myseat) + local my_seat = 1 + if myseat == nil then + for i = 1, #self._room.player_list do + if DataManager.SelfUser.account_id == self._room.player_list[i].self_user.account_id then + my_seat = self._room.player_list[i].seat + end + end + else + my_seat = myseat + end + return ViewUtil.GetPos(my_seat, seat, self._room.room_config.people_num) +end + +function M:SetButtonEnabled(btn, enabled) + self._view:GetChild('panel_record'):GetChild(btn).enabled = enabled +end + +function M:CheckButtonEnabled(btn) + return self._view:GetChild('panel_record'):GetChild(btn).enabled +end + +function M:ChangeButtonEnabled() + if self._currentStep == 0 and self:CheckButtonEnabled('btn_LastStep') then + self:SetButtonEnabled('btn_LastStep', false) + elseif self._currentStep > 0 and not self:CheckButtonEnabled('btn_LastStep') then + self:SetButtonEnabled('btn_LastStep', true) + end + if self._currentStep == #self.cmdList and self:CheckButtonEnabled('btn_NextStep') then + self:SetButtonEnabled('btn_NextStep', false) + elseif self._currentStep < #self.cmdList and not self:CheckButtonEnabled('btn_NextStep') then + self:SetButtonEnabled('btn_NextStep', true) + end + self:ChangeAlpha() +end + +function M:ChangeAlpha(...) + if self._record_alpha then + coroutine.stop(self._record_alpha) + self._record_alpha = nil + end + self._record_alpha = + coroutine.start( + function() + self._record.alpha = 1 + coroutine.wait(2) + self._record.alpha = 0.5 + end + ) +end + +function M:Show() + AddPanel(self._root_view) + self._state = self._view:GetController('state') + self._state.selectedIndex = 3 +end + +function M:Destroy() + -- self._root_view:Dispose() + if self.RuleView then + self.RuleView:Destroy() + end + GameApplication.Instance.StopMusic = 0 + if self._record_alpha then + coroutine.stop(self._record_alpha) + self._record_alpha = nil + end + BaseView.Destroy(self) +end diff --git a/lua_probject/base_project/Game/View/PlayerDistanceView.lua b/lua_probject/base_project/Game/View/PlayerDistanceView.lua new file mode 100644 index 00000000..49f395fb --- /dev/null +++ b/lua_probject/base_project/Game/View/PlayerDistanceView.lua @@ -0,0 +1,126 @@ +-- 显示玩家间距离 +-- Edit by chengy + +PlayerDistanceView = {} + +local M = PlayerDistanceView + +function PlayerDistanceView.new(show_warning,style,callback) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "PlayerDistanceView" + self._close_destroy = false + self._close_zone = true + self.callback = callback + self:init("ui://Common/com_Distance", show_warning,style) + return self +end +function M:init(url, show_warning,style) + BaseWindow.init(self,url) + local _mainView = self._view + self._view:GetChild("btn_close2").onClick:Add(function() + self:Destroy() + end) + self:ShowPlayerDistance() + if show_warning then + self._view:GetController("warn").selectedIndex = 1 + end + style = style or 0 + self._view:GetController("style").selectedIndex = style + + --[[self._view:GetChild("btn_exit").onClick:Set(function() + if self.callback then + self.callback(false) + end + end)--]] + self._view:GetChild("btn_continue").onClick:Set(function() + if self.callback then + self.callback(true) + end + end) +end + +function M:ShowPlayerDistance() + local room = DataManager.CurrenRoom + local view = self._view + local num = room.room_config.people_num + local list = room.player_list + view:GetController("people").selectedIndex = num - 2 + local com_dist = view:GetChild("dist_p" .. num) + local p_list = {} + local isHidden = false + if room and room.playback ~= true and room.room_config and room.room_config.isHidden then + isHidden = room.room_config.isHidden == 1 + end + + for i = 1, #list do + local u = list[i].self_user + local index = ViewUtil.GetPos(room.self_player.seat, list[i].seat, room.room_config.people_num) + local btn_head = com_dist:GetChild("btn_head" .. index) + + if isHidden == false then + ImageLoad.Load(u.head_url, btn_head._iconObject) + end + p_list[index] = list[i] + if not u.location or u.location.default then + com_dist:GetChild("p" .. index).grayed = true + end + end + -- 需要计算的距离数量 + local dis_num = 0 + for i = 1, num - 1 do + dis_num = dis_num + i + end + -- 第一个人需要与(所有人 - 1)人比,第二个人需要与(所有人 - 2)人比,以此类推 + for i = 1, dis_num do + local text_dist = com_dist:GetChild("text_dest" .. i) + local tem = 0 + -- 判断第i个距离是哪两个user间的 + local player1, player2 + for j = 1, num - 1 do + local tem2 = tem + num - j + if i <= tem2 then + player1 = p_list[j] + player2 = p_list[j + i - tem] + local line = com_dist:GetChild("line" .. i) + self:ShowDistanceDetail(player1, player2, text_dist, line, com_dist) + break + end + tem = tem2 + end + end +end + +function M:ShowDistanceDetail(player1, player2, text_dist, line, com_dist) + local str = "" + local warn_color = self._view:GetChild("tex_warning").color + local change_color = false + if not player1 or not player2 then + str = "未知" + change_color = true + else + local user1 = player1.self_user + local user2 = player2.self_user + if (user1.location and not user1.location.default) and (user2.location and not user2.location.default) then + local dist = user1.location:CalcDistance(user2.location) + if dist > 1 then + str = math.floor(dist + 0.5) .. "km" + else + str = math.floor(dist*1000+0.5) .. "m" + end + if dist < 0.2 then + change_color = true + end + else + str = "未知" + change_color = true + end + end + text_dist.text = str + if change_color then + text_dist.color = warn_color + line.color = warn_color + end +end + +return M diff --git a/lua_probject/base_project/Game/View/PlayerInfoView.lua b/lua_probject/base_project/Game/View/PlayerInfoView.lua new file mode 100644 index 00000000..3cf632e9 --- /dev/null +++ b/lua_probject/base_project/Game/View/PlayerInfoView.lua @@ -0,0 +1,373 @@ +--- + +local PlayerInfoView = { + _view = nil, + _main_view = nil, + _tex_player_name = nil, + _tex_player_id = nil, + _tex_score = nil, + _ctr_offline = nil, + _ctr_bank = nil, + _ctr_room_owner = nil, + _ctr_mask_voice = nil, + _btn_head = nil, + _biaoqing = nil, + _chat = nil, + _player = nil, + __runwait_voice = nil, + _isHideIpAdds = false +} + +local M = PlayerInfoView + +function M.new(view, main_view, isHideIpAdds) + local self = {} + setmetatable(self, {__index = PlayerInfoView}) + self._view = view + self._main_view = main_view + self._isHideIpAdds = isHideIpAdds + self.isShowTGTimer=false + self.currentTime=0 + self.totalTime=0 + --self.isShow = fasle + self:init() + return self +end + +function M:init() + local view = self._view + UIPackage.AddPackage('base/chat/ui/Chat') + local player_name_score = view:GetChild('info') + self._tex_player_name = player_name_score:GetChild('tex_player_name') + self._tex_player_id = player_name_score:GetChild('tex_player_id') + self._tex_score = player_name_score:GetChild('tex_score') + self._tex_score.visible=true + + self._tex_score1 = self._view:GetChild("info"):GetChild("tex_score1") + if self._tex_score1 then + self._tex_score1.visible=true + end + self._tex_score2 = self._view:GetChild("info"):GetChild("tex_score2") + if self._tex_score2 then + self._tex_score2.visible=true + end + + self._tex_n4 = self._view:GetChild("info"):GetChild("n4") + if self._tex_n4 then + self._tex_n4.visible=true + end + self._tex_n5 = self._view:GetChild("info"):GetChild("n5") + if self._tex_n5 then + self._tex_n5.visible=true + end + + self.n3Bg=self._view:GetChild("info"):GetChild("n3") + if self.n3Bg then + --self.n3Bg:SetSize(138,55) + end + self.zhanjitext=self._view:GetChild("text_jifen") + if self.zhanjitext then + self.zhanjitext.text=0 + end + + + self._biaoqing = view:GetChild('face') + self._chat = view:GetChild('chat') + + self._ctr_read = view:GetController('read') + self._ctr_offline = view:GetController('offline') + + self._btn_head = view:GetChild('btn_head') + self._ctr_bank = view:GetController('bank') + self._ctr_room_owner = view:GetController('room_owner') + self._ctr_mask_voice = view:GetController('mask_voice') + self._ctr_dismiss_room = view:GetController('dismiss_room') + + self.PlayerTGTips=view:GetChild('tuoguanTips') + if self.PlayerTGTips and self.PlayerTGTips.displayObject.gameObject then + self.PlayerTGTips.displayObject.gameObject:SetActive(false) + end + +end + + +function M:IsShowTGTips(isShow,time) + --printlog("isShowisShowisShow==== ",isShow," time ",time) + if time==nil then time=0 end + + self.isShowTGTimer = isShow + if self.PlayerTGTips and self.PlayerTGTips.displayObject.gameObject then + self.PlayerTGTips.displayObject.gameObject:SetActive(isShow) + end + self.currentTime=0 + if isShow then + if self.PlayerTGTips then + self.PlayerTGTips.text="开启托管剩余时间"..time.."s" + end + self.totalTime=time + --UpdateBeat:Remove(self.OnUpdate,self) + --UpdateBeat:Add(self.OnUpdate,self) + -- printlog("aaaaaaaaa111111111111111111111111111111") + --TimerManager.RemoveTimer(self.OnUpdate) + TimerManager.AddTimer(self.OnUpdate,self) + --printlog(self) + else + -- printlog("移除IsShowTGTips",self.isShow) + --UpdateBeat:Remove(self.OnUpdate,self) + TimerManager.RemoveTimer(self.OnUpdate,self) + end + +end + + +function M:OnUpdate() + --printlog("OnUpdate=====================") + if self.isShowTGTimer then + self.currentTime=self.currentTime+Time.deltaTime + if self.currentTime>=1 then + self.currentTime=0 + self.totalTime=self.totalTime-1 + --printlog("当前计时器===>>>",self.totalTime) + if self.PlayerTGTips then + self.PlayerTGTips.text="开启托管剩余时间"..self.totalTime.."s" + end + + if self.totalTime<=0 then + self.isShowTGTimer=false + if self.PlayerTGTips and self.PlayerTGTips.displayObject.gameObject then + self.PlayerTGTips.displayObject.gameObject:SetActive(false) + end + end + end + + if self.muShiPlayerUpdate then + self:muShiPlayerUpdate() + end + end + +end + +function M:FillData(player) + self._player = player + if player == nil then + return + end + local isHidden = false + local room = DataManager.CurrenRoom + if room and room.playback ~= true and room.room_config and room.room_config.isHidden then + isHidden = room.room_config.isHidden == 1 + end + if isHidden == false then + ImageLoad.Load(player.self_user.head_url, self._btn_head._iconObject) + self._btn_head.onClick:Set( + function() + --local headView = HeadView.new(self._main_view._root_view, player.self_user, self._isHideIpAdds) + --headView:Show() + end + ) + else + local ctr = self._btn_head:GetController("hidden") + if ctr then + ctr.selectedIndex = 1 + end + end + + if isHidden + --and player.self_user.account_id ~= room.self_player.self_user.account_id + then + if player.orgSeat and player.orgSeat > 0 then + self._tex_player_name.text = "玩家"..player.orgSeat + else + self._tex_player_name.text = "玩家"..player.seat + player.orgSeat = membe_clone(player.seat) + end + if self._tex_player_id then + self._tex_player_id.text = "" + end + else + self._tex_player_name.text = player.self_user.nick_name + if self._tex_player_id then + self._tex_player_id.text = "ID:".. player.self_user.account_id + end + end + self._ctr_room_owner.selectedIndex = room.owner_id == player.self_user.account_id and 1 or 0 + if (DataManager.CurrenRoom.self_player ~= player) then + self._ctr_offline.selectedIndex = player.line_state == 0 and 1 or 0 + end + self:UpdateScore() + self:Ready(player.ready) + + if player.entrust and player ~= room.self_player then + self:MarkTuoguan() + end +end + +function M:UpdateScore(score) + if not score then + score = self._player.total_score + local room = DataManager.CurrenRoom + if room:checkHpNonnegative() then + if self._player.cur_hp then + -- print(self._player.total_hp) + -- if self._player.total_hp then + -- score = d2ad(self._player.total_hp).."/"..d2ad(self._player.cur_hp) + -- else + score = d2ad(self._player.cur_hp) + -- end + end + end + end + self._tex_score.text = tostring(score) +end + +function M:DismissRoom(state) + state = state or false + self._ctr_dismiss_room.selectedIndex = state == true and 1 or 0 +end + +function M:UpdateLineState(state) + self._ctr_offline.selectedIndex = state == 0 and 1 or 0 +end + +function M:Ready(isread) + self._ctr_read.selectedIndex = isread and 1 or 0 +end + +function M:MarkBank(isbank) + self._ctr_bank.selectedIndex = isbank and 1 or 0 +end + +-- 表情 语音 +function M:ShowInteraction(type, str) + if type == 3 then + Voice.DownLoad( + str, + function(clip) + if (clip) then + self:ShowMaskVoice(clip.length) + GameApplication.Instance:PlayVoice(clip) + end + end + ) + elseif type == 4 then + self:SetChat(str) + elseif type == 2 then + local chat_index = tonumber(str) + self._main_view:PlayChatSound(self._player.self_user.sex, chat_index) + local language, index = self._main_view:GetChatMsgLanguage(chat_index) + if language ~= 0 then + local msgs = self._main_view['Fix_Msg_Chat' .. language + 1] + self:SetChat(msgs[index]) + else + self:SetChat(self._main_view.Fix_Msg_Chat[chat_index]) + end + elseif type == 1 then + self:SetBiaoqing('ui://Chat/' .. str) + end +end + +function M:SetBiaoqing(url) + if (self.__runwait_biaoqing ~= nil) then + if self._biaoqing.numChildren > 0 then + self._biaoqing:RemoveChildAt(0, true) + end + coroutine.stop(self.__runwait_biaoqing) + end + self._biaoqing.alpha = 1 + local bq = UIPackage.CreateObjectFromURL(url) + self._biaoqing:AddChild(bq) + bq:Center() + -- self._biaoqing:GetChild("n1").icon = url + self.__runwait_biaoqing = nil + self.__runwait_biaoqing = coroutine.start(self.__WaitBiaoqing, self) +end + +function M:__WaitBiaoqing() + coroutine.wait(2) + self._biaoqing.alpha = 0 + -- self._biaoqing:GetChild("n1").icon = nil + self._biaoqing:GetChildAt(0):Dispose() +end + +function M:SetChat(msg) + -- body + self._chat.alpha = 1 + self._chat:GetChild('title').text = msg + if (self.__runwait_chat ~= nil) then + coroutine.stop(self.__runwait_chat) + end + self.__runwait_chat = nil + self.__runwait_chat = coroutine.start(self.__WaitChat, self) +end + +function M:__WaitChat() + coroutine.wait(2) + self._chat.alpha = 0 + self._chat:GetChild('title').text = '' +end + +function M:ShowMaskVoice(time, mask) + mask = mask or true + + GameApplication.Instance.StopMusic = GameApplication.Instance.StopMusic + 1 + if (mask) then + self._ctr_mask_voice.selectedIndex = 1 + end + if (self.__runwait_voice ~= nil) then + coroutine.stop(self.__runwait_voice) + GameApplication.Instance.StopMusic = GameApplication.Instance.StopMusic - 1 + end + self.__runwait_voice = nil + self.__runwait_voice = coroutine.start(self.__WaitMaskVoice, self, time) +end + +function M:__WaitMaskVoice(time) + coroutine.wait(time) + self._ctr_mask_voice.selectedIndex = 0 + self.__runwait_voice = nil + GameApplication.Instance.StopMusic = GameApplication.Instance.StopMusic - 1 +end + +function M:GetHeadCenter() + local btn_head = self._view:GetChild('btn_head') + local pt = Vector2(btn_head.x + 1 / 2 * btn_head.width, btn_head.y + 1 / 2 * btn_head.height) + return pt +end + +-- 添加、移除托管标记 +function M:MarkTuoguan() + local com_tuoguan = UIPackage.CreateObjectFromURL('ui://Common/com_tuoguan') + self:AddMarkToHead(com_tuoguan, 'mark_tuoguan') +end +function M:UnmarkTuoguan() + self:RemoveMarkFromHead('mark_tuoguan') +end +-- 动态的往头像上加载组件 +function M:AddMarkToHead(com, key) + if key then + if self[key] then + self[key]:Dispose() + end + self[key] = com + end + self._view:AddChild(com) + com.touchable = false + com.xy = self:GetHeadCenter() +end +-- 动态移除组件 +function M:RemoveMarkFromHead(key) + if self[key] then + self[key]:Dispose() + self[key] = nil + end +end + +function M:Destroy() + self.isShowTGTimer=false + TimerManager.RemoveTimer(self.OnUpdate,self) + self.OnUpdate=nil + self.muShiPlayerUpdate=nil +end + + +return M diff --git a/lua_probject/base_project/Game/View/ResultView.lua b/lua_probject/base_project/Game/View/ResultView.lua new file mode 100644 index 00000000..ca22f6ed --- /dev/null +++ b/lua_probject/base_project/Game/View/ResultView.lua @@ -0,0 +1,446 @@ +ResultView = {} + +local M = ResultView + +setmetatable(M, {__index = BaseWindow}) +local self = setmetatable({}, {__index = M}) + + +function M:InitView() + self:InitMaPai() + self:InitMaPaiShowPanel() + +end + + +function M:InitMaPaiShowPanel() + self.mapaiTypeCtr=self._view:GetController("matype") + if self.mapaiTypeCtr then + self.mapaiTypeCtr.selectedIndex=0 + end + + + self.mapaiTypeBgShowCtr=self._view:GetController("matypebgshow") + if self.mapaiTypeBgShowCtr then + self.mapaiTypeBgShowCtr.selectedIndex=0 + end + + self.mapaiTypeShowCtr=self._view:GetController("matypeshow") + if self.mapaiTypeShowCtr then + self.mapaiTypeShowCtr.selectedIndex=0 + end +end + +function M:InitMaPai() + self.maPaiCtr=self._view:GetController("mapai") + if self.maPaiCtr then + self.maPaiCtr.selectedIndex=0 + end + + + self.maPaiList={} + + for i=1,8 do + local tempMP=self._view:GetChild("niao"..i) + if tempMP then + table.insert(self.maPaiList,tempMP) + end + + end + +end + +function M:IsMapaiShow(niao,isShow) + if niao then + niao.visible=isShow + end +end + + +function M:SetMaPaiValue(niao,value) + if niao then + niao.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..value + end +end + +function M:SetMaPaiColor(niao,num) + niao:GetController("color").selectedIndex=num +end + +function M:HideAllMapai() + for i=1,#self.maPaiList do + self:IsMapaiShow(self.maPaiList[i],false) + self:SetMaPaiColor(self.maPaiList[i],0) + end +end + + + +function M:ShowSelectMaPai(niaoList) + if niaoList and #niaoList>0 then + self.maPaiCtr.selectedIndex=1 + self:HideAllMapai() + for i=1,#niaoList do + self:IsMapaiShow(self.maPaiList[i],true) + self:SetMaPaiValue(self.maPaiList[i],niaoList[i].card) + if niaoList[i].score>0 then + self:SetMaPaiColor(self.maPaiList[i],2) + end + end + else + self.maPaiCtr.selectedIndex=0 + end +end + + +function M:init(url,isBigFull) + BaseWindow.init(self, url) + + self:InitView() + + local btn_share = self._view:GetChild('btn_share') + if btn_share ~= nil then + btn_share.onClick:Set( + function() + ShareScreenShotWithOption() + end + ) + end + + local btn_share_str = self._view:GetChild('btn_share_str') + if btn_share_str then + btn_share_str.onClick:Set( + function() + self:__ShareResultStr() + end + ) + end + + local btn_shareInfo = self._view:GetChild('btn_chat_room') + if btn_shareInfo then + btn_shareInfo.onClick:Set( + function() + self:__ShareResultInfo() + end + ) + end + + local big_result = self._view:GetChild('big_result') + if big_result ~= nil then + if isBigFull then + + else + self._full = true + big_result:AddRelation(self._view, RelationType.Size) + big_result.width = self._view.width + big_result.height = self._view.height + end + + + local btn_share_copy = big_result:GetChild('btn_share_copy') + btn_share_copy.onClick:Set( + function() + big_result:GetController('share').selectedIndex = 0 + self:__ShareResultStr() + end + ) + + local btn_share_link = big_result:GetChild('btn_share_link') + btn_share_link.onClick:Set( + function() + big_result:GetController('share').selectedIndex = 0 + self:__ShareResultInfo() + end + ) + + local btn_share_photo = big_result:GetChild('btn_share_photo') + btn_share_photo.onClick:Set( + function() + big_result:GetController('share').selectedIndex = 0 + ShareScreenShotWithOption() + end + ) + + local btn_result_share = big_result:GetChild('btn_result_share') + btn_result_share.onClick:Set( + function() + big_result:GetController('share').selectedIndex = 1 + end + ) + + local btn_result_confirm = big_result:GetChild('btn_result_confirm') + btn_result_confirm.onClick:Set( + function() + self:Destroy() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + + local btn_close = big_result:GetChild('btn_close') + btn_close.onClick:Set( + function() + self:Destroy() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + + local btn_close_share = big_result:GetChild('btn_close_share') + btn_close_share.onClick:Set( + function() + big_result:GetController('share').selectedIndex = 0 + end + ) + end +end + + +-- 分享数据至聊天室,需在扩展填充数据,GenerateRoomResultInfo() +function M:__ShareResultInfo() + local info = self._resultInfo + local room = info.room + local cur_group = DataManager.SelfUser.cur_group + local play_name + if room.play_id and cur_group then + play_name = cur_group.curGroup:getPlayName(room.play_id) + end + ShareChatRoom( + info.room_id, + info.share_time, + info.round, + info.game_name, + info.groupId, + info.player_list, + self._root_view, + play_name + ) +end + +-- 生成分享到聊天室的结算数据 +-- round 回合数,没有就填nil +-- game_name 游戏名,如长沙麻将,仅保留必要的地名,如湘乡告胡子就可以简称告胡子 +-- room_id 房间号 +-- create_time 房间创建时间 +-- player_list 玩家列表,内含所有玩家的id和总分,如: +-- { +-- 1 = {id = 11, score = 60, house = 0, nick = "test"}, +-- 2 = {id = 12, score = 61, house = 1, nick = "test2"} +-- } +function M:GenerateRoomResultInfo(round, game_name, room_id, create_time, player_list) + local result_info = {} + result_info.share_time = tostring(os.time()) + result_info.create_time = create_time + result_info.round = round + result_info.game_name = game_name + result_info.room_id = room_id + result_info.player_list = player_list + result_info.groupId = DataManager.CurrenRoom.group_id or 0 + result_info.room = DataManager.CurrenRoom + self._resultInfo = result_info +end + +-- 分享文字 +function M:__ShareResultStr() + local str = '' + local sp = ' ' + local result_info = self._resultInfo + str = str .. '房间号:' .. result_info.room_id .. ' ' .. result_info.game_name .. ' ' .. result_info.round .. '局\r' + -- str = str .. "玩家" .. sp .. "ID" .. sp .. "积分" .. "\r" + for i = 1, #result_info.player_list do + local p = result_info.player_list[i] + str = str .. p.nick .. sp .. p.id .. ':' .. p.score .. '\r' + end + GameApplication.Instance:CopyToClipboard(str) + ViewUtil.ShowBannerOnScreenCenter('已复制战绩') +end + +function M:SetGSListlineGap(linespacing) + self._gameStatisticsLineSpacing = linespacing +end + +function M:InitBigResult(room, fontsize) + local big_result = self._view:GetChild('big_result') + if big_result ~= nil then + local player_list = big_result:GetChild('player_list') + player_list:RemoveChildrenToPool() + + big_result:GetChild('txt_room_id').text = '房号:' .. self._resultInfo.room_id + big_result:GetChild('txt_game_name').text = self._resultInfo.game_name + big_result:GetChild('txt_game_data').text = os.date('%Y-%m-%d %H:%M', os.time()) + + local str_roominfo = string.gsub(room.room_config:GetDes(), '\r', '') + big_result:GetChild('txt_play').text = str_roominfo + + if room.hpOnOff == 1 and room.score_times ~= 1 then + big_result:GetChild('txt_time').text = '倍数:' .. tostring(room.score_times) + big_result:GetController('time').selectedIndex = 1 + end + + local maxScore = 0 + local isWin = false + for i = 1, #self._resultInfo.player_list do + local player_info = self._resultInfo.player_list[i] + + local total_score = room:GetTotalScore(player_info.score) + local hp_nonnegative = room:checkHpNonnegative() + player_info.total_score = 0 + if hp_nonnegative then + local hp_info = player_info.hp_info + player_info.total_score = d2ad(hp_info.total_hp) + else + player_info.total_score = total_score + end + + if player_info.score > maxScore then + maxScore = player_info.score + end + + if player_info.id == room.self_player.self_user.account_id then + if player_info.total_score >= 0 then + isWin = true + end + end + end + + if isWin then + big_result:GetController('result').selectedIndex = 1 + else + big_result:GetController('result').selectedIndex = 0 + end + + for i = 1, #self._resultInfo.player_list do + local player_info = self._resultInfo.player_list[i] + + local item = player_list:AddItemFromPool() + item:GetChild('txt_name').text = player_info.nick + + local head = item:GetChild('head'):GetChild('n4') + ImageLoad.Load(player_info.head_url, head) + + if player_info.entrust ~= nil and player_info.entrust == true then + item:GetController('entrust').selectedIndex = 1 + else + item:GetController('entrust').selectedIndex = 0 + end + + if player_info.hp_info ~= nil and player_info.hp_info.cur_hp ~= nil then + item:GetChild('txt_reserve_hp').text = '积分:' .. tostring(d2ad(player_info.hp_info.cur_hp)) + end + + if player_info.total_score ~= nil then + if tostring(player_info.score) == tostring(maxScore) and player_info.score > 0 then + item:GetController('big_win').selectedIndex = 1 + else + item:GetController('big_win').selectedIndex = 0 + end + + if player_info.total_score >= 0 then + item:GetController('pn').selectedIndex = 1 + item:GetChild('txt_positive').text = '+' .. tostring(player_info.total_score) + else + item:GetController('pn').selectedIndex = 0 + item:GetChild('txt_navigate').text = tostring(player_info.total_score) + end + end + + player_info.score = room:GetTotalScore(player_info.score) + + local list_param = item:GetChild('list_param') + list_param:RemoveChildrenToPool() + if self._gameStatisticsLineSpacing ~= nil then + list_param.lineGap = self._gameStatisticsLineSpacing + end + + if player_info.param ~= nil then + local big = false + if #player_info.param <= 4 then + big = true + end + + for i = 1, #player_info.param do + local pitem = list_param:AddItemFromPool() + + pitem:GetChild('txt_key').text = player_info.param[i].key + pitem:GetChild('txt_value').text = player_info.param[i].value + + if fontsize ~= nil and fontsize > 0 then + pitem:GetChild('txt_key').textFormat.size = fontsize + pitem:GetChild('txt_value').textFormat.size = fontsize + else + if big then + pitem:GetChild('txt_key').textFormat.size = 30 + pitem:GetChild('txt_value').textFormat.size = 12 + else + pitem:GetChild('txt_key').textFormat.size = 24 + pitem:GetChild('txt_value').textFormat.size = 8 + end + end + end + end + + local flag = item:GetChild('flag') + flag:RemoveChildrenToPool() + if player_info.flag ~= nil and #player_info.flag > 0 then + for i = 1, #player_info.flag do + local pitem = flag:AddItemFromPool() + + pitem:GetChild('txt_name').text = player_info.flag[i] + end + item:GetController('have_flag').selectedIndex = 1 + else + item:GetController('have_flag').selectedIndex = 0 + end + + if player_info.id == room.self_player.self_user.account_id then + item:GetController('self').selectedIndex = 1 + else + item:GetController('self').selectedIndex = 0 + end + end + + local btn_continue_game = big_result:GetChild('btn_continue_game') + if btn_continue_game then + local gid = room.group_id + if gid ~= 0 then + btn_continue_game.visible = true + local pid = room.room_config.pid + local game_id = room.game_id + btn_continue_game.onClick:Set( + function() + self:ContinueGame(gid, pid, game_id) + end + ) + end + end + end +end + +-- 继续游戏 +function M:ContinueGame(gid, pid, game_id) + ViewUtil.ShowModalWait(self._root_view, nil, 'join_room') + local roomCtr = ControllerManager.GetController(RoomController) + roomCtr:PublicJoinRoom( + Protocol.WEB_FG_MATCH_ROOM, + "", + false, + function(response) + if (response.ReturnCode == -1) then + ViewUtil.CloseModalWait('join_room') + RestartGame() + return + end + + if response.ReturnCode ~= 0 then + ViewUtil.ErrorMsg(self._root_view, response.ReturnCode, '进入房间失败') + ViewUtil.CloseModalWait("join_room") + self:Destroy() + ViewManager.ChangeView(ViewManager.View_Lobby) + return + else + ViewManager.ChangeView(ViewManager.View_Main, game_id) + ViewUtil.CloseModalWait('join_room') + end + end, + gid, + pid + ) +end diff --git a/lua_probject/base_project/Game/View/RoomInfoView.lua b/lua_probject/base_project/Game/View/RoomInfoView.lua new file mode 100644 index 00000000..df515ea8 --- /dev/null +++ b/lua_probject/base_project/Game/View/RoomInfoView.lua @@ -0,0 +1,80 @@ +RoomInfoView = {} + +local M = RoomInfoView + +function RoomInfoView.new(_room, auto_close) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "RoomInfoView" + self._close_destroy = true + self._close_zone = true + + self._auto_close = auto_close + self:init("ui://Common/GameRule",_room) + return self +end +function M:init( url,_room ) + BaseWindow.init(self,url) + self._close_time = 3 + local _mainView = self._view + + self._view:GetChild("btn_close2").onClick:Add(function() + self:Destroy() + end) + self:FillRoomConfig(self._view:GetChild("rule"),_room) + + self:FillGameConfig(self._view:GetChild("point"),_room) + --self:FillGameConfig(_room) +end + +function M:FillRoomConfig(roominfo_panel,_room) + if _room.room_id and _room.room_id ~= "" then + local tex_roomid = roominfo_panel:GetChild("tex_roomid") + tex_roomid.text = _room.room_id + else + roominfo_panel:GetController("hide_id").selectedIndex = 1 + end + local tex_gametype = roominfo_panel:GetChild("tex_gametype") + tex_gametype.text = _room.room_config:GetGameName() + + local tex_roomconfig = roominfo_panel:GetChild("tex_roomconfig") + tex_roomconfig.text = _room.room_config:GetDes() +end + +function M:FillGameConfig(parentP,_room) + --local tex_roomconfig = roominfo_panel:GetChild("tex_roomconfig") + --tex_roomconfig.text = _room.room_config:GetGameJS() + --local tempX,tempY=_room.room_config:GetGameSMSize() + --if tempX and tempY then + -- tex_roomconfig:SetSize(tempX,tempY) + --end + + --[[local gameR=_room.room_config:GetGameJS() + if gameR then + parentP:AddChild(gameR) + end--]] +end + + +function M:Show() + BaseWindow.Show(self) + if self._run_close then + coroutine.stop(self._run_close) + end + if self._auto_close then + self._view:GetController("auto_close").selectedIndex = 1 + self._run_close = coroutine.start(function() + while self._close_time > 0 do + local tex_time = self._view:GetChild("tex_time") + tex_time.text = "自动关闭剩余" .. self._close_time .. "s" + coroutine.wait(1) + self._close_time = self._close_time - 1 + end + self:Destroy() + end) + end +end + + + +return M diff --git a/lua_probject/base_project/Game/View/RuleView.lua b/lua_probject/base_project/Game/View/RuleView.lua new file mode 100644 index 00000000..5ae9319f --- /dev/null +++ b/lua_probject/base_project/Game/View/RuleView.lua @@ -0,0 +1,24 @@ + +RuleView = {} + +local M = RuleView + +function RuleView.new(blur_view ,text) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "RuleView" + self._blur_view = blur_view + self:init("ui://Common/GameRule", text) + return self +end +function M:init(url, text) + BaseWindow.init(self, url) + local _mainView = self._view + local list = self._view:GetChild("list_rule") + list:RemoveChildrenToPool() + local item = list:AddItemFromPool() + item:GetChild("tex_rule").text = text +end + + +return M diff --git a/lua_probject/base_project/Game/View/SettingView.lua b/lua_probject/base_project/Game/View/SettingView.lua new file mode 100644 index 00000000..fe1c12d5 --- /dev/null +++ b/lua_probject/base_project/Game/View/SettingView.lua @@ -0,0 +1,205 @@ +--设置窗口对象 +--author:-- + +local TableBG = import 'Game.Data.TableBG' + +local SettingView = {} + +local M = SettingView +setmetatable(M, {__index = BaseWindow}) + +function SettingView.new(blur_view) + local self = setmetatable({}, {__index = M}) + self.class = 'SettingView' + self._currenIndex = 0 + self._blur_view = blur_view + self.onCallback = event('onCallback', true) + self.stateIndex = 0 + self.cd_time = 0 + self._btn_dismiss_room_enable = true + self._close_destroy = true + self._default_bg = 0 + self:init('ui://Common/SettingWindow1') + return self +end + +function M:init(url) + + BaseWindow.init(self, url) + + local view = self._view + local slider_sound = view:GetChild('slider_sound') + local slider_music = view:GetChild('slider_music') + -- local btn_music = view:GetChild('btn_music') + -- local btn_sound = view:GetChild('btn_sound') + + -- btn_music.selected = (GameApplication.Instance.MusicValue < 5 and false or true) + slider_sound.value = GameApplication.Instance.SoundValue + slider_music.value = GameApplication.Instance.MusicValue + -- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true + + slider_music.onChanged:Add( + function() + GameApplication.Instance.MusicValue = slider_music.value + -- btn_music.selected = GameApplication.Instance.MusicValue < 5 and false or true + end + ) + + slider_sound.onChanged:Add( + function() + GameApplication.Instance.SoundValue = slider_sound.value + -- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true + end + ) + + -- btn_sound.onChanged:Add( + -- function() + -- GameApplication.Instance.SoundValue = btn_sound.selected and 50 or 0 + -- slider_sound.value = GameApplication.Instance.SoundValue + -- end + -- ) + + -- btn_music.onChanged:Add( + -- function() + -- GameApplication.Instance.MusicValue = btn_music.selected and 50 or 0 + -- slider_music.value = GameApplication.Instance.MusicValue + -- end + -- ) + + self._stateController = view:GetController('state') + self.cd_time_text = view:GetChild('n35') + + local _btn_quit = view:GetChild('btn_quit') + if _btn_quit then + _btn_quit.onClick:Set( + function() + local _curren_msg = MsgWindow.new(self._root_view, '您是否退出游戏?', MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add( + function() + Application.Quit() + end + ) + _curren_msg:Show() + end + ) + end + + local _btn_logout = view:GetChild('btn_logout') + if _btn_logout then + _btn_logout.onClick:Add( + function() + local _curren_msg = MsgWindow.new(self._root_view, '您是否退出当前账号?', MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add( + function() + PlayerPrefs.DeleteKey('session_id') + PlayerPrefs.Save() + RestartGame() + end + ) + _curren_msg:Show() + end + ) + end + local _btn_dismiss_room = view:GetChild('btn_dismiss_room') + self._btn_dismiss_room = _btn_dismiss_room + if _btn_dismiss_room then + _btn_dismiss_room.onClick:Add( + function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:AskDismissRoom() + self:Destroy() + end + ) + end + -- local btn_close = self._view:GetChild("btn_close") + -- if btn_close then + -- btn_close.onClick:Add(function( ... ) + + -- end) + -- end +end + +--赋值bg_config +function M:GetBGConfig() + return TableBG.GetBGConfig() +end +--获得背景 +function M:GetBgByGameId(game_id) + return TableBG.GetTableBG(game_id) +end +--显示背景选项,并加载背景 +function M:FillBgSection(cb, game_id, default_bg, bg_config) + local view = self._view + local lst_bg = view:GetChild('lst_bg') + local ctr_bg = view:GetController('bg') + bg_config = bg_config or self:GetBGConfig() + for i = 1, #bg_config do + local config = bg_config[i] + local item = lst_bg:AddItemFromPool() + item.icon = config.thumb + --printlog("显示背景选项,并加载背景",item.icon) + item.data = config + if i > 6 then + ctr_bg:AddPage(i - 1) + end + item.onClick:Add( + function(index) + cb(config.url,i) + end + ) + end + self._game_id = game_id + self._default_bg = default_bg + self._bg = self:GetBgByGameId(game_id) + if self._bg > 0 then + lst_bg.selectedIndex = self._bg - 1 + else + lst_bg.selectedIndex = default_bg - 1 + end +end + +function M:Show() + self._stateController.selectedIndex = self.stateIndex + BaseWindow.Show(self) + if self.cd_coroutine ~= nil then + coroutine.stop(self.cd_coroutine) + end + if self._stateController.selectedIndex == 2 and self.cd_time_text ~= nil then + self.cd_coroutine = + coroutine.start( + function() + while (self.cd_time > 0) do + self:SetCanDissroom(false) + self.cd_time = self.cd_time - 1 + self.cd_time = math.max(0, self.cd_time) + self.cd_time_text.text = tostring(math.ceil(self.cd_time)) + if self.cd_time > 0 then + coroutine.wait(1) + end + end + self:SetCanDissroom(self._btn_dismiss_room_enable) + self.cd_time_text.text = '' + end + ) + end +end + +function M:Destroy() + local bg_id = self._view:GetController('bg').selectedIndex + 1 + if self._bg ~= bg_id then + self._bg = bg_id + TableBG.SaveTableBG(self._game_id, self._bg) + end + BaseWindow.Destroy(self) +end + +function M:SetCanDissroom(enable) + self._btn_dismiss_room.enabled = enable +end + +function M:SetBtnDismissRoomEnable(enable) + self._btn_dismiss_room_enable = enable + self:SetCanDissroom(enable) +end + +return M diff --git a/lua_probject/base_project/Game/View/ViewUtil.lua b/lua_probject/base_project/Game/View/ViewUtil.lua new file mode 100644 index 00000000..b6c76517 --- /dev/null +++ b/lua_probject/base_project/Game/View/ViewUtil.lua @@ -0,0 +1,326 @@ +ViewUtil = { + Num_Converted = { "一", "二", "三", "四" }, + + Sex_Chat = { + "man", + "woman" + }, + + Fix_Msg_Chat = { + "大家好,很高兴见到各位!", + "和你合作太愉快了!", + "快点啊,我等的花儿都谢了!", + "你丫的牌打得也忒好了", + "不要吵了不要吵了,吵什么吵啊,专心打牌", + "怎么又断线了,网络这么差!", + "各位,真不好意思啊,我得离开一会", + "不要走,决战到天亮!", + "你是妹妹,还是哥哥啊?", + "我们交个朋友吧,能不能告诉我你的联系方法", + "再见了,我会想念大家的", + "不好意思临时有事,申请解散!" + } +} + +function ViewUtil.GetPos(self_seat,seat,people_num) + if self_seat == 0 then return seat end + local cur_seat = self_seat + local tem = seat - (cur_seat - 1) + if (tem <= 0) then tem = tem +people_num end + return tem +end + +-- 隐藏手机号 +function ViewUtil.phone_hide(phone) + return string.sub(phone,1,3).."****"..string.sub(phone,8) +end + +-- 隐藏身份证 +function ViewUtil.identity_hide(identity) + return string.sub(identity,1,8).."****"..string.sub(identity,13) +end + +local modal_wait_win =nil +-- local modal_wait_win_url = "ui://Common/GlobalModalWaiting" +function ViewUtil.ShowModalWait(blur_view, title) + ViewUtil.CloseModalWait() + ModalWaitingWindow.ShowModal(title) +end + +function ViewUtil.CloseModalWait() + ModalWaitingWindow.CloseModal() +end + +local _defaultTooltipWin =nil +local function __waittips(obj) + _defaultTooltipWin:Dispose() + _defaultTooltipWin = nil +end + +local _tip_timer +local function __ShowTips(msg,time) + time = time or 2 + if _defaultTooltipWin then + _tip_timer:Stop() + _defaultTooltipWin:Dispose() + _defaultTooltipWin = nil + end + _defaultTooltipWin = UIPackage.CreateObjectFromURL("ui://Common/ToolsTip") + _defaultTooltipWin.touchable = false + _defaultTooltipWin.text = msg + GRoot.inst:AddChild(_defaultTooltipWin) + _defaultTooltipWin:MakeFullScreen() + _tip_timer = Timer.New(function() + __waittips() + end,time,1,true) + _tip_timer:Start() +end + +function ViewUtil.ErrorTip(code,tip,time) + if(Table_Error_code_Map[code]~=nil) then + __ShowTips(string.format("%s",Table_Error_code_Map[code].note), time) + else + __ShowTips(tip,time) + end +end + +function ViewUtil.ErrorMsg(_root_view,code,tip,url) + local msg = tip + if(Table_Error_code_Map[code]~=nil) then + msg = string.format("%s",Table_Error_code_Map[code].note) + end + local _curren_msg = MsgWindow.new(_root_view, msg, MsgWindow.MsgMode.OnlyOk,url) + _curren_msg:Show() +end + +function ViewUtil.ShowTips(msg) + __ShowTips(msg) +end + +function ViewUtil.ShowBannerOnScreenCenter(msg, s) + local time = s or 0.8 + if ViewUtil._banner then + ViewUtil._banner:Dispose() + end + local banner = UIPackage.CreateObjectFromURL("ui://Common/Pop_tips") + banner:GetChild("tex_tip").text = msg + GRoot.inst:AddChild(banner) + banner:Center() + ViewUtil._banner = banner + local timer = Timer.New(function() + banner:Dispose() + end,time,1,true) + timer:Start() +end + +function ViewUtil.PlaySoundBg() + GameApplication.Instance:PlayMuisc("base/common/sound/bgmusic1.mp3") +end + +function ViewUtil.HandCardSort(a,b) + local sort_a = a + local sort_b = b + if a >= 400 then sort_a = sort_a -1000 end + if b >= 400 then sort_b = sort_b - 1000 end + + return sort_a>>",prefix,ct) + return prefix +end + +function get_majiang_card_type(game_id) + local ct_data = nil + local json_data = Utils.LoadLocalFile("CardTypeData") + if json_data then + ct_data = json.decode(json_data) + else + ct_data = {} + end + ct = ct_data[tostring(game_id)] or 0 + return ct +end + +-- 数据转换成3位小数 data to a decimal +function d2ad(data) + return data / 1000 +end + +-- 3位小数转换成数据 a decimal to data +function ad2d(decimal) + return decimal * 1000 +end + +-- 获取gps +function get_gps(callback) + if Application.platform == RuntimePlatform.IPhonePlayer or Application.platform == RuntimePlatform.Android then + local s,e = pcall(function() + Utils.LocalAddress(function(result, latitude, longitude) + if not result or (latitude == 0 and longitude == 0) then return end + DataManager.SelfUser.location = Location.new(tostring(longitude) .. "," .. tostring(latitude)) + if callback then callback() end + end) + end) + if not s then + --print("Error" .. e) + end + elseif Application.platform == RuntimePlatform.WindowsPlayer or Application.platform == RuntimePlatform.WindowsEditor then + -- DataManager.SelfUser.location = Location.new(string.format("%s,%s", math.random(10,20), math.random(10,20))) + DataManager.SelfUser.location = Location.new("10,10") + if callback then callback() end + end +end + +--依据宽度截断字符 +function ViewUtil.stringEllipsis(szText,size,full) + + full = full or false + size = size or 4 + --截断结果 + local szResult = "..." + --完成判断 + local bOK = false + + local i = 1 + local char_count = 0 + while true do + local cur = string.sub(szText,i,i) + local byte = string.byte(cur) + if byte == nil then + break + end + + if char_count >= size and full == false then + bOK = true + break + end + + if byte > 128 then + i = i + 3 + char_count = char_count + 1 + elseif byte ~= 32 then + + if string.byte('A') <= byte and byte <= string.byte('Z') then + + char_count = char_count + 1 + else + char_count = char_count + 0.5 + end + i = i + 1 + else + i = i + 1 + char_count = char_count + 0.5 + end + end + + if i ~= 1 then + szResult = string.sub(szText, 1, i-1) + if(bOK) then + szResult = szResult.."..." + end + end + return szResult +end + +-------------------------lingmeng--------------------------- +function ViewUtil.ShowOneChooose(showText,btnType,callback) + local pop_oneChoose = UIPackage.CreateObjectFromURL("ui://Common/pop_oneChoose") + pop_oneChoose:GetChild('text_show').text = showText + GRoot.inst:AddChild(pop_oneChoose) + pop_oneChoose:Center() + local btn_center = pop_oneChoose:GetChild('btn_center') + if type(btnType) == "number" then + btn_center.icon = string.format("ui://Common/btn_%d",btnType) + else + btn_center.icon = btnType + end + btn_center.onClick:Add(function() + GRoot.inst:RemoveChild(pop_oneChoose) + if callback then + callback() + end + end) +end \ No newline at end of file diff --git a/lua_probject/base_project/Game/View/init.lua b/lua_probject/base_project/Game/View/init.lua new file mode 100644 index 00000000..39ce9ebe --- /dev/null +++ b/lua_probject/base_project/Game/View/init.lua @@ -0,0 +1,20 @@ +local VIEW_MODEL_NAME = ... + +import(".Common.BaseView") +import(".Common.BaseWindow") +import(".Common.MsgWindow") +import(".Common.NetResetConnectWindow") +import(".Common.ModalWaitingWindow") +import(".Common.ImageLoad") + +import(".ViewUtil") +import(".HeadView") + +import(".LoginView") +import(".LobbyView") +import(".FamilyView") +import(".MainView") + +import(".PlayBackView") +import(".RuleView") +import(".RoomInfoView") \ No newline at end of file diff --git a/lua_probject/base_project/Game/ViewManager.lua b/lua_probject/base_project/Game/ViewManager.lua new file mode 100644 index 00000000..84bc86dc --- /dev/null +++ b/lua_probject/base_project/Game/ViewManager.lua @@ -0,0 +1,172 @@ +require "Game.View.init" + +--- +-- a net ViewManager +ViewManager = { + + View_Login = 1, + + View_Lobby = 2, + + View_Main = 3, + + View_PlayBack = 4, + + View_Family = 5, +} + + +local _viewClassMap = {} +local _currenView = nil +local _viewMap = {} + +local _curren_msg +local function __NetTip(txt_msg) + if _curren_msg then + _curren_msg:Destroy() + _curren_msg = nil + end + -- 断网时关闭托管 + if _currenView.UnmarkSelfTuoguan then + _currenView:UnmarkSelfTuoguan() + end + _curren_msg = BaseWindow.new("ui://Common/Win_ConnectTip",_currenView._root_view) + local view = _curren_msg._view + view:GetChild("tex_message").text = txt_msg + view:GetChild("btn_connect").onClick:Set(function() + _curren_msg:Destroy() + _curren_msg = nil + NetResetConnectWindow.ShowNetReset() + ControllerManager.reset_join_room = 0 + ControllerManager.ResetJionRoom() + end) + view:GetChild("btn_back").onClick:Set(function() + _curren_msg:Destroy() + _curren_msg = nil + NetResetConnectWindow.CloseNetReset() + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + _curren_msg._close_zone = false + _curren_msg._animation = false + _curren_msg:Show() +end + +local function __OnGameConnectAction(state) + --print("state:"..state) + NetResetConnectWindow.CloseNetReset() + if state == SocketCode.Connect then + ViewManager.ChangeView(ViewManager.View_Main,DataManager.CurrenRoom.game_id) + return + elseif state == SocketCode.DisconnectByServer then + __NetTip("网络断开连接!") + elseif state == SocketCode.ExceptionOnConnect or state == SocketCode.NetworkException then + __NetTip("请检查您的网络环境!") + elseif state == SocketCode.Disconnect then + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) + else + NetResetConnectWindow.ShowNetReset() + end + ViewUtil.CloseModalWait() +end + +function ViewManager.Init() + _viewClassMap[ViewManager.View_Login] = LoginView + _viewClassMap[ViewManager.View_Lobby] = LobbyView + _viewClassMap[ViewManager.View_Family] = FamilyView + + ControllerManager.OnGameConnect = __OnGameConnectAction + + ControllerManager.WebClient.holdCallback = function( response ) + if response.ReturnCode == Table_Error_code.ERR_LOGOUT then + PlayerPrefs.DeleteKey("session_id") + PlayerPrefs.Save() + end + if response.ReturnCode == -1 or response.ReturnCode == Table_Error_code.ERR_LOGOUT then + ViewUtil.CloseModalWait() + NetResetConnectWindow.CloseNetReset() + RestartGame() + return true + end + return false + end +end + +function ViewManager.GetCurrenView() + return _currenView +end + +function ViewManager.ChangeViewByClass(dview_class,callback) + if (_currenView ~= nil) then + if _currenView._close_destroy then + _currenView:Destroy() + _viewMap[_currenView.dview_class] = nil + else + _currenView:Close() + end + if _currenView._s_callback then + _currenView._s_callback() + end + end + local tem = _viewMap[dview_class] + if not tem then + tem = dview_class.new() + tem._s_callback = callback + _viewMap[dview_class] = tem + end + tem.Id = id + tem.dview_class = dview_class + tem:Show() + _currenView = tem + return tem +end + +local last_game_id = 0 +function ViewManager.ChangeView(id,game_id,callback) + -- if id==2 then + -- printlog("cccccccccccccccccccccccccccccccc") + -- printlog(debug.traceback()) + --- end + local dview_class = _viewClassMap[id] + if not dview_class then + if last_game_id ~= 0 and last_game_id ~= game_id then + ExtendManager.GetExtendConfig(last_game_id):UnAssets() + end + local exconfig = ExtendManager.GetExtendConfig(game_id) + dview_class = exconfig:GetView(id) + last_game_id = game_id + end + if not dview_class then + return + end + return ViewManager.ChangeViewByClass(dview_class,callback) +end + +function ViewManager.OnApplicationPause() + -- print("game pause") + if (_currenView ~= nil) then + _currenView:OnApplicationPause() + end +end + +function ViewManager.OnApplicationActive() + -- print("game active") + if (_currenView ~= nil) then + _currenView:OnApplicationActive() + end +end + +function ViewManager.refreshGameView() + NetResetConnectWindow.ShowNetReset() + + if DataManager.CurrenRoom then + ControllerManager.reset_join_room = 0 + + ControllerManager.ResetJionRoom() + else + NetResetConnectWindow.CloseNetReset() + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) + end +end diff --git a/lua_probject/base_project/LuaDebug.lua b/lua_probject/base_project/LuaDebug.lua new file mode 100644 index 00000000..f7481d24 --- /dev/null +++ b/lua_probject/base_project/LuaDebug.lua @@ -0,0 +1,2617 @@ +local debugger_reLoadFile =nil +xpcall(function() + debugger_reLoadFile = require("luaideReLoadFile") +end,function() + debugger_reLoadFile = function() print("未实现代码重载") end +end) +local debugger_stackInfo = nil +local coro_debugger = nil +local debugger_require = require +local debugger_exeLuaString = nil +local checkSetVar = nil +local loadstring_ = nil +local debugger_sendMsg = nil +if (loadstring) then + loadstring_ = loadstring +else + loadstring_ = load +end +--只针对 luadebug 调试 jit版本不存在这个问题 +local setfenv = setfenv +if (not setfenv) then + setfenv = + function(fn, env) + local i = 1 + while true do + local name = debug.getupvalue(fn, i) + if name == "_ENV" then + debug.upvaluejoin( + fn, + i, + (function() + return env + end), + 1 + ) + break + elseif not name then + break + end + + i = i + 1 + end + return fn + end +end +local ZZBase64 = {} +local LuaDebugTool_ = nil +if (LuaDebugTool) then + LuaDebugTool_ = LuaDebugTool +elseif (CS and CS.LuaDebugTool) then + LuaDebugTool_ = CS.LuaDebugTool +end +local LuaDebugTool = LuaDebugTool_ +local loadstring = loadstring_ +local getinfo = debug.getinfo +local function createSocket() + local base = _G + local string = require("string") + local math = require("math") + local socket = require("socket.core") + + local _M = socket + + ----------------------------------------------------------------------------- + -- Exported auxiliar functions + ----------------------------------------------------------------------------- + function _M.connect4(address, port, laddress, lport) + return socket.connect(address, port, laddress, lport, "inet") + end + + function _M.connect6(address, port, laddress, lport) + return socket.connect(address, port, laddress, lport, "inet6") + end + + if (not _M.connect) then + function _M.connect(address, port, laddress, lport) + local sock, err = socket.tcp() + if not sock then + return nil, err + end + if laddress then + local res, err = sock:bind(laddress, lport, -1) + if not res then + return nil, err + end + end + local res, err = sock:connect(address, port) + if not res then + return nil, err + end + return sock + end + end + function _M.bind(host, port, backlog) + if host == "*" then + host = "0.0.0.0" + end + local addrinfo, err = socket.dns.getaddrinfo(host) + if not addrinfo then + return nil, err + end + local sock, res + err = "no info on address" + for i, alt in base.ipairs(addrinfo) do + if alt.family == "inet" then + sock, err = socket.tcp4() + else + sock, err = socket.tcp6() + end + if not sock then + return nil, err + end + sock:setoption("reuseaddr", true) + res, err = sock:bind(alt.addr, port) + if not res then + sock:close() + else + res, err = sock:listen(backlog) + if not res then + sock:close() + else + return sock + end + end + end + return nil, err + end + + _M.try = _M.newtry() + + function _M.choose(table) + return function(name, opt1, opt2) + if base.type(name) ~= "string" then + name, opt1, opt2 = "default", name, opt1 + end + local f = table[name or "nil"] + if not f then + base.error("unknown key (" .. base.tostring(name) .. ")", 3) + else + return f(opt1, opt2) + end + end + end + + ----------------------------------------------------------------------------- + -- Socket sources and sinks, conforming to LTN12 + ----------------------------------------------------------------------------- + -- create namespaces inside LuaSocket namespace + local sourcet, sinkt = {}, {} + _M.sourcet = sourcet + _M.sinkt = sinkt + + _M.BLOCKSIZE = 2048 + + sinkt["close-when-done"] = + function(sock) + return base.setmetatable( + { + getfd = function() + return sock:getfd() + end, + dirty = function() + return sock:dirty() + end + }, + { + __call = function(self, chunk, err) + if not chunk then + sock:close() + return 1 + else + return sock:send(chunk) + end + end + } + ) + end + + sinkt["keep-open"] = + function(sock) + return base.setmetatable( + { + getfd = function() + return sock:getfd() + end, + dirty = function() + return sock:dirty() + end + }, + { + __call = function(self, chunk, err) + if chunk then + return sock:send(chunk) + else + return 1 + end + end + } + ) + end + + sinkt["default"] = sinkt["keep-open"] + + _M.sink = _M.choose(sinkt) + + sourcet["by-length"] = + function(sock, length) + return base.setmetatable( + { + getfd = function() + return sock:getfd() + end, + dirty = function() + return sock:dirty() + end + }, + { + __call = function() + if length <= 0 then + return nil + end + local size = math.min(socket.BLOCKSIZE, length) + local chunk, err = sock:receive(size) + if err then + return nil, err + end + length = length - string.len(chunk) + return chunk + end + } + ) + end + + sourcet["until-closed"] = + function(sock) + local done + return base.setmetatable( + { + getfd = function() + return sock:getfd() + end, + dirty = function() + return sock:dirty() + end + }, + { + __call = function() + if done then + return nil + end + local chunk, err, partial = sock:receive(socket.BLOCKSIZE) + if not err then + return chunk + elseif err == "closed" then + sock:close() + done = 1 + return partial + else + return nil, err + end + end + } + ) + end + + sourcet["default"] = sourcet["until-closed"] + + _M.source = _M.choose(sourcet) + + return _M +end + +local function createJson() + local math = require("math") + local string = require("string") + local table = require("table") + local object = nil + ----------------------------------------------------------------------------- + -- Module declaration + ----------------------------------------------------------------------------- + local json = {} -- Public namespace + local json_private = {} -- Private namespace + + -- Public constants + json.EMPTY_ARRAY = {} + json.EMPTY_OBJECT = {} + -- Public functions + + -- Private functions + local decode_scanArray + local decode_scanComment + local decode_scanConstant + local decode_scanNumber + local decode_scanObject + local decode_scanString + local decode_scanWhitespace + local encodeString + local isArray + local isEncodable + + ----------------------------------------------------------------------------- + -- PUBLIC FUNCTIONS + ----------------------------------------------------------------------------- + --- Encodes an arbitrary Lua object / variable. + -- @param v The Lua object / variable to be JSON encoded. + -- @return String containing the JSON encoding in internal Lua string format (i.e. not unicode) + function json.encode(v) + -- Handle nil values + if v == nil then + return "null" + end + + local vtype = type(v) + + -- Handle strings + if vtype == "string" then + return '"' .. json_private.encodeString(v) .. '"' -- Need to handle encoding in string + end + + -- Handle booleans + if vtype == "number" or vtype == "boolean" then + return tostring(v) + end + + -- Handle tables + if vtype == "table" then + local rval = {} + -- Consider arrays separately + local bArray, maxCount = isArray(v) + if bArray then + for i = 1, maxCount do + table.insert(rval, json.encode(v[i])) + end + else -- An object, not an array + for i, j in pairs(v) do + if isEncodable(i) and isEncodable(j) then + table.insert(rval, '"' .. json_private.encodeString(i) .. '":' .. json.encode(j)) + end + end + end + if bArray then + return "[" .. table.concat(rval, ",") .. "]" + else + return "{" .. table.concat(rval, ",") .. "}" + end + end + + -- Handle null values + if vtype == "function" and v == json.null then + return "null" + end + + assert(false, "encode attempt to encode unsupported type " .. vtype .. ":" .. tostring(v)) + end + + --- Decodes a JSON string and returns the decoded value as a Lua data structure / value. + -- @param s The string to scan. + -- @param [startPos] Optional starting position where the JSON string is located. Defaults to 1. + -- @param Lua object, number The object that was scanned, as a Lua table / string / number / boolean or nil, + -- and the position of the first character after + -- the scanned JSON object. + function json.decode(s, startPos) + startPos = startPos and startPos or 1 + startPos = decode_scanWhitespace(s, startPos) + assert(startPos <= string.len(s), "Unterminated JSON encoded object found at position in [" .. s .. "]") + local curChar = string.sub(s, startPos, startPos) + -- Object + if curChar == "{" then + return decode_scanObject(s, startPos) + end + -- Array + if curChar == "[" then + return decode_scanArray(s, startPos) + end + -- Number + if string.find("+-0123456789.e", curChar, 1, true) then + return decode_scanNumber(s, startPos) + end + -- String + if curChar == '"' or curChar == [[']] then + return decode_scanString(s, startPos) + end + if string.sub(s, startPos, startPos + 1) == "/*" then + return json.decode(s, decode_scanComment(s, startPos)) + end + -- Otherwise, it must be a constant + return decode_scanConstant(s, startPos) + end + + --- The null function allows one to specify a null value in an associative array (which is otherwise + -- discarded if you set the value with 'nil' in Lua. Simply set t = { first=json.null } + function json.null() + return json.null -- so json.null() will also return null ;-) + end + ----------------------------------------------------------------------------- + -- Internal, PRIVATE functions. + -- Following a Python-like convention, I have prefixed all these 'PRIVATE' + -- functions with an underscore. + ----------------------------------------------------------------------------- + --- Scans an array from JSON into a Lua object + -- startPos begins at the start of the array. + -- Returns the array and the next starting position + -- @param s The string being scanned. + -- @param startPos The starting position for the scan. + -- @return table, int The scanned array as a table, and the position of the next character to scan. + function decode_scanArray(s, startPos) + local array = {} -- The return value + local stringLen = string.len(s) + assert( + string.sub(s, startPos, startPos) == "[", + "decode_scanArray called but array does not start at position " .. startPos .. " in string:\n" .. s + ) + startPos = startPos + 1 + -- Infinite loop for array elements + repeat + startPos = decode_scanWhitespace(s, startPos) + assert(startPos <= stringLen, "JSON String ended unexpectedly scanning array.") + local curChar = string.sub(s, startPos, startPos) + if (curChar == "]") then + return array, startPos + 1 + end + if (curChar == ",") then + startPos = decode_scanWhitespace(s, startPos + 1) + end + assert(startPos <= stringLen, "JSON String ended unexpectedly scanning array.") + object, startPos = json.decode(s, startPos) + table.insert(array, object) + until false + end + + --- Scans a comment and discards the comment. + -- Returns the position of the next character following the comment. + -- @param string s The JSON string to scan. + -- @param int startPos The starting position of the comment + function decode_scanComment(s, startPos) + assert( + string.sub(s, startPos, startPos + 1) == "/*", + "decode_scanComment called but comment does not start at position " .. startPos + ) + local endPos = string.find(s, "*/", startPos + 2) + assert(endPos ~= nil, "Unterminated comment in string at " .. startPos) + return endPos + 2 + end + + --- Scans for given constants: true, false or null + -- Returns the appropriate Lua type, and the position of the next character to read. + -- @param s The string being scanned. + -- @param startPos The position in the string at which to start scanning. + -- @return object, int The object (true, false or nil) and the position at which the next character should be + -- scanned. + function decode_scanConstant(s, startPos) + local consts = {["true"] = true, ["false"] = false, ["null"] = nil} + local constNames = {"true", "false", "null"} + + for i, k in pairs(constNames) do + if string.sub(s, startPos, startPos + string.len(k) - 1) == k then + return consts[k], startPos + string.len(k) + end + end + assert(nil, "Failed to scan constant from string " .. s .. " at starting position " .. startPos) + end + + --- Scans a number from the JSON encoded string. + -- (in fact, also is able to scan numeric +- eqns, which is not + -- in the JSON spec.) + -- Returns the number, and the position of the next character + -- after the number. + -- @param s The string being scanned. + -- @param startPos The position at which to start scanning. + -- @return number, int The extracted number and the position of the next character to scan. + function decode_scanNumber(s, startPos) + local endPos = startPos + 1 + local stringLen = string.len(s) + local acceptableChars = "+-0123456789.e" + while (string.find(acceptableChars, string.sub(s, endPos, endPos), 1, true) and endPos <= stringLen) do + endPos = endPos + 1 + end + local stringValue = "return " .. string.sub(s, startPos, endPos - 1) + local stringEval = loadstring(stringValue) + assert( + stringEval, + "Failed to scan number [ " .. stringValue .. "] in JSON string at position " .. startPos .. " : " .. endPos + ) + return stringEval(), endPos + end + + --- Scans a JSON object into a Lua object. + -- startPos begins at the start of the object. + -- Returns the object and the next starting position. + -- @param s The string being scanned. + -- @param startPos The starting position of the scan. + -- @return table, int The scanned object as a table and the position of the next character to scan. + function decode_scanObject(s, startPos) + local object = {} + local stringLen = string.len(s) + local key, value + assert( + string.sub(s, startPos, startPos) == "{", + "decode_scanObject called but object does not start at position " .. startPos .. " in string:\n" .. s + ) + startPos = startPos + 1 + repeat + startPos = decode_scanWhitespace(s, startPos) + assert(startPos <= stringLen, "JSON string ended unexpectedly while scanning object.") + local curChar = string.sub(s, startPos, startPos) + if (curChar == "}") then + return object, startPos + 1 + end + if (curChar == ",") then + startPos = decode_scanWhitespace(s, startPos + 1) + end + assert(startPos <= stringLen, "JSON string ended unexpectedly scanning object.") + -- Scan the key + key, startPos = json.decode(s, startPos) + assert(startPos <= stringLen, "JSON string ended unexpectedly searching for value of key " .. key) + startPos = decode_scanWhitespace(s, startPos) + assert(startPos <= stringLen, "JSON string ended unexpectedly searching for value of key " .. key) + assert( + string.sub(s, startPos, startPos) == ":", + "JSON object key-value assignment mal-formed at " .. startPos + ) + startPos = decode_scanWhitespace(s, startPos + 1) + assert(startPos <= stringLen, "JSON string ended unexpectedly searching for value of key " .. key) + value, startPos = json.decode(s, startPos) + object[key] = value + until false -- infinite loop while key-value pairs are found + end + + -- START SoniEx2 + -- Initialize some things used by decode_scanString + -- You know, for efficiency + local escapeSequences = { + ["\\t"] = "\t", + ["\\f"] = "\f", + ["\\r"] = "\r", + ["\\n"] = "\n", + ["\\b"] = "" + } + setmetatable( + escapeSequences, + { + __index = function(t, k) + -- skip "\" aka strip escape + return string.sub(k, 2) + end + } + ) + -- END SoniEx2 + --- Scans a JSON string from the opening inverted comma or single quote to the + -- end of the string. + -- Returns the string extracted as a Lua string, + -- and the position of the next non-string character + -- (after the closing inverted comma or single quote). + -- @param s The string being scanned. + -- @param startPos The starting position of the scan. + -- @return string, int The extracted string as a Lua string, and the next character to parse. + function decode_scanString(s, startPos) + assert(startPos, "decode_scanString(..) called without start position") + local startChar = string.sub(s, startPos, startPos) + -- START SoniEx2 + -- PS: I don't think single quotes are valid JSON + assert(startChar == '"' or startChar == [[']], "decode_scanString called for a non-string") + --assert(startPos, "String decoding failed: missing closing " .. startChar .. " for string at position " .. oldStart) + local t = {} + local i, j = startPos, startPos + while string.find(s, startChar, j + 1) ~= j + 1 do + local oldj = j + i, j = string.find(s, "\\.", j + 1) + local x, y = string.find(s, startChar, oldj + 1) + if not i or x < i then + i, j = x, y - 1 + end + table.insert(t, string.sub(s, oldj + 1, i - 1)) + if string.sub(s, i, j) == "\\u" then + local a = string.sub(s, j + 1, j + 4) + j = j + 4 + local n = tonumber(a, 16) + assert(n, "String decoding failed: bad Unicode escape " .. a .. " at position " .. i .. " : " .. j) + -- math.floor(x/2^y) == lazy right shift + -- a % 2^b == bitwise_and(a, (2^b)-1) + -- 64 = 2^6 + -- 4096 = 2^12 (or 2^6 * 2^6) + local x + if n < 128 then + x = string.char(n % 128) + elseif n < 2048 then + -- [110x xxxx] [10xx xxxx] + x = string.char(192 + (math.floor(n / 64) % 32), 128 + (n % 64)) + else + -- [1110 xxxx] [10xx xxxx] [10xx xxxx] + x = string.char(224 + (math.floor(n / 4096) % 16), 128 + (math.floor(n / 64) % 64), 128 + (n % 64)) + end + table.insert(t, x) + else + table.insert(t, escapeSequences[string.sub(s, i, j)]) + end + end + table.insert(t, string.sub(j, j + 1)) + assert( + string.find(s, startChar, j + 1), + "String decoding failed: missing closing " .. + startChar .. " at position " .. j .. "(for string at position " .. startPos .. ")" + ) + return table.concat(t, ""), j + 2 + -- END SoniEx2 + end + + --- Scans a JSON string skipping all whitespace from the current start position. + -- Returns the position of the first non-whitespace character, or nil if the whole end of string is reached. + -- @param s The string being scanned + -- @param startPos The starting position where we should begin removing whitespace. + -- @return int The first position where non-whitespace was encountered, or string.len(s)+1 if the end of string + -- was reached. + function decode_scanWhitespace(s, startPos) + local whitespace = " \n\r\t" + local stringLen = string.len(s) + while (string.find(whitespace, string.sub(s, startPos, startPos), 1, true) and startPos <= stringLen) do + startPos = startPos + 1 + end + return startPos + end + + --- Encodes a string to be JSON-compatible. + -- This just involves back-quoting inverted commas, back-quotes and newlines, I think ;-) + -- @param s The string to return as a JSON encoded (i.e. backquoted string) + -- @return The string appropriately escaped. + local escapeList = { + ['"'] = '\\"', + ["\\"] = "\\\\", + ["/"] = "\\/", + [""] = "\\b", + ["\f"] = "\\f", + ["\n"] = "\\n", + ["\r"] = "\\r", + ["\t"] = "\\t" + } + + function json_private.encodeString(s) + local s = tostring(s) + return s:gsub( + ".", + function(c) + return escapeList[c] + end + ) -- SoniEx2: 5.0 compat + end + + -- Determines whether the given Lua type is an array or a table / dictionary. + -- We consider any table an array if it has indexes 1..n for its n items, and no + -- other data in the table. + -- I think this method is currently a little 'flaky', but can't think of a good way around it yet... + -- @param t The table to evaluate as an array + -- @return boolean, number True if the table can be represented as an array, false otherwise. If true, + -- the second returned value is the maximum + -- number of indexed elements in the array. + function isArray(t) + -- Next we count all the elements, ensuring that any non-indexed elements are not-encodable + -- (with the possible exception of 'n') + if (t == json.EMPTY_ARRAY) then + return true, 0 + end + if (t == json.EMPTY_OBJECT) then + return false + end + + local maxIndex = 0 + for k, v in pairs(t) do + if (type(k) == "number" and math.floor(k) == k and 1 <= k) then -- k,v is an indexed pair + if (not isEncodable(v)) then + return false + end -- All array elements must be encodable + maxIndex = math.max(maxIndex, k) + else + if (k == "n") then + if v ~= (t.n or #t) then + return false + end -- False if n does not hold the number of elements + else -- Else of (k=='n') + if isEncodable(v) then + return false + end + end -- End of (k~='n') + end -- End of k,v not an indexed pair + end -- End of loop across all pairs + return true, maxIndex + end + + --- Determines whether the given Lua object / table / variable can be JSON encoded. The only + -- types that are JSON encodable are: string, boolean, number, nil, table and json.null. + -- In this implementation, all other types are ignored. + -- @param o The object to examine. + -- @return boolean True if the object should be JSON encoded, false if it should be ignored. + function isEncodable(o) + local t = type(o) + return (t == "string" or t == "boolean" or t == "number" or t == "nil" or t == "table") or + (t == "function" and o == json.null) + end + + return json +end +local debugger_print = print +local debug_server = nil +local breakInfoSocket = nil +local json = createJson() +local LuaDebugger = { + fileMaps = {}, + Run = true, --表示正常运行只检测断点 + StepIn = false, + StepInLevel = 0, + StepNext = false, + StepNextLevel = 0, + StepOut = false, + breakInfos = {}, + runTimeType = nil, + isHook = true, + pathCachePaths = {}, + isProntToConsole = 1, + isFoxGloryProject = false, + isDebugPrint = true, + hookType = "lrc", + currentFileName = "", + currentTempFunc = nil, + --分割字符串缓存 + splitFilePaths = {}, + DebugLuaFie = "", + version = "0.9.3", + serVarLevel = 4 +} +local debug_hook = nil +local _resume = coroutine.resume +coroutine.resume = function(co, ...) + if (LuaDebugger.isHook) then + if coroutine.status(co) ~= "dead" then + debug.sethook(co, debug_hook, "lrc") + end + end + return _resume(co, ...) +end + +LuaDebugger.event = { + S2C_SetBreakPoints = 1, + C2S_SetBreakPoints = 2, + S2C_RUN = 3, + C2S_HITBreakPoint = 4, + S2C_ReqVar = 5, + C2S_ReqVar = 6, + --单步跳过请求 + S2C_NextRequest = 7, + --单步跳过反馈 + C2S_NextResponse = 8, + -- 单步跳过 结束 没有下一步 + C2S_NextResponseOver = 9, + --单步跳入 + S2C_StepInRequest = 10, + C2S_StepInResponse = 11, + --单步跳出 + S2C_StepOutRequest = 12, + --单步跳出返回 + C2S_StepOutResponse = 13, + --打印 + C2S_LuaPrint = 14, + S2C_LoadLuaScript = 16, + C2S_SetSocketName = 17, + C2S_LoadLuaScript = 18, + C2S_DebugXpCall = 20, + S2C_DebugClose = 21, + S2C_SerVar = 24, + C2S_SerVar = 25, + S2C_ReLoadFile = 26, + C2S_ReLoadFile = 27, +} +--@region print +function print(...) + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then + debugger_print(...) + end + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then + if (debug_server) then + local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错 + local str = "" + if (#arg == 0) then + arg = {"nil"} + end + for k, v in pairs(arg) do + str = str .. tostring(v) .. "\t" + end + local sendMsg = { + event = LuaDebugger.event.C2S_LuaPrint, + data = {msg = ZZBase64.encode(str), type = 1} + } + local sendStr = json.encode(sendMsg) + debug_server:send(sendStr .. "__debugger_k0204__") + end + end +end + +function luaIdePrintWarn(...) + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then + debugger_print(...) + end + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then + if (debug_server) then + local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错 + local str = "" + if (#arg == 0) then + arg = {"nil"} + end + for k, v in pairs(arg) do + str = str .. tostring(v) .. "\t" + end + local sendMsg = { + event = LuaDebugger.event.C2S_LuaPrint, + data = {msg = ZZBase64.encode(str), type = 2} + } + local sendStr = json.encode(sendMsg) + debug_server:send(sendStr .. "__debugger_k0204__") + end + end +end +function luaIdePrintErr(...) + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then + debugger_print(...) + end + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then + if (debug_server) then + local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错 + local str = "" + if (#arg == 0) then + arg = {"nil"} + end + for k, v in pairs(arg) do + str = str .. tostring(v) .. "\t" + end + local sendMsg = { + event = LuaDebugger.event.C2S_LuaPrint, + data = {msg = ZZBase64.encode(str), type = 3} + } + local sendStr = json.encode(sendMsg) + debug_server:send(sendStr .. "__debugger_k0204__") + end + end +end +--@endregion + +--@region 辅助方法 +local function debugger_lastIndex(str, p) + local startIndex = string.find(str, p, 1) + while startIndex do + local findstartIndex = string.find(str, p, startIndex + 1) + if (not findstartIndex) then + break + else + startIndex = findstartIndex + end + end + return startIndex +end +local function debugger_convertParentDir(dir) + local index, endindex = string.find(dir, "/%.%./") + if (index) then + local file1 = string.sub(dir, 1, index - 1) + local startIndex = debugger_lastIndex(file1, "/") + file1 = string.sub(file1, 1, startIndex - 1) + local file2 = string.sub(dir, endindex) + dir = file1 .. file2 + dir = debugger_convertParentDir(dir) + return dir + else + return dir + end +end + +local function debugger_getFilePathInfo(file) + local fileName = nil + local dir = nil + file = file:gsub("/.\\", "/") + file = file:gsub("\\", "/") + file = file:gsub("//", "/") + + + if file:find("@") == 1 then + file = file:sub(2) + end + local findex = file:find("%./") + if (findex == 1) then + file = file:sub(3) + end + + file = debugger_convertParentDir(file) + local fileLength = string.len(file) + local suffixNames = { + ".lua", + ".txt.lua", + ".txt", + ".bytes" + } + table.sort( + suffixNames, + function(name1, name2) + return string.len(name1) > string.len(name2) + end + ) + local suffixLengs = {} + for i, suffixName in ipairs(suffixNames) do + table.insert(suffixLengs, string.len(suffixName)) + end + + local fileLength = string.len(file) + for i, suffix in ipairs(suffixNames) do + local suffixName = string.sub(file, fileLength - suffixLengs[i] + 1) + if (suffixName == suffix) then + file = string.sub(file, 1, fileLength - suffixLengs[i]) + break + end + end + local fileNameStartIndex = debugger_lastIndex(file, "/") + if (fileNameStartIndex) then + fileName = string.sub(file, fileNameStartIndex + 1) + + dir = string.sub(file, 1, fileNameStartIndex) + file = dir .. fileName + else + fileNameStartIndex = debugger_lastIndex(file, "%.") + if (not fileNameStartIndex) then + fileName = file + dir = "" + else + dir = string.sub(file, 1, fileNameStartIndex) + dir = dir:gsub("%.", "/") + fileName = string.sub(file, fileNameStartIndex + 1) + file = dir .. fileName + end + end + + return file, dir, fileName +end + +--@endregion + + + +----=============================工具方法============================================= +--@region 工具方法 + + +local function debugger_strSplit(input, delimiter) + input = tostring(input) + delimiter = tostring(delimiter) + if (delimiter == "") then + return false + end + local pos, arr = 0, {} + -- for each divider found + for st, sp in function() + return string.find(input, delimiter, pos, true) + end do + table.insert(arr, string.sub(input, pos, st - 1)) + pos = sp + 1 + end + table.insert(arr, string.sub(input, pos)) + return arr +end +local function debugger_strTrim(input) + input = string.gsub(input, "^[ \t\n\r]+", "") + return string.gsub(input, "[ \t\n\r]+$", "") +end +local function debugger_dump(value, desciption, nesting) + if type(nesting) ~= "number" then + nesting = 3 + end + local lookupTable = {} + local result = {} + local function _v(v) + if type(v) == "string" then + v = '"' .. v .. '"' + end + return tostring(v) + end + local traceback = debugger_strSplit(debug.traceback("", 2), "\n") + print("dump from: " .. debugger_strTrim(traceback[3])) + local function _dump(value, desciption, indent, nest, keylen) + desciption = desciption or "" + local spc = "" + if type(keylen) == "number" then + spc = string.rep(" ", keylen - string.len(_v(desciption))) + end + if type(value) ~= "table" then + result[#result + 1] = string.format("%s%s%s = %s", indent, _v(desciption), spc, _v(value)) + elseif lookupTable[value] then + result[#result + 1] = string.format("%s%s%s = *REF*", indent, desciption, spc) + else + lookupTable[value] = true + if nest > nesting then + result[#result + 1] = string.format("%s%s = *MAX NESTING*", indent, desciption) + else + result[#result + 1] = string.format("%s%s = {", indent, _v(desciption)) + local indent2 = indent .. " " + local keys = {} + local keylen = 0 + local values = {} + for k, v in pairs(value) do + keys[#keys + 1] = k + local vk = _v(k) + local vkl = string.len(vk) + if vkl > keylen then + keylen = vkl + end + values[k] = v + end + table.sort( + keys, + function(a, b) + if type(a) == "number" and type(b) == "number" then + return a < b + else + return tostring(a) < tostring(b) + end + end + ) + for i, k in ipairs(keys) do + _dump(values[k], k, indent2, nest + 1, keylen) + end + result[#result + 1] = string.format("%s}", indent) + end + end + end + _dump(value, desciption, "- ", 1) + for i, line in ipairs(result) do + print(line) + end +end +--@endregion +local function debugger_valueToString(v) + local vtype = type(v) + local vstr = nil + if (vtype == "userdata") then + if (LuaDebugger.isFoxGloryProject) then + + return "userdata",vtype + + else + return tostring(v), vtype + end + elseif (vtype == "table" or vtype == "function" or vtype == "boolean") then + local value = vtype + xpcall(function() + value = tostring(v) + end,function() + value = vtype + end) + return value, vtype + elseif (vtype == "number" or vtype == "string" ) then + return v, vtype + else + return tostring(v), vtype + end +end +local function debugger_setVarInfo(name, value) + local valueStr, valueType = debugger_valueToString(value) + local nameStr,nameType = debugger_valueToString(name) + if(valueStr == nil) then + valueStr = valueType + end + local valueInfo = { + name =nameStr, + valueType = valueType, + valueStr = ZZBase64.encode(valueStr) + } + + return valueInfo +end + +local function debugger_getvalue(f) + local i = 1 + local locals = {} + -- get locals + while true do + local name, value = debug.getlocal(f, i) + if not name then + break + end + if (name ~= "(*temporary)") then + locals[name] = value + end + i = i + 1 + end + local func = getinfo(f, "f").func + i = 1 + local ups = {} + while func do -- check for func as it may be nil for tail calls + local name, value = debug.getupvalue(func, i) + if not name then + break + end + if (name == "_ENV") then + ups["_ENV_"] = value + else + ups[name] = value + end + i = i + 1 + end + + return {locals = locals, ups = ups} +end +--获取堆栈 +debugger_stackInfo = + function(ignoreCount, event) + local datas = {} + local stack = {} + local varInfos = {} + local funcs = {} + local index = 0 + for i = ignoreCount, 100 do + local source = getinfo(i) + local isadd = true + if (i == ignoreCount) then + local file = source.source + if (file:find(LuaDebugger.DebugLuaFie)) then + return + end + if (file == "=[C]") then + isadd = false + end + end + if not source then + break + end + if (isadd) then + local fullName, dir, fileName = debugger_getFilePathInfo(source.source) + local info = { + src = fullName, + scoreName = source.name, + currentline = source.currentline, + linedefined = source.linedefined, + what = source.what, + nameWhat = source.namewhat + } + index = i + local vars = debugger_getvalue(i + 1) + table.insert(stack, info) + table.insert(varInfos, vars) + table.insert(funcs, source.func) + end + if source.what == "main" then + break + end + end + + local stackInfo = {stack = stack, vars = varInfos, funcs = funcs} + local data = { + stack = stackInfo.stack, + vars = stackInfo.vars, + funcs = stackInfo.funcs, + event = event, + funcsLength = #stackInfo.funcs, + upFunc = getinfo(ignoreCount - 3, "f").func + } + LuaDebugger.currentTempFunc = data.funcs[1] + return data +end + +--===========================点断信息================================================== +--根据不同的游戏引擎进行定时获取断点信息 +--CCDirector:sharedDirector():getScheduler() +local debugger_setBreak = nil +local function debugger_receiveDebugBreakInfo() + if (jit) then + if (LuaDebugger.debugLuaType ~= "jit") then + local msg = "当前luajit版本为: " .. jit.version .. " 请使用LuaDebugjit 进行调试!" + print(msg) + end + end + if (breakInfoSocket) then + local msg, status = breakInfoSocket:receive() + if(LuaDebugger.isLaunch and status == "closed") then + os.exit() + end + if (msg) then + local netData = json.decode(msg) + if netData.event == LuaDebugger.event.S2C_SetBreakPoints then + debugger_setBreak(netData.data) + elseif netData.event == LuaDebugger.event.S2C_LoadLuaScript then + LuaDebugger.loadScriptBody = netData.data + debugger_exeLuaString() + debugger_sendMsg(breakInfoSocket,LuaDebugger.event.C2S_LoadLuaScript,LuaDebugger.loadScriptBody) + elseif netData.event == LuaDebugger.event.S2C_ReLoadFile then + LuaDebugger.reLoadFileBody = netData.data + LuaDebugger.isReLoadFile = false + LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody) + print("重载结果:",LuaDebugger.reLoadFileBody.isReLoad) + LuaDebugger.reLoadFileBody.script = nil + debugger_sendMsg( + breakInfoSocket, + LuaDebugger.event.C2S_ReLoadFile, + { + stack = LuaDebugger.reLoadFileBody + + } + ) + end + end + end +end +local function splitFilePath(path) + if (LuaDebugger.splitFilePaths[path]) then + return LuaDebugger.splitFilePaths[path] + end + local pos, arr = 0, {} + -- for each divider found + for st, sp in function() + return string.find(path, "/", pos, true) + end do + local pathStr = string.sub(path, pos, st - 1) + table.insert(arr, pathStr) + pos = sp + 1 + end + local pathStr = string.sub(path, pos) + table.insert(arr, pathStr) + LuaDebugger.splitFilePaths[path] = arr + return arr +end +debugger_setBreak = + function(datas) + local breakInfos = LuaDebugger.breakInfos + for i, data in ipairs(datas) do + data.fileName = string.lower(data.fileName) + data.serverPath = string.lower(data.serverPath) + local breakInfo = breakInfos[data.fileName] + if (not breakInfo) then + breakInfos[data.fileName] = {} + breakInfo = breakInfos[data.fileName] + end + if (not data.breakDatas or #data.breakDatas == 0) then + breakInfo[data.serverPath] = nil + else + local fileBreakInfo = breakInfo[data.serverPath] + if (not fileBreakInfo) then + fileBreakInfo = { + pathNames = splitFilePath(data.serverPath), + --命中次數判斷計數器 + hitCounts = {} + } + breakInfo[data.serverPath] = fileBreakInfo + end + local lineInfos = {} + for li, breakData in ipairs(data.breakDatas) do + lineInfos[breakData.line] = breakData + if (breakData.hitCondition and breakData.hitCondition ~= "") then + breakData.hitCondition = tonumber(breakData.hitCondition) + else + breakData.hitCondition = 0 + end + if (not fileBreakInfo.hitCounts[breakData.line]) then + fileBreakInfo.hitCounts[breakData.line] = 0 + end + end + fileBreakInfo.lines = lineInfos + --這裡添加命中次數判斷 + for line, count in pairs(fileBreakInfo.hitCounts) do + if (not lineInfos[line]) then + fileBreakInfo.hitCounts[line] = nil + end + end + end + local count = 0 + for i, linesInfo in pairs(breakInfo) do + count = count + 1 + end + if (count == 0) then + breakInfos[data.fileName] = nil + end + end + --debugger_dump(breakInfos, "breakInfos", 6) + --检查是否需要断点 + local isHook = false + for k, v in pairs(breakInfos) do + isHook = true + break + end + + --这样做的原因是为了最大限度的使手机调试更加流畅 注意这里会连续的进行n次 + if (isHook) then + if (not LuaDebugger.isHook) then + debug.sethook(debug_hook, "lrc") + end + LuaDebugger.isHook = true + else + if (LuaDebugger.isHook) then + debug.sethook() + end + LuaDebugger.isHook = false + end +end +local function debugger_checkFileIsBreak(fileName) + return LuaDebugger.breakInfos[fileName] +end +--=====================================断点信息 end ---------------------------------------------- +local controller_host = "192.168.1.102" +local controller_port = 7003 +debugger_sendMsg = function(serverSocket, eventName, data) + local sendMsg = { + event = eventName, + data = data + } + local sendStr = json.encode(sendMsg) + serverSocket:send(sendStr .. "__debugger_k0204__") +end +function debugger_conditionStr(condition, vars, callBack) + local function loadScript() + local currentTabble = {} + + local locals = vars[1].locals + local ups = vars[1].ups + if (ups) then + for k, v in pairs(ups) do + currentTabble[k] = v + end + end + + if (locals) then + for k, v in pairs(locals) do + currentTabble[k] = v + end + end + setmetatable(currentTabble, {__index = _G}) + local fun = loadstring("return " .. condition) + setfenv(fun, currentTabble) + return fun() + end + local status, + msg = + xpcall( + loadScript, + function(error) + print(error) + end + ) + if (status and msg) then + callBack() + end +end +--执行lua字符串 +debugger_exeLuaString = function() + + local function loadScript() + + local script = LuaDebugger.loadScriptBody.script + if (LuaDebugger.loadScriptBody.isBreak) then + local currentTabble = {_G = _G} + local frameId = LuaDebugger.loadScriptBody.frameId + frameId = frameId + local func = LuaDebugger.currentDebuggerData.funcs[frameId] + local vars = LuaDebugger.currentDebuggerData.vars[frameId] + local locals = vars.locals + local ups = vars.ups + for k, v in pairs(ups) do + currentTabble[k] = v + end + for k, v in pairs(locals) do + currentTabble[k] = v + end + setmetatable(currentTabble, {__index = _G}) + + local fun = loadstring(script) + setfenv(fun, currentTabble) + fun() + else + local fun = loadstring(script) + fun() + end + end + local status, + msg = + xpcall( + loadScript, + function(error) + + -- debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, LuaDebugger.loadScriptBody) + end + ) + LuaDebugger.loadScriptBody.script = nil + if (LuaDebugger.loadScriptBody.isBreak) then + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint) + LuaDebugger.loadScriptBody.stack = LuaDebugger.currentDebuggerData.stack + end + LuaDebugger.loadScriptBody.complete = true + +end +--@region 调试中修改变量值 + + +--根据key 值在 value 查找 +local function debugger_getTablekey(key,keyType,value) + if(keyType == -1) then + return key + elseif(keyType == 1) then + return tonumber(key) + elseif(keyType == 2) then + local valueKey = nil + for k,v in pairs(value) do + local nameType = type(k) + if(nameType == "userdata" or nameType == "table") then + if (not LuaDebugger.isFoxGloryProject) then + valueKey = tostring(k) + if(key == valueKey) then + return k + end + break + end + end + end + + end +end + +local function debugger_setVarValue(server, data) + + local newValue = nil + local level = LuaDebugger.serVarLevel+LuaDebugger.setVarBody.frameId + local firstKeyName = data.keys[1] + --@region vars check + local localValueChangeIndex = -1 + local upValueChangeIndex = -1 + local upValueFun = nil + local oldValue = nil + local i = 1 + local locals = {} + -- get locals + while true do + local name, value = debug.getlocal(level, i) + if not name then + break + end + if(firstKeyName == name) then + localValueChangeIndex = i + oldValue = value + end + if (name ~= "(*temporary)") then + locals[name] = value + end + i = i + 1 + end + local func = getinfo(level, "f").func + i = 1 + local ups = {} + while func do -- check for func as it may be nil for tail calls + local name, value = debug.getupvalue(func, i) + + if not name then + break + end + if(localValueChangeIndex == -1 and firstKeyName == name) then + upValueFun = func + oldValue = value + upValueChangeIndex = i + end + if (name == "_ENV") then + ups["_ENV_"] = value + else + ups[name] = value + end + i = i + 1 + end +--@endregion + local vars = {locals = locals, ups = ups} + + local function loadScript() + local currentTabble = {} + local locals = vars.locals + local ups = vars.ups + if (ups) then + for k, v in pairs(ups) do + currentTabble[k] = v + end + end + + if (locals) then + for k, v in pairs(locals) do + currentTabble[k] = v + end + end + setmetatable(currentTabble, {__index = _G}) + local fun = loadstring("return " .. data.value) + setfenv(fun, currentTabble) + newValue = fun() + end + local status, + msg = + xpcall( + loadScript, + function(error) + print(error, "============================") + end + ) + + local i = 1 + + -- local 查找并替换 + local keyLength = #data.keys + + if(keyLength == 1) then + if(localValueChangeIndex ~= -1) then + + debug.setlocal(level, localValueChangeIndex, newValue) + elseif(upValueFun ~= nil) then + debug.setupvalue( upValueFun, upValueChangeIndex, newValue ) + else + --全局变量查找 + if(_G[firstKeyName]) then + _G[firstKeyName] = newValue + end + end + else + if(not oldValue) then + if(_G[firstKeyName]) then + oldValue = _G[firstKeyName] + end + end + local tempValue = oldValue + for i=2,keyLength-1 do + if(tempValue) then + oldValue = oldValue[debugger_getTablekey(data.keys[i],data.numberTypes[i],oldValue)] + end + end + if(tempValue) then + oldValue[debugger_getTablekey(data.keys[keyLength],data.numberTypes[keyLength],oldValue)] = newValue + end + end + local varInfo = debugger_setVarInfo(data.varName, newValue) + data.varInfo = varInfo + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint) + +end +--@endregion + + + + +--调试修改变量值统一的 _resume +checkSetVar = + function() + if (LuaDebugger.isSetVar) then + LuaDebugger.isSetVar = false + debugger_setVarValue(debug_server,LuaDebugger.setVarBody) + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + _resume(coro_debugger, LuaDebugger.setVarBody) + xpcall( + checkSetVar, + function(error) + print("设置变量", error) + end + ) + elseif(LuaDebugger.isLoadLuaScript) then + LuaDebugger.isLoadLuaScript = false + debugger_exeLuaString() + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + _resume(coro_debugger, LuaDebugger.reLoadFileBody) + xpcall( + checkSetVar, + function(error) + print("执行代码", error) + end + ) + elseif(LuaDebugger.isReLoadFile) then + LuaDebugger.isReLoadFile = false + LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody) + print("重载结果:",LuaDebugger.reLoadFileBody.isReLoad) + LuaDebugger.reLoadFileBody.script = nil + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + _resume(coro_debugger, LuaDebugger.reLoadFileBody) + xpcall( + checkSetVar, + function(error) + print("重新加载文件", error) + end + ) + end +end + + + +local function getSource(source) + source = string.lower(source) + if (LuaDebugger.pathCachePaths[source]) then + LuaDebugger.currentLineFile = LuaDebugger.pathCachePaths[source] + return LuaDebugger.pathCachePaths[source] + end + + local fullName, dir, fileName = debugger_getFilePathInfo(source) + LuaDebugger.currentLineFile = fullName + LuaDebugger.pathCachePaths[source] = fileName + + return fileName +end +local function debugger_GeVarInfoBytUserData(server, var) + local fileds = LuaDebugTool.getUserDataInfo(var) + + local varInfos = {} + + + --c# vars + for i = 1, fileds.Count do + local filed = fileds[i - 1] + local valueInfo = { + name = filed.name, + valueType = filed.valueType, + valueStr = ZZBase64.encode(filed.valueStr), + isValue = filed.isValue, + csharp = true + } + + table.insert(varInfos, valueInfo) + end + return varInfos +end + +local function debugger_getValueByScript(value, script) + local val = nil + local status, + msg = + xpcall( + function() + local fun = loadstring("return " .. script) + setfenv(fun, value) + val = fun() + end, + function(error) + print(error, "====>") + val = nil + end + ) + + return val +end +local function debugger_getVarByKeys(value, keys, index) + local str = "" + local keyLength = #keys + for i = index, keyLength do + local key = keys[i] + if (key == "[metatable]") then + else + if (i == index) then + if (string.find(key, "%.")) then + if (str == "") then + i = index + 1 + value = value[key] + end + if (i >= #keys) then + return index, value + end + + return debugger_getVarByKeys(value, keys, i) + else + str = key + end + else + if (string.find(key, "%[")) then + str = str .. key + elseif (type(key) == "string") then + if (string.find(key, "table:") or string.find(key, "userdata:") or string.find(key, "function:")) then + if (str ~= "") then + local vl = debugger_getValueByScript(value, str) + value = vl + if (value) then + for k, v in pairs(value) do + local ktype = type(k) + + if (ktype == "userdata" or ktype == "table" or ktype == "function") then + local keyName = debugger_valueToString(k) + if (keyName == key) then + value = v + break + end + end + end + end + str = "" + if (i == keyLength) then + return #keys, value + else + return debugger_getVarByKeys(value, keys, i + 1) + end + else + str = str .. '["' .. key .. '"]' + end + else + str = str .. '["' .. key .. '"]' + end + else + str = str .. "[" .. key .. "]" + end + end + end + end + + local v = debugger_getValueByScript(value, str) + + return #keys, v +end +--[[ + @desc: 查找c# 值 + author:k0204 + time:2018-04-07 21:32:31 + return +]] +local function debugger_getCSharpValue(value, searchIndex, keys) + local key = keys[searchIndex] + local val = LuaDebugTool.getCSharpValue(value, key) + if (val) then + --1最后一个 直接返回 + if (searchIndex == #keys) then + return #keys, val + else + --2再次获得 如果没有找到那么 进行lua 层面查找 + local vindex, val1 = debugger_getCSharpValue(val, searchIndex + 1, keys) + if (not val1) then + --组建新的keys + local tempKeys = {} + for i = vindex, #keys do + table.insert(tempKeys, keys[i]) + end + local vindx, val1 = debugger_searchVarByKeys(value, searckKeys, 1) + return vindx, val1 + else + return vindex, val1 + end + end + else + --3最终这里返回 所以2 中 没有当val1 不为空的处理 + return searchIndex, val + end +end +local function debugger_searchVarByKeys(value, keys, searckKeys) + local index, val = debugger_getVarByKeys(value, searckKeys, 1) + + if (not LuaDebugTool or not LuaDebugTool.getCSharpValue or type(LuaDebugTool.getCSharpValue) ~= "function") then + return index, val + end + if (val) then + if (index == #keys) then + return index, val + else + local searchStr = "" + --进行c# 值查找 + local keysLength = #keys + local searchIndex = index + 1 + local sindex, val = debugger_getCSharpValue(val, searchIndex, keys) + return sindex, val + end + else + --进行递减 + local tempKeys = {} + for i = 1, #searckKeys - 1 do + table.insert(tempKeys, keys[i]) + end + if (#tempKeys == 0) then + return #keys, nil + end + return debugger_searchVarByKeys(value, keys, tempKeys) + end +end +--[[ + @desc: 获取metatable 信息 + author:k0204 + time:2018-04-06 20:27:12 + return +]] +local function debugger_getmetatable(value, metatable, vinfos, server, variablesReference, debugSpeedIndex, metatables) + for i, mtable in ipairs(metatables) do + if (metatable == mtable) then + return vinfos + end + end + table.insert(metatables, metatable) + for k, v in pairs(metatable) do + local val = nil + if (type(k) == "string") then + xpcall( + function() + val = value[k] + end, + function(error) + val = nil + end + ) + if (val == nil) then + xpcall( + function() + if (string.find(k, "__")) then + val = v + end + end, + function(error) + val = nil + end + ) + end + end + if (val) then + local vinfo = debugger_setVarInfo(k, val) + table.insert(vinfos, vinfo) + if (#vinfos > 10) then + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = vinfos, + isComplete = 0 + } + ) + vinfos = {} + end + end + end + local m = getmetatable(metatable) + if (m) then + return debugger_getmetatable(value, m, vinfos, server, variablesReference, debugSpeedIndex, metatables) + else + return vinfos + end +end +local function debugger_sendTableField(luatable, vinfos, server, variablesReference, debugSpeedIndex, valueType) + if (valueType == "userdata") then + if (tolua and tolua.getpeer) then + luatable = tolua.getpeer(luatable) + else + return vinfos + end + end + if (luatable == nil) then + return vinfos + end + for k, v in pairs(luatable) do + local vinfo = debugger_setVarInfo(k, v) + table.insert(vinfos, vinfo) + if (#vinfos > 10) then + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = vinfos, + isComplete = 0 + } + ) + vinfos = {} + end + end + + return vinfos +end +local function debugger_sendTableValues(value, server, variablesReference, debugSpeedIndex) + local vinfos = {} + local luatable = {} + local valueType = type(value) + local userDataInfos = {} + local m = nil + + if (valueType == "userdata") then + m = getmetatable(value) + + vinfos = debugger_sendTableField(value, vinfos, server, variablesReference, debugSpeedIndex, valueType) + + if (LuaDebugTool) then + local varInfos = debugger_GeVarInfoBytUserData(server, value, variablesReference, debugSpeedIndex) + + for i, v in ipairs(varInfos) do + if (v.valueType == "System.Byte[]" and value[v.name] and type(value[v.name]) == "string") then + local valueInfo = { + name = v.name, + valueType = "string", + valueStr = ZZBase64.encode(value[v.name]) + } + table.insert(vinfos, valueInfo) + else + table.insert(vinfos, v) + end + if (#vinfos > 10) then + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = vinfos, + isComplete = 0 + } + ) + vinfos = {} + end + end + + end + else + m = getmetatable(value) + vinfos = debugger_sendTableField(value, vinfos, server, variablesReference, debugSpeedIndex, valueType) + end + + if (m) then + vinfos = debugger_getmetatable(value, m, vinfos, server, variablesReference, debugSpeedIndex, {}) + end + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = vinfos, + isComplete = 1 + } + ) +end + +--获取lua 变量的方法 +local function debugger_getBreakVar(body, server) + local variablesReference = body.variablesReference + local debugSpeedIndex = body.debugSpeedIndex + local vinfos = {} + local function exe() + local frameId = body.frameId + local type_ = body.type + local keys = body.keys + --找到对应的var + local vars = nil + if (type_ == 1) then + vars = LuaDebugger.currentDebuggerData.vars[frameId + 1] + vars = vars.locals + elseif (type_ == 2) then + vars = LuaDebugger.currentDebuggerData.vars[frameId + 1] + vars = vars.ups + elseif (type_ == 3) then + vars = _G + end + if (#keys == 0) then + debugger_sendTableValues(vars, server, variablesReference, debugSpeedIndex) + return + end + local index, value = debugger_searchVarByKeys(vars, keys, keys) + if (value) then + local valueType = type(value) + if (valueType == "table" or valueType == "userdata") then + + debugger_sendTableValues(value, server, variablesReference, debugSpeedIndex) + else + if (valueType == "function") then + value = tostring(value) + end + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = ZZBase64.encode(value), + isComplete = 1, + varType = valueType + } + ) + end + else + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = {}, + isComplete = 1, + varType = "nil" + } + ) + end + end + xpcall( + exe, + function(error) + -- print("获取变量错误 错误消息-----------------") + -- print(error) + -- print(debug.traceback("", 2)) + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = { + { + name = "error", + valueType = "string", + valueStr = ZZBase64.encode("无法获取属性值:" .. error .. "->" .. debug.traceback("", 2)), + isValue = false + } + }, + isComplete = 1 + } + ) + end + ) +end +local function ResetDebugInfo() + LuaDebugger.Run = false + LuaDebugger.StepIn = false + LuaDebugger.StepNext = false + LuaDebugger.StepOut = false + LuaDebugger.StepNextLevel = 0 +end +local function debugger_loop(server) + server = debug_server + --命令 + local command + local eval_env = {} + local arg + while true do + local line, status = server:receive() + if (status == "closed") then + if(LuaDebugger.isLaunch) then + os.exit() + else + debug.sethook() + coroutine.yield() + end + end + if (line) then + local netData = json.decode(line) + local event = netData.event + local body = netData.data + if (event == LuaDebugger.event.S2C_DebugClose) then + if(LuaDebugger.isLaunch) then + os.exit() + else + debug.sethook() + coroutine.yield() + end + + elseif event == LuaDebugger.event.S2C_SetBreakPoints then + --设置断点信息 + local function setB() + debugger_setBreak(body) + end + xpcall( + setB, + function(error) + print(error) + end + ) + elseif event == LuaDebugger.event.S2C_RUN then --开始运行 + LuaDebugger.runTimeType = body.runTimeType + LuaDebugger.isProntToConsole = body.isProntToConsole + LuaDebugger.isFoxGloryProject = body.isFoxGloryProject + LuaDebugger.isLaunch = body.isLaunch + ResetDebugInfo() + LuaDebugger.Run = true + local data = coroutine.yield() + LuaDebugger.serVarLevel = 4 + LuaDebugger.currentDebuggerData = data + debugger_sendMsg( + server, + data.event, + { + stack = data.stack + } + ) + elseif event == LuaDebugger.event.S2C_ReqVar then -- 获取变量信息 + --请求数据信息 + debugger_getBreakVar(body, server) + elseif event == LuaDebugger.event.S2C_NextRequest then -- 设置单步跳过 + ResetDebugInfo() + LuaDebugger.StepNext = true + LuaDebugger.StepNextLevel = 0 + --设置当前文件名和当前行数 + local data = coroutine.yield() + LuaDebugger.serVarLevel = 4 + --重置调试信息 + LuaDebugger.currentDebuggerData = data + debugger_sendMsg( + server, + data.event, + { + stack = data.stack + } + ) + elseif (event == LuaDebugger.event.S2C_StepInRequest) then --单步跳入 + --单步跳入 + ResetDebugInfo() + LuaDebugger.StepIn = true + + local data = coroutine.yield() + LuaDebugger.serVarLevel = 4 + --重置调试信息 + LuaDebugger.currentDebuggerData = data + debugger_sendMsg( + server, + data.event, + { + stack = data.stack, + eventType = data.eventType + } + ) + elseif (event == LuaDebugger.event.S2C_StepOutRequest) then + --单步跳出 + ResetDebugInfo() + LuaDebugger.StepOut = true + local data = coroutine.yield() + LuaDebugger.serVarLevel = 4 + --重置调试信息 + LuaDebugger.currentDebuggerData = data + debugger_sendMsg( + server, + data.event, + { + stack = data.stack, + eventType = data.eventType + } + ) + elseif event == LuaDebugger.event.S2C_LoadLuaScript then + LuaDebugger.loadScriptBody = body + LuaDebugger.isLoadLuaScript = true + local data = coroutine.yield() + debugger_sendMsg( + server, + LuaDebugger.event.C2S_LoadLuaScript, + LuaDebugger.loadScriptBody + ) + elseif event == LuaDebugger.event.S2C_SerVar then + LuaDebugger.isSetVar = true + LuaDebugger.setVarBody = body + local data = coroutine.yield() + debugger_sendMsg( + server, + LuaDebugger.event.C2S_SerVar, + { + stack = data, + eventType = data.eventType + } + ) + elseif event == LuaDebugger.event.S2C_ReLoadFile then + LuaDebugger.isReLoadFile = true + LuaDebugger.reLoadFileBody = body + local data = coroutine.yield() + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReLoadFile, + { + stack = data, + eventType = data.eventType + } + ) + end + end + end +end +coro_debugger = coroutine.create(debugger_loop) +debug_hook = function(event, line) + + if(not LuaDebugger.isHook) then + return + end + + if(LuaDebugger.Run) then + if(event == "line") then + local isCheck = false + for k, breakInfo in pairs(LuaDebugger.breakInfos) do + + for bk, linesInfo in pairs(breakInfo) do + + if(linesInfo.lines and linesInfo.lines[line]) then + isCheck = true + break + end + end + if(isCheck) then + break + end + end + + if(not isCheck) then + return + end + else + LuaDebugger.currentFileName = nil + LuaDebugger.currentTempFunc = nil + return + end + end + --跳出 + if (LuaDebugger.StepOut) then + if (event == "line" or event == "call") then + return + end + local tempFun = getinfo(2, "f").func + + if (LuaDebugger.currentDebuggerData.funcsLength == 1) then + ResetDebugInfo() + LuaDebugger.Run = true + else + if (LuaDebugger.currentDebuggerData.funcs[2] == tempFun) then + local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse) + --挂起等待调试器作出反应 + + _resume(coro_debugger, data) + checkSetVar() + end + end + return + end + -- debugger_dump(LuaDebugger,"LuaDebugger") + -- print(LuaDebugger.StepNextLevel,"LuaDebugger.StepNextLevel") + local file = nil + if (event == "call") then + -- end + -- if(not LuaDebugger.StepOut) then + if (not LuaDebugger.Run) then + LuaDebugger.StepNextLevel = LuaDebugger.StepNextLevel + 1 + end + -- print("stepIn",LuaDebugger.StepNextLevel) + + local stepInfo = getinfo(2, "S") + local source = stepInfo.source + if (source:find(LuaDebugger.DebugLuaFie) or source == "=[C]") then + return + end + + file = getSource(source) + LuaDebugger.currentFileName = file + elseif (event == "return" or event == "tail return") then + -- end + -- if(not LuaDebugger.StepOut) then + + if (not LuaDebugger.Run) then + LuaDebugger.StepNextLevel = LuaDebugger.StepNextLevel - 1 + end + + LuaDebugger.currentFileName = nil + elseif (event == "line") then + --@region 判断命中断点 + --判断命中断点 + --判断命中断点 + --判断命中断点 + --判断命中断点 + local isHit = false + local stepInfo = nil + if (not LuaDebugger.currentFileName) then + stepInfo = getinfo(2, "S") + local source = stepInfo.source + if (source == "=[C]" or source:find(LuaDebugger.DebugLuaFie)) then + return + end + file = getSource(source) + LuaDebugger.currentFileName = file + end + file = LuaDebugger.currentFileName + + --判断断点 + local breakInfo = LuaDebugger.breakInfos[file] + local breakData = nil + if (breakInfo) then + + local ischeck = false + for k, lineInfo in pairs(breakInfo) do + local lines = lineInfo.lines + if (lines and lines[line]) then + ischeck = true + break + end + end + + if (ischeck) then + --并且在断点中 + local info = stepInfo + if (not info) then + info = getinfo(2) + end + local hitPathNames = splitFilePath(LuaDebugger.currentLineFile) + + local hitCounts = {} + local debugHitCounts = nil + for k, lineInfo in pairs(breakInfo) do + local lines = lineInfo.lines + local pathNames = lineInfo.pathNames + debugHitCounts = lineInfo.hitCounts + if (lines and lines[line]) then + breakData = lines[line] + --判断路径 + hitCounts[k] = 0 + local hitPathNamesCount = #hitPathNames + + local pathNamesCount = #pathNames + local checkCount = 0; + while (true) do + if (pathNames[pathNamesCount] ~= hitPathNames[hitPathNamesCount]) then + break + else + hitCounts[k] = hitCounts[k] + 1 + end + pathNamesCount = pathNamesCount - 1 + hitPathNamesCount = hitPathNamesCount - 1 + checkCount = checkCount+1 + + if (pathNamesCount <= 0 or hitPathNamesCount <= 0) then + break + end + end + if(checkCount>0) then + break; + end + else + breakData = nil + end + end + if (breakData) then + local hitFieName = "" + local maxCount = 0 + for k, v in pairs(hitCounts) do + if (v > maxCount) then + maxCount = v + hitFieName = k + end + end + local hitPathNamesLength = #hitPathNames + if (hitPathNamesLength == 1 or (hitPathNamesLength > 1 and maxCount > 1)) then + if (hitFieName ~= "") then + local hitCount = breakData.hitCondition + local clientHitCount = debugHitCounts[breakData.line] + clientHitCount = clientHitCount + 1 + debugHitCounts[breakData.line] = clientHitCount + + if (clientHitCount >= hitCount) then + isHit = true + end + end + end + end + end + end + --@endregion + if (LuaDebugger.StepIn) then + local data = debugger_stackInfo(3, LuaDebugger.event.C2S_NextResponse) + --挂起等待调试器作出反应 + if (data) then + LuaDebugger.currentTempFunc = data.funcs[1] + + _resume(coro_debugger, data) + checkSetVar() + return + end + end + if (LuaDebugger.StepNext) then + if (LuaDebugger.StepNextLevel <= 0) then + local data = debugger_stackInfo(3, LuaDebugger.event.C2S_NextResponse) + -- 挂起等待调试器作出反应 + if (data) then + LuaDebugger.currentTempFunc = data.funcs[1] + + _resume(coro_debugger, data) + checkSetVar() + return + end + end + end + if (isHit) then + local data = debugger_stackInfo(3, LuaDebugger.event.C2S_HITBreakPoint) + if (breakData and breakData.condition) then + debugger_conditionStr( + breakData.condition, + data.vars, + function() + _resume(coro_debugger, data) + checkSetVar() + end + ) + else + --挂起等待调试器作出反应 + _resume(coro_debugger, data) + checkSetVar() + end + end + end +end +local function debugger_xpcall() + --调用 coro_debugger 并传入 参数 + local data = debugger_stackInfo(4, LuaDebugger.event.C2S_HITBreakPoint) + if(data.stack and data.stack[1]) then + data.stack[1].isXpCall = true + end + --挂起等待调试器作出反应 + _resume(coro_debugger, data) + checkSetVar() +end +--调试开始 +local function start() + local fullName, dirName, fileName = debugger_getFilePathInfo(getinfo(1).source) + LuaDebugger.DebugLuaFie = fileName + local socket = createSocket() + print(controller_host) + print(controller_port) + + local server = socket.connect(controller_host, controller_port) + debug_server = server + if server then + --创建breakInfo socket + socket = createSocket() + breakInfoSocket = socket.connect(controller_host, controller_port) + if (breakInfoSocket) then + breakInfoSocket:settimeout(0) + debugger_sendMsg( + breakInfoSocket, + LuaDebugger.event.C2S_SetSocketName, + { + name = "breakPointSocket" + } + ) + debugger_sendMsg( + server, + LuaDebugger.event.C2S_SetSocketName, + { + name = "mainSocket", + version = LuaDebugger.version + } + ) + xpcall( + function() + debug.sethook(debug_hook, "lrc") + end, + function(error) + print("error:", error) + end + ) + if (jit) then + if (LuaDebugger.debugLuaType ~= "jit") then + print("error======================================================") + local msg = "当前luajit版本为: " .. jit.version .. " 请使用LuaDebugjit 进行调试!" + + print(msg) + end + end + _resume(coro_debugger, server) + end + end +end +function StartDebug(host, port) + if (not host) then + print("error host nil") + end + if (not port) then + print("error prot nil") + end + if (type(host) ~= "string") then + print("error host not string") + end + if (type(port) ~= "number") then + print("error host not number") + end + controller_host = host + controller_port = port + xpcall( + start, + function(error) + -- body + print(error) + end + ) + return debugger_receiveDebugBreakInfo, debugger_xpcall +end + +--base64 + +local string = string + +ZZBase64.__code = { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', + 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', + 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', +}; +ZZBase64.__decode = {} +for k,v in pairs(ZZBase64.__code) do + ZZBase64.__decode[string.byte(v,1)] = k - 1 +end + +function ZZBase64.encode(text) + local len = string.len(text) + local left = len % 3 + len = len - left + local res = {} + local index = 1 + for i = 1, len, 3 do + local a = string.byte(text, i ) + local b = string.byte(text, i + 1) + local c = string.byte(text, i + 2) + -- num = a<<16 + b<<8 + c + local num = a * 65536 + b * 256 + c + for j = 1, 4 do + --tmp = num >> ((4 -j) * 6) + local tmp = math.floor(num / (2 ^ ((4-j) * 6))) + --curPos = tmp&0x3f + local curPos = tmp % 64 + 1 + res[index] = ZZBase64.__code[curPos] + index = index + 1 + end + end + + if left == 1 then + ZZBase64.__left1(res, index, text, len) + elseif left == 2 then + ZZBase64.__left2(res, index, text, len) + end + return table.concat(res) +end + +function ZZBase64.__left2(res, index, text, len) + local num1 = string.byte(text, len + 1) + num1 = num1 * 1024 --lshift 10 + local num2 = string.byte(text, len + 2) + num2 = num2 * 4 --lshift 2 + local num = num1 + num2 + + local tmp1 = math.floor(num / 4096) --rShift 12 + local curPos = tmp1 % 64 + 1 + res[index] = ZZBase64.__code[curPos] + + local tmp2 = math.floor(num / 64) + curPos = tmp2 % 64 + 1 + res[index + 1] = ZZBase64.__code[curPos] + + curPos = num % 64 + 1 + res[index + 2] = ZZBase64.__code[curPos] + + res[index + 3] = "=" +end + +function ZZBase64.__left1(res, index,text, len) + local num = string.byte(text, len + 1) + num = num * 16 + + local tmp = math.floor(num / 64) + local curPos = tmp % 64 + 1 + res[index ] = ZZBase64.__code[curPos] + + curPos = num % 64 + 1 + res[index + 1] = ZZBase64.__code[curPos] + + res[index + 2] = "=" + res[index + 3] = "=" +end + +function ZZBase64.decode(text) + local len = string.len(text) + local left = 0 + if string.sub(text, len - 1) == "==" then + left = 2 + len = len - 4 + elseif string.sub(text, len) == "=" then + left = 1 + len = len - 4 + end + + local res = {} + local index = 1 + local decode = ZZBase64.__decode + for i =1, len, 4 do + local a = decode[string.byte(text,i )] + local b = decode[string.byte(text,i + 1)] + local c = decode[string.byte(text,i + 2)] + local d = decode[string.byte(text,i + 3)] + + --num = a<<18 + b<<12 + c<<6 + d + local num = a * 262144 + b * 4096 + c * 64 + d + + local e = string.char(num % 256) + num = math.floor(num / 256) + local f = string.char(num % 256) + num = math.floor(num / 256) + res[index ] = string.char(num % 256) + res[index + 1] = f + res[index + 2] = e + index = index + 3 + end + + if left == 1 then + ZZBase64.__decodeLeft1(res, index, text, len) + elseif left == 2 then + ZZBase64.__decodeLeft2(res, index, text, len) + end + return table.concat(res) +end + +function ZZBase64.__decodeLeft1(res, index, text, len) + local decode = ZZBase64.__decode + local a = decode[string.byte(text, len + 1)] + local b = decode[string.byte(text, len + 2)] + local c = decode[string.byte(text, len + 3)] + local num = a * 4096 + b * 64 + c + + local num1 = math.floor(num / 1024) % 256 + local num2 = math.floor(num / 4) % 256 + res[index] = string.char(num1) + res[index + 1] = string.char(num2) +end + +function ZZBase64.__decodeLeft2(res, index, text, len) + local decode = ZZBase64.__decode + local a = decode[string.byte(text, len + 1)] + local b = decode[string.byte(text, len + 2)] + local num = a * 64 + b + num = math.floor(num / 16) + res[index] = string.char(num) +end + + + + +return StartDebug diff --git a/lua_probject/base_project/LuaDebugjit.lua b/lua_probject/base_project/LuaDebugjit.lua new file mode 100644 index 00000000..6ba9f888 --- /dev/null +++ b/lua_probject/base_project/LuaDebugjit.lua @@ -0,0 +1,2589 @@ +local debugger_reLoadFile =nil +xpcall(function() + debugger_reLoadFile = require("luaideReLoadFile") +end,function() + debugger_reLoadFile = function() print("未实现代码重载") end +end) +local sethook = debug.sethook +local debugger_stackInfo = nil +local coro_debugger = nil +local debugger_require = require +local debugger_exeLuaString = nil +local checkSetVar = nil +local loadstring_ = nil +local debugger_sendMsg = nil +if (loadstring) then +loadstring_ = loadstring +else +loadstring_ = load +end +local ZZBase64 = {} +local LuaDebugTool_ = nil +if (LuaDebugTool) then + LuaDebugTool_ = LuaDebugTool +elseif (CS and CS.LuaDebugTool) then + LuaDebugTool_ = CS.LuaDebugTool +end +local LuaDebugTool = LuaDebugTool_ +local loadstring = loadstring_ +local getinfo = debug.getinfo +local function createSocket() + local base = _G + local string = require("string") + local math = require("math") + local socket = require("socket.core") + + local _M = socket + + ----------------------------------------------------------------------------- + -- Exported auxiliar functions + ----------------------------------------------------------------------------- + function _M.connect4(address, port, laddress, lport) + return socket.connect(address, port, laddress, lport, "inet") + end + + function _M.connect6(address, port, laddress, lport) + return socket.connect(address, port, laddress, lport, "inet6") + end + + if (not _M.connect) then + function _M.connect(address, port, laddress, lport) + local sock, err = socket.tcp() + if not sock then + return nil, err + end + if laddress then + local res, err = sock:bind(laddress, lport, -1) + if not res then + return nil, err + end + end + local res, err = sock:connect(address, port) + if not res then + return nil, err + end + return sock + end + end + function _M.bind(host, port, backlog) + if host == "*" then + host = "0.0.0.0" + end + local addrinfo, err = socket.dns.getaddrinfo(host) + if not addrinfo then + return nil, err + end + local sock, res + err = "no info on address" + for i, alt in base.ipairs(addrinfo) do + if alt.family == "inet" then + sock, err = socket.tcp4() + else + sock, err = socket.tcp6() + end + if not sock then + return nil, err + end + sock:setoption("reuseaddr", true) + res, err = sock:bind(alt.addr, port) + if not res then + sock:close() + else + res, err = sock:listen(backlog) + if not res then + sock:close() + else + return sock + end + end + end + return nil, err + end + + _M.try = _M.newtry() + + function _M.choose(table) + return function(name, opt1, opt2) + if base.type(name) ~= "string" then + name, opt1, opt2 = "default", name, opt1 + end + local f = table[name or "nil"] + if not f then + base.error("unknown key (" .. base.tostring(name) .. ")", 3) + else + return f(opt1, opt2) + end + end + end + + ----------------------------------------------------------------------------- + -- Socket sources and sinks, conforming to LTN12 + ----------------------------------------------------------------------------- + -- create namespaces inside LuaSocket namespace + local sourcet, sinkt = {}, {} + _M.sourcet = sourcet + _M.sinkt = sinkt + + _M.BLOCKSIZE = 2048 + + sinkt["close-when-done"] = + function(sock) + return base.setmetatable( + { + getfd = function() + return sock:getfd() + end, + dirty = function() + return sock:dirty() + end + }, + { + __call = function(self, chunk, err) + if not chunk then + sock:close() + return 1 + else + return sock:send(chunk) + end + end + } + ) + end + + sinkt["keep-open"] = + function(sock) + return base.setmetatable( + { + getfd = function() + return sock:getfd() + end, + dirty = function() + return sock:dirty() + end + }, + { + __call = function(self, chunk, err) + if chunk then + return sock:send(chunk) + else + return 1 + end + end + } + ) + end + + sinkt["default"] = sinkt["keep-open"] + + _M.sink = _M.choose(sinkt) + + sourcet["by-length"] = + function(sock, length) + return base.setmetatable( + { + getfd = function() + return sock:getfd() + end, + dirty = function() + return sock:dirty() + end + }, + { + __call = function() + if length <= 0 then + return nil + end + local size = math.min(socket.BLOCKSIZE, length) + local chunk, err = sock:receive(size) + if err then + return nil, err + end + length = length - string.len(chunk) + return chunk + end + } + ) + end + + sourcet["until-closed"] = + function(sock) + local done + return base.setmetatable( + { + getfd = function() + return sock:getfd() + end, + dirty = function() + return sock:dirty() + end + }, + { + __call = function() + if done then + return nil + end + local chunk, err, partial = sock:receive(socket.BLOCKSIZE) + if not err then + return chunk + elseif err == "closed" then + sock:close() + done = 1 + return partial + else + return nil, err + end + end + } + ) + end + + sourcet["default"] = sourcet["until-closed"] + + _M.source = _M.choose(sourcet) + + return _M +end + +local function createJson() + local math = require("math") + local string = require("string") + local table = require("table") + local object = nil + ----------------------------------------------------------------------------- + -- Module declaration + ----------------------------------------------------------------------------- + local json = {} -- Public namespace + local json_private = {} -- Private namespace + + -- Public constants + json.EMPTY_ARRAY = {} + json.EMPTY_OBJECT = {} + -- Public functions + + -- Private functions + local decode_scanArray + local decode_scanComment + local decode_scanConstant + local decode_scanNumber + local decode_scanObject + local decode_scanString + local decode_scanWhitespace + local encodeString + local isArray + local isEncodable + + ----------------------------------------------------------------------------- + -- PUBLIC FUNCTIONS + ----------------------------------------------------------------------------- + --- Encodes an arbitrary Lua object / variable. + -- @param v The Lua object / variable to be JSON encoded. + -- @return String containing the JSON encoding in internal Lua string format (i.e. not unicode) + function json.encode(v) + -- Handle nil values + if v == nil then + return "null" + end + + local vtype = type(v) + + -- Handle strings + if vtype == "string" then + return '"' .. json_private.encodeString(v) .. '"' -- Need to handle encoding in string + end + + -- Handle booleans + if vtype == "number" or vtype == "boolean" then + return tostring(v) + end + + -- Handle tables + if vtype == "table" then + local rval = {} + -- Consider arrays separately + local bArray, maxCount = isArray(v) + if bArray then + for i = 1, maxCount do + table.insert(rval, json.encode(v[i])) + end + else -- An object, not an array + for i, j in pairs(v) do + if isEncodable(i) and isEncodable(j) then + table.insert(rval, '"' .. json_private.encodeString(i) .. '":' .. json.encode(j)) + end + end + end + if bArray then + return "[" .. table.concat(rval, ",") .. "]" + else + return "{" .. table.concat(rval, ",") .. "}" + end + end + + -- Handle null values + if vtype == "function" and v == json.null then + return "null" + end + + assert(false, "encode attempt to encode unsupported type " .. vtype .. ":" .. tostring(v)) + end + + --- Decodes a JSON string and returns the decoded value as a Lua data structure / value. + -- @param s The string to scan. + -- @param [startPos] Optional starting position where the JSON string is located. Defaults to 1. + -- @param Lua object, number The object that was scanned, as a Lua table / string / number / boolean or nil, + -- and the position of the first character after + -- the scanned JSON object. + function json.decode(s, startPos) + startPos = startPos and startPos or 1 + startPos = decode_scanWhitespace(s, startPos) + assert(startPos <= string.len(s), "Unterminated JSON encoded object found at position in [" .. s .. "]") + local curChar = string.sub(s, startPos, startPos) + -- Object + if curChar == "{" then + return decode_scanObject(s, startPos) + end + -- Array + if curChar == "[" then + return decode_scanArray(s, startPos) + end + -- Number + if string.find("+-0123456789.e", curChar, 1, true) then + return decode_scanNumber(s, startPos) + end + -- String + if curChar == '"' or curChar == [[']] then + return decode_scanString(s, startPos) + end + if string.sub(s, startPos, startPos + 1) == "/*" then + return json.decode(s, decode_scanComment(s, startPos)) + end + -- Otherwise, it must be a constant + return decode_scanConstant(s, startPos) + end + + --- The null function allows one to specify a null value in an associative array (which is otherwise + -- discarded if you set the value with 'nil' in Lua. Simply set t = { first=json.null } + function json.null() + return json.null -- so json.null() will also return null ;-) + end + ----------------------------------------------------------------------------- + -- Internal, PRIVATE functions. + -- Following a Python-like convention, I have prefixed all these 'PRIVATE' + -- functions with an underscore. + ----------------------------------------------------------------------------- + --- Scans an array from JSON into a Lua object + -- startPos begins at the start of the array. + -- Returns the array and the next starting position + -- @param s The string being scanned. + -- @param startPos The starting position for the scan. + -- @return table, int The scanned array as a table, and the position of the next character to scan. + function decode_scanArray(s, startPos) + local array = {} -- The return value + local stringLen = string.len(s) + assert( + string.sub(s, startPos, startPos) == "[", + "decode_scanArray called but array does not start at position " .. startPos .. " in string:\n" .. s + ) + startPos = startPos + 1 + -- Infinite loop for array elements + repeat + startPos = decode_scanWhitespace(s, startPos) + assert(startPos <= stringLen, "JSON String ended unexpectedly scanning array.") + local curChar = string.sub(s, startPos, startPos) + if (curChar == "]") then + return array, startPos + 1 + end + if (curChar == ",") then + startPos = decode_scanWhitespace(s, startPos + 1) + end + assert(startPos <= stringLen, "JSON String ended unexpectedly scanning array.") + object, startPos = json.decode(s, startPos) + table.insert(array, object) + until false + end + + --- Scans a comment and discards the comment. + -- Returns the position of the next character following the comment. + -- @param string s The JSON string to scan. + -- @param int startPos The starting position of the comment + function decode_scanComment(s, startPos) + assert( + string.sub(s, startPos, startPos + 1) == "/*", + "decode_scanComment called but comment does not start at position " .. startPos + ) + local endPos = string.find(s, "*/", startPos + 2) + assert(endPos ~= nil, "Unterminated comment in string at " .. startPos) + return endPos + 2 + end + + --- Scans for given constants: true, false or null + -- Returns the appropriate Lua type, and the position of the next character to read. + -- @param s The string being scanned. + -- @param startPos The position in the string at which to start scanning. + -- @return object, int The object (true, false or nil) and the position at which the next character should be + -- scanned. + function decode_scanConstant(s, startPos) + local consts = {["true"] = true, ["false"] = false, ["null"] = nil} + local constNames = {"true", "false", "null"} + + for i, k in pairs(constNames) do + if string.sub(s, startPos, startPos + string.len(k) - 1) == k then + return consts[k], startPos + string.len(k) + end + end + assert(nil, "Failed to scan constant from string " .. s .. " at starting position " .. startPos) + end + + --- Scans a number from the JSON encoded string. + -- (in fact, also is able to scan numeric +- eqns, which is not + -- in the JSON spec.) + -- Returns the number, and the position of the next character + -- after the number. + -- @param s The string being scanned. + -- @param startPos The position at which to start scanning. + -- @return number, int The extracted number and the position of the next character to scan. + function decode_scanNumber(s, startPos) + local endPos = startPos + 1 + local stringLen = string.len(s) + local acceptableChars = "+-0123456789.e" + while (string.find(acceptableChars, string.sub(s, endPos, endPos), 1, true) and endPos <= stringLen) do + endPos = endPos + 1 + end + local stringValue = "return " .. string.sub(s, startPos, endPos - 1) + local stringEval = loadstring(stringValue) + assert( + stringEval, + "Failed to scan number [ " .. stringValue .. "] in JSON string at position " .. startPos .. " : " .. endPos + ) + return stringEval(), endPos + end + + --- Scans a JSON object into a Lua object. + -- startPos begins at the start of the object. + -- Returns the object and the next starting position. + -- @param s The string being scanned. + -- @param startPos The starting position of the scan. + -- @return table, int The scanned object as a table and the position of the next character to scan. + function decode_scanObject(s, startPos) + local object = {} + local stringLen = string.len(s) + local key, value + assert( + string.sub(s, startPos, startPos) == "{", + "decode_scanObject called but object does not start at position " .. startPos .. " in string:\n" .. s + ) + startPos = startPos + 1 + repeat + startPos = decode_scanWhitespace(s, startPos) + assert(startPos <= stringLen, "JSON string ended unexpectedly while scanning object.") + local curChar = string.sub(s, startPos, startPos) + if (curChar == "}") then + return object, startPos + 1 + end + if (curChar == ",") then + startPos = decode_scanWhitespace(s, startPos + 1) + end + assert(startPos <= stringLen, "JSON string ended unexpectedly scanning object.") + -- Scan the key + key, startPos = json.decode(s, startPos) + assert(startPos <= stringLen, "JSON string ended unexpectedly searching for value of key " .. key) + startPos = decode_scanWhitespace(s, startPos) + assert(startPos <= stringLen, "JSON string ended unexpectedly searching for value of key " .. key) + assert( + string.sub(s, startPos, startPos) == ":", + "JSON object key-value assignment mal-formed at " .. startPos + ) + startPos = decode_scanWhitespace(s, startPos + 1) + assert(startPos <= stringLen, "JSON string ended unexpectedly searching for value of key " .. key) + value, startPos = json.decode(s, startPos) + object[key] = value + until false -- infinite loop while key-value pairs are found + end + + -- START SoniEx2 + -- Initialize some things used by decode_scanString + -- You know, for efficiency + local escapeSequences = { + ["\\t"] = "\t", + ["\\f"] = "\f", + ["\\r"] = "\r", + ["\\n"] = "\n", + ["\\b"] = "" + } + setmetatable( + escapeSequences, + { + __index = function(t, k) + -- skip "\" aka strip escape + return string.sub(k, 2) + end + } + ) + -- END SoniEx2 + --- Scans a JSON string from the opening inverted comma or single quote to the + -- end of the string. + -- Returns the string extracted as a Lua string, + -- and the position of the next non-string character + -- (after the closing inverted comma or single quote). + -- @param s The string being scanned. + -- @param startPos The starting position of the scan. + -- @return string, int The extracted string as a Lua string, and the next character to parse. + function decode_scanString(s, startPos) + assert(startPos, "decode_scanString(..) called without start position") + local startChar = string.sub(s, startPos, startPos) + -- START SoniEx2 + -- PS: I don't think single quotes are valid JSON + assert(startChar == '"' or startChar == [[']], "decode_scanString called for a non-string") + --assert(startPos, "String decoding failed: missing closing " .. startChar .. " for string at position " .. oldStart) + local t = {} + local i, j = startPos, startPos + while string.find(s, startChar, j + 1) ~= j + 1 do + local oldj = j + i, j = string.find(s, "\\.", j + 1) + local x, y = string.find(s, startChar, oldj + 1) + if not i or x < i then + i, j = x, y - 1 + end + table.insert(t, string.sub(s, oldj + 1, i - 1)) + if string.sub(s, i, j) == "\\u" then + local a = string.sub(s, j + 1, j + 4) + j = j + 4 + local n = tonumber(a, 16) + assert(n, "String decoding failed: bad Unicode escape " .. a .. " at position " .. i .. " : " .. j) + -- math.floor(x/2^y) == lazy right shift + -- a % 2^b == bitwise_and(a, (2^b)-1) + -- 64 = 2^6 + -- 4096 = 2^12 (or 2^6 * 2^6) + local x + if n < 128 then + x = string.char(n % 128) + elseif n < 2048 then + -- [110x xxxx] [10xx xxxx] + x = string.char(192 + (math.floor(n / 64) % 32), 128 + (n % 64)) + else + -- [1110 xxxx] [10xx xxxx] [10xx xxxx] + x = string.char(224 + (math.floor(n / 4096) % 16), 128 + (math.floor(n / 64) % 64), 128 + (n % 64)) + end + table.insert(t, x) + else + table.insert(t, escapeSequences[string.sub(s, i, j)]) + end + end + table.insert(t, string.sub(j, j + 1)) + assert( + string.find(s, startChar, j + 1), + "String decoding failed: missing closing " .. + startChar .. " at position " .. j .. "(for string at position " .. startPos .. ")" + ) + return table.concat(t, ""), j + 2 + -- END SoniEx2 + end + + --- Scans a JSON string skipping all whitespace from the current start position. + -- Returns the position of the first non-whitespace character, or nil if the whole end of string is reached. + -- @param s The string being scanned + -- @param startPos The starting position where we should begin removing whitespace. + -- @return int The first position where non-whitespace was encountered, or string.len(s)+1 if the end of string + -- was reached. + function decode_scanWhitespace(s, startPos) + local whitespace = " \n\r\t" + local stringLen = string.len(s) + while (string.find(whitespace, string.sub(s, startPos, startPos), 1, true) and startPos <= stringLen) do + startPos = startPos + 1 + end + return startPos + end + + --- Encodes a string to be JSON-compatible. + -- This just involves back-quoting inverted commas, back-quotes and newlines, I think ;-) + -- @param s The string to return as a JSON encoded (i.e. backquoted string) + -- @return The string appropriately escaped. + local escapeList = { + ['"'] = '\\"', + ["\\"] = "\\\\", + ["/"] = "\\/", + [""] = "\\b", + ["\f"] = "\\f", + ["\n"] = "\\n", + ["\r"] = "\\r", + ["\t"] = "\\t" + } + + function json_private.encodeString(s) + local s = tostring(s) + return s:gsub( + ".", + function(c) + return escapeList[c] + end + ) -- SoniEx2: 5.0 compat + end + + -- Determines whether the given Lua type is an array or a table / dictionary. + -- We consider any table an array if it has indexes 1..n for its n items, and no + -- other data in the table. + -- I think this method is currently a little 'flaky', but can't think of a good way around it yet... + -- @param t The table to evaluate as an array + -- @return boolean, number True if the table can be represented as an array, false otherwise. If true, + -- the second returned value is the maximum + -- number of indexed elements in the array. + function isArray(t) + -- Next we count all the elements, ensuring that any non-indexed elements are not-encodable + -- (with the possible exception of 'n') + if (t == json.EMPTY_ARRAY) then + return true, 0 + end + if (t == json.EMPTY_OBJECT) then + return false + end + + local maxIndex = 0 + for k, v in pairs(t) do + if (type(k) == "number" and math.floor(k) == k and 1 <= k) then -- k,v is an indexed pair + if (not isEncodable(v)) then + return false + end -- All array elements must be encodable + maxIndex = math.max(maxIndex, k) + else + if (k == "n") then + if v ~= (t.n or #t) then + return false + end -- False if n does not hold the number of elements + else -- Else of (k=='n') + if isEncodable(v) then + return false + end + end -- End of (k~='n') + end -- End of k,v not an indexed pair + end -- End of loop across all pairs + return true, maxIndex + end + + --- Determines whether the given Lua object / table / variable can be JSON encoded. The only + -- types that are JSON encodable are: string, boolean, number, nil, table and json.null. + -- In this implementation, all other types are ignored. + -- @param o The object to examine. + -- @return boolean True if the object should be JSON encoded, false if it should be ignored. + function isEncodable(o) + local t = type(o) + return (t == "string" or t == "boolean" or t == "number" or t == "nil" or t == "table") or + (t == "function" and o == json.null) + end + + return json +end +local debugger_print = print +local debug_server = nil +local breakInfoSocket = nil +local json = createJson() +local LuaDebugger = { + fileMaps = {}, + Run = true, --表示正常运行只检测断点 + StepIn = false, + StepNext = false, + StepOut = false, + breakInfos = {}, + runTimeType = nil, + isHook = true, + pathCachePaths = {}, + isProntToConsole = 1, + isDebugPrint = true, + hookType = "lrc", + stepNextFun = nil, + DebugLuaFie = "", + runLineCount = 0, + --分割字符串缓存 + splitFilePaths = {}, + version="0.9.3", + serVarLevel = 4 +} +local debug_hook = nil +local _resume = coroutine.resume +coroutine.resume = function(co, ...) + if (LuaDebugger.isHook) then + if coroutine.status(co) ~= "dead" then + debug.sethook(co, debug_hook, "lrc") + end + end + return _resume(co, ...) +end + +LuaDebugger.event = { + S2C_SetBreakPoints = 1, + C2S_SetBreakPoints = 2, + S2C_RUN = 3, + C2S_HITBreakPoint = 4, + S2C_ReqVar = 5, + C2S_ReqVar = 6, + --单步跳过请求 + S2C_NextRequest = 7, + --单步跳过反馈 + C2S_NextResponse = 8, + -- 单步跳过 结束 没有下一步 + C2S_NextResponseOver = 9, + --单步跳入 + S2C_StepInRequest = 10, + C2S_StepInResponse = 11, + --单步跳出 + S2C_StepOutRequest = 12, + --单步跳出返回 + C2S_StepOutResponse = 13, + --打印 + C2S_LuaPrint = 14, + S2C_LoadLuaScript = 16, + C2S_SetSocketName = 17, + C2S_LoadLuaScript = 18, + C2S_DebugXpCall = 20, + S2C_DebugClose = 21, + S2C_SerVar = 24, + C2S_SerVar = 25, + S2C_ReLoadFile = 26, + C2S_ReLoadFile = 27, +} +--@region print +function print(...) + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then + debugger_print(...) + end + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then + if (debug_server) then + local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错 + local str = "" + if (#arg == 0) then + arg = {"nil"} + end + for k, v in pairs(arg) do + str = str .. tostring(v) .. "\t" + end + local sendMsg = { + event = LuaDebugger.event.C2S_LuaPrint, + data = {msg = ZZBase64.encode(str), type = 1} + } + local sendStr = json.encode(sendMsg) + debug_server:send(sendStr .. "__debugger_k0204__") + end + end +end + +function luaIdePrintWarn(...) + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then + debugger_print(...) + end + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then + if (debug_server) then + local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错 + local str = "" + if (#arg == 0) then + arg = {"nil"} + end + for k, v in pairs(arg) do + str = str .. tostring(v) .. "\t" + end + local sendMsg = { + event = LuaDebugger.event.C2S_LuaPrint, + data = {msg = ZZBase64.encode(str), type = 2} + } + local sendStr = json.encode(sendMsg) + debug_server:send(sendStr .. "__debugger_k0204__") + end + end +end +function luaIdePrintErr(...) + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then + debugger_print(...) + end + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then + if (debug_server) then + local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错 + local str = "" + if (#arg == 0) then + arg = {"nil"} + end + for k, v in pairs(arg) do + str = str .. tostring(v) .. "\t" + end + local sendMsg = { + event = LuaDebugger.event.C2S_LuaPrint, + data = {msg = ZZBase64.encode(str), type = 3} + } + local sendStr = json.encode(sendMsg) + debug_server:send(sendStr .. "__debugger_k0204__") + end + end +end +--@endregion + +--@region 辅助方法 +local function debugger_lastIndex(str, p) + local startIndex = string.find(str, p, 1) + while startIndex do + local findstartIndex = string.find(str, p, startIndex + 1) + if (not findstartIndex) then + break + else + startIndex = findstartIndex + end + end + return startIndex +end +local function debugger_convertParentDir(dir) + local index, endindex = string.find(dir, "/%.%./") + if (index) then + local file1 = string.sub(dir, 1, index - 1) + local startIndex = debugger_lastIndex(file1, "/") + file1 = string.sub(file1, 1, startIndex - 1) + local file2 = string.sub(dir, endindex) + dir = file1 .. file2 + dir = debugger_convertParentDir(dir) + return dir + else + return dir + end +end + +local function debugger_getFilePathInfo(file) + local fileName = nil + local dir = nil + file = file:gsub("/.\\", "/") + file = file:gsub("\\", "/") + file = file:gsub("//", "/") + + + if file:find("@") == 1 then + file = file:sub(2) + end + local findex = file:find("%./") + if (findex == 1) then + file = file:sub(3) + end + + file = debugger_convertParentDir(file) + local fileLength = string.len(file) + local suffixNames = { + ".lua", + ".txt.lua", + ".txt", + ".bytes" + } + table.sort( + suffixNames, + function(name1, name2) + return string.len(name1) > string.len(name2) + end + ) + local suffixLengs = {} + for i, suffixName in ipairs(suffixNames) do + table.insert(suffixLengs, string.len(suffixName)) + end + + local fileLength = string.len(file) + for i, suffix in ipairs(suffixNames) do + local suffixName = string.sub(file, fileLength - suffixLengs[i] + 1) + if (suffixName == suffix) then + file = string.sub(file, 1, fileLength - suffixLengs[i]) + break + end + end + local fileNameStartIndex = debugger_lastIndex(file, "/") + if (fileNameStartIndex) then + fileName = string.sub(file, fileNameStartIndex + 1) + + dir = string.sub(file, 1, fileNameStartIndex) + file = dir .. fileName + else + fileNameStartIndex = debugger_lastIndex(file, "%.") + if (not fileNameStartIndex) then + fileName = file + dir = "" + else + dir = string.sub(file, 1, fileNameStartIndex) + dir = dir:gsub("%.", "/") + fileName = string.sub(file, fileNameStartIndex + 1) + file = dir .. fileName + end + end + + return file, dir, fileName +end + +--@endregion + + + +----=============================工具方法============================================= +--@region 工具方法 + + +local function debugger_strSplit(input, delimiter) + input = tostring(input) + delimiter = tostring(delimiter) + if (delimiter == "") then + return false + end + local pos, arr = 0, {} + -- for each divider found + for st, sp in function() + return string.find(input, delimiter, pos, true) + end do + table.insert(arr, string.sub(input, pos, st - 1)) + pos = sp + 1 + end + table.insert(arr, string.sub(input, pos)) + return arr +end +local function debugger_strTrim(input) + input = string.gsub(input, "^[ \t\n\r]+", "") + return string.gsub(input, "[ \t\n\r]+$", "") +end +local function debugger_dump(value, desciption, nesting) + if type(nesting) ~= "number" then + nesting = 3 + end + local lookupTable = {} + local result = {} + local function _v(v) + if type(v) == "string" then + v = '"' .. v .. '"' + end + return tostring(v) + end + local traceback = debugger_strSplit(debug.traceback("", 2), "\n") + print("dump from: " .. debugger_strTrim(traceback[3])) + local function _dump(value, desciption, indent, nest, keylen) + desciption = desciption or "" + local spc = "" + if type(keylen) == "number" then + spc = string.rep(" ", keylen - string.len(_v(desciption))) + end + if type(value) ~= "table" then + result[#result + 1] = string.format("%s%s%s = %s", indent, _v(desciption), spc, _v(value)) + elseif lookupTable[value] then + result[#result + 1] = string.format("%s%s%s = *REF*", indent, desciption, spc) + else + lookupTable[value] = true + if nest > nesting then + result[#result + 1] = string.format("%s%s = *MAX NESTING*", indent, desciption) + else + result[#result + 1] = string.format("%s%s = {", indent, _v(desciption)) + local indent2 = indent .. " " + local keys = {} + local keylen = 0 + local values = {} + for k, v in pairs(value) do + keys[#keys + 1] = k + local vk = _v(k) + local vkl = string.len(vk) + if vkl > keylen then + keylen = vkl + end + values[k] = v + end + table.sort( + keys, + function(a, b) + if type(a) == "number" and type(b) == "number" then + return a < b + else + return tostring(a) < tostring(b) + end + end + ) + for i, k in ipairs(keys) do + _dump(values[k], k, indent2, nest + 1, keylen) + end + result[#result + 1] = string.format("%s}", indent) + end + end + end + _dump(value, desciption, "- ", 1) + for i, line in ipairs(result) do + print(line) + end +end +--@endregion +local function debugger_valueToString(v) + local vtype = type(v) + local vstr = nil + if (vtype == "userdata") then + if (LuaDebugger.isFoxGloryProject ) then + + return "userdata",vtype + + else + return tostring(v), vtype + end + elseif (vtype == "table" or vtype == "function" or vtype == "boolean") then + local value = vtype + xpcall(function() + if(LuaDebugger.isFoxGloryProject) then + value = vtype + else + value = tostring(v) + end + + end,function() + value = vtype + end) + return value, vtype + elseif (vtype == "number" or vtype == "string" ) then + return v, vtype + else + return tostring(v), vtype + end +end +local function debugger_setVarInfo(name, value) + local valueStr, valueType = debugger_valueToString(value) + local nameStr,nameType = debugger_valueToString(name) + if(valueStr == nil) then + valueStr = valueType + end + local valueInfo = { + name =nameStr, + valueType = valueType, + valueStr = ZZBase64.encode(valueStr) + } + + return valueInfo +end + +local function debugger_getvalue(f) + local i = 1 + local locals = {} + -- get locals + while true do + local name, value = debug.getlocal(f, i) + if not name then + break + end + if (name ~= "(*temporary)") then + locals[name] = value + end + i = i + 1 + end + local func = getinfo(f, "f").func + i = 1 + local ups = {} + while func do -- check for func as it may be nil for tail calls + local name, value = debug.getupvalue(func, i) + if not name then + break + end + if (name == "_ENV") then + ups["_ENV_"] = value + else + ups[name] = value + end + i = i + 1 + end + + return {locals = locals, ups = ups} +end +--获取堆栈 +debugger_stackInfo = + function(ignoreCount, event) + local datas = {} + local stack = {} + local varInfos = {} + local funcs = {} + local index = 0 + for i = ignoreCount, 100 do + local source = getinfo(i) + local isadd = true + if (i == ignoreCount) then + local file = source.source + if (file:find(LuaDebugger.DebugLuaFie)) then + return + end + if (file == "=[C]") then + isadd = false + end + end + if not source then + break + end + if (isadd) then + local fullName, dir, fileName = debugger_getFilePathInfo(source.source) + local info = { + src = fullName, + scoreName = source.name, + currentline = source.currentline, + linedefined = source.linedefined, + what = source.what, + nameWhat = source.namewhat + } + index = i + local vars = debugger_getvalue(i + 1) + table.insert(stack, info) + table.insert(varInfos, vars) + table.insert(funcs, source.func) + end + if source.what == "main" then + break + end + end + + local stackInfo = {stack = stack, vars = varInfos, funcs = funcs} + local data = { + stack = stackInfo.stack, + vars = stackInfo.vars, + funcs = stackInfo.funcs, + event = event, + funcsLength = #stackInfo.funcs, + upFunc = getinfo(ignoreCount - 3, "f").func + } + + return data +end +--==============================工具方法 end====================================================== +--===========================点断信息================================================== +--根据不同的游戏引擎进行定时获取断点信息 +--CCDirector:sharedDirector():getScheduler() +local debugger_setBreak = nil +local function debugger_receiveDebugBreakInfo() + if(not jit) then + if(_VERSION)then + print("当前lua版本为: ".._VERSION.." 请使用 -----LuaDebug.lua----- 进行调试!") + else + print("当前为lua版本,请使用-----LuaDebug.lua-----进行调试!") + end + end + if (breakInfoSocket) then + local msg, status = breakInfoSocket:receive() + if(LuaDebugger.isLaunch == true and status == "closed") then + os.exit() + end + if (msg) then + local netData = json.decode(msg) + if netData.event == LuaDebugger.event.S2C_SetBreakPoints then + debugger_setBreak(netData.data) + elseif netData.event == LuaDebugger.event.S2C_LoadLuaScript then + LuaDebugger.loadScriptBody = netData.data + debugger_exeLuaString() + debugger_sendMsg(breakInfoSocket,LuaDebugger.event.C2S_LoadLuaScript,LuaDebugger.loadScriptBody) + elseif netData.event == LuaDebugger.event.S2C_ReLoadFile then + LuaDebugger.reLoadFileBody = netData.data + LuaDebugger.isReLoadFile = false + LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody) + LuaDebugger.reLoadFileBody.script = nil + + debugger_sendMsg( + breakInfoSocket, + LuaDebugger.event.C2S_ReLoadFile, + { + stack = LuaDebugger.reLoadFileBody + + } + ) + end + end + end +end +local function splitFilePath(path) + if (LuaDebugger.splitFilePaths[path]) then + return LuaDebugger.splitFilePaths[path] + end + local pos, arr = 0, {} + -- for each divider found + for st, sp in function() + return string.find(path, "/", pos, true) + end do + local pathStr = string.sub(path, pos, st - 1) + table.insert(arr, pathStr) + pos = sp + 1 + end + local pathStr = string.sub(path, pos) + table.insert(arr, pathStr) + LuaDebugger.splitFilePaths[path] = arr + return arr +end +debugger_setBreak = + function(datas) + local breakInfos = LuaDebugger.breakInfos + for i, data in ipairs(datas) do + data.fileName = string.lower(data.fileName) + data.serverPath = string.lower(data.serverPath) + local breakInfo = breakInfos[data.fileName] + if (not breakInfo) then + breakInfos[data.fileName] = {} + breakInfo = breakInfos[data.fileName] + end + if (not data.breakDatas or #data.breakDatas == 0) then + breakInfo[data.serverPath] = nil + else + local fileBreakInfo = breakInfo[data.serverPath] + if (not fileBreakInfo) then + fileBreakInfo = { + pathNames = splitFilePath(data.serverPath), + --命中次數判斷計數器 + hitCounts = {} + } + breakInfo[data.serverPath] = fileBreakInfo + end + local lineInfos = {} + for li, breakData in ipairs(data.breakDatas) do + lineInfos[breakData.line] = breakData + if (breakData.hitCondition and breakData.hitCondition ~= "") then + breakData.hitCondition = tonumber(breakData.hitCondition) + else + breakData.hitCondition = 0 + end + if (not fileBreakInfo.hitCounts[breakData.line]) then + fileBreakInfo.hitCounts[breakData.line] = 0 + end + end + fileBreakInfo.lines = lineInfos + --這裡添加命中次數判斷 + for line, count in pairs(fileBreakInfo.hitCounts) do + if (not lineInfos[line]) then + fileBreakInfo.hitCounts[line] = nil + end + end + end + local count = 0 + for i, linesInfo in pairs(breakInfo) do + count = count + 1 + end + if (count == 0) then + breakInfos[data.fileName] = nil + end + end + --debugger_dump(breakInfos, "breakInfos", 6) + --检查是否需要断点 + local isHook = false + for k, v in pairs(breakInfos) do + isHook = true + break + end + + --这样做的原因是为了最大限度的使手机调试更加流畅 注意这里会连续的进行n次 + if (isHook) then + if (not LuaDebugger.isHook) then + debug.sethook(debug_hook, "lrc") + end + LuaDebugger.isHook = true + else + if (LuaDebugger.isHook) then + debug.sethook() + end + LuaDebugger.isHook = false + end +end +local function debugger_checkFileIsBreak(fileName) + return LuaDebugger.breakInfos[fileName] +end +--=====================================断点信息 end ---------------------------------------------- +local controller_host = "192.168.1.102" +local controller_port = 7003 +debugger_sendMsg = function(serverSocket, eventName, data) + local sendMsg = { + event = eventName, + data = data + } + local sendStr = json.encode(sendMsg) + serverSocket:send(sendStr .. "__debugger_k0204__") +end +function debugger_conditionStr(condition, vars, callBack) + local function loadScript() + local currentTabble = {} + + local locals = vars[1].locals + local ups = vars[1].ups + if (ups) then + for k, v in pairs(ups) do + currentTabble[k] = v + end + end + + if (locals) then + for k, v in pairs(locals) do + currentTabble[k] = v + end + end + setmetatable(currentTabble, {__index = _G}) + local fun = loadstring("return " .. condition) + setfenv(fun, currentTabble) + return fun() + end + local status, + msg = + xpcall( + loadScript, + function(error) + print(error) + end + ) + if (status and msg) then + callBack() + end +end +--执行lua字符串 +debugger_exeLuaString = function() + + local function loadScript() + + local script = LuaDebugger.loadScriptBody.script + if (LuaDebugger.loadScriptBody.isBreak) then + local currentTabble = {_G = _G} + local frameId = LuaDebugger.loadScriptBody.frameId + frameId = frameId + local func = LuaDebugger.currentDebuggerData.funcs[frameId] + local vars = LuaDebugger.currentDebuggerData.vars[frameId] + local locals = vars.locals + local ups = vars.ups + for k, v in pairs(ups) do + currentTabble[k] = v + end + for k, v in pairs(locals) do + currentTabble[k] = v + end + setmetatable(currentTabble, {__index = _G}) + + local fun = loadstring(script) + setfenv(fun, currentTabble) + fun() + else + local fun = loadstring(script) + fun() + end + end + local status, + msg = + xpcall( + loadScript, + function(error) + + -- debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, LuaDebugger.loadScriptBody) + end + ) + LuaDebugger.loadScriptBody.script = nil + if (LuaDebugger.loadScriptBody.isBreak) then + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint) + LuaDebugger.loadScriptBody.stack = LuaDebugger.currentDebuggerData.stack + end + LuaDebugger.loadScriptBody.complete = true + +end +--@region 调试中修改变量值 + + +--根据key 值在 value 查找 +local function debugger_getTablekey(key,keyType,value) + if(keyType == -1) then + return key + elseif(keyType == 1) then + return tonumber(key) + elseif(keyType == 2) then + local valueKey = nil + for k,v in pairs(value) do + local nameType = type(k) + if(nameType == "userdata" or nameType == "table") then + if (not LuaDebugger.isFoxGloryProject) then + valueKey = tostring(k) + if(key == valueKey) then + return k + end + break + end + end + end + + end +end + +local function debugger_setVarValue(server, data) + + local newValue = nil + local level = LuaDebugger.serVarLevel+LuaDebugger.setVarBody.frameId + local firstKeyName = data.keys[1] + --@region vars check + local localValueChangeIndex = -1 + local upValueChangeIndex = -1 + local upValueFun = nil + local oldValue = nil + local i = 1 + local locals = {} + -- get locals + while true do + local name, value = debug.getlocal(level, i) + if not name then + break + end + if(firstKeyName == name) then + localValueChangeIndex = i + oldValue = value + end + if (name ~= "(*temporary)") then + locals[name] = value + end + i = i + 1 + end + local func = getinfo(level, "f").func + i = 1 + local ups = {} + while func do -- check for func as it may be nil for tail calls + local name, value = debug.getupvalue(func, i) + + if not name then + break + end + if(localValueChangeIndex == -1 and firstKeyName == name) then + upValueFun = func + oldValue = value + upValueChangeIndex = i + end + if (name == "_ENV") then + ups["_ENV_"] = value + else + ups[name] = value + end + i = i + 1 + end +--@endregion + local vars = {locals = locals, ups = ups} + + local function loadScript() + local currentTabble = {} + local locals = vars.locals + local ups = vars.ups + if (ups) then + for k, v in pairs(ups) do + currentTabble[k] = v + end + end + + if (locals) then + for k, v in pairs(locals) do + currentTabble[k] = v + end + end + setmetatable(currentTabble, {__index = _G}) + local fun = loadstring("return " .. data.value) + setfenv(fun, currentTabble) + newValue = fun() + end + local status, + msg = + xpcall( + loadScript, + function(error) + print(error, "============================") + end + ) + + local i = 1 + + -- local 查找并替换 + local keyLength = #data.keys + + if(keyLength == 1) then + if(localValueChangeIndex ~= -1) then + + debug.setlocal(level, localValueChangeIndex, newValue) + elseif(upValueFun ~= nil) then + debug.setupvalue( upValueFun, upValueChangeIndex, newValue ) + else + --全局变量查找 + if(_G[firstKeyName]) then + _G[firstKeyName] = newValue + end + end + else + if(not oldValue) then + if(_G[firstKeyName]) then + oldValue = _G[firstKeyName] + end + end + local tempValue = oldValue + for i=2,keyLength-1 do + if(tempValue) then + oldValue = oldValue[debugger_getTablekey(data.keys[i],data.numberTypes[i],oldValue)] + end + end + if(tempValue) then + oldValue[debugger_getTablekey(data.keys[keyLength],data.numberTypes[keyLength],oldValue)] = newValue + end + end + local varInfo = debugger_setVarInfo(data.varName, newValue) + data.varInfo = varInfo + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint) + +end +--@endregion + + + + +--调试修改变量值统一的 _resume +checkSetVar = + function() + if (LuaDebugger.isSetVar) then + LuaDebugger.isSetVar = false + debugger_setVarValue(debug_server,LuaDebugger.setVarBody) + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + _resume(coro_debugger, LuaDebugger.setVarBody) + xpcall( + checkSetVar, + function(error) + print("设置变量", error) + end + ) + elseif(LuaDebugger.isLoadLuaScript) then + LuaDebugger.isLoadLuaScript = false + debugger_exeLuaString() + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + _resume(coro_debugger, LuaDebugger.reLoadFileBody) + xpcall( + checkSetVar, + function(error) + print("执行代码", error) + end + ) + elseif(LuaDebugger.isReLoadFile) then + LuaDebugger.isReLoadFile = false + LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody) + print("重载结果:",LuaDebugger.reLoadFileBody.isReLoad) + LuaDebugger.reLoadFileBody.script = nil + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + _resume(coro_debugger, LuaDebugger.reLoadFileBody) + xpcall( + checkSetVar, + function(error) + print("重新加载文件", error) + end + ) + end +end + + + +local function getSource(source) + source = string.lower(source) + if (LuaDebugger.pathCachePaths[source]) then + LuaDebugger.currentLineFile = LuaDebugger.pathCachePaths[source] + return LuaDebugger.pathCachePaths[source] + end + + local fullName, dir, fileName = debugger_getFilePathInfo(source) + LuaDebugger.currentLineFile = fullName + LuaDebugger.pathCachePaths[source] = fileName + + return fileName +end +local function debugger_GeVarInfoBytUserData(server, var) + local fileds = LuaDebugTool.getUserDataInfo(var) + + local varInfos = {} + + + --c# vars + for i = 1, fileds.Count do + local filed = fileds[i - 1] + local valueInfo = { + name = filed.name, + valueType = filed.valueType, + valueStr = ZZBase64.encode(filed.valueStr), + isValue = filed.isValue, + csharp = true + } + + table.insert(varInfos, valueInfo) + end + return varInfos +end + +local function debugger_getValueByScript(value, script) + local val = nil + local status, + msg = + xpcall( + function() + local fun = loadstring("return " .. script) + setfenv(fun, value) + val = fun() + end, + function(error) + print(error, "====>") + val = nil + end + ) + + return val +end +local function debugger_getVarByKeys(value, keys, index) + local str = "" + local keyLength = #keys + for i = index, keyLength do + local key = keys[i] + if (key == "[metatable]") then + else + if (i == index) then + if (string.find(key, "%.")) then + if (str == "") then + i = index + 1 + value = value[key] + end + if (i >= #keys) then + return index, value + end + + return debugger_getVarByKeys(value, keys, i) + else + str = key + end + else + if (string.find(key, "%[")) then + str = str .. key + elseif (type(key) == "string") then + if (string.find(key, "table:") or string.find(key, "userdata:") or string.find(key, "function:")) then + if (str ~= "") then + local vl = debugger_getValueByScript(value, str) + value = vl + if (value) then + for k, v in pairs(value) do + local ktype = type(k) + + if (ktype == "userdata" or ktype == "table" or ktype == "function") then + local keyName = debugger_valueToString(k) + if (keyName == key) then + value = v + break + end + end + end + end + str = "" + if (i == keyLength) then + return #keys, value + else + return debugger_getVarByKeys(value, keys, i + 1) + end + else + str = str .. '["' .. key .. '"]' + end + else + str = str .. '["' .. key .. '"]' + end + else + str = str .. "[" .. key .. "]" + end + end + end + end + + local v = debugger_getValueByScript(value, str) + + return #keys, v +end +--[[ + @desc: 查找c# 值 + author:k0204 + time:2018-04-07 21:32:31 + return +]] +local function debugger_getCSharpValue(value, searchIndex, keys) + local key = keys[searchIndex] + local val = LuaDebugTool.getCSharpValue(value, key) + if (val) then + --1最后一个 直接返回 + if (searchIndex == #keys) then + return #keys, val + else + --2再次获得 如果没有找到那么 进行lua 层面查找 + local vindex, val1 = debugger_getCSharpValue(val, searchIndex + 1, keys) + if (not val1) then + --组建新的keys + local tempKeys = {} + for i = vindex, #keys do + table.insert(tempKeys, keys[i]) + end + local vindx, val1 = debugger_searchVarByKeys(value, searckKeys, 1) + return vindx, val1 + else + return vindex, val1 + end + end + else + --3最终这里返回 所以2 中 没有当val1 不为空的处理 + return searchIndex, val + end +end +local function debugger_searchVarByKeys(value, keys, searckKeys) + local index, val = debugger_getVarByKeys(value, searckKeys, 1) + + if (not LuaDebugTool or not LuaDebugTool.getCSharpValue or type(LuaDebugTool.getCSharpValue) ~= "function") then + return index, val + end + if (val) then + if (index == #keys) then + return index, val + else + local searchStr = "" + --进行c# 值查找 + local keysLength = #keys + local searchIndex = index + 1 + local sindex, val = debugger_getCSharpValue(val, searchIndex, keys) + return sindex, val + end + else + --进行递减 + local tempKeys = {} + for i = 1, #searckKeys - 1 do + table.insert(tempKeys, keys[i]) + end + if (#tempKeys == 0) then + return #keys, nil + end + return debugger_searchVarByKeys(value, keys, tempKeys) + end +end +--[[ + @desc: 获取metatable 信息 + author:k0204 + time:2018-04-06 20:27:12 + return +]] +local function debugger_getmetatable(value, metatable, vinfos, server, variablesReference, debugSpeedIndex, metatables) + + for i, mtable in ipairs(metatables) do + if (metatable == mtable) then + return vinfos + end + end + table.insert(metatables, metatable) + for k, v in pairs(metatable) do + local val = nil + if (type(k) == "string") then + xpcall( + function() + val = value[k] + end, + function(error) + val = nil + end + ) + if (val == nil) then + xpcall( + function() + if (string.find(k, "__")) then + val = v + end + end, + function(error) + val = nil + end + ) + end + end + if (val) then + local vinfo = debugger_setVarInfo(k, val) + table.insert(vinfos, vinfo) + if (#vinfos > 10) then + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = vinfos, + isComplete = 0 + } + ) + vinfos = {} + end + end + end + + local m = getmetatable(metatable) + if (m) then + return debugger_getmetatable(value, m, vinfos, server, variablesReference, debugSpeedIndex, metatables) + else + return vinfos + end + +end +local function debugger_sendTableField(luatable, vinfos, server, variablesReference, debugSpeedIndex, valueType) + if (valueType == "userdata") then + if (tolua and tolua.getpeer) then + luatable = tolua.getpeer(luatable) + else + return vinfos + end + end + if (luatable == nil) then + return vinfos + end + for k, v in pairs(luatable) do + local vinfo = debugger_setVarInfo(k, v) + table.insert(vinfos, vinfo) + if (#vinfos > 10) then + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = vinfos, + isComplete = 0 + } + ) + vinfos = {} + end + end + + return vinfos +end +local function debugger_sendTableValues(value, server, variablesReference, debugSpeedIndex) + local vinfos = {} + local luatable = {} + local valueType = type(value) + local userDataInfos = {} + local m = nil + + if (valueType == "userdata") then + m = getmetatable(value) + + vinfos = debugger_sendTableField(value, vinfos, server, variablesReference, debugSpeedIndex, valueType) + + if (LuaDebugTool) then + local varInfos = debugger_GeVarInfoBytUserData(server, value, variablesReference, debugSpeedIndex) + + for i, v in ipairs(varInfos) do + if (v.valueType == "System.Byte[]" and value[v.name] and type(value[v.name]) == "string") then + local valueInfo = { + name = v.name, + valueType = "string", + valueStr = ZZBase64.encode(value[v.name]) + } + table.insert(vinfos, valueInfo) + else + table.insert(vinfos, v) + end + if (#vinfos > 10) then + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = vinfos, + isComplete = 0 + } + ) + vinfos = {} + end + end + + end + else + m = getmetatable(value) + vinfos = debugger_sendTableField(value, vinfos, server, variablesReference, debugSpeedIndex, valueType) + end + + if (m) then + vinfos = debugger_getmetatable(value, m, vinfos, server, variablesReference, debugSpeedIndex, {}) + end + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = vinfos, + isComplete = 1 + } + ) +end + +--获取lua 变量的方法 +local function debugger_getBreakVar(body, server) + local variablesReference = body.variablesReference + local debugSpeedIndex = body.debugSpeedIndex + local vinfos = {} + local function exe() + local frameId = body.frameId + local type_ = body.type + local keys = body.keys + --找到对应的var + local vars = nil + if (type_ == 1) then + vars = LuaDebugger.currentDebuggerData.vars[frameId + 1] + vars = vars.locals + elseif (type_ == 2) then + vars = LuaDebugger.currentDebuggerData.vars[frameId + 1] + vars = vars.ups + elseif (type_ == 3) then + vars = _G + end + if (#keys == 0) then + debugger_sendTableValues(vars, server, variablesReference, debugSpeedIndex) + return + end + local index, value = debugger_searchVarByKeys(vars, keys, keys) + if (value) then + local valueType = type(value) + if (valueType == "table" or valueType == "userdata") then + + debugger_sendTableValues(value, server, variablesReference, debugSpeedIndex) + else + if (valueType == "function") then + if(LuaDebugger.isFoxGloryProject) then + value = "function" + else + value = tostring(value) + end + end + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = ZZBase64.encode(value), + isComplete = 1, + varType = valueType + } + ) + end + else + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = {}, + isComplete = 1, + varType = "nil" + } + ) + end + end + xpcall( + exe, + function(error) + -- print("获取变量错误 错误消息-----------------") + -- print(error) + -- print(debug.traceback("", 2)) + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = { + { + name = "error", + valueType = "string", + valueStr = ZZBase64.encode("无法获取属性值:" .. error .. "->" .. debug.traceback("", 2)), + isValue = false + } + }, + isComplete = 1 + } + ) + end + ) +end +local function ResetDebugInfo() + LuaDebugger.Run = false + LuaDebugger.StepIn = false + LuaDebugger.StepNext = false + LuaDebugger.StepOut = false + +end +local function debugger_loop(server) + server = debug_server + --命令 + local command + local eval_env = {} + local arg + while true do + local line, status = server:receive() + if (status == "closed") then + if(LuaDebugger.isLaunch) then + os.exit() + else + debug.sethook() + coroutine.yield() + end + end + if (line) then + local netData = json.decode(line) + local event = netData.event + local body = netData.data + if (event == LuaDebugger.event.S2C_DebugClose) then + if(LuaDebugger.isLaunch) then + os.exit() + else + debug.sethook() + coroutine.yield() + end + + elseif event == LuaDebugger.event.S2C_SetBreakPoints then + --设置断点信息 + local function setB() + debugger_setBreak(body) + end + xpcall( + setB, + function(error) + print(error) + end + ) + elseif event == LuaDebugger.event.S2C_RUN then --开始运行 + LuaDebugger.runTimeType = body.runTimeType + LuaDebugger.isProntToConsole = body.isProntToConsole + LuaDebugger.isFoxGloryProject = body.isFoxGloryProject + LuaDebugger.isLaunch = body.isLaunch + ResetDebugInfo() + LuaDebugger.currentDebuggerData = nil + LuaDebugger.Run = true + LuaDebugger.tempRunFlag = true + LuaDebugger.currentLine= nil + local data = coroutine.yield() + LuaDebugger.serVarLevel = 4 + LuaDebugger.currentDebuggerData = data + debugger_sendMsg( + server, + data.event, + { + stack = data.stack + } + ) + elseif event == LuaDebugger.event.S2C_ReqVar then -- 获取变量信息 + --请求数据信息 + debugger_getBreakVar(body, server) + elseif event == LuaDebugger.event.S2C_NextRequest then -- 设置单步跳过 + ResetDebugInfo() + LuaDebugger.StepNext = true + --设置当前文件名和当前行数 + local data = coroutine.yield() + LuaDebugger.serVarLevel = 4 + --重置调试信息 + LuaDebugger.currentDebuggerData = data + debugger_sendMsg( + server, + data.event, + { + stack = data.stack + } + ) + elseif (event == LuaDebugger.event.S2C_StepInRequest) then --单步跳入 + --单步跳入 + ResetDebugInfo() + LuaDebugger.StepIn = true + + local data = coroutine.yield() + LuaDebugger.serVarLevel = 4 + --重置调试信息 + LuaDebugger.currentDebuggerData = data + debugger_sendMsg( + server, + data.event, + { + stack = data.stack, + eventType = data.eventType + } + ) + elseif (event == LuaDebugger.event.S2C_StepOutRequest) then + --单步跳出 + ResetDebugInfo() + LuaDebugger.StepOut = true + local data = coroutine.yield() + LuaDebugger.serVarLevel = 4 + --重置调试信息 + LuaDebugger.currentDebuggerData = data + debugger_sendMsg( + server, + data.event, + { + stack = data.stack, + eventType = data.eventType + } + ) + elseif event == LuaDebugger.event.S2C_LoadLuaScript then + LuaDebugger.loadScriptBody = body + LuaDebugger.isLoadLuaScript = true + local data = coroutine.yield() + debugger_sendMsg( + server, + LuaDebugger.event.C2S_LoadLuaScript, + LuaDebugger.loadScriptBody + ) + elseif event == LuaDebugger.event.S2C_SerVar then + LuaDebugger.isSetVar = true + LuaDebugger.setVarBody = body + local data = coroutine.yield() + debugger_sendMsg( + server, + LuaDebugger.event.C2S_SerVar, + { + stack = data, + eventType = data.eventType + } + ) + elseif event == LuaDebugger.event.S2C_ReLoadFile then + LuaDebugger.isReLoadFile = true + LuaDebugger.reLoadFileBody = body + local data = coroutine.yield() + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReLoadFile, + { + stack = data, + eventType = data.eventType + } + ) + end + end + end +end +coro_debugger = coroutine.create(debugger_loop) +debug_hook = function(event, line) + + if(not LuaDebugger.isHook) then + return + end + + if(LuaDebugger.Run) then + if(event == "line") then + local isCheck = false + for k, breakInfo in pairs(LuaDebugger.breakInfos) do + + for bk, linesInfo in pairs(breakInfo) do + + if(linesInfo.lines and linesInfo.lines[line]) then + isCheck = true + break + end + end + if(isCheck) then + break + end + end + + if(not isCheck) then + return + end + + end + end + + + local file = nil + if(event == "line") then + + local funs = nil + local funlength =0 + if(LuaDebugger.currentDebuggerData) then + funs = LuaDebugger.currentDebuggerData.funcs + funlength = #funs + end + local stepInfo = getinfo(2) + local tempFunc = stepInfo.func + local source = stepInfo.source + file = getSource(source); + if(source == "=[C]" or source:find(LuaDebugger.DebugLuaFie)) then return end + if(funlength > 0 and funs[1] == tempFunc and LuaDebugger.currentLine ~= line) then + LuaDebugger.runLineCount = LuaDebugger.runLineCount+1 + end + local breakInfo = LuaDebugger.breakInfos[file] + local breakData = nil + local ischeck = false + if(breakInfo) then + + for k, lineInfo in pairs(breakInfo) do + local lines = lineInfo.lines + if(lines and lines[line]) then + ischeck = true + break + end + end + end + local isHit = false + if(ischeck) then + + --并且在断点中 + local info = stepInfo + local source = string.lower( info.source ) + local fullName,dir,fileName = debugger_getFilePathInfo(source) + local hitPathNames = splitFilePath(fullName) + + local hitCounts = {} + local debugHitCounts = nil + for k, lineInfo in pairs(breakInfo) do + + local lines = lineInfo.lines + local pathNames = lineInfo.pathNames + debugHitCounts = lineInfo.hitCounts + if(lines and lines[line]) then + breakData = lines[line] + --判断路径 + hitCounts[k] = 0 + local hitPathNamesCount = #hitPathNames + local pathNamesCount = #pathNames + local checkCount = 0; + while(true) do + if (pathNames[pathNamesCount] ~= hitPathNames[hitPathNamesCount]) then + break + else + hitCounts[k] = hitCounts[k] + 1 + end + pathNamesCount = pathNamesCount - 1 + hitPathNamesCount = hitPathNamesCount - 1 + checkCount = checkCount+1 + if(pathNamesCount <= 0 or hitPathNamesCount <= 0) then + break + end + end + if(checkCount>0) then + break; + end + else + breakData = nil + end + end + if(breakData) then + local hitFieName = "" + local maxCount = 0 + for k, v in pairs(hitCounts) do + if(v > maxCount) then + maxCount = v + hitFieName = k; + end + end + local hitPathNamesLength = #hitPathNames + if (hitPathNamesLength == 1 or (hitPathNamesLength > 1 and maxCount > 1)) then + if(hitFieName ~= "") then + + local hitCount = breakData.hitCondition + local clientHitCount = debugHitCounts[breakData.line] + clientHitCount = clientHitCount + 1 + debugHitCounts[breakData.line] = clientHitCount + if(funs and funs[1] == tempFunc and LuaDebugger.runLineCount == 0) then + LuaDebugger.runLineCount = 0 + elseif(LuaDebugger.tempRunFlag and LuaDebugger.currentLine == line) then + LuaDebugger.runLineCount = 0 + LuaDebugger.tempRunFlag = nil + elseif(clientHitCount >= hitCount) then + isHit = true + end + + end + end + end + end + if(LuaDebugger.StepOut) then + if(funlength == 1) then + ResetDebugInfo(); + LuaDebugger.Run = true + return + else + if(funs[2] == tempFunc) then + local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse) + -- print("StepIn 挂起") + --挂起等待调试器作出反应 + _resume(coro_debugger, data) + checkSetVar() + return + end + end + end + + if(LuaDebugger.StepIn) then + if(funs[1] == tempFunc and LuaDebugger.runLineCount == 0) then + return + end + local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse) + -- print("StepIn 挂起") + --挂起等待调试器作出反应 + _resume(coro_debugger, data) + checkSetVar() + return + end + + if(LuaDebugger.StepNext ) then + local isNext = false + if(funs) then + for i,f in ipairs(funs) do + if(tempFunc == f) then + if(LuaDebugger.currentLine == line) then + return + end + isNext =true + break; + end + end + else + + isNext =true + end + if(isNext) then + local data = debugger_stackInfo(3, LuaDebugger.event.C2S_NextResponse) + LuaDebugger.runLineCount = 0 + LuaDebugger.currentLine = line + --挂起等待调试器作出反应 + _resume(coro_debugger, data) + checkSetVar() + return + end + end + + local sevent = nil + + + --断点判断 + if(isHit) then + + + LuaDebugger.runLineCount = 0 + LuaDebugger.currentLine = line + sevent = LuaDebugger.event.C2S_HITBreakPoint + --调用 coro_debugger 并传入 参数 + local data = debugger_stackInfo(3, sevent) + --挂起等待调试器作出反应 + if(breakData and breakData.condition) then + debugger_conditionStr(breakData.condition,data.vars,function() + _resume(coro_debugger, data) + checkSetVar() + end) + else + --挂起等待调试器作出反应 + _resume(coro_debugger, data) + checkSetVar() + end + end + end +end + + +local function debugger_xpcall() + --调用 coro_debugger 并传入 参数 + local data = debugger_stackInfo(4, LuaDebugger.event.C2S_HITBreakPoint) + if(data.stack and data.stack[1]) then + data.stack[1].isXpCall = true + end + --挂起等待调试器作出反应 + _resume(coro_debugger, data) + checkSetVar() +end +--调试开始 +local function start() + + local socket = createSocket() + print(controller_host) + print(controller_port) + + local fullName,dirName,fileName = debugger_getFilePathInfo(getinfo(1).source) + LuaDebugger.DebugLuaFie = fileName + local server = socket.connect(controller_host, controller_port) + debug_server = server; + if server then + --创建breakInfo socket + socket = createSocket() + breakInfoSocket = socket.connect(controller_host, controller_port) + if(breakInfoSocket) then + breakInfoSocket:settimeout(0) + debugger_sendMsg(breakInfoSocket, LuaDebugger.event.C2S_SetSocketName, { + name = "breakPointSocket" + }) + + + debugger_sendMsg(server, LuaDebugger.event.C2S_SetSocketName, { + name = "mainSocket", + version = LuaDebugger.version + + }) + xpcall(function() + sethook(debug_hook, "lrc") + end, function(error) + print("error:", error) + end) + if(not jit) then + if(_VERSION)then + print("当前lua版本为: ".._VERSION.." 请使用LuaDebug 进行调试!") + else + print("当前为lua版本,请使用LuaDebug 进行调试!") + end + + end + _resume(coro_debugger, server) + end + end +end +function StartDebug(host, port) + + + if(not host) then + print("error host nil") + end + if(not port) then + print("error prot nil") + end + if(type(host) ~= "string") then + print("error host not string") + end + if(type(port) ~= "number") then + print("error host not number") + end + controller_host = host + controller_port = port + xpcall(start, function(error) + -- body + print(error) + end) + return debugger_receiveDebugBreakInfo, debugger_xpcall +end + + + +--base64 + +local string = string + +ZZBase64.__code = { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', + 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', + 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', + }; +ZZBase64.__decode = {} +for k,v in pairs(ZZBase64.__code) do + ZZBase64.__decode[string.byte(v,1)] = k - 1 +end + +function ZZBase64.encode(text) + local len = string.len(text) + local left = len % 3 + len = len - left + local res = {} + local index = 1 + for i = 1, len, 3 do + local a = string.byte(text, i ) + local b = string.byte(text, i + 1) + local c = string.byte(text, i + 2) + -- num = a<<16 + b<<8 + c + local num = a * 65536 + b * 256 + c + for j = 1, 4 do + --tmp = num >> ((4 -j) * 6) + local tmp = math.floor(num / (2 ^ ((4-j) * 6))) + --curPos = tmp&0x3f + local curPos = tmp % 64 + 1 + res[index] = ZZBase64.__code[curPos] + index = index + 1 + end + end + + if left == 1 then + ZZBase64.__left1(res, index, text, len) + elseif left == 2 then + ZZBase64.__left2(res, index, text, len) + end + return table.concat(res) +end + +function ZZBase64.__left2(res, index, text, len) + local num1 = string.byte(text, len + 1) + num1 = num1 * 1024 --lshift 10 + local num2 = string.byte(text, len + 2) + num2 = num2 * 4 --lshift 2 + local num = num1 + num2 + + local tmp1 = math.floor(num / 4096) --rShift 12 + local curPos = tmp1 % 64 + 1 + res[index] = ZZBase64.__code[curPos] + + local tmp2 = math.floor(num / 64) + curPos = tmp2 % 64 + 1 + res[index + 1] = ZZBase64.__code[curPos] + + curPos = num % 64 + 1 + res[index + 2] = ZZBase64.__code[curPos] + + res[index + 3] = "=" +end + +function ZZBase64.__left1(res, index,text, len) + local num = string.byte(text, len + 1) + num = num * 16 + + local tmp = math.floor(num / 64) + local curPos = tmp % 64 + 1 + res[index ] = ZZBase64.__code[curPos] + + curPos = num % 64 + 1 + res[index + 1] = ZZBase64.__code[curPos] + + res[index + 2] = "=" + res[index + 3] = "=" +end + +function ZZBase64.decode(text) + local len = string.len(text) + local left = 0 + if string.sub(text, len - 1) == "==" then + left = 2 + len = len - 4 + elseif string.sub(text, len) == "=" then + left = 1 + len = len - 4 + end + + local res = {} + local index = 1 + local decode = ZZBase64.__decode + for i =1, len, 4 do + local a = decode[string.byte(text,i )] + local b = decode[string.byte(text,i + 1)] + local c = decode[string.byte(text,i + 2)] + local d = decode[string.byte(text,i + 3)] + + --num = a<<18 + b<<12 + c<<6 + d + local num = a * 262144 + b * 4096 + c * 64 + d + + local e = string.char(num % 256) + num = math.floor(num / 256) + local f = string.char(num % 256) + num = math.floor(num / 256) + res[index ] = string.char(num % 256) + res[index + 1] = f + res[index + 2] = e + index = index + 3 + end + + if left == 1 then + ZZBase64.__decodeLeft1(res, index, text, len) + elseif left == 2 then + ZZBase64.__decodeLeft2(res, index, text, len) + end + return table.concat(res) +end + +function ZZBase64.__decodeLeft1(res, index, text, len) + local decode = ZZBase64.__decode + local a = decode[string.byte(text, len + 1)] + local b = decode[string.byte(text, len + 2)] + local c = decode[string.byte(text, len + 3)] + local num = a * 4096 + b * 64 + c + + local num1 = math.floor(num / 1024) % 256 + local num2 = math.floor(num / 4) % 256 + res[index] = string.char(num1) + res[index + 1] = string.char(num2) +end + +function ZZBase64.__decodeLeft2(res, index, text, len) + local decode = ZZBase64.__decode + local a = decode[string.byte(text, len + 1)] + local b = decode[string.byte(text, len + 2)] + local num = a * 64 + b + num = math.floor(num / 16) + res[index] = string.char(num) +end + + + + +return StartDebug diff --git a/lua_probject/base_project/Main.lua b/lua_probject/base_project/Main.lua new file mode 100644 index 00000000..8c88d763 --- /dev/null +++ b/lua_probject/base_project/Main.lua @@ -0,0 +1,378 @@ +local breakSocketHandle,debugXpCall = require("LuaDebugjit")("localhost",7003) +local timer = Timer.New(function() +breakSocketHandle() end, 1, -1, false) +timer:Start(); + +require "Core.init" +json = require 'cjson' +require'FairyGUI' +require'Game.ControllerManager' +require'Game.ViewManager' +require'Game.DataManager' +require "Game.ExtendManager" +require "Game.ExtendHotupdate" +require "TableData" + +MsgParser = require("MsgParser") + +Utils = Game.Utils +PlayerPrefs = UnityEngine.PlayerPrefs +RuntimePlatform = UnityEngine.RuntimePlatform +Application = UnityEngine.Application +Screen=UnityEngine.Screen +ResourcesManager = taurus.unity.ResourcesManager +-- require 'tolua.reflection' +-- tolua.loadassembly('Assembly-CSharp') +-- local BindingFlags = require 'System.Reflection.BindingFlags' + + + +local _game_info +local panel = nil + + +oldGameVersion=2 --1 原始 2 老游戏新加功能 + +--主入口函数。从这里开始lua逻辑 +function Main() + --PlayerPrefs.DeleteKey('session_id') + Application.targetFrameRate = 60 + FairyGUI.UIConfig.buttonSound =FairyGUI.NAudioClip(ResourcesManager.LoadObject("base/common/sound/click.mp3",typeof(UnityEngine.AudioClip))) + FairyGUI.UIConfig.defaultFont = "FZDaBiaoSong-B06S" + FairyGUI.FontManager.RegisterFont(FairyGUI.DynamicFont.New("SIYUAN","base/static/fonts/SIYUAN.TTF"),null) + --FairyGUI.FontManager.RegisterFont(FairyGUI.DynamicFont.New("FZCuYuan-M03","base/static/fonts/FZCuYuan-M03.TTF"),null) + --FairyGUI.FontManager.RegisterFont(FairyGUI.DynamicFont.New("HYFangLiJ","base/static/fonts/HYFangLiJ.ttf"),null) + _game_info = json.decode(GameApplication.Instance.GameInfo) + --_game_info["login_url"]="http://8.134.59.224:8101/" + --pt(_game_info) + debug_print = false--GetGameInfo("debug_print") + if Application.platform == RuntimePlatform.WindowsEditor then + debug_print = true + end + local NetManager = taurus.client.NetManager + NetManager.debug_print = debug_print + -- 网络延时8秒 + NetManager.TIMEOUT_TIME = 10 + + UIPackage.AddPackage("base/common/ui/Common") + panel = UIPackage.CreateObjectFromURL("ui://Common/UIPanel") + GRoot.inst:AddChildAt(panel, 0) + panel:MakeFullScreen() + panel:AddRelation(GRoot.inst, RelationType.Size) + --web网络API版本号 + NetManager.VERSION = GetGameInfo("net_version") + + TimerManager.New() + -- test:DynamicInvoke("222") + --ExtendManager.Init() + ControllerManager.Init() + ViewManager.Init() + + ControllerManager.ChangeController(LoginController) + ViewManager.ChangeView(ViewManager.View_Login) + DataManager.AppVersion = GetGameInfo("app_version") + + get_gps() + local timer = 0 + local DSTweenManager = ds.tween.DSTweenManager + UpdateBeat:Add(function() + local deltaTime = Time.deltaTime + DSTweenManager.Update(deltaTime) + timer = timer + deltaTime + if timer >= 60 then + timer = 0 + local ctr = ControllerManager.GetCurrenController() + if DataManager.CurrenRoom and ctr.baseType == GameController then + ctr:GetGPS() + else + get_gps() + end + end + end) + +end + + +function GetGameInfo(key) + return _game_info[key] +end + +function GetPlatform() + return ResourcesManager.OS_Dir +end + +function GetGameInfoPlatform(key) + local p_key = GetPlatform() + local _platfrom = _game_info[p_key] + return _platfrom[key] +end + +function BlurView(view,enabled) + if enabled then + local bf = FairyGUI.BlurFilter() + bf.blurSize = 0.05 + view.filter = bf + else + view.filter = null + end +end + +function ShareScreenShotWithOption(callback, index) + --分享目标选择,包括分享截图到 微信/支付宝 + local wx_win = BaseWindow.new("ui://Common/Win_WXShareWin", nil) + wx_win._close_destroy = true + wx_win._view:GetController("c1").selectedIndex = index or 3 + local cb = function() + if callback then callback() end + end + wx_win._view:GetChild("btn_wx_session").onClick:Add(function() + wx_win:Destroy() + ShareScreenShot(1, callback) + end) + wx_win:Show() +end + +function ShareScreenShot(n, callback) + local json_data = {} + json_data["title"] = "湘北联赛" + local mediaObject = {} + mediaObject["path"] = Application.persistentDataPath + mediaObject["filename"] = "screenshot" + mediaObject["type"] = 1 + json_data["mediaObject"] = mediaObject + json_data["description"] = "一款现实中朋友约局休闲娱乐的场所!速度约朋友一起来玩吧!" + json_data["scene"] = 0 + local json_str =json.encode(json_data) + TakeScreenShot.Take(function() + -- 1微信 2支付宝 + GameApplication.Instance:ShareLink(n or 1, json_str, nil) + if callback then + callback() + end + end) +end + +function shareQRCodePicture(url,secene) + --print(debug.traceback()) + print(url) + print(secene) + local json_data = {} + json_data["title"] = "湘北联赛" + local mediaObject = {} + local filename = "qrcode" .. DataManager.SelfUser.account_id + print(Application.persistentDataPath) + mediaObject["path"] = Application.persistentDataPath + mediaObject["filename"] = filename + mediaObject["type"] = 1 + json_data["mediaObject"] = mediaObject + json_data["description"] = "一款现实中朋友约局休闲娱乐的场所!速度约朋友一起来玩吧!" + json_data["scene"] = secene + print("json_data==================") + local json_str = json.encode(json_data) + pt(json_str) + local tex2 = QRCodePicture.GenerateQRcode(url, 250, 250) + local tex1 = ResourcesManager.LoadObject("base/lobby/bg/bg.png",typeof(UnityEngine.Texture2D)) + filename = filename ..".jpg" + print("text2==========") + print(tex2) + print("text1==========") + print(tex1) + print("filename==========") + print(filename) + QRCodePicture.CombanitePicture(tex1,tex2,393,1334-802-250,filename) + + GameApplication.Instance:ShareLink(1, json_str, nil) +end + + +function ShareChatRoom(room_id, share_time, round, game_name, group_id, player_list, _root_view, play_name) + +end + +function UISetController(root,controller_name, gear_display, selectedIndex) + local ctr = root:GetController(controller_name) + local gear = gear_display:GetGear(0) + + gear.controller = ctr + gear.pages = { ctr:GetPageId(selectedIndex) } + gear_display:HandleControllerChanged(ctr) +end + +local bg_url = nil +function LoadGameBg(url, main_view) + local win_mode = main_view:GetChild("win_mode") + win_mode:RemoveChildren(0, -1, true) + local tex_bg = ResourcesManager.LoadObjectByGroup(url..".png",typeof(UnityEngine.Texture), url) + print("===========================mainbg") + print(url..".png",typeof(UnityEngine.Texture), url) + local bg = GImage() + bg.texture = FairyGUI.NTexture(tex_bg) + bg.width = win_mode.width + bg.height = win_mode.height + bg:AddRelation(win_mode, RelationType.Size) + win_mode:AddChild(bg) + + -- 卸载资源 + if url ~= bg_url and bg_url then + ResourcesManager.UnLoadGroup(bg_url) + end + bg_url = url +end + +function AddPanel(child) + child:MakeFullScreen() + child:AddRelation(GRoot.inst, RelationType.Size) + panel:AddChild(child) +end + +function AddPanelAt(child,index) + child:MakeFullScreen() + child:AddRelation(GRoot.inst, RelationType.Size) + panel:AddChildAt(child, index) +end + +function AddPanelCenter(child) + panel:AddChild(child) + child:Center(true) +end + +--重启游戏 +function RestartGame() + DSTweenManager.ClearTween() + panel:Dispose() + coroutine.stopAll() + BaseWindow.DestroyAll() + GameApplication.Instance:RestartGame() +end + +--场景切换通知 +function OnLevelWasLoaded(level) + Time.timeSinceLevelLoad = 0 +end + +--程序切到后台 +function OnApplicationPause() + -- ViewUtil.CloseModalWait() + ViewManager.OnApplicationPause() +end + +--程序从后台切回 +function OnApplicationActive() + ViewManager.OnApplicationActive() +end + + + +function pt(...) + if debug_print then + local arg={...} + local has=false + for _,v in pairs(arg) do + if v and type(v)=="table" then + has=true + break + end + end + if not has then + print(...) + end + + local content="" + for _,v in pairs(arg) do + if v=="table" then + content=content..tostring(v).."\n" + else + content=content.."==>[T]:"..LuaPrint(v,limit),debug.traceback().."\n" + end + print(content) + end + + end +end + + +function LuaPrint(lua_table,limit,indent,step) + step=step or 0 + indent=indent or 0 + local content="" + if limit~=nil then + if step>limit then + return "..." + end + end + if step>10 then + return content.."..." + end + if lua_table==nil then + return "nil" + end + if type(lua_table)=="userdata" or type(lua_table)=="lightuserdata" or type(lua_table)=="thread" then + return tostring(lua_table) + end + + if type(lua_table)=="string" or type(lua_table)=="number" then + return "[No-Table]:"..lua_table + end + + for k,v in pairs(lua_table) do + if k~="_class_type" then + local szBuffer="" + Typev=type(v) + if Typev =="table" then + szBuffer="{" + end + local szPrefix=string.rep(" ",indent) + if Typev=="table" and v._fields then + local kk,vv=next(v._fields) + if type(vv)=="table" then + content=content.."\n\t"..kk.name.."={"..LuaPrint(vv._fields,5,indent+1,step+1).."}" + else + content=content.."\n\t"..kk.name.."="..vv + end + else + if type(k)=="table" then + if k.name then + if type(v)~="table" then + content=content.."\n"..k.name.."="..v + else + content=content.."\n"..k.name.." = list:" + local tmp="\n" + for ka,va in ipairs(v) do + tmp=tmp.."#"..ka.."_"..tostring(va) + end + content=content..tmp + end + end + + elseif type(k)=="function" then + content=content.."\n fun=function" + else + formatting=szPrefix..tostring(k).." = "..szBuffer + if Typev=="table" then + content=content.."\n"..formatting + content=content..LuaPrint(v,limit,indent+1,step+1) + content=content.."\n"..szPrefix.."}," + else + local szValue="" + if Typev=="string" then + szValue=string.format("%q",v) + else + szValue=tostring(v) + end + content=content.."\n"..formatting..(szValue or "nil").."," + end + end + + + end + end + end + return content +end + + +function printlog(...) + if debug_print then + print(...) + end +end \ No newline at end of file diff --git a/lua_probject/base_project/MsgParser.lua b/lua_probject/base_project/MsgParser.lua new file mode 100644 index 00000000..e5c59703 --- /dev/null +++ b/lua_probject/base_project/MsgParser.lua @@ -0,0 +1,139 @@ +local MsgParser = { inited = false } + +local utf8 = utf8 + +local strLen = utf8.len +local strGsub = utf8.sub +local strSub = string.sub +local strLen = string.len +local strByte = string.byte +local strGsub = string.gsub + +local _maskWord = '*' + +local _tree = {} + +local function _word2Tree(root, word) + if strLen(word) == 0 then return end + + local function _byte2Tree(r, ch, tail) + if tail then + if type(r[ch]) == 'table' then + r[ch].isTail = true + else + r[ch] = true + end + else + if r[ch] == true then + r[ch] = { isTail = true } + else + r[ch] = r[ch] or {} + end + end + return r[ch] + end + + local tmpparent = root + local len = strLen(word) + for i=1, len do + if tmpparent == true then + tmpparent = { isTail = true } + end + tmpparent = _byte2Tree(tmpparent, strSub(word, i, i), i==len) + end +end + +local function _detect(parent, word, idx) + local len = strLen(word) + + local ch = strSub(word, 1, 1) + local child = parent[ch] + + if not child then + elseif type(child) == 'table' then + if len > 1 then + if child.isTail then + return _detect(child, strSub(word, 2), idx+1) or idx + else + return _detect(child, strSub(word, 2), idx+1) + end + elseif len == 1 then + if child.isTail == true then + return idx + end + end + elseif (child == true) then + return idx + end + return false +end + +function MsgParser:init() + if self.inited then return end + + local words = require("SensitiveCfg") + + for _, word in pairs(words) do + _word2Tree(_tree, word) + end + + self.inited = true + package.loaded["SensitiveCfg"] = nil +end + +function MsgParser:checkString(s) + MsgParser:init() + if type(s) ~= 'string' then return end + local i = 1 + local len = strLen(s) + local word, idx, tmps + + + while true do + word = strSub(s, i) + idx = _detect(_tree, word, i) + + if idx then + return true + else + i = i + 1 + end + if i > len then + break + end + end + return false +end + +function MsgParser:getString(s) + MsgParser:init() + if type(s) ~= 'string' then return end + local i = 1 + local len = strLen(s) + local word, idx, tmps + + + while true do + word = strSub(s, i) + idx = _detect(_tree, word, i) + + if idx then + tmps = strSub(s, 1, i-1) + for j=1, idx-i+1 do + tmps = tmps .. _maskWord + end + s = tmps .. strSub(s, idx+1) + i = idx+1 + else + i = i + 1 + end + if i > len then + break + end + end + return s +end + + + +return MsgParser diff --git a/lua_probject/base_project/SensitiveCfg.lua b/lua_probject/base_project/SensitiveCfg.lua new file mode 100644 index 00000000..ce40b03e --- /dev/null +++ b/lua_probject/base_project/SensitiveCfg.lua @@ -0,0 +1,3014 @@ +local SensitiveCfg = +{ + "毛泽东", + "周恩来", + "刘少奇", + "朱德", + "彭德怀", + "林彪", + "刘伯承", + "陈毅", + "贺龙", + "聂荣臻", + "徐向前", + "罗荣桓", + "叶剑英", + "李大钊", + "陈独秀", + "孙中山", + "孙文", + "孙逸仙", + "邓小平", + "陈云", + "江泽民", + "李鹏", + "朱镕基", + "李瑞环", + "尉健行", + "李岚清", + "胡锦涛", + "罗干", + "温家宝", + "吴邦国", + "曾庆红", + "贾庆林", + "黄菊", + "吴官正", + "李长春", + "吴仪", + "回良玉", + "曾培炎", + "周永康", + "曹刚川", + "唐家璇", + "华建敏", + "陈至立", + "陈良宇", + "张德江", + "张立昌", + "俞正声", + "王乐泉", + "刘云山", + "王刚", + "王兆国", + "刘淇", + "贺国强", + "郭伯雄", + "胡耀邦", + "王乐泉", + "王兆国", + "周永康", + "李登辉", + "连战", + "陈水扁", + "宋楚瑜", + "吕秀莲", + "郁慕明", + "蒋介石", + "蒋中正", + "蒋经国", + "马英九", + "习近平", + "李克强", + "吴帮国", + "无帮国", + "无邦国", + "无帮过", + "瘟家宝", + "假庆林", + "甲庆林", + "假青林", + "离长春", + "习远平", + "袭近平", + "李磕墙", + "贺过墙", + "和锅枪", + "粥永康", + "轴永康", + "肘永康", + "周健康", + "粥健康", + "周小康", + "布什", + "布莱尔", + "小泉", + "纯一郎", + "萨马兰奇", + "安南", + "阿拉法特", + "普京", + "默克尔", + "克林顿", + "里根", + "尼克松", + "林肯", + "杜鲁门", + "赫鲁晓夫", + "列宁", + "斯大林", + "马克思", + "恩格斯", + "金正日", + "金日成", + "萨达姆", + "胡志明", + "西哈努克", + "希拉克", + "撒切尔", + "阿罗约", + "曼德拉", + "卡斯特罗", + "富兰克林", + "华盛顿", + "艾森豪威尔", + "拿破仑", + "亚历山大", + "路易", + "拉姆斯菲尔德", + "劳拉", + "鲍威尔", + "奥巴马", + "本拉登", + "奥马尔", + "柴玲", + "达赖喇嘛", + "江青", + "张春桥", + "姚文元", + "王洪文", + "东条英机", + "希特勒", + "墨索里尼", + "冈村秀树", + "冈村宁次", + "高丽朴", + "赵紫阳", + "王丹", + "沃尔开西", + "李洪志", + "李大师", + "赖昌星", + "马加爵", + "班禅", + "额尔德尼", + "山本五十六", + "阿扁", + "阿扁万岁", + "热那亚", + "热比娅", + "六四", + "六四运动", + "美国之音", + "密宗", + "民国", + "民进党", + "民运", + "民主", + "民主潮", + "摩门教", + "纳粹", + "南华早报", + "南蛮", + "明慧网", + "起义", + "亲民党", + "瘸腿帮", + "人民报", + "法轮功", + "法轮大法", + "打倒共产党", + "台独万岁", + "圣战", + "示威", + "台独", + "台独分子", + "台联", + "台湾民国", + "台湾岛国", + "台湾国", + "台湾独立", + "太子党", + "天安门事件", + "屠杀", + "小泉", + "新党", + "新疆独立", + "新疆分裂", + "新疆国", + "疆独", + "西藏独立", + "西藏分裂", + "西藏国", + "藏独", + "藏青会", + "藏妇会", + "学潮", + "学运", + "一党专政", + "一中一台", + "两个中国", + "一贯道", + "游行", + "造反", + "真善忍", + "镇压", + "政变", + "政治", + "政治反对派", + "政治犯", + "中共", + "共产党", + "反党", + "反共", + "政府", + "民主党", + "中国之春", + "转法轮", + "自焚", + "共党", + "共匪", + "苏家屯", + "基地组织", + "塔利班", + "东亚病夫", + "支那", + "高治联", + "高自联", + "专政", + "专制", + "世界维吾尔大会", + "核工业基地", + "核武器", + "铀", + "原子弹", + "氢弹", + "导弹", + "核潜艇", + "大参考", + "小参考", + "国内动态清样", + "多维", + "河殇", + "摩门教", + "穆罕默德", + "圣战", + "耶和华", + "耶稣", + "伊斯兰", + "真主安拉", + "白莲教", + "天主教", + "基督教", + "东正教", + "大法", + "法轮", + "法轮功", + "瘸腿帮", + "真理教", + "真善忍", + "转法轮", + "自焚", + "走向圆满", + "黄大仙", + "跳大神", + "神汉", + "神婆", + "真理教", + "大卫教", + "阎王", + "黑白无常", + "牛头马面", + "藏独", + "高丽棒子", + "疆独", + "蒙古鞑子", + "台独", + "台独分子", + "台联", + "台湾民国", + "西藏独立", + "新疆独立", + "南蛮", + "老毛子", + "回民吃猪肉", + "谋杀", + "杀人", + "吸毒", + "贩毒", + "赌博", + "拐卖", + "走私", + "卖淫", + "造反", + "强奸", + "轮奸", + "抢劫", + "先奸后杀", + "下注", + "抽头", + "坐庄", + "赌马", + "赌球", + "筹码", + "老虎机", + "轮盘赌", + "安非他命", + "大麻", + "可卡因", + "海洛因", + "冰毒", + "摇头丸", + "杜冷丁", + "鸦片", + "罂粟", + "迷幻药", + "白粉", + "嗑药", + "吸毒", + "AIDS", + "aids", + "Aids", + "DICK", + "dick", + "Dick", + "penis", + "sex", + "SM", + "屙", + "爱滋", + "淋病", + "梅毒", + "爱液", + "屄", + "逼", + "臭机八", + "臭鸡巴", + "吹喇叭", + "吹箫", + "催情药", + "屌", + "肛交", + "肛门", + "龟头", + "黄色", + "机八", + "机巴", + "鸡八", + "鸡巴", + "机掰", + "机巴", + "鸡叭", + "鸡鸡", + "鸡掰", + "鸡奸", + "妓女", + "奸", + "茎", + "精液", + "精子", + "尻", + "口交", + "滥交", + "乱交", + "轮奸", + "卖淫", + "屁眼", + "嫖娼", + "强奸", + "强奸犯", + "情色", + "肉棒", + "乳房", + "乳峰", + "乳交", + "乳头", + "乳晕", + "三陪", + "色情", + "射精", + "手淫", + "威而钢", + "威而柔", + "伟哥", + "性高潮", + "性交", + "性虐", + "性欲", + "穴", + "颜射", + "阳物", + "一夜情", + "阴部", + "阴唇", + "阴道", + "阴蒂", + "阴核", + "阴户", + "阴茎", + "阴门", + "淫", + "淫秽", + "淫乱", + "淫水", + "淫娃", + "淫液", + "淫汁", + "淫穴", + "淫洞", + "援交妹", + "做爱", + "梦遗", + "阳痿", + "早泄", + "奸淫", + "性欲", + "性交", + "Bitch", + "bt", + "cao", + "FUCK", + "Fuck", + "fuck", + "kao", + "NMD", + "NND", + "sb", + "shit", + "SHIT", + "SUCK", + "Suck", + "tmd", + "TMD", + "tnnd", + "K他命", + "白痴", + "笨蛋", + "屄", + "变态", + "婊子", + "操她妈", + "操妳妈", + "操你", + "操你妈", + "操他妈", + "草你", + "肏", + "册那", + "侧那", + "测拿", + "插", + "蠢猪", + "荡妇", + "发骚", + "废物", + "干她妈", + "干妳", + "干妳娘", + "干你", + "干你妈", + "干你妈B", + "干你妈b", + "干你妈逼", + "干你娘", + "干他妈", + "狗娘养的", + "滚", + "鸡奸", + "贱货", + "贱人", + "烂人", + "老母", + "老土", + "妈比", + "妈的", + "马的", + "妳老母的", + "妳娘的", + "你妈逼", + "破鞋", + "仆街", + "去她妈", + "去妳的", + "去妳妈", + "去你的", + "去你妈", + "去死", + "去他妈", + "日", + "日你", + "赛她娘", + "赛妳娘", + "赛你娘", + "赛他娘", + "骚货", + "傻B", + "傻比", + "傻子", + "上妳", + "上你", + "神经病", + "屎", + "屎妳娘", + "屎你娘", + "他妈的", + "王八蛋", + "我操", + "我日", + "乡巴佬", + "猪猡", + "屙", + "干", + "尿", + "掯", + "屌", + "操", + "骑你", + "湿了", + "操你", + "操他", + "操她", + "骑你", + "骑他", + "骑她", + "欠骑", + "欠人骑", + "来爽我", + "来插我", + "干你", + "干他", + "干她", + "干死", + "干爆", + "干机", + "FUCK", + "机叭", + "臭鸡", + "臭机", + "烂鸟", + "览叫", + "阳具", + "肉棒", + "肉壶", + "奶子", + "摸咪咪", + "干鸡", + "干入", + "小穴", + "强奸", + "插你", + "插你", + "爽你", + "爽你", + "干干", + "干X", + "我操", + "他干", + "干它", + "干牠", + "干您", + "干汝", + "干林", + "操林", + "干尼", + "操尼", + "我咧干", + "干勒", + "干我", + "干到", + "干啦", + "干爽", + "欠干", + "狗干", + "我干", + "来干", + "轮干", + "轮流干", + "干一干", + "援交", + "骑你", + "我操", + "轮奸", + "鸡奸", + "奸暴", + "再奸", + "我奸", + "奸你", + "奸你", + "奸他", + "奸她", + "奸一奸", + "淫水", + "淫湿", + "鸡歪", + "仆街", + "臭西", + "尻", + "遗精", + "烂逼", + "大血比", + "叼你妈", + "靠你妈", + "草你", + "干你", + "日你", + "插你", + "奸你", + "戳你", + "逼你老母", + "挨球", + "我日你", + "草拟妈", + "卖逼", + "狗操卖逼", + "奸淫", + "日死", + "奶子", + "阴茎", + "奶娘", + "他娘", + "她娘", + "骚B", + "你妈了妹", + "逼毛", + "插你妈", + "叼你", + "渣波波", + "嫩b", + "weelaa", + "缔顺", + "帝顺", + "蒂顺", + "系统消息", + "午夜", + "看下", + "草泥马", + "法克鱿", + "雅蠛蝶", + "潜烈蟹", + "菊花蚕", + "尾申鲸", + "吉跋猫", + "搞栗棒", + "吟稻雁", + "达菲鸡", + "SM", + "ML", + "3P", + "群P", + "马勒戈壁", + "双飞", + "周恩來", + "碡", + "籀", + "朱駿", + "朱狨基", + "朱容基", + "朱溶剂", + "朱熔基", + "朱镕基", + "邾", + "猪操", + "猪聋畸", + "猪毛", + "猪毛1", + "舳", + "瘃", + "躅", + "", + "翥", + "專政", + "颛", + "丬", + "隹", + "窀", + "卓伯源", + "倬", + "斫", + "诼", + "髭", + "鲻", + "子宫", + "秭", + "訾", + "自焚", + "自民党", + "自慰", + "自已的故事", + "自由民主论坛", + "总理", + "偬", + "诹", + "陬", + "鄹", + "鲰", + "躜", + "缵", + "作爱", + "作秀", + "阼", + "祚", + "做爱", + "阿扁萬歲", + "阿萊娜", + "啊無卵", + "埃裏克蘇特勤", + "埃斯萬", + "艾麗絲", + "愛滋", + "愛滋病", + "垵", + "暗黑法師", + "嶴", + "奧克拉", + "奧拉德", + "奧利弗", + "奧魯奇", + "奧倫", + "奧特蘭", + "㈧", + "巴倫侍從", + "巴倫坦", + "白立樸", + "白夢", + "白皮書", + "班禪", + "寶石商人", + "保釣", + "鮑戈", + "鮑彤", + "鮑伊", + "暴風亡靈", + "暴亂", + "暴熱的戰士", + "暴躁的城塔野獸", + "暴躁的警衛兵靈魂", + "暴躁的馬杜克", + "北大三角地論壇", + "北韓", + "北京當局", + "北美自由論壇", + "貝尤爾", + "韝", + "逼樣", + "比樣", + "蹕", + "颮", + "鑣", + "婊子養的", + "賓周", + "冰後", + "博訊", + "不滅帝王", + "", + "不爽不要錢", + "布萊爾", + "布雷爾", + "蔡崇國", + "蔡啓芳", + "黲", + "操鶏", + "操那嗎B", + "操那嗎逼", + "操那嗎比", + "操你媽", + "操你爺爺", + "曹長青", + "曹剛川", + "草", + "草你媽", + "草擬媽", + "册那娘餓比", + "插那嗎B", + "插那嗎逼", + "插那嗎比", + "插你媽", + "插你爺爺", + "覘", + "蕆", + "囅", + "閶", + "長官沙塔特", + "常勁", + "朝鮮", + "車侖", + "車侖女幹", + "沉睡圖騰", + "陳炳基", + "陳博志", + "陳定南", + "陳建銘", + "陳景俊", + "陳菊", + "陳軍", + "陳良宇", + "陳蒙", + "陳破空", + "陳水扁", + "陳唐山", + "陳希同", + "陳小同", + "陳宣良", + "陳學聖", + "陳一諮", + "陳總統", + "諶", + "齔", + "櫬", + "讖", + "程凱", + "程鐵軍", + "鴟", + "痴鳩", + "痴拈", + "遲鈍的圖騰", + "持不同政見", + "赤色騎士", + "赤色戰士", + "處女膜", + "傳染性病", + "吹簫", + "春夏自由論壇", + "戳那嗎B", + "戳那嗎逼", + "戳那嗎比", + "輳", + "鹺", + "錯B", + "錯逼", + "錯比", + "錯那嗎B", + "錯那嗎逼", + "錯那嗎比", + "達夫警衛兵", + "達夫侍從", + "達癩", + "打飛機", + "大參考", + "大東亞", + "大東亞共榮", + "大鶏巴", + "大紀元", + "大紀元新聞網", + "大紀園", + "大家論壇", + "大奶媽", + "大史記", + "大史紀", + "大衛教", + "大中國論壇", + "大中華論壇", + "大衆真人真事", + "紿", + "戴維教", + "戴相龍", + "彈劾", + "氹", + "蕩婦", + "導師", + "盜竊犯", + "德維爾", + "登輝", + "鄧笑貧", + "糴", + "迪裏夏提", + "覿", + "地下教會", + "帝國主義", + "電視流氓", + "叼你媽", + "釣魚島", + "丁關根", + "東北獨立", + "東部地下水路", + "東方紅時空", + "東方時空", + "東南西北論談", + "東社", + "東升", + "東條", + "東條英機", + "東突暴動", + "東突獨立", + "東土耳其斯坦", + "東西南北論壇", + "東亞", + "東院看守", + "動亂", + "鬥士哈夫拉蘇", + "鬥士霍克", + "獨裁", + "獨裁政治", + "獨夫", + "獨立臺灣會", + "俄國", + "鮞", + "㈡", + "發楞", + "發掄", + "發掄功", + "發倫", + "發倫功", + "發輪", + "發論", + "發論公", + "發論功", + "發騷", + "發正念", + "法~倫", + "法~淪", + "法~綸", + "法~輪", + "法~論", + "法爾卡", + "法掄", + "法掄功", + "法侖", + "法淪", + "法綸", + "法輪大法", + "法輪功", + "法十輪十功", + "法謫", + "法謫功", + "反封鎖", + "反封鎖技術", + "反腐敗論壇", + "反人類", + "反社會", + "方勵之", + "防衛指揮官", + "放蕩", + "飛揚論壇", + "廢墟守護者", + "費鴻泰", + "費良勇", + "分隊長施蒂文", + "粉飾太平", + "糞便", + "鱝", + "豐饒的果實", + "風雨神州", + "風雨神州論壇", + "封從德", + "封殺", + "封印的靈魂騎士", + "馮東海", + "馮素英", + "紱", + "襆", + "嘸", + "傅作義", + "幹bi", + "幹逼", + "幹比", + "幹的你", + "幹幹幹", + "幹她", + "幹你", + "幹你老比", + "幹你老母", + "幹你娘", + "幹全家", + "幹死", + "幹死你", + "幹他", + "幹一家", + "趕你娘", + "岡巒", + "剛比", + "剛比樣子", + "崗哨士兵", + "肛門", + "高麗棒子", + "高文謙", + "高薪養廉", + "高自聯", + "膏藥旗", + "戈瑞爾德", + "戈揚", + "鴿派", + "歌功頌德", + "格雷(關卡排名管理者)", + "格魯", + "格魯(城鎮移動)", + "鯁", + "工自聯", + "弓雖", + "共産", + "共産黨", + "共産主義", + "共黨", + "共軍", + "共榮圈", + "緱", + "狗誠", + "狗狼養的", + "狗娘養的", + "狗養", + "狗雜種", + "覯", + "轂", + "古龍祭壇", + "骨獅", + "鯝", + "鴰", + "詿", + "關卓中", + "貫通兩極法", + "廣聞", + "嬀", + "龜兒子", + "龜公", + "龜孫子", + "龜頭", + "龜投", + "劌", + "緄", + "滾那嗎", + "滾那嗎B", + "滾那嗎錯比", + "滾那嗎老比", + "滾那嗎瘟比", + "鯀", + "咼", + "郭俊銘", + "郭羅基", + "郭岩華", + "國家安全", + "國家機密", + "國軍", + "國賊", + "哈爾羅尼", + "頇", + "韓東方", + "韓聯潮", + "韓正", + "漢奸", + "顥", + "灝", + "河殤", + "賀國强", + "賀龍", + "黑社會", + "黑手黨", + "紅燈區", + "紅色恐怖", + "紅炎猛獸", + "洪傳", + "洪興", + "洪哲勝", + "黌", + "鱟", + "胡緊掏", + "胡錦滔", + "胡錦淘", + "胡景濤", + "胡喬木", + "胡總書記", + "湖岸護衛兵", + "湖岸警衛兵", + "湖岸哨兵隊長", + "護法", + "鸌", + "華建敏", + "華通時事論壇", + "華夏文摘", + "華語世界論壇", + "華岳時事論壇", + "懷特", + "鍰", + "皇軍", + "黃伯源", + "黃慈萍", + "黃禍", + "黃劍輝", + "黃金幼龍", + "黃菊", + "黃片", + "黃翔", + "黃義交", + "黃仲生", + "回民暴動", + "噦", + "繢", + "毀滅步兵", + "毀滅騎士", + "毀滅射手", + "昏迷圖騰", + "混亂的圖騰", + "鍃", + "活動", + "擊倒圖騰", + "擊傷的圖騰", + "鶏8", + "鶏八", + "鶏巴", + "鶏吧", + "鶏鶏", + "鶏奸", + "鶏毛信文匯", + "鶏女", + "鶏院", + "姬勝德", + "積克館", + "賫", + "鱭", + "賈廷安", + "賈育台", + "戔", + "監視塔", + "監視塔哨兵", + "監視塔哨兵隊長", + "鰹", + "韉", + "簡肇棟", + "建國黨", + "賤B", + "賤bi", + "賤逼", + "賤比", + "賤貨", + "賤人", + "賤種", + "江八點", + "江羅", + "江綿恒", + "江戲子", + "江則民", + "江澤慧", + "江賊", + "江賊民", + "薑春雲", + "將則民", + "僵賊", + "僵賊民", + "講法", + "蔣介石", + "蔣中正", + "降低命中的圖騰", + "醬猪媳", + "撟", + "狡猾的達夫", + "矯健的馬努爾", + "嶠", + "教養院", + "癤", + "揭批書", + "訐", + "她媽", + "届中央政治局委員", + "金槍不倒", + "金堯如", + "金澤辰", + "巹", + "錦濤", + "經文", + "經血", + "莖候佳陰", + "荊棘護衛兵", + "靖國神社", + "㈨", + "舊斗篷哨兵", + "齟", + "巨槌騎兵", + "巨鐵角哈克", + "鋸齒通道被遺弃的骷髏", + "鋸齒通道骷髏", + "屨", + "棬", + "絕望之地", + "譎", + "軍妓", + "開苞", + "開放雜志", + "凱奧勒尼什", + "凱爾本", + "凱爾雷斯", + "凱特切爾", + "砍翻一條街", + "看中國", + "闞", + "靠你媽", + "柯賜海", + "柯建銘", + "科萊爾", + "克萊恩", + "克萊特", + "克勞森", + "客戶服務", + "緙", + "空氣精靈", + "空虛的伊坤", + "空虛之地", + "恐怖主義", + "瞘", + "嚳", + "鄺錦文", + "貺", + "昆圖", + "拉姆斯菲爾德", + "拉皮條", + "萊特", + "賴士葆", + "蘭迪", + "爛B", + "爛逼", + "爛比", + "爛袋", + "爛貨", + "濫B", + "濫逼", + "濫比", + "濫貨", + "濫交", + "勞動教養所", + "勞改", + "勞教", + "鰳", + "雷尼亞", + "誄", + "李紅痔", + "李洪寬", + "李繼耐", + "李蘭菊", + "李老師", + "李錄", + "李祿", + "李慶安", + "李慶華", + "李淑嫻", + "李鐵映", + "李旺陽", + "李小鵬", + "李月月鳥", + "李志綏", + "李總理", + "李總統", + "裏菲斯", + "鱧", + "轢", + "躒", + "奩", + "連方瑀", + "連惠心", + "連勝德", + "連勝文", + "連戰", + "聯總", + "廉政大論壇", + "煉功", + "兩岸關係", + "兩岸三地論壇", + "兩個中國", + "兩會", + "兩會報道", + "兩會新聞", + "廖錫龍", + "林保華", + "林長盛", + "林佳龍", + "林信義", + "林正勝", + "林重謨", + "躪", + "淩鋒", + "劉賓深", + "劉賓雁", + "劉剛", + "劉國凱", + "劉華清", + "劉俊國", + "劉凱中", + "劉千石", + "劉青", + "劉山青", + "劉士賢", + "劉文勝", + "劉文雄", + "劉曉波", + "劉曉竹", + "劉永川", + "㈥", + "鷚", + "龍虎豹", + "龍火之心", + "盧卡", + "盧西德", + "陸委會", + "輅", + "呂京花", + "呂秀蓮", + "亂交", + "亂倫", + "亂輪", + "鋝", + "掄功", + "倫功", + "輪大", + "輪功", + "輪奸", + "論壇管理員", + "羅福助", + "羅幹", + "羅禮詩", + "羅文嘉", + "羅志明", + "腡", + "濼", + "洛克菲爾特", + "媽B", + "媽比", + "媽的", + "媽批", + "馬大維", + "馬克思", + "馬良駿", + "馬三家", + "馬時敏", + "馬特斯", + "馬英九", + "馬永成", + "瑪麗亞", + "瑪雅", + "嗎的", + "嗎啡", + "勱", + "麥克斯", + "賣逼", + "賣比", + "賣國", + "賣騷", + "賣淫", + "瞞報", + "毛厠洞", + "毛賊", + "毛賊東", + "美國", + "美國參考", + "美國佬", + "美國之音", + "蒙獨", + "蒙古達子", + "蒙古獨", + "蒙古獨立", + "禰", + "羋", + "綿恒", + "黽", + "民國", + "民進黨", + "民聯", + "民意論壇", + "民陣", + "民主墻", + "緡", + "湣", + "鰵", + "摸你鶏巴", + "", + "莫偉强", + "木子論壇", + "內褲", + "內衣", + "那嗎B", + "那嗎逼", + "那嗎錯比", + "那嗎老比", + "那嗎瘟比", + "那娘錯比", + "納粹", + "奶頭", + "南大自由論壇", + "南蠻子", + "鬧事", + "能樣", + "尼奧夫", + "倪育賢", + "鯢", + "你媽", + "你媽逼", + "你媽比", + "你媽的", + "你媽了妹", + "你說我說論壇", + "你爺", + "娘餓比", + "捏你鶏巴", + "儂著岡巒", + "儂著卵拋", + "奴隸魔族士兵", + "女幹", + "女主人羅姬馬莉", + "儺", + "諾姆", + "潘國平", + "蹣", + "龐建國", + "泡沫經濟", + "轡", + "噴你", + "皮條客", + "羆", + "諞", + "潑婦", + "齊墨", + "齊諾", + "騎你", + "磧", + "僉", + "鈐", + "錢達", + "錢國梁", + "錢其琛", + "膁", + "槧", + "錆", + "繰", + "喬石", + "喬伊", + "橋侵襲兵", + "譙", + "鞽", + "篋", + "親美", + "親民黨", + "親日", + "欽本立", + "禽獸", + "唚", + "輕舟快訊", + "情婦", + "情獸", + "檾", + "慶紅", + "丘垂貞", + "詘", + "去你媽的", + "闃", + "全國兩會", + "全國人大", + "犬", + "綣", + "瘸腿幫", + "愨", + "讓你操", + "熱比婭", + "熱站政論網", + "人民報", + "人民大會堂", + "人民內情真相", + "人民真實", + "人民之聲論壇", + "人權", + "日本帝國", + "日軍", + "日內瓦金融", + "日你媽", + "日你爺爺", + "日朱駿", + "顬", + "乳頭", + "乳暈", + "瑞士金融大學", + "薩達姆", + "三K黨", + "三個代表", + "三級片", + "三去車侖工力", + "㈢", + "毿", + "糝", + "騷B", + "騷棒", + "騷包", + "騷逼", + "騷棍", + "騷貨", + "騷鶏", + "騷卵", + "殺你全家", + "殺你一家", + "殺人犯", + "傻鳥", + "煞筆", + "山口組", + "善惡有報", + "上訪", + "上海幫", + "上海孤兒院", + "厙", + "社會主義", + "射了還說要", + "灄", + "詵", + "神經病", + "諗", + "生孩子沒屁眼", + "生命分流的圖騰", + "澠", + "聖射手", + "聖戰", + "盛華仁", + "濕了還說不要", + "濕了還說要", + "釃", + "鯴", + "㈩", + "石化圖騰", + "石拳戰鬥兵", + "時代論壇", + "時事論壇", + "鰣", + "史萊姆", + "史萊姆王", + "士兵管理員瓦爾臣", + "世界經濟導報", + "事實獨立", + "侍從貝赫爾特", + "侍從倫斯韋", + "貰", + "攄", + "數據中國", + "雙十節", + "氵去車侖工力", + "氵去車侖工力?", + "稅力", + "司馬晋", + "司馬璐", + "司徒華", + "私?服", + "私處", + "思科羅", + "斯諾", + "斯皮爾德", + "四川獨", + "四川獨立", + "四人幫", + "㈣", + "宋書元", + "藪", + "蘇菲爾", + "蘇拉", + "蘇南成", + "蘇紹智", + "蘇特勒守護兵", + "蘇特勤", + "蘇特勤護衛兵", + "蘇特勤魔法師", + "蘇曉康", + "蘇盈貴", + "蘇貞昌", + "誶", + "碎片製造商人馬克", + "碎片製造商人蘇克", + "孫大千", + "孫中山", + "他媽", + "他媽的", + "他嗎的", + "他母親", + "塔內", + "塔烏", + "鰨", + "闥", + "臺盟", + "臺灣帝國", + "臺灣獨立", + "臺灣獨", + "臺灣共産黨", + "臺灣狗", + "臺灣建國運動組織", + "臺灣民國", + "臺灣青年獨立聯盟", + "臺灣政論區", + "臺灣自由聯盟", + "鮐", + "太監", + "泰奴橋警衛兵", + "泰奴橋掠奪者", + "湯光中", + "唐柏橋", + "鞀", + "謄", + "天安門", + "天安門錄影帶", + "天安門事件", + "天安門屠殺", + "天安門一代", + "天閹", + "田紀雲", + "齠", + "鰷", + "銚", + "庭院警衛兵", + "統獨", + "統獨論壇", + "統戰", + "頭領奧馬", + "頭領墳墓管理員", + "圖書管理員卡特", + "屠殺", + "團長戈登", + "團員馬爾汀", + "摶", + "鼉", + "籜", + "膃", + "外交論壇", + "外交與方略", + "晚年周恩來", + "綰", + "萬里", + "萬潤南", + "萬維讀者論壇", + "萬曉東", + "王寶森", + "王超華", + "王輔臣", + "王剛", + "王涵萬", + "王滬寧", + "王軍濤", + "王樂泉", + "王潤生", + "王世堅", + "王世勛", + "王秀麗", + "王兆國", + "網禪", + "網特", + "猥褻", + "鮪", + "溫B", + "溫逼", + "溫比", + "溫家寶", + "溫元凱", + "閿", + "無界瀏覽器", + "吳百益", + "吳敦義", + "吳方城", + "吳弘達", + "吳宏達", + "吳仁華", + "吳淑珍", + "吳學燦", + "吳學璨", + "吳育升", + "吳志芳", + "西藏獨", + "吸收的圖騰", + "吸血獸", + "覡", + "洗腦", + "系統", + "系統公告", + "餼", + "郤", + "下賤", + "下體", + "薟", + "躚", + "鮮族", + "獫", + "蜆", + "峴", + "現金", + "現金交易", + "獻祭的圖騰", + "鯗", + "項懷誠", + "項小吉", + "嘵", + "小B樣", + "小比樣", + "小參考", + "小鶏鶏", + "小靈通", + "小泉純一郎", + "謝長廷", + "謝深山", + "謝選駿", + "謝中之", + "辛灝年", + "新觀察論壇", + "新華舉報", + "新華內情", + "新華通論壇", + "新疆獨", + "新生網", + "新手訓練營", + "新聞出版總署", + "新聞封鎖", + "新義安", + "新語絲", + "信用危機", + "邢錚", + "性愛", + "性無能", + "修煉", + "頊", + "虛弱圖騰", + "虛無的飽食者", + "徐國舅", + "許財利", + "許家屯", + "許信良", + "諼", + "薛偉", + "學潮", + "學聯", + "學運", + "學自聯", + "澩", + "閹狗", + "訁", + "嚴家其", + "嚴家祺", + "閻明複", + "顔清標", + "顔慶章", + "顔射", + "讞", + "央視內部晚會", + "陽具", + "陽痿", + "陽物", + "楊懷安", + "楊建利", + "楊巍", + "楊月清", + "楊周", + "姚羅", + "姚月謙", + "軺", + "搖頭丸", + "藥材商人蘇耐得", + "藥水", + "耶穌", + "野鶏", + "葉菊蘭", + "夜話紫禁城", + "一陀糞", + "㈠", + "伊莎貝爾", + "伊斯蘭", + "伊斯蘭亞格林尼斯", + "遺精", + "議長阿茵斯塔", + "議員斯格文德", + "异見人士", + "异型叛軍", + "异議人士", + "易丹軒", + "意志不堅的圖騰", + "瘞", + "陰部", + "陰唇", + "陰道", + "陰蒂", + "陰戶", + "陰莖", + "陰精", + "陰毛", + "陰門", + "陰囊", + "陰水", + "淫蕩", + "淫穢", + "淫貨", + "淫賤", + "尹慶民", + "引導", + "隱者之路", + "鷹眼派氏族", + "硬直圖騰", + "憂鬱的艾拉", + "尤比亞", + "由喜貴", + "游蕩的僵尸", + "游蕩的士兵", + "游蕩爪牙", + "游錫坤", + "游戲管理員", + "友好的魯德", + "幼齒", + "幼龍", + "于幼軍", + "余英時", + "漁夫菲斯曼", + "輿論", + "輿論反制", + "傴", + "宇明網", + "齬", + "飫", + "鵒", + "元老蘭提(沃德)", + "圓滿", + "緣圈圈", + "遠志明", + "月經", + "韞", + "雜種", + "鏨", + "造愛", + "則民", + "擇民", + "澤夫", + "澤民", + "賾", + "賊民", + "譖", + "扎卡維是英雄", + "驏", + "張伯笠", + "張博雅", + "張鋼", + "張健", + "張林", + "張清芳", + "張偉國", + "張溫鷹", + "張昭富", + "張志清", + "章孝嚴", + "帳號", + "賬號", + "招鶏", + "趙海青", + "趙建銘", + "趙南", + "趙品潞", + "趙曉微", + "趙紫陽", + "貞操", + "鎮壓", + "爭鳴論壇", + "正見網", + "正義黨論壇", + "㊣", + "鄭寶清", + "鄭麗文", + "鄭義", + "鄭餘鎮", + "鄭源", + "鄭運鵬", + "政權", + "政治反對派", + "縶", + "躑", + "指點江山論壇", + "騭", + "觶", + "躓", + "中毒的圖騰", + "中毒圖騰", + "中俄邊界", + "中國復興論壇", + "中國共産黨", + "中國孤兒院", + "中國和平", + "中國論壇", + "中國社會進步黨", + "中國社會論壇", + "中國威脅論", + "中國問題論壇", + "中國移動通信", + "中國真實內容", + "中國之春", + "中國猪", + "中華大地", + "中華大衆", + "中華講清", + "中華民國", + "中華人民實話實說", + "中華人民正邪", + "中華時事", + "中華養生益智功", + "中華真實報道", + "中央電視臺", + "鐘山風雨論壇", + "周鋒鎖", + "周守訓", + "朱鳳芝", + "朱立倫", + "朱溶劑", + "㈱", + "猪聾畸", + "主攻指揮官", + "主義", + "助手威爾特", + "專制", + "顓", + "轉化", + "諑", + "資本主義", + "鯔", + "子宮", + "自民黨", + "自由民主論壇", + "總理", + "諏", + "鯫", + "躦", + "纘", + "作愛", + "做愛", + "fuck", + "共产党", + "urban", + "我操", + "cao", + "他妈的", + "TMD", + "鸡巴", + "煞笔", + "傻B", + "法轮功", + "江泽民", + "胡锦涛", + "温家宝", + "urban-rivals", + "rivals", + "我日", + "UR", + "ur", + "性交", + "口交", + "婊子", + "妓女", + "", + "她妈", + "牛逼", + "牛B,牛比", + "煞笔", + "傻逼", + "傻B", + "操你妈", + "装逼", + "装B", + "日你妈", + "不玩了", + "删号", + "卖号", + "删号", + "妈的", + "妈逼", + "草你妈", + "T.M.D", + "JB", + "jb", + "", + "出售账号", + "出售此号", + "卖号", + "U/R", + "U-R", + "j8", + "吗的", + "8仙", + "狗日", + "出售神符", + "色情", + "黄色", + "藏独", + "台独", + "法轮大法", + "鸡巴", + "毛泽东", + "NPC", + "*法*轮*功*", + "*李*洪*志*阿扁", + "阿扁万岁", + "阿拉", + "阿拉法特", + "挨球", + "安南", + "安全局", + "澳洲光明网", + "八九", + "八九风波", + "办理文凭", + "办理证件", + "包皮", + "保钓", + "保监会", + "保密局", + "鸨", + "鲍岳桥", + "暴动", + "暴乱", + "暴徒", + "北京之春", + "贝肉", + "本?拉登", + "本?拉登", + "苯比", + "笨屄", + "笨逼", + "屄", + "屄毛", + "逼毛", + "逼你老母", + "逼样", + "比毛", + "婊", + "婊子", + "宾周", + "冰毒", + "波霸", + "博讯", + "薄一波", + "布莱尔", + "布雷尔", + "布什", + "布什", + "财政部", + "参事室", + "藏独", + "藏独", + "藏独", + "操", + "操GM", + "操Gm", + "操gM", + "操gm", + "操XX", + "操逼", + "操比", + "操蛋", + "操你", + "交媾", + "CAO", + "K粉", + "J8", + "小姐兼职", + "交媾", + "西藏314事件", + "新疆7.5事件", + "乱伦", + "毛片", + "黄片", + "交配", + "群交", + "小姐兼职", + "茉莉花革命", + "操你八辈祖宗", + "操你妈", + "操你妈屄", + "操他", + "曹刚川", + "草的你妈", + "草妈", + "草你妈", + "草拟妈", + "肏", + "测绘局", + "插GM", + "插Gm", + "插gM", + "插gm", + "插妳", + "插你", + "插你妈", + "插深些", + "产权局", + "朝鲜", + "车臣", + "车仑", + "陈功", + "陈良宇", + "陈水扁", + "陈希同", + "陈晓宁", + "陈毅", + "陈至立", + "成人电影", + "成人片", + "吃大便", + "吃屎", + "迟浩田", + "赤匪", + "抽插", + "抽你丫的", + "臭化西", + "出售假币", + "出售枪支", + "出售手枪", + "吹喇叭", + "吹箫", + "春药", + "蠢猪", + "戳你", + "粗制吗啡", + "催情药", + "达赖", + "达赖喇嘛", + "打炮", + "", + "大B", + "大逼", + "大便", + "大波波", + "大麻", + "大麻树脂", + "大麻油", + "大师", + "戴维教", + "大学骚乱", + "大血B", + "大血比", + "呆卵", + "戴海静", + "戴红", + "戴晶", + "戴维教", + "党主席", + "荡妇", + "档案局", + "盗窃犯", + "盗窃犯", + "道教", + "邓小平", + "帝国主义", + "电监会", + "叼你", + "叼你妈", + "屌", + "屌7", + "屌鸠", + "屌毛", + "屌妳", + "屌七", + "屌西", + "钓鱼台", + "丁关根", + "丁子霖", + "东北独立", + "东升", + "东条英机", + "东突", + "东突暴动和独立", + "东突组织", + "东亚病夫", + "董建华", + "董贱华", + "董文华", + "懂文华", + "独立", + "独立台湾会", + "恩格斯", + "二B", + "二屄", + "二逼", + "二乙基酰胺发抡", + "发抡功", + "发伦", + "发伦功", + "发轮", + "发论", + "发论公", + "发论功", + "发骚", + "法(轮)功", + "法*轮*功", + "法功", + "法愣", + "法仑", + "法轮", + "法轮大法", + "法轮功", + "法西斯", + "法制办", + "反动", + "反革命", + "发票,冰粉,性奴,反共", + "反华", + "反恐委员会", + "反日", + "反政府", + "分裂祖国", + "佛教", + "佛展千手法", + "佛祖", + "斧头镰刀", + "阝月", + "傅鹏", + "傅作义", + "干GM", + "干Gm", + "干gM", + "干gm", + "干拎娘", + "干妳", + "干妳老母", + "干妳妈", + "干妳娘", + "干你", + "干你妈", + "干你妈b", + "干你妈逼", + "干你娘", + "干七八", + "干死你", + "肛", + "肛交", + "肛门", + "港澳办", + "高俊", + "高丽棒子", + "高校暴乱", + "高校群体事件", + "高校骚乱", + "睾", + "睾丸", + "膏药旗", + "弓虽女干", + "公安", + "公安部", + "公安局", + "共产党", + "共产主义", + "共匪", + "共狗", + "狗b", + "狗操", + "狗卵", + "狗娘", + "狗屁", + "狗日", + "狗日的", + "狗屎", + "观世音", + "官逼民反", + "官商勾结", + "龟儿子", + "龟公", + "龟孙子", + "龟头", + "鬼村", + "滚", + "郭伯雄", + "国安局", + "国防部", + "国防科工委", + "国管局", + "国际法院", + "国家民委", + "国家主席", + "国家主要部委", + "国民党", + "国民党万岁", + "海洛因", + "海洋局", + "何候华", + "贺国强", + "贺龙", + "黑社会", + "黑手党", + "黑手党", + "黑手党", + "红卫兵", + "洪兴", + "洪志", + "后庭", + "胡XX", + "胡紧涛", + "胡紧掏", + "胡紧套", + "胡锦涛", + "胡锦淘", + "胡乔木", + "胡耀邦", + "胡主席", + "花柳", + "华国锋", + "华建敏", + "换妻", + "黄 菊", + "黄菊", + "黄色电影", + "黄色小电影", + "回教", + "回良玉", + "回民暴动", + "回族人吃猪肉", + "昏药", + "火棒", + "机八", + "机巴", + "鸡八", + "鸡巴", + "鸡叭", + "鸡芭", + "鸡掰", + "鸡奸", + "基地组织", + "基督", + "基督教", + "激情电影", + "激情小电影", + "鸡", + "计牌软件", + "计生委", + "妓", + "妓女", + "妓院", + "贾庆林", + "奸", + "奸夫淫妇", + "奸你", + "奸淫", + "贱", + "贱逼", + "贱货", + "贱人", + "江Core", + "江八", + "江八点", + "江独裁", + "江核心", + "江青", + "江戏子", + "江择民", + "江泽民", + "江贼民", + "江折民", + "江猪", + "江猪媳", + "江主席", + "僵贼民", + "疆独", + "蒋介石", + "蒋经国", + "蒋中正", + "酱猪媳", + "交通部", + "姣西", + "叫床", + "叫鸡", + "叫小姐", + "教育部", + "她妈的金日成", + "金正日", + "禁书", + "经济社会理事会", + "经社理事会", + "精液", + "精子", + "警匪一家", + "敬国神社", + "靖国神社", + "静坐", + "纠察员", + "鸠", + "鸠屎", + "军长发威", + "军国主义", + "军妓", + "尻", + "靠", + "靠你妈", + "靠腰", + "可待因", + "可卡叶", + "可卡因", + "克林顿", + "恐怖份子", + "恐怖主义", + "口交", + "寇晓伟", + "狂操", + "狂操你全家", + "拉登", + "拉姆斯菲尔德", + "懒教", + "烂B", + "烂屄", + "烂逼", + "烂比", + "烂屌", + "烂货", + "劳+教+所", + "劳动保障部", + "老逼", + "老毛子", + "老母", + "黎阳评", + "李长春", + "李登辉", + "李弘旨", + "李红志", + "李宏旨", + "李宏志", + "李洪志", + "李岚清", + "李鹏", + "李鹏*", + "李瑞环", + "李山", + "李铁映", + "李先念", + "连战", + "联大", + "联合国", + "联合国大会", + "联易", + "联易互动", + "粮食局", + "两腿之间", + "列宁", + "林彪", + "林业局", + "刘 淇", + "刘军", + "刘淇", + "刘少奇", + "刘云山", + "流氓", + "六.四", + "六。四", + "六?四", + "六合彩", + "六四", + "六-四", + "六四事件", + "六四真相", + "龙新民", + "吕秀莲", + "旅游局", + "卵", + "轮功", + "轮奸", + "罗 干", + "罗干", + "骡干", + "妈逼", + "妈比", + "妈卖妈屁", + "妈批", + "妈祖", + "妈B", + "妈的", + "麻醉钢枪", + "麻醉枪", + "麻醉药", + "麻醉乙醚", + "马克思", + "马卖马屁", + "马英九", + "吗啡", + "吗啡碱", + "吗啡片", + "买财富", + "买卖枪支", + "麦角酸", + "卖.国", + "卖B", + "卖ID", + "卖QQ", + "卖逼", + "卖比", + "卖财富", + "卖党求荣", + "卖国", + "卖国求荣", + "卖号", + "卖卡", + "卖软件", + "卖淫", + "毛XX", + "毛厕洞", + "毛一鲜", + "毛泽东", + "毛贼东", + "毛主席", + "梅花网", + "美国", + "美国佬", + "美国之音", + "美利坚", + "蒙尘药", + "蒙独", + "蒙古达子", + "蒙古独立", + "迷魂药", + "迷奸药", + "迷歼药", + "迷药", + "密洞", + "密宗", + "民航局", + "民进党", + "民运", + "民政部", + "明慧网", + "摩门教", + "莫索里尼", + "穆罕默德", + "穆斯林", + "乳头", + "奶子", + "妳老母的", + "妳妈的", + "妳马的", + "妳娘的", + "南联盟", + "南蛮子", + "南蛮子", + "嫩B", + "嫩b", + "伱妈", + "你爸", + "你大爷", + "你二大爷", + "你老母", + "你老味", + "你姥", + "你姥姥的", + "你妈", + "你妈逼", + "你妈的", + "你娘", + "你爷爷的", + "鸟GM", + "鸟Gm", + "鸟gM", + "鸟gm", + "鸟你", + "牛逼", + "牛比", + "农业部", + "虐待", + "拍肩神药", + "喷你", + "彭真", + "皮条", + "屁眼", + "嫖客", + "苹果日报", + "破坏", + "破鞋", + "仆街", + "普京", + "气象局", + "钱其琛", + "枪决女犯", + "枪决现场", + "枪支弹药", + "强奸", + "强奸犯", + "强卫", + "强效失意药", + "强硬发言", + "抢劫", + "乔石", + "侨办", + "切七", + "窃听器", + "窃听器材", + "亲民党", + "青天白日", + "情色", + "去你妈的", + "去死", + "全国人大", + "瘸腿帮", + "人大", + "人大代表", + "人代会", + "人弹", + "人民", + "人民大会堂", + "人民广场", + "人民日报", + "人民银行", + "人体炸弹", + "日GM", + "日Gm", + "日gM", + "日gm", + "日X妈", + "日本RING", + "日本鬼子", + "日你", + "日你妈", + "日你娘", + "日他娘", + "肉棒", + "肉壁", + "肉洞", + "肉缝", + "肉棍", + "肉棍子", + "肉穴", + "乳", + "乳波臀浪", + "乳房", + "乳交", + "乳头", + "撒尿", + "萨达姆", + "塞白", + "塞你爸", + "塞你公", + "塞你老母", + "塞你老师", + "塞你母", + "塞你娘", + "三个呆婊", + "三个代婊", + "三级片", + "三民主义", + "三陪", + "三陪女", + "三去车仑", + "三唑仑", + "骚", + "骚B", + "骚逼", + "骚货", + "骚", + "色情", + "色情电影", + "色情服务", + "色情小电影", + "杀人犯", + "傻B", + "傻屄", + "傻逼", + "傻比", + "傻吊", + "傻卵", + "傻子", + "煞逼", + "商务部", + "上妳", + "上你", + "社科院", + "射精", + "身份生成器", + "神经病", + "神通加持法", + "生鸦片", + "圣女峰", + "十八摸", + "十年动乱石进", + "食捻屎", + "食屎", + "驶你爸", + "驶你公", + "驶你老母", + "驶你老师", + "驶你母", + "驶你娘", + "是鸡", + "手淫", + "受虐狂", + "售ID", + "售号", + "售软件", + "双峰微颤", + "氵去", + "水利部", + "水去车仑", + "税务总局", + "司法部", + "私服", + "私/服", + "私\\服", + "私服", + "私-服", + "私—服", + "斯大林", + "死gd", + "死GD", + "死gm", + "死GM", + "死全家", + "四川独立", + "四人帮", + "宋楚瑜", + "宋祖英", + "孙文", + "孙逸仙", + "孙中山", + "他爹", + "他妈", + "他妈的", + "他马的", + "他母亲", + "他祖宗", + "台办", + "台独", + "台联", + "台湾党", + "台湾帝国", + "台湾独立", + "台湾共产党", + "台湾共和国", + "台湾狗", + "台湾国", + "台湾民国", + "太监", + "太子党", + "唐家璇", + "天皇陛下", + "田纪云", + "舔西", + "投毒杀人", + "透视软件", + "推油", + "外 挂", + "外挂", + "外/挂", + "外\\挂", + "外_挂", + "外挂", + "外-挂", + "外—挂", + "外汇局", + "外交部", + "外专局", + "晚年周恩来", + "万税", + "王八蛋", + "王宝森", + "王刚", + "王昊", + "王乐泉", + "王岐山", + "王太华", + "王兆国", + "王震", + "网管", + "威而钢", + "威而柔", + "卫生部", + "尉健行", + "温加宝", + "温家宝", + "温家保", + "温馨", + "温总理", + "文化部", + "文物局", + "倭国", + "倭寇", + "我操", + "我操你", + "我干", + "我妳老爸", + "我日", + "我日你", + "无界浏览器", + "吴 仪", + "吴邦国", + "吴官正", + "吴仪", + "五星红旗", + "西藏独立", + "西藏天葬", + "希拉克", + "希特勒", + "希望之声", + "洗脑班", + "系统", + "系统公告", + "系统讯息", + "鲜族", + "乡巴佬", + "想上你", + "小鸡鸡", + "小泉", + "小泉纯一郎", + "小日本", + "小肉粒", + "小乳头", + "小穴", + "邪教", + "新疆独立", + "兴奋剂", + "性爱", + "性交", + "性虐待", + "性无能", + "性欲", + "徐光春", + "学潮", + "血逼", + "血腥图片", + "鸦片", + "鸦片液", + "鸦片渣", + "烟草局", + "严方军", + "阳精", + "阳具", + "摇头丸", + "摇头玩", + "耶和华", + "耶苏", + "耶稣", + "叶剑英", + "夜情", + "一党专制", + "一贯道", + "一国两制", + "一夜情", + "一中一台", + "伊拉克", + "伊朗", + "伊斯兰", + "以茎至洞", + "抑制剂", + "阴部", + "阴唇", + "阴道", + "阴蒂", + "阴核", + "阴户", + "阴茎", + "阴毛", + "阴水", + "阴小撕大", + "淫", + "淫荡", + "淫秽", + "淫货", + "淫贱", + "淫叫", + "淫毛", + "淫靡", + "淫水", + "淫娃", + "淫语连连", + "淫欲", + "英雄纪念碑", + "硬挺", + "邮政局", + "游戏发奖员", + "游戏宫理员", + "游戏管理员", + "游行", + "俞正声", + "舆论钳制", + "玉杵", + "欲火焚身", + "原子能机构", + "援交", + "远程偷拍", + "曰GM", + "曰Gm", + "曰gM", + "曰gm", + "曰你", + "月经", + "月经不调", + "月经", + "扎卡维是英雄", + "杂种", + "造反", + "曾培炎", + "曾庆红", + "扎卡维", + "张朝阳", + "张潮阳", + "张德江", + "张磊", + "张立昌", + "张小平", + "赵紫阳", + "侦探设备", + "真理教", + "中国恐怖组织", + "中华民国", + "中南海", + "中宣部", + "周恩来", + "周永康", + "周总理", + "朱德", + "朱容鸡", + "朱容基", + "朱熔基", + "朱镕基", + "朱总理", + "猪操", + "猪容基", + "主席", + "转法轮", + "转法轮", + "装屄", + "装逼", + "追查国际", + "子女任职名单", + "自焚", + "自杀手册", + "自杀指南", + "自制手枪", + "自治机关", + "宗教", + "总局", + "总理", + "作爱", + "坐台的", + "做爱", + "共产党", + "江泽民", + "胡锦涛", + "温家宝", + "严方军", + "屄毛", + "操逼毛", + "东突", + "骚货", + "法轮功", + "江泽民", + "胡锦涛", + "温家宝", + "urban-rivals", + "rivals", + "ur", + "ur", + "我日", + "UR", + "ur", + "性交", + "口交", + "UR", + "taobao", + "webgame.com.cn", + "婊子", + "妓女", + "他妈", + "她妈", + "牛逼", + "牛比", + "牛B", + "煞笔", + "傻逼", + "傻B", + "你妈", + "操你妈", + "装逼", + "装B", + "日你妈", + "不玩了", + "删号", + "卖号", + "垃圾游戏", + "烂游戏", + "删号", + "妈的", + "妈逼", + "草你妈", + "T.M.D", + "JB", + "jb", + "淘宝", + "出售账号", + "出售此号", + "卖号", + "U/R", + "U-R", + "cao", + "j8", + "吗的", + "8仙", + "狗日", + "出售神符", + "色情", + "黄色", + "h站", + "龙虎", + "虎门", + "龙虎门", + "WEB牌戰", + "WEB战牌", + "战牌", + "8仙", + "UR", + "ur", + "UR", + "街头对抗", + "藏独", + "台独", + "法轮大法", + "混沌决", + "ur", + "UR", + "urban", + "鸡巴", + "坐台的", + "作爱", + "总理", + "宗教", + "自治机关", + "自制手枪", +} + +return SensitiveCfg diff --git a/lua_probject/base_project/TableData.lua b/lua_probject/base_project/TableData.lua new file mode 100644 index 00000000..bd0f738f --- /dev/null +++ b/lua_probject/base_project/TableData.lua @@ -0,0 +1,161 @@ +require 'table/Table_Error_code' + +--- +-- 网络错误码常量 lua mapping +-- @type Table_Error_code +Table_Error_code = { + --用户登出,请重新进入游戏 + ERR_LOGOUT = 2, + -- + ERR_IN_ROOM = 3, + -- + ERR_CREATE_ROOM = 4, + --玩法不可用 + ERR_NOT_GAME = 5, + --游戏已停用 + ERR_NOT_SERVICE = 6, + --钻石不足 + ERR_DIAMO = 7, + --已经在公会中 + ERR_EXISTED_GUILD = 8, + --邀请码无效 + ERR_INVATE_CODE = 9, + --房间已满 + ERR_ROOM_CLOSE = 10, + --房间号不存在 + ERR_NOT_ROOM = 11, + --此邮件不存在 + ERR_NO_MAIL = 12, + --邮件已经领取 + ERR_RECEIVED_MAIL = 13, + --此任务不存在 + ERR_NO_TASK = 14, + --没有公会 + ERR_NO_GUILD = 15, + --任务奖励已领取 + ERR_TASK_COMPLETE = 16, + --牛牛有玩家未重连成功 + ERR_PLAY_SUCC = 18, + --排行&战绩数据获取失败 + ERR_WEB_RANK_RECORD + = 20, + --排行数据获取失败 + ERR_WEB_RANK + = 21, + --战绩数据获取失败 + ERR_WEB_RECORD + = 22, + --创建房间数达到上限 + ERR_MAX_AGENT_ROOMS = 26, + --正在游戏中,删除房间失败 + ERR_WEB_CANT_REMOVE_ROOM = 27, + --请检查您的网络设置 + ERR_NET_EXCEPTION = 101, + --网络连接超时 + ERR_TIMEOUT = 102, + --服务器内部错误 + ERR_500 = 500, + --未知错误 + ERR_UNKNOWN = 999, + --奖券不足 + ERR_LOTTERY_FAIL = 17, + --与桌上玩家IP相同,进入房间失败 + ERR_CONTAIN_SAME_IP = 53, + --与桌上玩家距离过近,进入房间失败 + ERR_POSITION_TOO_NEAR = 54, + --GPS未开启,进入房间失败 + ERR_GPS_OFF = 55, + --不是大联盟圈子 + ERR_NOT_ALLIANCE = 56, + --大联盟圈子不能退出 + ERR_CANT_EXIT_ALLIANCE = 57, + --房间已删除 + ROOM_DEL = 80, + --是圈子房间 + ROOM_IS_GROUP = 81, + --积分不足,无法坐下 + CANT_SIT_DOWN = 83, + --已申请加入 + GROUP_EXIST = 1000, + --成员已存在 + GROUP_MEMBER_EXIST = 1001, + --成员不存在 + GROUP_NOT_MEMBER = 1002, + --成员存在上级合伙人 + GROUP_MEMBER_EXIST_PARTENER = 1003, + --玩法已满 + GROUP_PLAY_FULL = 1004, + --房间被删除 + GROUP_ROOM_DEL = 1005, + --玩法不存在 + GROUP_PLAY_EXIST = 1007, + --不是管理员 + GROUP_MGR_EXIST = 1008, + --合伙人有成员 + GROUP_PARTNER_MEMBERS = 1009, + --目标是管理员 + GROUP_TAG_ISMGR = 1010, + --目标是合伙人 + GROUP_TAG_ISPARTENER = 1011, + --目标体力值不足 + GROUP_TARGET_LACK_HP = 1012, + --体力值不足! + GROUP_LACK_HP = 1013, + --没有权限 + GROUP_NOT_PERMISSION = 1014, + --体力值不为0 + GROUP_HP_NOT_0 = 1015, + --成员在房间内 + GROUP_MEMBER_ROOM_EXIST = 1016, + --成员体力值事件正在执行 + GROUP_MEMBER_HPEVT_RUNING = 1017, + --圈子不存在 + GROUP_NO_EXIST = 1018, + --圈子已满 + GROUP_FULL = 1019, + --圈子还有房间 + GROUP_EXIST_ROOMS = 1020, + --圈子禁止娱乐 + GROUP_BAN = 1021, + --不是盟主 + GROUP_NOT_OWNER = 1022, + --目標玩家是合伙人 + GROUP_ALREADY_PARTNER = 1023, + --目標玩家不是合伙人 + GROUP_NOT_PARTNER = 1024, + --已被管理员禁止娱乐 + GROUP_MEMBER_BAN = 1025, + --体力值不足,无法进入房间 + GROUP_JOIN_LACK_HP = 1026, + --只能创建一个大联盟圈子 + GROUP_EXIST_ALLIANCE = 1027, + --大联盟玩法必须开启体力值 + GROUP_ALLIANCE_MUST_HP_ON = 1028, + --还存在该玩法的房间,操作失败 + GROUP_PLAY_EXIST_ROOMS = 1029, + --不在此圈子的房间中 + GROUP_IN_ANOTHER_ROOM = 1030, + --玩家关闭被邀请 + GROUP_CLOSE_INVITATION = 1031, + --创建圈子数达到上限 + GROUP_CREATE_LIMIT = 1032, + --圈子人数已满 + GROUP_GROUP_MEMBER_MAX = 1033, + --玩家在游戏中,不能下分 + GROUP_INGAME_CANT_MINUS_HP = 1034, + --奖励池体力值不足 + GROUP_REWARD_NO_HP = 1035, + -- 奖励池没提取 + GROUP_REWARD_NO_TAKE = 1036, + --已被管理员禁止同桌 + GROUP_BAN_SAME_TABLE = 1037, + --玩法禁止娱乐 + GROUP_BAN_PLAY = 1038, + --圈子已关闭申请 + GROUP_BAN_APPLY = 1039, + --圈子已停止服务 + GROUP_STOP_SEVICE = 1040, + --不能退出大联盟 + GROUP_BAN_EXIT_ALLIANCE = 1041 +} + diff --git a/lua_probject/base_project/debug/LuaDebug.lua b/lua_probject/base_project/debug/LuaDebug.lua new file mode 100644 index 00000000..f7481d24 --- /dev/null +++ b/lua_probject/base_project/debug/LuaDebug.lua @@ -0,0 +1,2617 @@ +local debugger_reLoadFile =nil +xpcall(function() + debugger_reLoadFile = require("luaideReLoadFile") +end,function() + debugger_reLoadFile = function() print("未实现代码重载") end +end) +local debugger_stackInfo = nil +local coro_debugger = nil +local debugger_require = require +local debugger_exeLuaString = nil +local checkSetVar = nil +local loadstring_ = nil +local debugger_sendMsg = nil +if (loadstring) then + loadstring_ = loadstring +else + loadstring_ = load +end +--只针对 luadebug 调试 jit版本不存在这个问题 +local setfenv = setfenv +if (not setfenv) then + setfenv = + function(fn, env) + local i = 1 + while true do + local name = debug.getupvalue(fn, i) + if name == "_ENV" then + debug.upvaluejoin( + fn, + i, + (function() + return env + end), + 1 + ) + break + elseif not name then + break + end + + i = i + 1 + end + return fn + end +end +local ZZBase64 = {} +local LuaDebugTool_ = nil +if (LuaDebugTool) then + LuaDebugTool_ = LuaDebugTool +elseif (CS and CS.LuaDebugTool) then + LuaDebugTool_ = CS.LuaDebugTool +end +local LuaDebugTool = LuaDebugTool_ +local loadstring = loadstring_ +local getinfo = debug.getinfo +local function createSocket() + local base = _G + local string = require("string") + local math = require("math") + local socket = require("socket.core") + + local _M = socket + + ----------------------------------------------------------------------------- + -- Exported auxiliar functions + ----------------------------------------------------------------------------- + function _M.connect4(address, port, laddress, lport) + return socket.connect(address, port, laddress, lport, "inet") + end + + function _M.connect6(address, port, laddress, lport) + return socket.connect(address, port, laddress, lport, "inet6") + end + + if (not _M.connect) then + function _M.connect(address, port, laddress, lport) + local sock, err = socket.tcp() + if not sock then + return nil, err + end + if laddress then + local res, err = sock:bind(laddress, lport, -1) + if not res then + return nil, err + end + end + local res, err = sock:connect(address, port) + if not res then + return nil, err + end + return sock + end + end + function _M.bind(host, port, backlog) + if host == "*" then + host = "0.0.0.0" + end + local addrinfo, err = socket.dns.getaddrinfo(host) + if not addrinfo then + return nil, err + end + local sock, res + err = "no info on address" + for i, alt in base.ipairs(addrinfo) do + if alt.family == "inet" then + sock, err = socket.tcp4() + else + sock, err = socket.tcp6() + end + if not sock then + return nil, err + end + sock:setoption("reuseaddr", true) + res, err = sock:bind(alt.addr, port) + if not res then + sock:close() + else + res, err = sock:listen(backlog) + if not res then + sock:close() + else + return sock + end + end + end + return nil, err + end + + _M.try = _M.newtry() + + function _M.choose(table) + return function(name, opt1, opt2) + if base.type(name) ~= "string" then + name, opt1, opt2 = "default", name, opt1 + end + local f = table[name or "nil"] + if not f then + base.error("unknown key (" .. base.tostring(name) .. ")", 3) + else + return f(opt1, opt2) + end + end + end + + ----------------------------------------------------------------------------- + -- Socket sources and sinks, conforming to LTN12 + ----------------------------------------------------------------------------- + -- create namespaces inside LuaSocket namespace + local sourcet, sinkt = {}, {} + _M.sourcet = sourcet + _M.sinkt = sinkt + + _M.BLOCKSIZE = 2048 + + sinkt["close-when-done"] = + function(sock) + return base.setmetatable( + { + getfd = function() + return sock:getfd() + end, + dirty = function() + return sock:dirty() + end + }, + { + __call = function(self, chunk, err) + if not chunk then + sock:close() + return 1 + else + return sock:send(chunk) + end + end + } + ) + end + + sinkt["keep-open"] = + function(sock) + return base.setmetatable( + { + getfd = function() + return sock:getfd() + end, + dirty = function() + return sock:dirty() + end + }, + { + __call = function(self, chunk, err) + if chunk then + return sock:send(chunk) + else + return 1 + end + end + } + ) + end + + sinkt["default"] = sinkt["keep-open"] + + _M.sink = _M.choose(sinkt) + + sourcet["by-length"] = + function(sock, length) + return base.setmetatable( + { + getfd = function() + return sock:getfd() + end, + dirty = function() + return sock:dirty() + end + }, + { + __call = function() + if length <= 0 then + return nil + end + local size = math.min(socket.BLOCKSIZE, length) + local chunk, err = sock:receive(size) + if err then + return nil, err + end + length = length - string.len(chunk) + return chunk + end + } + ) + end + + sourcet["until-closed"] = + function(sock) + local done + return base.setmetatable( + { + getfd = function() + return sock:getfd() + end, + dirty = function() + return sock:dirty() + end + }, + { + __call = function() + if done then + return nil + end + local chunk, err, partial = sock:receive(socket.BLOCKSIZE) + if not err then + return chunk + elseif err == "closed" then + sock:close() + done = 1 + return partial + else + return nil, err + end + end + } + ) + end + + sourcet["default"] = sourcet["until-closed"] + + _M.source = _M.choose(sourcet) + + return _M +end + +local function createJson() + local math = require("math") + local string = require("string") + local table = require("table") + local object = nil + ----------------------------------------------------------------------------- + -- Module declaration + ----------------------------------------------------------------------------- + local json = {} -- Public namespace + local json_private = {} -- Private namespace + + -- Public constants + json.EMPTY_ARRAY = {} + json.EMPTY_OBJECT = {} + -- Public functions + + -- Private functions + local decode_scanArray + local decode_scanComment + local decode_scanConstant + local decode_scanNumber + local decode_scanObject + local decode_scanString + local decode_scanWhitespace + local encodeString + local isArray + local isEncodable + + ----------------------------------------------------------------------------- + -- PUBLIC FUNCTIONS + ----------------------------------------------------------------------------- + --- Encodes an arbitrary Lua object / variable. + -- @param v The Lua object / variable to be JSON encoded. + -- @return String containing the JSON encoding in internal Lua string format (i.e. not unicode) + function json.encode(v) + -- Handle nil values + if v == nil then + return "null" + end + + local vtype = type(v) + + -- Handle strings + if vtype == "string" then + return '"' .. json_private.encodeString(v) .. '"' -- Need to handle encoding in string + end + + -- Handle booleans + if vtype == "number" or vtype == "boolean" then + return tostring(v) + end + + -- Handle tables + if vtype == "table" then + local rval = {} + -- Consider arrays separately + local bArray, maxCount = isArray(v) + if bArray then + for i = 1, maxCount do + table.insert(rval, json.encode(v[i])) + end + else -- An object, not an array + for i, j in pairs(v) do + if isEncodable(i) and isEncodable(j) then + table.insert(rval, '"' .. json_private.encodeString(i) .. '":' .. json.encode(j)) + end + end + end + if bArray then + return "[" .. table.concat(rval, ",") .. "]" + else + return "{" .. table.concat(rval, ",") .. "}" + end + end + + -- Handle null values + if vtype == "function" and v == json.null then + return "null" + end + + assert(false, "encode attempt to encode unsupported type " .. vtype .. ":" .. tostring(v)) + end + + --- Decodes a JSON string and returns the decoded value as a Lua data structure / value. + -- @param s The string to scan. + -- @param [startPos] Optional starting position where the JSON string is located. Defaults to 1. + -- @param Lua object, number The object that was scanned, as a Lua table / string / number / boolean or nil, + -- and the position of the first character after + -- the scanned JSON object. + function json.decode(s, startPos) + startPos = startPos and startPos or 1 + startPos = decode_scanWhitespace(s, startPos) + assert(startPos <= string.len(s), "Unterminated JSON encoded object found at position in [" .. s .. "]") + local curChar = string.sub(s, startPos, startPos) + -- Object + if curChar == "{" then + return decode_scanObject(s, startPos) + end + -- Array + if curChar == "[" then + return decode_scanArray(s, startPos) + end + -- Number + if string.find("+-0123456789.e", curChar, 1, true) then + return decode_scanNumber(s, startPos) + end + -- String + if curChar == '"' or curChar == [[']] then + return decode_scanString(s, startPos) + end + if string.sub(s, startPos, startPos + 1) == "/*" then + return json.decode(s, decode_scanComment(s, startPos)) + end + -- Otherwise, it must be a constant + return decode_scanConstant(s, startPos) + end + + --- The null function allows one to specify a null value in an associative array (which is otherwise + -- discarded if you set the value with 'nil' in Lua. Simply set t = { first=json.null } + function json.null() + return json.null -- so json.null() will also return null ;-) + end + ----------------------------------------------------------------------------- + -- Internal, PRIVATE functions. + -- Following a Python-like convention, I have prefixed all these 'PRIVATE' + -- functions with an underscore. + ----------------------------------------------------------------------------- + --- Scans an array from JSON into a Lua object + -- startPos begins at the start of the array. + -- Returns the array and the next starting position + -- @param s The string being scanned. + -- @param startPos The starting position for the scan. + -- @return table, int The scanned array as a table, and the position of the next character to scan. + function decode_scanArray(s, startPos) + local array = {} -- The return value + local stringLen = string.len(s) + assert( + string.sub(s, startPos, startPos) == "[", + "decode_scanArray called but array does not start at position " .. startPos .. " in string:\n" .. s + ) + startPos = startPos + 1 + -- Infinite loop for array elements + repeat + startPos = decode_scanWhitespace(s, startPos) + assert(startPos <= stringLen, "JSON String ended unexpectedly scanning array.") + local curChar = string.sub(s, startPos, startPos) + if (curChar == "]") then + return array, startPos + 1 + end + if (curChar == ",") then + startPos = decode_scanWhitespace(s, startPos + 1) + end + assert(startPos <= stringLen, "JSON String ended unexpectedly scanning array.") + object, startPos = json.decode(s, startPos) + table.insert(array, object) + until false + end + + --- Scans a comment and discards the comment. + -- Returns the position of the next character following the comment. + -- @param string s The JSON string to scan. + -- @param int startPos The starting position of the comment + function decode_scanComment(s, startPos) + assert( + string.sub(s, startPos, startPos + 1) == "/*", + "decode_scanComment called but comment does not start at position " .. startPos + ) + local endPos = string.find(s, "*/", startPos + 2) + assert(endPos ~= nil, "Unterminated comment in string at " .. startPos) + return endPos + 2 + end + + --- Scans for given constants: true, false or null + -- Returns the appropriate Lua type, and the position of the next character to read. + -- @param s The string being scanned. + -- @param startPos The position in the string at which to start scanning. + -- @return object, int The object (true, false or nil) and the position at which the next character should be + -- scanned. + function decode_scanConstant(s, startPos) + local consts = {["true"] = true, ["false"] = false, ["null"] = nil} + local constNames = {"true", "false", "null"} + + for i, k in pairs(constNames) do + if string.sub(s, startPos, startPos + string.len(k) - 1) == k then + return consts[k], startPos + string.len(k) + end + end + assert(nil, "Failed to scan constant from string " .. s .. " at starting position " .. startPos) + end + + --- Scans a number from the JSON encoded string. + -- (in fact, also is able to scan numeric +- eqns, which is not + -- in the JSON spec.) + -- Returns the number, and the position of the next character + -- after the number. + -- @param s The string being scanned. + -- @param startPos The position at which to start scanning. + -- @return number, int The extracted number and the position of the next character to scan. + function decode_scanNumber(s, startPos) + local endPos = startPos + 1 + local stringLen = string.len(s) + local acceptableChars = "+-0123456789.e" + while (string.find(acceptableChars, string.sub(s, endPos, endPos), 1, true) and endPos <= stringLen) do + endPos = endPos + 1 + end + local stringValue = "return " .. string.sub(s, startPos, endPos - 1) + local stringEval = loadstring(stringValue) + assert( + stringEval, + "Failed to scan number [ " .. stringValue .. "] in JSON string at position " .. startPos .. " : " .. endPos + ) + return stringEval(), endPos + end + + --- Scans a JSON object into a Lua object. + -- startPos begins at the start of the object. + -- Returns the object and the next starting position. + -- @param s The string being scanned. + -- @param startPos The starting position of the scan. + -- @return table, int The scanned object as a table and the position of the next character to scan. + function decode_scanObject(s, startPos) + local object = {} + local stringLen = string.len(s) + local key, value + assert( + string.sub(s, startPos, startPos) == "{", + "decode_scanObject called but object does not start at position " .. startPos .. " in string:\n" .. s + ) + startPos = startPos + 1 + repeat + startPos = decode_scanWhitespace(s, startPos) + assert(startPos <= stringLen, "JSON string ended unexpectedly while scanning object.") + local curChar = string.sub(s, startPos, startPos) + if (curChar == "}") then + return object, startPos + 1 + end + if (curChar == ",") then + startPos = decode_scanWhitespace(s, startPos + 1) + end + assert(startPos <= stringLen, "JSON string ended unexpectedly scanning object.") + -- Scan the key + key, startPos = json.decode(s, startPos) + assert(startPos <= stringLen, "JSON string ended unexpectedly searching for value of key " .. key) + startPos = decode_scanWhitespace(s, startPos) + assert(startPos <= stringLen, "JSON string ended unexpectedly searching for value of key " .. key) + assert( + string.sub(s, startPos, startPos) == ":", + "JSON object key-value assignment mal-formed at " .. startPos + ) + startPos = decode_scanWhitespace(s, startPos + 1) + assert(startPos <= stringLen, "JSON string ended unexpectedly searching for value of key " .. key) + value, startPos = json.decode(s, startPos) + object[key] = value + until false -- infinite loop while key-value pairs are found + end + + -- START SoniEx2 + -- Initialize some things used by decode_scanString + -- You know, for efficiency + local escapeSequences = { + ["\\t"] = "\t", + ["\\f"] = "\f", + ["\\r"] = "\r", + ["\\n"] = "\n", + ["\\b"] = "" + } + setmetatable( + escapeSequences, + { + __index = function(t, k) + -- skip "\" aka strip escape + return string.sub(k, 2) + end + } + ) + -- END SoniEx2 + --- Scans a JSON string from the opening inverted comma or single quote to the + -- end of the string. + -- Returns the string extracted as a Lua string, + -- and the position of the next non-string character + -- (after the closing inverted comma or single quote). + -- @param s The string being scanned. + -- @param startPos The starting position of the scan. + -- @return string, int The extracted string as a Lua string, and the next character to parse. + function decode_scanString(s, startPos) + assert(startPos, "decode_scanString(..) called without start position") + local startChar = string.sub(s, startPos, startPos) + -- START SoniEx2 + -- PS: I don't think single quotes are valid JSON + assert(startChar == '"' or startChar == [[']], "decode_scanString called for a non-string") + --assert(startPos, "String decoding failed: missing closing " .. startChar .. " for string at position " .. oldStart) + local t = {} + local i, j = startPos, startPos + while string.find(s, startChar, j + 1) ~= j + 1 do + local oldj = j + i, j = string.find(s, "\\.", j + 1) + local x, y = string.find(s, startChar, oldj + 1) + if not i or x < i then + i, j = x, y - 1 + end + table.insert(t, string.sub(s, oldj + 1, i - 1)) + if string.sub(s, i, j) == "\\u" then + local a = string.sub(s, j + 1, j + 4) + j = j + 4 + local n = tonumber(a, 16) + assert(n, "String decoding failed: bad Unicode escape " .. a .. " at position " .. i .. " : " .. j) + -- math.floor(x/2^y) == lazy right shift + -- a % 2^b == bitwise_and(a, (2^b)-1) + -- 64 = 2^6 + -- 4096 = 2^12 (or 2^6 * 2^6) + local x + if n < 128 then + x = string.char(n % 128) + elseif n < 2048 then + -- [110x xxxx] [10xx xxxx] + x = string.char(192 + (math.floor(n / 64) % 32), 128 + (n % 64)) + else + -- [1110 xxxx] [10xx xxxx] [10xx xxxx] + x = string.char(224 + (math.floor(n / 4096) % 16), 128 + (math.floor(n / 64) % 64), 128 + (n % 64)) + end + table.insert(t, x) + else + table.insert(t, escapeSequences[string.sub(s, i, j)]) + end + end + table.insert(t, string.sub(j, j + 1)) + assert( + string.find(s, startChar, j + 1), + "String decoding failed: missing closing " .. + startChar .. " at position " .. j .. "(for string at position " .. startPos .. ")" + ) + return table.concat(t, ""), j + 2 + -- END SoniEx2 + end + + --- Scans a JSON string skipping all whitespace from the current start position. + -- Returns the position of the first non-whitespace character, or nil if the whole end of string is reached. + -- @param s The string being scanned + -- @param startPos The starting position where we should begin removing whitespace. + -- @return int The first position where non-whitespace was encountered, or string.len(s)+1 if the end of string + -- was reached. + function decode_scanWhitespace(s, startPos) + local whitespace = " \n\r\t" + local stringLen = string.len(s) + while (string.find(whitespace, string.sub(s, startPos, startPos), 1, true) and startPos <= stringLen) do + startPos = startPos + 1 + end + return startPos + end + + --- Encodes a string to be JSON-compatible. + -- This just involves back-quoting inverted commas, back-quotes and newlines, I think ;-) + -- @param s The string to return as a JSON encoded (i.e. backquoted string) + -- @return The string appropriately escaped. + local escapeList = { + ['"'] = '\\"', + ["\\"] = "\\\\", + ["/"] = "\\/", + [""] = "\\b", + ["\f"] = "\\f", + ["\n"] = "\\n", + ["\r"] = "\\r", + ["\t"] = "\\t" + } + + function json_private.encodeString(s) + local s = tostring(s) + return s:gsub( + ".", + function(c) + return escapeList[c] + end + ) -- SoniEx2: 5.0 compat + end + + -- Determines whether the given Lua type is an array or a table / dictionary. + -- We consider any table an array if it has indexes 1..n for its n items, and no + -- other data in the table. + -- I think this method is currently a little 'flaky', but can't think of a good way around it yet... + -- @param t The table to evaluate as an array + -- @return boolean, number True if the table can be represented as an array, false otherwise. If true, + -- the second returned value is the maximum + -- number of indexed elements in the array. + function isArray(t) + -- Next we count all the elements, ensuring that any non-indexed elements are not-encodable + -- (with the possible exception of 'n') + if (t == json.EMPTY_ARRAY) then + return true, 0 + end + if (t == json.EMPTY_OBJECT) then + return false + end + + local maxIndex = 0 + for k, v in pairs(t) do + if (type(k) == "number" and math.floor(k) == k and 1 <= k) then -- k,v is an indexed pair + if (not isEncodable(v)) then + return false + end -- All array elements must be encodable + maxIndex = math.max(maxIndex, k) + else + if (k == "n") then + if v ~= (t.n or #t) then + return false + end -- False if n does not hold the number of elements + else -- Else of (k=='n') + if isEncodable(v) then + return false + end + end -- End of (k~='n') + end -- End of k,v not an indexed pair + end -- End of loop across all pairs + return true, maxIndex + end + + --- Determines whether the given Lua object / table / variable can be JSON encoded. The only + -- types that are JSON encodable are: string, boolean, number, nil, table and json.null. + -- In this implementation, all other types are ignored. + -- @param o The object to examine. + -- @return boolean True if the object should be JSON encoded, false if it should be ignored. + function isEncodable(o) + local t = type(o) + return (t == "string" or t == "boolean" or t == "number" or t == "nil" or t == "table") or + (t == "function" and o == json.null) + end + + return json +end +local debugger_print = print +local debug_server = nil +local breakInfoSocket = nil +local json = createJson() +local LuaDebugger = { + fileMaps = {}, + Run = true, --表示正常运行只检测断点 + StepIn = false, + StepInLevel = 0, + StepNext = false, + StepNextLevel = 0, + StepOut = false, + breakInfos = {}, + runTimeType = nil, + isHook = true, + pathCachePaths = {}, + isProntToConsole = 1, + isFoxGloryProject = false, + isDebugPrint = true, + hookType = "lrc", + currentFileName = "", + currentTempFunc = nil, + --分割字符串缓存 + splitFilePaths = {}, + DebugLuaFie = "", + version = "0.9.3", + serVarLevel = 4 +} +local debug_hook = nil +local _resume = coroutine.resume +coroutine.resume = function(co, ...) + if (LuaDebugger.isHook) then + if coroutine.status(co) ~= "dead" then + debug.sethook(co, debug_hook, "lrc") + end + end + return _resume(co, ...) +end + +LuaDebugger.event = { + S2C_SetBreakPoints = 1, + C2S_SetBreakPoints = 2, + S2C_RUN = 3, + C2S_HITBreakPoint = 4, + S2C_ReqVar = 5, + C2S_ReqVar = 6, + --单步跳过请求 + S2C_NextRequest = 7, + --单步跳过反馈 + C2S_NextResponse = 8, + -- 单步跳过 结束 没有下一步 + C2S_NextResponseOver = 9, + --单步跳入 + S2C_StepInRequest = 10, + C2S_StepInResponse = 11, + --单步跳出 + S2C_StepOutRequest = 12, + --单步跳出返回 + C2S_StepOutResponse = 13, + --打印 + C2S_LuaPrint = 14, + S2C_LoadLuaScript = 16, + C2S_SetSocketName = 17, + C2S_LoadLuaScript = 18, + C2S_DebugXpCall = 20, + S2C_DebugClose = 21, + S2C_SerVar = 24, + C2S_SerVar = 25, + S2C_ReLoadFile = 26, + C2S_ReLoadFile = 27, +} +--@region print +function print(...) + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then + debugger_print(...) + end + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then + if (debug_server) then + local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错 + local str = "" + if (#arg == 0) then + arg = {"nil"} + end + for k, v in pairs(arg) do + str = str .. tostring(v) .. "\t" + end + local sendMsg = { + event = LuaDebugger.event.C2S_LuaPrint, + data = {msg = ZZBase64.encode(str), type = 1} + } + local sendStr = json.encode(sendMsg) + debug_server:send(sendStr .. "__debugger_k0204__") + end + end +end + +function luaIdePrintWarn(...) + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then + debugger_print(...) + end + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then + if (debug_server) then + local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错 + local str = "" + if (#arg == 0) then + arg = {"nil"} + end + for k, v in pairs(arg) do + str = str .. tostring(v) .. "\t" + end + local sendMsg = { + event = LuaDebugger.event.C2S_LuaPrint, + data = {msg = ZZBase64.encode(str), type = 2} + } + local sendStr = json.encode(sendMsg) + debug_server:send(sendStr .. "__debugger_k0204__") + end + end +end +function luaIdePrintErr(...) + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then + debugger_print(...) + end + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then + if (debug_server) then + local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错 + local str = "" + if (#arg == 0) then + arg = {"nil"} + end + for k, v in pairs(arg) do + str = str .. tostring(v) .. "\t" + end + local sendMsg = { + event = LuaDebugger.event.C2S_LuaPrint, + data = {msg = ZZBase64.encode(str), type = 3} + } + local sendStr = json.encode(sendMsg) + debug_server:send(sendStr .. "__debugger_k0204__") + end + end +end +--@endregion + +--@region 辅助方法 +local function debugger_lastIndex(str, p) + local startIndex = string.find(str, p, 1) + while startIndex do + local findstartIndex = string.find(str, p, startIndex + 1) + if (not findstartIndex) then + break + else + startIndex = findstartIndex + end + end + return startIndex +end +local function debugger_convertParentDir(dir) + local index, endindex = string.find(dir, "/%.%./") + if (index) then + local file1 = string.sub(dir, 1, index - 1) + local startIndex = debugger_lastIndex(file1, "/") + file1 = string.sub(file1, 1, startIndex - 1) + local file2 = string.sub(dir, endindex) + dir = file1 .. file2 + dir = debugger_convertParentDir(dir) + return dir + else + return dir + end +end + +local function debugger_getFilePathInfo(file) + local fileName = nil + local dir = nil + file = file:gsub("/.\\", "/") + file = file:gsub("\\", "/") + file = file:gsub("//", "/") + + + if file:find("@") == 1 then + file = file:sub(2) + end + local findex = file:find("%./") + if (findex == 1) then + file = file:sub(3) + end + + file = debugger_convertParentDir(file) + local fileLength = string.len(file) + local suffixNames = { + ".lua", + ".txt.lua", + ".txt", + ".bytes" + } + table.sort( + suffixNames, + function(name1, name2) + return string.len(name1) > string.len(name2) + end + ) + local suffixLengs = {} + for i, suffixName in ipairs(suffixNames) do + table.insert(suffixLengs, string.len(suffixName)) + end + + local fileLength = string.len(file) + for i, suffix in ipairs(suffixNames) do + local suffixName = string.sub(file, fileLength - suffixLengs[i] + 1) + if (suffixName == suffix) then + file = string.sub(file, 1, fileLength - suffixLengs[i]) + break + end + end + local fileNameStartIndex = debugger_lastIndex(file, "/") + if (fileNameStartIndex) then + fileName = string.sub(file, fileNameStartIndex + 1) + + dir = string.sub(file, 1, fileNameStartIndex) + file = dir .. fileName + else + fileNameStartIndex = debugger_lastIndex(file, "%.") + if (not fileNameStartIndex) then + fileName = file + dir = "" + else + dir = string.sub(file, 1, fileNameStartIndex) + dir = dir:gsub("%.", "/") + fileName = string.sub(file, fileNameStartIndex + 1) + file = dir .. fileName + end + end + + return file, dir, fileName +end + +--@endregion + + + +----=============================工具方法============================================= +--@region 工具方法 + + +local function debugger_strSplit(input, delimiter) + input = tostring(input) + delimiter = tostring(delimiter) + if (delimiter == "") then + return false + end + local pos, arr = 0, {} + -- for each divider found + for st, sp in function() + return string.find(input, delimiter, pos, true) + end do + table.insert(arr, string.sub(input, pos, st - 1)) + pos = sp + 1 + end + table.insert(arr, string.sub(input, pos)) + return arr +end +local function debugger_strTrim(input) + input = string.gsub(input, "^[ \t\n\r]+", "") + return string.gsub(input, "[ \t\n\r]+$", "") +end +local function debugger_dump(value, desciption, nesting) + if type(nesting) ~= "number" then + nesting = 3 + end + local lookupTable = {} + local result = {} + local function _v(v) + if type(v) == "string" then + v = '"' .. v .. '"' + end + return tostring(v) + end + local traceback = debugger_strSplit(debug.traceback("", 2), "\n") + print("dump from: " .. debugger_strTrim(traceback[3])) + local function _dump(value, desciption, indent, nest, keylen) + desciption = desciption or "" + local spc = "" + if type(keylen) == "number" then + spc = string.rep(" ", keylen - string.len(_v(desciption))) + end + if type(value) ~= "table" then + result[#result + 1] = string.format("%s%s%s = %s", indent, _v(desciption), spc, _v(value)) + elseif lookupTable[value] then + result[#result + 1] = string.format("%s%s%s = *REF*", indent, desciption, spc) + else + lookupTable[value] = true + if nest > nesting then + result[#result + 1] = string.format("%s%s = *MAX NESTING*", indent, desciption) + else + result[#result + 1] = string.format("%s%s = {", indent, _v(desciption)) + local indent2 = indent .. " " + local keys = {} + local keylen = 0 + local values = {} + for k, v in pairs(value) do + keys[#keys + 1] = k + local vk = _v(k) + local vkl = string.len(vk) + if vkl > keylen then + keylen = vkl + end + values[k] = v + end + table.sort( + keys, + function(a, b) + if type(a) == "number" and type(b) == "number" then + return a < b + else + return tostring(a) < tostring(b) + end + end + ) + for i, k in ipairs(keys) do + _dump(values[k], k, indent2, nest + 1, keylen) + end + result[#result + 1] = string.format("%s}", indent) + end + end + end + _dump(value, desciption, "- ", 1) + for i, line in ipairs(result) do + print(line) + end +end +--@endregion +local function debugger_valueToString(v) + local vtype = type(v) + local vstr = nil + if (vtype == "userdata") then + if (LuaDebugger.isFoxGloryProject) then + + return "userdata",vtype + + else + return tostring(v), vtype + end + elseif (vtype == "table" or vtype == "function" or vtype == "boolean") then + local value = vtype + xpcall(function() + value = tostring(v) + end,function() + value = vtype + end) + return value, vtype + elseif (vtype == "number" or vtype == "string" ) then + return v, vtype + else + return tostring(v), vtype + end +end +local function debugger_setVarInfo(name, value) + local valueStr, valueType = debugger_valueToString(value) + local nameStr,nameType = debugger_valueToString(name) + if(valueStr == nil) then + valueStr = valueType + end + local valueInfo = { + name =nameStr, + valueType = valueType, + valueStr = ZZBase64.encode(valueStr) + } + + return valueInfo +end + +local function debugger_getvalue(f) + local i = 1 + local locals = {} + -- get locals + while true do + local name, value = debug.getlocal(f, i) + if not name then + break + end + if (name ~= "(*temporary)") then + locals[name] = value + end + i = i + 1 + end + local func = getinfo(f, "f").func + i = 1 + local ups = {} + while func do -- check for func as it may be nil for tail calls + local name, value = debug.getupvalue(func, i) + if not name then + break + end + if (name == "_ENV") then + ups["_ENV_"] = value + else + ups[name] = value + end + i = i + 1 + end + + return {locals = locals, ups = ups} +end +--获取堆栈 +debugger_stackInfo = + function(ignoreCount, event) + local datas = {} + local stack = {} + local varInfos = {} + local funcs = {} + local index = 0 + for i = ignoreCount, 100 do + local source = getinfo(i) + local isadd = true + if (i == ignoreCount) then + local file = source.source + if (file:find(LuaDebugger.DebugLuaFie)) then + return + end + if (file == "=[C]") then + isadd = false + end + end + if not source then + break + end + if (isadd) then + local fullName, dir, fileName = debugger_getFilePathInfo(source.source) + local info = { + src = fullName, + scoreName = source.name, + currentline = source.currentline, + linedefined = source.linedefined, + what = source.what, + nameWhat = source.namewhat + } + index = i + local vars = debugger_getvalue(i + 1) + table.insert(stack, info) + table.insert(varInfos, vars) + table.insert(funcs, source.func) + end + if source.what == "main" then + break + end + end + + local stackInfo = {stack = stack, vars = varInfos, funcs = funcs} + local data = { + stack = stackInfo.stack, + vars = stackInfo.vars, + funcs = stackInfo.funcs, + event = event, + funcsLength = #stackInfo.funcs, + upFunc = getinfo(ignoreCount - 3, "f").func + } + LuaDebugger.currentTempFunc = data.funcs[1] + return data +end + +--===========================点断信息================================================== +--根据不同的游戏引擎进行定时获取断点信息 +--CCDirector:sharedDirector():getScheduler() +local debugger_setBreak = nil +local function debugger_receiveDebugBreakInfo() + if (jit) then + if (LuaDebugger.debugLuaType ~= "jit") then + local msg = "当前luajit版本为: " .. jit.version .. " 请使用LuaDebugjit 进行调试!" + print(msg) + end + end + if (breakInfoSocket) then + local msg, status = breakInfoSocket:receive() + if(LuaDebugger.isLaunch and status == "closed") then + os.exit() + end + if (msg) then + local netData = json.decode(msg) + if netData.event == LuaDebugger.event.S2C_SetBreakPoints then + debugger_setBreak(netData.data) + elseif netData.event == LuaDebugger.event.S2C_LoadLuaScript then + LuaDebugger.loadScriptBody = netData.data + debugger_exeLuaString() + debugger_sendMsg(breakInfoSocket,LuaDebugger.event.C2S_LoadLuaScript,LuaDebugger.loadScriptBody) + elseif netData.event == LuaDebugger.event.S2C_ReLoadFile then + LuaDebugger.reLoadFileBody = netData.data + LuaDebugger.isReLoadFile = false + LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody) + print("重载结果:",LuaDebugger.reLoadFileBody.isReLoad) + LuaDebugger.reLoadFileBody.script = nil + debugger_sendMsg( + breakInfoSocket, + LuaDebugger.event.C2S_ReLoadFile, + { + stack = LuaDebugger.reLoadFileBody + + } + ) + end + end + end +end +local function splitFilePath(path) + if (LuaDebugger.splitFilePaths[path]) then + return LuaDebugger.splitFilePaths[path] + end + local pos, arr = 0, {} + -- for each divider found + for st, sp in function() + return string.find(path, "/", pos, true) + end do + local pathStr = string.sub(path, pos, st - 1) + table.insert(arr, pathStr) + pos = sp + 1 + end + local pathStr = string.sub(path, pos) + table.insert(arr, pathStr) + LuaDebugger.splitFilePaths[path] = arr + return arr +end +debugger_setBreak = + function(datas) + local breakInfos = LuaDebugger.breakInfos + for i, data in ipairs(datas) do + data.fileName = string.lower(data.fileName) + data.serverPath = string.lower(data.serverPath) + local breakInfo = breakInfos[data.fileName] + if (not breakInfo) then + breakInfos[data.fileName] = {} + breakInfo = breakInfos[data.fileName] + end + if (not data.breakDatas or #data.breakDatas == 0) then + breakInfo[data.serverPath] = nil + else + local fileBreakInfo = breakInfo[data.serverPath] + if (not fileBreakInfo) then + fileBreakInfo = { + pathNames = splitFilePath(data.serverPath), + --命中次數判斷計數器 + hitCounts = {} + } + breakInfo[data.serverPath] = fileBreakInfo + end + local lineInfos = {} + for li, breakData in ipairs(data.breakDatas) do + lineInfos[breakData.line] = breakData + if (breakData.hitCondition and breakData.hitCondition ~= "") then + breakData.hitCondition = tonumber(breakData.hitCondition) + else + breakData.hitCondition = 0 + end + if (not fileBreakInfo.hitCounts[breakData.line]) then + fileBreakInfo.hitCounts[breakData.line] = 0 + end + end + fileBreakInfo.lines = lineInfos + --這裡添加命中次數判斷 + for line, count in pairs(fileBreakInfo.hitCounts) do + if (not lineInfos[line]) then + fileBreakInfo.hitCounts[line] = nil + end + end + end + local count = 0 + for i, linesInfo in pairs(breakInfo) do + count = count + 1 + end + if (count == 0) then + breakInfos[data.fileName] = nil + end + end + --debugger_dump(breakInfos, "breakInfos", 6) + --检查是否需要断点 + local isHook = false + for k, v in pairs(breakInfos) do + isHook = true + break + end + + --这样做的原因是为了最大限度的使手机调试更加流畅 注意这里会连续的进行n次 + if (isHook) then + if (not LuaDebugger.isHook) then + debug.sethook(debug_hook, "lrc") + end + LuaDebugger.isHook = true + else + if (LuaDebugger.isHook) then + debug.sethook() + end + LuaDebugger.isHook = false + end +end +local function debugger_checkFileIsBreak(fileName) + return LuaDebugger.breakInfos[fileName] +end +--=====================================断点信息 end ---------------------------------------------- +local controller_host = "192.168.1.102" +local controller_port = 7003 +debugger_sendMsg = function(serverSocket, eventName, data) + local sendMsg = { + event = eventName, + data = data + } + local sendStr = json.encode(sendMsg) + serverSocket:send(sendStr .. "__debugger_k0204__") +end +function debugger_conditionStr(condition, vars, callBack) + local function loadScript() + local currentTabble = {} + + local locals = vars[1].locals + local ups = vars[1].ups + if (ups) then + for k, v in pairs(ups) do + currentTabble[k] = v + end + end + + if (locals) then + for k, v in pairs(locals) do + currentTabble[k] = v + end + end + setmetatable(currentTabble, {__index = _G}) + local fun = loadstring("return " .. condition) + setfenv(fun, currentTabble) + return fun() + end + local status, + msg = + xpcall( + loadScript, + function(error) + print(error) + end + ) + if (status and msg) then + callBack() + end +end +--执行lua字符串 +debugger_exeLuaString = function() + + local function loadScript() + + local script = LuaDebugger.loadScriptBody.script + if (LuaDebugger.loadScriptBody.isBreak) then + local currentTabble = {_G = _G} + local frameId = LuaDebugger.loadScriptBody.frameId + frameId = frameId + local func = LuaDebugger.currentDebuggerData.funcs[frameId] + local vars = LuaDebugger.currentDebuggerData.vars[frameId] + local locals = vars.locals + local ups = vars.ups + for k, v in pairs(ups) do + currentTabble[k] = v + end + for k, v in pairs(locals) do + currentTabble[k] = v + end + setmetatable(currentTabble, {__index = _G}) + + local fun = loadstring(script) + setfenv(fun, currentTabble) + fun() + else + local fun = loadstring(script) + fun() + end + end + local status, + msg = + xpcall( + loadScript, + function(error) + + -- debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, LuaDebugger.loadScriptBody) + end + ) + LuaDebugger.loadScriptBody.script = nil + if (LuaDebugger.loadScriptBody.isBreak) then + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint) + LuaDebugger.loadScriptBody.stack = LuaDebugger.currentDebuggerData.stack + end + LuaDebugger.loadScriptBody.complete = true + +end +--@region 调试中修改变量值 + + +--根据key 值在 value 查找 +local function debugger_getTablekey(key,keyType,value) + if(keyType == -1) then + return key + elseif(keyType == 1) then + return tonumber(key) + elseif(keyType == 2) then + local valueKey = nil + for k,v in pairs(value) do + local nameType = type(k) + if(nameType == "userdata" or nameType == "table") then + if (not LuaDebugger.isFoxGloryProject) then + valueKey = tostring(k) + if(key == valueKey) then + return k + end + break + end + end + end + + end +end + +local function debugger_setVarValue(server, data) + + local newValue = nil + local level = LuaDebugger.serVarLevel+LuaDebugger.setVarBody.frameId + local firstKeyName = data.keys[1] + --@region vars check + local localValueChangeIndex = -1 + local upValueChangeIndex = -1 + local upValueFun = nil + local oldValue = nil + local i = 1 + local locals = {} + -- get locals + while true do + local name, value = debug.getlocal(level, i) + if not name then + break + end + if(firstKeyName == name) then + localValueChangeIndex = i + oldValue = value + end + if (name ~= "(*temporary)") then + locals[name] = value + end + i = i + 1 + end + local func = getinfo(level, "f").func + i = 1 + local ups = {} + while func do -- check for func as it may be nil for tail calls + local name, value = debug.getupvalue(func, i) + + if not name then + break + end + if(localValueChangeIndex == -1 and firstKeyName == name) then + upValueFun = func + oldValue = value + upValueChangeIndex = i + end + if (name == "_ENV") then + ups["_ENV_"] = value + else + ups[name] = value + end + i = i + 1 + end +--@endregion + local vars = {locals = locals, ups = ups} + + local function loadScript() + local currentTabble = {} + local locals = vars.locals + local ups = vars.ups + if (ups) then + for k, v in pairs(ups) do + currentTabble[k] = v + end + end + + if (locals) then + for k, v in pairs(locals) do + currentTabble[k] = v + end + end + setmetatable(currentTabble, {__index = _G}) + local fun = loadstring("return " .. data.value) + setfenv(fun, currentTabble) + newValue = fun() + end + local status, + msg = + xpcall( + loadScript, + function(error) + print(error, "============================") + end + ) + + local i = 1 + + -- local 查找并替换 + local keyLength = #data.keys + + if(keyLength == 1) then + if(localValueChangeIndex ~= -1) then + + debug.setlocal(level, localValueChangeIndex, newValue) + elseif(upValueFun ~= nil) then + debug.setupvalue( upValueFun, upValueChangeIndex, newValue ) + else + --全局变量查找 + if(_G[firstKeyName]) then + _G[firstKeyName] = newValue + end + end + else + if(not oldValue) then + if(_G[firstKeyName]) then + oldValue = _G[firstKeyName] + end + end + local tempValue = oldValue + for i=2,keyLength-1 do + if(tempValue) then + oldValue = oldValue[debugger_getTablekey(data.keys[i],data.numberTypes[i],oldValue)] + end + end + if(tempValue) then + oldValue[debugger_getTablekey(data.keys[keyLength],data.numberTypes[keyLength],oldValue)] = newValue + end + end + local varInfo = debugger_setVarInfo(data.varName, newValue) + data.varInfo = varInfo + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint) + +end +--@endregion + + + + +--调试修改变量值统一的 _resume +checkSetVar = + function() + if (LuaDebugger.isSetVar) then + LuaDebugger.isSetVar = false + debugger_setVarValue(debug_server,LuaDebugger.setVarBody) + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + _resume(coro_debugger, LuaDebugger.setVarBody) + xpcall( + checkSetVar, + function(error) + print("设置变量", error) + end + ) + elseif(LuaDebugger.isLoadLuaScript) then + LuaDebugger.isLoadLuaScript = false + debugger_exeLuaString() + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + _resume(coro_debugger, LuaDebugger.reLoadFileBody) + xpcall( + checkSetVar, + function(error) + print("执行代码", error) + end + ) + elseif(LuaDebugger.isReLoadFile) then + LuaDebugger.isReLoadFile = false + LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody) + print("重载结果:",LuaDebugger.reLoadFileBody.isReLoad) + LuaDebugger.reLoadFileBody.script = nil + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + _resume(coro_debugger, LuaDebugger.reLoadFileBody) + xpcall( + checkSetVar, + function(error) + print("重新加载文件", error) + end + ) + end +end + + + +local function getSource(source) + source = string.lower(source) + if (LuaDebugger.pathCachePaths[source]) then + LuaDebugger.currentLineFile = LuaDebugger.pathCachePaths[source] + return LuaDebugger.pathCachePaths[source] + end + + local fullName, dir, fileName = debugger_getFilePathInfo(source) + LuaDebugger.currentLineFile = fullName + LuaDebugger.pathCachePaths[source] = fileName + + return fileName +end +local function debugger_GeVarInfoBytUserData(server, var) + local fileds = LuaDebugTool.getUserDataInfo(var) + + local varInfos = {} + + + --c# vars + for i = 1, fileds.Count do + local filed = fileds[i - 1] + local valueInfo = { + name = filed.name, + valueType = filed.valueType, + valueStr = ZZBase64.encode(filed.valueStr), + isValue = filed.isValue, + csharp = true + } + + table.insert(varInfos, valueInfo) + end + return varInfos +end + +local function debugger_getValueByScript(value, script) + local val = nil + local status, + msg = + xpcall( + function() + local fun = loadstring("return " .. script) + setfenv(fun, value) + val = fun() + end, + function(error) + print(error, "====>") + val = nil + end + ) + + return val +end +local function debugger_getVarByKeys(value, keys, index) + local str = "" + local keyLength = #keys + for i = index, keyLength do + local key = keys[i] + if (key == "[metatable]") then + else + if (i == index) then + if (string.find(key, "%.")) then + if (str == "") then + i = index + 1 + value = value[key] + end + if (i >= #keys) then + return index, value + end + + return debugger_getVarByKeys(value, keys, i) + else + str = key + end + else + if (string.find(key, "%[")) then + str = str .. key + elseif (type(key) == "string") then + if (string.find(key, "table:") or string.find(key, "userdata:") or string.find(key, "function:")) then + if (str ~= "") then + local vl = debugger_getValueByScript(value, str) + value = vl + if (value) then + for k, v in pairs(value) do + local ktype = type(k) + + if (ktype == "userdata" or ktype == "table" or ktype == "function") then + local keyName = debugger_valueToString(k) + if (keyName == key) then + value = v + break + end + end + end + end + str = "" + if (i == keyLength) then + return #keys, value + else + return debugger_getVarByKeys(value, keys, i + 1) + end + else + str = str .. '["' .. key .. '"]' + end + else + str = str .. '["' .. key .. '"]' + end + else + str = str .. "[" .. key .. "]" + end + end + end + end + + local v = debugger_getValueByScript(value, str) + + return #keys, v +end +--[[ + @desc: 查找c# 值 + author:k0204 + time:2018-04-07 21:32:31 + return +]] +local function debugger_getCSharpValue(value, searchIndex, keys) + local key = keys[searchIndex] + local val = LuaDebugTool.getCSharpValue(value, key) + if (val) then + --1最后一个 直接返回 + if (searchIndex == #keys) then + return #keys, val + else + --2再次获得 如果没有找到那么 进行lua 层面查找 + local vindex, val1 = debugger_getCSharpValue(val, searchIndex + 1, keys) + if (not val1) then + --组建新的keys + local tempKeys = {} + for i = vindex, #keys do + table.insert(tempKeys, keys[i]) + end + local vindx, val1 = debugger_searchVarByKeys(value, searckKeys, 1) + return vindx, val1 + else + return vindex, val1 + end + end + else + --3最终这里返回 所以2 中 没有当val1 不为空的处理 + return searchIndex, val + end +end +local function debugger_searchVarByKeys(value, keys, searckKeys) + local index, val = debugger_getVarByKeys(value, searckKeys, 1) + + if (not LuaDebugTool or not LuaDebugTool.getCSharpValue or type(LuaDebugTool.getCSharpValue) ~= "function") then + return index, val + end + if (val) then + if (index == #keys) then + return index, val + else + local searchStr = "" + --进行c# 值查找 + local keysLength = #keys + local searchIndex = index + 1 + local sindex, val = debugger_getCSharpValue(val, searchIndex, keys) + return sindex, val + end + else + --进行递减 + local tempKeys = {} + for i = 1, #searckKeys - 1 do + table.insert(tempKeys, keys[i]) + end + if (#tempKeys == 0) then + return #keys, nil + end + return debugger_searchVarByKeys(value, keys, tempKeys) + end +end +--[[ + @desc: 获取metatable 信息 + author:k0204 + time:2018-04-06 20:27:12 + return +]] +local function debugger_getmetatable(value, metatable, vinfos, server, variablesReference, debugSpeedIndex, metatables) + for i, mtable in ipairs(metatables) do + if (metatable == mtable) then + return vinfos + end + end + table.insert(metatables, metatable) + for k, v in pairs(metatable) do + local val = nil + if (type(k) == "string") then + xpcall( + function() + val = value[k] + end, + function(error) + val = nil + end + ) + if (val == nil) then + xpcall( + function() + if (string.find(k, "__")) then + val = v + end + end, + function(error) + val = nil + end + ) + end + end + if (val) then + local vinfo = debugger_setVarInfo(k, val) + table.insert(vinfos, vinfo) + if (#vinfos > 10) then + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = vinfos, + isComplete = 0 + } + ) + vinfos = {} + end + end + end + local m = getmetatable(metatable) + if (m) then + return debugger_getmetatable(value, m, vinfos, server, variablesReference, debugSpeedIndex, metatables) + else + return vinfos + end +end +local function debugger_sendTableField(luatable, vinfos, server, variablesReference, debugSpeedIndex, valueType) + if (valueType == "userdata") then + if (tolua and tolua.getpeer) then + luatable = tolua.getpeer(luatable) + else + return vinfos + end + end + if (luatable == nil) then + return vinfos + end + for k, v in pairs(luatable) do + local vinfo = debugger_setVarInfo(k, v) + table.insert(vinfos, vinfo) + if (#vinfos > 10) then + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = vinfos, + isComplete = 0 + } + ) + vinfos = {} + end + end + + return vinfos +end +local function debugger_sendTableValues(value, server, variablesReference, debugSpeedIndex) + local vinfos = {} + local luatable = {} + local valueType = type(value) + local userDataInfos = {} + local m = nil + + if (valueType == "userdata") then + m = getmetatable(value) + + vinfos = debugger_sendTableField(value, vinfos, server, variablesReference, debugSpeedIndex, valueType) + + if (LuaDebugTool) then + local varInfos = debugger_GeVarInfoBytUserData(server, value, variablesReference, debugSpeedIndex) + + for i, v in ipairs(varInfos) do + if (v.valueType == "System.Byte[]" and value[v.name] and type(value[v.name]) == "string") then + local valueInfo = { + name = v.name, + valueType = "string", + valueStr = ZZBase64.encode(value[v.name]) + } + table.insert(vinfos, valueInfo) + else + table.insert(vinfos, v) + end + if (#vinfos > 10) then + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = vinfos, + isComplete = 0 + } + ) + vinfos = {} + end + end + + end + else + m = getmetatable(value) + vinfos = debugger_sendTableField(value, vinfos, server, variablesReference, debugSpeedIndex, valueType) + end + + if (m) then + vinfos = debugger_getmetatable(value, m, vinfos, server, variablesReference, debugSpeedIndex, {}) + end + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = vinfos, + isComplete = 1 + } + ) +end + +--获取lua 变量的方法 +local function debugger_getBreakVar(body, server) + local variablesReference = body.variablesReference + local debugSpeedIndex = body.debugSpeedIndex + local vinfos = {} + local function exe() + local frameId = body.frameId + local type_ = body.type + local keys = body.keys + --找到对应的var + local vars = nil + if (type_ == 1) then + vars = LuaDebugger.currentDebuggerData.vars[frameId + 1] + vars = vars.locals + elseif (type_ == 2) then + vars = LuaDebugger.currentDebuggerData.vars[frameId + 1] + vars = vars.ups + elseif (type_ == 3) then + vars = _G + end + if (#keys == 0) then + debugger_sendTableValues(vars, server, variablesReference, debugSpeedIndex) + return + end + local index, value = debugger_searchVarByKeys(vars, keys, keys) + if (value) then + local valueType = type(value) + if (valueType == "table" or valueType == "userdata") then + + debugger_sendTableValues(value, server, variablesReference, debugSpeedIndex) + else + if (valueType == "function") then + value = tostring(value) + end + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = ZZBase64.encode(value), + isComplete = 1, + varType = valueType + } + ) + end + else + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = {}, + isComplete = 1, + varType = "nil" + } + ) + end + end + xpcall( + exe, + function(error) + -- print("获取变量错误 错误消息-----------------") + -- print(error) + -- print(debug.traceback("", 2)) + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = { + { + name = "error", + valueType = "string", + valueStr = ZZBase64.encode("无法获取属性值:" .. error .. "->" .. debug.traceback("", 2)), + isValue = false + } + }, + isComplete = 1 + } + ) + end + ) +end +local function ResetDebugInfo() + LuaDebugger.Run = false + LuaDebugger.StepIn = false + LuaDebugger.StepNext = false + LuaDebugger.StepOut = false + LuaDebugger.StepNextLevel = 0 +end +local function debugger_loop(server) + server = debug_server + --命令 + local command + local eval_env = {} + local arg + while true do + local line, status = server:receive() + if (status == "closed") then + if(LuaDebugger.isLaunch) then + os.exit() + else + debug.sethook() + coroutine.yield() + end + end + if (line) then + local netData = json.decode(line) + local event = netData.event + local body = netData.data + if (event == LuaDebugger.event.S2C_DebugClose) then + if(LuaDebugger.isLaunch) then + os.exit() + else + debug.sethook() + coroutine.yield() + end + + elseif event == LuaDebugger.event.S2C_SetBreakPoints then + --设置断点信息 + local function setB() + debugger_setBreak(body) + end + xpcall( + setB, + function(error) + print(error) + end + ) + elseif event == LuaDebugger.event.S2C_RUN then --开始运行 + LuaDebugger.runTimeType = body.runTimeType + LuaDebugger.isProntToConsole = body.isProntToConsole + LuaDebugger.isFoxGloryProject = body.isFoxGloryProject + LuaDebugger.isLaunch = body.isLaunch + ResetDebugInfo() + LuaDebugger.Run = true + local data = coroutine.yield() + LuaDebugger.serVarLevel = 4 + LuaDebugger.currentDebuggerData = data + debugger_sendMsg( + server, + data.event, + { + stack = data.stack + } + ) + elseif event == LuaDebugger.event.S2C_ReqVar then -- 获取变量信息 + --请求数据信息 + debugger_getBreakVar(body, server) + elseif event == LuaDebugger.event.S2C_NextRequest then -- 设置单步跳过 + ResetDebugInfo() + LuaDebugger.StepNext = true + LuaDebugger.StepNextLevel = 0 + --设置当前文件名和当前行数 + local data = coroutine.yield() + LuaDebugger.serVarLevel = 4 + --重置调试信息 + LuaDebugger.currentDebuggerData = data + debugger_sendMsg( + server, + data.event, + { + stack = data.stack + } + ) + elseif (event == LuaDebugger.event.S2C_StepInRequest) then --单步跳入 + --单步跳入 + ResetDebugInfo() + LuaDebugger.StepIn = true + + local data = coroutine.yield() + LuaDebugger.serVarLevel = 4 + --重置调试信息 + LuaDebugger.currentDebuggerData = data + debugger_sendMsg( + server, + data.event, + { + stack = data.stack, + eventType = data.eventType + } + ) + elseif (event == LuaDebugger.event.S2C_StepOutRequest) then + --单步跳出 + ResetDebugInfo() + LuaDebugger.StepOut = true + local data = coroutine.yield() + LuaDebugger.serVarLevel = 4 + --重置调试信息 + LuaDebugger.currentDebuggerData = data + debugger_sendMsg( + server, + data.event, + { + stack = data.stack, + eventType = data.eventType + } + ) + elseif event == LuaDebugger.event.S2C_LoadLuaScript then + LuaDebugger.loadScriptBody = body + LuaDebugger.isLoadLuaScript = true + local data = coroutine.yield() + debugger_sendMsg( + server, + LuaDebugger.event.C2S_LoadLuaScript, + LuaDebugger.loadScriptBody + ) + elseif event == LuaDebugger.event.S2C_SerVar then + LuaDebugger.isSetVar = true + LuaDebugger.setVarBody = body + local data = coroutine.yield() + debugger_sendMsg( + server, + LuaDebugger.event.C2S_SerVar, + { + stack = data, + eventType = data.eventType + } + ) + elseif event == LuaDebugger.event.S2C_ReLoadFile then + LuaDebugger.isReLoadFile = true + LuaDebugger.reLoadFileBody = body + local data = coroutine.yield() + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReLoadFile, + { + stack = data, + eventType = data.eventType + } + ) + end + end + end +end +coro_debugger = coroutine.create(debugger_loop) +debug_hook = function(event, line) + + if(not LuaDebugger.isHook) then + return + end + + if(LuaDebugger.Run) then + if(event == "line") then + local isCheck = false + for k, breakInfo in pairs(LuaDebugger.breakInfos) do + + for bk, linesInfo in pairs(breakInfo) do + + if(linesInfo.lines and linesInfo.lines[line]) then + isCheck = true + break + end + end + if(isCheck) then + break + end + end + + if(not isCheck) then + return + end + else + LuaDebugger.currentFileName = nil + LuaDebugger.currentTempFunc = nil + return + end + end + --跳出 + if (LuaDebugger.StepOut) then + if (event == "line" or event == "call") then + return + end + local tempFun = getinfo(2, "f").func + + if (LuaDebugger.currentDebuggerData.funcsLength == 1) then + ResetDebugInfo() + LuaDebugger.Run = true + else + if (LuaDebugger.currentDebuggerData.funcs[2] == tempFun) then + local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse) + --挂起等待调试器作出反应 + + _resume(coro_debugger, data) + checkSetVar() + end + end + return + end + -- debugger_dump(LuaDebugger,"LuaDebugger") + -- print(LuaDebugger.StepNextLevel,"LuaDebugger.StepNextLevel") + local file = nil + if (event == "call") then + -- end + -- if(not LuaDebugger.StepOut) then + if (not LuaDebugger.Run) then + LuaDebugger.StepNextLevel = LuaDebugger.StepNextLevel + 1 + end + -- print("stepIn",LuaDebugger.StepNextLevel) + + local stepInfo = getinfo(2, "S") + local source = stepInfo.source + if (source:find(LuaDebugger.DebugLuaFie) or source == "=[C]") then + return + end + + file = getSource(source) + LuaDebugger.currentFileName = file + elseif (event == "return" or event == "tail return") then + -- end + -- if(not LuaDebugger.StepOut) then + + if (not LuaDebugger.Run) then + LuaDebugger.StepNextLevel = LuaDebugger.StepNextLevel - 1 + end + + LuaDebugger.currentFileName = nil + elseif (event == "line") then + --@region 判断命中断点 + --判断命中断点 + --判断命中断点 + --判断命中断点 + --判断命中断点 + local isHit = false + local stepInfo = nil + if (not LuaDebugger.currentFileName) then + stepInfo = getinfo(2, "S") + local source = stepInfo.source + if (source == "=[C]" or source:find(LuaDebugger.DebugLuaFie)) then + return + end + file = getSource(source) + LuaDebugger.currentFileName = file + end + file = LuaDebugger.currentFileName + + --判断断点 + local breakInfo = LuaDebugger.breakInfos[file] + local breakData = nil + if (breakInfo) then + + local ischeck = false + for k, lineInfo in pairs(breakInfo) do + local lines = lineInfo.lines + if (lines and lines[line]) then + ischeck = true + break + end + end + + if (ischeck) then + --并且在断点中 + local info = stepInfo + if (not info) then + info = getinfo(2) + end + local hitPathNames = splitFilePath(LuaDebugger.currentLineFile) + + local hitCounts = {} + local debugHitCounts = nil + for k, lineInfo in pairs(breakInfo) do + local lines = lineInfo.lines + local pathNames = lineInfo.pathNames + debugHitCounts = lineInfo.hitCounts + if (lines and lines[line]) then + breakData = lines[line] + --判断路径 + hitCounts[k] = 0 + local hitPathNamesCount = #hitPathNames + + local pathNamesCount = #pathNames + local checkCount = 0; + while (true) do + if (pathNames[pathNamesCount] ~= hitPathNames[hitPathNamesCount]) then + break + else + hitCounts[k] = hitCounts[k] + 1 + end + pathNamesCount = pathNamesCount - 1 + hitPathNamesCount = hitPathNamesCount - 1 + checkCount = checkCount+1 + + if (pathNamesCount <= 0 or hitPathNamesCount <= 0) then + break + end + end + if(checkCount>0) then + break; + end + else + breakData = nil + end + end + if (breakData) then + local hitFieName = "" + local maxCount = 0 + for k, v in pairs(hitCounts) do + if (v > maxCount) then + maxCount = v + hitFieName = k + end + end + local hitPathNamesLength = #hitPathNames + if (hitPathNamesLength == 1 or (hitPathNamesLength > 1 and maxCount > 1)) then + if (hitFieName ~= "") then + local hitCount = breakData.hitCondition + local clientHitCount = debugHitCounts[breakData.line] + clientHitCount = clientHitCount + 1 + debugHitCounts[breakData.line] = clientHitCount + + if (clientHitCount >= hitCount) then + isHit = true + end + end + end + end + end + end + --@endregion + if (LuaDebugger.StepIn) then + local data = debugger_stackInfo(3, LuaDebugger.event.C2S_NextResponse) + --挂起等待调试器作出反应 + if (data) then + LuaDebugger.currentTempFunc = data.funcs[1] + + _resume(coro_debugger, data) + checkSetVar() + return + end + end + if (LuaDebugger.StepNext) then + if (LuaDebugger.StepNextLevel <= 0) then + local data = debugger_stackInfo(3, LuaDebugger.event.C2S_NextResponse) + -- 挂起等待调试器作出反应 + if (data) then + LuaDebugger.currentTempFunc = data.funcs[1] + + _resume(coro_debugger, data) + checkSetVar() + return + end + end + end + if (isHit) then + local data = debugger_stackInfo(3, LuaDebugger.event.C2S_HITBreakPoint) + if (breakData and breakData.condition) then + debugger_conditionStr( + breakData.condition, + data.vars, + function() + _resume(coro_debugger, data) + checkSetVar() + end + ) + else + --挂起等待调试器作出反应 + _resume(coro_debugger, data) + checkSetVar() + end + end + end +end +local function debugger_xpcall() + --调用 coro_debugger 并传入 参数 + local data = debugger_stackInfo(4, LuaDebugger.event.C2S_HITBreakPoint) + if(data.stack and data.stack[1]) then + data.stack[1].isXpCall = true + end + --挂起等待调试器作出反应 + _resume(coro_debugger, data) + checkSetVar() +end +--调试开始 +local function start() + local fullName, dirName, fileName = debugger_getFilePathInfo(getinfo(1).source) + LuaDebugger.DebugLuaFie = fileName + local socket = createSocket() + print(controller_host) + print(controller_port) + + local server = socket.connect(controller_host, controller_port) + debug_server = server + if server then + --创建breakInfo socket + socket = createSocket() + breakInfoSocket = socket.connect(controller_host, controller_port) + if (breakInfoSocket) then + breakInfoSocket:settimeout(0) + debugger_sendMsg( + breakInfoSocket, + LuaDebugger.event.C2S_SetSocketName, + { + name = "breakPointSocket" + } + ) + debugger_sendMsg( + server, + LuaDebugger.event.C2S_SetSocketName, + { + name = "mainSocket", + version = LuaDebugger.version + } + ) + xpcall( + function() + debug.sethook(debug_hook, "lrc") + end, + function(error) + print("error:", error) + end + ) + if (jit) then + if (LuaDebugger.debugLuaType ~= "jit") then + print("error======================================================") + local msg = "当前luajit版本为: " .. jit.version .. " 请使用LuaDebugjit 进行调试!" + + print(msg) + end + end + _resume(coro_debugger, server) + end + end +end +function StartDebug(host, port) + if (not host) then + print("error host nil") + end + if (not port) then + print("error prot nil") + end + if (type(host) ~= "string") then + print("error host not string") + end + if (type(port) ~= "number") then + print("error host not number") + end + controller_host = host + controller_port = port + xpcall( + start, + function(error) + -- body + print(error) + end + ) + return debugger_receiveDebugBreakInfo, debugger_xpcall +end + +--base64 + +local string = string + +ZZBase64.__code = { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', + 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', + 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', +}; +ZZBase64.__decode = {} +for k,v in pairs(ZZBase64.__code) do + ZZBase64.__decode[string.byte(v,1)] = k - 1 +end + +function ZZBase64.encode(text) + local len = string.len(text) + local left = len % 3 + len = len - left + local res = {} + local index = 1 + for i = 1, len, 3 do + local a = string.byte(text, i ) + local b = string.byte(text, i + 1) + local c = string.byte(text, i + 2) + -- num = a<<16 + b<<8 + c + local num = a * 65536 + b * 256 + c + for j = 1, 4 do + --tmp = num >> ((4 -j) * 6) + local tmp = math.floor(num / (2 ^ ((4-j) * 6))) + --curPos = tmp&0x3f + local curPos = tmp % 64 + 1 + res[index] = ZZBase64.__code[curPos] + index = index + 1 + end + end + + if left == 1 then + ZZBase64.__left1(res, index, text, len) + elseif left == 2 then + ZZBase64.__left2(res, index, text, len) + end + return table.concat(res) +end + +function ZZBase64.__left2(res, index, text, len) + local num1 = string.byte(text, len + 1) + num1 = num1 * 1024 --lshift 10 + local num2 = string.byte(text, len + 2) + num2 = num2 * 4 --lshift 2 + local num = num1 + num2 + + local tmp1 = math.floor(num / 4096) --rShift 12 + local curPos = tmp1 % 64 + 1 + res[index] = ZZBase64.__code[curPos] + + local tmp2 = math.floor(num / 64) + curPos = tmp2 % 64 + 1 + res[index + 1] = ZZBase64.__code[curPos] + + curPos = num % 64 + 1 + res[index + 2] = ZZBase64.__code[curPos] + + res[index + 3] = "=" +end + +function ZZBase64.__left1(res, index,text, len) + local num = string.byte(text, len + 1) + num = num * 16 + + local tmp = math.floor(num / 64) + local curPos = tmp % 64 + 1 + res[index ] = ZZBase64.__code[curPos] + + curPos = num % 64 + 1 + res[index + 1] = ZZBase64.__code[curPos] + + res[index + 2] = "=" + res[index + 3] = "=" +end + +function ZZBase64.decode(text) + local len = string.len(text) + local left = 0 + if string.sub(text, len - 1) == "==" then + left = 2 + len = len - 4 + elseif string.sub(text, len) == "=" then + left = 1 + len = len - 4 + end + + local res = {} + local index = 1 + local decode = ZZBase64.__decode + for i =1, len, 4 do + local a = decode[string.byte(text,i )] + local b = decode[string.byte(text,i + 1)] + local c = decode[string.byte(text,i + 2)] + local d = decode[string.byte(text,i + 3)] + + --num = a<<18 + b<<12 + c<<6 + d + local num = a * 262144 + b * 4096 + c * 64 + d + + local e = string.char(num % 256) + num = math.floor(num / 256) + local f = string.char(num % 256) + num = math.floor(num / 256) + res[index ] = string.char(num % 256) + res[index + 1] = f + res[index + 2] = e + index = index + 3 + end + + if left == 1 then + ZZBase64.__decodeLeft1(res, index, text, len) + elseif left == 2 then + ZZBase64.__decodeLeft2(res, index, text, len) + end + return table.concat(res) +end + +function ZZBase64.__decodeLeft1(res, index, text, len) + local decode = ZZBase64.__decode + local a = decode[string.byte(text, len + 1)] + local b = decode[string.byte(text, len + 2)] + local c = decode[string.byte(text, len + 3)] + local num = a * 4096 + b * 64 + c + + local num1 = math.floor(num / 1024) % 256 + local num2 = math.floor(num / 4) % 256 + res[index] = string.char(num1) + res[index + 1] = string.char(num2) +end + +function ZZBase64.__decodeLeft2(res, index, text, len) + local decode = ZZBase64.__decode + local a = decode[string.byte(text, len + 1)] + local b = decode[string.byte(text, len + 2)] + local num = a * 64 + b + num = math.floor(num / 16) + res[index] = string.char(num) +end + + + + +return StartDebug diff --git a/lua_probject/base_project/debug/LuaDebugjit.lua b/lua_probject/base_project/debug/LuaDebugjit.lua new file mode 100644 index 00000000..6ba9f888 --- /dev/null +++ b/lua_probject/base_project/debug/LuaDebugjit.lua @@ -0,0 +1,2589 @@ +local debugger_reLoadFile =nil +xpcall(function() + debugger_reLoadFile = require("luaideReLoadFile") +end,function() + debugger_reLoadFile = function() print("未实现代码重载") end +end) +local sethook = debug.sethook +local debugger_stackInfo = nil +local coro_debugger = nil +local debugger_require = require +local debugger_exeLuaString = nil +local checkSetVar = nil +local loadstring_ = nil +local debugger_sendMsg = nil +if (loadstring) then +loadstring_ = loadstring +else +loadstring_ = load +end +local ZZBase64 = {} +local LuaDebugTool_ = nil +if (LuaDebugTool) then + LuaDebugTool_ = LuaDebugTool +elseif (CS and CS.LuaDebugTool) then + LuaDebugTool_ = CS.LuaDebugTool +end +local LuaDebugTool = LuaDebugTool_ +local loadstring = loadstring_ +local getinfo = debug.getinfo +local function createSocket() + local base = _G + local string = require("string") + local math = require("math") + local socket = require("socket.core") + + local _M = socket + + ----------------------------------------------------------------------------- + -- Exported auxiliar functions + ----------------------------------------------------------------------------- + function _M.connect4(address, port, laddress, lport) + return socket.connect(address, port, laddress, lport, "inet") + end + + function _M.connect6(address, port, laddress, lport) + return socket.connect(address, port, laddress, lport, "inet6") + end + + if (not _M.connect) then + function _M.connect(address, port, laddress, lport) + local sock, err = socket.tcp() + if not sock then + return nil, err + end + if laddress then + local res, err = sock:bind(laddress, lport, -1) + if not res then + return nil, err + end + end + local res, err = sock:connect(address, port) + if not res then + return nil, err + end + return sock + end + end + function _M.bind(host, port, backlog) + if host == "*" then + host = "0.0.0.0" + end + local addrinfo, err = socket.dns.getaddrinfo(host) + if not addrinfo then + return nil, err + end + local sock, res + err = "no info on address" + for i, alt in base.ipairs(addrinfo) do + if alt.family == "inet" then + sock, err = socket.tcp4() + else + sock, err = socket.tcp6() + end + if not sock then + return nil, err + end + sock:setoption("reuseaddr", true) + res, err = sock:bind(alt.addr, port) + if not res then + sock:close() + else + res, err = sock:listen(backlog) + if not res then + sock:close() + else + return sock + end + end + end + return nil, err + end + + _M.try = _M.newtry() + + function _M.choose(table) + return function(name, opt1, opt2) + if base.type(name) ~= "string" then + name, opt1, opt2 = "default", name, opt1 + end + local f = table[name or "nil"] + if not f then + base.error("unknown key (" .. base.tostring(name) .. ")", 3) + else + return f(opt1, opt2) + end + end + end + + ----------------------------------------------------------------------------- + -- Socket sources and sinks, conforming to LTN12 + ----------------------------------------------------------------------------- + -- create namespaces inside LuaSocket namespace + local sourcet, sinkt = {}, {} + _M.sourcet = sourcet + _M.sinkt = sinkt + + _M.BLOCKSIZE = 2048 + + sinkt["close-when-done"] = + function(sock) + return base.setmetatable( + { + getfd = function() + return sock:getfd() + end, + dirty = function() + return sock:dirty() + end + }, + { + __call = function(self, chunk, err) + if not chunk then + sock:close() + return 1 + else + return sock:send(chunk) + end + end + } + ) + end + + sinkt["keep-open"] = + function(sock) + return base.setmetatable( + { + getfd = function() + return sock:getfd() + end, + dirty = function() + return sock:dirty() + end + }, + { + __call = function(self, chunk, err) + if chunk then + return sock:send(chunk) + else + return 1 + end + end + } + ) + end + + sinkt["default"] = sinkt["keep-open"] + + _M.sink = _M.choose(sinkt) + + sourcet["by-length"] = + function(sock, length) + return base.setmetatable( + { + getfd = function() + return sock:getfd() + end, + dirty = function() + return sock:dirty() + end + }, + { + __call = function() + if length <= 0 then + return nil + end + local size = math.min(socket.BLOCKSIZE, length) + local chunk, err = sock:receive(size) + if err then + return nil, err + end + length = length - string.len(chunk) + return chunk + end + } + ) + end + + sourcet["until-closed"] = + function(sock) + local done + return base.setmetatable( + { + getfd = function() + return sock:getfd() + end, + dirty = function() + return sock:dirty() + end + }, + { + __call = function() + if done then + return nil + end + local chunk, err, partial = sock:receive(socket.BLOCKSIZE) + if not err then + return chunk + elseif err == "closed" then + sock:close() + done = 1 + return partial + else + return nil, err + end + end + } + ) + end + + sourcet["default"] = sourcet["until-closed"] + + _M.source = _M.choose(sourcet) + + return _M +end + +local function createJson() + local math = require("math") + local string = require("string") + local table = require("table") + local object = nil + ----------------------------------------------------------------------------- + -- Module declaration + ----------------------------------------------------------------------------- + local json = {} -- Public namespace + local json_private = {} -- Private namespace + + -- Public constants + json.EMPTY_ARRAY = {} + json.EMPTY_OBJECT = {} + -- Public functions + + -- Private functions + local decode_scanArray + local decode_scanComment + local decode_scanConstant + local decode_scanNumber + local decode_scanObject + local decode_scanString + local decode_scanWhitespace + local encodeString + local isArray + local isEncodable + + ----------------------------------------------------------------------------- + -- PUBLIC FUNCTIONS + ----------------------------------------------------------------------------- + --- Encodes an arbitrary Lua object / variable. + -- @param v The Lua object / variable to be JSON encoded. + -- @return String containing the JSON encoding in internal Lua string format (i.e. not unicode) + function json.encode(v) + -- Handle nil values + if v == nil then + return "null" + end + + local vtype = type(v) + + -- Handle strings + if vtype == "string" then + return '"' .. json_private.encodeString(v) .. '"' -- Need to handle encoding in string + end + + -- Handle booleans + if vtype == "number" or vtype == "boolean" then + return tostring(v) + end + + -- Handle tables + if vtype == "table" then + local rval = {} + -- Consider arrays separately + local bArray, maxCount = isArray(v) + if bArray then + for i = 1, maxCount do + table.insert(rval, json.encode(v[i])) + end + else -- An object, not an array + for i, j in pairs(v) do + if isEncodable(i) and isEncodable(j) then + table.insert(rval, '"' .. json_private.encodeString(i) .. '":' .. json.encode(j)) + end + end + end + if bArray then + return "[" .. table.concat(rval, ",") .. "]" + else + return "{" .. table.concat(rval, ",") .. "}" + end + end + + -- Handle null values + if vtype == "function" and v == json.null then + return "null" + end + + assert(false, "encode attempt to encode unsupported type " .. vtype .. ":" .. tostring(v)) + end + + --- Decodes a JSON string and returns the decoded value as a Lua data structure / value. + -- @param s The string to scan. + -- @param [startPos] Optional starting position where the JSON string is located. Defaults to 1. + -- @param Lua object, number The object that was scanned, as a Lua table / string / number / boolean or nil, + -- and the position of the first character after + -- the scanned JSON object. + function json.decode(s, startPos) + startPos = startPos and startPos or 1 + startPos = decode_scanWhitespace(s, startPos) + assert(startPos <= string.len(s), "Unterminated JSON encoded object found at position in [" .. s .. "]") + local curChar = string.sub(s, startPos, startPos) + -- Object + if curChar == "{" then + return decode_scanObject(s, startPos) + end + -- Array + if curChar == "[" then + return decode_scanArray(s, startPos) + end + -- Number + if string.find("+-0123456789.e", curChar, 1, true) then + return decode_scanNumber(s, startPos) + end + -- String + if curChar == '"' or curChar == [[']] then + return decode_scanString(s, startPos) + end + if string.sub(s, startPos, startPos + 1) == "/*" then + return json.decode(s, decode_scanComment(s, startPos)) + end + -- Otherwise, it must be a constant + return decode_scanConstant(s, startPos) + end + + --- The null function allows one to specify a null value in an associative array (which is otherwise + -- discarded if you set the value with 'nil' in Lua. Simply set t = { first=json.null } + function json.null() + return json.null -- so json.null() will also return null ;-) + end + ----------------------------------------------------------------------------- + -- Internal, PRIVATE functions. + -- Following a Python-like convention, I have prefixed all these 'PRIVATE' + -- functions with an underscore. + ----------------------------------------------------------------------------- + --- Scans an array from JSON into a Lua object + -- startPos begins at the start of the array. + -- Returns the array and the next starting position + -- @param s The string being scanned. + -- @param startPos The starting position for the scan. + -- @return table, int The scanned array as a table, and the position of the next character to scan. + function decode_scanArray(s, startPos) + local array = {} -- The return value + local stringLen = string.len(s) + assert( + string.sub(s, startPos, startPos) == "[", + "decode_scanArray called but array does not start at position " .. startPos .. " in string:\n" .. s + ) + startPos = startPos + 1 + -- Infinite loop for array elements + repeat + startPos = decode_scanWhitespace(s, startPos) + assert(startPos <= stringLen, "JSON String ended unexpectedly scanning array.") + local curChar = string.sub(s, startPos, startPos) + if (curChar == "]") then + return array, startPos + 1 + end + if (curChar == ",") then + startPos = decode_scanWhitespace(s, startPos + 1) + end + assert(startPos <= stringLen, "JSON String ended unexpectedly scanning array.") + object, startPos = json.decode(s, startPos) + table.insert(array, object) + until false + end + + --- Scans a comment and discards the comment. + -- Returns the position of the next character following the comment. + -- @param string s The JSON string to scan. + -- @param int startPos The starting position of the comment + function decode_scanComment(s, startPos) + assert( + string.sub(s, startPos, startPos + 1) == "/*", + "decode_scanComment called but comment does not start at position " .. startPos + ) + local endPos = string.find(s, "*/", startPos + 2) + assert(endPos ~= nil, "Unterminated comment in string at " .. startPos) + return endPos + 2 + end + + --- Scans for given constants: true, false or null + -- Returns the appropriate Lua type, and the position of the next character to read. + -- @param s The string being scanned. + -- @param startPos The position in the string at which to start scanning. + -- @return object, int The object (true, false or nil) and the position at which the next character should be + -- scanned. + function decode_scanConstant(s, startPos) + local consts = {["true"] = true, ["false"] = false, ["null"] = nil} + local constNames = {"true", "false", "null"} + + for i, k in pairs(constNames) do + if string.sub(s, startPos, startPos + string.len(k) - 1) == k then + return consts[k], startPos + string.len(k) + end + end + assert(nil, "Failed to scan constant from string " .. s .. " at starting position " .. startPos) + end + + --- Scans a number from the JSON encoded string. + -- (in fact, also is able to scan numeric +- eqns, which is not + -- in the JSON spec.) + -- Returns the number, and the position of the next character + -- after the number. + -- @param s The string being scanned. + -- @param startPos The position at which to start scanning. + -- @return number, int The extracted number and the position of the next character to scan. + function decode_scanNumber(s, startPos) + local endPos = startPos + 1 + local stringLen = string.len(s) + local acceptableChars = "+-0123456789.e" + while (string.find(acceptableChars, string.sub(s, endPos, endPos), 1, true) and endPos <= stringLen) do + endPos = endPos + 1 + end + local stringValue = "return " .. string.sub(s, startPos, endPos - 1) + local stringEval = loadstring(stringValue) + assert( + stringEval, + "Failed to scan number [ " .. stringValue .. "] in JSON string at position " .. startPos .. " : " .. endPos + ) + return stringEval(), endPos + end + + --- Scans a JSON object into a Lua object. + -- startPos begins at the start of the object. + -- Returns the object and the next starting position. + -- @param s The string being scanned. + -- @param startPos The starting position of the scan. + -- @return table, int The scanned object as a table and the position of the next character to scan. + function decode_scanObject(s, startPos) + local object = {} + local stringLen = string.len(s) + local key, value + assert( + string.sub(s, startPos, startPos) == "{", + "decode_scanObject called but object does not start at position " .. startPos .. " in string:\n" .. s + ) + startPos = startPos + 1 + repeat + startPos = decode_scanWhitespace(s, startPos) + assert(startPos <= stringLen, "JSON string ended unexpectedly while scanning object.") + local curChar = string.sub(s, startPos, startPos) + if (curChar == "}") then + return object, startPos + 1 + end + if (curChar == ",") then + startPos = decode_scanWhitespace(s, startPos + 1) + end + assert(startPos <= stringLen, "JSON string ended unexpectedly scanning object.") + -- Scan the key + key, startPos = json.decode(s, startPos) + assert(startPos <= stringLen, "JSON string ended unexpectedly searching for value of key " .. key) + startPos = decode_scanWhitespace(s, startPos) + assert(startPos <= stringLen, "JSON string ended unexpectedly searching for value of key " .. key) + assert( + string.sub(s, startPos, startPos) == ":", + "JSON object key-value assignment mal-formed at " .. startPos + ) + startPos = decode_scanWhitespace(s, startPos + 1) + assert(startPos <= stringLen, "JSON string ended unexpectedly searching for value of key " .. key) + value, startPos = json.decode(s, startPos) + object[key] = value + until false -- infinite loop while key-value pairs are found + end + + -- START SoniEx2 + -- Initialize some things used by decode_scanString + -- You know, for efficiency + local escapeSequences = { + ["\\t"] = "\t", + ["\\f"] = "\f", + ["\\r"] = "\r", + ["\\n"] = "\n", + ["\\b"] = "" + } + setmetatable( + escapeSequences, + { + __index = function(t, k) + -- skip "\" aka strip escape + return string.sub(k, 2) + end + } + ) + -- END SoniEx2 + --- Scans a JSON string from the opening inverted comma or single quote to the + -- end of the string. + -- Returns the string extracted as a Lua string, + -- and the position of the next non-string character + -- (after the closing inverted comma or single quote). + -- @param s The string being scanned. + -- @param startPos The starting position of the scan. + -- @return string, int The extracted string as a Lua string, and the next character to parse. + function decode_scanString(s, startPos) + assert(startPos, "decode_scanString(..) called without start position") + local startChar = string.sub(s, startPos, startPos) + -- START SoniEx2 + -- PS: I don't think single quotes are valid JSON + assert(startChar == '"' or startChar == [[']], "decode_scanString called for a non-string") + --assert(startPos, "String decoding failed: missing closing " .. startChar .. " for string at position " .. oldStart) + local t = {} + local i, j = startPos, startPos + while string.find(s, startChar, j + 1) ~= j + 1 do + local oldj = j + i, j = string.find(s, "\\.", j + 1) + local x, y = string.find(s, startChar, oldj + 1) + if not i or x < i then + i, j = x, y - 1 + end + table.insert(t, string.sub(s, oldj + 1, i - 1)) + if string.sub(s, i, j) == "\\u" then + local a = string.sub(s, j + 1, j + 4) + j = j + 4 + local n = tonumber(a, 16) + assert(n, "String decoding failed: bad Unicode escape " .. a .. " at position " .. i .. " : " .. j) + -- math.floor(x/2^y) == lazy right shift + -- a % 2^b == bitwise_and(a, (2^b)-1) + -- 64 = 2^6 + -- 4096 = 2^12 (or 2^6 * 2^6) + local x + if n < 128 then + x = string.char(n % 128) + elseif n < 2048 then + -- [110x xxxx] [10xx xxxx] + x = string.char(192 + (math.floor(n / 64) % 32), 128 + (n % 64)) + else + -- [1110 xxxx] [10xx xxxx] [10xx xxxx] + x = string.char(224 + (math.floor(n / 4096) % 16), 128 + (math.floor(n / 64) % 64), 128 + (n % 64)) + end + table.insert(t, x) + else + table.insert(t, escapeSequences[string.sub(s, i, j)]) + end + end + table.insert(t, string.sub(j, j + 1)) + assert( + string.find(s, startChar, j + 1), + "String decoding failed: missing closing " .. + startChar .. " at position " .. j .. "(for string at position " .. startPos .. ")" + ) + return table.concat(t, ""), j + 2 + -- END SoniEx2 + end + + --- Scans a JSON string skipping all whitespace from the current start position. + -- Returns the position of the first non-whitespace character, or nil if the whole end of string is reached. + -- @param s The string being scanned + -- @param startPos The starting position where we should begin removing whitespace. + -- @return int The first position where non-whitespace was encountered, or string.len(s)+1 if the end of string + -- was reached. + function decode_scanWhitespace(s, startPos) + local whitespace = " \n\r\t" + local stringLen = string.len(s) + while (string.find(whitespace, string.sub(s, startPos, startPos), 1, true) and startPos <= stringLen) do + startPos = startPos + 1 + end + return startPos + end + + --- Encodes a string to be JSON-compatible. + -- This just involves back-quoting inverted commas, back-quotes and newlines, I think ;-) + -- @param s The string to return as a JSON encoded (i.e. backquoted string) + -- @return The string appropriately escaped. + local escapeList = { + ['"'] = '\\"', + ["\\"] = "\\\\", + ["/"] = "\\/", + [""] = "\\b", + ["\f"] = "\\f", + ["\n"] = "\\n", + ["\r"] = "\\r", + ["\t"] = "\\t" + } + + function json_private.encodeString(s) + local s = tostring(s) + return s:gsub( + ".", + function(c) + return escapeList[c] + end + ) -- SoniEx2: 5.0 compat + end + + -- Determines whether the given Lua type is an array or a table / dictionary. + -- We consider any table an array if it has indexes 1..n for its n items, and no + -- other data in the table. + -- I think this method is currently a little 'flaky', but can't think of a good way around it yet... + -- @param t The table to evaluate as an array + -- @return boolean, number True if the table can be represented as an array, false otherwise. If true, + -- the second returned value is the maximum + -- number of indexed elements in the array. + function isArray(t) + -- Next we count all the elements, ensuring that any non-indexed elements are not-encodable + -- (with the possible exception of 'n') + if (t == json.EMPTY_ARRAY) then + return true, 0 + end + if (t == json.EMPTY_OBJECT) then + return false + end + + local maxIndex = 0 + for k, v in pairs(t) do + if (type(k) == "number" and math.floor(k) == k and 1 <= k) then -- k,v is an indexed pair + if (not isEncodable(v)) then + return false + end -- All array elements must be encodable + maxIndex = math.max(maxIndex, k) + else + if (k == "n") then + if v ~= (t.n or #t) then + return false + end -- False if n does not hold the number of elements + else -- Else of (k=='n') + if isEncodable(v) then + return false + end + end -- End of (k~='n') + end -- End of k,v not an indexed pair + end -- End of loop across all pairs + return true, maxIndex + end + + --- Determines whether the given Lua object / table / variable can be JSON encoded. The only + -- types that are JSON encodable are: string, boolean, number, nil, table and json.null. + -- In this implementation, all other types are ignored. + -- @param o The object to examine. + -- @return boolean True if the object should be JSON encoded, false if it should be ignored. + function isEncodable(o) + local t = type(o) + return (t == "string" or t == "boolean" or t == "number" or t == "nil" or t == "table") or + (t == "function" and o == json.null) + end + + return json +end +local debugger_print = print +local debug_server = nil +local breakInfoSocket = nil +local json = createJson() +local LuaDebugger = { + fileMaps = {}, + Run = true, --表示正常运行只检测断点 + StepIn = false, + StepNext = false, + StepOut = false, + breakInfos = {}, + runTimeType = nil, + isHook = true, + pathCachePaths = {}, + isProntToConsole = 1, + isDebugPrint = true, + hookType = "lrc", + stepNextFun = nil, + DebugLuaFie = "", + runLineCount = 0, + --分割字符串缓存 + splitFilePaths = {}, + version="0.9.3", + serVarLevel = 4 +} +local debug_hook = nil +local _resume = coroutine.resume +coroutine.resume = function(co, ...) + if (LuaDebugger.isHook) then + if coroutine.status(co) ~= "dead" then + debug.sethook(co, debug_hook, "lrc") + end + end + return _resume(co, ...) +end + +LuaDebugger.event = { + S2C_SetBreakPoints = 1, + C2S_SetBreakPoints = 2, + S2C_RUN = 3, + C2S_HITBreakPoint = 4, + S2C_ReqVar = 5, + C2S_ReqVar = 6, + --单步跳过请求 + S2C_NextRequest = 7, + --单步跳过反馈 + C2S_NextResponse = 8, + -- 单步跳过 结束 没有下一步 + C2S_NextResponseOver = 9, + --单步跳入 + S2C_StepInRequest = 10, + C2S_StepInResponse = 11, + --单步跳出 + S2C_StepOutRequest = 12, + --单步跳出返回 + C2S_StepOutResponse = 13, + --打印 + C2S_LuaPrint = 14, + S2C_LoadLuaScript = 16, + C2S_SetSocketName = 17, + C2S_LoadLuaScript = 18, + C2S_DebugXpCall = 20, + S2C_DebugClose = 21, + S2C_SerVar = 24, + C2S_SerVar = 25, + S2C_ReLoadFile = 26, + C2S_ReLoadFile = 27, +} +--@region print +function print(...) + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then + debugger_print(...) + end + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then + if (debug_server) then + local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错 + local str = "" + if (#arg == 0) then + arg = {"nil"} + end + for k, v in pairs(arg) do + str = str .. tostring(v) .. "\t" + end + local sendMsg = { + event = LuaDebugger.event.C2S_LuaPrint, + data = {msg = ZZBase64.encode(str), type = 1} + } + local sendStr = json.encode(sendMsg) + debug_server:send(sendStr .. "__debugger_k0204__") + end + end +end + +function luaIdePrintWarn(...) + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then + debugger_print(...) + end + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then + if (debug_server) then + local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错 + local str = "" + if (#arg == 0) then + arg = {"nil"} + end + for k, v in pairs(arg) do + str = str .. tostring(v) .. "\t" + end + local sendMsg = { + event = LuaDebugger.event.C2S_LuaPrint, + data = {msg = ZZBase64.encode(str), type = 2} + } + local sendStr = json.encode(sendMsg) + debug_server:send(sendStr .. "__debugger_k0204__") + end + end +end +function luaIdePrintErr(...) + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 3) then + debugger_print(...) + end + if (LuaDebugger.isProntToConsole == 1 or LuaDebugger.isProntToConsole == 2) then + if (debug_server) then + local arg = {...} --这里的...和{}符号中间需要有空格号,否则会出错 + local str = "" + if (#arg == 0) then + arg = {"nil"} + end + for k, v in pairs(arg) do + str = str .. tostring(v) .. "\t" + end + local sendMsg = { + event = LuaDebugger.event.C2S_LuaPrint, + data = {msg = ZZBase64.encode(str), type = 3} + } + local sendStr = json.encode(sendMsg) + debug_server:send(sendStr .. "__debugger_k0204__") + end + end +end +--@endregion + +--@region 辅助方法 +local function debugger_lastIndex(str, p) + local startIndex = string.find(str, p, 1) + while startIndex do + local findstartIndex = string.find(str, p, startIndex + 1) + if (not findstartIndex) then + break + else + startIndex = findstartIndex + end + end + return startIndex +end +local function debugger_convertParentDir(dir) + local index, endindex = string.find(dir, "/%.%./") + if (index) then + local file1 = string.sub(dir, 1, index - 1) + local startIndex = debugger_lastIndex(file1, "/") + file1 = string.sub(file1, 1, startIndex - 1) + local file2 = string.sub(dir, endindex) + dir = file1 .. file2 + dir = debugger_convertParentDir(dir) + return dir + else + return dir + end +end + +local function debugger_getFilePathInfo(file) + local fileName = nil + local dir = nil + file = file:gsub("/.\\", "/") + file = file:gsub("\\", "/") + file = file:gsub("//", "/") + + + if file:find("@") == 1 then + file = file:sub(2) + end + local findex = file:find("%./") + if (findex == 1) then + file = file:sub(3) + end + + file = debugger_convertParentDir(file) + local fileLength = string.len(file) + local suffixNames = { + ".lua", + ".txt.lua", + ".txt", + ".bytes" + } + table.sort( + suffixNames, + function(name1, name2) + return string.len(name1) > string.len(name2) + end + ) + local suffixLengs = {} + for i, suffixName in ipairs(suffixNames) do + table.insert(suffixLengs, string.len(suffixName)) + end + + local fileLength = string.len(file) + for i, suffix in ipairs(suffixNames) do + local suffixName = string.sub(file, fileLength - suffixLengs[i] + 1) + if (suffixName == suffix) then + file = string.sub(file, 1, fileLength - suffixLengs[i]) + break + end + end + local fileNameStartIndex = debugger_lastIndex(file, "/") + if (fileNameStartIndex) then + fileName = string.sub(file, fileNameStartIndex + 1) + + dir = string.sub(file, 1, fileNameStartIndex) + file = dir .. fileName + else + fileNameStartIndex = debugger_lastIndex(file, "%.") + if (not fileNameStartIndex) then + fileName = file + dir = "" + else + dir = string.sub(file, 1, fileNameStartIndex) + dir = dir:gsub("%.", "/") + fileName = string.sub(file, fileNameStartIndex + 1) + file = dir .. fileName + end + end + + return file, dir, fileName +end + +--@endregion + + + +----=============================工具方法============================================= +--@region 工具方法 + + +local function debugger_strSplit(input, delimiter) + input = tostring(input) + delimiter = tostring(delimiter) + if (delimiter == "") then + return false + end + local pos, arr = 0, {} + -- for each divider found + for st, sp in function() + return string.find(input, delimiter, pos, true) + end do + table.insert(arr, string.sub(input, pos, st - 1)) + pos = sp + 1 + end + table.insert(arr, string.sub(input, pos)) + return arr +end +local function debugger_strTrim(input) + input = string.gsub(input, "^[ \t\n\r]+", "") + return string.gsub(input, "[ \t\n\r]+$", "") +end +local function debugger_dump(value, desciption, nesting) + if type(nesting) ~= "number" then + nesting = 3 + end + local lookupTable = {} + local result = {} + local function _v(v) + if type(v) == "string" then + v = '"' .. v .. '"' + end + return tostring(v) + end + local traceback = debugger_strSplit(debug.traceback("", 2), "\n") + print("dump from: " .. debugger_strTrim(traceback[3])) + local function _dump(value, desciption, indent, nest, keylen) + desciption = desciption or "" + local spc = "" + if type(keylen) == "number" then + spc = string.rep(" ", keylen - string.len(_v(desciption))) + end + if type(value) ~= "table" then + result[#result + 1] = string.format("%s%s%s = %s", indent, _v(desciption), spc, _v(value)) + elseif lookupTable[value] then + result[#result + 1] = string.format("%s%s%s = *REF*", indent, desciption, spc) + else + lookupTable[value] = true + if nest > nesting then + result[#result + 1] = string.format("%s%s = *MAX NESTING*", indent, desciption) + else + result[#result + 1] = string.format("%s%s = {", indent, _v(desciption)) + local indent2 = indent .. " " + local keys = {} + local keylen = 0 + local values = {} + for k, v in pairs(value) do + keys[#keys + 1] = k + local vk = _v(k) + local vkl = string.len(vk) + if vkl > keylen then + keylen = vkl + end + values[k] = v + end + table.sort( + keys, + function(a, b) + if type(a) == "number" and type(b) == "number" then + return a < b + else + return tostring(a) < tostring(b) + end + end + ) + for i, k in ipairs(keys) do + _dump(values[k], k, indent2, nest + 1, keylen) + end + result[#result + 1] = string.format("%s}", indent) + end + end + end + _dump(value, desciption, "- ", 1) + for i, line in ipairs(result) do + print(line) + end +end +--@endregion +local function debugger_valueToString(v) + local vtype = type(v) + local vstr = nil + if (vtype == "userdata") then + if (LuaDebugger.isFoxGloryProject ) then + + return "userdata",vtype + + else + return tostring(v), vtype + end + elseif (vtype == "table" or vtype == "function" or vtype == "boolean") then + local value = vtype + xpcall(function() + if(LuaDebugger.isFoxGloryProject) then + value = vtype + else + value = tostring(v) + end + + end,function() + value = vtype + end) + return value, vtype + elseif (vtype == "number" or vtype == "string" ) then + return v, vtype + else + return tostring(v), vtype + end +end +local function debugger_setVarInfo(name, value) + local valueStr, valueType = debugger_valueToString(value) + local nameStr,nameType = debugger_valueToString(name) + if(valueStr == nil) then + valueStr = valueType + end + local valueInfo = { + name =nameStr, + valueType = valueType, + valueStr = ZZBase64.encode(valueStr) + } + + return valueInfo +end + +local function debugger_getvalue(f) + local i = 1 + local locals = {} + -- get locals + while true do + local name, value = debug.getlocal(f, i) + if not name then + break + end + if (name ~= "(*temporary)") then + locals[name] = value + end + i = i + 1 + end + local func = getinfo(f, "f").func + i = 1 + local ups = {} + while func do -- check for func as it may be nil for tail calls + local name, value = debug.getupvalue(func, i) + if not name then + break + end + if (name == "_ENV") then + ups["_ENV_"] = value + else + ups[name] = value + end + i = i + 1 + end + + return {locals = locals, ups = ups} +end +--获取堆栈 +debugger_stackInfo = + function(ignoreCount, event) + local datas = {} + local stack = {} + local varInfos = {} + local funcs = {} + local index = 0 + for i = ignoreCount, 100 do + local source = getinfo(i) + local isadd = true + if (i == ignoreCount) then + local file = source.source + if (file:find(LuaDebugger.DebugLuaFie)) then + return + end + if (file == "=[C]") then + isadd = false + end + end + if not source then + break + end + if (isadd) then + local fullName, dir, fileName = debugger_getFilePathInfo(source.source) + local info = { + src = fullName, + scoreName = source.name, + currentline = source.currentline, + linedefined = source.linedefined, + what = source.what, + nameWhat = source.namewhat + } + index = i + local vars = debugger_getvalue(i + 1) + table.insert(stack, info) + table.insert(varInfos, vars) + table.insert(funcs, source.func) + end + if source.what == "main" then + break + end + end + + local stackInfo = {stack = stack, vars = varInfos, funcs = funcs} + local data = { + stack = stackInfo.stack, + vars = stackInfo.vars, + funcs = stackInfo.funcs, + event = event, + funcsLength = #stackInfo.funcs, + upFunc = getinfo(ignoreCount - 3, "f").func + } + + return data +end +--==============================工具方法 end====================================================== +--===========================点断信息================================================== +--根据不同的游戏引擎进行定时获取断点信息 +--CCDirector:sharedDirector():getScheduler() +local debugger_setBreak = nil +local function debugger_receiveDebugBreakInfo() + if(not jit) then + if(_VERSION)then + print("当前lua版本为: ".._VERSION.." 请使用 -----LuaDebug.lua----- 进行调试!") + else + print("当前为lua版本,请使用-----LuaDebug.lua-----进行调试!") + end + end + if (breakInfoSocket) then + local msg, status = breakInfoSocket:receive() + if(LuaDebugger.isLaunch == true and status == "closed") then + os.exit() + end + if (msg) then + local netData = json.decode(msg) + if netData.event == LuaDebugger.event.S2C_SetBreakPoints then + debugger_setBreak(netData.data) + elseif netData.event == LuaDebugger.event.S2C_LoadLuaScript then + LuaDebugger.loadScriptBody = netData.data + debugger_exeLuaString() + debugger_sendMsg(breakInfoSocket,LuaDebugger.event.C2S_LoadLuaScript,LuaDebugger.loadScriptBody) + elseif netData.event == LuaDebugger.event.S2C_ReLoadFile then + LuaDebugger.reLoadFileBody = netData.data + LuaDebugger.isReLoadFile = false + LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody) + LuaDebugger.reLoadFileBody.script = nil + + debugger_sendMsg( + breakInfoSocket, + LuaDebugger.event.C2S_ReLoadFile, + { + stack = LuaDebugger.reLoadFileBody + + } + ) + end + end + end +end +local function splitFilePath(path) + if (LuaDebugger.splitFilePaths[path]) then + return LuaDebugger.splitFilePaths[path] + end + local pos, arr = 0, {} + -- for each divider found + for st, sp in function() + return string.find(path, "/", pos, true) + end do + local pathStr = string.sub(path, pos, st - 1) + table.insert(arr, pathStr) + pos = sp + 1 + end + local pathStr = string.sub(path, pos) + table.insert(arr, pathStr) + LuaDebugger.splitFilePaths[path] = arr + return arr +end +debugger_setBreak = + function(datas) + local breakInfos = LuaDebugger.breakInfos + for i, data in ipairs(datas) do + data.fileName = string.lower(data.fileName) + data.serverPath = string.lower(data.serverPath) + local breakInfo = breakInfos[data.fileName] + if (not breakInfo) then + breakInfos[data.fileName] = {} + breakInfo = breakInfos[data.fileName] + end + if (not data.breakDatas or #data.breakDatas == 0) then + breakInfo[data.serverPath] = nil + else + local fileBreakInfo = breakInfo[data.serverPath] + if (not fileBreakInfo) then + fileBreakInfo = { + pathNames = splitFilePath(data.serverPath), + --命中次數判斷計數器 + hitCounts = {} + } + breakInfo[data.serverPath] = fileBreakInfo + end + local lineInfos = {} + for li, breakData in ipairs(data.breakDatas) do + lineInfos[breakData.line] = breakData + if (breakData.hitCondition and breakData.hitCondition ~= "") then + breakData.hitCondition = tonumber(breakData.hitCondition) + else + breakData.hitCondition = 0 + end + if (not fileBreakInfo.hitCounts[breakData.line]) then + fileBreakInfo.hitCounts[breakData.line] = 0 + end + end + fileBreakInfo.lines = lineInfos + --這裡添加命中次數判斷 + for line, count in pairs(fileBreakInfo.hitCounts) do + if (not lineInfos[line]) then + fileBreakInfo.hitCounts[line] = nil + end + end + end + local count = 0 + for i, linesInfo in pairs(breakInfo) do + count = count + 1 + end + if (count == 0) then + breakInfos[data.fileName] = nil + end + end + --debugger_dump(breakInfos, "breakInfos", 6) + --检查是否需要断点 + local isHook = false + for k, v in pairs(breakInfos) do + isHook = true + break + end + + --这样做的原因是为了最大限度的使手机调试更加流畅 注意这里会连续的进行n次 + if (isHook) then + if (not LuaDebugger.isHook) then + debug.sethook(debug_hook, "lrc") + end + LuaDebugger.isHook = true + else + if (LuaDebugger.isHook) then + debug.sethook() + end + LuaDebugger.isHook = false + end +end +local function debugger_checkFileIsBreak(fileName) + return LuaDebugger.breakInfos[fileName] +end +--=====================================断点信息 end ---------------------------------------------- +local controller_host = "192.168.1.102" +local controller_port = 7003 +debugger_sendMsg = function(serverSocket, eventName, data) + local sendMsg = { + event = eventName, + data = data + } + local sendStr = json.encode(sendMsg) + serverSocket:send(sendStr .. "__debugger_k0204__") +end +function debugger_conditionStr(condition, vars, callBack) + local function loadScript() + local currentTabble = {} + + local locals = vars[1].locals + local ups = vars[1].ups + if (ups) then + for k, v in pairs(ups) do + currentTabble[k] = v + end + end + + if (locals) then + for k, v in pairs(locals) do + currentTabble[k] = v + end + end + setmetatable(currentTabble, {__index = _G}) + local fun = loadstring("return " .. condition) + setfenv(fun, currentTabble) + return fun() + end + local status, + msg = + xpcall( + loadScript, + function(error) + print(error) + end + ) + if (status and msg) then + callBack() + end +end +--执行lua字符串 +debugger_exeLuaString = function() + + local function loadScript() + + local script = LuaDebugger.loadScriptBody.script + if (LuaDebugger.loadScriptBody.isBreak) then + local currentTabble = {_G = _G} + local frameId = LuaDebugger.loadScriptBody.frameId + frameId = frameId + local func = LuaDebugger.currentDebuggerData.funcs[frameId] + local vars = LuaDebugger.currentDebuggerData.vars[frameId] + local locals = vars.locals + local ups = vars.ups + for k, v in pairs(ups) do + currentTabble[k] = v + end + for k, v in pairs(locals) do + currentTabble[k] = v + end + setmetatable(currentTabble, {__index = _G}) + + local fun = loadstring(script) + setfenv(fun, currentTabble) + fun() + else + local fun = loadstring(script) + fun() + end + end + local status, + msg = + xpcall( + loadScript, + function(error) + + -- debugger_sendMsg(debug_server, LuaDebugger.event.C2S_LoadLuaScript, LuaDebugger.loadScriptBody) + end + ) + LuaDebugger.loadScriptBody.script = nil + if (LuaDebugger.loadScriptBody.isBreak) then + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint) + LuaDebugger.loadScriptBody.stack = LuaDebugger.currentDebuggerData.stack + end + LuaDebugger.loadScriptBody.complete = true + +end +--@region 调试中修改变量值 + + +--根据key 值在 value 查找 +local function debugger_getTablekey(key,keyType,value) + if(keyType == -1) then + return key + elseif(keyType == 1) then + return tonumber(key) + elseif(keyType == 2) then + local valueKey = nil + for k,v in pairs(value) do + local nameType = type(k) + if(nameType == "userdata" or nameType == "table") then + if (not LuaDebugger.isFoxGloryProject) then + valueKey = tostring(k) + if(key == valueKey) then + return k + end + break + end + end + end + + end +end + +local function debugger_setVarValue(server, data) + + local newValue = nil + local level = LuaDebugger.serVarLevel+LuaDebugger.setVarBody.frameId + local firstKeyName = data.keys[1] + --@region vars check + local localValueChangeIndex = -1 + local upValueChangeIndex = -1 + local upValueFun = nil + local oldValue = nil + local i = 1 + local locals = {} + -- get locals + while true do + local name, value = debug.getlocal(level, i) + if not name then + break + end + if(firstKeyName == name) then + localValueChangeIndex = i + oldValue = value + end + if (name ~= "(*temporary)") then + locals[name] = value + end + i = i + 1 + end + local func = getinfo(level, "f").func + i = 1 + local ups = {} + while func do -- check for func as it may be nil for tail calls + local name, value = debug.getupvalue(func, i) + + if not name then + break + end + if(localValueChangeIndex == -1 and firstKeyName == name) then + upValueFun = func + oldValue = value + upValueChangeIndex = i + end + if (name == "_ENV") then + ups["_ENV_"] = value + else + ups[name] = value + end + i = i + 1 + end +--@endregion + local vars = {locals = locals, ups = ups} + + local function loadScript() + local currentTabble = {} + local locals = vars.locals + local ups = vars.ups + if (ups) then + for k, v in pairs(ups) do + currentTabble[k] = v + end + end + + if (locals) then + for k, v in pairs(locals) do + currentTabble[k] = v + end + end + setmetatable(currentTabble, {__index = _G}) + local fun = loadstring("return " .. data.value) + setfenv(fun, currentTabble) + newValue = fun() + end + local status, + msg = + xpcall( + loadScript, + function(error) + print(error, "============================") + end + ) + + local i = 1 + + -- local 查找并替换 + local keyLength = #data.keys + + if(keyLength == 1) then + if(localValueChangeIndex ~= -1) then + + debug.setlocal(level, localValueChangeIndex, newValue) + elseif(upValueFun ~= nil) then + debug.setupvalue( upValueFun, upValueChangeIndex, newValue ) + else + --全局变量查找 + if(_G[firstKeyName]) then + _G[firstKeyName] = newValue + end + end + else + if(not oldValue) then + if(_G[firstKeyName]) then + oldValue = _G[firstKeyName] + end + end + local tempValue = oldValue + for i=2,keyLength-1 do + if(tempValue) then + oldValue = oldValue[debugger_getTablekey(data.keys[i],data.numberTypes[i],oldValue)] + end + end + if(tempValue) then + oldValue[debugger_getTablekey(data.keys[keyLength],data.numberTypes[keyLength],oldValue)] = newValue + end + end + local varInfo = debugger_setVarInfo(data.varName, newValue) + data.varInfo = varInfo + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + LuaDebugger.currentDebuggerData = debugger_stackInfo(LuaDebugger.serVarLevel, LuaDebugger.event.C2S_HITBreakPoint) + +end +--@endregion + + + + +--调试修改变量值统一的 _resume +checkSetVar = + function() + if (LuaDebugger.isSetVar) then + LuaDebugger.isSetVar = false + debugger_setVarValue(debug_server,LuaDebugger.setVarBody) + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + _resume(coro_debugger, LuaDebugger.setVarBody) + xpcall( + checkSetVar, + function(error) + print("设置变量", error) + end + ) + elseif(LuaDebugger.isLoadLuaScript) then + LuaDebugger.isLoadLuaScript = false + debugger_exeLuaString() + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + _resume(coro_debugger, LuaDebugger.reLoadFileBody) + xpcall( + checkSetVar, + function(error) + print("执行代码", error) + end + ) + elseif(LuaDebugger.isReLoadFile) then + LuaDebugger.isReLoadFile = false + LuaDebugger.reLoadFileBody.isReLoad = debugger_reLoadFile(LuaDebugger.reLoadFileBody) + print("重载结果:",LuaDebugger.reLoadFileBody.isReLoad) + LuaDebugger.reLoadFileBody.script = nil + LuaDebugger.serVarLevel = LuaDebugger.serVarLevel+1 + _resume(coro_debugger, LuaDebugger.reLoadFileBody) + xpcall( + checkSetVar, + function(error) + print("重新加载文件", error) + end + ) + end +end + + + +local function getSource(source) + source = string.lower(source) + if (LuaDebugger.pathCachePaths[source]) then + LuaDebugger.currentLineFile = LuaDebugger.pathCachePaths[source] + return LuaDebugger.pathCachePaths[source] + end + + local fullName, dir, fileName = debugger_getFilePathInfo(source) + LuaDebugger.currentLineFile = fullName + LuaDebugger.pathCachePaths[source] = fileName + + return fileName +end +local function debugger_GeVarInfoBytUserData(server, var) + local fileds = LuaDebugTool.getUserDataInfo(var) + + local varInfos = {} + + + --c# vars + for i = 1, fileds.Count do + local filed = fileds[i - 1] + local valueInfo = { + name = filed.name, + valueType = filed.valueType, + valueStr = ZZBase64.encode(filed.valueStr), + isValue = filed.isValue, + csharp = true + } + + table.insert(varInfos, valueInfo) + end + return varInfos +end + +local function debugger_getValueByScript(value, script) + local val = nil + local status, + msg = + xpcall( + function() + local fun = loadstring("return " .. script) + setfenv(fun, value) + val = fun() + end, + function(error) + print(error, "====>") + val = nil + end + ) + + return val +end +local function debugger_getVarByKeys(value, keys, index) + local str = "" + local keyLength = #keys + for i = index, keyLength do + local key = keys[i] + if (key == "[metatable]") then + else + if (i == index) then + if (string.find(key, "%.")) then + if (str == "") then + i = index + 1 + value = value[key] + end + if (i >= #keys) then + return index, value + end + + return debugger_getVarByKeys(value, keys, i) + else + str = key + end + else + if (string.find(key, "%[")) then + str = str .. key + elseif (type(key) == "string") then + if (string.find(key, "table:") or string.find(key, "userdata:") or string.find(key, "function:")) then + if (str ~= "") then + local vl = debugger_getValueByScript(value, str) + value = vl + if (value) then + for k, v in pairs(value) do + local ktype = type(k) + + if (ktype == "userdata" or ktype == "table" or ktype == "function") then + local keyName = debugger_valueToString(k) + if (keyName == key) then + value = v + break + end + end + end + end + str = "" + if (i == keyLength) then + return #keys, value + else + return debugger_getVarByKeys(value, keys, i + 1) + end + else + str = str .. '["' .. key .. '"]' + end + else + str = str .. '["' .. key .. '"]' + end + else + str = str .. "[" .. key .. "]" + end + end + end + end + + local v = debugger_getValueByScript(value, str) + + return #keys, v +end +--[[ + @desc: 查找c# 值 + author:k0204 + time:2018-04-07 21:32:31 + return +]] +local function debugger_getCSharpValue(value, searchIndex, keys) + local key = keys[searchIndex] + local val = LuaDebugTool.getCSharpValue(value, key) + if (val) then + --1最后一个 直接返回 + if (searchIndex == #keys) then + return #keys, val + else + --2再次获得 如果没有找到那么 进行lua 层面查找 + local vindex, val1 = debugger_getCSharpValue(val, searchIndex + 1, keys) + if (not val1) then + --组建新的keys + local tempKeys = {} + for i = vindex, #keys do + table.insert(tempKeys, keys[i]) + end + local vindx, val1 = debugger_searchVarByKeys(value, searckKeys, 1) + return vindx, val1 + else + return vindex, val1 + end + end + else + --3最终这里返回 所以2 中 没有当val1 不为空的处理 + return searchIndex, val + end +end +local function debugger_searchVarByKeys(value, keys, searckKeys) + local index, val = debugger_getVarByKeys(value, searckKeys, 1) + + if (not LuaDebugTool or not LuaDebugTool.getCSharpValue or type(LuaDebugTool.getCSharpValue) ~= "function") then + return index, val + end + if (val) then + if (index == #keys) then + return index, val + else + local searchStr = "" + --进行c# 值查找 + local keysLength = #keys + local searchIndex = index + 1 + local sindex, val = debugger_getCSharpValue(val, searchIndex, keys) + return sindex, val + end + else + --进行递减 + local tempKeys = {} + for i = 1, #searckKeys - 1 do + table.insert(tempKeys, keys[i]) + end + if (#tempKeys == 0) then + return #keys, nil + end + return debugger_searchVarByKeys(value, keys, tempKeys) + end +end +--[[ + @desc: 获取metatable 信息 + author:k0204 + time:2018-04-06 20:27:12 + return +]] +local function debugger_getmetatable(value, metatable, vinfos, server, variablesReference, debugSpeedIndex, metatables) + + for i, mtable in ipairs(metatables) do + if (metatable == mtable) then + return vinfos + end + end + table.insert(metatables, metatable) + for k, v in pairs(metatable) do + local val = nil + if (type(k) == "string") then + xpcall( + function() + val = value[k] + end, + function(error) + val = nil + end + ) + if (val == nil) then + xpcall( + function() + if (string.find(k, "__")) then + val = v + end + end, + function(error) + val = nil + end + ) + end + end + if (val) then + local vinfo = debugger_setVarInfo(k, val) + table.insert(vinfos, vinfo) + if (#vinfos > 10) then + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = vinfos, + isComplete = 0 + } + ) + vinfos = {} + end + end + end + + local m = getmetatable(metatable) + if (m) then + return debugger_getmetatable(value, m, vinfos, server, variablesReference, debugSpeedIndex, metatables) + else + return vinfos + end + +end +local function debugger_sendTableField(luatable, vinfos, server, variablesReference, debugSpeedIndex, valueType) + if (valueType == "userdata") then + if (tolua and tolua.getpeer) then + luatable = tolua.getpeer(luatable) + else + return vinfos + end + end + if (luatable == nil) then + return vinfos + end + for k, v in pairs(luatable) do + local vinfo = debugger_setVarInfo(k, v) + table.insert(vinfos, vinfo) + if (#vinfos > 10) then + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = vinfos, + isComplete = 0 + } + ) + vinfos = {} + end + end + + return vinfos +end +local function debugger_sendTableValues(value, server, variablesReference, debugSpeedIndex) + local vinfos = {} + local luatable = {} + local valueType = type(value) + local userDataInfos = {} + local m = nil + + if (valueType == "userdata") then + m = getmetatable(value) + + vinfos = debugger_sendTableField(value, vinfos, server, variablesReference, debugSpeedIndex, valueType) + + if (LuaDebugTool) then + local varInfos = debugger_GeVarInfoBytUserData(server, value, variablesReference, debugSpeedIndex) + + for i, v in ipairs(varInfos) do + if (v.valueType == "System.Byte[]" and value[v.name] and type(value[v.name]) == "string") then + local valueInfo = { + name = v.name, + valueType = "string", + valueStr = ZZBase64.encode(value[v.name]) + } + table.insert(vinfos, valueInfo) + else + table.insert(vinfos, v) + end + if (#vinfos > 10) then + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = vinfos, + isComplete = 0 + } + ) + vinfos = {} + end + end + + end + else + m = getmetatable(value) + vinfos = debugger_sendTableField(value, vinfos, server, variablesReference, debugSpeedIndex, valueType) + end + + if (m) then + vinfos = debugger_getmetatable(value, m, vinfos, server, variablesReference, debugSpeedIndex, {}) + end + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = vinfos, + isComplete = 1 + } + ) +end + +--获取lua 变量的方法 +local function debugger_getBreakVar(body, server) + local variablesReference = body.variablesReference + local debugSpeedIndex = body.debugSpeedIndex + local vinfos = {} + local function exe() + local frameId = body.frameId + local type_ = body.type + local keys = body.keys + --找到对应的var + local vars = nil + if (type_ == 1) then + vars = LuaDebugger.currentDebuggerData.vars[frameId + 1] + vars = vars.locals + elseif (type_ == 2) then + vars = LuaDebugger.currentDebuggerData.vars[frameId + 1] + vars = vars.ups + elseif (type_ == 3) then + vars = _G + end + if (#keys == 0) then + debugger_sendTableValues(vars, server, variablesReference, debugSpeedIndex) + return + end + local index, value = debugger_searchVarByKeys(vars, keys, keys) + if (value) then + local valueType = type(value) + if (valueType == "table" or valueType == "userdata") then + + debugger_sendTableValues(value, server, variablesReference, debugSpeedIndex) + else + if (valueType == "function") then + if(LuaDebugger.isFoxGloryProject) then + value = "function" + else + value = tostring(value) + end + end + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = ZZBase64.encode(value), + isComplete = 1, + varType = valueType + } + ) + end + else + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = {}, + isComplete = 1, + varType = "nil" + } + ) + end + end + xpcall( + exe, + function(error) + -- print("获取变量错误 错误消息-----------------") + -- print(error) + -- print(debug.traceback("", 2)) + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReqVar, + { + variablesReference = variablesReference, + debugSpeedIndex = debugSpeedIndex, + vars = { + { + name = "error", + valueType = "string", + valueStr = ZZBase64.encode("无法获取属性值:" .. error .. "->" .. debug.traceback("", 2)), + isValue = false + } + }, + isComplete = 1 + } + ) + end + ) +end +local function ResetDebugInfo() + LuaDebugger.Run = false + LuaDebugger.StepIn = false + LuaDebugger.StepNext = false + LuaDebugger.StepOut = false + +end +local function debugger_loop(server) + server = debug_server + --命令 + local command + local eval_env = {} + local arg + while true do + local line, status = server:receive() + if (status == "closed") then + if(LuaDebugger.isLaunch) then + os.exit() + else + debug.sethook() + coroutine.yield() + end + end + if (line) then + local netData = json.decode(line) + local event = netData.event + local body = netData.data + if (event == LuaDebugger.event.S2C_DebugClose) then + if(LuaDebugger.isLaunch) then + os.exit() + else + debug.sethook() + coroutine.yield() + end + + elseif event == LuaDebugger.event.S2C_SetBreakPoints then + --设置断点信息 + local function setB() + debugger_setBreak(body) + end + xpcall( + setB, + function(error) + print(error) + end + ) + elseif event == LuaDebugger.event.S2C_RUN then --开始运行 + LuaDebugger.runTimeType = body.runTimeType + LuaDebugger.isProntToConsole = body.isProntToConsole + LuaDebugger.isFoxGloryProject = body.isFoxGloryProject + LuaDebugger.isLaunch = body.isLaunch + ResetDebugInfo() + LuaDebugger.currentDebuggerData = nil + LuaDebugger.Run = true + LuaDebugger.tempRunFlag = true + LuaDebugger.currentLine= nil + local data = coroutine.yield() + LuaDebugger.serVarLevel = 4 + LuaDebugger.currentDebuggerData = data + debugger_sendMsg( + server, + data.event, + { + stack = data.stack + } + ) + elseif event == LuaDebugger.event.S2C_ReqVar then -- 获取变量信息 + --请求数据信息 + debugger_getBreakVar(body, server) + elseif event == LuaDebugger.event.S2C_NextRequest then -- 设置单步跳过 + ResetDebugInfo() + LuaDebugger.StepNext = true + --设置当前文件名和当前行数 + local data = coroutine.yield() + LuaDebugger.serVarLevel = 4 + --重置调试信息 + LuaDebugger.currentDebuggerData = data + debugger_sendMsg( + server, + data.event, + { + stack = data.stack + } + ) + elseif (event == LuaDebugger.event.S2C_StepInRequest) then --单步跳入 + --单步跳入 + ResetDebugInfo() + LuaDebugger.StepIn = true + + local data = coroutine.yield() + LuaDebugger.serVarLevel = 4 + --重置调试信息 + LuaDebugger.currentDebuggerData = data + debugger_sendMsg( + server, + data.event, + { + stack = data.stack, + eventType = data.eventType + } + ) + elseif (event == LuaDebugger.event.S2C_StepOutRequest) then + --单步跳出 + ResetDebugInfo() + LuaDebugger.StepOut = true + local data = coroutine.yield() + LuaDebugger.serVarLevel = 4 + --重置调试信息 + LuaDebugger.currentDebuggerData = data + debugger_sendMsg( + server, + data.event, + { + stack = data.stack, + eventType = data.eventType + } + ) + elseif event == LuaDebugger.event.S2C_LoadLuaScript then + LuaDebugger.loadScriptBody = body + LuaDebugger.isLoadLuaScript = true + local data = coroutine.yield() + debugger_sendMsg( + server, + LuaDebugger.event.C2S_LoadLuaScript, + LuaDebugger.loadScriptBody + ) + elseif event == LuaDebugger.event.S2C_SerVar then + LuaDebugger.isSetVar = true + LuaDebugger.setVarBody = body + local data = coroutine.yield() + debugger_sendMsg( + server, + LuaDebugger.event.C2S_SerVar, + { + stack = data, + eventType = data.eventType + } + ) + elseif event == LuaDebugger.event.S2C_ReLoadFile then + LuaDebugger.isReLoadFile = true + LuaDebugger.reLoadFileBody = body + local data = coroutine.yield() + debugger_sendMsg( + server, + LuaDebugger.event.C2S_ReLoadFile, + { + stack = data, + eventType = data.eventType + } + ) + end + end + end +end +coro_debugger = coroutine.create(debugger_loop) +debug_hook = function(event, line) + + if(not LuaDebugger.isHook) then + return + end + + if(LuaDebugger.Run) then + if(event == "line") then + local isCheck = false + for k, breakInfo in pairs(LuaDebugger.breakInfos) do + + for bk, linesInfo in pairs(breakInfo) do + + if(linesInfo.lines and linesInfo.lines[line]) then + isCheck = true + break + end + end + if(isCheck) then + break + end + end + + if(not isCheck) then + return + end + + end + end + + + local file = nil + if(event == "line") then + + local funs = nil + local funlength =0 + if(LuaDebugger.currentDebuggerData) then + funs = LuaDebugger.currentDebuggerData.funcs + funlength = #funs + end + local stepInfo = getinfo(2) + local tempFunc = stepInfo.func + local source = stepInfo.source + file = getSource(source); + if(source == "=[C]" or source:find(LuaDebugger.DebugLuaFie)) then return end + if(funlength > 0 and funs[1] == tempFunc and LuaDebugger.currentLine ~= line) then + LuaDebugger.runLineCount = LuaDebugger.runLineCount+1 + end + local breakInfo = LuaDebugger.breakInfos[file] + local breakData = nil + local ischeck = false + if(breakInfo) then + + for k, lineInfo in pairs(breakInfo) do + local lines = lineInfo.lines + if(lines and lines[line]) then + ischeck = true + break + end + end + end + local isHit = false + if(ischeck) then + + --并且在断点中 + local info = stepInfo + local source = string.lower( info.source ) + local fullName,dir,fileName = debugger_getFilePathInfo(source) + local hitPathNames = splitFilePath(fullName) + + local hitCounts = {} + local debugHitCounts = nil + for k, lineInfo in pairs(breakInfo) do + + local lines = lineInfo.lines + local pathNames = lineInfo.pathNames + debugHitCounts = lineInfo.hitCounts + if(lines and lines[line]) then + breakData = lines[line] + --判断路径 + hitCounts[k] = 0 + local hitPathNamesCount = #hitPathNames + local pathNamesCount = #pathNames + local checkCount = 0; + while(true) do + if (pathNames[pathNamesCount] ~= hitPathNames[hitPathNamesCount]) then + break + else + hitCounts[k] = hitCounts[k] + 1 + end + pathNamesCount = pathNamesCount - 1 + hitPathNamesCount = hitPathNamesCount - 1 + checkCount = checkCount+1 + if(pathNamesCount <= 0 or hitPathNamesCount <= 0) then + break + end + end + if(checkCount>0) then + break; + end + else + breakData = nil + end + end + if(breakData) then + local hitFieName = "" + local maxCount = 0 + for k, v in pairs(hitCounts) do + if(v > maxCount) then + maxCount = v + hitFieName = k; + end + end + local hitPathNamesLength = #hitPathNames + if (hitPathNamesLength == 1 or (hitPathNamesLength > 1 and maxCount > 1)) then + if(hitFieName ~= "") then + + local hitCount = breakData.hitCondition + local clientHitCount = debugHitCounts[breakData.line] + clientHitCount = clientHitCount + 1 + debugHitCounts[breakData.line] = clientHitCount + if(funs and funs[1] == tempFunc and LuaDebugger.runLineCount == 0) then + LuaDebugger.runLineCount = 0 + elseif(LuaDebugger.tempRunFlag and LuaDebugger.currentLine == line) then + LuaDebugger.runLineCount = 0 + LuaDebugger.tempRunFlag = nil + elseif(clientHitCount >= hitCount) then + isHit = true + end + + end + end + end + end + if(LuaDebugger.StepOut) then + if(funlength == 1) then + ResetDebugInfo(); + LuaDebugger.Run = true + return + else + if(funs[2] == tempFunc) then + local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse) + -- print("StepIn 挂起") + --挂起等待调试器作出反应 + _resume(coro_debugger, data) + checkSetVar() + return + end + end + end + + if(LuaDebugger.StepIn) then + if(funs[1] == tempFunc and LuaDebugger.runLineCount == 0) then + return + end + local data = debugger_stackInfo(3, LuaDebugger.event.C2S_StepInResponse) + -- print("StepIn 挂起") + --挂起等待调试器作出反应 + _resume(coro_debugger, data) + checkSetVar() + return + end + + if(LuaDebugger.StepNext ) then + local isNext = false + if(funs) then + for i,f in ipairs(funs) do + if(tempFunc == f) then + if(LuaDebugger.currentLine == line) then + return + end + isNext =true + break; + end + end + else + + isNext =true + end + if(isNext) then + local data = debugger_stackInfo(3, LuaDebugger.event.C2S_NextResponse) + LuaDebugger.runLineCount = 0 + LuaDebugger.currentLine = line + --挂起等待调试器作出反应 + _resume(coro_debugger, data) + checkSetVar() + return + end + end + + local sevent = nil + + + --断点判断 + if(isHit) then + + + LuaDebugger.runLineCount = 0 + LuaDebugger.currentLine = line + sevent = LuaDebugger.event.C2S_HITBreakPoint + --调用 coro_debugger 并传入 参数 + local data = debugger_stackInfo(3, sevent) + --挂起等待调试器作出反应 + if(breakData and breakData.condition) then + debugger_conditionStr(breakData.condition,data.vars,function() + _resume(coro_debugger, data) + checkSetVar() + end) + else + --挂起等待调试器作出反应 + _resume(coro_debugger, data) + checkSetVar() + end + end + end +end + + +local function debugger_xpcall() + --调用 coro_debugger 并传入 参数 + local data = debugger_stackInfo(4, LuaDebugger.event.C2S_HITBreakPoint) + if(data.stack and data.stack[1]) then + data.stack[1].isXpCall = true + end + --挂起等待调试器作出反应 + _resume(coro_debugger, data) + checkSetVar() +end +--调试开始 +local function start() + + local socket = createSocket() + print(controller_host) + print(controller_port) + + local fullName,dirName,fileName = debugger_getFilePathInfo(getinfo(1).source) + LuaDebugger.DebugLuaFie = fileName + local server = socket.connect(controller_host, controller_port) + debug_server = server; + if server then + --创建breakInfo socket + socket = createSocket() + breakInfoSocket = socket.connect(controller_host, controller_port) + if(breakInfoSocket) then + breakInfoSocket:settimeout(0) + debugger_sendMsg(breakInfoSocket, LuaDebugger.event.C2S_SetSocketName, { + name = "breakPointSocket" + }) + + + debugger_sendMsg(server, LuaDebugger.event.C2S_SetSocketName, { + name = "mainSocket", + version = LuaDebugger.version + + }) + xpcall(function() + sethook(debug_hook, "lrc") + end, function(error) + print("error:", error) + end) + if(not jit) then + if(_VERSION)then + print("当前lua版本为: ".._VERSION.." 请使用LuaDebug 进行调试!") + else + print("当前为lua版本,请使用LuaDebug 进行调试!") + end + + end + _resume(coro_debugger, server) + end + end +end +function StartDebug(host, port) + + + if(not host) then + print("error host nil") + end + if(not port) then + print("error prot nil") + end + if(type(host) ~= "string") then + print("error host not string") + end + if(type(port) ~= "number") then + print("error host not number") + end + controller_host = host + controller_port = port + xpcall(start, function(error) + -- body + print(error) + end) + return debugger_receiveDebugBreakInfo, debugger_xpcall +end + + + +--base64 + +local string = string + +ZZBase64.__code = { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', + 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', + 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', + }; +ZZBase64.__decode = {} +for k,v in pairs(ZZBase64.__code) do + ZZBase64.__decode[string.byte(v,1)] = k - 1 +end + +function ZZBase64.encode(text) + local len = string.len(text) + local left = len % 3 + len = len - left + local res = {} + local index = 1 + for i = 1, len, 3 do + local a = string.byte(text, i ) + local b = string.byte(text, i + 1) + local c = string.byte(text, i + 2) + -- num = a<<16 + b<<8 + c + local num = a * 65536 + b * 256 + c + for j = 1, 4 do + --tmp = num >> ((4 -j) * 6) + local tmp = math.floor(num / (2 ^ ((4-j) * 6))) + --curPos = tmp&0x3f + local curPos = tmp % 64 + 1 + res[index] = ZZBase64.__code[curPos] + index = index + 1 + end + end + + if left == 1 then + ZZBase64.__left1(res, index, text, len) + elseif left == 2 then + ZZBase64.__left2(res, index, text, len) + end + return table.concat(res) +end + +function ZZBase64.__left2(res, index, text, len) + local num1 = string.byte(text, len + 1) + num1 = num1 * 1024 --lshift 10 + local num2 = string.byte(text, len + 2) + num2 = num2 * 4 --lshift 2 + local num = num1 + num2 + + local tmp1 = math.floor(num / 4096) --rShift 12 + local curPos = tmp1 % 64 + 1 + res[index] = ZZBase64.__code[curPos] + + local tmp2 = math.floor(num / 64) + curPos = tmp2 % 64 + 1 + res[index + 1] = ZZBase64.__code[curPos] + + curPos = num % 64 + 1 + res[index + 2] = ZZBase64.__code[curPos] + + res[index + 3] = "=" +end + +function ZZBase64.__left1(res, index,text, len) + local num = string.byte(text, len + 1) + num = num * 16 + + local tmp = math.floor(num / 64) + local curPos = tmp % 64 + 1 + res[index ] = ZZBase64.__code[curPos] + + curPos = num % 64 + 1 + res[index + 1] = ZZBase64.__code[curPos] + + res[index + 2] = "=" + res[index + 3] = "=" +end + +function ZZBase64.decode(text) + local len = string.len(text) + local left = 0 + if string.sub(text, len - 1) == "==" then + left = 2 + len = len - 4 + elseif string.sub(text, len) == "=" then + left = 1 + len = len - 4 + end + + local res = {} + local index = 1 + local decode = ZZBase64.__decode + for i =1, len, 4 do + local a = decode[string.byte(text,i )] + local b = decode[string.byte(text,i + 1)] + local c = decode[string.byte(text,i + 2)] + local d = decode[string.byte(text,i + 3)] + + --num = a<<18 + b<<12 + c<<6 + d + local num = a * 262144 + b * 4096 + c * 64 + d + + local e = string.char(num % 256) + num = math.floor(num / 256) + local f = string.char(num % 256) + num = math.floor(num / 256) + res[index ] = string.char(num % 256) + res[index + 1] = f + res[index + 2] = e + index = index + 3 + end + + if left == 1 then + ZZBase64.__decodeLeft1(res, index, text, len) + elseif left == 2 then + ZZBase64.__decodeLeft2(res, index, text, len) + end + return table.concat(res) +end + +function ZZBase64.__decodeLeft1(res, index, text, len) + local decode = ZZBase64.__decode + local a = decode[string.byte(text, len + 1)] + local b = decode[string.byte(text, len + 2)] + local c = decode[string.byte(text, len + 3)] + local num = a * 4096 + b * 64 + c + + local num1 = math.floor(num / 1024) % 256 + local num2 = math.floor(num / 4) % 256 + res[index] = string.char(num1) + res[index + 1] = string.char(num2) +end + +function ZZBase64.__decodeLeft2(res, index, text, len) + local decode = ZZBase64.__decode + local a = decode[string.byte(text, len + 1)] + local b = decode[string.byte(text, len + 2)] + local num = a * 64 + b + num = math.floor(num / 16) + res[index] = string.char(num) +end + + + + +return StartDebug diff --git a/lua_probject/base_project/table/Table_Error_code.lua b/lua_probject/base_project/table/Table_Error_code.lua new file mode 100644 index 00000000..f136c44f --- /dev/null +++ b/lua_probject/base_project/table/Table_Error_code.lua @@ -0,0 +1,100 @@ +--- +-- 网络错误码常量 mapping lua class +-- @type Error_code +-- @field #number Id data id +-- @field #string note 参数 + +--- +-- 网络错误码常量 数据集合 +-- @type Table_Error_code_Map +-- @map <#number, #Error_code> + + +--- +-- 网络错误码常量 数据集合 +-- @field[parent = #global] TableData#Table_Error_code_Map Table_Error_code_Map +Table_Error_code_Map = { + [2]={id=2,note="登陆限制超时,请重新登陆"}, + [3]={id=3,note=""}, + [4]={id=4,note=""}, + [5]={id=5,note="玩法不可用"}, + [6]={id=6,note="游戏已停用"}, + [7]={id=7,note="钻石不足"}, + [8]={id=8,note="已经在公会中"}, + [9]={id=9,note="邀请码无效"}, + [10]={id=10,note="房间已满"}, + [11]={id=11,note="房间号不存在"}, + [12]={id=12,note="此邮件不存在"}, + [13]={id=13,note="邮件已经领取"}, + [14]={id=14,note="此任务不存在"}, + [15]={id=15,note="没有公会"}, + [16]={id=16,note="任务奖励已领取"}, + [18]={id=18,note="牛牛有玩家未重连成功"}, + [20]={id=20,note="排行&战绩数据获取失败"}, + [21]={id=21,note="排行数据获取失败"}, + [22]={id=22,note="战绩数据获取失败"}, + [26]={id=26,note="创建房间数达到上限"}, + [27]={id=27,note="正在游戏中,删除房间失败"}, + [28]={id=28,note="多次登录失败,禁止登录,请过段时间再次尝试"}, + [101]={id=101,note="请检查您的网络设置"}, + [102]={id=102,note="网络连接超时"}, + [500]={id=500,note="服务器内部错误"}, + [999]={id=999,note="未知错误"}, + [17]={id=17,note="奖券不足"}, + [53]={id=53,note="与桌上玩家IP相同,进入房间失败"}, + [54]={id=54,note="与桌上玩家距离过近,进入房间失败"}, + [55]={id=55,note="GPS未开启,进入房间失败"}, + [56]={id=56,note="不是大联盟"}, + [57]={id=57,note="大联盟不能退出"}, + [59]={id=59,note="无效的验证码"}, + [61]={id=61,note="手机号码已绑定玩家"}, + [80]={id=80,note="房间已删除"}, + [81]={id=81,note="是大联盟房间"}, + [83]={id=83,note="积分不足,无法坐下"}, + [1000]={id=1000,note="已申请加入"}, + [1001]={id=1001,note="成员已存在"}, + [1002]={id=1002,note="成员不存在"}, + [1003]={id=1003,note="成员存在上级合伙人"}, + [1004]={id=1004,note="玩法已满"}, + [1005]={id=1005,note="房间被删除"}, + [1007]={id=1007,note="玩法不存在"}, + [1008]={id=1008,note="不是管理员"}, + [1009]={id=1009,note="合伙人有成员"}, + [1010]={id=1010,note="目标是管理员"}, + [1011]={id=1011,note="目标是合伙人"}, + [1012]={id=1012,note="目标积分不足"}, + [1013]={id=1013,note="积分不足!"}, + [1014]={id=1014,note="没有权限"}, + [1015]={id=1015,note="积分不为0"}, + [1016]={id=1016,note="成员在房间内"}, + [1017]={id=1017,note="成员积分事件正在执行"}, + [1018]={id=1018,note="大联盟不存在"}, + [1019]={id=1019,note="大联盟已满"}, + [1020]={id=1020,note="大联盟还有房间"}, + [1021]={id=1021,note="大联盟禁止娱乐"}, + [1022]={id=1022,note="不是盟主"}, + [1023]={id=1023,note="目標玩家是合伙人"}, + [1024]={id=1024,note="目標玩家不是合伙人"}, + [1025]={id=1025,note="已被管理员禁止娱乐"}, + [1026]={id=1026,note="积分不足,无法进入房间"}, + [1027]={id=1027,note="只能创建一个大联盟"}, + [1028]={id=1028,note="大联盟玩法必须开启积分"}, + [1029]={id=1029,note="还存在该玩法的房间,操作失败"}, + [1030]={id=1030,note="不在此大联盟的房间中"}, + [1031]={id=1031,note="玩家关闭被邀请"}, + [1032]={id=1032,note="创建大联盟数达到上限"}, + [1033]={id=1033,note="大联盟人数已满"}, + [1034]={id=1034,note="玩家在游戏中,不能下分"}, + [1035]={id=1035,note="奖励池积分不足"}, + [1036]={id=1036,note=" 奖励池没提取"}, + [1037]={id=1037,note="禁止同桌"}, + [1038]={id=1038,note="玩法禁止娱乐"}, + [1039]={id=1039,note="大联盟已关闭申请"}, + [1040]={id=1040,note="大联盟已停止服务"}, + [1041]={id=1041,note="不能退出大联盟"}, + [1047]={id=1047,note="携带值超越上线, 请保存到保险箱里"}, + [1048]={id=1048,note="玩家携带值值超越上线, 请提醒保险箱里"}, + [10000]={id=10000,note="微信登录失败,请重新登录"}, + [10001]={id=10001,note="Error: capacity is full."}, + [10002]={id=10002,note="Error: The Queue is empty."} +} \ No newline at end of file diff --git a/lua_probject/extend_project/.vscode/settings.json b/lua_probject/extend_project/.vscode/settings.json new file mode 100644 index 00000000..0cce13b6 --- /dev/null +++ b/lua_probject/extend_project/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "editor.snippetSuggestions": "bottom" +} \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/100zhang/CS_Win_Type.lua b/lua_probject/extend_project/extend/majiang/100zhang/CS_Win_Type.lua new file mode 100644 index 00000000..5523c7c3 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/100zhang/CS_Win_Type.lua @@ -0,0 +1,36 @@ +local CS_Win_Type = { + "鸡胡", + "平胡", + "七小对", + "豪华七小对", + "双豪华七小对", + "三豪华七小对", + "清一色", + "碰碰胡", + "杠上开花", + "杠上炮", + "抢杠胡", + "混一色", + "十三幺", + "天胡", + "地胡", + "人胡", + "十八罗汉", + "小三元", + "大三元", + "小四喜", + "大四喜", + "幺九", + "四鬼胡牌", + "全风", + "全求人", + "清幺九", + "字一色", + "无鬼翻倍", + "流局翻倍", + "海底捞月", + "门清", + "大胡", +} +return CS_Win_Type + diff --git a/lua_probject/extend_project/extend/majiang/100zhang/CardCheck.lua b/lua_probject/extend_project/extend/majiang/100zhang/CardCheck.lua new file mode 100644 index 00000000..71dd7f8e --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/100zhang/CardCheck.lua @@ -0,0 +1,378 @@ +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + num = num == nil and 1 or num + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if(result ==num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local zhongid = 0 + + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + zhong_count = 0, + qidui = false, + hongzhong_count = 0, + qidui_pari_count = 0 +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + if (card == zhongid) then + self.zhong_count = self.zhong_count +1 + else + self.cardList[#self.cardList + 1] = card + end + end + table.sort(self.cardList) +end + +function M:tryShunzi(card) + if (card < 400 and card % 100 > 7) then + return false + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryKezi(card) + if (checkCardAndRomve(card, self.cardList, 3)) then + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (checkCardAndRomve(card, self.cardList, 2)) then + local cardGroup = {card,card} + self:push(cardGroup) + self.pair_count = 1 + return true + end + return false +end + + +function M:tryKezi1Zhong(card) + if (self.zhong_count >= 1 and checkCardAndRomve(card, self.cardList,2)) then + local cardGroup = {card,card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + return true + end + return false +end + +function M:tryKezi2Zhong(card) + if (self.zhong_count >= 2 and checkCardAndRomve(card, self.cardList,1)) then + local cardGroup = {card,zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + return true + end + return false +end + +function M:tryShunzi1Zhong(card) + if (card % 100 > 8) then + return false + end + + if (self.zhong_count < 1) then + return false + end + + if (checkCard(card + 1, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,card+1,zhongid} + self:push(cardGroup) + return true + end + + if (checkCard(card + 2, self.cardList) and ((card + 1) % 100 ~= 0)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 2, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,zhongid,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair1Zhong(card) + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 1) then + return false + end + removeCard(self.cardList, card, 1) + local cardGroup = {card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + self.pair_count = 1 + return true +end + +function M:tryPair2Zhong() + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 2) then + return false + end + local cardGroup = {zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + self.pair_count = 1 + return true +end + +function M:tryWin() + if (self.zhong_count == 4 and not self.eight_laizi) or (self.zhong_count == 8 and self.eight_laizi) then + return true + end + if (#self.cardList == 0 and self.pair_count == 1) then + return true + end + if (#self.cardList == 0 and self.pair_count == 0) then + return self:tryPair2Zhong() + end + + if (#self.cardList == 0) then + return false + end + + local activeCard = self.cardList[1] + if (self:tryPair(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + + if (self:tryKezi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi2Zhong(activeCard)) then + + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryPair1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + return false +end + +function M:checkQidui() + if (not self.qidui) then + return false + end + if ((#self.cardList + self.zhong_count) ~= 14) then + return false + end + local cardList = membe_clone(self.cardList) + self.qidui_pari_count = 0 + self.hongzhong_count = self.zhong_count + return self:isQdPari(cardList) +end + +function M:isQdPari(cardList) + if(self.qidui_pari_count == 7) then + return true + end + if (#cardList== 0) then + return true + end + local card = cardList[1] + if (cardNum(card, cardList) >= 2) then + removeCard(cardList, card, 2) + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + + if (self.hongzhong_count > 0) then + removeCard(cardList, card, 1) + self.hongzhong_count = self.hongzhong_count - 1 + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + return false +end + +local function init(self,cardInhand,addCard,isZhong,qidui,eightLaizi) + self.stack = {} + self.pair_count = 0 + self.cardList = membe_clone(cardInhand) + self.qidui = qidui + self.eight_laizi = eightLaizi + self.cardList[#self.cardList+1] = addCard + if (isZhong) then + self.zhong_count = cardNum(zhongid, self.cardList) + removeCard(self.cardList, zhongid, self.zhong_count) + end + table.sort(self.cardList) + --printlog("添加排序====>>>") + --pt(self.cardList) + return self:checkQidui() or self:tryWin() +end + +local specialCardList={400,403,406,409,412,415,418} +function M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + --printlog("isZhong",isZhong) + --printlog("qidui",qidui) + --printlog("eightLaizi",eightLaizi) + --pt(cardInhand) + local self = setmetatable({}, {__index = M}) + local tingList = {} + if not cardInhand or #cardInhand == 0 then + return tingList + end + for k=100,300,100 do + for i=1,9 do + local tem = k + i + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + --printlog("返回结果为===>>>",result) + if(result) then + tingList[#tingList + 1] = tem + end + end + end + + for j=1,#specialCardList do + local tem = specialCardList[j] + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + if(result) then + tingList[#tingList + 1] = tem + end + end + + return tingList +end + +function M.MuiltiplteCaculateTingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + zhongid=DataManager.CurrenRoom.laiziInfo[1] + local tempTingList2={} + local tempTingList1=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo[2] then + zhongid=DataManager.CurrenRoom.laiziInfo[2] + tempTingList2=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + zhongid=DataManager.CurrenRoom.laiziInfo[1] + end + local currentTingList={} + if #tempTingList1>0 and #tempTingList2>0 then + currentTingList=CombineDictionaryAndRemoveSomeItem(tempTingList1,tempTingList2) + elseif #tempTingList1>0 then + currentTingList=tempTingList1 + elseif #tempTingList2>0 then + currentTingList=tempTingList2 + end + + return currentTingList + + else + zhongid=0 + return M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + end + +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/100zhang/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/100zhang/EXClearingView.lua new file mode 100644 index 00000000..11ed6d81 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/100zhang/EXClearingView.lua @@ -0,0 +1,625 @@ +require("Game.View.ResultView") +local Hu_Type_Name = import(".CS_Win_Type") + +local EXClearingView = {} + +local M = EXClearingView + +function EXClearingView.new(blur_view) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self._full = true + ResultView.init(self, "ui://Main_Majiang/clearing") + + self._currenIndex = 0 + self._blur_view = blur_view + self._close_zone = false + self:InitMaPai() + + return self +end + +function M:InitMaPai() + self.maPaiCtr=self._view:GetController("mapai") + self.maPaiCtr.selectedIndex=0 + + self.maPaiList={} + + for i=1,8 do + local tempMP=self._view:GetChild("niao"..i) + table.insert(self.maPaiList,tempMP) + end + +end + + +function M:IsMapaiShow(niao,isShow) + if niao then + niao.visible=isShow + end +end + + +function M:SetMaPaiValue(niao,value) + if niao then + niao.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..value + end +end + +function M:SetMaPaiColor(niao,num) + niao:GetController("color").selectedIndex=num +end + +function M:HideAllMapai() + for i=1,#self.maPaiList do + self:IsMapaiShow(self.maPaiList[i],false) + self:SetMaPaiColor(self.maPaiList[i],0) + end +end + + + +function M:ShowSelectMaPai(niaoList) + if niaoList and #niaoList>0 then + self.maPaiCtr.selectedIndex=1 + self:HideAllMapai() + for i=1,#niaoList do + self:IsMapaiShow(self.maPaiList[i],true) + self:SetMaPaiValue(self.maPaiList[i],niaoList[i].card) + if niaoList[i].score>0 then + self:SetMaPaiColor(self.maPaiList[i],2) + end + end + else + self.maPaiCtr.selectedIndex=0 + end +end + + + +function M:CalculatePaixingInfo(result) + self.WinList={} + if result.info_list and #result.info_list>0 then + for i=1,#result.info_list do + if result.info_list[i].win_list and #result.info_list[i].win_list>0 then + table.insert(self.WinList,result.info_list[i].win_list) + end + end + end + + printlog("牌型列表====>>>") + pt(self.WinList) +end + + +function M:SetPaixingxiangqing(num) + for i=1,#self.PaiXingXiangQingCtrList do + if self.PaiXingXiangQingCtrList[i] then + self.PaiXingXiangQingCtrList[i].selectedIndex=num + end + end +end + + + +function M:InitData(over, room, result, total_result, callback) + self._callback = callback + local _overCtr = self._view:GetController("over") + local btn_confirm = self._view:GetChild("btn_confirm") + local btn_result = self._view:GetChild("btn_showResult") + local btn_close = self._view:GetChild("big_result"):GetChild("btn_close") + local _btnCtr = self._view:GetController("button") + local _sdkCtr = self._view:GetController("sdk") + local ctr_type = self._view:GetController("type") + self._view:GetChild("tex_roominfo").text = string.format("房号%s 局%s/%s %s", room.room_id, room.curren_round, room.room_config.round, os.date("%Y-%m-%d %H:%M:%S", os.time())) + self._view:GetChild("tex_gameinfo").text = string.gsub(room.room_config:GetDes2(), "\r", "") + + if result then + self:ShowSelectMaPai(result.niao) + self:CalculatePaixingInfo(result) + end + + + self.PaiXingXiangQingCtrList={} + + local paixingxiangqing=self._view:GetChild("btn_detal") + local fanhuipaixing=self._view:GetChild("btn_fanhuipaixing") + fanhuipaixing.visible=false + paixingxiangqing.visible=true + paixingxiangqing.onClick:Add(function() + paixingxiangqing.visible=false + fanhuipaixing.visible=true + self:SetPaixingxiangqing(1) + end) + fanhuipaixing.onClick:Add(function() + paixingxiangqing.visible=true + fanhuipaixing.visible=false + self:SetPaixingxiangqing(0) + end) + + + if over ~= 2 then + if result.liuju then + ctr_type.selectedIndex = 3 + else + local info_list = result.info_list + for i = 1, #info_list do + local is_win = info_list[i].is_win + if is_win then + if info_list[i].seat == room.self_player.seat then + ctr_type.selectedIndex = 1 + else + ctr_type.selectedIndex = 2 + end + end + end + end + if over == 0 then + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + btn_confirm.onClick:Add(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:DestroyWithCallback() + end) + self:AddClearItem(room, result.info_list, nil, over, result.niao, result.active_player) + elseif over == 1 then + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add(function() + self.maPaiCtr.selectedIndex=0 + _overCtr.selectedIndex = 1 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + if self._qsinfo_view then + self._qsinfo_view:Dispose() + end + end) + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + self:AddClearItem(room, result.info_list, total_result.info_list, over, result.niao, result.active_player) + end + else + _overCtr.selectedIndex = 1 + self.maPaiCtr.selectedIndex=0 + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + self:AddClearItem(room, nil, total_result.info_list, over) + end +end + +function M:AddClearItem(room, data, total_data,over, niao, active_player) + local n = over + 1 + local list_view1 = self._view:GetChild("player_list_1") + local list_view2 = self._view:GetChild("player_list_2") + if 0 == over or 1 == over then + table.sort(data, function(a,b) return a.seat < b.seat end) + list_view1:RemoveChildrenToPool() + for i=1,#data do + local item = list_view1:AddItemFromPool() + self:FillItemData(room, data[i], item, active_player, niao) + end + if #data == 3 then + list_view1.lineGap = 54 + elseif #data == 2 then + list_view1.lineGap = 108 + end + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end +end + +function M:FillItemData(room, data, item, active_player, niao) + local _gamectr = ControllerManager.GetController(GameController) + local p = room:GetPlayerBySeat(data["seat"]) + item:GetChild("playerName").text = p.self_user.nick_name + item:GetChild("lab_hp").text="抓马" + local user = room:GetPlayerBySeat(data["seat"]).self_user + local head = item:GetChild('head'):GetChild('n4') + ImageLoad.Load(user.head_url, head) + + -- 手牌 + local hand_cards = data["hand_card"] + table.sort( hand_cards, ViewUtil.HandCardSort) + local hand_list_view = item:GetChild("hand_card_list") + hand_list_view:RemoveChildrenToPool() + for i=1,#hand_cards do + local card = hand_list_view:AddItemFromPool() + card.icon = "ui://Main_Majiang/202_"..hand_cards[i] + end + hand_list_view.width = 52 * #hand_cards + + local fz_card = p.fz_list + local fz_card_list = item:GetChild("fz_card_list") + fz_card_list.width = 157 * #fz_card * 0.8 + fz_card_list:RemoveChildrenToPool() + for i=1,#fz_card do + if fz_card[i].type == FZType.Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j=1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + elseif fz_card[i].type == FZType.Gang or fz_card[i].type == FZType.Gang_An or fz_card[i].type == FZType.Gang_Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_4") + for j=1,4 do + local card = item:GetChild("card_" .. j) + if fz_card[i].type == FZType.Gang_An and j == 4 then + card.icon = "ui://Main_Majiang/202_00" + else + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + end + end + end + + local huadd = data["hu_score"] + local gangadd = data["gang_score"] + local birdadd = data["niao_score"] + local total = data["round_score"] + local geng_zhuan=data["geng_zhuan"] + local sp = " " + local str = "胡:"..huadd.."分" + str = str..sp.."杠:"..gangadd.."分" + str = str..sp.."中马:"..birdadd.."分" + + if data["mai_niao_score"] and data["mai_niao_score"]~=0 then + str = str..sp.."买马:"..data["mai_niao_score"].."分" + end + + if data["ma_geng_gong"] and data["ma_geng_gong"]~=0 then + str = str..sp.."马跟杠:"..data["ma_geng_gong"].."分" + end + + if geng_zhuan and geng_zhuan~=0 then + str = str..sp.."跟庄:"..geng_zhuan.."分" + end + + if data["repeat_win"] and data["repeat_win"]~=0 then + str = str..sp.."连庄x"..data["repeat_win"] + end + + + + + + item:GetChild("score1").text = str + -- local total_score = data["total_score"] + if total >= 0 then + item:GetChild("score2").text = "+"..total + item:GetChild("score2").grayed = false + else + item:GetChild("score2").text = total + item:GetChild("score2").grayed = true + end + + + --计算牌型 + local totalPeson=DataManager.CurrenRoom.room_config.people_num-1 + local win_list = data["win_list"] + local is_win = data["is_win"] or false + local str1="" + sp="、" + if is_win then + if win_list then + if DataManager.CurrenRoom.isZiMoHu then + str1="自摸" + else + str1="接炮" + end + for i=1,#win_list do + local huName=Hu_Type_Name[win_list[i].type] + if huName then + str1=str1..sp..huName.."x"..win_list[i].score + end + + end + str1=str1.." +"..huadd.."分" + end + + else + printlog("输家============") + if DataManager.CurrenRoom.isZiMoHu then + printlog("自摸处理============") + --str1="" + if #self.WinList==1 then + for i=1,#self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + if j==1 then + str1=str1..huName.."x"..self.WinList[i][j].score + else + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + + end + end + + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + else + printlog("非自摸处理====>>>") + --点炮 一炮多响 + local yipaoduoxiang=false + if #self.WinList>1 then + yipaoduoxiang=true + end + + if yipaoduoxiang then + printlog("一炮多响====>>>") + str="点炮" + local allTypeList={} + local isHas=false + for i=1,#self.WinList do + for j=1,#self.WinList[i] do + isHas=IsHasDictionary(self.WinList[i][j].type,allTypeList) + if isHas==false then + table.insert(allTypeList,self.WinList[i][j].type) + end + end + + end + + if #allTypeList>0 then + for i=1,#allTypeList do + local huName=Hu_Type_Name[allTypeList[i]] + if huName then + str1=str1..huName.."、" + end + end + str1=str1.." "..huadd.."分" + end + + else + + if p.self_user.account_id == active_player and is_win == false and not data["liuju"] then + str1="点炮" + if #self.WinList==1 then + for i=1,# self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + end + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + end + + end + + + end + end + + -- + printlog("牌型计算==>>>",str1) + + if data["ming_gang_num"]>0 then + str1=str1.." 明杠x"..data["ming_gang_num"] + end + + if data["an_gang_num"]>0 then + str1=str1.." 暗杠x"..data["an_gang_num"] + end + + if data["dian_gang_num"]>0 then + str1=str1.." 点杠x"..data["dian_gang_num"] + end + + if gangadd~=0 then + if gangadd>0 then + str1=str1.." +"..gangadd.."分" + else + str1=str1.." "..gangadd.."分" + end + + end + + if birdadd~=0 then + if birdadd>0 then + str1=str1.." 中马分数+"..birdadd.."分" + else + str1=str1.." 中马分数"..birdadd.."分" + end + + end + + + if data["mai_niao_score"] and data["mai_niao_score"]~=0 then + if data["mai_niao_score"]>0 then + str = str..sp.."买马/罚马分数:+"..data["mai_niao_score"].."分" + else + str = str..sp.."买马/罚马分数:"..data["mai_niao_score"].."分" + end + + end + + + if data["ma_geng_gong"] and data["ma_geng_gong"]~=0 then + if data["ma_geng_gong"]>0 then + str1 = str1.." 马跟杠:+"..data["ma_geng_gong"].."分" + else + str1 = str1.." 马跟杠:"..data["ma_geng_gong"].."分" + end + + end + + if geng_zhuan and geng_zhuan~=0 then + if geng_zhuan>0 then + str1 = str1.." 跟庄:+"..geng_zhuan.."分" + else + str1 = str1.." 跟庄:"..geng_zhuan.."分" + end + + end + + + + + + item:GetChild("score3").text=str1 + local paixingCtr=item:GetController("detail") + table.insert(self.PaiXingXiangQingCtrList,paixingCtr) + ------------------------- + + local hp_nonnegative = room:checkHpNonnegative() + item:GetController("nonnegative").selectedIndex = hp_nonnegative and 1 or 0 + if hp_nonnegative then + local hp_info = data.hp_info + local ctr_hp_limit = item:GetController("hp_limit") + local hp = d2ad(hp_info.round_actual_hp) + if hp >= 0 then hp = "+" .. tostring(hp) end + item:GetChild("tex_hp").text = hp + ctr_hp_limit.selectedIndex = hp_info.upper_limit and 1 or 0 + end + + + item:GetController("win").selectedIndex = is_win and 0 or 1 + if p.self_user.account_id == active_player and is_win == false and total < 0 then + item:GetController("win").selectedIndex = 2 + end + + if is_win then + item:GetController("bg").selectedIndex=1 + else + item:GetController("bg").selectedIndex=0 + end + local win_card = item:GetChild("win_card") + win_card.icon = "ui://Main_Majiang/202_"..data["win_card"] + + if niao and #niao>0 then + local currentNiaoList=self:CalculateNiao(niao ,data["seat"]) + if currentNiaoList and #currentNiaoList>0 then + local lst_niao = item:GetChild("list_niao") + lst_niao:RemoveChildrenToPool() + for i = 1, #currentNiaoList do + if currentNiaoList[i].score > 0 then + local card_niao = lst_niao:AddItemFromPool() + card_niao.icon = "ui://Main_Majiang/202_" .. currentNiaoList[i].card + end + end + end + end + + + if p.seat == room.banker_seat then + item:GetController("bank").selectedIndex = 1 + end +end + +function M:CalculateNiao(niaoList,seat) + local tempNiao={} + for i=1,#niaoList do + if niaoList[i].seat==seat then + table.insert(tempNiao,niaoList[i]) + end + end + return tempNiao +end + + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + player_list[i].id = user.account_id + player_list[i].hp_info = data[i].hp_info + player_list[i].score = data[i].total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + + local settle_log = data[i].settle_log + player_list[i].param = {} + player_list[i].param[1]={} + player_list[i].param[1].key = "自摸次数:" + player_list[i].param[1].value = tostring(data[i].settle_log.zimo) + player_list[i].param[2]={} + player_list[i].param[2].key = "接炮次数:" + player_list[i].param[2].value = tostring(data[i].settle_log.jie_pao) + player_list[i].param[3]={} + player_list[i].param[3].key = "点炮次数:" + player_list[i].param[3].value = tostring(data[i].settle_log.dian_pao) + player_list[i].param[4]={} + player_list[i].param[4].key = "暗杠次数:" + player_list[i].param[4].value = tostring(data[i].settle_log.an_kong) + player_list[i].param[5]={} + player_list[i].param[5].key = "明杠次数:" + player_list[i].param[5].value = tostring(data[i].settle_log.ming_kong) + end + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + local big_result = self._view:GetChild("big_result") + big_result:GetChild("txt_room_info").text = string.format("%s 房号%s 局%s/%s", os.date("%Y/%m/%d", os.time()), room.room_id, room.curren_round, room.room_config.round) + local lst_p = big_result:GetChild("player_list") + if #player_list == 3 then + lst_p.columnGap = 108 + elseif #player_list == 2 then + lst_p.columnGap = 208 + end + self:InitBigResult(room, 30) + local show_detail = room.hpOnOff == 1 + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + com_p:GetController("jsicon").selectedIndex=i-1 + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + if show_detail then + local score = 0 + if com_p:GetController("pn").selectedIndex == 0 then + score = com_p:GetChild("txt_navigate").text + else + score = com_p:GetChild("txt_positive").text + end + score = score / room.score_times + com_p:GetChild("tex_detail_score").text = string.format("%s × %s倍", score, room.score_times) + end + end + if room.group_id ~= 0 then + big_result:GetController("group").selectedIndex = 1 + end + DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild("btn_head") + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= "" then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end + +function M:DestroyWithCallback() + if self._callback then + self._callback() + end + self:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/100zhang/EXGameController.lua b/lua_probject/extend_project/extend/majiang/100zhang/EXGameController.lua new file mode 100644 index 00000000..d2ae2467 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/100zhang/EXGameController.lua @@ -0,0 +1,393 @@ +local TX_Protocol = import(".Protocol") +local FZTipList = require("main.majiang.FZData") +local TX_GameEvent = import(".GameEvent") + +local M = {} + +--- Create a new GameController +function M.new() + setmetatable(M,{__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("测试麻将") + self.class = "TX_GameController" + return self +end + +function M:init(name) + GameController.init(self,name) + + self._eventmap[TX_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[TX_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[TX_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[TX_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[TX_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[TX_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + self._eventmap[TX_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[TX_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[TX_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[TX_Protocol.GAME_EVT_RESULT2] = self.OnEventResult2 + self._eventmap[TX_Protocol.GAME_EVT_NIAO] = self.OnEventNiao + self._eventmap[TX_Protocol.GAME_EVT_PIAOTIP] = self.OnEventPiaoTip + self._eventmap[TX_Protocol.GAME_EVT_PIAO] = self.OnEventPiao +end + +local __pre_delete_card = false +-- 发送出牌指令到服务器 +function M:SendOutCard(card, callback) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_DIS_CARD, _data) + + -- 进行预删牌处理 + local p = _room.self_player + _room.curren_outcard_seat = -1 + list_remove(p.card_list,card) + table.sort(p.card_list, ViewUtil.HandCardSort) + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + __pre_delete_card = true + callback() +end + + +-- 发送放子选择到服务器 +function M:SendAction(id) + local _data = {} + _data["id"] = id + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_ACTION, _data) +end + +function M:OnEventSendCards(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + if not _room.room_config.piao_niao or _room.self_player.entrust then + _room.curren_round = _room.curren_round + 1 + end + if _room.curren_round > 0 then _room.playing = true end + + printlog("开始发牌===========>>>") + pt(evt_data) + + local room = DataManager.CurrenRoom + --printlog(evt_data.laiziCard) + --printlog(evt_data.laiziCard2) + --printlog(evt_data.laiziCardBefore) + --printlog(evt_data.laiziCard2Before) + + room.laiziInfo={} + if evt_data.laiziCardBefore>0 then + table.insert(room.laiziInfo,evt_data.laiziCard) + if evt_data.laiziCard2>0 then + table.insert(room.laiziInfo,evt_data.laiziCard2) + end + else + room.laiziInfo=nil + end + + if evt_data.laiziCardBefore>0 then + DispatchEvent(self._dispatcher,TX_GameEvent.SendLaiZi,evt_data.laiziCardBefore,evt_data.laiziCard,evt_data.laiziCard2,true ) + end + + + + + -- _room.SelfPlayer.AutoOutCard = false + local handcards = evt_data["card_list"] + local p = _room.self_player + local seat = evt_data["bank_seat"] + self._cacheEvent:Enqueue(function() + _room.banker_seat = seat + for i=1,#_room.player_list do + _room.player_list[i].hand_left_count = 13 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + end + p.card_list = handcards + self._room.self_player.hand_left_count = #handcards + table.sort( handcards, ViewUtil.HandCardSort ) + DispatchEvent(self._dispatcher,TX_GameEvent.SendCards, p) + end) +end + +function M:OnEventOutCard(evt_data) + printlog("出牌事件===========>>>") + pt(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local ting_list = nil + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + _room.last_outcard_seat = seat + if seat == _room.self_player.seat and __pre_delete_card then + __pre_delete_card = false + else + if seat == _room.self_player.seat then + list_remove(p.card_list, card) + table.sort(p.card_list, ViewUtil.HandCardSort) + end + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + DispatchEvent(self._dispatcher,TX_GameEvent.OutCard, p, card) + end + end) +end + + +function M:OnEventTakeCard(evt_data) + printlog("抓牌===========>>>") + pt(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + p.hand_left_count = p.hand_left_count +1 + if (seat == _room.self_player.seat) then + _room.self_player.card_list[#_room.self_player.card_list+1] = card + -- table.sort( _room.self_player.card_list, ViewUtil.HandCardSort ) + end + DispatchEvent(self._dispatcher,TX_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnEventOutHint(evt_data) + printlog("出牌提示事件===========>>>") + pt(evt_data) + self._cacheEvent:Enqueue(function() + self._room.curren_outcard_seat = self._room.self_player.seat + DispatchEvent(self._dispatcher,TX_GameEvent.OutHint) + end) +end + +function M:OnEventTurn(evt_data) + printlog("转轮指向===========>>>") + pt(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + -- self._room.curren_outcard_seat = seat + DispatchEvent(self._dispatcher,TX_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + printlog("放子提示事件===========>>>") + pt(evt_data) + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + local weight = evt_data["weight"] + for i=1,#list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + -- if (dtip["opcard"]) then + -- local opcard = dtip["opcard"] + -- tip.OpCard = opcard + -- tip.OpCard[3] = tip.Card + -- table.sort(tip.OpCard) + -- end + tiplist:AddTip(tip) + end + DispatchEvent(self._dispatcher,TX_GameEvent.FZTips, tiplist, weight) + end) +end + +function M:OnEventFzAction(evt_data) + printlog("吃杠碰行为事件===========>>>") + pt(evt_data) + local _room = self._room + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local type = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + -- local openkong = evt_data["openkong"] + + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local fz = nil + local index = -1 + local ftype = type + if (ftype == FZType.Gang_Peng) then + for i=1,#p.fz_list do + if (p.fz_list[i].card == card) then + p.fz_list[i].card = card + fz = p.fz_list[i] + fz.type = type + index = i -1 + break + end + end + end + if (index == -1) then + fz = {} + fz.card = card + fz.type = type + fz.active_card = actice_card + p.fz_list[#p.fz_list+1] = fz + end + fz.from_seat = from_seat + local remove_num = #opcard + + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(p.card_list,opcard[i]) + end + end + + p.hand_left_count = p.hand_left_count - remove_num + if from_seat ~= p.seat then + -- if (fz.Type == FZType.Chi) then card = actice_card end + local fp = _room:GetPlayerBySeat(from_seat) + table.remove(fp.outcard_list,#fp.outcard_list) + end + + DispatchEvent(self._dispatcher,TX_GameEvent.FangziAction, fz, p, index) + end) +end + +function M:OnEventHu(evt_data) + printlog("胡牌===========>>>") + pt(evt_data) + + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local win_card = evt_data["win_card"] + local win_list = evt_data["win_list"] + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + table.sort( win_p.card_list, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher,TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], win_card, cards, win_list) + end) + + --[[local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local hu_card = evt_data["win_card"] + table.sort(cards, ViewUtil.HandCardSort) + cards[#cards +1] = hu_card + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + DispatchEvent(self._dispatcher,TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], cards, hu_card) + end)--]] +end + +function M:OneventResult1(evt_data) + printlog("小结算===========>>>") + pt(evt_data) + local over = evt_data.type + --0:小结算 1:小大结算 2:大结算 + self._room._reload_flag = false + self._room.playing = false + if 0 == over then + local result = evt_data.result + self._cacheEvent:Enqueue(function() + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil,true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +-- function M:OnEventResult2(evt_data) +-- DataManager.CurrenRoom.Over = true +-- ControllerManager.SetGameNetClient(nil,true) + -- local info_list = evt_data["info_list"] + -- if self._result ~= nil then + -- self._cacheEvent:Enqueue(function() + -- self:OneventResult1(self._result) + -- self._result = nil + -- end) + -- end +-- self._cacheEvent:Enqueue(function() +-- DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, info_list) +-- ControllerManager.ChangeController(LoddyController) +-- end) +-- end + +function M:OnEventNiao(evt_data) + local list = evt_data["niao"] + local start_seat = evt_data["start_seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EventNiao, list, start_seat) + end) +end + +function M:OnEventPiaoTip() + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + self._cacheEvent:Enqueue(function() + if not self._room._reload_flag then + self._room.curren_round = self._room.curren_round + 1 + end + self._room.playing = true + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiaoTip, evt_data) + end) +end + +function M:OnEventPiao(evt_data) + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiao, evt_data.seat, evt_data.num) + end) +end + +function M:GetPosString( seat ) + if DataManager.CurrenRoom.room_config.people_num ~= 4 then return"" end + if seat == 1 then + return "北" + elseif seat == 2 then + return "西" + elseif seat == 3 then + return "南" + elseif seat == 4 then + return "东" + end +end + +function M:Discard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + -- list_remove(_room.SelfPlayer.Cards,card) + -- table.sort(_room.SelfPlayer.Cards) + _client:send(Protocol.Game_Da, _data) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/100zhang/EXGameInfo.lua b/lua_probject/extend_project/extend/majiang/100zhang/EXGameInfo.lua new file mode 100644 index 00000000..9d82bf67 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/100zhang/EXGameInfo.lua @@ -0,0 +1,198 @@ +local EXGameInfo = {} + +local M = EXGameInfo + + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/majiang/100zhang/ui/Info_MJ_100Zhang") + return self +end + +function M:FillData() + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 3 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_100Zhang/Cgm_create_room") +end + +local _help_url= "ui://Info_MJ_100Zhang/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_MJ_100Zhang/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_MJ_100Zhang/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list ={} --{"四人100张","三人100张","二人100张"} +function M:GetPlayList() + return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + 1 + local people =_config:GetController("play_list").selectedIndex+2 + + local laizi=_config:GetController("GuiType").selectedIndex + local wuguijiabei=false + if laizi>0 then + wuguijiabei=_config:GetChild("btn_wuguijiabei").selected and true or false + end + + local zhama=_config:GetController("zhama").selectedIndex + local niao=0 + local niao_opt=0 + local magengdifen=false + local magenggang=false + if zhama>0 and zhama<4 then + niao=1 + niao_opt=zhama + magengdifen=_config:GetChild("btn_magengdifen").selected and true or false + magenggang=_config:GetChild("btn_magenggang").selected and true or false + liugoumapai=_config:GetChild("btn_liugoumapai").selected and true or false + elseif zhama==4 then + niao=3 + --local baozhama=_config:GetController("baozhama").selectedIndex + niao_opt=0 + end + + + local qidui=_config:GetChild("btn_qidui").selected and true or false + local qidui_4bei=false + if qidui then + qidui_4bei=_config:GetChild("btn_qiduijiabei").selected and true or false + end + + local geng_zhuan=_config:GetChild("btn_gengzhuang").selected and true or false + local gangbaoquanbao=_config:GetChild("btn_gangbaoqb").selected and true or false + local yao_jiu=_config:GetChild("btn_yaojiu").selected and true or false + local han19=_config:GetChild("btn_hanshijiu").selected and true or false + local pengpenghu=_config:GetChild("btn_pengpenghu").selected and true or false + local hunyise=_config:GetChild("btn_hunyise").selected and true or false + local qingyise=_config:GetChild("btn_qingyise").selected and true or false + local laizi4_hu=_config:GetChild("btn_siguihupai").selected and true or false + local laizi4_hu_2bei=_config:GetChild("btn_fanbei").selected and true or false + local shishanyao=_config:GetChild("btn_shisanyao").selected and true or false + local twelve_zhang_luodi_quanbao=_config:GetChild("btn_shierzhang").selected and true or false + local huangzhuang_huanggang=_config:GetChild("btn_huangzhuanghuanggang").selected and true or false + local liuju_2bei=_config:GetChild("btn_liujufanbei").selected and true or false + local qiangganghu=_config:GetChild("btn_qiangkanghu").selected and true or false + local minggangkeqiang=false + local qianggangquanbao=false + if qiangganghu then + minggangkeqiang=_config:GetChild("btn_minggangqiang").selected and true or false + qianggangquanbao=_config:GetChild("btn_qianggangqb").selected and true or false + end + local quan_feng=_config:GetChild("btn_quanfeng").selected and true or false + + + ------ + local _data = {} + _data["opt"] = round + _data["maxPlayers"] = people + + _data["laizi"] = laizi + _data["wuguijiabei"] = wuguijiabei + + _data["niao"] = niao + _data["niao_opt"] = niao_opt + _data["ma_gen_di_fen"] = magengdifen + _data["ma_gen_gong"] = magenggang + _data["liu_gou_ma"] = liugoumapai + + _data["qidui"] = qidui + _data["qidui_4bei"] = qidui_4bei + _data["geng_zhuan"] = geng_zhuan + _data["gangbao_type"] = gangbaoquanbao + _data["yao_jiu"] = yao_jiu + _data["han19"] = han19 + _data["pengpenghu"] = pengpenghu + _data["hunyise"] = hunyise + _data["qingyise"] = qingyise + _data["laizi4_hu"] = laizi4_hu + _data["laizi4_hu_2bei"] = laizi4_hu_2bei + _data["shishanyao"] = shishanyao + _data["twelve_zhang_luodi_quanbao"] = twelve_zhang_luodi_quanbao + _data["huangzhuang_huanggang"] = huangzhuang_huanggang + _data["liuju_2bei"] = liuju_2bei + _data["qiangkong"] = qiangganghu + _data["qiangkong_ming"] = minggangkeqiang + _data["qianggang_type"] = qianggangquanbao + _data["quan_feng"] = quan_feng + + --printlog("上传房间配置==========>>>") + --pt(_data) + + return _data +end + +function M:LoadConfigData(data) + --printlog("加载房间配置=========>>>") + --pt(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt-1 + _config:GetController("play_list").selectedIndex =data.maxPlayers-2 + + _config:GetController("GuiType").selectedIndex = data.laizi + _config:GetChild("btn_wuguijiabei").selected =data.wuguijiabei + + _config:GetChild("btn_magengdifen").selected = false + _config:GetChild("btn_magenggang").selected = false + + local GuiTypeValue=0 + if data.niao ==0 then + GuiTypeValue=0 + elseif data.niao ==1 then + GuiTypeValue=data.niao_opt + _config:GetChild("btn_magengdifen").selected = data.ma_gen_di_fen + _config:GetChild("btn_magenggang").selected = data.ma_gen_gong + elseif data.niao ==3 then + GuiTypeValue=4 + --_config:GetController("baozhama").selectedIndex = data.niao_opt + end + + _config:GetController("zhama").selectedIndex = GuiTypeValue + + _config:GetChild("btn_qidui").selected =data.qidui + _config:GetChild("btn_qiduijiabei").selected=data.qidui_4bei + + _config:GetChild("btn_gengzhuang").selected =data.geng_zhuan + _config:GetChild("btn_gangbaoqb").selected =data.gangbao_type + _config:GetChild("btn_yaojiu").selected =data.yao_jiu + _config:GetChild("btn_hanshijiu").selected =data.han19 + _config:GetChild("btn_pengpenghu").selected =data.pengpenghu + _config:GetChild("btn_hunyise").selected =data.hunyise + _config:GetChild("btn_qingyise").selected =data.qingyise + _config:GetChild("btn_siguihupai").selected =data.laizi4_hu + _config:GetChild("btn_fanbei").selected =data.laizi4_hu_2bei + _config:GetChild("btn_shisanyao").selected =data.shishanyao + _config:GetChild("btn_shierzhang").selected =data.twelve_zhang_luodi_quanbao + _config:GetChild("btn_huangzhuanghuanggang").selected =data.huangzhuang_huanggang + _config:GetChild("btn_liujufanbei").selected =data.liuju_2bei + _config:GetChild("btn_qiangkanghu").selected =data.qiangkong + + _config:GetChild("btn_minggangqiang").selected =data.qiangkong_ming + _config:GetChild("btn_qianggangqb").selected =data.qianggang_type + + _config:GetChild("btn_quanfeng").selected =data.quan_feng + _config:GetChild("btn_liugoumapai").selected=data.liu_gou_ma + + + + end + + + + + +return M + \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/100zhang/EXMainView.lua b/lua_probject/extend_project/extend/majiang/100zhang/EXMainView.lua new file mode 100644 index 00000000..55aee9c1 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/100zhang/EXMainView.lua @@ -0,0 +1,778 @@ +local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local MJMainView = require("main.majiang.MJMainView") +local EXClearingView = import(".EXClearingView") +local TX_GameEvent = import(".GameEvent") +local HuTipView = import("main.majiang.HuTipView") +local SettingView = import("main.majiang.MJSettingViewNew") +local PlayerInfoView = import(".EXPlayerInfoView") +local M = {} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M,{__index = MJMainView}) + local self = setmetatable({}, {__index = M}) + self.class = "MainView" + self.asset_group = "100Zhang_MJ" + self:init() + ViewUtil.PlayMuisc(self.asset_group, "extend/majiang/100zhang/sound/bg.mp3") + return self +end + +function M:InitView(url) + local room = self._room + self._style = 1 + self._gps_style = 1 + self._full = true + UIPackage.AddPackage("extend/majiang/100zhang/ui/Extend_MJ_100Zhang") + MJMainView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num .. "_s2") + self._hu_tip = HuTipView.new(self) + + self._view:GetChild('wanfa_text').text =room.room_config.people_num .. '人100张 ' .. room.score_times .. '倍' + + self.LaiziBG=self._view:GetChild('n103') + self.LaiziBG.text="鬼牌" + self.LaiziBG.visible=false + self.selectLaiziBtn=self._view:GetChild('selectlaizi') + self.Laizi1Btn=self._view:GetChild('selectlaizi1') + self.Laizi2Btn=self._view:GetChild('selectlaizi2') + self.Laizi1Btn.visible=false + self.Laizi2Btn.visible=false + self.selectLaiziBtn.visible=false + self:SetReconnentLaiziTips() + + self:PlayerChangeLineState() + + if room.playing or room.curren_round > 0 then + self:ReloadRoom() + end +end + + + +function M:SetReconnentLaiziTips() + local room=DataManager.CurrenRoom + if room.beforelaiziCardId and room.beforelaiziCardId>0 then + self:SetShowLaiZiProcess(room.beforelaiziCardId,room.laiziInfo[1],room.laiziInfo[2],false) + end +end + + +function M:SetLaiZiCard(btn,cardId) + btn.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..cardId +end + + +function M:IsShowLaiZi(btn,isShow) + btn.visible=isShow +end + + +function M:HideAllLaiZiCard() + self.Laizi1Btn.visible=false + self.Laizi2Btn.visible=false + self.selectLaiziBtn.visible=false + self.LaiziBG.visible=false +end + +function M:SetShowLaiZiProcess(beforeLaiziID,currentLaizi1ID,currentLaizi2ID,isShowAnim) + --zhongid=currentLaizi1ID + if isShowAnim==nil then isShowAnim=false end + + printlog("当前赋值结果为====>>>") + --print(beforeLaiziID) + --print(currentLaizi1ID) + --print(currentLaizi2ID) + self:HideAllLaiZiCard() + self:SetLaiZiCard(self.selectLaiziBtn,beforeLaiziID) + self:SetLaiZiCard(self.Laizi1Btn,currentLaizi1ID) + if currentLaizi2ID then + self:SetLaiZiCard(self.Laizi2Btn,currentLaizi2ID) + end + + + if isShowAnim==true then + self:IsShowLaiZi(self.selectLaiziBtn,true) + coroutine.start( + function() + coroutine.wait(1) + self:HideAllLaiZiCard() + self.LaiziBG.visible=true + self:IsShowLaiZi(self.Laizi1Btn,true) + if currentLaizi2ID then + self:IsShowLaiZi(self.Laizi2Btn,true) + end + + end + ) + else + self.LaiziBG.visible=true + self:IsShowLaiZi(self.Laizi1Btn,true) + if currentLaizi2ID then + self:IsShowLaiZi(self.Laizi2Btn,true) + end + end + self.LaiziBG.visible=true +end + + +function M:UpdateRound() + self._view:GetChild("tex_round1").text = self._room.curren_round + self._view:GetChild("tex_round2").text = self._room.room_config.round +end + +function M:InitPlayerInfoView() + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem,self) + tem.visible = false + end +end + +function M:NewMJPlayerCardInfoView(view,index) + if index == 1 then + return MJPlayerSelfCardInfoView.new(view,self) + end + return MJPlayerCardInfoView.new(view,self) +end + +function M:EventInit() + -- UIPackage.AddPackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong") + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _gcm_outcard_url = UIPackage.GetItemURL("Main_Majiang", "Gcm_OutCard") + local _player_info = self._player_info + local _gamectr = self._gamectr + + + + _gamectr:AddEventListener(TX_GameEvent.SendLaiZi, function(...) + local arg = {...} + self:SetShowLaiZiProcess(arg[1],arg[2],arg[3],arg[4]) + end) + + + + + _gamectr:AddEventListener(TX_GameEvent.SendCards,function( ... ) + -- self:ShowHuTip() + self:UpdateRound() + self._state.selectedIndex = 1 + local list = _room.player_list + for i=1,#list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateHandCard() + end + end) + _gamectr:AddEventListener(TX_GameEvent.EventTurn, function(...) + local arg = {...} + self._left_time = 15 + local seat = arg[1] + self:UpdateCardBox(self:GetPos(seat)) + -- if seat == self._room.self_player.seat then + -- self:ShowHuTip() + -- end + end) + + _gamectr:AddEventListener(TX_GameEvent.OutHint, function(...) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:UpdateHandCard(true) + end) + + local _gcm_outcard_url ="ui://Main_Majiang/Gcm_OutCard" + _gamectr:AddEventListener(TX_GameEvent.OutCard, function(...) + self:__CloseTip() + self._left_time = 0 + local arg = {...} + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:RemoveCursor() + info:UpdateHandCard() + local outcard = UIPackage.CreateObjectFromURL(_gcm_outcard_url) + info:UpdateOutCardList(outcard, card, self._cursor) + self:PlaySound("100Zhang_MJ", p.self_user.sex, tostring(card)) + self:PlayMJSound("chupai.mp3") + if seat == _room.self_player.seat then + _room.curren_outcard_seat = -1 + end + end) + _gamectr:AddEventListener(TX_GameEvent.GetCard, function(...) + self:__CloseTip() + local arg = {...} + local seat = arg[1] + local card = arg[2] + -- self._tex_leftTime.text = arg[3] + self._tex_LeftCard.text = arg[3] + -- self:UpdateRoomInfo() + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateHandCard(true) + end) + + _gamectr:AddEventListener(TX_GameEvent.FZTips, function(...) + local arg = {...} + local _tip = arg[1] + local weight = arg[2] + self:__FangziTip(_tip, weight) + end) + + _gamectr:AddEventListener(TX_GameEvent.FangziAction, handler(self,self.OnFangziAction)) + + _gamectr:AddEventListener(TX_GameEvent.ZPHuCard, function(...) + self._left_time = 0 + self:UpdateCardBox(0) + self:__CloseTip() + self._popEvent = false + local arg = {...} + local win_seat = arg[1] + local lose_seat = arg[2] + local win_card = arg[3] + local cards = arg[4] + local win_list = arg[5] + local index = self:GetPos(win_seat) + local info = self._player_card_info[index] + self:RemoveCursor() + info:UpdateHandCard(true, true) + + local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card") + obj_win_card.icon = "ui://Main_Majiang/202_" .. win_card + obj_win_card:GetController("bg").selectedIndex = 1 + info._view:AddChild(obj_win_card) + obj_win_card:Center() + + local url, pNode + local player = _room:GetPlayerBySeat(win_seat) + if win_seat ~= _room.self_player.seat then + url = "ui://Main_Majiang/别人胡" + pNode = info._mask_liangpai + elseif win_seat == _room.self_player.seat then + url = "ui://Main_Majiang/自己胡牌" + pNode = self._view + end + if win_seat == lose_seat then + url = "ui://Main_Majiang/eff_zimo" + end + + local he = UIPackage.CreateObjectFromURL(url) + pNode:AddChild(he) + he:GetTransition("t2"):Play() + he:Center() + if _room.room_config.people_num==2 then + if win_seat ~= _room.self_player.seat then + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + end + + if win_seat == _room.self_player.seat then + printlog("自己位置=====") + he:Center() + elseif url == "ui://Main_Majiang/eff_zimo" then + printlog("自摸地址==========") + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + + + + --- + local isZiMo=win_seat==lose_seat + DataManager.CurrenRoom.isZiMoHu=isZiMo + local hu_sound = isZiMo and ("zimo"..math.random(1, 3)) or ("hu"..math.random(1, 2)) + printlog("声音====>>>",hu_sound) + self:PlaySound("100Zhang_MJ",player.self_user.sex, hu_sound) + + local pNode = info._view + local url = "eff_list1" + local he_list = UIPackage.CreateObjectFromURL("ui://Extend_MJ_100Zhang/" .. url) + he_list.touchable = false + pNode:AddChild(he_list) + he_list:Center() + + coroutine.start(function() + for i = 1 ,#win_list do + local tem = win_list[i] + if tem.type>0 and tem.type<32 then + local com_name = "he" .. tem.type + local item = he_list:GetChild("list"):AddItemFromPool("ui://Extend_MJ_100Zhang/" .. com_name) + coroutine.wait(0.3) + end + + end + + coroutine.wait(2) + obj_win_card:Dispose() + he:Dispose() + he_list:Dispose() + self._popEvent = true + end) + + end) + + _gamectr:AddEventListener(TX_GameEvent.EventNiao, function(...) + local arg = {...} + self._popEvent = false + local list = arg[1] + local start_seat = arg[2] + --ViewUtil.PlaySound("100Zhang_MJ", "extend/majiang/100zhang/sound/zhuaniao.mp3") + coroutine.start(self.RunNiao,self,list, start_seat) + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult1, function(...) + self._popEvent = false + self:__CloseTip() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = {...} + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local niao = result.niao + if liuju then + local le = UIPackage.CreateObjectFromURL("ui://Main_Majiang/LiuJu") + self._view:AddChild(le) + le:Center() + le:GetTransition("t0"):Play() + coroutine.start(function() + coroutine.wait(1) + le:Dispose() + end) + end + self:RemoveCursor() + if self._clearingView == nil then + self._clearingView = EXClearingView.new(self._root_view) + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + self._popEvent = true + end) + end + + if _room.curren_round ~= _room.room_config.round then + -- if #niao == 0 then self._view:GetChild("n13").visible = false end + self._clearingView:InitData(0, _room, result, nil, function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:ResetCardType() + if _room:checkHpNonnegative() then + p.cur_hp = data[i].hp_info.cur_hp + end + info:UpdateScore() + info._view:GetChild("zhanji").visible = true + local num = data[i].hp_info.total_hp + if num > 0 then + info._view:GetController("text_color").selectedIndex = 0 + info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + else + info._view:GetController("text_color").selectedIndex = 1 + info._view:GetChild("text_jifen").text = d2ad(num) + end + + info._view:GetChild("mask_piao").title = "" + info._view:GetController("piao_niao").selectedIndex = 0 + p.fz_list = {} + end + DataManager.CurrenRoom.self_player.card_list = {} + self._state.selectedIndex = 2 + self._clearingView = nil + end) + end + self._player_card_info[1]:ShowHuTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult2, function(...) + self:UnmarkSelfTuoguan() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = {...} + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + self._clearingView = EXClearingView.new() + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + end) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiaoTip, function() + self:UpdateRound() + self._tex_LeftCard.text = "0" + self._state.selectedIndex = 1 + self:__PiaoNiaoTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiao, function(...) + local arg = {...} + local seat = arg[1] + local num = arg[2] + if num > 0 then + local head_info = self._player_info[self:GetPos(seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. num + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + if seat == _room.self_player.seat then + if self._com_piao and _room.self_player.entrust then + self._com_piao:Dispose() + self._com_piao = nil + _room.curren_round = _room.curren_round - 1 + end + end + end) +end + +function M:OutCard(card) + if card ~= 0 then + printlog("当前出牌为===>>>"..card) + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card, function() + local info = self._player_card_info[1] + self:RemoveCursor() + info:UpdateHandCard() + + info:UpdateOutCardList(nil, card, self._cursor) + self:PlaySound("100Zhang_MJ", self._room.self_player.self_user.sex,tostring(card)) + self:PlayMJSound("chupai.mp3") + -- self:ShowHuTip() + end) + else + printlog("鬼牌不能出===>>>"..card) + end +end + +function M:__FangziTip(tip, weight) + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject("Main_Majiang", "Gcm_action_tips") + _chipeng_tip:GetController("hide_bg").selectedIndex = 1 + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + -- self._player_card_info[self:GetPos(p.seat)] + + local _lit_fanzi = _chipeng_tip:GetChild("lit_fanzi") + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + + local tip_hu = false + local count = #_tlist + for k=1,#_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + local url = "ui://Main_Majiang/Btn_fztip" + local td_weight = td.weight + if td_weight == 16 then td_weight = 8 end + if td_weight == 8 then url = "ui://Main_Majiang/Btn_hu" end + local btn_t = _lit_fanzi:AddItemFromPool(url) + btn_t.icon = "ui://Main_Majiang/fztip_"..td_weight + btn_t.data = { tip, td } + btn_t.onClick:Add(self.__TipAction,self) + end + + -- if not (tonumber(weight) >= 16) then + local _btn_pass = _lit_fanzi:AddItemFromPool("ui://Main_Majiang/Btn_pass") + -- local _btn_pass = _chipeng_tip:GetChild("btn_pass") + _btn_pass.onClick:Set(function() + if tonumber(weight) >= 8 then + local guo_msg = MsgWindow.new(self._root_view, "确定要点过吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end) + guo_msg:Show() + else + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end) + -- end + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() +end + +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local list = tip.tip_map_type[td.weight] + if (#list > 1) then + self:_ChiView(list, function(id) + _gamectr:SendAction(id) + self:__CloseTip() + end) + self._chipeng_tip.visible = false + return + end + + _gamectr:SendAction(td.id) + if (self._chipeng_tip == nil) then return end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil +end + +function M:_ChiView(tiplist, callback) + self._chipeng_tip.visible = false + local _pop_tip_choice = UIPackage.CreateObject("Main_Majiang", "Pop_tip_choice") + local list_choose = _pop_tip_choice:GetChild("Lst_choose") + local crossCtr = _pop_tip_choice:GetController("state") + crossCtr.selectedIndex = #tiplist == 3 and 0 or 1 + _pop_tip_choice:GetChild("Btn_cross").onClick:Add(function() + _pop_tip_choice:Dispose() + self._chipeng_tip.visible = true + end) + list_choose:RemoveChildrenToPool() + for i = 1, #tiplist do + local item_choose = list_choose:AddItemFromPool() + item_choose:GetController("type").selectedIndex = 0 + for j = 1, 4 do + item_choose:GetChild("card"..j).icon = UIPackage.GetItemURL("Main_Majiang", "202_"..tiplist[i].card) + end + item_choose.onClick:Add(function() + callback(tiplist[i].id) + end) + end + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width)/2, (self._view.height - _pop_tip_choice.height)/2) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:OnFangziAction(...) + self:__CloseTip() + local arg = {...} + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local index = arg[3] + + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject("Extend_MJ_100Zhang", "FzEffect") + if fz.type == FZType.Peng then + self:PlaySound("100Zhang_MJ", player.self_user.sex,"peng"..math.random(1, 3)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "碰框") + else + + self:PlaySound("100Zhang_MJ", player.self_user.sex,"gang"..math.random(1, 2)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "杠框") + end + effect.touchable = false + effect:GetTransition("t2"):Play() + pNode:AddChild(effect) + coroutine.start(function() + coroutine.wait(2) + effect:Dispose() + end) + + self:RemoveCursor() + if (player.seat ~= fz.from_seat) then + local fs_info = _player_card_info[self:GetPos(fz.from_seat)] + fs_info:UpdateOutCardList() + end + info:UpdateFzList(fz, index, true) + local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi + info:UpdateHandCard(getcard) + self:__CloseTip() +end + +function M:RunNiao(list, start_seat) + local _room = self._room + --local _niao_View = self._niao_View + self._niao_View = UIPackage.CreateObject("Extend_MJ_100Zhang","Panel_Birds") + self._view:AddChild(self._niao_View) + self._niao_View:Center() + local _niao_View = self._niao_View + local list_niao_card = self._niao_View:GetChild("Lst_birds") + list_niao_card:RemoveChildrenToPool() + for i = 1, #list do + --添加背面的麻將 + local item = list_niao_card:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "202_00") + item:GetChild("tex_score").text = "+" .. list[i].score + end + for i = 1, #list do + --顯示正面 + local item = list_niao_card:GetChildAt(i - 1) + local card = list[i].card + coroutine.wait(0.3) + item:GetTransition("appear"):Play() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_"..card) + if list[i].score > 0 then item:GetController("bg").selectedIndex = 1 end + end + coroutine.start(function() + coroutine.wait(2) + _niao_View:Dispose() + self._popEvent = true + end) +end + +-- function M:markOutCards(showTip, data) +-- for i = 1, #self._room.player_list do +-- local p = self._room.player_list[i] +-- local info = self._player_card_info[self:GetPos(p.seat)] +-- for j = 1, #p.outcard_list do +-- local card = p.outcard_list[j] +-- if card == data then +-- local obj = info:GetOutCardByIndex(j) +-- obj:GetController("gray").selectedIndex = showTip and 1 or 0 +-- end +-- end +-- end +-- end + +function M:__PiaoNiaoTip() + local obj_piao = UIPackage.CreateObject("Main_Majiang", "panel_piao_niao") + self._view:AddChild(obj_piao) + obj_piao.x = (self._view.width - obj_piao.width) * 0.5 + obj_piao.y = self._view.height * 0.6 + for i = 1, 4 do + obj_piao:GetChild("btn_" .. i).onClick:Add(function() + self._gamectr:SendAction(i - 1) + obj_piao:Dispose() + end) + end + self._com_piao = obj_piao +end + +function M:ReloadRoom(bskip) + local room = self._room + -- if not room.playing then + -- self._state.selectedIndex = 2 + -- else + -- self._state.selectedIndex = 1 + -- self._room._reload_flag = true + -- end + + if bskip == nil or bskip == false then + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + self._room._reload_flag = true + end + end + + for i = 1, #room.player_list do + local p = room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + for i = 1, #p.fz_list do + info:UpdateFzList(p.fz_list[i], -1) + end + info:UpdateHandCard() + local head_info = self._player_info[self:GetPos(p.seat)] + head_info:UpdateScore() + head_info._view:GetChild('zhanji').visible = true + local num = p.total_hp or 0 + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(num) + end + + if p.seat == room.last_outcard_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil,card, self._cursor) + elseif p.seat == room.curren_outcard_seat then + info:UpdateHandCard(true) + info:UpdateOutCardList() + else + info:UpdateOutCardList() + end + if p.seat == room.banker_seat then + head_info:MarkBank(true) + end + -- if p.ready then + -- self._player_info[self:GetPos(p.seat)]:Ready(true) + -- end + if bskip == nil or bskip == false then + if p.ready and room.playing == false then + self._player_info[self:GetPos(p.seat)]:Ready(true) + end + end + if p.piao_niao~=nil and p.piao_niao > 0 then + local head_info = self._player_info[self:GetPos(p.seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + end + -- self:ShowHuTip() + + if bskip == nil or bskip == false then + self:UpdateCardBox(self:GetPos(room.curren_outcard_seat)) + self._tex_LeftCard.text = room.left_count + self:UpdateRound() + end +end + +function M:PlayerChangeLineState() + -- local isOutCard = true + -- local str = "玩家 " + -- for _ , player in ipairs(self._room.player_list) do + -- if player.line_state == 0 then + -- isOutCard = false + -- end + -- end + -- self._player_card_info[1]._area_handcard_list.touchable = isOutCard +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:__CloseTip() + if self._chipeng_tip then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if self._pop_tip_choice then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +function M:closeTipOnTuoguan() + self:__CloseTip() +end + +function M:Destroy() + MJMainView.Destroy(self) + UIPackage.RemovePackage("extend/majiang/100zhang/ui/Extend_MJ_100Zhang") +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/100zhang/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/100zhang/EXPlayBackView.lua new file mode 100644 index 00000000..8e2bf57a --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/100zhang/EXPlayBackView.lua @@ -0,0 +1,298 @@ +local MJPlayBackView = require("main.majiang.MJPlayBackView") +local EXRoomConfig = import(".EXRoomConfig") +local EXClearingView = import(".EXClearingView") + +local Record_Event = import(".RecordEvent") + + +local M = {} + +--- Create a new +function M.new() + setmetatable(M,{__index = MJPlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = "PlayBackView" + self:init() + + return self +end + + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/majiang/100zhang/ui/Extend_MJ_100Zhang") + MJPlayBackView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num) + local _cardbox = self._view:GetChild("cardbox") + --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false + self._ctr_cardbox = _cardbox:GetController("c1") + self._tex_round = self._view:GetChild("tex_round") + self._tex_LeftCard = self._view:GetChild("remaining_card") + self._anchor = self._view:GetChild("mask_tips") + self._eventmap = {} + + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao + self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao + self._cmdmap[Record_Event.Evt_Result] = self.CmdResult +end + +function M:FillRoomData(data) + MJPlayBackView.FillRoomData(self) + if self._win_pic then self._win_pic:Dispose() end + if self._niao then self._niao:Dispose() end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local left_count = data.info.left_card + self:UpdateLeftCard(left_count) + local round = data.info.round + self:UpdateRound(round) + + local roominfo_panel = self._view:GetChild("roominfo_panel1") + roominfo_panel:GetChild("tex_roomid").text = room.room_id + roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + table.sort(p.card_list, ViewUtil.HandCardSort) + card_info:UpdateHandCard(false, true) + self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0 + end + + self:GenerateAllStepData(data) + self:UpdateStep(1) + -- self:ShowStep(0) +end + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateLeftCard(step.left_card) + -- self._ctr_cardbox.selectedIndex = step.current_out_seat + self:UpdateCardBox(self:GetPos(step.current_out_seat)) + self:UpdateStep(index + 1) + if step.cmd ~= Record_Event.Evt_OutCard then + self:RemoveCursor() + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hand_left_count = #p.card_list + info:Clear() + info:ResetFzList() + p.piao_niao = step.player_card_data[i].piao_niao + local head_info = self._player_info[self:GetPos(i)] + if p.piao_niao and p.piao_niao > 0 then + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + else + head_info._view:GetController("piao_niao").selectedIndex = 0 + end + if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil, nil, self._cursor) + else + info:UpdateOutCardList() + end + if step.cmd == Record_Event.Evt_GetCard and p.seat == step.current_out_seat then + info:UpdateHandCard(true, true) + else + info:UpdateHandCard(false, true) + end + end + if step.cmd == Record_Event.Evt_Win then + self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡") + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + else + if self._win_pic then + self._win_pic:Dispose() + end + end + if step.cmd == Record_Event.Evt_Niao then + local niao_list = step.niao + self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_100Zhang/Panel_Birds") + local list = self._niao:GetChild("Lst_birds") + list:RemoveChildrenToPool() + for i = 1, #niao_list do + local item = list:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_"..niao_list[i].card) + if niao_list[i].score > 0 then + item:GetController("bg").selectedIndex = 2 + end + end + self._view:AddChild(self._niao) + self._view:AddChild(self._view:GetChild("panel_record")) + self._niao:Center() + else + if self._niao then + self._niao:Dispose() + end + end + if step.cmd == Record_Event.Evt_Result then + if not self.result then + self.result = EXClearingView.new(self._root_view, true) + self.result:InitData(0, self._room, step.result_data) + self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5 + self.result._view.width = GRoot.inst.width + self.result._view.height = GRoot.inst.height + self.result._view:GetChild("btn_confirm").visible = false + self._anchor:AddChild(self.result._view) + self.result._view.x = self._anchor.x * -1 + self.result._view.y = self._anchor.y * -1 + else + self.result._view.visible = true + end + -- self.result._view:Center() + else + if self.result then + self.result._view.visible = false + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = "" + step.left_card = info.left_card + step.last_out_seat = 0 + step.current_out_seat = 1 + step.win = 0 + step.niao = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.piao_niao = p.piao_niao + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + table.sort(u.card_list, ViewUtil.HandCardSort) + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = 0 + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + for i = 1, #cmd.data.opcard do + list_remove(u.card_list, cmd.data.opcard[i]) + end + local fz = {} + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.opcard = cmd.data.opcard + local uf = data.player_card_data[cmd.data.from_seat] + if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then + table.remove(uf.outcard_list, #uf.outcard_list) + end + if fz.type ~= FZType.Gang_Peng then + u.fz_list[#u.fz_list + 1] = fz + else + for i = 1, #u.fz_list do + if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then + u.fz_list[i].type = FZType.Gang_Peng + end + end + end +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:CmdNiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.niao = cmd.data.niao +end + +function M:CmdPiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.player_card_data[cmd.seat].piao_niao = cmd.data.num +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result_data = cmd.data +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_deep_clone(last_step) + self._step[#self._step + 1] = step + step.result_data = nil + return step +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = "剩余 "..num.." 张牌" +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:UpdateRound(round) + self._tex_round.text = "第 "..round.."/"..self._room.room_config.round.." 局" +end + +function M:UpdateStep(step) + self._record:GetChild("tex_step").text = "第 " .. step .. " / " .. #self._step .. "步" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/100zhang/EXPlayer.lua b/lua_probject/extend_project/extend/majiang/100zhang/EXPlayer.lua new file mode 100644 index 00000000..fd26822b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/100zhang/EXPlayer.lua @@ -0,0 +1,36 @@ + + +local EXPlayer = { + auto, + -- 手牌列表 + hand_cards = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/100zhang/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/majiang/100zhang/EXPlayerInfoView.lua new file mode 100644 index 00000000..f8a5fd69 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/100zhang/EXPlayerInfoView.lua @@ -0,0 +1,76 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + +function M:init() + PlayerInfoView.init(self) + self._tex_score = self._view:GetChild("info"):GetChild("tex_score1") + self._tex_score2 = self._view:GetChild("info"):GetChild("tex_score2") + self._ct_score = self._view:GetChild("info"):GetController("score") +end + +function M:ShowInteraction(type,str) + if type == 3 then + Voice.DownLoad(str, function(clip) + if (clip ) then + self:ShowMaskVoice(clip.length) + GameApplication.Instance:PlayVoice(clip) + end + end) + elseif type == 4 then + self:SetChat(str) + elseif type == 2 then + local chat_index = tonumber(str) + self._main_view:PlayChatSound(self._player.self_user.sex,chat_index) + local language, index = self._main_view:GetChatMsgLanguage(chat_index) + self:SetChat(self._main_view.Fix_Msg_Chat[index]) + elseif type == 1 then + self:SetBiaoqing("ui://Chat/"..str) + end +end + +function M:UpdateRemainCard(card_num, hide) + if hide then + self._view:GetController("show_remain").selectedIndex = 0 + else + self._view:GetController("show_remain").selectedIndex = 1 + end + self._view:GetChild("com_remain"):GetChild("tex_remain").text = card_num +end + +function M:FillData(player) + PlayerInfoView.FillData(self, player) + self:UpdateScore(player.total_score) +end + +function M:UpdateScore() + local score = self._player.total_score + local room = DataManager.CurrenRoom + if room:checkHpNonnegative() then + score = d2ad(self._player.cur_hp) + end + if not score then + score = 0 + end + if score < 0 then + self._ct_score.selectedIndex = 1 + self._tex_score2.text = score + else + self._ct_score.selectedIndex = 0 + if not room:checkHpNonnegative() then + score = "+" .. score + end + self._tex_score.text = score + end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/100zhang/EXRoomConfig.lua b/lua_probject/extend_project/extend/majiang/100zhang/EXRoomConfig.lua new file mode 100644 index 00000000..167adb9f --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/100zhang/EXRoomConfig.lua @@ -0,0 +1,943 @@ + + + +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.class = "RoomConfig" + self.config=config + self.round = config["times"] + self.Qidui = config["qidui"] + self.QiangGang = config["qiangkong"] + self.QiangGangNiao = config["qiangkong_niao"] + self.Zhama = config["niao_opt"] + local isOpenLaizi8=false + --if config["laizi"]==3 then + -- isOpenLaizi8=true + --end + self.Laizi = isOpenLaizi8 --是否是8个赖子 + self.LaiziType=config["laizi"] + self.NiaoType = config["niao"] + --self.Zhamatype= config["niao_opt"] + self.piao_niao = config["piao_niao"] + self.Jiangma = config["jiangma"] + self.isHidden = config.isHidden + + self.Qanggangquanbao=config["qianggang_type"] + self.Gangbaoquanbao=config["gangbao_type"] + self.Minggangkeqiang=config["qiangkong_ming"] + self.geng_zhuan=config["geng_zhuan"] + self.jiejiegao=config["jiejiegao"] + self.jiejiegao_first=config["jiejiegao_first"] + self.wuguijiabei=config["wuguijiabei"] + self.no_wan=config["no_wan"] + self.ma_gen_di_fen=config["ma_gen_di_fen"] + self.ma_gen_gong=config["ma_gen_gong"] + self.qidui_jiafan=config["qidui_jiafan"] + + + + return self +end + + +function M:GetDes(sp) + sp = sp or " " + local count=0 + local firstStr=30 + local str = self.round and self.round .. "局" .. " " or "" + str = str .. RoomConfig.GetDes(self, sp).."\n" + + if (self.QiangGang) then + str = str .. "抢杠胡二倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + + end + + if (self.Qidui) then + str = str .."七小对" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["dianpao"] then + str = str .."可抢炮胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["pengpenghu"] then + str = str .."碰碰胡二倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["hunyise"] then + str = str .."混一色二倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["qingyise"] then + str = str .."清一色二倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["gangshangkaihua"] then + str = str .."杠上开花二倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["haohua_qidui"] then + str = str .."豪华4倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["shishanyao"] then + str = str .."十三幺十倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["tiandihu"] then + str = str .."天地胡10倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["haohua2_qidui"] then + str = str .."双豪华6倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["haohua3_qidui"] then + str = str .."三豪华8倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["shibaluohan"] then + str = str .."十八罗汉10倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["xiaoshanyuan"] then + str = str .."小三元4倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["xiaosixi"] then + str = str .."小四喜4倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["dashanyuan"] then + str = str .."大三元6倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["dasixi"] then + str = str .."大四喜6倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["bihu"] then + str = str .."逼胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["guopeng"] then + str = str .."过碰不碰" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["guogang"] then + str = str .."过杠不杠" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["geng_zhuan"] then + str = str .."跟庄" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["gangbao_type"] then + str = str .."杠爆全包" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["yao_jiu"] then + str = str .."幺九" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["han19"] then + str = str .."含19即可" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["laizi4_hu"] then + str = str .."四鬼胡牌" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["twelve_zhang_luodi_quanbao"] then + str = str .."12张落地全包" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["huangzhuang_huanggang"] then + str = str .."荒庄荒杠" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["liuju_2bei"] then + str = str .."流居翻倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["quan_feng"] then + str = str .."全风八倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["qiangkong_ming"] then + str = str .."明杠可抢" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["qianggang_type"] then + str = str .."抢杠全包" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + + if (self.LaiziType==3) then + str = str .. "翻双鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.LaiziType==1 then + str = str .. "白板做鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.LaiziType==2 then + str = str .. "翻鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str .. "无鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.NiaoType==0 then + str = str .. "无马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.NiaoType==1 then + if self.Zhama==1 then + str = str .. "买二马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.Zhama==2 then + str = str .. "买四马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.Zhama==3 then + str = str .. "买六马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.Zhama==4 then + str = str .. "抓马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + elseif self.NiaoType==2 then + local strMB="爆炸马加分" + if self.Zhama==1 then + strMB="爆炸马加倍" + end + str = str .. strMB + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.ma_gen_di_fen then + str = str .."马跟底分" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.ma_gen_gong then + str = str .."马跟杠" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + + --if (self.piao_niao) then + -- str = str .. "飘鸟" .. sp + --end + + --[[if (self.NiaoType) then + if self.NiaoType == 1 then + str = str .. string.format("扎%d码", self.Zhama * 2) + elseif self.NiaoType == 2 then + str = str .. "一码全中" + elseif self.NiaoType == 3 then + str = str .. "窝窝鸟" .. sp .. (self.Zhama == 1 and "1鸟2分" or "1鸟1分") + end + str = str .. sp + + -- if self.NiaoType ~= 2 and self.Jiangma > 0 then + -- str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp + -- end + if self.Jiangma > 0 then + str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp + end + end--]] + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + + +function M:GetDes2(sp) + sp = sp or " " + local str = RoomConfig.GetDes(self, sp) + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + + + if (self.QiangGang) then + str = str .. "抢杠胡2倍" + str = str .. sp + --if (self.QiangGangNiao) then + --str = str .. "抢杠胡奖码" + --str = str .. sp + --end + end + + if (self.Qidui) then + str = str .."七小对" + str = str .. sp + end + + if self.config["dianpao"] then + str = str .."可抢炮胡" + str = str .. sp + end + + if self.config["pengpenghu"] then + str = str .."碰碰胡2倍" + str = str .. sp + end + + if self.config["hunyise"] then + str = str .."混一色2倍" + str = str .. sp + end + + if self.config["qingyise"] then + str = str .."清一色2倍" + str = str .. sp + end + + if self.config["gangshangkaihua"] then + str = str .."杠上开花2倍" + str = str .. sp + end + + if self.config["haohua_qidui"] then + str = str .."豪华4倍" + str = str .. sp + end + + if self.config["shishanyao"] then + str = str .."十三幺10倍" + str = str .. sp + end + + if self.config["tiandihu"] then + str = str .."天地胡10倍" + str = str .. sp + end + + if self.config["haohua2_qidui"] then + str = str .."双豪华6倍" + str = str .. sp + end + + if self.config["haohua3_qidui"] then + str = str .."三豪华8倍" + str = str .. sp + end + + if self.config["shibaluohan"] then + str = str .."十八罗汉10倍" + str = str .. sp + end + + if self.config["xiaoshanyuan"] then + str = str .."小三元4倍" + str = str .. sp + end + + if self.config["xiaosixi"] then + str = str .."小四喜4倍" + str = str .. sp + end + + if self.config["dashanyuan"] then + str = str .."大三元6倍" + str = str .. sp + end + + + if self.config["dasixi"] then + str = str .."大四喜6倍" + str = str .. sp + end + + if self.config["bihu"] then + str = str .."逼胡" + str = str .. sp + end + + if self.config["guopeng"] then + str = str .."过碰不碰" + str = str .. sp + end + + if self.config["guogang"] then + str = str .."过杠不杠" + str = str .. sp + end + + + if (self.LaiziType==3) then + str = str .. "翻双鬼" + str = str .. sp + elseif self.LaiziType==1 then + str = str .. "白板做鬼" + str = str .. sp + elseif self.LaiziType==2 then + str = str .. "翻鬼" + str = str .. sp + else + str = str .. "无鬼" + str = str .. sp + end + + if self.NiaoType==0 then + str = str .. "无马" + str = str .. sp + elseif self.NiaoType==1 then + if self.Zhama==1 then + str = str .. "买2马" + str = str .. sp + elseif self.Zhama==2 then + str = str .. "买4马" + str = str .. sp + elseif self.Zhama==3 then + str = str .. "买6马" + str = str .. sp + elseif self.Zhama==4 then + str = str .. "抓马" + str = str .. sp + end + elseif self.NiaoType==2 then + local strMB="爆炸马加分" + if self.Zhama==1 then + strMB="爆炸马加倍" + end + str = str .. strMB + str = str .. sp + end + + if self.ma_gen_di_fen then + str = str .."马跟底分" + str = str .. sp + end + + if self.ma_gen_gong then + str = str .."马跟杠" + str = str .. sp + end + + + + --if (self.piao_niao) then + -- str = str .. "飘鸟" .. sp + --end + + --[[if (self.NiaoType) then + if self.NiaoType == 1 then + str = str .. string.format("扎%d码", self.Zhama * 2) + elseif self.NiaoType == 2 then + str = str .. "一码全中" + elseif self.NiaoType == 3 then + str = str .. "窝窝鸟" .. sp .. (self.Zhama == 1 and "1鸟2分" or "1鸟1分") + end + str = str .. sp + + -- if self.NiaoType ~= 2 and self.Jiangma > 0 then + -- str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp + -- end + if self.Jiangma > 0 then + str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp + end + end--]] + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_MJ_100Zhang/gamerule") + return gamerulepanel +end + + +function M:GetGameSMSize() + return 467,500 +end + + +function M:GetGameName() + return "100张" +end + + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/100zhang/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/100zhang/ExtendConfig.lua new file mode 100644 index 00000000..3cbe6b46 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/100zhang/ExtendConfig.lua @@ -0,0 +1,189 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import(".EXGameInfo") +local EXMainView = import(".EXMainView") +local EXGameController = import(".EXGameController") +local EXRoomConfig = import(".EXRoomConfig") +local EXPlayBackView =import(".EXPlayBackView") +local MJRoom = require("main.majiang.MJRoom") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = "ExtendConfig" + self.extend_id = 22 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/majiang/100zhang/ui/Info_MJ_100Zhang") + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage("extend/majiang/100zhang/ui/Extend_MJ_100Zhang") + ResourcesManager.UnLoadGroup("100Zhang_MJ") +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return MJRoom.new() +end + +function M:FillRoomConfig(room,_config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + + + local reload = s2croom["reload"] + local _tableInfo = s2croom["tableInfo"] + printlog("初始化房间数据====>>>") + pt(_tableInfo) + printlog(_tableInfo.laiziCard) + printlog(_tableInfo.laiziCard2) + printlog(_tableInfo.laiziCardBefore) + printlog(_tableInfo.laiziCard2Before) + + room.laiziInfo={} + if _tableInfo.laiziCardBefore>0 then + table.insert(room.laiziInfo,_tableInfo.laiziCard) + if _tableInfo.laiziCard2>0 then + table.insert(room.laiziInfo,_tableInfo.laiziCard2) + end + room.beforelaiziCardId=_tableInfo.laiziCardBefore + else + room.laiziInfo=nil + end + + local _config = _tableInfo["config"] + pt(_config) + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo["playerData"] + room.curren_round = _tableInfo["round"] + self:FillPlayerData(playerList) + + if (reload) then + local _reloadInfo = s2croom["reloadInfo"] + local _hand_card = _reloadInfo["hand_card"] + room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + + local active_seat = _reloadInfo["active_seat"] + local bank_seat = _reloadInfo["banker_seat"] + local playing = _reloadInfo["playing"] + local _info_list = _reloadInfo["info_list"] + local last_outcard_seat = _reloadInfo["last_outcard_seat"] + room.left_count = _reloadInfo["left_card"] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo["curren_outcard_seat"] + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i=1,#_info_list do + local tem = _info_list[i] + local playerid = tem["playerid"] + local p = room:GetPlayerById(playerid) + local outcard_list = tem["outcard_list"] + p.outcard_list = outcard_list + p.total_score = tem["score"] + p.hand_left_count = tem["card_count"] + p.piao_niao = tem["piao_niao"] or 0 + local opcard = tem["opcard"] + for k=1,#opcard do + local op = opcard[k] + local fz = {} + fz.type = op["type"] + fz.card = op["card"] + p.fz_list[#p.fz_list+1] = fz + end + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.left_count = _tableInfo["left_card"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + + local _info_list = _tableInfo["playerData"] + for i = 1,#_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + p.piao_niao = _jp["piao_niao"] + -- print(DataManager.SelfUser.account_id,pid) + -- if (278 == pid) then + -- room.self_player = p + -- p.self_user = DataManager.SelfUser + -- else + if p.seat == 1 then room.self_player = p end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.card_list = _hand_card + --room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + p.total_score = _jp["score"] + p.hand_left_count = #_hand_card + if _jp.hp_info then + room.room_config.isNonnegative = 1 + p.cur_hp = _jp.hp_info.cur_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/100zhang/GameEvent.lua b/lua_probject/extend_project/extend/majiang/100zhang/GameEvent.lua new file mode 100644 index 00000000..ee0f2d34 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/100zhang/GameEvent.lua @@ -0,0 +1,34 @@ + +local TX_GameEvent = { + -- 发牌 + SendCards = "SendCards", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + EventNiao = "EventNiao", + + EvnetPiaoTip = "EvnetPiaoTip", + + EvnetPiao = "EvnetPiao", + + + --- + SendLaiZi="SendLaiZi" +} +return TX_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/100zhang/MJPlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/majiang/100zhang/MJPlayerSelfCardInfoView.lua new file mode 100644 index 00000000..51ef5dd2 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/100zhang/MJPlayerSelfCardInfoView.lua @@ -0,0 +1,212 @@ +local MJPlayerSelfCardInfoView = require("main.majiang.MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local CardCheck = import(".CardCheck") + +local M = {} +-- +function M.new(view,mainView) + setmetatable(MJPlayerSelfCardInfoView, {__index = MJPlayerCardInfoView}) + setmetatable(M, {__index = MJPlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:ShowHuTip(card_list) + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + for i=1,#DataManager.CurrenRoom.laiziInfo do + if IsHasDictionary(DataManager.CurrenRoom.laiziInfo[i],tingList)==false then + table.insert(tingList,DataManager.CurrenRoom.laiziInfo[i] ) + end + end + end + + end + self._mainView._hu_tip:FillData(tingList) +end + +function M:UpdateHandCard(getcard, mp) + MJPlayerSelfCardInfoView.UpdateHandCard(self, getcard, mp) + local _carViewList = self._carViewList + + if DataManager.CurrenRoom.laiziInfo and #self._carViewList>0 then + for i=1,#self._carViewList do + local obj=self._carViewList[i] + if obj and obj.card then + if IsHasDictionary(obj.card_item,DataManager.CurrenRoom.laiziInfo) then + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=1 + end + + end + else + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=0 + end + end + end + + end + end + + + end + + + local card_list = DataManager.CurrenRoom.self_player.card_list + self:ShowHuTip(card_list) + if getcard then + self._out_card = true + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + -- 记录需要标记听牌提示的牌 + local lst_mark = {} + local total_num = 0 + for i = 1, #_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + list_remove(card_list, card) + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + local count = 0 + for j = 1, #tingList do + count = count + self._mainView:CountCardLeftNum(tingList[j]) + end + local tem = {} + tem.item = btn + tem.count = count + total_num = total_num + count + table.insert(lst_mark, tem) + end + table.insert(card_list, card) + end + table.sort(lst_mark, function(a, b) + return a.count > b.count + end) + -- 如果几张牌的可胡牌数一致,也只显示'三角',可胡牌数不一致才显示'多' + local all_same = #lst_mark ~= 0 and lst_mark[1].count == total_num / #lst_mark or false + for i = 1, #lst_mark do + local tem = lst_mark[i] + if all_same or tem.count < lst_mark[1].count then + tem.item:GetController("mark_ting").selectedIndex = 1 + else + tem.item:GetController("mark_ting").selectedIndex = 2 + end + end + else + for i = 1, #_carViewList do + local btn = _carViewList[i].card + if btn:GetController("mark_ting").selectedIndex ~= 0 then + btn:GetController("mark_ting").selectedIndex = 0 + end + end + self._out_card = false + end + +end + +function M:__OnClickHandCard(context) + local button = context.sender + local _carViewList = self._carViewList + local refresh = true + local card_list = {} + for i=1,#_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + if btn ~= button and btn.selected == true then + if button.data.card_item == card then + refresh = false + else + self._mainView:markOutCards(false, card) + end + btn.selected = false + end + if not btn.selected then + table.insert(card_list, card) + end + end + + if self._out_card then + self:ShowHuTip(card_list) + end + + -- 标记出牌 + if refresh then + if button.selected then + self._mainView:markOutCards(true, button.data.card_item) + else + self._mainView:markOutCards(false, button.data.card_item) + end + end + + local _room = DataManager.CurrenRoom + if not button.selected and _room.curren_outcard_seat == _room.self_player.seat then + local card = button.data + self._mainView:OutCard(card.card_item) + end +end + +function M:__OnDragStart(card) + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + list_remove(card_list, card) + self:ShowHuTip(card_list) +end + +function M:__OnDragEnd(context) + if self.outcard_button then + self.outcard_button:Dispose() + self.outcard_button = nil + end + local button = context.sender + + --button:RemoveFromParent() + local card = button.data + local _room = DataManager.CurrenRoom + + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + if (button.y - card.old_postion.y < -50 and _room.curren_outcard_seat == _room.self_player.seat and card.card_item ~= 0) then + self._mainView:OutCard(card.card_item) + button.touchable = false + self.outcard_button = button + else + self._area_handcard_list:AddChildAt(button, card.index) + button:TweenMove(card.old_postion, 0.2) + end +end + +function M:CheckPlayerOnlineState() + local room = DataManager.CurrenRoom + for i = 1, #room.player_list do + if room.player_list[i].line_state == 0 then + return false + end + end + return true +end +function M:Clear(bskip) + --self._ctr_state.selectedIndex = 0 + self._area_fz_list.x = self._src_fz_list.x + self._area_fz_list.y = self._src_fz_list.y + self._area_fz_list.width = self._src_fz_list.z + self._area_fz_list.height = self._src_fz_list.w + + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_outcard_list:RemoveChildren(0, -1, true) + if bskip == nil or bskip == false then + self._mask_liangpai:RemoveChildren(0, -1, true) + end + + for i=1,#self._carViewList do + self._carViewList[i].card:Dispose() + end + self._carViewList = {} + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/100zhang/Protocol.lua b/lua_probject/extend_project/extend/majiang/100zhang/Protocol.lua new file mode 100644 index 00000000..4c9b875b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/100zhang/Protocol.lua @@ -0,0 +1,48 @@ +local Protocol = { + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌 + GAME_DIS_CARD = "611", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- 提示选择行为 + GAME_ACTION = "612", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 小结算 + GAME_EVT_RESULT1 = "817", + + -- 大结算 + GAME_EVT_RESULT2 = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + + -- 抓鸟事件 + GAME_EVT_NIAO = "821", + + -- 飘鸟提示 + GAME_EVT_PIAOTIP = "833", + + -- 飘鸟事件 + GAME_EVT_PIAO = "834", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/100zhang/RecordEvent.lua b/lua_probject/extend_project/extend/majiang/100zhang/RecordEvent.lua new file mode 100644 index 00000000..09748550 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/100zhang/RecordEvent.lua @@ -0,0 +1,11 @@ +local Record_Event = { + Evt_GetCard = "GetCard", + Evt_OutCard = "OutCard", + Evt_Action = "Action", + Evt_Win = "Win", + Evt_Niao = "Niao", + Evt_Piao = "PiaoNiao", + Evt_Result = "Result", +} + +return Record_Event \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/changsha/CS_GameEvent.lua b/lua_probject/extend_project/extend/majiang/changsha/CS_GameEvent.lua new file mode 100644 index 00000000..5ec65988 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/changsha/CS_GameEvent.lua @@ -0,0 +1,44 @@ + +local CS_GameEvent = { + -- 发牌 + SendCards = "SendCards", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + EventNiao = "EventNiao", + + EventQSTip = "EventQSTip", + + EvnetQSAction = "EvnetQSAction", + + EventKaiGang = "EventKaiGang", + + EvnetHaiDi = "EvnetHaiDi", + + EvnetPiaoTip = "EvnetPiaoTip", + + EvnetPiao = "EvnetPiao", + + EventTingTip = "EventTingTip", + + EventTing = "EventTing", + + EventXiPai="EventXiPai", +} +return CS_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/changsha/CS_Win_Type.lua b/lua_probject/extend_project/extend/majiang/changsha/CS_Win_Type.lua new file mode 100644 index 00000000..881b637f --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/changsha/CS_Win_Type.lua @@ -0,0 +1,18 @@ +local CS_Win_Type = { + "小七对", + "将将胡", + "清一色", + "碰碰胡", + "杠上花", + "杠上炮", + "全求人", + "海底捞月", + "海底炮", + "抢杠胡", + "小胡", + "天胡", + "天听胡", + "门清", +} +return CS_Win_Type + diff --git a/lua_probject/extend_project/extend/majiang/changsha/CardCheck.lua b/lua_probject/extend_project/extend/majiang/changsha/CardCheck.lua new file mode 100644 index 00000000..422b4b57 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/changsha/CardCheck.lua @@ -0,0 +1,295 @@ +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + num = num == nil and 1 or num + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if(result ==num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local zhongid = 412 + + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + jiang = true +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + self.cardList[#self.cardList + 1] = card + end + table.sort(self.cardList) +end + +function M:tryShunzi(card) + if (card < 400 and card % 100 > 7) then + return false + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryKezi(card) + if (checkCardAndRomve(card, self.cardList, 3)) then + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (self.jiang) then + if (not (card % 100 == 2 or card % 100 == 5 or card % 100 == 8)) then + return false + end + end + if (checkCardAndRomve(card, self.cardList, 2)) then + local cardGroup = {card,card} + self:push(cardGroup) + self.pair_count = 1 + return true + end + return false +end + +function M:tryWin() + if (#self.cardList == 0 and self.pair_count == 1) then + return true + end + + if (#self.cardList == 0) then + return false + end + + local activeCard = self.cardList[1] + if (self:tryPair(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + + if (self:tryKezi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + + return false +end + + + +local function init(self,cardInhand,addCard,jiang) + self.stack = {} + self.pair_count = 0 + self.jiang = jiang + self.cardList = membe_clone(cardInhand) + self.cardList[#self.cardList+1] = addCard + table.sort(self.cardList) + return self:tryWin() +end + +local function quanqiuren(cardInhand,drawCard) + if (#cardInhand > 1) then + return false + end + if (cardInhand[1] ~= drawCard) then + return false + end + return true +end + +local function qingyise(fzList, cardInhand, drawCard) + local se = math.floor(cardInhand[1] / 100) + if (math.floor(drawCard / 100) ~= se) then + return false + end + for i=1,#fzList do + local fz = fzList[i] + if (se ~= math.floor(fz.card / 100)) then + return false + end + end + for i=1,#cardInhand do + if (se ~= math.floor(cardInhand[i] / 100)) then + return false + end + end + return true +end + + + +local function jiangjiang(fzList, cardInhand,drawCard) + if (drawCard % 100 ~= 2 and drawCard % 100 ~= 5 and drawCard % 100 ~= 8) then + return false + end + for i=1,#fzList do + local fz = fzList[i] + if (fz.type == FZType.Chi) then + return false + end + if (fz.card % 100 ~= 2 and fz.card % 100 ~= 5 and fz.card % 100 ~= 8) then + return false + end + end + for i=1,#cardInhand do + local card = cardInhand[i] + if (card % 100 ~= 2 and card % 100 ~= 5 and card % 100 ~= 8) then + return false + end + end + return true +end + +local function checkQidui(cardList) + if (#cardList== 0) then + return true + end + local card = cardList[1] + if (cardNum(card, cardList) >= 2) then + removeCard(cardList, card, 2) + if checkQidui(cardList) then + return true + end + end +end + +local function qixiaodui(cardInhand, drawCard) + if (#cardInhand ~= 13) then + return false + end + + local cardlist = membe_clone(cardInhand) + cardlist[#cardlist+1] = drawCard + return checkQidui(cardlist) +end + + +local function CheckPengPeng(cardList, jiang) + if (#cardList== 0) then + return true + end + local card = cardList[1] + if (cardNum(card, cardList) >= 3) then + removeCard(cardList, card, 3) + return CheckPengPeng(cardList, jiang) + elseif (cardNum(card, cardList) == 2) and not jiang then + removeCard(cardList, card, 3) + jiang = true + return CheckPengPeng(cardList, jiang) + end +end +local function pengpenghu(cardInhand, fzList, drawCard) + for i = 1, #fzList do + local tem = fzList[i] + if tem.type == FZType.Chi then + return false + end + end + local cardlist = membe_clone(cardInhand) + cardlist[#cardlist+1] = drawCard + return CheckPengPeng(cardlist, false) +end + +function M.tingPai(cardInhand,fzList) + local self = setmetatable({}, {__index = M}) + local tingList = {} + if not cardInhand or #cardInhand == 0 then + return tingList + end + for k=100,300,100 do + for i=1,9 do + local tem = k + i + local result = false + result = qixiaodui(cardInhand,tem) + if not result then + result = quanqiuren(cardInhand,tem) + end + if not result then + result = jiangjiang(fzList,cardInhand,tem) + end + if not result then + if qingyise(fzList,cardInhand,tem) then + result = init(self,cardInhand,tem,false) + else + result = init(self,cardInhand,tem,true) + end + end + if not result then + result = pengpenghu(cardInhand, fzList, tem) + end + if(result) then + tingList[#tingList + 1] = tem + end + end + end + return tingList +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/changsha/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/changsha/EXClearingView.lua new file mode 100644 index 00000000..aa59ffac --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/changsha/EXClearingView.lua @@ -0,0 +1,557 @@ +require("Game.View.ResultView") +local CS_Win_Type = import(".CS_Win_Type") + +local CS_ClearingView = {} + +local M = CS_ClearingView + +function CS_ClearingView.new(blur_view) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self._full = true + ResultView.init(self, "ui://Main_Majiang/clearing") + + self._currenIndex = 0 + self._blur_view = blur_view + self._close_zone = false + self._close_destroy = true + + self.xiPaiCtr=self._view:GetController("xipai") + + self:InitMaPai() + return self +end + + +function M:InitMaPai() + self.maPaiCtr=self._view:GetController("mapai") + self.maPaiCtr.selectedIndex=0 + + self.maPaiList={} + + for i=1,10 do + local tempMP=self._view:GetChild("niao"..i) + table.insert(self.maPaiList,tempMP) + end + +end + + +function M:IsMapaiShow(niao,isShow) + if niao then + niao.visible=isShow + end +end + + +function M:SetMaPaiValue(niao,value) + if niao then + niao.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..value + end +end + +function M:SetMaPaiColor(niao,num) + niao:GetController("color").selectedIndex=num +end + +function M:HideAllMapai() + for i=1,#self.maPaiList do + self:IsMapaiShow(self.maPaiList[i],false) + self:SetMaPaiColor(self.maPaiList[i],0) + end +end + + + +function M:ShowSelectMaPai(niaoList) + if niaoList and #niaoList>0 then + self.maPaiCtr.selectedIndex=1 + self:HideAllMapai() + for i=1,#niaoList do + self:IsMapaiShow(self.maPaiList[i],true) + self:SetMaPaiValue(self.maPaiList[i],niaoList[i].card) + if niaoList[i].score>0 then + self:SetMaPaiColor(self.maPaiList[i],2) + end + end + else + self.maPaiCtr.selectedIndex=0 + end +end + + +function M:InitData(over, room, result, total_result, callback) + self._callback = callback + local _overCtr = self._view:GetController("over") + local btn_confirm = self._view:GetChild("btn_confirm") + local btn_result = self._view:GetChild("btn_showResult") + local btn_close = self._view:GetChild("big_result"):GetChild("btn_close") + local _btnCtr = self._view:GetController("button") + local _sdkCtr = self._view:GetController("sdk") + local ctr_type = self._view:GetController("type") + self._view:GetChild("tex_roominfo").text = string.format("房号%s 局%s/%s %s", room.room_id, room.curren_round, room.room_config.round, os.date("%Y-%m-%d %H:%M:%S", os.time())) + self._view:GetChild("tex_gameinfo").text = string.gsub(room.room_config:GetDes(), "\r", "") + -- self._view:GetChild("tex_roomnum").text = room.room_id + -- self._view:GetChild("tex_data").text = os.date("%Y-%m-%d %H:%M", os.time()) + -- self._view:GetChild("tex_time").text = os.date("%H:%M", os.time()) + + local paixingxiangqing=self._view:GetChild("btn_detal") + paixingxiangqing.visible=false + local fanhuipaixing=self._view:GetChild("btn_fanhuipaixing") + fanhuipaixing.visible=false + + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig and round>1 then + self.xiPaiCtr.selectedIndex=1 + else + self.xiPaiCtr.selectedIndex=0 + end + + + if result then + self:ShowSelectMaPai(result.niao) + end + + + if over ~= 2 then + local xipai=self._view:GetChild("btn_xipai") + xipai.touchable=true + xipai.onClick:Add(function() + local xiPaiCallBack=function () + xipai.touchable=false + self.xiPaiCtr.selectedIndex=0 + ViewUtil.ErrorTip(1000000,"申请洗牌成功") + end + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendXiPaiAction(xiPaiCallBack) + end) + if result and result.xipai_score then + --xipai.text="洗牌 积分x"..result.xipai_score + end + + if result.liuju then + ctr_type.selectedIndex = 3 + else + local info_list = result.info_list + for i = 1, #info_list do + local is_win = info_list[i].is_win + if is_win then + if info_list[i].seat == room.self_player.seat then + ctr_type.selectedIndex = 1 + else + ctr_type.selectedIndex = 2 + end + end + end + end + if over == 0 then + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + btn_confirm.onClick:Add(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:DestroyWithCallback() + end) + self:AddClearItem(room, result.info_list, nil, over, result.niao, result.active_player) + elseif over == 1 then + self.xiPaiCtr.selectedIndex=0 + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add(function() + _overCtr.selectedIndex = 1 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + self.maPaiCtr.selectedIndex=0 + if self._qsinfo_view then + self._qsinfo_view:Dispose() + end + end) + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + self:AddClearItem(room, result.info_list, total_result.info_list, over, result.niao, result.active_player) + end + else + self.xiPaiCtr.selectedIndex=0 + _overCtr.selectedIndex = 1 + self.maPaiCtr.selectedIndex=0 + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + self:AddClearItem(room, nil, total_result.info_list, over) + end +end + +function M:AddClearItem(room, data, total_data,over, niao, active_player) + local n = over + 1 + local list_view1 = self._view:GetChild("player_list_1") + local list_view2 = self._view:GetChild("player_list_2") + if 0 == over or 1 == over then + -- 把鸟放到中的人列表中 + for i = 1, #niao do + if niao[i].score > 0 then + local p = room:GetPlayerById(niao[i].playerId) + for j = 1, #data do + if data[j].seat == p.seat then + if not data[j].niao then + data[j].niao = {} + end + table.insert(data[j].niao, niao[i].card) + end + end + end + end + table.sort(data, function(a,b) return a.seat > b.seat end) + list_view1:RemoveChildrenToPool() + for i=1,#data do + local item = list_view1:AddItemFromPool() + self:FillItemData(room, data[i], item, active_player, niao) + end + if #data == 3 then + list_view1.lineGap = 54 + elseif #data == 2 then + list_view1.lineGap = 108 + end + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end +end + +function M:FillItemData(room, data, item, active_player) + local _gamectr = ControllerManager.GetController(GameController) + local p = room:GetPlayerBySeat(data["seat"]) + item:GetChild("playerName").text = p.self_user.nick_name + if data.win_count > 3 then + item:GetController("mult_win").selectedIndex = 1 + -- item:GetChild("tex_win_count").text = string.char(97 + data.win_count - 4) .. "连" + end + + local huadd = data["hu_score"] + local qsadd = data["qs_score"] + local birdadd = data["niao_score"] + local qs_niao_list = data["qs_niao_list"] + local total = data["round_score"] + + -- if room.room_config.fengding and huadd + birdadd >= 28 then + if data.fengding then + item:GetController("fengding").selectedIndex = 1 + else + item:GetController("fengding").selectedIndex = 0 + end + + local sp = " " + local str = "胡:"..huadd.."分" + str = str..sp.."扎鸟:"..birdadd.."分" + str = str..sp.."起手胡:"..qsadd.."分" + -- if #qs_niao_list > 0 then + -- str = str .. "(摇骰点数:" .. qs_niao_list[1].card .. " " .. qs_niao_list[2].card .. ")" + -- end + if data["piao_niao_score"] then + str = str..sp.."飘鸟:"..data["piao_niao_score"].."分" + end + item:GetChild("score1").text = str + local win_list = data["win_list"] + local remove_win_card = true + if win_list then + local str1 = "" + item:GetController("hu_list").selectedIndex = 1 + for i = 1, #win_list do + local str2 = "" + if win_list[i].type == 1 then + local value = win_list[i].value + str2 = value == 1 and "" or (value == 2 and "豪华" or (value == 3 and "双豪华" or "三豪华")) + str2 = str2 .. "小七对" + else + if win_list[i].type == 5 then + remove_win_card = false + end + str2 = CS_Win_Type[win_list[i].type] + end + str1 = str1..str2..sp + end + item:GetChild("score3").text = str1 + end + + -- 手牌 + local hand_cards = data["hand_card"] + table.sort(hand_cards, ViewUtil.HandCardSort) + local hand_list_view = item:GetChild("hand_card_list") + hand_list_view:RemoveChildrenToPool() + if data["is_win"] and active_player == p.self_user.account_id and remove_win_card then + list_remove(hand_cards, data["win_card"]) + end + for i=1,#hand_cards do + local card = hand_list_view:AddItemFromPool() + card.icon = "ui://Main_Majiang/" .. self:GetPrefix() .. "202_"..hand_cards[i] + end + hand_list_view.width = 52 * #hand_cards + + local fz_card = p.fz_list + local fz_card_list = item:GetChild("fz_card_list") + fz_card_list.width = 157 * #fz_card * 0.8 + fz_card_list:RemoveChildrenToPool() + for i=1,#fz_card do + if fz_card[i].type == FZType.Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j=1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/" .. self:GetPrefix() .. "202_"..fz_card[i].card + end + elseif fz_card[i].type == FZType.Chi then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j = 1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/" .. self:GetPrefix() .. "202_"..fz_card[i].opcard[j] + end + elseif fz_card[i].type == FZType.Gang or fz_card[i].type == FZType.Gang_An or fz_card[i].type == FZType.Gang_Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_4") + for j=1,4 do + local card = item:GetChild("card_" .. j) + if fz_card[i].type == FZType.Gang_An and j == 4 then + card.icon = "ui://Main_Majiang/202_00" + else + card.icon = "ui://Main_Majiang/" .. self:GetPrefix() .. "202_"..fz_card[i].card + end + end + end + end + + -- local total_score = data["total_score"] + if total >= 0 then + item:GetChild("score2").text = "+"..total + item:GetChild("score2").grayed = false + else + item:GetChild("score2").text = total + item:GetChild("score2").grayed = true + end + + local hp_nonnegative = room:checkHpNonnegative() + item:GetController("nonnegative").selectedIndex = hp_nonnegative and 1 or 0 + if hp_nonnegative then + local hp_info = data.hp_info + local ctr_hp_limit = item:GetController("hp_limit") + local hp = d2ad(hp_info.round_actual_hp) + if hp >= 0 then hp = "+" .. tostring(hp) end + item:GetChild("tex_hp").text = hp + ctr_hp_limit.selectedIndex = hp_info.upper_limit and 1 or 0 + end + + local is_win = data["is_win"] or false + item:GetController("win").selectedIndex = is_win and 0 or 1 + --print(p.self_user.account_id, active_player) + if p.self_user.account_id == active_player and is_win == false and not data["liuju"] then + item:GetController("win").selectedIndex = 2 + end + local win_card = item:GetChild("win_card") + if is_win then + win_card.icon = "ui://Main_Majiang/" .. self:GetPrefix() .. "202_"..data["win_card"] + end + if data.niao then + item:GetController("niao").selectedIndex = 1 + local lst_niao = item:GetChild("list_niao") + lst_niao:RemoveChildrenToPool() + local niao = data.niao + for i = 1, #niao do + local card_niao = lst_niao:AddItemFromPool() + card_niao.icon = "ui://Main_Majiang/" .. self:GetPrefix() .. "202_" .. niao[i] + end + end + if p.seat == room.banker_seat then + item:GetController("bank").selectedIndex = 1 + end + + -- item.onClick:Set(function() + -- self:__AddQSInfo(data.qs_info_list, p.self_user.nick_name, room) + -- end) +end + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + player_list[i].id = user.account_id + player_list[i].hp_info = data[i].hp_info + player_list[i].score = data[i].total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + + local settle_log = data[i].settle_log + player_list[i].param = {} + player_list[i].param[1]={} + player_list[i].param[1].key = "大胡自摸:" + player_list[i].param[1].value = tostring(data[i].settle_log.da_zimo) + player_list[i].param[2]={} + player_list[i].param[2].key = "小胡自摸:" + player_list[i].param[2].value = tostring(data[i].settle_log.xiao_zimo) + player_list[i].param[3]={} + player_list[i].param[3].key = "大胡接炮:" + player_list[i].param[3].value = tostring(data[i].settle_log.da_jie_pao) + player_list[i].param[4]={} + player_list[i].param[4].key = "小胡接炮:" + player_list[i].param[4].value = tostring(data[i].settle_log.xiao_jie_pao) + player_list[i].param[5]={} + player_list[i].param[5].key = "大胡点炮:" + player_list[i].param[5].value = tostring(data[i].settle_log.da_dian_pao) + player_list[i].param[6]={} + player_list[i].param[6].key = "小胡点炮:" + player_list[i].param[6].value = tostring(data[i].settle_log.xiao_dian_pao) + end + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + -- self:SetGSListlineGap(-10) + + local big_result = self._view:GetChild("big_result") + big_result:GetChild("txt_room_info").text = string.format("%s 房号%s 局%s/%s", os.date("%Y/%m/%d", os.time()), room.room_id, room.curren_round, room.room_config.round) + local lst_p = big_result:GetChild("player_list") + if #player_list == 3 then + lst_p.columnGap = 108 + elseif #player_list == 2 then + lst_p.columnGap = 208 + end + self:InitBigResult(room, 30) + local show_detail = room.hpOnOff == 1 + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + if show_detail then + local score = 0 + if com_p:GetController("pn").selectedIndex == 0 then + score = com_p:GetChild("txt_navigate").text + else + score = com_p:GetChild("txt_positive").text + end + score = score / room.score_times + com_p:GetChild("tex_detail_score").text = string.format("%s × %s倍", score, room.score_times) + end + end + if room.group_id ~= 0 then + big_result:GetController("group").selectedIndex = 1 + end + DataManager.CurrenRoom = nil +end + +-- 起手胡详情 +function M:__AddQSInfo(data, nick, room) + if self._qsinfo_view then + self._qsinfo_view:Dispose() + end + local qsinfo = UIPackage.CreateObjectFromURL("ui://Extend_MJ_ChangSha/qs_info") + self._qsinfo_view = qsinfo + qsinfo:GetChild("btn_close").onClick:Add(function() + qsinfo:Dispose() + end) + qsinfo:GetChild("tex_nick").text = nick + local lst_qs = qsinfo:GetChild("lst_qs") + lst_qs:RemoveChildrenToPool() + if #data > 0 then + for i = 1, #data do + local tem = data[i] + local item = lst_qs:AddItemFromPool() + local lst_card = item:GetChild("lst_card") + -- 整理起手胡板牌 + local card_map = {} + for j = 1, #tem.win_list do + local opcard = tem.win_list[j].opcard + local cards = {} + for k = 1, #opcard do + local card = opcard[k] + if cards[card] then + cards[card] = cards[card] + 1 + else + cards[card] = 1 + end + end + for k,v in pairs(cards) do + local card = k + if card_map[card] then + if card_map[card] < cards[card] then + card_map[card] = cards[card] + end + else + card_map[card] = cards[card] + end + end + end + local all_cards = {} + for j,v in pairs(card_map) do + for k = 1, v do + table.insert(all_cards, j) + end + end + table.sort(all_cards) + for j = 1, #all_cards do + local citem = lst_card:AddItemFromPool() + citem.touchable = false + citem.icon = "ui://Main_Majiang/" .. self:GetPrefix() .. "202_"..all_cards[j] + end + local cs_zhua_niao = room.room_config.niao_type == 2 + qsinfo:GetController("niao").selectedIndex = cs_zhua_niao and 1 or 0 + item:GetChild("tex_touzi").text = cs_zhua_niao and (tem.niao[1].card .. " " .. tem.niao[2].card) or "" + item:GetChild("tex_score").text = tem.score + item:GetChild("tex_niao_score").text = cs_zhua_niao and tem.niao_score or "" + end + else + qsinfo:GetController("c1").selectedIndex = 1 + end + if #data > 1 then + qsinfo.height = qsinfo.height + 56 * (#data - 1) + end + + local _view_start_pos = nil + local _touch_start_pos = nil + self._view:AddChild(qsinfo) + local btn_di = qsinfo:GetChild("btn_di") + btn_di.onTouchBegin:Add(function(context) + _view_start_pos = Vector2(qsinfo.x, qsinfo.y) + _touch_start_pos = self._view:GlobalToLocal(Vector2(context.inputEvent.x, context.inputEvent.y)) + end) + btn_di.onTouchMove:Add(function(context) + local xy = self._view:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + local dist = Vector2(xy.x - _touch_start_pos.x, xy.y - _touch_start_pos.y) + local posx = _view_start_pos.x + dist.x + local posy = _view_start_pos.y + dist.y + local max_x = self._view.width - qsinfo.width + local max_y = self._view.height - qsinfo.height + qsinfo.x = posx < 0 and 0 or posx > max_x and max_x or posx + qsinfo.y = posy < 0 and 0 or posy > max_y and max_y or posy + end) + qsinfo:Center() +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild("btn_head") + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= "" then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end + +local prefix +function M:GetPrefix() + -- if not prefix then + prefix = get_majiang_prefix(10) + -- end + return prefix +end + +function M:DestroyWithCallback() + if self._callback then + self._callback() + end + self:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/changsha/EXGameController.lua b/lua_probject/extend_project/extend/majiang/changsha/EXGameController.lua new file mode 100644 index 00000000..8ec6da53 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/changsha/EXGameController.lua @@ -0,0 +1,427 @@ +local CS_Protocol = import(".Protocol") +local FZTipList = require("main.majiang.FZData") +local CS_GameEvent = import(".CS_GameEvent") + +local M = {} + +--- Create a new CS_GameController +function M.new() + setmetatable(M,{__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("测试麻将") + self.class = "CS_GameController" + return self +end + +function M:init(name) + GameController.init(self,name) + + self._eventmap[CS_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[CS_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[CS_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[CS_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[CS_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[CS_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + self._eventmap[CS_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[CS_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[CS_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[CS_Protocol.GAME_EVT_RESULT2] = self.OnEventResult2 + self._eventmap[CS_Protocol.GAME_EVT_NIAO] = self.OnEventNiao + + self._eventmap[CS_Protocol.GAME_EVT_QSTIP] = self.OnEventQSTip + self._eventmap[CS_Protocol.GAME_EVT_QSWIN] = self.OnEventQSAction + self._eventmap[CS_Protocol.GAME_EVT_OPENKONG] = self.OnEventKaiGang + self._eventmap[CS_Protocol.GAME_EVT_HAIDI] = self.OnEventHaidi + self._eventmap[CS_Protocol.GAME_EVT_PIAOTIP] = self.OnEventPiaoTip + self._eventmap[CS_Protocol.GAME_EVT_PIAO] = self.OnEventPiao + self._eventmap[CS_Protocol.GAME_EVT_TING_TIP] = self.OnEventTingTip + self._eventmap[CS_Protocol.GAME_EVT_TING] = self.OnEventTing + self._eventmap[CS_Protocol.GAME_EVENT_XIPAI] = self.OnEventXiPai + self._eventmap[CS_Protocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim +end + +local __pre_delete_card = false +-- 发送出牌指令到服务器 +function M:SendOutCard(card, callback) + local _room = self._room + local p = _room.self_player + + local _data = {} + _data["card"] = card + _data["card_list"] = p.card_list + if p.outcard_list and #p.outcard_list>0 then + _data["outcard_list"] = p.outcard_list + end + + + local _client = ControllerManager.GameNetClinet + _client:send(CS_Protocol.GAME_DIS_CARD, _data) + + -- 进行预删牌处理 + + _room.curren_outcard_seat = -1 + list_remove(p.card_list,card) + table.sort(p.card_list, ViewUtil.HandCardSort) + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + __pre_delete_card = true + callback() +end + +-- 发送放子选择到服务器 +function M:SendAction(id) + local _data = {} + _data["id"] = id + local _client = ControllerManager.GameNetClinet + _client:send(CS_Protocol.GAME_ACTION, _data) +end + + +function M:SendXiPaiAction(callBack) + local _data = {} + local _client = ControllerManager.GameNetClinet + _client:send(CS_Protocol.GAME_XIPAI, _data) + self.XiPaiCallBack=callBack +end + +function M:OnEventXiPai(evt_data) + if evt_data["result"]==0 then + if self.XiPaiCallBack then + self.XiPaiCallBack() + end + else + ViewUtil.ErrorTip(1000000,"申请洗牌失败") + end + +end + + + +function M:OnEventXiPaiAnim(evt_data) + printlog("洗牌动画===》》》》") + pt(evt_data) + local playeridList = evt_data["list"] + local my_isXiPai=false + local other_isXiPai=false + if playeridList and #playeridList>0 then + for i=1,#playeridList do + local p = self._room:GetPlayerById(playeridList[i]) + if p== self._room.self_player then + my_isXiPai=true + else + other_isXiPai=true + end + end + end + + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,CS_GameEvent.EventXiPai,my_isXiPai,other_isXiPai) + end) +end + + +function M:OnEventSendCards(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + local _room = self._room + -- if(_room.CurnrenState == StateType.Ready) then + -- _room.CurnrenState = StateType.Palying + -- end + -- _room.curren_round = _room.curren_round + 1 + _room.curren_round = evt_data["round"] + if _room.curren_round > 0 then _room.playing = true end + + -- _room.SelfPlayer.AutoOutCard = false + local handcards = evt_data["card_list"] + local p = _room.self_player + local seat = evt_data["bank_seat"] + local left_count = evt_data["left_count"] + self._cacheEvent:Enqueue(function() + _room.banker_seat = seat + for i=1,#_room.player_list do + _room.player_list[i].hand_left_count = _room.player_list[i].seat == _room.banker_seat and 14 or 13 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + end + p.card_list = handcards + self._room.self_player.hand_left_count = #handcards + table.sort( handcards, ViewUtil.HandCardSort ) + DispatchEvent(self._dispatcher,CS_GameEvent.SendCards, left_count) + end) +end + +function M:OnEventOutCard(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + if seat == _room.self_player.seat and __pre_delete_card then + __pre_delete_card = false + else + if seat == _room.self_player.seat then + list_remove(p.card_list, card) + table.sort(p.card_list, ViewUtil.HandCardSort) + end + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + DispatchEvent(self._dispatcher,CS_GameEvent.OutCard, p, card) + end + end) +end + + +function M:OnEventTakeCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + p.hand_left_count = p.hand_left_count +1 + if (seat == _room.self_player.seat) then + _room.self_player.card_list[#_room.self_player.card_list+1] = card + -- table.sort( _room.self_player.card_list, ViewUtil.HandCardSort ) + end + DispatchEvent(self._dispatcher,CS_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnEventOutHint(evt_data) + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,CS_GameEvent.OutHint, evt_data) + end) +end + +function M:OnEventTurn(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,CS_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + for i=1,#list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + tip.opcard = dtip["opcard"] + tiplist:AddTip(tip) + end + DispatchEvent(self._dispatcher,CS_GameEvent.FZTips, tiplist) + end) +end + +function M:OnEventFzAction(evt_data) + local _room = self._room + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local type = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + local opengang = evt_data["opengang"] + -- local openkong = evt_data["openkong"] + + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local fz = nil + local index = -1 + local ftype = type + if (ftype == FZType.Gang_Peng) then + for i=1,#p.fz_list do + if (p.fz_list[i].card == card) then + p.fz_list[i].card = card + fz = p.fz_list[i] + fz.type = type + index = i -1 + break + end + end + end + fz = {} + fz.card = card + fz.type = type + fz.opengang = opengang + if (index == -1) then + if (ftype == FZType.Chi) then + local data ={} + data[1] = opcard[1] + data[2] = card + data[3] = opcard[2] + fz.opcard =data + end + p.fz_list[#p.fz_list+1] = fz + end + fz.from_seat = from_seat + local remove_num = #opcard + + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(p.card_list,opcard[i]) + end + end + + p.hand_left_count = p.hand_left_count - remove_num + if not (fz.type == FZType.Gang_An or (fz.type == FZType.Gang_Peng and not fz.opengang)) then + -- if (fz.Type == FZType.Chi) then card = actice_card end + local fp = _room:GetPlayerBySeat(from_seat) + if card == fp.outcard_list[#fp.outcard_list] then + table.remove(fp.outcard_list,#fp.outcard_list) + else + table.remove(fp.outcard_list,#fp.outcard_list - 1) + end + end + + DispatchEvent(self._dispatcher,CS_GameEvent.FangziAction, fz, p, index) + end) +end + +function M:OnEventHu(evt_data) + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local win_card = evt_data["win_card"] + local win_list = evt_data["win_list"] + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + table.sort( win_p.card_list, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher,CS_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], win_card, cards, win_list) + end) +end + +function M:OneventResult1(evt_data) + local over = evt_data.type + --0:小结算 1:小大结算 2:大结算 + self._room.playing = false + if 0 == over then + local result = evt_data.result + self._cacheEvent:Enqueue(function() + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + DispatchEvent(self._dispatcher,CS_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil,true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,CS_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +function M:OnEventNiao(evt_data) + local list = evt_data["niao"] + local start_seat = evt_data["start_seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,CS_GameEvent.EventNiao, list, start_seat) + end) +end + +function M:OnEventQSTip(evt_data) + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,CS_GameEvent.EventQSTip, evt_data) + end) +end + +function M:OnEventQSAction(evt_data) + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,CS_GameEvent.EvnetQSAction, evt_data) + end) +end + +function M:OnEventKaiGang(evt_data) + local seat = evt_data["seat"] + local p = self._room:GetPlayerBySeat(seat) + local cardList = evt_data.info.cardList + local card = evt_data.card + self._room.remain_cards = evt_data.left_count + self._cacheEvent:Enqueue(function() + for i = 1, #cardList do + p.outcard_list[#p.outcard_list + 1] = cardList[i] + end + DispatchEvent(self._dispatcher,CS_GameEvent.EventKaiGang, evt_data, self._room.self_player.outcard_list) + end) +end + +function M:OnEventHaidi() + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,CS_GameEvent.EvnetHaiDi, evt_data) + end) +end + +function M:OnEventPiaoTip(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + self._cacheEvent:Enqueue(function() + self._room.playing = true + DispatchEvent(self._dispatcher,CS_GameEvent.EvnetPiaoTip, evt_data) + end) +end + +function M:OnEventTingTip() + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,CS_GameEvent.EventTingTip) + end) +end + +function M:OnEventTing(evt_data) + self._cacheEvent:Enqueue(function() + local seat = evt_data.seat + DispatchEvent(self._dispatcher,CS_GameEvent.EventTing, seat) + end) +end + +function M:OnEventPiao(evt_data) + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,CS_GameEvent.EvnetPiao, evt_data.seat, evt_data.num) + end) +end + +function M:GetPosString( seat ) + if DataManager.CurrenRoom.room_config.people_num ~= 4 then return"" end + if seat == 1 then + return "北" + elseif seat == 2 then + return "西" + elseif seat == 3 then + return "南" + elseif seat == 4 then + return "东" + end +end + +function M:Discard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + -- list_remove(_room.SelfPlayer.Cards,card) + -- table.sort(_room.SelfPlayer.Cards) + _client:send(CS_Protocol.Game_Da, _data) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/changsha/EXGameInfo.lua b/lua_probject/extend_project/extend/majiang/changsha/EXGameInfo.lua new file mode 100644 index 00000000..3fb426e2 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/changsha/EXGameInfo.lua @@ -0,0 +1,338 @@ +local EXGameInfo = {} + +local M = EXGameInfo + + +function EXGameInfo.new(blur_view) + setmetatable(M, { __index = IGameInfo }) + local self = setmetatable({}, { __index = M }) + self.class = "EXGameInfo" + + UIPackage.AddPackage("extend/majiang/changsha/ui/Info_MJ_ChangSha") + return self +end + +function M:FillData() + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 4 -- 回合选项数 + if oldGameVersion == 1 then + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_ChangSha/Cgm_create_room") + else + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_ChangSha/Cgm_create_room_yueyang") + end + + if oldGameVersion == 2 then + self._config:GetController("xipai").selectedIndex = 0 + + self.xipaiValueText = self._config:GetChild('xipaifen') + self.xipaiValueText.text = 1 + self.xipaiValue = 1 + + self.anchouValueText = self._config:GetChild('anchoufen') + self.anchouValueText.text = 1 + self.anchouValue = 1 + + local btn_cr = self._config:GetChild('sdsrbtn') + btn_cr.onClick:Set( + function() + local gniv = GroupNumberInputView_Game.new(nil, function(num) + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == -1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1, "输入数据异常!") + end + + self.xipaiValueText.text = value / 1000 + self.xipaiValue = value / 1000 + end, 3, nil) + gniv:Show() + end + ) + + + local btn_cr2 = self._config:GetChild('anchoubtn') + btn_cr2.onClick:Set( + function() + local gniv = GroupNumberInputView_Game.new(nil, function(num) + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == -1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1, "输入数据异常!") + end + + self.anchouValueText.text = value / 1000 + self.anchouValue = value / 1000 + end, 3, nil) + gniv:Show() + end + ) + end +end + +local _help_url = "ui://Info_MJ_ChangSha/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_MJ_ChangSha/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_MJ_ChangSha/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list = {} --{"长沙麻将","三人长沙","二人长沙"} +function M:GetPlayList() + return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + 1 --== 0 and 1 or 2 + self._maxPlayer = _config:GetController("play_list").selectedIndex + 2 + + local zhuangxian = _config:GetChild("btn_zhuangxian").selected and true or false + -- local piaofen = _config:GetChild("btn_piaofen").selected and true or false + local zimo = _config:GetChild("btn_zimo").selected and true or false + local AA = _config:GetController("Cost").selectedIndex + -- local liuliushun = _config:GetChild("btn_liuliushun").selected and true or false + -- local queyise = _config:GetChild("btn_queyise").selected and true or false + -- local banbanhu = _config:GetChild("btn_banbanhu").selected and true or false + -- local dasixi = _config:GetChild("btn_dasixi").selected and true or false + local jiejiegao = _config:GetChild("btn_jiejiegao").selected and true or false + local santong = _config:GetChild("btn_santong").selected and true or false + local yizhihua = _config:GetChild("btn_yizhihua").selected and true or false + local zhongtusixi = _config:GetChild("btn_zhongtusixi").selected and true or false + local zhongtuliuliushun = _config:GetChild("btn_zhongtuliuliushun").selected and true or false + + local niao_type = _config:GetController("niao").selectedIndex + local niao_num = _config:GetController("niao_num").selectedIndex + local niao_db_num = _config:GetController("niao_db_num").selectedIndex + local niao = niao_type == 1 and (niao_db_num == 0 and 1 or 2) or + (niao_type == 0 and (niao_num == 0 and 2 or (niao_num == 1 and 4 or 6)) or 2) + local piao_niao = _config:GetChild("btn_piao_niao").selected + local two_pair = _config:GetChild("btn_two_pair").selected + local no_jiang = _config:GetChild("btn_no_jiang").selected + local four_win = _config:GetChild("btn_four_win").selected + local native_hu = _config:GetChild("btn_native_hu").selected + local queyimen = _config:GetChild("btn_queyimen").selected + local fengding = _config:GetChild("btn_fengding").selected + local banyiquan = _config:GetChild("btn_banyiquan").selected + local menqing = _config:GetChild("btn_menqing").selected + + local fengding_score = 0 + if _config:GetController("fengding") then + fengding_score = _config:GetController("fengding").selectedIndex + end + + local piao_niao1 = 0 + if _config:GetController('piao') then + piao_niao1 = _config:GetController('piao').selectedIndex + end + local piao1 = false + local piao2 = false + local piao3 = false + local piao_niao_opt = 0 + if piao_niao1 == 2 then + piao_niao_opt = _config:GetController("piaofen").selectedIndex + end + + local xi_pai = false + local xi_paifen = 0 + if _config:GetChild("xipai") then + xi_pai = _config:GetChild("xipai").selected + end + + local niaofen_opt = 0 + local niaofen_score = 1 + local difen_score = 1 + local kai_gong = 0 + if oldGameVersion == 2 then + niaofen_opt = _config:GetController("niaoadd").selectedIndex + niaofen_score = tonumber(_config:GetController("niaodf").selectedPage) + difen_score = tonumber(_config:GetController("jcdifen").selectedPage) + kai_gong = _config:GetController("kaigang").selectedIndex + end + + + --------- + local _data = {} + _data["opt"] = round + _data["maxPlayers"] = self._maxPlayer + + _data["zhuangxian"] = zhuangxian + _data["zimo"] = zimo + _data["AA"] = AA + -- _data["piaofen"] = piaofen + -- _data["liuliushun"] = liuliushun + -- _data["queyise"] = queyise + -- _data["banbanhu"] = banbanhu + -- _data["dasixi"] = dasixi + _data["jiejiegao"] = jiejiegao + _data["santong"] = santong + _data["yizhihua"] = yizhihua + _data["zhongtusixi"] = zhongtusixi + _data["zhongtuliuliushun"] = zhongtuliuliushun + + _data["niao_type"] = niao_type + + + if oldGameVersion == 1 then + _data["niao"] = niao + else + _data["niao"] = tonumber(_config:GetController("niao_num").selectedPage) + end + + + if oldGameVersion == 1 then + _data["piao_niao"] = piao_niao + else + _data["piao_niao"] = piao_niao1 + end + _data["two_pair"] = two_pair + _data["no_jiang"] = no_jiang + _data["four_win"] = four_win + _data["native_hu"] = native_hu + _data["queyimen"] = queyimen + _data["fengding"] = fengding + _data["banyiquan"] = banyiquan + _data["menqing"] = menqing + _data["fengding_score"] = fengding_score + --_data['piao'] = piao + _data['piao1'] = piao1 + _data['piao2'] = piao2 + _data['piao3'] = piao3 + + auto_piao = false + if piao_niao1 == 2 then + if piao1 or piao2 or piao3 then + auto_piao = true + end + end + + if oldGameVersion == 2 then + _data['auto_piao'] = auto_piao + end + + _data['xi_pai'] = xi_pai + _data['piao_niao_opt'] = piao_niao_opt + + local xi_pai_score = 0 + local an_chou_score = 0 + if oldGameVersion == 2 then + xi_pai_score = self.xipaiValue + an_chou_score = self.anchouValue + end + + _data['xi_pai_score'] = xi_pai_score * 1000 + _data['an_chou_score'] = an_chou_score * 1000 + + if oldGameVersion == 2 then + _data['niaofen_opt'] = niaofen_opt + _data['niaofen_score'] = niaofen_score + _data['difen_score'] = difen_score + _data['kai_gong'] = kai_gong + end + + pt(_data) + return _data +end + +function M:LoadConfigData(data) + pt(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt - 1 -- == 1 and 0 or 1 + _config:GetController("play_list").selectedIndex = data.maxPlayers - 2 + + _config:GetChild("btn_zhuangxian").selected = data.zhuangxian + _config:GetChild("btn_zimo").selected = data.zimo + _config:GetController("Cost").selectedIndex = data.AA + -- _config:GetChild("btn_piaofen").selected = data.piaofen + -- _config:GetChild("btn_liuliushun").selected = data.liuliushun + -- _config:GetChild("btn_queyise").selected = data.queyise + -- _config:GetChild("btn_banbanhu").selected = data.banbanhu + -- _config:GetChild("btn_dasixi").selected = data.dasixi + _config:GetChild("btn_jiejiegao").selected = data.jiejiegao + _config:GetChild("btn_santong").selected = data.santong + _config:GetChild("btn_yizhihua").selected = data.yizhihua + _config:GetChild("btn_zhongtusixi").selected = data.zhongtusixi + _config:GetChild("btn_zhongtuliuliushun").selected = data.zhongtuliuliushun + + _config:GetController("niao").selectedIndex = data.niao_type + + if oldGameVersion == 1 then + _config:GetController("niao_num").selectedIndex = data.niao_type ~= 0 and 0 or + (data.niao == 4 and 1 or (data.niao == 6 and 2 or 0)) + else + _config:GetController("niao_num").selectedIndex = data.niao / 2 - 1 + end + _config:GetController("niao_db_num").selectedIndex = data.niao_type ~= 1 and 0 or (data.niao == 1 and 0 or 1) + if oldGameVersion == 1 then + _config:GetChild("btn_piao_niao").selected = data.piao_niao + end + _config:GetChild("btn_two_pair").selected = data.two_pair + _config:GetChild("btn_no_jiang").selected = data.no_jiang + _config:GetChild("btn_four_win").selected = data.four_win + _config:GetChild("btn_native_hu").selected = data.native_hu + _config:GetChild("btn_queyimen").selected = data.queyimen + _config:GetChild("btn_fengding").selected = data.fengding or false + _config:GetChild("btn_banyiquan").selected = data.banyiquan or false + _config:GetChild("btn_menqing").selected = data.menqing or false + + if _config:GetController("fengding") then + _config:GetController("fengding").selectedIndex = data.fengding_score + end + + if _config:GetController("piao") then + _config:GetController("piao").selectedIndex = data.piao_niao + _config:GetChild('pf1').selected = data.piao1 + _config:GetChild('pf2').selected = data.piao2 + _config:GetChild('pf3').selected = data.piao3 + end + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected = data.xi_pai + end + + if _config:GetController("piaofen") then + _config:GetController("piaofen").selectedIndex = data.piao_niao_opt + end + + if oldGameVersion == 2 then + self.xipaiValueText.text = data.xi_pai_score / 1000 + self.xipaiValue = data.xi_pai_score / 1000 + + self.anchouValueText.text = data.an_chou_score / 1000 + self.anchouValue = data.an_chou_score / 1000 + end + + if oldGameVersion == 2 then + _config:GetController("niaoadd").selectedIndex = data.niaofen_opt or 0 + _config:GetController("niaodf").selectedIndex = data.niaofen_score - 1 + _config:GetController("jcdifen").selectedIndex = data.difen_score - 1 + _config:GetController("kaigang").selectedIndex = data.kai_gong + end +end + +function M:LoadConfigToDetail(data) + return data +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/changsha/EXMainView.lua b/lua_probject/extend_project/extend/majiang/changsha/EXMainView.lua new file mode 100644 index 00000000..2db670bf --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/changsha/EXMainView.lua @@ -0,0 +1,1186 @@ +local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = import(".MJPlayerCardInfoView") +local MJMainView = require("main.majiang.MJMainView") +local CS_ClearingView = import(".EXClearingView") +local CS_GameEvent = import(".CS_GameEvent") +local PlayerInfoView = import(".EXPlayerInfoView") +local HuTipView = import("main.majiang.HuTipView") +local SettingView = import("main.majiang.MJSettingViewNew") + +-- local Fix_Msg_Chat = { +-- "你真棒!", +-- "快点出牌咯", +-- "神仙怕左手", +-- "这个吃得好", +-- "天灵灵 地灵灵 来支好牌行不行", +-- "我一听牌你就自摸", +-- "做了一天的最佳炮手", +-- "摸了一天的烂牌", +-- "不要走 决战到天亮", +-- "大家小心 我马上自摸", +-- "上家是冤家 放个牌吃行不行", +-- "冲动是魔鬼 犹豫也是", +-- "这局我糊了 请大家吃饭", +-- "这牌来得有点着急 简直让人疯狂", +-- } + + +local M = {} + +--- Create a new CS_MainView +function M.new() + setmetatable(M,{__index = MJMainView}) + local self = setmetatable({}, {__index = M}) + self.class = "CS_MainView" + self.asset_group = "ChangSha_MJ" + self:init() + ViewUtil.PlayMuisc(self.asset_group, "extend/majiang/changsha/sound/bg.mp3") + + return self +end + +function M:InitView(url) + local room = self._room + self._style = 1 + self._gps_style = 1 + self._full = true + -- self.Fix_Msg_Chat = Fix_Msg_Chat + UIPackage.AddPackage("extend/majiang/changsha/ui/Extend_MJ_ChangSha") + MJMainView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num .. "_s2") + + + self._view:GetChild('wanfa_text').text = room.room_config.people_num .. '人长麻 ' .. room.score_times .. '倍' + + self.LaiziBG=self._view:GetChild('n103') + self.LaiziBG.text="鬼牌" + self.LaiziBG.visible=false + self.selectLaiziBtn=self._view:GetChild('selectlaizi') + self.Laizi1Btn=self._view:GetChild('selectlaizi1') + self.Laizi2Btn=self._view:GetChild('selectlaizi2') + self.Laizi1Btn.visible=false + self.Laizi2Btn.visible=false + self.selectLaiziBtn.visible=false + + self._hu_tip = HuTipView.new(self) + self:PlayerChangeLineState() + + --print("CS_MainView") + if (room.playing or room.curren_round > 0) or room.status == 1 then + self:ReloadRoom() + end +end + + +function M:NewMJPlayerCardInfoView(view,index) + if index == 1 then + return MJPlayerSelfCardInfoView.new(view,self) + end + return MJPlayerCardInfoView.new(view,self) +end + +function M:EventInit() + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _gcm_outcard_url = UIPackage.GetItemURL("Main_Majiang", "Gcm_OutCard") + local _player_info = self._player_info + local _gamectr = self._gamectr + + _gamectr:AddEventListener(CS_GameEvent.EventXiPai,function( ... ) + local arg = {...} + local currentPlayer1=arg[1] + local currentPlayer2=arg[2] + self._popEvent = false + if ( currentPlayer1 ) then + + local xipaiCB=function () + self._popEvent = true + end + self:PlayXiPai(xipaiCB) + + end + + + if ( currentPlayer2 ) then + --self._popEvent = false + local xipaiCB2=function () + self._popEvent = true + end + self:PlayXiPai1(xipaiCB2) + end + + + end) + + _gamectr:AddEventListener(CS_GameEvent.SendCards,function( ... ) + local arg = {...} + self._tex_LeftCard.text = arg[1] + local info = self._player_card_info[1] + info._player.auto_out_card = false + self:UpdateRound() + self._state.selectedIndex = 1 + local list = _room.player_list + for i=1,#list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateHandCard() + end + end) + _gamectr:AddEventListener(CS_GameEvent.EventTurn, function(...) + local arg = {...} + self._left_time = 15 + local seat = arg[1] + self:UpdateCardBox(self:GetPos(seat)) + end) + + _gamectr:AddEventListener(CS_GameEvent.OutHint, function(...) + local arg = {...} + local auto = arg[1].auto + if auto then + local p = self._room.self_player + local my_info = self._player_card_info[1] + if not my_info._player then info._player = {} end + my_info._player.auto_out_card = true + -- coroutine.start(function() + -- coroutine.wait(0.5) + -- self:OutCard(p.card_list[#p.card_list]) + -- end) + end + _room.curren_outcard_seat = _room.self_player.seat + --printlog("OutHint===>>>",_room.curren_outcard_seat) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:UpdateHandCard(true) + end) + + + local _gcm_outcard_url ="ui://Main_Majiang/Gcm_OutCard" + _gamectr:AddEventListener(CS_GameEvent.OutCard, function(...) + self:__CloseTip() + self:ClearQSHTips() + self._left_time = 0 + local arg = {...} + local p = arg[1] + local seat = p.seat + local card = arg[2] + local info = self._player_card_info[self:GetPos(seat)] + self:RemoveCursor() + info:UpdateHandCard() + local outcard = UIPackage.CreateObjectFromURL(_gcm_outcard_url) + info:UpdateOutCardList(outcard, card, self._cursor) + self:PlaySound(p.self_user.sex,tostring(card)) + self:PlayMJSound("chupai.mp3") + if seat == _room.self_player.seat then + _room.curren_outcard_seat = -1 + end + end) + _gamectr:AddEventListener(CS_GameEvent.GetCard, function(...) + self:__CloseTip() + if self.kg_card then + self.kg_card:Dispose() + end + local arg = {...} + local seat = arg[1] + local card = arg[2] + self._tex_LeftCard.text = arg[3] + -- self:UpdateRoomInfo() + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateHandCard(true) + end) + + _gamectr:AddEventListener(CS_GameEvent.FZTips, function(...) + local arg = {...} + local _tip = arg[1] + self:__FangziTip(_tip) + end) + + _gamectr:AddEventListener(CS_GameEvent.FangziAction, handler(self,self.OnFangziAction)) + + _gamectr:AddEventListener(CS_GameEvent.ZPHuCard, function(...) + if self.kg_card then + self.kg_card:Dispose() + end + self._left_time = 0 + self:UpdateCardBox(0) + self:__CloseTip() + self._popEvent = false + local arg = {...} + local win_seat = arg[1] + local lose_seat = arg[2] + local win_card = arg[3] + local cards = arg[4] + local win_list = arg[5] + local index = self:GetPos(win_seat) + local info = self._player_card_info[index] + self:RemoveCursor() + info:UpdateHandCard(false, true) + + local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card") + obj_win_card.icon = "ui://Main_Majiang/" .. self:GetPrefix() .. "202_" .. win_card + obj_win_card:GetController("bg").selectedIndex = 1 + info._view:AddChild(obj_win_card) + obj_win_card:Center() + + local player = _room:GetPlayerBySeat(win_seat) + local hu_sound = win_seat == lose_seat and ("zimo"..math.random(1, 3)) or ("hu"..math.random(1, 2)) + self:PlaySound(player.self_user.sex, hu_sound) + if win_list[1].type == 11 then + local url, pNode + if win_seat ~= _room.self_player.seat then + url = "ui://Main_Majiang/别人胡" + pNode = info._mask_liangpai + elseif win_seat == _room.self_player.seat then + url = "ui://Main_Majiang/自己胡牌" + pNode = self._view + end + if win_seat == lose_seat then + url = "ui://Main_Majiang/eff_zimo" + end + local he = UIPackage.CreateObjectFromURL(url) + pNode:AddChild(he) + he:GetTransition("t2"):Play() + if win_seat == _room.self_player.seat then + he:Center() + elseif url == "ui://Main_Majiang/eff_zimo" then + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + coroutine.start(function() + coroutine.wait(2) + obj_win_card:Dispose() + he:Dispose() + self._popEvent = true + end) + else + local pNode = info._view + local url = (index == 1 or index == 3) and "eff_list1" or "eff_list2" + local he_list = UIPackage.CreateObjectFromURL("ui://Extend_MJ_ChangSha/" .. url) + he_list.touchable = false + pNode:AddChild(he_list) + he_list:Center() + coroutine.start(function() + for i = 1 ,#win_list do + local tem = win_list[i] + local com_name = "he" .. tem.type + if tem.type == 1 then + com_name = com_name .. "_" .. tem.value + end + local item = he_list:GetChild("list"):AddItemFromPool("ui://Extend_MJ_ChangSha/" .. com_name) + coroutine.wait(0.3) + end + if player.win_count and player.win_count >= 3 then + he_list:GetChild("list"):AddItemFromPool("ui://Extend_MJ_ChangSha/he_4w") + end + coroutine.wait(2) + obj_win_card:Dispose() + he_list:Dispose() + self._popEvent = true + end) + end + end) + + _gamectr:AddEventListener(CS_GameEvent.EventNiao, function(...) + local arg = {...} + self._popEvent = false + local list = arg[1] + local start_seat = arg[2] + ViewUtil.PlaySound("ChangSha_MJ", "extend/majiang/changsha/sound/zhuaniao.mp3") + coroutine.start(self.RunNiao,self,list, start_seat) + end) + + _gamectr:AddEventListener(CS_GameEvent.ZPResult1, function(...) + self._popEvent = false + self:__CloseTip() + if self._com_haidi then + self._com_haidi:Dispose() + self._com_haidi = nil + end + if self.kg_card then + self.kg_card:Dispose() + _room.kg_card={} + end + self._left_time = 0 + self:UpdateCardBox(0) + local arg = {...} + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local niao = result.niao + if liuju then + local le = UIPackage.CreateObjectFromURL("ui://Main_Majiang/LiuJu") + self._view:AddChild(le) + le:Center() + le:GetTransition("t0"):Play() + coroutine.start(function() + coroutine.wait(1) + le:Dispose() + end) + end + self:RemoveCursor() + if self._clearingView == nil then + self._clearingView = CS_ClearingView.new(self._view) + coroutine.start(function() + coroutine.wait(0.5) + if self._clearingView._is_destroy then return end + self._clearingView:Show() + self._popEvent = true + end) + end + + if _room.curren_round ~= _room.room_config.round then + -- if #niao == 0 then self._view:GetChild("n13").visible = false end + self._clearingView:InitData(0, _room, result, nil, function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:ResetCardType() + if _room:checkHpNonnegative() then + p.cur_hp = data[i].hp_info.cur_hp + end + info:UpdateScore() + info._view:GetChild("zhanji").visible = true + local num = data[i].hp_info.total_hp + if num > 0 then + info._view:GetController("text_color").selectedIndex = 0 + info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + else + info._view:GetController("text_color").selectedIndex = 1 + info._view:GetChild("text_jifen").text = d2ad(num) + end + + info._view:GetChild("mask_piao").title = "" + info._view:GetController("piao_niao").selectedIndex = 0 + p.win_count = data[i].win_count + if p.win_count >= 3 then + info._view:GetController("three_win").selectedIndex = 1 + info._view:GetChild("com_three_win"):GetChild("tex_win").text = p.win_count + info._view:GetChild("com_three_win"):GetTransition("t0"):Play() + else + info._view:GetController("three_win").selectedIndex = 0 + end + info._view:GetController("ting").selectedIndex = 0 + p.fz_list = {} + p.auto_play=false + end + DataManager.CurrenRoom.self_player.card_list = {} + self._state.selectedIndex = 2 + self._clearingView = nil + end) + end + self._player_card_info[1]:ShowHuTip() + end) + + _gamectr:AddEventListener(CS_GameEvent.ZPResult2, function(...) + if self._com_haidi then + self._com_haidi:Dispose() + self._com_haidi = nil + end + self:UnmarkSelfTuoguan() + self._left_time = 0 + self:UpdateCardBox(0) + local arg = {...} + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + self._clearingView = CS_ClearingView.new() + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + end) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end) + + _gamectr:AddEventListener(CS_GameEvent.EventQSTip, function(...) + local arg = {...} + local data = arg[1] + local tip = data["types"] + local lit = data["tip_list"] + local htype = lit[1]["type"] + local tip_qishou + if htype == 7 then + tip_qishou = UIPackage.CreateObject("Extend_MJ_ChangSha", "pop_tip_qishou") + elseif htype == 8 then + tip_qishou = UIPackage.CreateObject("Extend_MJ_ChangSha", "pop_tip_zhongtu") + end + local tipList = tip_qishou:GetChild("list") + for i = 1, #tip do + local item = tipList:AddItemFromPool() + item:GetChild("icon").url = "ui://Extend_MJ_ChangSha/qs" .. tip[i].type + item:GetChild("num").text = tip[i].value + end + local id = lit[1].id + tip_qishou:GetChild("btn_qs").onClick:Add(function() + _gamectr:SendAction(id) + tip_qishou:Dispose() + end) + local btn_close = tip_qishou:GetChild("btn_close") + btn_close.onClick:Add(function() + _gamectr:SendAction(0) + tip_qishou:Dispose() + end) + self._view:AddChild(tip_qishou) + tip_qishou:Center() + self._com_qishou = tip_qishou + end) + + _gamectr:AddEventListener(CS_GameEvent.EvnetQSAction, function(...) + local arg = {...} + local data = arg[1] + self._popEvent = false + self:__QsHu(data) + end) + + _gamectr:AddEventListener(CS_GameEvent.EventKaiGang, function(...) + + local arg = {...} + local data = arg[1] + local outlist = arg[2] + self._popEvent = false + self:__KaiGang(data) + end) + + _gamectr:AddEventListener(CS_GameEvent.EvnetHaiDi, function() + self:__Haidi() + end) + + _gamectr:AddEventListener(CS_GameEvent.EvnetPiaoTip, function() + self:UpdateRound() + self._tex_LeftCard.text = "0" + self._state.selectedIndex = 1 + if oldGameVersion==1 then + self:__PiaoNiaoTip() + else + self:__PiaoNiaoTip1() + end + end) + + _gamectr:AddEventListener(CS_GameEvent.EvnetPiao, function(...) + local arg = {...} + local seat = arg[1] + local num = arg[2] + if num > 0 then + local head_info = self._player_info[self:GetPos(seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. num + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + if seat == _room.self_player.seat then + if self._com_piao then + self._com_piao:Dispose() + self._com_piao = nil + end + end + end) + + _gamectr:AddEventListener(CS_GameEvent.EventTingTip, function(...) + local com_tip = UIPackage.CreateObject("Main_Majiang", "Gcm_action_tips") + com_tip:GetController("hide_bg").selectedIndex = 1 + self._chipeng_tip = com_tip + + local _lit_fanzi = com_tip:GetChild("lit_fanzi") + _lit_fanzi:RemoveChildrenToPool() + + local _btn_ting = _lit_fanzi:AddItemFromPool("ui://Main_Majiang/Btn_fztip") + _btn_ting.icon = "ui://Main_Majiang/fztip_6" + _btn_ting.onClick:Set(function( ... ) + _gamectr:SendAction(1) + com_tip:Dispose() + self._chipeng_tip = nil + end) + local _btn_pass = _lit_fanzi:AddItemFromPool("ui://Main_Majiang/Btn_pass") + _btn_pass.onClick:Set(function( ... ) + _gamectr:SendAction(0) + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end) + self._view:AddChild(com_tip) + com_tip:Center() + end) + + _gamectr:AddEventListener(CS_GameEvent.EventTing, function(...) + local arg = {...} + local seat = arg[1] + local index = self:GetPos(seat) + local head_info = self._player_info[index] + head_info._view:GetController("ting").selectedIndex = 1 + local info = self._player_card_info[index] + info._player.auto_out_card = true + info:UpdateHandCard() + end) +end + +function M:UpdateRound() + self._view:GetChild("tex_round1").text = self._room.curren_round + self._view:GetChild("tex_round2").text = self._room.room_config.round +end + +function M:InitPlayerInfoView() + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem,self) + tem.visible = false + end +end + +local discard_frame = 0 +function M:OutCard(card) + -- 防止同一帧内执行两次OutCard事件 + local last_discard_frame = discard_frame + discard_frame = Time.frameCount + --print("帧数:-------------------------",discard_frame, last_discard_frame, discard_frame == last_discard_frame) + if discard_frame == last_discard_frame then + return + end + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card, function() + local info = self._player_card_info[1] + self:RemoveCursor() + info:UpdateHandCard() + + info:UpdateOutCardList(nil, card, self._cursor) + self:PlaySound(self._room.self_player.self_user.sex,tostring(card)) + self:PlayMJSound("chupai.mp3") + end) +end + +function M:__FangziTip(tip) + if self.kg_card then + self.kg_card:Dispose() + end + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject("Main_Majiang", "Gcm_action_tips") + _chipeng_tip:GetController("hide_bg").selectedIndex = 1 + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + -- self._player_card_info[self:GetPos(p.seat)] + + local _lit_fanzi = _chipeng_tip:GetChild("lit_fanzi") + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + + + local tip_hu = false + local count = #_tlist + table.sort(_tlist) + local isHu = false + for k=1,#_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + local url = "ui://Main_Majiang/Btn_fztip" + local weight = td.weight + if tonumber(weight) == 5 then + isHu = true + weight = 8 + url = "ui://Main_Majiang/Btn_hu" + elseif tonumber(weight) == 3 then + weight = 16 + end + local btn_t = _lit_fanzi:AddItemFromPool(url) + if url == "ui://Main_Majiang/Btn_hu" and td.card then + btn_t:GetChild("hupai").icon="ui://Main_Majiang/202_" ..td.card + btn_t:GetController("hupai").selectedIndex=1 + end + btn_t.icon = "ui://Main_Majiang/fztip_"..weight + btn_t.data = { tip, td } + btn_t.onClick:Add(self.__TipAction,self) + end + + local _btn_pass = _lit_fanzi:AddItemFromPool("ui://Main_Majiang/Btn_pass") + _btn_pass.onClick:Set(function() + if isHu then + local guo_msg = MsgWindow.new(self._root_view, "确定要点过吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end) + guo_msg:Show() + else + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end) + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() +end + +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local list = tip.tip_map_type[td.weight] + if (#list > 1) then + self:_ChiView(list, function(id) + _gamectr:SendAction(id) + self:__CloseTip() + end) + self._chipeng_tip.visible = false + return + end + + _gamectr:SendAction(td.id) + if (self._chipeng_tip == nil) then return end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil +end + +function M:_ChiView(tiplist, callback) + self._chipeng_tip.visible = false + local _pop_tip_choice = UIPackage.CreateObject("Extend_MJ_ChangSha", "Pop_tip_choice") + local list_choose1 = _pop_tip_choice:GetChild("Lst_choose") + local list_choose2 = _pop_tip_choice:GetChild("Lst_choose2") + local crossCtr = _pop_tip_choice:GetController("state") + crossCtr.selectedIndex = #tiplist == 3 and 0 or (#tiplist == 2 and 1 or (#tiplist == 4 and 2 or (#tiplist == 5 and 3 or 4))) + _pop_tip_choice:GetChild("Btn_cross").onClick:Add(function() + _pop_tip_choice:Dispose() + self._chipeng_tip.visible = true + end) + list_choose1:RemoveChildrenToPool() + list_choose2:RemoveChildrenToPool() + for i = 1, #tiplist do + local list_choose = i <= 3 and list_choose1 or list_choose2 + local item_choose = list_choose:AddItemFromPool() + item_choose:GetController("type").selectedIndex = (1 == tiplist[i].weight or 2 == tiplist[i].weight) and 1 or 0 + if tiplist[i].weight ~= 1 then + for j = 1, 4 do + item_choose:GetChild("card"..j).icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_"..tiplist[i].card) + end + else + local tem = {} + table.insert(tem, tiplist[i].opcard[1]) + table.insert(tem, tiplist[i].opcard[2]) + local tcard = tiplist[i].card + table.insert(tem, tcard) + table.sort(tem, function(a, b) + return a < b + end) + item_choose:GetChild("card1").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_"..tem[1]) + item_choose:GetChild("card2").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_"..tem[2]) + item_choose:GetChild("card4").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_"..tem[3]) + local cardpos = tem[2] > tcard and 1 or (tem[2] < tcard and 4 or 2) + item_choose:GetChild("card" .. cardpos):GetController("color").selectedIndex = 1 + end + item_choose.onClick:Add(function() + callback(tiplist[i].id) + end) + end + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width)/2, (self._view.height - _pop_tip_choice.height)/2) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:__QsHu(data) + local seat = data.seat + if seat == DataManager.CurrenRoom.self_player.seat then + if self._com_qishou then + self._com_qishou:Dispose() + self._com_qishou = nil + end + end + if data.niao and #data.niao > 0 then + local shaizi = UIPackage.CreateObject("Extend_MJ_ChangSha", "Ani_shaizi") + local dice1 = data.niao[1].card + local dice2 = data.niao[2].card + shaizi:GetChild("shaizi1").icon = UIPackage.GetItemURL("Extend_MJ_ChangSha", "shaizi" .. dice1) + shaizi:GetChild("shaizi2").icon = UIPackage.GetItemURL("Extend_MJ_ChangSha", "shaizi" .. dice2) + self._view:AddChild(shaizi) + shaizi:Center() + + coroutine.start(function() + -- coroutine.wait(0.5) + -- shaizi:GetController("c1").selectedIndex = 1 + coroutine.wait(1.5) + local xy = shaizi.xy + local head_info = self._player_info[self:GetPos(seat)] + local target_xy = self._view:GlobalToLocal(head_info._view:LocalToGlobal(head_info:GetHeadCenter())) + local diff_x = (target_xy.x - 0.5 * shaizi.width) - xy.x + local diff_y = (target_xy.y - 0.5 * shaizi.height) - xy.y + self._tween_shaizi = TweenUtils.TweenFloat(0,1,1,function(value) + shaizi.x = xy.x + diff_x * value + shaizi.y = xy.y + diff_y * value + end) + coroutine.wait(1.2) + shaizi:Dispose() + end) + end + local qs_data = data.data + local allShowCards = {} + local ShowCardsNum = {} + local types = {} + local showAllCards = false + local qs_type = data.type -- 6是起手胡 8是中途 + for i = 1, #qs_data do + local cards = {} + local opcard =qs_data[i].opcard + local qtype = qs_data[i].type + if not types[qtype] then types[qtype] = qs_data[i].value end + if qtype == 23 or qtype == 24 or qtype == 27 then + showAllCards = true + allShowCards = opcard + end + if not showAllCards then + for j = 1, #opcard do + local card = opcard[j] + if cards[card] then + cards[card] = cards[card] + 1 + else + cards[card] = 1 + end + end + for k,v in pairs(cards) do + local card = k + if ShowCardsNum[card] then + if ShowCardsNum[card] < cards[card] then + ShowCardsNum[card] = cards[card] + end + else + ShowCardsNum[card] = cards[card] + end + end + end + end + if not showAllCards then + for i,v in pairs(ShowCardsNum) do + for j = 1, v do + table.insert(allShowCards, i) + end + end + else + + end + local info = self._player_card_info[self:GetPos(seat)] + local pNode = info._mask_liangpai + self.QSHList={} + coroutine.start(function() + for i, v in pairs(types) do + local show_tip = UIPackage.CreateObject("Extend_MJ_ChangSha", "Tip_qishou") + show_tip:GetChild("icon").url = "ui://Extend_MJ_ChangSha/qs" .. i + show_tip:GetChild("num").text = v + pNode:AddChild(show_tip) + show_tip:Center() + table.insert(self.QSHList,show_tip) + --coroutine.wait(4) + --show_tip:Dispose() + end + end) + table.sort(allShowCards, ViewUtil.HandCardSort) + info:UpdateHandCard(false, false, allShowCards) + coroutine.start(function() + coroutine.wait(0.5) + self._popEvent = true + coroutine.wait(4) + self._room.room_config.banyiquan=true + if not (self._room.room_config.banyiquan and qs_type == 6) then + info:UpdateHandCard(false, false, {}) + end + --self._popEvent = true + end) +end + + +function M:ClearQSHTips() + if self.QSHList and #self.QSHList>0 then + for i=1,#self.QSHList do + self.QSHList[i]:Dispose() + end + self.QSHList=nil + end +end + + +function M:__KaiGang(data) + local seat = data["seat"] + local kg_info = data["info"] + local dice1 = kg_info["diceNum1"] + local dice2 = kg_info["diceNum2"] + local cardList = kg_info["cardList"] + local info = self._player_card_info[self:GetPos(seat)] + local p = self._room:GetPlayerBySeat(seat) + local card = p.outcard_list[#p.outcard_list] + printlog("jefe kai_gang",dice1) + printlog("jefe kai_gang",dice2) + local shaizi = UIPackage.CreateObject("Extend_MJ_ChangSha", "Ani_shaizi") + shaizi:GetChild("shaizi1").icon = UIPackage.GetItemURL("Extend_MJ_ChangSha", "shaizi" .. dice1) + shaizi:GetChild("shaizi2").icon = UIPackage.GetItemURL("Extend_MJ_ChangSha", "shaizi" .. dice2) + self._view:AddChild(shaizi) + shaizi:Center() + + if self.kg_card then self.kg_card:Dispose() end + self.kg_card = UIPackage.CreateObject("Extend_MJ_ChangSha", "kai_gang") + local gang_list = self.kg_card:GetChild("list") + gang_list:RemoveChildrenToPool() + for i = 1, #cardList do + local item = gang_list:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "201_" .. cardList[i]) + end + if p.seat == self._room.self_player.seat then + if not info._player then info._player = {} end + info._player.auto_out_card = true + info:UpdateHandCard() + end + coroutine.start(function() + -- coroutine.wait(0.5) + -- shaizi:GetController("c1").selectedIndex = 1 + coroutine.wait(1.5) + local xy = shaizi.xy + local head_info = self._player_info[self:GetPos(seat)] + local target_xy = self._view:GlobalToLocal(head_info._view:LocalToGlobal(head_info:GetHeadCenter())) + local diff_x = (target_xy.x - 0.5 * shaizi.width) - xy.x + local diff_y = (target_xy.y - 0.5 * shaizi.height) - xy.y + self._tween_shaizi = TweenUtils.TweenFloat(0,1,1,function(value) + shaizi.x = xy.x + diff_x * value + shaizi.y = xy.y + diff_y * value + end) + coroutine.wait(1.2) + shaizi:Dispose() + + self._view:AddChild(self.kg_card) + self.kg_card:Center() + info:UpdateOutCardList(nil,card, self._cursor) + self._view:GetChild("remaining_card").text = string.format("剩余%d张牌",self._room.remain_cards) + + coroutine.wait(1) + self._popEvent = true + end) +end + +function M:__Haidi() + -- if DataManager.CurrenRoom.self_player.entrust then return end + local item = UIPackage.CreateObject("Extend_MJ_ChangSha", "hai_di") + local btn_confirm = item:GetChild("btn_confirm") + local btn_cancel = item:GetChild("btn_cancel") + local _gamectr = self._gamectr + btn_confirm.onClick:Add(function() + _gamectr:SendAction(1) + item:Dispose() + end) + btn_cancel.onClick:Add(function() + _gamectr:SendAction(0) + item:Dispose() + end) + self._view:AddChild(item) + item:Center() + self._com_haidi = item +end + + +function M:__PiaoNiaoTip() + local obj_piao = UIPackage.CreateObject("Main_Majiang", "panel_piao_niao") + self._view:AddChild(obj_piao) + obj_piao.x = (self._view.width - obj_piao.width) * 0.5 + obj_piao.y = self._view.height * 0.6 + local piaoState=obj_piao:GetController('piao') + piaoState.selectedIndex=1 + for i = 1, 4 do + obj_piao:GetChild("btn_" .. i).onClick:Add(function() + self._gamectr:SendAction(i - 1) + obj_piao:Dispose() + end) + end + self._com_piao = obj_piao +end + + +function M:__PiaoNiaoTip1() + local obj_piao = UIPackage.CreateObject("Main_Majiang", "panel_piao_niao") + self._view:AddChild(obj_piao) + obj_piao.x = (self._view.width - obj_piao.width) * 0.5 + obj_piao.y = self._view.height * 0.6 + local piaoState=obj_piao:GetController('piao') + + local tconfig=DataManager.CurrenRoom.room_config.config + + + + local piaoList={} + + for i = 1, 4 do + local piaoT=obj_piao:GetChild("btn_" .. i) + table.insert(piaoList,piaoT) + piaoT.onClick:Add(function() + self._gamectr:SendAction(i - 1) + obj_piao:Dispose() + end) + + end + self._com_piao = obj_piao + + + + if tconfig.piao_niao<2 then + for i=1,#piaoList do + piaoList[i].visible=true + end + piaoState.selectedIndex=1 + else + piaoList[1].visible=false + for i=2,#piaoList do + piaoList[i].visible=tconfig["piao"..(i-1)] + end + piaoState.selectedIndex=2 + end + +end + +function M:OnFangziAction(...) + self._popEvent = false + if self.kg_card then + self.kg_card:Dispose() + end + self:__CloseTip() + local arg = {...} + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local index = arg[3] + + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject("Extend_MJ_ChangSha", "FzEffect") + + local fangzi = "" + local fz_sound = "" + if fz.type == FZType.Peng then + fangzi = "碰" + fz_sound = "peng"..math.random(1, 3) + elseif fz.type == FZType.Chi then + fangzi = "吃" + fz_sound = "chi"..math.random(1, 3) + else + if fz.opengang then + fangzi = "杠" + fz_sound = "gang"..math.random(1, 2) + else + fangzi = "补" + fz_sound = "buzhang" + end + end + self:PlaySound(player.self_user.sex,fz_sound) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", fangzi) + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", fangzi) + + effect.touchable = false + effect:GetTransition("t2"):Play() + pNode:AddChild(effect) + + coroutine.start(function() + coroutine.wait(0.3) + self._popEvent = true + end) + + coroutine.start(function() + coroutine.wait(1.8) + effect:Dispose() + end) + + self:RemoveCursor() + if (player.seat ~= fz.from_seat) then + local fs_info = _player_card_info[self:GetPos(fz.from_seat)] + fs_info:UpdateOutCardList() + end + info:UpdateFzList(fz, index, true) + + local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi + info:UpdateHandCard(getcard) + + self:PlayMJSound("fangzi.mp3") + end + +function M:RunNiao(list, start_seat) + local _room = self._room + --local _niao_View = self._niao_View + self._niao_View = UIPackage.CreateObject("Extend_MJ_ChangSha","Panel_Birds") + self._view:AddChild(self._niao_View) + self._niao_View:Center() + local _niao_View = self._niao_View + local list_niao_card = self._niao_View:GetChild("Lst_birds") + list_niao_card:RemoveChildrenToPool() + for i = 1, #list do + --添加背面的麻將 + local item = list_niao_card:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "202_00") + item:GetChild("tex_score").text = "+" .. list[i].score + end + for i = 1, #list do + --顯示正面 + local item = list_niao_card:GetChildAt(i - 1) + local card = list[i].card + -- coroutine.wait(0.3) + item:GetTransition("appear"):Play() + item.icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "201_"..card) + if list[i].score > 0 then item:GetController("bg").selectedIndex = 1 end + end + coroutine.start(function() + coroutine.wait(1.5) + _niao_View:Dispose() + self._popEvent = true + end) +end + +function M:ReloadRoom(bskip) + local room = self._room + + if bskip == nil or bskip == false then + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + self._room._reload_flag = true + end + + end + + if room.kg_card and #room.kg_card ~= 0 then + self.kg_card = UIPackage.CreateObject("Extend_MJ_ChangSha", "kai_gang") + for i = 1, #room.kg_card do + local item = self.kg_card:GetChild("list"):AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "201_" .. room.kg_card[i]) + end + self._view:AddChild(self.kg_card) + self.kg_card:Center() + end + for i = 1, #room.player_list do + local p = room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + local head_info = self._player_info[self:GetPos(p.seat)] + head_info:UpdateScore() + head_info._view:GetChild('zhanji').visible = true + local num = p.total_hp or 0 + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(num) + end + + if p.win_count~=nil and p.win_count >= 3 then + head_info._view:GetController("three_win").selectedIndex = 1 + head_info._view:GetChild("com_three_win"):GetChild("tex_win").text = p.win_count + end + if p.ting then + head_info._view:GetController("ting").selectedIndex = 1 + end + for i = 1, #p.fz_list do + info:UpdateFzList(p.fz_list[i], -1) + end + if p == room.self_player and p.auto_play then + if not info._player then info._player = {} end + info._player.auto_out_card = true + end + info:UpdateHandCard() + if p.seat == room.last_outcard_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil,card, self._cursor) + elseif p.seat == room.curren_outcard_seat then + info:UpdateHandCard(true) + info:UpdateOutCardList() + else + info:UpdateOutCardList() + end + if p.seat == room.banker_seat then + local head = self._player_info[self:GetPos(p.seat)] + head:MarkBank(true) + end + + if bskip == nil or bskip == false then + if p.ready and room.playing == false then + self._player_info[self:GetPos(p.seat)]:Ready(true) + end + end + if p.piao_niao~=nil and p.piao_niao > 0 then + local head_info = self._player_info[self:GetPos(p.seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + end + + if bskip == nil or bskip == false then + self:UpdateCardBox(self:GetPos(room.curren_outcard_seat)) + self._tex_LeftCard.text = room.left_count + self:UpdateRound() + end + local me = room.self_player + if room.curren_outcard_seat == me.seat and me.auto_play then + self:OutCard(me.draw_card) + me.draw_card = nil + end +end + +function M:GetPos(seat) + local pos = 0 + if seat ~= 0 then + pos = ViewUtil.GetPos(self._room.self_player.seat, seat, self._room.room_config.people_num) + end + return pos +end + +function M:PlaySound(sex,path) + MJMainView.PlaySound(self, "ChangSha_MJ", sex, path) +end + +function M:PlayerChangeLineState() +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:__CloseTip() + if (self._chipeng_tip) then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if (self._pop_tip_choice) then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +-- 托管时关闭一些提示窗口,如起手胡、吃碰提示、海底,由扩展实现 +function M:closeTipOnTuoguan() + self:__CloseTip() + if self._com_haidi then + self._com_haidi:Dispose() + self._com_haidi = nil + end + if self._com_qishou then + self._com_qishou:Dispose() + self._com_qishou = nil + end + -- if self._com_piao then + -- self._com_piao:Dispose() + -- self._com_piao = nil + -- end +end + +function M:Destroy() + MJMainView.Destroy(self) + UIPackage.RemovePackage("extend/majiang/changsha/ui/Extend_MJ_ChangSha") + if self._tween_shaizi then + TweenUtils.Kill(self._tween_shaizi) + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/changsha/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/changsha/EXPlayBackView.lua new file mode 100644 index 00000000..106c5bb3 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/changsha/EXPlayBackView.lua @@ -0,0 +1,395 @@ +local MJPlayBackView = require("main.majiang.MJPlayBackView") +local EXRoomConfig = import(".EXRoomConfig") +local PlayerInfoView = require("Game.View.PlayerInfoView") +local EXClearingView = import(".EXClearingView") + +local Record_Event = import(".RecordEvent") + + +local M = {} + +--- Create a new +function M.new() + setmetatable(M,{__index = MJPlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = "CS_PlayBackView" + self:init() + + return self +end + + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/majiang/changsha/ui/Extend_MJ_ChangSha") + MJPlayBackView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num) + local _cardbox = self._view:GetChild("cardbox") + --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false + self._ctr_cardbox = _cardbox:GetController("c1") + self._tex_round = self._view:GetChild("tex_round") + self._tex_LeftCard = self._view:GetChild("remaining_card") + self._anchor = self._view:GetChild("mask_tips") + self._eventmap = {} + + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_QiShou] = self.CmdQiShou + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao + self._cmdmap[Record_Event.Evt_KaiGang] = self.CmdKaiGang + self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao + self._cmdmap[Record_Event.Evt_Result] = self.CmdResult +end + +function M:FillRoomData(data) + MJPlayBackView.FillRoomData(self) + local room = self._room + -- if room.room_config.people_num ~= 4 then + -- for i = 1, 4 do + -- self._view:GetChild("player_info" .. i).visible = false + -- end + -- local num + -- for i = 1, room.room_config.people_num do + -- if room.room_config.people_num == 3 and i == 3 then + -- num = 4 + -- elseif room.room_config.people_num == 2 and i == 2 then + -- num = 3 + -- else + -- num = i + -- end + -- local tem= self._view:GetChild("player_card_info" .. num) + -- self._player_card_info[i] = self:NewMJPlayerCardInfoView(tem, i) + + -- local tem = self._view:GetChild("player_info" .. num) + -- self._player_info[i] = PlayerInfoView.new(tem, self) + -- end + -- for i = 1,#room.player_list do + -- local p = room.player_list[i] + -- local index = self:GetPos(p.seat) + -- local card_info = self._player_card_info[index] + -- local info = self._player_info[index] + -- card_info:SetPlayer(p) + -- card_info:FillData() + -- info:FillData(p) + -- info._view.visible = true + -- end + -- end + + if self._win_pic then self._win_pic:Dispose() end + if self._niao then self._niao:Dispose() end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local left_count = data.info.left_card + self:UpdateLeftCard(left_count) + local round = data.info.round + self:UpdateRound(round) + local roominfo_panel = self._view:GetChild("roominfo_panel1") + roominfo_panel:GetChild("tex_roomid").text = room.room_id + roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + table.sort(p.card_list, ViewUtil.HandCardSort) + card_info:UpdateHandCard(false, true) + self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0 + end + + self:GenerateAllStepData(data) + self:UpdateStep(1) + -- self:ShowStep(0) +end + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateLeftCard(step.left_card) + --self._ctr_cardbox.selectedIndex = step.current_out_seat + self:UpdateCardBox(step.current_out_seat) + self:UpdateStep(index + 1) + if step.cmd ~= Record_Event.Evt_OutCard then + self:RemoveCursor() + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hand_left_count = #p.card_list + info:Clear() + info:ResetFzList() + p.piao_niao = step.player_card_data[i].piao_niao + local head_info = self._player_info[self:GetPos(i)] + if p.piao_niao and p.piao_niao > 0 then + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + else + head_info._view:GetController("piao_niao").selectedIndex = 0 + end + if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil, nil, self._cursor) + else + info:UpdateOutCardList() + end + if step.cmd == Record_Event.Evt_GetCard and p.seat == step.current_out_seat then + info:UpdateHandCard(true, true) + else + info:UpdateHandCard(false, true) + end + end + if step.cmd == Record_Event.Evt_Win then + self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡") + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + else + if self._win_pic then + self._win_pic:Dispose() + end + end + if step.cmd == Record_Event.Evt_Niao then + local niao_list = step.niao + self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_ChangSha/Panel_Birds") + local list = self._niao:GetChild("Lst_birds") + list:RemoveChildrenToPool() + for i = 1, #niao_list do + local item = list:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .."201_"..niao_list[i].card) + if niao_list[i].score > 0 then + item:GetController("bg").selectedIndex = 2 + end + end + self._view:AddChild(self._niao) + self._view:AddChild(self._view:GetChild("panel_record")) + self._niao:Center() + elseif step.cmd == Record_Event.Evt_KaiGang then + self._kaigang = UIPackage.CreateObject("Extend_MJ_ChangSha", "kai_gang") + local cards = step.card + local gang_list = self._kaigang:GetChild("list") + gang_list:RemoveChildrenToPool() + for i = 1, #cards do + local item = gang_list:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .."201_" .. cards[i]) + end + self._view:AddChild(self._kaigang) + self._kaigang:Center() + elseif step.cmd == Record_Event.Evt_QiShou then + local data = step.qs_data + self._QS = UIPackage.CreateObject("Extend_MJ_ChangSha", "showAll") + local list = self._QS:GetChild("n0") + list:RemoveChildrenToPool() + for i = 1, #data do + local item = list:AddItemFromPool() + item:GetChild("icon").url = "ui://Extend_MJ_ChangSha/qs" .. data[i].type + item:GetChild("num").text = data[i].value + end + local info = self._player_card_info[self:GetPos(step.qs_seat)] + info._mask_liangpai:AddChild(self._QS) + self._QS:Center() + else + -- 因为 开杠 和 鸟 不会连续出现,不然此处需要分开判断 + if self._niao then + self._niao:Dispose() + end + if self._kaigang then + self._kaigang:Dispose() + end + if self._QS then + self._QS:Dispose() + end + end + if step.cmd == Record_Event.Evt_Result then + if not self.result then + self.result = EXClearingView.new(self._root_view, true) + self.result:InitData(0, self._room, step.result_data) + self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5 + self.result._view.width = GRoot.inst.width + self.result._view.height = GRoot.inst.height + self.result._view:GetChild("btn_confirm").visible = false + self._anchor:AddChild(self.result._view) + self.result._view.x = self._anchor.x * -1 + self.result._view.y = self._anchor.y * -1 + else + self.result._view.visible = true + end + -- self.result._view:Center() + else + if self.result then + self.result._view.visible = false + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = "" + step.left_card = info.left_card + step.last_out_seat = 0 + step.current_out_seat = 1 + step.win = 0 + step.niao = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.piao_niao = p.piao_niao + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdQiShou(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.qs_seat = cmd.seat + data.qs_data = cmd.data.data + -- data.qs_card = cmd.data.card +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + table.sort(u.card_list, ViewUtil.HandCardSort) + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = 0 + data.current_out_seat = cmd.seat + local fz = {} + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.opcard = cmd.data.opcard + fz.kaigang = cmd.data.opengang + local u = data.player_card_data[cmd.seat] + for i = 1, #fz.opcard do + list_remove(u.card_list, fz.opcard[i]) + end + + if fz.type == 1 then + fz.type = FZType.Chi + fz.opcard[#fz.opcard + 1] = fz.card + elseif fz.type ==2 then + fz.type = FZType.Peng + elseif fz.type == 3 or fz.type == 4 then + if #fz.opcard == 1 then + fz.type = FZType.Gang_Peng + elseif #fz.opcard == 3 then + fz.type = FZType.Gang + elseif #fz.opcard == 4 then + fz.type = FZType.Gang_An + end + end + + local uf = data.player_card_data[cmd.data.from_seat] + if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then + table.remove(uf.outcard_list, #uf.outcard_list) + end + if fz.type ~= FZType.Gang_Peng then + u.fz_list[#u.fz_list + 1] = fz + else + for i = 1, #u.fz_list do + if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then + u.fz_list[i].type = FZType.Gang_Peng + end + end + end +end + +function M:CmdKaiGang(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.left_card = cmd.data.left_count + data.card = cmd.data.info.cardList +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:CmdNiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.niao = cmd.data.niao +end + +function M:CmdPiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.player_card_data[cmd.seat].piao_niao = cmd.data.num +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result_data = cmd.data +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_deep_clone(last_step) + self._step[#self._step + 1] = step + step.result_data = nil + return step +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = "剩余 "..num.." 张牌" +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:UpdateRound(round) + self._tex_round.text = "第 "..round.."/"..self._room.room_config.round.." 局" +end + +function M:UpdateStep(step) + self._record:GetChild("tex_step").text = "第 " .. step .. " / " .. #self._step .. "步" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/changsha/EXPlayer.lua b/lua_probject/extend_project/extend/majiang/changsha/EXPlayer.lua new file mode 100644 index 00000000..87d2aa37 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/changsha/EXPlayer.lua @@ -0,0 +1,38 @@ + + +local EXPlayer = { + auto, + -- 手牌列表 + card_list = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil, + + win_count = 0 +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/changsha/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/majiang/changsha/EXPlayerInfoView.lua new file mode 100644 index 00000000..f8a5fd69 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/changsha/EXPlayerInfoView.lua @@ -0,0 +1,76 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + +function M:init() + PlayerInfoView.init(self) + self._tex_score = self._view:GetChild("info"):GetChild("tex_score1") + self._tex_score2 = self._view:GetChild("info"):GetChild("tex_score2") + self._ct_score = self._view:GetChild("info"):GetController("score") +end + +function M:ShowInteraction(type,str) + if type == 3 then + Voice.DownLoad(str, function(clip) + if (clip ) then + self:ShowMaskVoice(clip.length) + GameApplication.Instance:PlayVoice(clip) + end + end) + elseif type == 4 then + self:SetChat(str) + elseif type == 2 then + local chat_index = tonumber(str) + self._main_view:PlayChatSound(self._player.self_user.sex,chat_index) + local language, index = self._main_view:GetChatMsgLanguage(chat_index) + self:SetChat(self._main_view.Fix_Msg_Chat[index]) + elseif type == 1 then + self:SetBiaoqing("ui://Chat/"..str) + end +end + +function M:UpdateRemainCard(card_num, hide) + if hide then + self._view:GetController("show_remain").selectedIndex = 0 + else + self._view:GetController("show_remain").selectedIndex = 1 + end + self._view:GetChild("com_remain"):GetChild("tex_remain").text = card_num +end + +function M:FillData(player) + PlayerInfoView.FillData(self, player) + self:UpdateScore(player.total_score) +end + +function M:UpdateScore() + local score = self._player.total_score + local room = DataManager.CurrenRoom + if room:checkHpNonnegative() then + score = d2ad(self._player.cur_hp) + end + if not score then + score = 0 + end + if score < 0 then + self._ct_score.selectedIndex = 1 + self._tex_score2.text = score + else + self._ct_score.selectedIndex = 0 + if not room:checkHpNonnegative() then + score = "+" .. score + end + self._tex_score.text = score + end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/changsha/EXRoomConfig.lua b/lua_probject/extend_project/extend/majiang/changsha/EXRoomConfig.lua new file mode 100644 index 00000000..3fe8837f --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/changsha/EXRoomConfig.lua @@ -0,0 +1,163 @@ + + + +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.class = "CS_RoomConfig" + self.round = config["times"] + self.config=config + self.zhuangxian = config["zhuangxian"] + -- self.piaofen = config["piaofen"] + self.zimo = config["zimo"] + self.liuliushun = config["liuliushun"] + self.queyise = config["queyise"] + self.banbanhu = config["banbanhu"] + self.dasixi = config["dasixi"] + self.jiejiegao = config["jiejiegao"] + self.santong = config["santong"] + self.yizhihua = config["yizhihua"] + self.zhongtusixi = config["zhongtusixi"] + self.zhongtuliuliushun = config["zhongtuliuliushun"] + + self.niao_type = config["niao_type"] + self.niao = config["niao"] + self.piao_niao = config["piao_niao"] + self.two_pair = config["two_pair"] + self.no_jiang = config["no_jiang"] + self.four_win = config["four_win"] + self.native_hu = config["native_hu"] + self.queyimen = config["queyimen"] + self.fengding = config["fengding"] + self.banyiquan = config["banyiquan"] + self.menqing = config["menqing"] + self.isHidden = config.isHidden + + return self +end + +function M:GetDes(sp) + sp = sp or " " + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + + if (self.zhuangxian) then + str = str .. "庄闲(算分)" + str = str .. sp + end + + if (self.zimo) then + str = str .. "自摸胡" + else + str = str .. "点炮胡" + end + str = str .. sp + + if self.fengding then + str = str .. "封顶" .. sp + end + + if self.banyiquan then + str = str .. "起手胡板一圈" .. sp + end + + if (self.liuliushun) then + str = str .. "六六顺" + str = str .. sp + end + + if (self.queyise) then + str = str .. "缺一色" + str = str .. sp + end + + if (self.banbanhu) then + str = str .. "板板胡" + str = str .. sp + end + + if (self.dasixi) then + str = str .. "大四喜" + str = str .. sp + end + + if (self.jiejiegao) then + str = str .. "节节高" + str = str .. sp + end + + if (self.santong) then + str = str .. "三同" + str = str .. sp + end + + if (self.yizhihua) then + str = str .. "一枝花" + str = str .. sp + end + + if (self.zhongtusixi) then + str = str .. "中途四喜" + str = str .. sp + end + + if (self.zhongtuliuliushun) then + str = str .. "中途六六顺" + str = str .. sp + end + + if (self.piao_niao) then + str = str .. "飘鸟" .. sp + end + + if self.two_pair then + str = str .. "金童玉女" .. sp + end + + if self.no_jiang then + str = str .. "假将胡" .. sp + end + + if self.four_win then + str = str .. "四连冠" .. sp + end + + if self.native_hu then + str = str .. "天听天胡" .. sp + end + + if self.queyimen then + str = str .. "缺一门" .. sp + end + + if self.menqing then + str = str .. "门清" ..sp + end + + str = str .. (self.niao_type == 0 and "鸟加分" or (self.niao_type == 1 and "鸟翻倍" or "长沙抓2鸟")) + str = str .. sp + + if (self.niao) then + str = str .. "抓" .. self.niao .. "鸟" .. sp + end + + str = str.sub(str,1,string.len(str)-string.len(sp)) + return str +end + +function M:GetGameName() + return "长沙麻将" +end + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_MJ_ChangSha/gamerule") + return gamerulepanel +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/changsha/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/changsha/ExtendConfig.lua new file mode 100644 index 00000000..199bc5e7 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/changsha/ExtendConfig.lua @@ -0,0 +1,182 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import(".EXGameInfo") +local EXMainView = import(".EXMainView") +local EXGameController = import(".EXGameController") +local EXRoomConfig = import(".EXRoomConfig") +local EXPlayBackView =import(".EXPlayBackView") +local MJRoom = require("main.majiang.MJRoom") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = "ExtendConfig" + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/majiang/changsha/ui/Info_MJ_ChangSha") + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage("extend/majiang/changsha/ui/Extend_MJ_ChangSha") + ResourcesManager.UnLoadGroup("ChangSha_MJ") +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return MJRoom.new() +end + +function M:FillRoomConfig(room,_config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + + local reload = s2croom["reload"] + local _tableInfo = s2croom["tableInfo"] + + local _config = _tableInfo["config"] + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo["playerData"] + room.curren_round = _tableInfo["round"] + if room.curren_round == 0 and reload then room.curren_round = 1 end + self:FillPlayerData(playerList) + + if (reload) then + local _reloadInfo = s2croom["reloadInfo"] + local _hand_card = _reloadInfo["hand_card"] + room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + + local active_seat = _reloadInfo["active_seat"] + local bank_seat = _reloadInfo["banker_seat"] + local playing = _reloadInfo["playing"] + local _info_list = _reloadInfo["info_list"] + local last_outcard_seat = _reloadInfo["last_outcard_seat"] + room.left_count = _reloadInfo["left_card"] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo["curren_outcard_seat"] + room.active_seat = _reloadInfo["active_seat"] + room.last_outcard_seat = last_outcard_seat + room.playing = playing + local _ok_list = _reloadInfo["okinfo"] + if _ok_list then room.kg_card = _ok_list.cardList end + for i=1,#_info_list do + local tem = _info_list[i] + local playerid = tem["playerid"] + local auto_play = tem["auto"] + local p = room:GetPlayerById(playerid) + local outcard_list = tem["outcard_list"] + p.outcard_list = outcard_list + p.total_score = tem["score"] + p.hand_left_count = tem["card_count"] + p.auto_play = auto_play + if auto_play then + p.draw_card = tem["draw_card"] + end + p.ting = tem["ting"] + p.win_count = tem["win_count"] + p.piao_niao = tem["piao_niao"] or 0 + -- p.entrust = tem["entrust"] or false + local opcard = tem["opcard"] + for k=1,#opcard do + local op = opcard[k] + local fz = {} + fz.type = op["type"] + fz.card = op["card"] + fz.opengang = op["opengang"] + if fz.type == FZType.Chi then + fz.opcard = {} + fz.opcard[1] = op["opcard"][1] + fz.opcard[2] = fz.card + fz.opcard[3] = op["opcard"][2] + end + p.fz_list[#p.fz_list+1] = fz + end + if (not playing and room.curren_round > 0) or room.status == 1 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.left_count = _tableInfo["left_card"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + + local _info_list = _tableInfo["playerData"] + for i = 1,#_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + p.piao_niao = _jp["piao_niao"] + if p.seat == 1 then room.self_player = p end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.card_list = _hand_card + --room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + p.total_score = _jp["score"] + p.hand_left_count = #_hand_card + if _jp.hp_info then + room.room_config.isNonnegative = 1 + p.cur_hp = _jp.hp_info.cur_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/changsha/HuTipView.lua b/lua_probject/extend_project/extend/majiang/changsha/HuTipView.lua new file mode 100644 index 00000000..5f3b48ea --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/changsha/HuTipView.lua @@ -0,0 +1,118 @@ +local FZTipList = require("main.majiang.FZData") + +local HuTipView = { + _view_start_pos = nil, + _touch_start_pos = nil, +} + +local M = HuTipView + +function M.new(main_view) + local self = {} + self.class = "HuTipView" + setmetatable(self,{__index = HuTipView}) + self._main_view = main_view + self:init() + return self +end + +local function SetObjEnabled(obj, enabled) + obj.visible = enabled + obj.touchable = enabled +end + +function M:OnTouchBegin(context) + self._view_start_pos = Vector2(self._view.x, self._view.y) + self._touch_start_pos = self._main_view._view:GlobalToLocal(Vector2(context.inputEvent.x, context.inputEvent.y)) +end +function M:OnTouchMove(context) + local xy = self._main_view._view:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + local dist = Vector2(xy.x - self._touch_start_pos.x, xy.y - self._touch_start_pos.y) + local posx = self._view_start_pos.x + dist.x + local posy = self._view_start_pos.y + dist.y + local max_x = self._main_view._view.width - self._view.width + local max_y = self._main_view._view.height - self._view.height + self._view.x = posx < 0 and 0 or posx > max_x and max_x or posx + self._view.y = posy < 0 and 0 or posy > max_y and max_y or posy +end + +function M:init() + UIPackage.AddPackage("extend/majiang/changsha/ui/Extend_MJ_ChangSha") + self._view = UIPackage.CreateObjectFromURL("ui://Extend_MJ_ChangSha/Hu_tip") + self._main_view._view:AddChild(self._view) + local width = self._view.width + local m_width = self._main_view._view.width + local m_height = self._main_view._view.height + -- 初始位置 + self._view.x = 0 + self._view.y = 0.75 * m_height + SetObjEnabled(self._view, false) + self._view.onTouchBegin:Add(handler(self, self.OnTouchBegin)) + self._view.onTouchMove:Add(handler(self, self.OnTouchMove)) +end + +function M:FillData(cards) + local lst_card = self._view:GetChild("lst_card") + lst_card:RemoveChildrenToPool() + local num = #cards + if num > 0 then + if num > 3 and num <= 28 then + self._view.width = 191 + (num - 3) * 38 + -- self._view.height = 69 + (math.ceil(num / 7) - 1) * 56 + else + self._view.width = 191 + end + for i = 1, num do + local item = lst_card:AddItemFromPool() + local card = cards[i] + item:GetChild("icon").icon = "ui://Main_Majiang/" .. self:GetPrefix() .. "202_" .. card + item:GetChild("tex_num").text = self:CountCardLeftNum(card) .. "张" + end + SetObjEnabled(self._view, true) + else + SetObjEnabled(self._view, false) + end +end + +function M:CountCardLeftNum(card) + local player_list = DataManager.CurrenRoom.player_list + local count = 4 + for i = 1, #player_list do + local p = player_list[i] + if p.card_list then + for j = 1, #p.card_list do + if p.card_list[j] == card then + count = count - 1 + end + end + end + for j = 1, #p.outcard_list do + if p.outcard_list[j] == card then + count = count - 1 + end + end + for j = 1, #p.fz_list do + local fz = p.fz_list[j] + if fz.type == FZType.Chi then + for k = 1, #fz.opcard do + if card == fz.opcard[k] then + count = count - 1 + break + end + end + else + local num = fz.type == FZType.Peng and 3 or 4 + if card == fz.card then + count = count - num + end + end + end + end + return count +end + +function M:GetPrefix() + return get_majiang_prefix(DataManager.CurrenRoom.game_id) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/changsha/MJPlayerCardInfoView.lua b/lua_probject/extend_project/extend/majiang/changsha/MJPlayerCardInfoView.lua new file mode 100644 index 00000000..f685a679 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/changsha/MJPlayerCardInfoView.lua @@ -0,0 +1,116 @@ +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") + +local M = {} + +function M.new(view,mainView) + setmetatable(M, {__index = MJPlayerCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + +local function CardPos(obj, area, oder, loc, offset) + offset = offset or 0 + local location = loc + if oder == AreaOderType.left_right then + obj.x = location + offset + location = obj.x + obj.width + elseif oder == AreaOderType.up_down then + obj.y = location + offset + location = obj.y + obj.height + elseif oder == AreaOderType.right_left then + obj.x = (area.width - obj.width) - location - offset + location = location + obj.width + elseif oder == AreaOderType.down_up then + obj.y = area.height - obj.height - location - offset + location = location + obj.height + end + return location +end + +function M:UpdateHandCard(getcard, mp, opcard) + -- mp 是否明牌 + -- 如果不明牌,但是有 opcard 表示是起手胡 + getcard = getcard or false + mp = mp or false + local handcard_list = self._mask_data["handcard_list"] + local oder = handcard_list["oder"] + local _player = self._player + local comp_back = handcard_list["comp_back"] + local comp = handcard_list["comp"] + local outcard_list = self._mask_data["outcard_list"] + local card = outcard_list["card"] + + self._area_handcard_list:RemoveChildren(0, -1, true) + local opnum = opcard and #opcard or -1 + if not mp and opnum > -1 then + -- 起手胡板牌记录,手牌变化两次后,板牌收回 + self.__show_qs_hu_times = 1 + self.__qs_hu_cards = opcard + elseif self.__qs_hu_cards and opnum == -1 and self.__show_qs_hu_times > 0 then + self.__show_qs_hu_times = self.__show_qs_hu_times - 1 + opcard = self.__qs_hu_cards + opnum = #opcard + end + local loc = 0 + if not mp then + local comp_back = handcard_list["comp_back"] + if self._current_card_type == 2 then + comp_back = comp_back.."_3d" + end + for i = 0, _player.hand_left_count -1 do + local obj + local offset = getcard and (i == _player.hand_left_count - 1 and 15 or 0) + if i < opnum then + obj = UIPackage.CreateObject("Main_Majiang", comp) + self:fillCard(obj, card, opcard[i + 1]) + else + obj = UIPackage.CreateObject("Main_Majiang", comp_back) + end + if opnum ~= -1 then + loc = CardPos(obj, self._area_handcard_list, oder, loc, offset) + else + ViewUtil.CardPos(obj, self._area_handcard_list, oder, i, offset) + end + --改变左右两边的手牌的x值 + if self._current_card_type == 2 and (oder == AreaOderType.down_up or oder == AreaOderType.up_down) then + obj.x = i * -7.0 + end + if (oder == AreaOderType.down_up) then + self._area_handcard_list:AddChildAt(obj, 0) + else + self._area_handcard_list:AddChild(obj) + end + end + else + local outcard_list = self._mask_data["outcard_list"] + local comp = handcard_list["comp"] + local card = outcard_list["card"] + --print("comp"..comp) + -- print(vardump(_player.card_list)) + + if self._current_card_type == 2 then + comp = comp.."_3d" + end + for i = 0, #_player.card_list -1 do + local obj = UIPackage.CreateObject("Main_Majiang", comp) + self:fillCard(obj,card,_player.card_list[i+1]) + local offset = getcard and (i == _player.hand_left_count - 1 and 15 or 0) + ViewUtil.CardPos(obj, self._area_handcard_list, oder, i, offset) + --改变左右两边的手牌的x值 + if self._current_card_type == 2 and (oder == AreaOderType.down_up or oder == AreaOderType.up_down) then + obj.x = i * -7 + end + if (oder == AreaOderType.down_up) then + self._area_handcard_list:AddChildAt(obj, 0) + else + self._area_handcard_list:AddChild(obj) + end + end + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/changsha/MJPlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/majiang/changsha/MJPlayerSelfCardInfoView.lua new file mode 100644 index 00000000..003db705 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/changsha/MJPlayerSelfCardInfoView.lua @@ -0,0 +1,207 @@ +local MJPlayerSelfCardInfoView = require("main.majiang.MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local CardCheck = import(".CardCheck") + +local M = {} +-- +function M.new(view,mainView) + setmetatable(MJPlayerSelfCardInfoView, {__index = MJPlayerCardInfoView}) + setmetatable(M, {__index = MJPlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:ShowHuTip(card_list) + local fz_list = DataManager.CurrenRoom.self_player.fz_list + local tingList = CardCheck.tingPai(card_list, fz_list, DataManager.CurrenRoom.room_config.no_jiang) + self._mainView._hu_tip:FillData(tingList) +end + +function M:UpdateHandCard(getcard, mp, opcard) + MJPlayerSelfCardInfoView.UpdateHandCard(self, getcard, mp) + local _carViewList = self._carViewList + local card_list = DataManager.CurrenRoom.self_player.card_list + self:ShowHuTip(card_list) + if getcard then + self._out_card = true + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + -- 记录需要标记听牌提示的牌 + local lst_mark = {} + local total_num = 0 + for i = 1, #_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + list_remove(card_list, card) + local tingList = CardCheck.tingPai(card_list, DataManager.CurrenRoom.self_player.fz_list, DataManager.CurrenRoom.room_config.no_jiang) + if #tingList > 0 then + local count = 0 + for j = 1, #tingList do + count = count + self._mainView:CountCardLeftNum(tingList[j]) + end + local tem = {} + tem.item = btn + tem.count = count + total_num = total_num + count + table.insert(lst_mark, tem) + end + table.insert(card_list, card) + end + table.sort(lst_mark, function(a, b) + return a.count > b.count + end) + -- 如果几张牌的可胡牌数一致,也只显示'三角',可胡牌数不一致才显示'多' + local all_same = #lst_mark ~= 0 and lst_mark[1].count == total_num / #lst_mark or false + for i = 1, #lst_mark do + local tem = lst_mark[i] + if all_same or tem.count < lst_mark[1].count then + tem.item:GetController("mark_ting").selectedIndex = 1 + else + tem.item:GetController("mark_ting").selectedIndex = 2 + end + end + else + for i = 1, #_carViewList do + local btn = _carViewList[i].card + if btn:GetController("mark_ting").selectedIndex ~= 0 then + btn:GetController("mark_ting").selectedIndex = 0 + end + end + self._out_card = false + end + local opnum = opcard and #opcard or -1 + if not mp and opnum > -1 then + -- 起手胡板牌记录,手牌变化两次后,板牌收回 + self.__show_qs_hu_times = 2 + self.__qs_hu_cards = opcard + elseif self.__qs_hu_cards and opnum == -1 and self.__show_qs_hu_times > 0 then + self.__show_qs_hu_times = self.__show_qs_hu_times - 1 + opcard = self.__qs_hu_cards + opnum = #opcard + end + if opcard then + if #opcard > 0 then + for i = #opcard, 1, -1 do + for j = 1, #_carViewList do + local btn = _carViewList[j].card + local card = self:GetCard(btn) + local tem = string.gsub(btn.icon, "ui://Main_Majiang/" .. self:GetPrefix(), "") + if card == tonumber(opcard[i]) and string.sub(tem, 1, 3) == "201" then + btn.icon = "ui://Main_Majiang/" .. self:GetPrefix() .. "202_" .. card + -- list_remove(opcard, card) + break + end + end + end + else + for i = 1, #_carViewList do + local btn = _carViewList[i].card + local tem = string.gsub(btn.icon, "ui://Main_Majiang/", "") + local tlist = string.split(tem, "_") + btn.icon = "ui://Main_Majiang/" .. self:GetPrefix() .. "201_" .. tlist[2] + end + end + end +end + +function M:__OnClickHandCard(context) + local button = context.sender + local _carViewList = self._carViewList + local refresh = true + local card_list = {} + for i=1,#_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + if btn ~= button and btn.selected == true then + if button.data.card_item == card then + refresh = false + else + self._mainView:markOutCards(false, card) + end + btn.selected = false + end + if not btn.selected then + table.insert(card_list, card) + end + end + + if self._out_card then + self:ShowHuTip(card_list) + end + + if refresh then + if button.selected then + self._mainView:markOutCards(true, button.data.card_item) + else + self._mainView:markOutCards(false, button.data.card_item) + end + end + + local _room = DataManager.CurrenRoom + -- if (Utils.IsDoubleClick(context) and _room.curren_outcard_seat == _room.self_player.seat) then + -- local card = button.data + -- self._mainView:OutCard(card.card_item) + -- end + if not button.selected and _room.curren_outcard_seat == _room.self_player.seat then + local card = button.data + self._mainView:OutCard(card.card_item) + end +end + +function M:__OnDragEnd(context, offset) + if self.outcard_button then + self.outcard_button:Dispose() + self.outcard_button = nil + end + local button = context.sender + -- + --button:RemoveFromParent() + local card = button.data + local _room = DataManager.CurrenRoom + + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + -- print(button.y - card.old_postion.y) + -- if (button.y < -55 and _room.curren_outcard_seat == _room.self_player.seat) and self:CheckPlayerOnlineState() then + if (button.y - card.old_postion.y < -50 and _room.curren_outcard_seat == _room.self_player.seat) then + self._mainView:OutCard(card.card_item) + button.touchable = false + self.outcard_button = button + else + self._area_handcard_list:AddChildAt(button, card.index) + button:TweenMove(card.old_postion, 0.2) + end +end + +function M:CheckPlayerOnlineState() + local room = DataManager.CurrenRoom + for i = 1, #room.player_list do + if room.player_list[i].line_state == 0 then + return false + end + end + return true +end +function M:Clear(bskip) + --self._ctr_state.selectedIndex = 0 + self._area_fz_list.x = self._src_fz_list.x + self._area_fz_list.y = self._src_fz_list.y + self._area_fz_list.width = self._src_fz_list.z + self._area_fz_list.height = self._src_fz_list.w + + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_outcard_list:RemoveChildren(0, -1, true) + if bskip == nil or bskip == false then + self._mask_liangpai:RemoveChildren(0, -1, true) + end + + for i=1,#self._carViewList do + self._carViewList[i].card:Dispose() + end + self._carViewList = {} + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/changsha/Protocol.lua b/lua_probject/extend_project/extend/majiang/changsha/Protocol.lua new file mode 100644 index 00000000..035dea56 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/changsha/Protocol.lua @@ -0,0 +1,68 @@ +local Protocol = { + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌 + GAME_DIS_CARD = "611", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- 提示选择行为 + GAME_ACTION = "612", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 小结算 + GAME_EVT_RESULT1 = "817", + + -- 大结算 + GAME_EVT_RESULT2 = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + + -- 鸟 + GAME_EVT_NIAO = "821", + + -- 起手胡提示 + GAME_EVT_QSTIP = "822", + + -- 起手胡事件 + GAME_EVT_QSWIN = "823", + + -- 开杠 + GAME_EVT_OPENKONG = "824", + + -- 海底 + GAME_EVT_HAIDI = "825", + + -- 飘鸟提示 + GAME_EVT_PIAOTIP = "833", + + -- 飘鸟事件 + GAME_EVT_PIAO = "834", + + GAME_EVT_TING_TIP = "835", + + GAME_EVT_TING = "836", + + GAME_XIPAI = "20836", + GAME_EVENT_XIPAI = "20837", + GAME_EVENT_NOTIFY_XIPAI = "20838", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/changsha/RecordEvent.lua b/lua_probject/extend_project/extend/majiang/changsha/RecordEvent.lua new file mode 100644 index 00000000..47b92546 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/changsha/RecordEvent.lua @@ -0,0 +1,14 @@ +local Record_Event = { + Evt_QiShou = "QSWin", + Evt_GetCard = "GetCard", + Evt_OutCard = "OutCard", + Evt_Action = "Action", + -- Evt_HaiDi = "HaiDi", + Evt_KaiGang = "OpenKong", + Evt_Win = "Win", + Evt_Niao = "Niao", + Evt_Piao = "PiaoNiao", + Evt_Result = "Result", +} + +return Record_Event \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaoshan/CS_Win_Type.lua b/lua_probject/extend_project/extend/majiang/chaoshan/CS_Win_Type.lua new file mode 100644 index 00000000..5523c7c3 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaoshan/CS_Win_Type.lua @@ -0,0 +1,36 @@ +local CS_Win_Type = { + "鸡胡", + "平胡", + "七小对", + "豪华七小对", + "双豪华七小对", + "三豪华七小对", + "清一色", + "碰碰胡", + "杠上开花", + "杠上炮", + "抢杠胡", + "混一色", + "十三幺", + "天胡", + "地胡", + "人胡", + "十八罗汉", + "小三元", + "大三元", + "小四喜", + "大四喜", + "幺九", + "四鬼胡牌", + "全风", + "全求人", + "清幺九", + "字一色", + "无鬼翻倍", + "流局翻倍", + "海底捞月", + "门清", + "大胡", +} +return CS_Win_Type + diff --git a/lua_probject/extend_project/extend/majiang/chaoshan/CardCheck.lua b/lua_probject/extend_project/extend/majiang/chaoshan/CardCheck.lua new file mode 100644 index 00000000..71dd7f8e --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaoshan/CardCheck.lua @@ -0,0 +1,378 @@ +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + num = num == nil and 1 or num + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if(result ==num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local zhongid = 0 + + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + zhong_count = 0, + qidui = false, + hongzhong_count = 0, + qidui_pari_count = 0 +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + if (card == zhongid) then + self.zhong_count = self.zhong_count +1 + else + self.cardList[#self.cardList + 1] = card + end + end + table.sort(self.cardList) +end + +function M:tryShunzi(card) + if (card < 400 and card % 100 > 7) then + return false + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryKezi(card) + if (checkCardAndRomve(card, self.cardList, 3)) then + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (checkCardAndRomve(card, self.cardList, 2)) then + local cardGroup = {card,card} + self:push(cardGroup) + self.pair_count = 1 + return true + end + return false +end + + +function M:tryKezi1Zhong(card) + if (self.zhong_count >= 1 and checkCardAndRomve(card, self.cardList,2)) then + local cardGroup = {card,card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + return true + end + return false +end + +function M:tryKezi2Zhong(card) + if (self.zhong_count >= 2 and checkCardAndRomve(card, self.cardList,1)) then + local cardGroup = {card,zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + return true + end + return false +end + +function M:tryShunzi1Zhong(card) + if (card % 100 > 8) then + return false + end + + if (self.zhong_count < 1) then + return false + end + + if (checkCard(card + 1, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,card+1,zhongid} + self:push(cardGroup) + return true + end + + if (checkCard(card + 2, self.cardList) and ((card + 1) % 100 ~= 0)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 2, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,zhongid,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair1Zhong(card) + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 1) then + return false + end + removeCard(self.cardList, card, 1) + local cardGroup = {card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + self.pair_count = 1 + return true +end + +function M:tryPair2Zhong() + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 2) then + return false + end + local cardGroup = {zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + self.pair_count = 1 + return true +end + +function M:tryWin() + if (self.zhong_count == 4 and not self.eight_laizi) or (self.zhong_count == 8 and self.eight_laizi) then + return true + end + if (#self.cardList == 0 and self.pair_count == 1) then + return true + end + if (#self.cardList == 0 and self.pair_count == 0) then + return self:tryPair2Zhong() + end + + if (#self.cardList == 0) then + return false + end + + local activeCard = self.cardList[1] + if (self:tryPair(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + + if (self:tryKezi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi2Zhong(activeCard)) then + + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryPair1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + return false +end + +function M:checkQidui() + if (not self.qidui) then + return false + end + if ((#self.cardList + self.zhong_count) ~= 14) then + return false + end + local cardList = membe_clone(self.cardList) + self.qidui_pari_count = 0 + self.hongzhong_count = self.zhong_count + return self:isQdPari(cardList) +end + +function M:isQdPari(cardList) + if(self.qidui_pari_count == 7) then + return true + end + if (#cardList== 0) then + return true + end + local card = cardList[1] + if (cardNum(card, cardList) >= 2) then + removeCard(cardList, card, 2) + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + + if (self.hongzhong_count > 0) then + removeCard(cardList, card, 1) + self.hongzhong_count = self.hongzhong_count - 1 + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + return false +end + +local function init(self,cardInhand,addCard,isZhong,qidui,eightLaizi) + self.stack = {} + self.pair_count = 0 + self.cardList = membe_clone(cardInhand) + self.qidui = qidui + self.eight_laizi = eightLaizi + self.cardList[#self.cardList+1] = addCard + if (isZhong) then + self.zhong_count = cardNum(zhongid, self.cardList) + removeCard(self.cardList, zhongid, self.zhong_count) + end + table.sort(self.cardList) + --printlog("添加排序====>>>") + --pt(self.cardList) + return self:checkQidui() or self:tryWin() +end + +local specialCardList={400,403,406,409,412,415,418} +function M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + --printlog("isZhong",isZhong) + --printlog("qidui",qidui) + --printlog("eightLaizi",eightLaizi) + --pt(cardInhand) + local self = setmetatable({}, {__index = M}) + local tingList = {} + if not cardInhand or #cardInhand == 0 then + return tingList + end + for k=100,300,100 do + for i=1,9 do + local tem = k + i + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + --printlog("返回结果为===>>>",result) + if(result) then + tingList[#tingList + 1] = tem + end + end + end + + for j=1,#specialCardList do + local tem = specialCardList[j] + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + if(result) then + tingList[#tingList + 1] = tem + end + end + + return tingList +end + +function M.MuiltiplteCaculateTingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + zhongid=DataManager.CurrenRoom.laiziInfo[1] + local tempTingList2={} + local tempTingList1=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo[2] then + zhongid=DataManager.CurrenRoom.laiziInfo[2] + tempTingList2=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + zhongid=DataManager.CurrenRoom.laiziInfo[1] + end + local currentTingList={} + if #tempTingList1>0 and #tempTingList2>0 then + currentTingList=CombineDictionaryAndRemoveSomeItem(tempTingList1,tempTingList2) + elseif #tempTingList1>0 then + currentTingList=tempTingList1 + elseif #tempTingList2>0 then + currentTingList=tempTingList2 + end + + return currentTingList + + else + zhongid=0 + return M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + end + +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaoshan/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/chaoshan/EXClearingView.lua new file mode 100644 index 00000000..f4d60988 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaoshan/EXClearingView.lua @@ -0,0 +1,625 @@ +require("Game.View.ResultView") +local Hu_Type_Name = import(".CS_Win_Type") + +local EXClearingView = {} + +local M = EXClearingView + +function EXClearingView.new(blur_view) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self._full = true + ResultView.init(self, "ui://Main_Majiang/clearing") + + self._currenIndex = 0 + self._blur_view = blur_view + self._close_zone = false + self:InitMaPai() + + return self +end + +function M:InitMaPai() + self.maPaiCtr=self._view:GetController("mapai") + self.maPaiCtr.selectedIndex=0 + + self.maPaiList={} + + for i=1,8 do + local tempMP=self._view:GetChild("niao"..i) + table.insert(self.maPaiList,tempMP) + end + +end + + +function M:IsMapaiShow(niao,isShow) + if niao then + niao.visible=isShow + end +end + + +function M:SetMaPaiValue(niao,value) + if niao then + niao.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..value + end +end + +function M:SetMaPaiColor(niao,num) + niao:GetController("color").selectedIndex=num +end + +function M:HideAllMapai() + for i=1,#self.maPaiList do + self:IsMapaiShow(self.maPaiList[i],false) + self:SetMaPaiColor(self.maPaiList[i],0) + end +end + + + +function M:ShowSelectMaPai(niaoList) + if niaoList and #niaoList>0 then + self.maPaiCtr.selectedIndex=1 + self:HideAllMapai() + for i=1,#niaoList do + self:IsMapaiShow(self.maPaiList[i],true) + self:SetMaPaiValue(self.maPaiList[i],niaoList[i].card) + if niaoList[i].score>0 then + self:SetMaPaiColor(self.maPaiList[i],2) + end + end + else + self.maPaiCtr.selectedIndex=0 + end +end + + + +function M:CalculatePaixingInfo(result) + self.WinList={} + if result.info_list and #result.info_list>0 then + for i=1,#result.info_list do + if result.info_list[i].win_list and #result.info_list[i].win_list>0 then + table.insert(self.WinList,result.info_list[i].win_list) + end + end + end + + printlog("牌型列表====>>>") + pt(self.WinList) +end + + +function M:SetPaixingxiangqing(num) + for i=1,#self.PaiXingXiangQingCtrList do + if self.PaiXingXiangQingCtrList[i] then + self.PaiXingXiangQingCtrList[i].selectedIndex=num + end + end +end + + + +function M:InitData(over, room, result, total_result, callback) + self._callback = callback + local _overCtr = self._view:GetController("over") + local btn_confirm = self._view:GetChild("btn_confirm") + local btn_result = self._view:GetChild("btn_showResult") + local btn_close = self._view:GetChild("big_result"):GetChild("btn_close") + local _btnCtr = self._view:GetController("button") + local _sdkCtr = self._view:GetController("sdk") + local ctr_type = self._view:GetController("type") + self._view:GetChild("tex_roominfo").text = string.format("房号%s 局%s/%s %s", room.room_id, room.curren_round, room.room_config.round, os.date("%Y-%m-%d %H:%M:%S", os.time())) + self._view:GetChild("tex_gameinfo").text = string.gsub(room.room_config:GetDes2(), "\r", "") + + if result then + self:ShowSelectMaPai(result.niao) + self:CalculatePaixingInfo(result) + end + + + self.PaiXingXiangQingCtrList={} + + local paixingxiangqing=self._view:GetChild("btn_detal") + local fanhuipaixing=self._view:GetChild("btn_fanhuipaixing") + fanhuipaixing.visible=false + paixingxiangqing.visible=true + paixingxiangqing.onClick:Add(function() + paixingxiangqing.visible=false + fanhuipaixing.visible=true + self:SetPaixingxiangqing(1) + end) + fanhuipaixing.onClick:Add(function() + paixingxiangqing.visible=true + fanhuipaixing.visible=false + self:SetPaixingxiangqing(0) + end) + + + if over ~= 2 then + if result.liuju then + ctr_type.selectedIndex = 3 + else + local info_list = result.info_list + for i = 1, #info_list do + local is_win = info_list[i].is_win + if is_win then + if info_list[i].seat == room.self_player.seat then + ctr_type.selectedIndex = 1 + else + ctr_type.selectedIndex = 2 + end + end + end + end + if over == 0 then + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + btn_confirm.onClick:Add(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:DestroyWithCallback() + end) + self:AddClearItem(room, result.info_list, nil, over, result.niao, result.active_player) + elseif over == 1 then + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add(function() + self.maPaiCtr.selectedIndex=0 + _overCtr.selectedIndex = 1 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + if self._qsinfo_view then + self._qsinfo_view:Dispose() + end + end) + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + self:AddClearItem(room, result.info_list, total_result.info_list, over, result.niao, result.active_player) + end + else + _overCtr.selectedIndex = 1 + self.maPaiCtr.selectedIndex=0 + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + self:AddClearItem(room, nil, total_result.info_list, over) + end +end + +function M:AddClearItem(room, data, total_data,over, niao, active_player) + local n = over + 1 + local list_view1 = self._view:GetChild("player_list_1") + local list_view2 = self._view:GetChild("player_list_2") + if 0 == over or 1 == over then + table.sort(data, function(a,b) return a.seat < b.seat end) + list_view1:RemoveChildrenToPool() + for i=1,#data do + local item = list_view1:AddItemFromPool() + self:FillItemData(room, data[i], item, active_player, niao) + end + if #data == 3 then + list_view1.lineGap = 54 + elseif #data == 2 then + list_view1.lineGap = 108 + end + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end +end + +function M:FillItemData(room, data, item, active_player, niao) + local _gamectr = ControllerManager.GetController(GameController) + local p = room:GetPlayerBySeat(data["seat"]) + item:GetChild("playerName").text = p.self_user.nick_name + item:GetChild("lab_hp").text="中马" + local user = room:GetPlayerBySeat(data["seat"]).self_user + local head = item:GetChild('head'):GetChild('n4') + ImageLoad.Load(user.head_url, head) + + -- 手牌 + local hand_cards = data["hand_card"] + table.sort( hand_cards, ViewUtil.HandCardSort) + local hand_list_view = item:GetChild("hand_card_list") + hand_list_view:RemoveChildrenToPool() + for i=1,#hand_cards do + local card = hand_list_view:AddItemFromPool() + card.icon = "ui://Main_Majiang/202_"..hand_cards[i] + end + hand_list_view.width = 52 * #hand_cards + + local fz_card = p.fz_list + local fz_card_list = item:GetChild("fz_card_list") + fz_card_list.width = 157 * #fz_card * 0.8 + fz_card_list:RemoveChildrenToPool() + for i=1,#fz_card do + if fz_card[i].type == FZType.Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j=1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + elseif fz_card[i].type == FZType.Gang or fz_card[i].type == FZType.Gang_An or fz_card[i].type == FZType.Gang_Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_4") + for j=1,4 do + local card = item:GetChild("card_" .. j) + if fz_card[i].type == FZType.Gang_An and j == 4 then + card.icon = "ui://Main_Majiang/202_00" + else + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + end + end + end + + local huadd = data["hu_score"] + local gangadd = data["gang_score"] + local birdadd = data["niao_score"] + local total = data["round_score"] + local geng_zhuan=data["geng_zhuan"] + local sp = " " + local str = "胡:"..huadd.."分" + str = str..sp.."杠:"..gangadd.."分" + str = str..sp.."中马:"..birdadd.."分" + + if data["mai_niao_score"] and data["mai_niao_score"]~=0 then + str = str..sp.."买马:"..data["mai_niao_score"].."分" + end + + if data["ma_geng_gong"] and data["ma_geng_gong"]~=0 then + str = str..sp.."马跟杠:"..data["ma_geng_gong"].."分" + end + + if geng_zhuan and geng_zhuan~=0 then + str = str..sp.."跟庄:"..geng_zhuan.."分" + end + + if data["repeat_win"] and data["repeat_win"]~=0 then + str = str..sp.."连庄x"..data["repeat_win"] + end + + + + + + item:GetChild("score1").text = str + -- local total_score = data["total_score"] + if total >= 0 then + item:GetChild("score2").text = "+"..total + item:GetChild("score2").grayed = false + else + item:GetChild("score2").text = total + item:GetChild("score2").grayed = true + end + + + --计算牌型 + local totalPeson=DataManager.CurrenRoom.room_config.people_num-1 + local win_list = data["win_list"] + local is_win = data["is_win"] or false + local str1="" + sp="、" + if is_win then + if win_list then + if DataManager.CurrenRoom.isZiMoHu then + str1="自摸" + else + str1="接炮" + end + for i=1,#win_list do + local huName=Hu_Type_Name[win_list[i].type] + if huName then + str1=str1..sp..huName.."x"..win_list[i].score + end + + end + str1=str1.." +"..huadd.."分" + end + + else + printlog("输家============") + if DataManager.CurrenRoom.isZiMoHu then + printlog("自摸处理============") + --str1="" + if #self.WinList==1 then + for i=1,#self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + if j==1 then + str1=str1..huName.."x"..self.WinList[i][j].score + else + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + + end + end + + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + else + printlog("非自摸处理====>>>") + --点炮 一炮多响 + local yipaoduoxiang=false + if #self.WinList>1 then + yipaoduoxiang=true + end + + if yipaoduoxiang then + printlog("一炮多响====>>>") + str="点炮" + local allTypeList={} + local isHas=false + for i=1,#self.WinList do + for j=1,#self.WinList[i] do + isHas=IsHasDictionary(self.WinList[i][j].type,allTypeList) + if isHas==false then + table.insert(allTypeList,self.WinList[i][j].type) + end + end + + end + + if #allTypeList>0 then + for i=1,#allTypeList do + local huName=Hu_Type_Name[allTypeList[i]] + if huName then + str1=str1..huName.."、" + end + end + str1=str1.." "..huadd.."分" + end + + else + + if p.self_user.account_id == active_player and is_win == false and not data["liuju"] then + str1="点炮" + if #self.WinList==1 then + for i=1,# self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + end + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + end + + end + + + end + end + + -- + printlog("牌型计算==>>>",str1) + + if data["ming_gang_num"]>0 then + str1=str1.." 明杠x"..data["ming_gang_num"] + end + + if data["an_gang_num"]>0 then + str1=str1.." 暗杠x"..data["an_gang_num"] + end + + if data["dian_gang_num"]>0 then + str1=str1.." 点杠x"..data["dian_gang_num"] + end + + if gangadd~=0 then + if gangadd>0 then + str1=str1.." +"..gangadd.."分" + else + str1=str1.." "..gangadd.."分" + end + + end + + if birdadd~=0 then + if birdadd>0 then + str1=str1.." 中马分数+"..birdadd.."分" + else + str1=str1.." 中马分数"..birdadd.."分" + end + + end + + + if data["mai_niao_score"] and data["mai_niao_score"]~=0 then + if data["mai_niao_score"]>0 then + str = str..sp.."买马/罚马分数:+"..data["mai_niao_score"].."分" + else + str = str..sp.."买马/罚马分数:"..data["mai_niao_score"].."分" + end + + end + + + if data["ma_geng_gong"] and data["ma_geng_gong"]~=0 then + if data["ma_geng_gong"]>0 then + str1 = str1.." 马跟杠:+"..data["ma_geng_gong"].."分" + else + str1 = str1.." 马跟杠:"..data["ma_geng_gong"].."分" + end + + end + + if geng_zhuan and geng_zhuan~=0 then + if geng_zhuan>0 then + str1 = str1.." 跟庄:+"..geng_zhuan.."分" + else + str1 = str1.." 跟庄:"..geng_zhuan.."分" + end + + end + + + + + + item:GetChild("score3").text=str1 + local paixingCtr=item:GetController("detail") + table.insert(self.PaiXingXiangQingCtrList,paixingCtr) + ------------------------- + + local hp_nonnegative = room:checkHpNonnegative() + item:GetController("nonnegative").selectedIndex = hp_nonnegative and 1 or 0 + if hp_nonnegative then + local hp_info = data.hp_info + local ctr_hp_limit = item:GetController("hp_limit") + local hp = d2ad(hp_info.round_actual_hp) + if hp >= 0 then hp = "+" .. tostring(hp) end + item:GetChild("tex_hp").text = hp + ctr_hp_limit.selectedIndex = hp_info.upper_limit and 1 or 0 + end + + + item:GetController("win").selectedIndex = is_win and 0 or 1 + if p.self_user.account_id == active_player and is_win == false and total < 0 then + item:GetController("win").selectedIndex = 2 + end + + if is_win then + item:GetController("bg").selectedIndex=1 + else + item:GetController("bg").selectedIndex=0 + end + local win_card = item:GetChild("win_card") + win_card.icon = "ui://Main_Majiang/202_"..data["win_card"] + + if niao and #niao>0 then + local currentNiaoList=self:CalculateNiao(niao ,data["seat"]) + if currentNiaoList and #currentNiaoList>0 then + local lst_niao = item:GetChild("list_niao") + lst_niao:RemoveChildrenToPool() + for i = 1, #currentNiaoList do + if currentNiaoList[i].score > 0 then + local card_niao = lst_niao:AddItemFromPool() + card_niao.icon = "ui://Main_Majiang/202_" .. currentNiaoList[i].card + end + end + end + end + + + if p.seat == room.banker_seat then + item:GetController("bank").selectedIndex = 1 + end +end + +function M:CalculateNiao(niaoList,seat) + local tempNiao={} + for i=1,#niaoList do + if niaoList[i].seat==seat then + table.insert(tempNiao,niaoList[i]) + end + end + return tempNiao +end + + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + player_list[i].id = user.account_id + player_list[i].hp_info = data[i].hp_info + player_list[i].score = data[i].total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + + local settle_log = data[i].settle_log + player_list[i].param = {} + player_list[i].param[1]={} + player_list[i].param[1].key = "自摸次数:" + player_list[i].param[1].value = tostring(data[i].settle_log.zimo) + player_list[i].param[2]={} + player_list[i].param[2].key = "接炮次数:" + player_list[i].param[2].value = tostring(data[i].settle_log.jie_pao) + player_list[i].param[3]={} + player_list[i].param[3].key = "点炮次数:" + player_list[i].param[3].value = tostring(data[i].settle_log.dian_pao) + player_list[i].param[4]={} + player_list[i].param[4].key = "暗杠次数:" + player_list[i].param[4].value = tostring(data[i].settle_log.an_kong) + player_list[i].param[5]={} + player_list[i].param[5].key = "明杠次数:" + player_list[i].param[5].value = tostring(data[i].settle_log.ming_kong) + end + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + local big_result = self._view:GetChild("big_result") + big_result:GetChild("txt_room_info").text = string.format("%s 房号%s 局%s/%s", os.date("%Y/%m/%d", os.time()), room.room_id, room.curren_round, room.room_config.round) + local lst_p = big_result:GetChild("player_list") + if #player_list == 3 then + lst_p.columnGap = 108 + elseif #player_list == 2 then + lst_p.columnGap = 208 + end + self:InitBigResult(room, 30) + local show_detail = room.hpOnOff == 1 + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + com_p:GetController("jsicon").selectedIndex=i-1 + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + if show_detail then + local score = 0 + if com_p:GetController("pn").selectedIndex == 0 then + score = com_p:GetChild("txt_navigate").text + else + score = com_p:GetChild("txt_positive").text + end + score = score / room.score_times + com_p:GetChild("tex_detail_score").text = string.format("%s × %s倍", score, room.score_times) + end + end + if room.group_id ~= 0 then + big_result:GetController("group").selectedIndex = 1 + end + DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild("btn_head") + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= "" then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end + +function M:DestroyWithCallback() + if self._callback then + self._callback() + end + self:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaoshan/EXGameController.lua b/lua_probject/extend_project/extend/majiang/chaoshan/EXGameController.lua new file mode 100644 index 00000000..d75c1cb2 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaoshan/EXGameController.lua @@ -0,0 +1,393 @@ +local TX_Protocol = import(".Protocol") +local FZTipList = require("main.majiang.FZData") +local TX_GameEvent = import(".GameEvent") + +local M = {} + +--- Create a new GameController +function M.new() + setmetatable(M,{__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("测试麻将") + self.class = "TX_GameController" + return self +end + +function M:init(name) + GameController.init(self,name) + + self._eventmap[TX_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[TX_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[TX_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[TX_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[TX_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[TX_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + self._eventmap[TX_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[TX_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[TX_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[TX_Protocol.GAME_EVT_RESULT2] = self.OnEventResult2 + self._eventmap[TX_Protocol.GAME_EVT_NIAO] = self.OnEventNiao + self._eventmap[TX_Protocol.GAME_EVT_PIAOTIP] = self.OnEventPiaoTip + self._eventmap[TX_Protocol.GAME_EVT_PIAO] = self.OnEventPiao +end + +local __pre_delete_card = false +-- 发送出牌指令到服务器 +function M:SendOutCard(card, callback) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_DIS_CARD, _data) + + -- 进行预删牌处理 + local p = _room.self_player + _room.curren_outcard_seat = -1 + list_remove(p.card_list,card) + table.sort(p.card_list, ViewUtil.HandCardSort) + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + __pre_delete_card = true + callback() +end + + +-- 发送放子选择到服务器 +function M:SendAction(id) + local _data = {} + _data["id"] = id + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_ACTION, _data) +end + +function M:OnEventSendCards(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + if not _room.room_config.piao_niao or _room.self_player.entrust then + _room.curren_round = _room.curren_round + 1 + end + if _room.curren_round > 0 then _room.playing = true end + + printlog("开始发牌===========>>>") + pt(evt_data) + + local room = DataManager.CurrenRoom + --printlog(evt_data.laiziCard) + --printlog(evt_data.laiziCard2) + --printlog(evt_data.laiziCardBefore) + --printlog(evt_data.laiziCard2Before) + + room.laiziInfo={} + if evt_data.laiziCardBefore>0 then + table.insert(room.laiziInfo,evt_data.laiziCard) + if evt_data.laiziCard2>0 then + table.insert(room.laiziInfo,evt_data.laiziCard2) + end + else + room.laiziInfo=nil + end + + if evt_data.laiziCardBefore>0 then + DispatchEvent(self._dispatcher,TX_GameEvent.SendLaiZi,evt_data.laiziCardBefore,evt_data.laiziCard,evt_data.laiziCard2,true ) + end + + + + + -- _room.SelfPlayer.AutoOutCard = false + local handcards = evt_data["card_list"] + local p = _room.self_player + local seat = evt_data["bank_seat"] + self._cacheEvent:Enqueue(function() + _room.banker_seat = seat + for i=1,#_room.player_list do + _room.player_list[i].hand_left_count = 13 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + end + p.card_list = handcards + self._room.self_player.hand_left_count = #handcards + table.sort( handcards, ViewUtil.HandCardSort ) + DispatchEvent(self._dispatcher,TX_GameEvent.SendCards, p) + end) +end + +function M:OnEventOutCard(evt_data) + printlog("出牌事件===========>>>") + pt(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local ting_list = nil + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + _room.last_outcard_seat = seat + if seat == _room.self_player.seat and __pre_delete_card then + __pre_delete_card = false + else + if seat == _room.self_player.seat then + list_remove(p.card_list, card) + table.sort(p.card_list, ViewUtil.HandCardSort) + end + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + DispatchEvent(self._dispatcher,TX_GameEvent.OutCard, p, card) + end + end) +end + + +function M:OnEventTakeCard(evt_data) + printlog("抓牌===========>>>") + pt(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + p.hand_left_count = p.hand_left_count +1 + if (seat == _room.self_player.seat) then + _room.self_player.card_list[#_room.self_player.card_list+1] = card + -- table.sort( _room.self_player.card_list, ViewUtil.HandCardSort ) + end + DispatchEvent(self._dispatcher,TX_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnEventOutHint(evt_data) + printlog("出牌提示事件===========>>>") + pt(evt_data) + self._cacheEvent:Enqueue(function() + self._room.curren_outcard_seat = self._room.self_player.seat + DispatchEvent(self._dispatcher,TX_GameEvent.OutHint) + end) +end + +function M:OnEventTurn(evt_data) + printlog("转轮指向===========>>>") + pt(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + -- self._room.curren_outcard_seat = seat + DispatchEvent(self._dispatcher,TX_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + printlog("放子提示事件===========>>>") + pt(evt_data) + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + local weight = evt_data["weight"] + for i=1,#list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + -- if (dtip["opcard"]) then + -- local opcard = dtip["opcard"] + -- tip.OpCard = opcard + -- tip.OpCard[3] = tip.Card + -- table.sort(tip.OpCard) + -- end + tiplist:AddTip(tip) + end + DispatchEvent(self._dispatcher,TX_GameEvent.FZTips, tiplist, weight) + end) +end + +function M:OnEventFzAction(evt_data) + printlog("吃杠碰行为事件===========>>>") + pt(evt_data) + local _room = self._room + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local type = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + -- local openkong = evt_data["openkong"] + + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local fz = nil + local index = -1 + local ftype = type + if (ftype == FZType.Gang_Peng) then + for i=1,#p.fz_list do + if (p.fz_list[i].card == card) then + p.fz_list[i].card = card + fz = p.fz_list[i] + fz.type = type + index = i -1 + break + end + end + end + if (index == -1) then + fz = {} + fz.card = card + fz.type = type + fz.active_card = actice_card + p.fz_list[#p.fz_list+1] = fz + end + fz.from_seat = from_seat + local remove_num = #opcard + + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(p.card_list,opcard[i]) + end + end + + p.hand_left_count = p.hand_left_count - remove_num + if from_seat ~= p.seat then + -- if (fz.Type == FZType.Chi) then card = actice_card end + local fp = _room:GetPlayerBySeat(from_seat) + table.remove(fp.outcard_list,#fp.outcard_list) + end + + DispatchEvent(self._dispatcher,TX_GameEvent.FangziAction, fz, p, index) + end) +end + +function M:OnEventHu(evt_data) + printlog("胡牌===========>>>") + pt(evt_data) + + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local win_card = evt_data["win_card"] + local win_list = evt_data["win_list"] + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + table.sort( win_p.card_list, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher,TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], win_card, cards, win_list) + end) + + --[[local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local hu_card = evt_data["win_card"] + table.sort(cards, ViewUtil.HandCardSort) + cards[#cards +1] = hu_card + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + DispatchEvent(self._dispatcher,TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], cards, hu_card) + end)--]] +end + +function M:OneventResult1(evt_data) + printlog("小结算===========>>>") + pt(evt_data) + local over = evt_data.type + --0:小结算 1:小大结算 2:大结算 + self._room._reload_flag = false + self._room.playing = false + if 0 == over then + local result = evt_data.result + self._cacheEvent:Enqueue(function() + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil,true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +-- function M:OnEventResult2(evt_data) +-- DataManager.CurrenRoom.Over = true +-- ControllerManager.SetGameNetClient(nil,true) + -- local info_list = evt_data["info_list"] + -- if self._result ~= nil then + -- self._cacheEvent:Enqueue(function() + -- self:OneventResult1(self._result) + -- self._result = nil + -- end) + -- end +-- self._cacheEvent:Enqueue(function() +-- DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, info_list) +-- ControllerManager.ChangeController(LoddyController) +-- end) +-- end + +function M:OnEventNiao(evt_data) + local list = evt_data["niao"] + local start_seat = evt_data["start_seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EventNiao, list, start_seat) + end) +end + +function M:OnEventPiaoTip() + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + self._cacheEvent:Enqueue(function() + if not self._room._reload_flag then + self._room.curren_round = self._room.curren_round + 1 + end + self._room.playing = true + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiaoTip, evt_data) + end) +end + +function M:OnEventPiao(evt_data) + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiao, evt_data.seat, evt_data.num) + end) +end + +function M:GetPosString( seat ) + if DataManager.CurrenRoom.room_config.people_num ~= 4 then return"" end + if seat == 1 then + return "北" + elseif seat == 2 then + return "西" + elseif seat == 3 then + return "南" + elseif seat == 4 then + return "东" + end +end + +function M:Discard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + -- list_remove(_room.SelfPlayer.Cards,card) + -- table.sort(_room.SelfPlayer.Cards) + _client:send(Protocol.Game_Da, _data) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaoshan/EXGameInfo.lua b/lua_probject/extend_project/extend/majiang/chaoshan/EXGameInfo.lua new file mode 100644 index 00000000..e05f2055 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaoshan/EXGameInfo.lua @@ -0,0 +1,189 @@ +local EXGameInfo = {} + +local M = EXGameInfo + + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/majiang/chaoshan/ui/Info_MJ_ChaoShan") + return self +end + +function M:FillData() + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 3 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_ChaoShan/Cgm_create_room") +end + +local _help_url= "ui://Info_MJ_ChaoShan/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_MJ_ChaoShan/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_MJ_ChaoShan/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list ={} --{"四人潮汕","三人潮汕","二人潮汕"} +function M:GetPlayList() + return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + 1 + local people = _config:GetController("play_list").selectedIndex+2 + + local laizi=_config:GetController("GuiType").selectedIndex + local zhama=_config:GetController("zhama").selectedIndex + local niao=0 + local niao_opt=0 + local magengdifen=false + local magenggang=false + if zhama>0 and zhama<4 then + niao=1 + niao_opt=zhama + magengdifen=_config:GetChild("btn_magengdifen").selected and true or false + magenggang=_config:GetChild("btn_magenggang").selected and true or false + elseif zhama==4 then + niao=3 + --local baozhama=_config:GetController("baozhama").selectedIndex + niao_opt=0 + end + + + + + local dianpao=_config:GetChild("btn_paohu").selected and true or false + local pengpenghu=_config:GetChild("btn_pengpenghu").selected and true or false + local qidui=_config:GetChild("btn_qixiaodui").selected and true or false + local qiangganghu=_config:GetChild("btn_qiangganghu").selected and true or false + local hunyise=_config:GetChild("btn_hunyise").selected and true or false + local qingyise=_config:GetChild("btn_qingyise").selected and true or false + local gangshangkaihua=_config:GetChild("btn_gangshangkahua").selected and true or false + local haohua_qidui=_config:GetChild("btn_haohua").selected and true or false + local shishanyao=_config:GetChild("btn_shisanyao").selected and true or false + local tiandihu=_config:GetChild("btn_tiandihu").selected and true or false + local haohua2_qidui=_config:GetChild("btn_shuanghaohua").selected and true or false + local haohua3_qidui=_config:GetChild("btn_sanhaohua").selected and true or false + local shibaluohan=_config:GetChild("btn_shibaluohan").selected and true or false + local xiaoshanyuan=_config:GetChild("btn_xiaosanyuan").selected and true or false + local xiaosixi=_config:GetChild("btn_xiaosixi").selected and true or false + local dashanyuan=_config:GetChild("btn_dasanyuan").selected and true or false + local dasixi=_config:GetChild("btn_dasixi").selected and true or false + local must_hu=_config:GetChild("btn_bihu").selected and true or false + local guopeng=_config:GetChild("btn_guopengbupeng").selected and true or false + local guogang=_config:GetChild("btn_guogangbugang").selected and true or false + local zi_dong_hu=_config:GetChild("btn_zidonghu").selected and true or false + + + ------ + local _data = {} + _data["opt"] = round + _data["maxPlayers"] = people + + _data["laizi"] = laizi + _data["niao"] = niao + _data["niao_opt"] = niao_opt + _data["ma_gen_di_fen"] = magengdifen + _data["ma_gen_gong"] = magenggang + + + _data["dianpao"] = dianpao + _data["pengpenghu"] = pengpenghu + _data["qidui"] = qidui + _data["qiangkong_2bei"] = qiangganghu + _data["hunyise"] = hunyise + _data["qingyise"] = qingyise + _data["gangshangkaihua"] = gangshangkaihua + _data["haohua_qidui"] = haohua_qidui + _data["shishanyao"] = shishanyao + _data["tiandihu"] = tiandihu + _data["haohua2_qidui"] = haohua2_qidui + _data["haohua3_qidui"] = haohua3_qidui + _data["shibaluohan"] = shibaluohan + _data["xiaoshanyuan"] = xiaoshanyuan + _data["xiaosixi"] = xiaosixi + _data["dashanyuan"] = dashanyuan + _data["dasixi"] = dasixi + _data["must_hu"] = must_hu + _data["guopeng"] = guopeng + _data["guogang"] = guogang + _data["zi_dong_hu"] = zi_dong_hu + + --printlog("上传房间配置==========>>>") + --pt(_data) + + return _data +end + +function M:LoadConfigData(data) + --printlog("加载房间配置=========>>>") + --pt(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt-1 + _config:GetController("play_list").selectedIndex = data.maxPlayers-2 + + _config:GetController("GuiType").selectedIndex = data.laizi + + + _config:GetChild("btn_magengdifen").selected = false + _config:GetChild("btn_magenggang").selected = false + + local GuiTypeValue=0 + if data.niao ==0 then + GuiTypeValue=0 + elseif data.niao ==1 then + GuiTypeValue=data.niao_opt + _config:GetChild("btn_magengdifen").selected = data.ma_gen_di_fen + _config:GetChild("btn_magenggang").selected = data.ma_gen_gong + elseif data.niao ==3 then + GuiTypeValue=4 + --_config:GetController("baozhama").selectedIndex = data.niao_opt + end + + _config:GetController("zhama").selectedIndex = GuiTypeValue + + + _config:GetChild("btn_paohu").selected = data.dianpao or false + _config:GetChild("btn_pengpenghu").selected = data.pengpenghu or false + _config:GetChild("btn_qixiaodui").selected = data.qidui or false + _config:GetChild("btn_qiangganghu").selected = data.qiangganghu or false + _config:GetChild("btn_hunyise").selected = data.hunyise or false + _config:GetChild("btn_qingyise").selected = data.qingyise or false + _config:GetChild("btn_gangshangkahua").selected = data.gangshangkaihua or false + _config:GetChild("btn_haohua").selected = data.haohua_qidui or false + _config:GetChild("btn_shisanyao").selected = data.shishanyao or false + _config:GetChild("btn_tiandihu").selected = data.tiandihu or false + _config:GetChild("btn_shuanghaohua").selected = data.haohua2_qidui or false + _config:GetChild("btn_sanhaohua").selected = data.haohua3_qidui or false + + _config:GetChild("btn_shibaluohan").selected = data.shibaluohan or false + _config:GetChild("btn_xiaosanyuan").selected = data.xiaoshanyuan or false + _config:GetChild("btn_xiaosixi").selected = data.xiaosixi or false + _config:GetChild("btn_dasanyuan").selected = data.dashanyuan or false + _config:GetChild("btn_dasixi").selected = data.dasixi or false + _config:GetChild("btn_bihu").selected = data.must_hu or false + _config:GetChild("btn_guopengbupeng").selected = data.guopeng or false + _config:GetChild("btn_guogangbugang").selected = data.guogang or false + + _config:GetChild("btn_qiangganghu").selected= data.qiangkong_2bei or false + _config:GetChild("btn_zidonghu").selected= data.zi_dong_hu or false + + + end + + + + + +return M + \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaoshan/EXMainView.lua b/lua_probject/extend_project/extend/majiang/chaoshan/EXMainView.lua new file mode 100644 index 00000000..86319fd6 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaoshan/EXMainView.lua @@ -0,0 +1,778 @@ +local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local MJMainView = require("main.majiang.MJMainView") +local EXClearingView = import(".EXClearingView") +local TX_GameEvent = import(".GameEvent") +local HuTipView = import("main.majiang.HuTipView") +local SettingView = import("main.majiang.MJSettingViewNew") +local PlayerInfoView = import(".EXPlayerInfoView") +local M = {} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M,{__index = MJMainView}) + local self = setmetatable({}, {__index = M}) + self.class = "MainView" + self.asset_group = "ChaoShan_MJ" + self:init() + ViewUtil.PlayMuisc(self.asset_group, "extend/majiang/chaoshan/sound/bg.mp3") + return self +end + +function M:InitView(url) + local room = self._room + self._style = 1 + self._gps_style = 1 + self._full = true + UIPackage.AddPackage("extend/majiang/chaoshan/ui/Extend_MJ_ChaoShan") + MJMainView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num .. "_s2") + self._hu_tip = HuTipView.new(self) + + self._view:GetChild('wanfa_text').text =room.room_config.people_num .. '人潮汕 ' .. room.score_times .. '倍' + + self.LaiziBG=self._view:GetChild('n103') + self.LaiziBG.text="鬼牌" + self.LaiziBG.visible=false + self.selectLaiziBtn=self._view:GetChild('selectlaizi') + self.Laizi1Btn=self._view:GetChild('selectlaizi1') + self.Laizi2Btn=self._view:GetChild('selectlaizi2') + self.Laizi1Btn.visible=false + self.Laizi2Btn.visible=false + self.selectLaiziBtn.visible=false + self:SetReconnentLaiziTips() + + self:PlayerChangeLineState() + + if room.playing or room.curren_round > 0 then + self:ReloadRoom() + end +end + + + +function M:SetReconnentLaiziTips() + local room=DataManager.CurrenRoom + if room.beforelaiziCardId and room.beforelaiziCardId>0 then + self:SetShowLaiZiProcess(room.beforelaiziCardId,room.laiziInfo[1],room.laiziInfo[2],false) + end +end + + +function M:SetLaiZiCard(btn,cardId) + btn.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..cardId +end + + +function M:IsShowLaiZi(btn,isShow) + btn.visible=isShow +end + + +function M:HideAllLaiZiCard() + self.Laizi1Btn.visible=false + self.Laizi2Btn.visible=false + self.selectLaiziBtn.visible=false + self.LaiziBG.visible=false +end + +function M:SetShowLaiZiProcess(beforeLaiziID,currentLaizi1ID,currentLaizi2ID,isShowAnim) + --zhongid=currentLaizi1ID + if isShowAnim==nil then isShowAnim=false end + + printlog("当前赋值结果为====>>>") + print(beforeLaiziID) + print(currentLaizi1ID) + print(currentLaizi2ID) + self:HideAllLaiZiCard() + self:SetLaiZiCard(self.selectLaiziBtn,beforeLaiziID) + self:SetLaiZiCard(self.Laizi1Btn,currentLaizi1ID) + if currentLaizi2ID then + self:SetLaiZiCard(self.Laizi2Btn,currentLaizi2ID) + end + + + if isShowAnim==true then + self:IsShowLaiZi(self.selectLaiziBtn,true) + coroutine.start( + function() + coroutine.wait(1) + self:HideAllLaiZiCard() + self.LaiziBG.visible=true + self:IsShowLaiZi(self.Laizi1Btn,true) + if currentLaizi2ID then + self:IsShowLaiZi(self.Laizi2Btn,true) + end + + end + ) + else + self.LaiziBG.visible=true + self:IsShowLaiZi(self.Laizi1Btn,true) + if currentLaizi2ID then + self:IsShowLaiZi(self.Laizi2Btn,true) + end + end + self.LaiziBG.visible=true +end + + +function M:UpdateRound() + self._view:GetChild("tex_round1").text = self._room.curren_round + self._view:GetChild("tex_round2").text = self._room.room_config.round +end + +function M:InitPlayerInfoView() + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem,self) + tem.visible = false + end +end + +function M:NewMJPlayerCardInfoView(view,index) + if index == 1 then + return MJPlayerSelfCardInfoView.new(view,self) + end + return MJPlayerCardInfoView.new(view,self) +end + +function M:EventInit() + -- UIPackage.AddPackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong") + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _gcm_outcard_url = UIPackage.GetItemURL("Main_Majiang", "Gcm_OutCard") + local _player_info = self._player_info + local _gamectr = self._gamectr + + + + _gamectr:AddEventListener(TX_GameEvent.SendLaiZi, function(...) + local arg = {...} + self:SetShowLaiZiProcess(arg[1],arg[2],arg[3],arg[4]) + end) + + + + + _gamectr:AddEventListener(TX_GameEvent.SendCards,function( ... ) + -- self:ShowHuTip() + self:UpdateRound() + self._state.selectedIndex = 1 + local list = _room.player_list + for i=1,#list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateHandCard() + end + end) + _gamectr:AddEventListener(TX_GameEvent.EventTurn, function(...) + local arg = {...} + self._left_time = 15 + local seat = arg[1] + self:UpdateCardBox(self:GetPos(seat)) + -- if seat == self._room.self_player.seat then + -- self:ShowHuTip() + -- end + end) + + _gamectr:AddEventListener(TX_GameEvent.OutHint, function(...) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:UpdateHandCard(true) + end) + + local _gcm_outcard_url ="ui://Main_Majiang/Gcm_OutCard" + _gamectr:AddEventListener(TX_GameEvent.OutCard, function(...) + self:__CloseTip() + self._left_time = 0 + local arg = {...} + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:RemoveCursor() + info:UpdateHandCard() + local outcard = UIPackage.CreateObjectFromURL(_gcm_outcard_url) + info:UpdateOutCardList(outcard, card, self._cursor) + self:PlaySound("ChaoShan_MJ", p.self_user.sex, tostring(card)) + self:PlayMJSound("chupai.mp3") + if seat == _room.self_player.seat then + _room.curren_outcard_seat = -1 + end + end) + _gamectr:AddEventListener(TX_GameEvent.GetCard, function(...) + self:__CloseTip() + local arg = {...} + local seat = arg[1] + local card = arg[2] + -- self._tex_leftTime.text = arg[3] + self._tex_LeftCard.text = arg[3] + -- self:UpdateRoomInfo() + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateHandCard(true) + end) + + _gamectr:AddEventListener(TX_GameEvent.FZTips, function(...) + local arg = {...} + local _tip = arg[1] + local weight = arg[2] + self:__FangziTip(_tip, weight) + end) + + _gamectr:AddEventListener(TX_GameEvent.FangziAction, handler(self,self.OnFangziAction)) + + _gamectr:AddEventListener(TX_GameEvent.ZPHuCard, function(...) + self._left_time = 0 + self:UpdateCardBox(0) + self:__CloseTip() + self._popEvent = false + local arg = {...} + local win_seat = arg[1] + local lose_seat = arg[2] + local win_card = arg[3] + local cards = arg[4] + local win_list = arg[5] + local index = self:GetPos(win_seat) + local info = self._player_card_info[index] + self:RemoveCursor() + info:UpdateHandCard(true, true) + + local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card") + obj_win_card.icon = "ui://Main_Majiang/202_" .. win_card + obj_win_card:GetController("bg").selectedIndex = 1 + info._view:AddChild(obj_win_card) + obj_win_card:Center() + + local url, pNode + local player = _room:GetPlayerBySeat(win_seat) + if win_seat ~= _room.self_player.seat then + url = "ui://Main_Majiang/别人胡" + pNode = info._mask_liangpai + elseif win_seat == _room.self_player.seat then + url = "ui://Main_Majiang/自己胡牌" + pNode = self._view + end + if win_seat == lose_seat then + url = "ui://Main_Majiang/eff_zimo" + end + + local he = UIPackage.CreateObjectFromURL(url) + pNode:AddChild(he) + he:GetTransition("t2"):Play() + he:Center() + if _room.room_config.people_num==2 then + if win_seat ~= _room.self_player.seat then + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + end + + if win_seat == _room.self_player.seat then + printlog("自己位置=====") + he:Center() + elseif url == "ui://Main_Majiang/eff_zimo" then + printlog("自摸地址==========") + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + + + + --- + local isZiMo=win_seat==lose_seat + DataManager.CurrenRoom.isZiMoHu=isZiMo + local hu_sound = isZiMo and ("zimo"..math.random(1, 3)) or ("hu"..math.random(1, 2)) + printlog("声音====>>>",hu_sound) + self:PlaySound("ChaoShan_MJ",player.self_user.sex, hu_sound) + + local pNode = info._view + local url = "eff_list1" + local he_list = UIPackage.CreateObjectFromURL("ui://Extend_MJ_ChaoShan/" .. url) + he_list.touchable = false + pNode:AddChild(he_list) + he_list:Center() + + coroutine.start(function() + for i = 1 ,#win_list do + local tem = win_list[i] + if tem.type>0 and tem.type<32 then + local com_name = "he" .. tem.type + local item = he_list:GetChild("list"):AddItemFromPool("ui://Extend_MJ_ChaoShan/" .. com_name) + coroutine.wait(0.3) + end + + end + + coroutine.wait(2) + obj_win_card:Dispose() + he:Dispose() + he_list:Dispose() + self._popEvent = true + end) + + end) + + _gamectr:AddEventListener(TX_GameEvent.EventNiao, function(...) + local arg = {...} + self._popEvent = false + local list = arg[1] + local start_seat = arg[2] + -- ViewUtil.PlaySound("ChaoShan_MJ", "extend/majiang/chaoshan/sound/zhuaniao.mp3") + coroutine.start(self.RunNiao,self,list, start_seat) + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult1, function(...) + self._popEvent = false + self:__CloseTip() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = {...} + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local niao = result.niao + if liuju then + local le = UIPackage.CreateObjectFromURL("ui://Main_Majiang/LiuJu") + self._view:AddChild(le) + le:Center() + le:GetTransition("t0"):Play() + coroutine.start(function() + coroutine.wait(1) + le:Dispose() + end) + end + self:RemoveCursor() + if self._clearingView == nil then + self._clearingView = EXClearingView.new(self._root_view) + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + self._popEvent = true + end) + end + + if _room.curren_round ~= _room.room_config.round then + -- if #niao == 0 then self._view:GetChild("n13").visible = false end + self._clearingView:InitData(0, _room, result, nil, function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:ResetCardType() + if _room:checkHpNonnegative() then + p.cur_hp = data[i].hp_info.cur_hp + end + info:UpdateScore() + info._view:GetChild("zhanji").visible = true + local num = data[i].hp_info.total_hp + if num > 0 then + info._view:GetController("text_color").selectedIndex = 0 + info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + else + info._view:GetController("text_color").selectedIndex = 1 + info._view:GetChild("text_jifen").text = d2ad(num) + end + + info._view:GetChild("mask_piao").title = "" + info._view:GetController("piao_niao").selectedIndex = 0 + p.fz_list = {} + end + DataManager.CurrenRoom.self_player.card_list = {} + self._state.selectedIndex = 2 + self._clearingView = nil + end) + end + self._player_card_info[1]:ShowHuTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult2, function(...) + self:UnmarkSelfTuoguan() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = {...} + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + self._clearingView = EXClearingView.new() + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + end) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiaoTip, function() + self:UpdateRound() + self._tex_LeftCard.text = "0" + self._state.selectedIndex = 1 + self:__PiaoNiaoTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiao, function(...) + local arg = {...} + local seat = arg[1] + local num = arg[2] + if num > 0 then + local head_info = self._player_info[self:GetPos(seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. num + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + if seat == _room.self_player.seat then + if self._com_piao and _room.self_player.entrust then + self._com_piao:Dispose() + self._com_piao = nil + _room.curren_round = _room.curren_round - 1 + end + end + end) +end + +function M:OutCard(card) + if card ~= 0 then + printlog("当前出牌为===>>>"..card) + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card, function() + local info = self._player_card_info[1] + self:RemoveCursor() + info:UpdateHandCard() + + info:UpdateOutCardList(nil, card, self._cursor) + self:PlaySound("ChaoShan_MJ", self._room.self_player.self_user.sex,tostring(card)) + self:PlayMJSound("chupai.mp3") + -- self:ShowHuTip() + end) + else + printlog("鬼牌不能出===>>>"..card) + end +end + +function M:__FangziTip(tip, weight) + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject("Main_Majiang", "Gcm_action_tips") + _chipeng_tip:GetController("hide_bg").selectedIndex = 1 + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + -- self._player_card_info[self:GetPos(p.seat)] + + local _lit_fanzi = _chipeng_tip:GetChild("lit_fanzi") + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + + local tip_hu = false + local count = #_tlist + for k=1,#_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + local url = "ui://Main_Majiang/Btn_fztip" + local td_weight = td.weight + if td_weight == 16 then td_weight = 8 end + if td_weight == 8 then url = "ui://Main_Majiang/Btn_hu" end + local btn_t = _lit_fanzi:AddItemFromPool(url) + btn_t.icon = "ui://Main_Majiang/fztip_"..td_weight + btn_t.data = { tip, td } + btn_t.onClick:Add(self.__TipAction,self) + end + + -- if not (tonumber(weight) >= 16) then + local _btn_pass = _lit_fanzi:AddItemFromPool("ui://Main_Majiang/Btn_pass") + -- local _btn_pass = _chipeng_tip:GetChild("btn_pass") + _btn_pass.onClick:Set(function() + if tonumber(weight) >= 8 then + local guo_msg = MsgWindow.new(self._root_view, "确定要点过吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end) + guo_msg:Show() + else + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end) + -- end + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() +end + +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local list = tip.tip_map_type[td.weight] + if (#list > 1) then + self:_ChiView(list, function(id) + _gamectr:SendAction(id) + self:__CloseTip() + end) + self._chipeng_tip.visible = false + return + end + + _gamectr:SendAction(td.id) + if (self._chipeng_tip == nil) then return end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil +end + +function M:_ChiView(tiplist, callback) + self._chipeng_tip.visible = false + local _pop_tip_choice = UIPackage.CreateObject("Main_Majiang", "Pop_tip_choice") + local list_choose = _pop_tip_choice:GetChild("Lst_choose") + local crossCtr = _pop_tip_choice:GetController("state") + crossCtr.selectedIndex = #tiplist == 3 and 0 or 1 + _pop_tip_choice:GetChild("Btn_cross").onClick:Add(function() + _pop_tip_choice:Dispose() + self._chipeng_tip.visible = true + end) + list_choose:RemoveChildrenToPool() + for i = 1, #tiplist do + local item_choose = list_choose:AddItemFromPool() + item_choose:GetController("type").selectedIndex = 0 + for j = 1, 4 do + item_choose:GetChild("card"..j).icon = UIPackage.GetItemURL("Main_Majiang", "202_"..tiplist[i].card) + end + item_choose.onClick:Add(function() + callback(tiplist[i].id) + end) + end + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width)/2, (self._view.height - _pop_tip_choice.height)/2) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:OnFangziAction(...) + self:__CloseTip() + local arg = {...} + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local index = arg[3] + + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject("Extend_MJ_ChaoShan", "FzEffect") + if fz.type == FZType.Peng then + self:PlaySound("ChaoShan_MJ", player.self_user.sex,"peng"..math.random(1, 3)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "碰框") + else + + self:PlaySound("ChaoShan_MJ", player.self_user.sex,"gang"..math.random(1, 2)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "杠框") + end + effect.touchable = false + effect:GetTransition("t2"):Play() + pNode:AddChild(effect) + coroutine.start(function() + coroutine.wait(2) + effect:Dispose() + end) + + self:RemoveCursor() + if (player.seat ~= fz.from_seat) then + local fs_info = _player_card_info[self:GetPos(fz.from_seat)] + fs_info:UpdateOutCardList() + end + info:UpdateFzList(fz, index, true) + local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi + info:UpdateHandCard(getcard) + self:__CloseTip() +end + +function M:RunNiao(list, start_seat) + local _room = self._room + --local _niao_View = self._niao_View + self._niao_View = UIPackage.CreateObject("Extend_MJ_ChaoShan","Panel_Birds") + self._view:AddChild(self._niao_View) + self._niao_View:Center() + local _niao_View = self._niao_View + local list_niao_card = self._niao_View:GetChild("Lst_birds") + list_niao_card:RemoveChildrenToPool() + for i = 1, #list do + --添加背面的麻將 + local item = list_niao_card:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "202_00") + item:GetChild("tex_score").text = "+" .. list[i].score + end + for i = 1, #list do + --顯示正面 + local item = list_niao_card:GetChildAt(i - 1) + local card = list[i].card + coroutine.wait(0.3) + item:GetTransition("appear"):Play() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_"..card) + if list[i].score > 0 then item:GetController("bg").selectedIndex = 1 end + end + coroutine.start(function() + coroutine.wait(2) + _niao_View:Dispose() + self._popEvent = true + end) +end + +-- function M:markOutCards(showTip, data) +-- for i = 1, #self._room.player_list do +-- local p = self._room.player_list[i] +-- local info = self._player_card_info[self:GetPos(p.seat)] +-- for j = 1, #p.outcard_list do +-- local card = p.outcard_list[j] +-- if card == data then +-- local obj = info:GetOutCardByIndex(j) +-- obj:GetController("gray").selectedIndex = showTip and 1 or 0 +-- end +-- end +-- end +-- end + +function M:__PiaoNiaoTip() + local obj_piao = UIPackage.CreateObject("Main_Majiang", "panel_piao_niao") + self._view:AddChild(obj_piao) + obj_piao.x = (self._view.width - obj_piao.width) * 0.5 + obj_piao.y = self._view.height * 0.6 + for i = 1, 4 do + obj_piao:GetChild("btn_" .. i).onClick:Add(function() + self._gamectr:SendAction(i - 1) + obj_piao:Dispose() + end) + end + self._com_piao = obj_piao +end + +function M:ReloadRoom(bskip) + local room = self._room + -- if not room.playing then + -- self._state.selectedIndex = 2 + -- else + -- self._state.selectedIndex = 1 + -- self._room._reload_flag = true + -- end + + if bskip == nil or bskip == false then + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + self._room._reload_flag = true + end + end + + for i = 1, #room.player_list do + local p = room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + for i = 1, #p.fz_list do + info:UpdateFzList(p.fz_list[i], -1) + end + info:UpdateHandCard() + local head_info = self._player_info[self:GetPos(p.seat)] + head_info:UpdateScore() + head_info._view:GetChild('zhanji').visible = true + local num = p.total_hp or 0 + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(num) + end + + if p.seat == room.last_outcard_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil,card, self._cursor) + elseif p.seat == room.curren_outcard_seat then + info:UpdateHandCard(true) + info:UpdateOutCardList() + else + info:UpdateOutCardList() + end + if p.seat == room.banker_seat then + head_info:MarkBank(true) + end + -- if p.ready then + -- self._player_info[self:GetPos(p.seat)]:Ready(true) + -- end + if bskip == nil or bskip == false then + if p.ready and room.playing == false then + self._player_info[self:GetPos(p.seat)]:Ready(true) + end + end + if p.piao_niao~=nil and p.piao_niao > 0 then + local head_info = self._player_info[self:GetPos(p.seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + end + -- self:ShowHuTip() + + if bskip == nil or bskip == false then + self:UpdateCardBox(self:GetPos(room.curren_outcard_seat)) + self._tex_LeftCard.text = room.left_count + self:UpdateRound() + end +end + +function M:PlayerChangeLineState() + -- local isOutCard = true + -- local str = "玩家 " + -- for _ , player in ipairs(self._room.player_list) do + -- if player.line_state == 0 then + -- isOutCard = false + -- end + -- end + -- self._player_card_info[1]._area_handcard_list.touchable = isOutCard +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:__CloseTip() + if self._chipeng_tip then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if self._pop_tip_choice then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +function M:closeTipOnTuoguan() + self:__CloseTip() +end + +function M:Destroy() + MJMainView.Destroy(self) + UIPackage.RemovePackage("extend/majiang/chaoshan/ui/Extend_MJ_ChaoShan") +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaoshan/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/chaoshan/EXPlayBackView.lua new file mode 100644 index 00000000..74ffb7e7 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaoshan/EXPlayBackView.lua @@ -0,0 +1,298 @@ +local MJPlayBackView = require("main.majiang.MJPlayBackView") +local EXRoomConfig = import(".EXRoomConfig") +local EXClearingView = import(".EXClearingView") + +local Record_Event = import(".RecordEvent") + + +local M = {} + +--- Create a new +function M.new() + setmetatable(M,{__index = MJPlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = "PlayBackView" + self:init() + + return self +end + + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/majiang/chaoshan/ui/Extend_MJ_ChaoShan") + MJPlayBackView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num) + local _cardbox = self._view:GetChild("cardbox") + --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false + self._ctr_cardbox = _cardbox:GetController("c1") + self._tex_round = self._view:GetChild("tex_round") + self._tex_LeftCard = self._view:GetChild("remaining_card") + self._anchor = self._view:GetChild("mask_tips") + self._eventmap = {} + + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao + self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao + self._cmdmap[Record_Event.Evt_Result] = self.CmdResult +end + +function M:FillRoomData(data) + MJPlayBackView.FillRoomData(self) + if self._win_pic then self._win_pic:Dispose() end + if self._niao then self._niao:Dispose() end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local left_count = data.info.left_card + self:UpdateLeftCard(left_count) + local round = data.info.round + self:UpdateRound(round) + + local roominfo_panel = self._view:GetChild("roominfo_panel1") + roominfo_panel:GetChild("tex_roomid").text = room.room_id + roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + table.sort(p.card_list, ViewUtil.HandCardSort) + card_info:UpdateHandCard(false, true) + self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0 + end + + self:GenerateAllStepData(data) + self:UpdateStep(1) + -- self:ShowStep(0) +end + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateLeftCard(step.left_card) + -- self._ctr_cardbox.selectedIndex = step.current_out_seat + self:UpdateCardBox(self:GetPos(step.current_out_seat)) + self:UpdateStep(index + 1) + if step.cmd ~= Record_Event.Evt_OutCard then + self:RemoveCursor() + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hand_left_count = #p.card_list + info:Clear() + info:ResetFzList() + p.piao_niao = step.player_card_data[i].piao_niao + local head_info = self._player_info[self:GetPos(i)] + if p.piao_niao and p.piao_niao > 0 then + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + else + head_info._view:GetController("piao_niao").selectedIndex = 0 + end + if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil, nil, self._cursor) + else + info:UpdateOutCardList() + end + if step.cmd == Record_Event.Evt_GetCard and p.seat == step.current_out_seat then + info:UpdateHandCard(true, true) + else + info:UpdateHandCard(false, true) + end + end + if step.cmd == Record_Event.Evt_Win then + self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡") + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + else + if self._win_pic then + self._win_pic:Dispose() + end + end + if step.cmd == Record_Event.Evt_Niao then + local niao_list = step.niao + self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_ChaoShan/Panel_Birds") + local list = self._niao:GetChild("Lst_birds") + list:RemoveChildrenToPool() + for i = 1, #niao_list do + local item = list:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_"..niao_list[i].card) + if niao_list[i].score > 0 then + item:GetController("bg").selectedIndex = 2 + end + end + self._view:AddChild(self._niao) + self._view:AddChild(self._view:GetChild("panel_record")) + self._niao:Center() + else + if self._niao then + self._niao:Dispose() + end + end + if step.cmd == Record_Event.Evt_Result then + if not self.result then + self.result = EXClearingView.new(self._root_view, true) + self.result:InitData(0, self._room, step.result_data) + self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5 + self.result._view.width = GRoot.inst.width + self.result._view.height = GRoot.inst.height + self.result._view:GetChild("btn_confirm").visible = false + self._anchor:AddChild(self.result._view) + self.result._view.x = self._anchor.x * -1 + self.result._view.y = self._anchor.y * -1 + else + self.result._view.visible = true + end + -- self.result._view:Center() + else + if self.result then + self.result._view.visible = false + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = "" + step.left_card = info.left_card + step.last_out_seat = 0 + step.current_out_seat = 1 + step.win = 0 + step.niao = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.piao_niao = p.piao_niao + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + table.sort(u.card_list, ViewUtil.HandCardSort) + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = 0 + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + for i = 1, #cmd.data.opcard do + list_remove(u.card_list, cmd.data.opcard[i]) + end + local fz = {} + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.opcard = cmd.data.opcard + local uf = data.player_card_data[cmd.data.from_seat] + if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then + table.remove(uf.outcard_list, #uf.outcard_list) + end + if fz.type ~= FZType.Gang_Peng then + u.fz_list[#u.fz_list + 1] = fz + else + for i = 1, #u.fz_list do + if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then + u.fz_list[i].type = FZType.Gang_Peng + end + end + end +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:CmdNiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.niao = cmd.data.niao +end + +function M:CmdPiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.player_card_data[cmd.seat].piao_niao = cmd.data.num +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result_data = cmd.data +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_deep_clone(last_step) + self._step[#self._step + 1] = step + step.result_data = nil + return step +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = "剩余 "..num.." 张牌" +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:UpdateRound(round) + self._tex_round.text = "第 "..round.."/"..self._room.room_config.round.." 局" +end + +function M:UpdateStep(step) + self._record:GetChild("tex_step").text = "第 " .. step .. " / " .. #self._step .. "步" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaoshan/EXPlayer.lua b/lua_probject/extend_project/extend/majiang/chaoshan/EXPlayer.lua new file mode 100644 index 00000000..fd26822b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaoshan/EXPlayer.lua @@ -0,0 +1,36 @@ + + +local EXPlayer = { + auto, + -- 手牌列表 + hand_cards = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaoshan/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/majiang/chaoshan/EXPlayerInfoView.lua new file mode 100644 index 00000000..f8a5fd69 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaoshan/EXPlayerInfoView.lua @@ -0,0 +1,76 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + +function M:init() + PlayerInfoView.init(self) + self._tex_score = self._view:GetChild("info"):GetChild("tex_score1") + self._tex_score2 = self._view:GetChild("info"):GetChild("tex_score2") + self._ct_score = self._view:GetChild("info"):GetController("score") +end + +function M:ShowInteraction(type,str) + if type == 3 then + Voice.DownLoad(str, function(clip) + if (clip ) then + self:ShowMaskVoice(clip.length) + GameApplication.Instance:PlayVoice(clip) + end + end) + elseif type == 4 then + self:SetChat(str) + elseif type == 2 then + local chat_index = tonumber(str) + self._main_view:PlayChatSound(self._player.self_user.sex,chat_index) + local language, index = self._main_view:GetChatMsgLanguage(chat_index) + self:SetChat(self._main_view.Fix_Msg_Chat[index]) + elseif type == 1 then + self:SetBiaoqing("ui://Chat/"..str) + end +end + +function M:UpdateRemainCard(card_num, hide) + if hide then + self._view:GetController("show_remain").selectedIndex = 0 + else + self._view:GetController("show_remain").selectedIndex = 1 + end + self._view:GetChild("com_remain"):GetChild("tex_remain").text = card_num +end + +function M:FillData(player) + PlayerInfoView.FillData(self, player) + self:UpdateScore(player.total_score) +end + +function M:UpdateScore() + local score = self._player.total_score + local room = DataManager.CurrenRoom + if room:checkHpNonnegative() then + score = d2ad(self._player.cur_hp) + end + if not score then + score = 0 + end + if score < 0 then + self._ct_score.selectedIndex = 1 + self._tex_score2.text = score + else + self._ct_score.selectedIndex = 0 + if not room:checkHpNonnegative() then + score = "+" .. score + end + self._tex_score.text = score + end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/chaoshan/EXRoomConfig.lua b/lua_probject/extend_project/extend/majiang/chaoshan/EXRoomConfig.lua new file mode 100644 index 00000000..e5df8ca5 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaoshan/EXRoomConfig.lua @@ -0,0 +1,790 @@ + + + +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.class = "RoomConfig" + self.config=config + self.round = config["times"] + self.Qidui = config["qidui"] + self.QiangGang = config["qiangkong"] + self.QiangGangNiao = config["qiangkong_niao"] + self.Zhama = config["niao_opt"] + local isOpenLaizi8=false + --if config["laizi"]==3 then + -- isOpenLaizi8=true + --end + self.Laizi = isOpenLaizi8 --是否是8个赖子 + self.LaiziType=config["laizi"] + self.NiaoType = config["niao"] + --self.Zhamatype= config["niao_opt"] + self.piao_niao = config["piao_niao"] + self.Jiangma = config["jiangma"] + self.isHidden = config.isHidden + + self.Qanggangquanbao=config["qianggang_type"] + self.Gangbaoquanbao=config["gangbao_type"] + self.Minggangkeqiang=config["qiangkong_ming"] + self.geng_zhuan=config["geng_zhuan"] + self.jiejiegao=config["jiejiegao"] + self.jiejiegao_first=config["jiejiegao_first"] + self.wuguijiabei=config["wuguijiabei"] + self.no_wan=config["no_wan"] + self.ma_gen_di_fen=config["ma_gen_di_fen"] + self.ma_gen_gong=config["ma_gen_gong"] + self.qidui_jiafan=config["qidui_jiafan"] + + + + return self +end + +function M:GetDes(sp) + sp = sp or " " + local count=0 + local str = self.round and self.round .. "局" .. " " or "" + str = str .. RoomConfig.GetDes(self, sp).."\n" + + + if (self.QiangGang) then + str = str .. "抢杠胡二倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if (self.Qidui) then + str = str .."七小对" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["dianpao"] then + str = str .."可抢炮胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["pengpenghu"] then + str = str .."碰碰胡二倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["hunyise"] then + str = str .."混一色二倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["qingyise"] then + str = str .."清一色二倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["gangshangkaihua"] then + str = str .."杠上开花二倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["haohua_qidui"] then + str = str .."豪华四倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["shishanyao"] then + str = str .."十三幺10倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["tiandihu"] then + str = str .."天地胡10倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["haohua2_qidui"] then + str = str .."双豪华六倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["haohua3_qidui"] then + str = str .."三豪华八倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["shibaluohan"] then + str = str .."十八罗汉10倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["xiaoshanyuan"] then + str = str .."小三元四倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["xiaosixi"] then + str = str .."小四喜四倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["dashanyuan"] then + str = str .."大三元六倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["dasixi"] then + str = str .."大四喜六倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["bihu"] then + str = str .."逼胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["guopeng"] then + str = str .."过碰不碰" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["guogang"] then + str = str .."过杠不杠" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["zi_dong_hu"] then + str = str .."自动胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + + + if (self.LaiziType==3) then + str = str .. "翻双鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.LaiziType==1 then + str = str .. "白板做鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.LaiziType==2 then + str = str .. "翻鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str .. "无鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.NiaoType==0 then + str = str .. "无马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.NiaoType==1 then + if self.Zhama==1 then + str = str .. "买二马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.Zhama==2 then + str = str .. "买四马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.Zhama==3 then + str = str .. "买六马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.Zhama==4 then + str = str .. "抓马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + elseif self.NiaoType==2 then + local strMB="爆炸马加分" + if self.Zhama==1 then + strMB="爆炸马加倍" + end + str = str .. strMB + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.ma_gen_di_fen then + str = str .."马跟底分" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.ma_gen_gong then + str = str .."马跟杠" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + + --if (self.piao_niao) then + -- str = str .. "飘鸟" .. sp + --end + + --[[if (self.NiaoType) then + if self.NiaoType == 1 then + str = str .. string.format("扎%d码", self.Zhama * 2) + elseif self.NiaoType == 2 then + str = str .. "一码全中" + elseif self.NiaoType == 3 then + str = str .. "窝窝鸟" .. sp .. (self.Zhama == 1 and "1鸟2分" or "1鸟1分") + end + str = str .. sp + + -- if self.NiaoType ~= 2 and self.Jiangma > 0 then + -- str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp + -- end + if self.Jiangma > 0 then + str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp + end + end--]] + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + + +function M:GetDes2(sp) + sp = sp or " " + local str = RoomConfig.GetDes(self, sp) + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + + + if (self.QiangGang) then + str = str .. "抢杠胡2倍" + str = str .. sp + --if (self.QiangGangNiao) then + --str = str .. "抢杠胡奖码" + --str = str .. sp + --end + end + + if (self.Qidui) then + str = str .."七小对" + str = str .. sp + end + + if self.config["dianpao"] then + str = str .."可抢炮胡" + str = str .. sp + end + + if self.config["pengpenghu"] then + str = str .."碰碰胡2倍" + str = str .. sp + end + + if self.config["hunyise"] then + str = str .."混一色2倍" + str = str .. sp + end + + if self.config["qingyise"] then + str = str .."清一色2倍" + str = str .. sp + end + + if self.config["gangshangkaihua"] then + str = str .."杠上开花2倍" + str = str .. sp + end + + if self.config["haohua_qidui"] then + str = str .."豪华4倍" + str = str .. sp + end + + if self.config["shishanyao"] then + str = str .."十三幺10倍" + str = str .. sp + end + + if self.config["tiandihu"] then + str = str .."天地胡10倍" + str = str .. sp + end + + if self.config["haohua2_qidui"] then + str = str .."双豪华6倍" + str = str .. sp + end + + if self.config["haohua3_qidui"] then + str = str .."三豪华8倍" + str = str .. sp + end + + if self.config["shibaluohan"] then + str = str .."十八罗汉10倍" + str = str .. sp + end + + if self.config["xiaoshanyuan"] then + str = str .."小三元4倍" + str = str .. sp + end + + if self.config["xiaosixi"] then + str = str .."小四喜4倍" + str = str .. sp + end + + if self.config["dashanyuan"] then + str = str .."大三元6倍" + str = str .. sp + end + + + if self.config["dasixi"] then + str = str .."大四喜6倍" + str = str .. sp + end + + if self.config["bihu"] then + str = str .."逼胡" + str = str .. sp + end + + if self.config["guopeng"] then + str = str .."过碰不碰" + str = str .. sp + end + + if self.config["guogang"] then + str = str .."过杠不杠" + str = str .. sp + end + + + if self.config["zi_dong_hu"] then + str = str .."自动胡" + str = str .. sp + end + + + + + if (self.LaiziType==3) then + str = str .. "翻双鬼" + str = str .. sp + elseif self.LaiziType==1 then + str = str .. "白板做鬼" + str = str .. sp + elseif self.LaiziType==2 then + str = str .. "翻鬼" + str = str .. sp + else + str = str .. "无鬼" + str = str .. sp + end + + if self.NiaoType==0 then + str = str .. "无马" + str = str .. sp + elseif self.NiaoType==1 then + if self.Zhama==1 then + str = str .. "买2马" + str = str .. sp + elseif self.Zhama==2 then + str = str .. "买4马" + str = str .. sp + elseif self.Zhama==3 then + str = str .. "买6马" + str = str .. sp + elseif self.Zhama==4 then + str = str .. "抓马" + str = str .. sp + end + elseif self.NiaoType==2 then + local strMB="爆炸马加分" + if self.Zhama==1 then + strMB="爆炸马加倍" + end + str = str .. strMB + str = str .. sp + end + + if self.ma_gen_di_fen then + str = str .."马跟底分" + str = str .. sp + end + + if self.ma_gen_gong then + str = str .."马跟杠" + str = str .. sp + end + + + + --if (self.piao_niao) then + -- str = str .. "飘鸟" .. sp + --end + + --[[if (self.NiaoType) then + if self.NiaoType == 1 then + str = str .. string.format("扎%d码", self.Zhama * 2) + elseif self.NiaoType == 2 then + str = str .. "一码全中" + elseif self.NiaoType == 3 then + str = str .. "窝窝鸟" .. sp .. (self.Zhama == 1 and "1鸟2分" or "1鸟1分") + end + str = str .. sp + + -- if self.NiaoType ~= 2 and self.Jiangma > 0 then + -- str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp + -- end + if self.Jiangma > 0 then + str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp + end + end--]] + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_MJ_ChaoShan/gamerule") + return gamerulepanel +end + + +function M:GetGameSMSize() + return 467,500 +end + + +function M:GetGameName() + return "潮汕麻将" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaoshan/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/chaoshan/ExtendConfig.lua new file mode 100644 index 00000000..e9fb85f8 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaoshan/ExtendConfig.lua @@ -0,0 +1,189 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import(".EXGameInfo") +local EXMainView = import(".EXMainView") +local EXGameController = import(".EXGameController") +local EXRoomConfig = import(".EXRoomConfig") +local EXPlayBackView =import(".EXPlayBackView") +local MJRoom = require("main.majiang.MJRoom") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = "ExtendConfig" + self.extend_id = 22 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/majiang/chaoshan/ui/Info_MJ_ChaoShan") + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage("extend/majiang/chaoshan/ui/Extend_MJ_ChaoShan") + ResourcesManager.UnLoadGroup("ChaoShan_MJ") +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return MJRoom.new() +end + +function M:FillRoomConfig(room,_config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + + + local reload = s2croom["reload"] + local _tableInfo = s2croom["tableInfo"] + printlog("初始化房间数据====>>>") + pt(_tableInfo) + printlog(_tableInfo.laiziCard) + printlog(_tableInfo.laiziCard2) + printlog(_tableInfo.laiziCardBefore) + printlog(_tableInfo.laiziCard2Before) + + room.laiziInfo={} + if _tableInfo.laiziCardBefore>0 then + table.insert(room.laiziInfo,_tableInfo.laiziCard) + if _tableInfo.laiziCard2>0 then + table.insert(room.laiziInfo,_tableInfo.laiziCard2) + end + room.beforelaiziCardId=_tableInfo.laiziCardBefore + else + room.laiziInfo=nil + end + + local _config = _tableInfo["config"] + pt(_config) + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo["playerData"] + room.curren_round = _tableInfo["round"] + self:FillPlayerData(playerList) + + if (reload) then + local _reloadInfo = s2croom["reloadInfo"] + local _hand_card = _reloadInfo["hand_card"] + room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + + local active_seat = _reloadInfo["active_seat"] + local bank_seat = _reloadInfo["banker_seat"] + local playing = _reloadInfo["playing"] + local _info_list = _reloadInfo["info_list"] + local last_outcard_seat = _reloadInfo["last_outcard_seat"] + room.left_count = _reloadInfo["left_card"] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo["curren_outcard_seat"] + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i=1,#_info_list do + local tem = _info_list[i] + local playerid = tem["playerid"] + local p = room:GetPlayerById(playerid) + local outcard_list = tem["outcard_list"] + p.outcard_list = outcard_list + p.total_score = tem["score"] + p.hand_left_count = tem["card_count"] + p.piao_niao = tem["piao_niao"] or 0 + local opcard = tem["opcard"] + for k=1,#opcard do + local op = opcard[k] + local fz = {} + fz.type = op["type"] + fz.card = op["card"] + p.fz_list[#p.fz_list+1] = fz + end + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.left_count = _tableInfo["left_card"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + + local _info_list = _tableInfo["playerData"] + for i = 1,#_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + p.piao_niao = _jp["piao_niao"] + -- print(DataManager.SelfUser.account_id,pid) + -- if (278 == pid) then + -- room.self_player = p + -- p.self_user = DataManager.SelfUser + -- else + if p.seat == 1 then room.self_player = p end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.card_list = _hand_card + --room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + p.total_score = _jp["score"] + p.hand_left_count = #_hand_card + if _jp.hp_info then + room.room_config.isNonnegative = 1 + p.cur_hp = _jp.hp_info.cur_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaoshan/GameEvent.lua b/lua_probject/extend_project/extend/majiang/chaoshan/GameEvent.lua new file mode 100644 index 00000000..ee0f2d34 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaoshan/GameEvent.lua @@ -0,0 +1,34 @@ + +local TX_GameEvent = { + -- 发牌 + SendCards = "SendCards", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + EventNiao = "EventNiao", + + EvnetPiaoTip = "EvnetPiaoTip", + + EvnetPiao = "EvnetPiao", + + + --- + SendLaiZi="SendLaiZi" +} +return TX_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaoshan/MJPlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/majiang/chaoshan/MJPlayerSelfCardInfoView.lua new file mode 100644 index 00000000..51ef5dd2 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaoshan/MJPlayerSelfCardInfoView.lua @@ -0,0 +1,212 @@ +local MJPlayerSelfCardInfoView = require("main.majiang.MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local CardCheck = import(".CardCheck") + +local M = {} +-- +function M.new(view,mainView) + setmetatable(MJPlayerSelfCardInfoView, {__index = MJPlayerCardInfoView}) + setmetatable(M, {__index = MJPlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:ShowHuTip(card_list) + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + for i=1,#DataManager.CurrenRoom.laiziInfo do + if IsHasDictionary(DataManager.CurrenRoom.laiziInfo[i],tingList)==false then + table.insert(tingList,DataManager.CurrenRoom.laiziInfo[i] ) + end + end + end + + end + self._mainView._hu_tip:FillData(tingList) +end + +function M:UpdateHandCard(getcard, mp) + MJPlayerSelfCardInfoView.UpdateHandCard(self, getcard, mp) + local _carViewList = self._carViewList + + if DataManager.CurrenRoom.laiziInfo and #self._carViewList>0 then + for i=1,#self._carViewList do + local obj=self._carViewList[i] + if obj and obj.card then + if IsHasDictionary(obj.card_item,DataManager.CurrenRoom.laiziInfo) then + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=1 + end + + end + else + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=0 + end + end + end + + end + end + + + end + + + local card_list = DataManager.CurrenRoom.self_player.card_list + self:ShowHuTip(card_list) + if getcard then + self._out_card = true + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + -- 记录需要标记听牌提示的牌 + local lst_mark = {} + local total_num = 0 + for i = 1, #_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + list_remove(card_list, card) + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + local count = 0 + for j = 1, #tingList do + count = count + self._mainView:CountCardLeftNum(tingList[j]) + end + local tem = {} + tem.item = btn + tem.count = count + total_num = total_num + count + table.insert(lst_mark, tem) + end + table.insert(card_list, card) + end + table.sort(lst_mark, function(a, b) + return a.count > b.count + end) + -- 如果几张牌的可胡牌数一致,也只显示'三角',可胡牌数不一致才显示'多' + local all_same = #lst_mark ~= 0 and lst_mark[1].count == total_num / #lst_mark or false + for i = 1, #lst_mark do + local tem = lst_mark[i] + if all_same or tem.count < lst_mark[1].count then + tem.item:GetController("mark_ting").selectedIndex = 1 + else + tem.item:GetController("mark_ting").selectedIndex = 2 + end + end + else + for i = 1, #_carViewList do + local btn = _carViewList[i].card + if btn:GetController("mark_ting").selectedIndex ~= 0 then + btn:GetController("mark_ting").selectedIndex = 0 + end + end + self._out_card = false + end + +end + +function M:__OnClickHandCard(context) + local button = context.sender + local _carViewList = self._carViewList + local refresh = true + local card_list = {} + for i=1,#_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + if btn ~= button and btn.selected == true then + if button.data.card_item == card then + refresh = false + else + self._mainView:markOutCards(false, card) + end + btn.selected = false + end + if not btn.selected then + table.insert(card_list, card) + end + end + + if self._out_card then + self:ShowHuTip(card_list) + end + + -- 标记出牌 + if refresh then + if button.selected then + self._mainView:markOutCards(true, button.data.card_item) + else + self._mainView:markOutCards(false, button.data.card_item) + end + end + + local _room = DataManager.CurrenRoom + if not button.selected and _room.curren_outcard_seat == _room.self_player.seat then + local card = button.data + self._mainView:OutCard(card.card_item) + end +end + +function M:__OnDragStart(card) + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + list_remove(card_list, card) + self:ShowHuTip(card_list) +end + +function M:__OnDragEnd(context) + if self.outcard_button then + self.outcard_button:Dispose() + self.outcard_button = nil + end + local button = context.sender + + --button:RemoveFromParent() + local card = button.data + local _room = DataManager.CurrenRoom + + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + if (button.y - card.old_postion.y < -50 and _room.curren_outcard_seat == _room.self_player.seat and card.card_item ~= 0) then + self._mainView:OutCard(card.card_item) + button.touchable = false + self.outcard_button = button + else + self._area_handcard_list:AddChildAt(button, card.index) + button:TweenMove(card.old_postion, 0.2) + end +end + +function M:CheckPlayerOnlineState() + local room = DataManager.CurrenRoom + for i = 1, #room.player_list do + if room.player_list[i].line_state == 0 then + return false + end + end + return true +end +function M:Clear(bskip) + --self._ctr_state.selectedIndex = 0 + self._area_fz_list.x = self._src_fz_list.x + self._area_fz_list.y = self._src_fz_list.y + self._area_fz_list.width = self._src_fz_list.z + self._area_fz_list.height = self._src_fz_list.w + + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_outcard_list:RemoveChildren(0, -1, true) + if bskip == nil or bskip == false then + self._mask_liangpai:RemoveChildren(0, -1, true) + end + + for i=1,#self._carViewList do + self._carViewList[i].card:Dispose() + end + self._carViewList = {} + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaoshan/Protocol.lua b/lua_probject/extend_project/extend/majiang/chaoshan/Protocol.lua new file mode 100644 index 00000000..4c9b875b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaoshan/Protocol.lua @@ -0,0 +1,48 @@ +local Protocol = { + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌 + GAME_DIS_CARD = "611", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- 提示选择行为 + GAME_ACTION = "612", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 小结算 + GAME_EVT_RESULT1 = "817", + + -- 大结算 + GAME_EVT_RESULT2 = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + + -- 抓鸟事件 + GAME_EVT_NIAO = "821", + + -- 飘鸟提示 + GAME_EVT_PIAOTIP = "833", + + -- 飘鸟事件 + GAME_EVT_PIAO = "834", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaoshan/RecordEvent.lua b/lua_probject/extend_project/extend/majiang/chaoshan/RecordEvent.lua new file mode 100644 index 00000000..09748550 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaoshan/RecordEvent.lua @@ -0,0 +1,11 @@ +local Record_Event = { + Evt_GetCard = "GetCard", + Evt_OutCard = "OutCard", + Evt_Action = "Action", + Evt_Win = "Win", + Evt_Niao = "Niao", + Evt_Piao = "PiaoNiao", + Evt_Result = "Result", +} + +return Record_Event \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhou/CS_Win_Type.lua b/lua_probject/extend_project/extend/majiang/chaozhou/CS_Win_Type.lua new file mode 100644 index 00000000..39ea8560 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhou/CS_Win_Type.lua @@ -0,0 +1,37 @@ +local CS_Win_Type = { + "鸡胡", + "平胡", + "七小对", + "豪华七小对", + "双豪华七小对", + "三豪华七小对", + "清一色", + "碰碰胡", + "杠上开花", + "杠上炮", + "抢杠胡", + "混一色", + "十三幺", + "天胡", + "地胡", + "人胡", + "十八罗汉", + "小三元", + "大三元", + "小四喜", + "大四喜", + "幺九", + "四鬼胡牌", + "全风", + "全求人", + "清幺九", + "字一色", + "无鬼翻倍", + "流局翻倍", + "海底捞月", + "门清", + "大胡", + +} +return CS_Win_Type + diff --git a/lua_probject/extend_project/extend/majiang/chaozhou/CardCheck.lua b/lua_probject/extend_project/extend/majiang/chaozhou/CardCheck.lua new file mode 100644 index 00000000..71dd7f8e --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhou/CardCheck.lua @@ -0,0 +1,378 @@ +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + num = num == nil and 1 or num + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if(result ==num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local zhongid = 0 + + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + zhong_count = 0, + qidui = false, + hongzhong_count = 0, + qidui_pari_count = 0 +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + if (card == zhongid) then + self.zhong_count = self.zhong_count +1 + else + self.cardList[#self.cardList + 1] = card + end + end + table.sort(self.cardList) +end + +function M:tryShunzi(card) + if (card < 400 and card % 100 > 7) then + return false + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryKezi(card) + if (checkCardAndRomve(card, self.cardList, 3)) then + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (checkCardAndRomve(card, self.cardList, 2)) then + local cardGroup = {card,card} + self:push(cardGroup) + self.pair_count = 1 + return true + end + return false +end + + +function M:tryKezi1Zhong(card) + if (self.zhong_count >= 1 and checkCardAndRomve(card, self.cardList,2)) then + local cardGroup = {card,card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + return true + end + return false +end + +function M:tryKezi2Zhong(card) + if (self.zhong_count >= 2 and checkCardAndRomve(card, self.cardList,1)) then + local cardGroup = {card,zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + return true + end + return false +end + +function M:tryShunzi1Zhong(card) + if (card % 100 > 8) then + return false + end + + if (self.zhong_count < 1) then + return false + end + + if (checkCard(card + 1, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,card+1,zhongid} + self:push(cardGroup) + return true + end + + if (checkCard(card + 2, self.cardList) and ((card + 1) % 100 ~= 0)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 2, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,zhongid,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair1Zhong(card) + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 1) then + return false + end + removeCard(self.cardList, card, 1) + local cardGroup = {card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + self.pair_count = 1 + return true +end + +function M:tryPair2Zhong() + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 2) then + return false + end + local cardGroup = {zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + self.pair_count = 1 + return true +end + +function M:tryWin() + if (self.zhong_count == 4 and not self.eight_laizi) or (self.zhong_count == 8 and self.eight_laizi) then + return true + end + if (#self.cardList == 0 and self.pair_count == 1) then + return true + end + if (#self.cardList == 0 and self.pair_count == 0) then + return self:tryPair2Zhong() + end + + if (#self.cardList == 0) then + return false + end + + local activeCard = self.cardList[1] + if (self:tryPair(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + + if (self:tryKezi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi2Zhong(activeCard)) then + + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryPair1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + return false +end + +function M:checkQidui() + if (not self.qidui) then + return false + end + if ((#self.cardList + self.zhong_count) ~= 14) then + return false + end + local cardList = membe_clone(self.cardList) + self.qidui_pari_count = 0 + self.hongzhong_count = self.zhong_count + return self:isQdPari(cardList) +end + +function M:isQdPari(cardList) + if(self.qidui_pari_count == 7) then + return true + end + if (#cardList== 0) then + return true + end + local card = cardList[1] + if (cardNum(card, cardList) >= 2) then + removeCard(cardList, card, 2) + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + + if (self.hongzhong_count > 0) then + removeCard(cardList, card, 1) + self.hongzhong_count = self.hongzhong_count - 1 + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + return false +end + +local function init(self,cardInhand,addCard,isZhong,qidui,eightLaizi) + self.stack = {} + self.pair_count = 0 + self.cardList = membe_clone(cardInhand) + self.qidui = qidui + self.eight_laizi = eightLaizi + self.cardList[#self.cardList+1] = addCard + if (isZhong) then + self.zhong_count = cardNum(zhongid, self.cardList) + removeCard(self.cardList, zhongid, self.zhong_count) + end + table.sort(self.cardList) + --printlog("添加排序====>>>") + --pt(self.cardList) + return self:checkQidui() or self:tryWin() +end + +local specialCardList={400,403,406,409,412,415,418} +function M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + --printlog("isZhong",isZhong) + --printlog("qidui",qidui) + --printlog("eightLaizi",eightLaizi) + --pt(cardInhand) + local self = setmetatable({}, {__index = M}) + local tingList = {} + if not cardInhand or #cardInhand == 0 then + return tingList + end + for k=100,300,100 do + for i=1,9 do + local tem = k + i + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + --printlog("返回结果为===>>>",result) + if(result) then + tingList[#tingList + 1] = tem + end + end + end + + for j=1,#specialCardList do + local tem = specialCardList[j] + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + if(result) then + tingList[#tingList + 1] = tem + end + end + + return tingList +end + +function M.MuiltiplteCaculateTingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + zhongid=DataManager.CurrenRoom.laiziInfo[1] + local tempTingList2={} + local tempTingList1=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo[2] then + zhongid=DataManager.CurrenRoom.laiziInfo[2] + tempTingList2=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + zhongid=DataManager.CurrenRoom.laiziInfo[1] + end + local currentTingList={} + if #tempTingList1>0 and #tempTingList2>0 then + currentTingList=CombineDictionaryAndRemoveSomeItem(tempTingList1,tempTingList2) + elseif #tempTingList1>0 then + currentTingList=tempTingList1 + elseif #tempTingList2>0 then + currentTingList=tempTingList2 + end + + return currentTingList + + else + zhongid=0 + return M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + end + +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhou/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/chaozhou/EXClearingView.lua new file mode 100644 index 00000000..293a7f0e --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhou/EXClearingView.lua @@ -0,0 +1,709 @@ +require("Game.View.ResultView") +local Hu_Type_Name = import(".CS_Win_Type") +local EXClearingView = {} + +local M = EXClearingView + +function EXClearingView.new(blur_view) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self._full = true + ResultView.init(self, "ui://Main_Majiang/clearing") + + self._currenIndex = 0 + self._blur_view = blur_view + self._close_zone = false + self:InitMaiFaMa() + + return self +end + + +function M:InitMaiFaMa() + self.maiFaMaList={} + for i=1,8 do + local tempMP=self._view:GetChild("maima"..i) + table.insert(self.maiFaMaList,tempMP) + end + + +end + + +function M:HideAllMaiFaMa() + for i=1,#self.maiFaMaList do + self:IsMapaiShow(self.maiFaMaList[i],false) + self:SetMaPaiColor(self.maiFaMaList[i],0) + end +end + + + +function M:ShowSelectMaiFaMa(niaoList) + if niaoList and #niaoList>0 then + self:HideAllMaiFaMa() + for i=1,#niaoList do + self:IsMapaiShow(self.maiFaMaList[i],true) + --printlog(niaoList[i].card) + self:SetMaPaiValue(self.maiFaMaList[i],niaoList[i].card) + if niaoList[i].score>0 then + self:SetMaPaiColor(self.maiFaMaList[i],2) + end + end + end +end + + +function M:CalculatePaixingInfo(result) + self.WinList={} + if result.info_list and #result.info_list>0 then + for i=1,#result.info_list do + if result.info_list[i].win_list and #result.info_list[i].win_list>0 then + table.insert(self.WinList,result.info_list[i].win_list) + end + end + end + + printlog("牌型列表====>>>") + pt(self.WinList) +end + + +function M:SetPaixingxiangqing(num) + for i=1,#self.PaiXingXiangQingCtrList do + if self.PaiXingXiangQingCtrList[i] then + self.PaiXingXiangQingCtrList[i].selectedIndex=num + end + end +end + + + +function M:InitData(over, room, result, total_result, callback) + self._callback = callback + local _overCtr = self._view:GetController("over") + local btn_confirm = self._view:GetChild("btn_confirm") + local btn_result = self._view:GetChild("btn_showResult") + local btn_close = self._view:GetChild("big_result"):GetChild("btn_close") + local _btnCtr = self._view:GetController("button") + local _sdkCtr = self._view:GetController("sdk") + local ctr_type = self._view:GetController("type") + self._view:GetChild("tex_roominfo").text = string.format("房号%s 局%s/%s %s", room.room_id, room.curren_round, room.room_config.round, os.date("%Y-%m-%d %H:%M:%S", os.time())) + self._view:GetChild("tex_gameinfo").text = string.gsub(room.room_config:GetDes2(), "\r", "") + + if result then + -- self:ShowSelectMaPai(result.niao) + --printlog("显示奖马===>>>") + --pt(result.niao) + self:ShowSelectMaiFaMa(result.niao) + self:CalculatePaixingInfo(result) + end + + + self.PaiXingXiangQingCtrList={} + + self._view:GetController("paixing").selectedIndex=1 + local paixingxiangqing=self._view:GetChild("btn_detal") + local fanhuipaixing=self._view:GetChild("btn_fanhuipaixing") + fanhuipaixing.visible=false + paixingxiangqing.visible=true + paixingxiangqing.onClick:Add(function() + paixingxiangqing.visible=false + fanhuipaixing.visible=true + self:SetPaixingxiangqing(1) + end) + fanhuipaixing.onClick:Add(function() + paixingxiangqing.visible=true + fanhuipaixing.visible=false + self:SetPaixingxiangqing(0) + end) + + + + local chaxunmaima=self._view:GetChild("btn_maima") + local chaxunfama=self._view:GetChild("btn_fama") + local chaxunjiangma=self._view:GetChild("btn_jiangma") + self.mapaiTypeCtr.selectedIndex=0 + local btnqueding=self._view:GetChild("btn_queding") + + if over ~= 2 then + if result.liuju then + ctr_type.selectedIndex = 3 + else + local info_list = result.info_list + for i = 1, #info_list do + local is_win = info_list[i].is_win + if is_win then + if info_list[i].seat == room.self_player.seat then + ctr_type.selectedIndex = 1 + else + ctr_type.selectedIndex = 2 + end + end + end + end + if over == 0 then + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + + if DataManager.CurrenRoom.room_config.NiaoType and DataManager.CurrenRoom.room_config.NiaoType==1 or + DataManager.CurrenRoom.room_config.mai_niao and DataManager.CurrenRoom.room_config.mai_niao==1 then + self.mapaiTypeCtr.selectedIndex=1 + chaxunmaima.visible=true + chaxunfama.visible=true + chaxunjiangma.visible=true + if DataManager.CurrenRoom.room_config.mai_niao and DataManager.CurrenRoom.room_config.mai_niao==0 then + chaxunmaima.visible=false + chaxunfama.visible=false + end + + if DataManager.CurrenRoom.room_config.NiaoType and DataManager.CurrenRoom.room_config.NiaoType==0 then + chaxunjiangma.visible=false + end + + if DataManager.CurrenRoom.room_config.mai_niao and DataManager.CurrenRoom.room_config.mai_niao==1 then + + if DataManager.CurrenRoom.room_config.mai_niao_opt<3 then + chaxunfama.visible=false + else + chaxunmaima.visible=false + end + + local playerMaList=self._view:GetChild("jiangmalist") + if playerMaList then + playerMaList:RemoveChildrenToPool() + + local infoList=result.info_list + if infoList and #infoList>0 then + for i=1,#infoList do + local user = room:GetPlayerBySeat(infoList[i].seat).self_user + if infoList[i].mai_niao and #infoList[i].mai_niao>0 then + local tempItem=playerMaList:AddItemFromPool() + tempItem:GetChild("mapai1").visible=false + tempItem:GetChild("mapai2").visible=false + for j=1,#infoList[i].mai_niao do + tempItem:GetChild("fuhao").text=user.nick_name + local tempCardBtn=tempItem:GetChild("mapai"..j) + tempCardBtn.visible=true + self:SetMaPaiValue(tempCardBtn,infoList[i].mai_niao[j].card) + if infoList[i].mai_niao[j].score>0 then + self:SetMaPaiColor(tempCardBtn,2) + end + end + + + + end + end + end + + end + end + + + chaxunmaima.onClick:Add(function() + self.mapaiTypeBgShowCtr.selectedIndex=1 + self.mapaiTypeShowCtr.selectedIndex=1 + end) + + chaxunfama.onClick:Add(function() + self.mapaiTypeBgShowCtr.selectedIndex=1 + self.mapaiTypeShowCtr.selectedIndex=1 + end) + + + chaxunjiangma.onClick:Add(function() + self.mapaiTypeBgShowCtr.selectedIndex=1 + self.mapaiTypeShowCtr.selectedIndex=0 + end) + + btnqueding.onClick:Add(function() + self.mapaiTypeBgShowCtr.selectedIndex=0 + self.mapaiTypeShowCtr.selectedIndex=0 + end) + + + end + + + + + btn_confirm.onClick:Add(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:DestroyWithCallback() + end) + + self:AddClearItem(room, result.info_list, nil, over, result.niao, result.active_player) + + elseif over == 1 then + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add(function() + self.maPaiCtr.selectedIndex=0 + _overCtr.selectedIndex = 1 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + if self._qsinfo_view then + self._qsinfo_view:Dispose() + end + end) + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + self:AddClearItem(room, result.info_list, total_result.info_list, over, result.niao, result.active_player) + end + else + _overCtr.selectedIndex = 1 + self.maPaiCtr.selectedIndex=0 + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + self:AddClearItem(room, nil, total_result.info_list, over) + end +end + +function M:AddClearItem(room, data, total_data,over, niao, active_player) + local n = over + 1 + local list_view1 = self._view:GetChild("player_list_1") + local list_view2 = self._view:GetChild("player_list_2") + if 0 == over or 1 == over then + table.sort(data, function(a,b) return a.seat < b.seat end) + list_view1:RemoveChildrenToPool() + for i=1,#data do + local item = list_view1:AddItemFromPool() + self:FillItemData(room, data[i], item, active_player, niao) + end + if #data == 3 then + list_view1.lineGap = 54 + elseif #data == 2 then + list_view1.lineGap = 108 + end + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end +end + +function M:FillItemData(room, data, item, active_player, niao) + local _gamectr = ControllerManager.GetController(GameController) + local p = room:GetPlayerBySeat(data["seat"]) + item:GetChild("playerName").text = p.self_user.nick_name + item:GetChild("lab_hp").text="抓马" + local user = room:GetPlayerBySeat(data["seat"]).self_user + local head = item:GetChild('head'):GetChild('n4') + ImageLoad.Load(user.head_url, head) + + -- 手牌 + local hand_cards = data["hand_card"] + table.sort( hand_cards, ViewUtil.HandCardSort) + local hand_list_view = item:GetChild("hand_card_list") + hand_list_view:RemoveChildrenToPool() + for i=1,#hand_cards do + local card = hand_list_view:AddItemFromPool() + card.icon = "ui://Main_Majiang/202_"..hand_cards[i] + end + hand_list_view.width = 52 * #hand_cards + + local fz_card = p.fz_list + local fz_card_list = item:GetChild("fz_card_list") + fz_card_list.width = 157 * #fz_card * 0.8 + fz_card_list:RemoveChildrenToPool() + for i=1,#fz_card do + if fz_card[i].type == FZType.Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j=1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + elseif fz_card[i].type == FZType.Gang or fz_card[i].type == FZType.Gang_An or fz_card[i].type == FZType.Gang_Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_4") + for j=1,4 do + local card = item:GetChild("card_" .. j) + if fz_card[i].type == FZType.Gang_An and j == 4 then + card.icon = "ui://Main_Majiang/202_00" + else + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + end + end + end + + local huadd = data["hu_score"] + local gangadd = data["gang_score"] + local birdadd = data["niao_score"] + local total = data["round_score"] + local geng_zhuan=data["geng_zhuan"] + local sp = " " + local str = "胡:"..huadd.."分" + str = str..sp.."杠:"..gangadd.."分" + str = str..sp.."中马:"..birdadd.."分" + + if data["mai_niao_score"] and data["mai_niao_score"]~=0 then + str = str..sp.."买马/罚马:"..data["mai_niao_score"].."分" + end + + if data["ma_geng_gong"] and data["ma_geng_gong"]~=0 then + str = str..sp.."马跟杠:"..data["ma_geng_gong"].."分" + end + + if geng_zhuan and geng_zhuan~=0 then + str = str..sp.."跟庄:"..geng_zhuan.."分" + end + + if data["repeat_win"] and data["repeat_win"]~=0 then + str = str..sp.."连庄x"..data["repeat_win"] + end + + + + item:GetChild("score1").text = str + -- local total_score = data["total_score"] + if total >= 0 then + item:GetChild("score2").text = "+"..total + item:GetChild("score2").grayed = false + else + item:GetChild("score2").text = total + item:GetChild("score2").grayed = true + end + + + --计算牌型 + local totalPeson=DataManager.CurrenRoom.room_config.people_num-1 + local win_list = data["win_list"] + local is_win = data["is_win"] or false + local str1="" + sp="、" + if is_win then + if win_list then + if DataManager.CurrenRoom.isZiMoHu then + str1="自摸" + else + str1="接炮" + end + for i=1,#win_list do + local huName=Hu_Type_Name[win_list[i].type] + if huName then + str1=str1..sp..huName.."x"..win_list[i].score + end + + end + str1=str1.." +"..huadd.."分" + end + + else + printlog("输家============") + if DataManager.CurrenRoom.isZiMoHu then + printlog("自摸处理============") + --str1="" + if #self.WinList==1 then + for i=1,#self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + if j==1 then + str1=str1..huName.."x"..self.WinList[i][j].score + else + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + + end + end + + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + else + printlog("非自摸处理====>>>") + --点炮 一炮多响 + local yipaoduoxiang=false + if #self.WinList>1 then + yipaoduoxiang=true + end + + if yipaoduoxiang then + printlog("一炮多响====>>>") + str="点炮" + local allTypeList={} + local isHas=false + for i=1,#self.WinList do + for j=1,#self.WinList[i] do + isHas=IsHasDictionary(self.WinList[i][j].type,allTypeList) + if isHas==false then + table.insert(allTypeList,self.WinList[i][j].type) + end + end + + end + + if #allTypeList>0 then + for i=1,#allTypeList do + local huName=Hu_Type_Name[allTypeList[i]] + if huName then + str1=str1..huName.."、" + end + end + str1=str1.." "..huadd.."分" + end + + else + + if p.self_user.account_id == active_player and is_win == false and not data["liuju"] then + str1="点炮" + if #self.WinList==1 then + for i=1,# self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + end + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + end + + end + + + end + end + + -- + printlog("牌型计算==>>>",str1) + + if data["ming_gang_num"]>0 then + str1=str1.." 明杠x"..data["ming_gang_num"] + end + + if data["an_gang_num"]>0 then + str1=str1.." 暗杠x"..data["an_gang_num"] + end + + if data["dian_gang_num"]>0 then + str1=str1.." 点杠x"..data["dian_gang_num"] + end + + if gangadd~=0 then + if gangadd>0 then + str1=str1.." +"..gangadd.."分" + else + str1=str1.." "..gangadd.."分" + end + + end + + if birdadd~=0 then + if birdadd>0 then + str1=str1.." 中马分数+"..birdadd.."分" + else + str1=str1.." 中马分数"..birdadd.."分" + end + + end + + + if data["mai_niao_score"] and data["mai_niao_score"]~=0 then + if data["mai_niao_score"]>0 then + str = str..sp.."买马/罚马分数:+"..data["mai_niao_score"].."分" + else + str = str..sp.."买马/罚马分数:"..data["mai_niao_score"].."分" + end + + end + + + if data["ma_geng_gong"] and data["ma_geng_gong"]~=0 then + if data["ma_geng_gong"]>0 then + str1 = str1.." 马跟杠:+"..data["ma_geng_gong"].."分" + else + str1 = str1.." 马跟杠:"..data["ma_geng_gong"].."分" + end + + end + + if geng_zhuan and geng_zhuan~=0 then + if geng_zhuan>0 then + str1 = str1.." 跟庄:+"..geng_zhuan.."分" + else + str1 = str1.." 跟庄:"..geng_zhuan.."分" + end + + end + + + + + + item:GetChild("score3").text=str1 + local paixingCtr=item:GetController("detail") + table.insert(self.PaiXingXiangQingCtrList,paixingCtr) + + + + + local hp_nonnegative = room:checkHpNonnegative() + item:GetController("nonnegative").selectedIndex = hp_nonnegative and 1 or 0 + if hp_nonnegative then + local hp_info = data.hp_info + local ctr_hp_limit = item:GetController("hp_limit") + local hp = d2ad(hp_info.round_actual_hp) + if hp >= 0 then hp = "+" .. tostring(hp) end + item:GetChild("tex_hp").text = hp + ctr_hp_limit.selectedIndex = hp_info.upper_limit and 1 or 0 + end + + local is_win = data["is_win"] or false + item:GetController("win").selectedIndex = is_win and 0 or 1 + if p.self_user.account_id == active_player and is_win == false and total < 0 then + item:GetController("win").selectedIndex = 2 + end + + if is_win then + item:GetController("bg").selectedIndex=1 + else + item:GetController("bg").selectedIndex=0 + end + local win_card = item:GetChild("win_card") + win_card.icon = "ui://Main_Majiang/202_"..data["win_card"] + --[[if is_win then + win_card.icon = "ui://Main_Majiang/202_"..data["win_card"] + local lst_niao = item:GetChild("list_niao") + lst_niao:RemoveChildrenToPool() + for i = 1, #niao do + if niao[i].score > 0 then + local card_niao = lst_niao:AddItemFromPool() + card_niao.icon = "ui://Main_Majiang/202_" .. niao[i].card + end + end + end--]] + + if niao and #niao>0 then + local currentNiaoList=self:CalculateNiao(niao ,data["seat"]) + if currentNiaoList and #currentNiaoList>0 then + local lst_niao = item:GetChild("list_niao") + lst_niao:RemoveChildrenToPool() + for i = 1, #currentNiaoList do + if currentNiaoList[i].score > 0 then + local card_niao = lst_niao:AddItemFromPool() + card_niao.icon = "ui://Main_Majiang/202_" .. currentNiaoList[i].card + end + end + end + end + + + if p.seat == room.banker_seat then + item:GetController("bank").selectedIndex = 1 + end +end + +function M:CalculateNiao(niaoList,seat) + local tempNiao={} + for i=1,#niaoList do + if niaoList[i].seat==seat then + table.insert(tempNiao,niaoList[i]) + end + end + return tempNiao +end + + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + player_list[i].id = user.account_id + player_list[i].hp_info = data[i].hp_info + player_list[i].score = data[i].total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + + local settle_log = data[i].settle_log + player_list[i].param = {} + player_list[i].param[1]={} + player_list[i].param[1].key = "自摸次数:" + player_list[i].param[1].value = tostring(data[i].settle_log.zimo) + player_list[i].param[2]={} + player_list[i].param[2].key = "接炮次数:" + player_list[i].param[2].value = tostring(data[i].settle_log.jie_pao) + player_list[i].param[3]={} + player_list[i].param[3].key = "点炮次数:" + player_list[i].param[3].value = tostring(data[i].settle_log.dian_pao) + player_list[i].param[4]={} + player_list[i].param[4].key = "暗杠次数:" + player_list[i].param[4].value = tostring(data[i].settle_log.an_kong) + player_list[i].param[5]={} + player_list[i].param[5].key = "明杠次数:" + player_list[i].param[5].value = tostring(data[i].settle_log.ming_kong) + end + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + local big_result = self._view:GetChild("big_result") + big_result:GetChild("txt_room_info").text = string.format("%s 房号%s 局%s/%s", os.date("%Y/%m/%d", os.time()), room.room_id, room.curren_round, room.room_config.round) + local lst_p = big_result:GetChild("player_list") + if #player_list == 3 then + lst_p.columnGap = 108 + elseif #player_list == 2 then + lst_p.columnGap = 208 + end + self:InitBigResult(room, 30) + local show_detail = room.hpOnOff == 1 + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + com_p:GetController("jsicon").selectedIndex=i-1 + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + if show_detail then + local score = 0 + if com_p:GetController("pn").selectedIndex == 0 then + score = com_p:GetChild("txt_navigate").text + else + score = com_p:GetChild("txt_positive").text + end + score = score / room.score_times + com_p:GetChild("tex_detail_score").text = string.format("%s × %s倍", score, room.score_times) + end + end + if room.group_id ~= 0 then + big_result:GetController("group").selectedIndex = 1 + end + DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild("btn_head") + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= "" then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end + +function M:DestroyWithCallback() + if self._callback then + self._callback() + end + self:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhou/EXGameController.lua b/lua_probject/extend_project/extend/majiang/chaozhou/EXGameController.lua new file mode 100644 index 00000000..420e67c0 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhou/EXGameController.lua @@ -0,0 +1,410 @@ +local TX_Protocol = import(".Protocol") +local FZTipList = require("main.majiang.FZData") +local TX_GameEvent = import(".GameEvent") + +local M = {} + +--- Create a new GameController +function M.new() + setmetatable(M,{__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("测试麻将") + self.class = "TX_GameController" + return self +end + +function M:init(name) + GameController.init(self,name) + + self._eventmap[TX_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[TX_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[TX_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[TX_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[TX_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[TX_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + self._eventmap[TX_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[TX_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[TX_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[TX_Protocol.GAME_EVT_RESULT2] = self.OnEventResult2 + self._eventmap[TX_Protocol.GAME_EVT_NIAO] = self.OnEventNiao + self._eventmap[TX_Protocol.GAME_EVT_MAI_NIAO] = self.OnEventMa + + self._eventmap[TX_Protocol.GAME_EVT_PIAOTIP] = self.OnEventPiaoTip + self._eventmap[TX_Protocol.GAME_EVT_PIAO] = self.OnEventPiao +end + +local __pre_delete_card = false +-- 发送出牌指令到服务器 +function M:SendOutCard(card, callback) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_DIS_CARD, _data) + + -- 进行预删牌处理 + local p = _room.self_player + _room.curren_outcard_seat = -1 + list_remove(p.card_list,card) + table.sort(p.card_list, ViewUtil.HandCardSort) + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + __pre_delete_card = true + callback() +end + + +-- 发送放子选择到服务器 +function M:SendAction(id) + local _data = {} + _data["id"] = id + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_ACTION, _data) +end + +function M:OnEventSendCards(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + if not _room.room_config.piao_niao or _room.self_player.entrust then + _room.curren_round = _room.curren_round + 1 + end + if _room.curren_round > 0 then _room.playing = true end + + printlog("开始发牌===========>>>") + pt(evt_data) + + local room = DataManager.CurrenRoom + --printlog(evt_data.laiziCard) + --printlog(evt_data.laiziCard2) + --printlog(evt_data.laiziCardBefore) + --printlog(evt_data.laiziCard2Before) + + room.laiziInfo={} + if evt_data.laiziCardBefore>0 then + table.insert(room.laiziInfo,evt_data.laiziCard) + if evt_data.laiziCard2>0 then + table.insert(room.laiziInfo,evt_data.laiziCard2) + end + else + room.laiziInfo=nil + end + + if evt_data.laiziCardBefore>0 then + DispatchEvent(self._dispatcher,TX_GameEvent.SendLaiZi,evt_data.laiziCardBefore,evt_data.laiziCard,evt_data.laiziCard2,true ) + end + + + + + -- _room.SelfPlayer.AutoOutCard = false + local handcards = evt_data["card_list"] + local p = _room.self_player + local seat = evt_data["bank_seat"] + self._cacheEvent:Enqueue(function() + _room.banker_seat = seat + for i=1,#_room.player_list do + _room.player_list[i].hand_left_count = 13 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + end + p.card_list = handcards + self._room.self_player.hand_left_count = #handcards + table.sort( handcards, ViewUtil.HandCardSort ) + DispatchEvent(self._dispatcher,TX_GameEvent.SendCards, p) + end) +end + +function M:OnEventOutCard(evt_data) + printlog("出牌事件===========>>>") + pt(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local ting_list = nil + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + _room.last_outcard_seat = seat + if seat == _room.self_player.seat and __pre_delete_card then + __pre_delete_card = false + else + if seat == _room.self_player.seat then + list_remove(p.card_list, card) + table.sort(p.card_list, ViewUtil.HandCardSort) + end + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + DispatchEvent(self._dispatcher,TX_GameEvent.OutCard, p, card) + end + end) +end + + +function M:OnEventTakeCard(evt_data) + printlog("抓牌===========>>>") + pt(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + p.hand_left_count = p.hand_left_count +1 + if (seat == _room.self_player.seat) then + _room.self_player.card_list[#_room.self_player.card_list+1] = card + -- table.sort( _room.self_player.card_list, ViewUtil.HandCardSort ) + end + DispatchEvent(self._dispatcher,TX_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnEventOutHint(evt_data) + printlog("出牌提示事件===========>>>") + pt(evt_data) + self._cacheEvent:Enqueue(function() + self._room.curren_outcard_seat = self._room.self_player.seat + DispatchEvent(self._dispatcher,TX_GameEvent.OutHint) + end) +end + +function M:OnEventTurn(evt_data) + printlog("转轮指向===========>>>") + pt(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + -- self._room.curren_outcard_seat = seat + DispatchEvent(self._dispatcher,TX_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + printlog("放子提示事件===========>>>") + pt(evt_data) + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + local weight = evt_data["weight"] + for i=1,#list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + -- if (dtip["opcard"]) then + -- local opcard = dtip["opcard"] + -- tip.OpCard = opcard + -- tip.OpCard[3] = tip.Card + -- table.sort(tip.OpCard) + -- end + tiplist:AddTip(tip) + end + DispatchEvent(self._dispatcher,TX_GameEvent.FZTips, tiplist, weight) + end) +end + +function M:OnEventFzAction(evt_data) + printlog("吃杠碰行为事件===========>>>") + pt(evt_data) + local _room = self._room + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local type = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + -- local openkong = evt_data["openkong"] + + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local fz = nil + local index = -1 + local ftype = type + if (ftype == FZType.Gang_Peng) then + for i=1,#p.fz_list do + if (p.fz_list[i].card == card) then + p.fz_list[i].card = card + fz = p.fz_list[i] + fz.type = type + index = i -1 + break + end + end + end + if (index == -1) then + fz = {} + fz.card = card + fz.type = type + fz.active_card = actice_card + p.fz_list[#p.fz_list+1] = fz + end + fz.from_seat = from_seat + local remove_num = #opcard + + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(p.card_list,opcard[i]) + end + end + + p.hand_left_count = p.hand_left_count - remove_num + if from_seat ~= p.seat then + -- if (fz.Type == FZType.Chi) then card = actice_card end + local fp = _room:GetPlayerBySeat(from_seat) + table.remove(fp.outcard_list,#fp.outcard_list) + end + + DispatchEvent(self._dispatcher,TX_GameEvent.FangziAction, fz, p, index) + end) +end + +function M:OnEventHu(evt_data) + printlog("胡牌===========>>>") + pt(evt_data) + + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local win_card = evt_data["win_card"] + local win_list = evt_data["win_list"] + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + table.sort( win_p.card_list, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher,TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], win_card, cards, win_list) + end) + + --[[local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local hu_card = evt_data["win_card"] + table.sort(cards, ViewUtil.HandCardSort) + cards[#cards +1] = hu_card + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + DispatchEvent(self._dispatcher,TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], cards, hu_card) + end)--]] +end + +function M:OneventResult1(evt_data) + printlog("小结算===========>>>") + pt(evt_data) + local over = evt_data.type + --0:小结算 1:小大结算 2:大结算 + self._room._reload_flag = false + self._room.playing = false + if 0 == over then + local result = evt_data.result + self._cacheEvent:Enqueue(function() + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil,true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +-- function M:OnEventResult2(evt_data) +-- DataManager.CurrenRoom.Over = true +-- ControllerManager.SetGameNetClient(nil,true) + -- local info_list = evt_data["info_list"] + -- if self._result ~= nil then + -- self._cacheEvent:Enqueue(function() + -- self:OneventResult1(self._result) + -- self._result = nil + -- end) + -- end +-- self._cacheEvent:Enqueue(function() +-- DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, info_list) +-- ControllerManager.ChangeController(LoddyController) +-- end) +-- end + +function M:OnEventNiao(evt_data) + printlog("抓鸟事件====>>>") + pt(evt_data) + local list = evt_data["niao"] + local start_seat = evt_data["start_seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EventNiao, list, start_seat) + end) +end + + +function M:OnEventMa(evt_data) + printlog("买马或罚马事件====>>>") + pt(evt_data) + local list = evt_data["mai_niao"] + local start_seat = evt_data["start_seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EventMa, list, start_seat) + end) +end + + + +function M:OnEventPiaoTip() + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + self._cacheEvent:Enqueue(function() + if not self._room._reload_flag then + self._room.curren_round = self._room.curren_round + 1 + end + self._room.playing = true + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiaoTip, evt_data) + end) +end + +function M:OnEventPiao(evt_data) + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiao, evt_data.seat, evt_data.num) + end) +end + +function M:GetPosString( seat ) + if DataManager.CurrenRoom.room_config.people_num ~= 4 then return"" end + if seat == 1 then + return "北" + elseif seat == 2 then + return "西" + elseif seat == 3 then + return "南" + elseif seat == 4 then + return "东" + end +end + +function M:Discard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + -- list_remove(_room.SelfPlayer.Cards,card) + -- table.sort(_room.SelfPlayer.Cards) + _client:send(Protocol.Game_Da, _data) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhou/EXGameInfo.lua b/lua_probject/extend_project/extend/majiang/chaozhou/EXGameInfo.lua new file mode 100644 index 00000000..483a7910 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhou/EXGameInfo.lua @@ -0,0 +1,206 @@ +local EXGameInfo = {} + +local M = EXGameInfo + + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/majiang/chaozhou/ui/Info_MJ_ChaoZhou") + return self +end + +function M:FillData() + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 3 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_ChaoZhou/Cgm_create_room") +end + +local _help_url= "ui://Info_MJ_ChaoZhou/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_MJ_ChaoZhou/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_MJ_ChaoZhou/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list = {}--{"四人潮州","三人潮州","二人潮州"} +function M:GetPlayList() + return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + 1 + local people = _config:GetController("play_list").selectedIndex+2 + + local laizi=_config:GetController("GuiType").selectedIndex + + local zhama=_config:GetController("zhama").selectedIndex + local niao=0 + local niao_opt=0 + local magengdifen=false + local magenggang=false + if zhama>0 and zhama<5 then + niao=1 + niao_opt=zhama + magengdifen=_config:GetChild("btn_magengdi").selected and true or false + magenggang=_config:GetChild("btn_magenggang").selected and true or false + --elseif zhama==4 then + -- niao=3 + --local baozhama=_config:GetController("baozhama").selectedIndex + -- niao_opt=0 + end + + + local jiangma=_config:GetController("jiangma").selectedIndex + local mai_niao=0 + local mai_niao_opt=0 + if jiangma>0 and jiangma <5 then + mai_niao=1 + mai_niao_opt=jiangma + magengdifen=_config:GetChild("btn_magengdi1").selected and true or false + magenggang=_config:GetChild("btn_magenggang1").selected and true or false + end + + local no_wan=_config:GetChild("btn_wuzi").selected and true or false + local budaifeng=_config:GetChild("btn_wufeng").selected and true or false + local geng_zhuan=_config:GetChild("btn_fengzhuang").selected and true or false + local lian_zhuang=_config:GetChild("btn_lianzhuang").selected and true or false + local huangzhuang_huanggang=_config:GetChild("btn_liujusuangang").selected and true or false + local gangbaoquanbao=_config:GetChild("btn_chigang").selected and true or false + local must_hu=_config:GetChild("btn_bihu").selected and true or false + --local da_hu_cheng=_config:GetChild("btn_dahuxiangcheng").selected and true or false + local qiangganghu=_config:GetChild("btn_qiangganghu").selected and true or false + + local dianpao=_config:GetChild("btn_chihu").selected and true or false + local xiaohu_bei=false + local jihunotchihu=false + if dianpao then + --xiaohu_bei=_config:GetChild("btn_xiaohu").selected and true or false + --jihunotchihu=_config:GetChild("btn_jihubuchihu").selected and true or false + end + + --local special_zimo=_config:GetChild("btn_zimo").selected and true or false + local bujifen=false + bujifen=_config:GetChild("btn_shibeibujifen").selected and true or false + local fengding=_config:GetChild("btn_fengdingshibei").selected and true or false + local qianggangquanbao=_config:GetChild("btn_qianggangquanbao").selected and true or false + + ------ + local _data = {} + _data["opt"] = round + _data["maxPlayers"] = people + + _data["laizi"] = laizi + _data["niao"] = niao + _data["niao_opt"] = niao_opt + _data["ma_gen_di_fen"] = magengdifen + _data["ma_gen_gong"] = magenggang + _data["mai_niao"] = mai_niao + _data["mai_niao_opt"] = mai_niao_opt + + _data["dianpao"] = dianpao + --_data["xiaohu_bei"] = xiaohu_bei + --_data["jihunotchihu"] = jihunotchihu + + --_data["special_zimo"] = special_zimo + _data["10bei_bu_jifen"] = bujifen + + + _data["no_wan"] = no_wan + _data["wu_feng"] = budaifeng + _data["geng_zhuan"] = geng_zhuan + _data["lian_zhuang"] = lian_zhuang + _data["huangzhuang_huanggang"] = not huangzhuang_huanggang + _data["gangbao_type"] = gangbaoquanbao + _data["zi_dong_hu"] = must_hu + --_data["da_hu_cheng"] = da_hu_cheng + _data["qiangkong_2bei"] = qiangganghu + + _data["10bei_fengding"] = fengding + _data["qianggang_type"] = qianggangquanbao + + printlog("上传房间配置==========>>>") + pt(_data) + + return _data +end + +function M:LoadConfigData(data) + --printlog("加载房间配置=========>>>") + --pt(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt-1 + _config:GetController("play_list").selectedIndex = data.maxPlayers-2 + + _config:GetController("GuiType").selectedIndex = data.laizi + + + --_config:GetChild("btn_magengdifen").selected = false + --_config:GetChild("btn_magenggang").selected = false + + local GuiTypeValue=0 + if data.niao ==0 then + GuiTypeValue=0 + elseif data.niao ==1 then + GuiTypeValue=data.niao_opt + --_config:GetChild("btn_magengdifen").selected = data.ma_gen_di_fen + --_config:GetChild("btn_magenggang").selected = data.ma_gen_gong + elseif data.niao ==3 then + GuiTypeValue=4 + --_config:GetController("baozhama").selectedIndex = data.niao_opt + end + + _config:GetController("zhama").selectedIndex = GuiTypeValue + + + local maimaypeValue=0 + if data.mai_niao ==0 then + maimaypeValue=0 + elseif data.mai_niao ==1 then + maimaypeValue=data.mai_niao_opt + --_config:GetChild("btn_magenggang").selected = data.ma_gen_gong + end + + _config:GetChild("btn_magengdi").selected = data.ma_gen_di_fen + _config:GetChild("btn_magengdi").selected = data.ma_gen_di_fen + _config:GetChild("btn_magenggang").selected = data.ma_gen_gong + _config:GetChild("btn_magenggang1").selected = data.ma_gen_gong + + _config:GetController("jiangma").selectedIndex = maimaypeValue + + _config:GetChild("btn_wuzi").selected=data.no_wan + _config:GetChild("btn_wufeng").selected =data.wu_feng + _config:GetChild("btn_fengzhuang").selected =data.geng_zhuan + _config:GetChild("btn_lianzhuang").selected =data.lian_zhuang + _config:GetChild("btn_liujusuangang").selected=not data.huangzhuang_huanggang + _config:GetChild("btn_chigang").selected =data.gangbao_type + _config:GetChild("btn_bihu").selected =data.zi_dong_hu + --_config:GetChild("btn_dahuxiangcheng").selected =data.da_hu_cheng + _config:GetChild("btn_qiangganghu").selected =data.qiangkong_2bei + _config:GetChild("btn_chihu").selected =data.dianpao + --_config:GetChild("btn_xiaohu").selected =data.xiaohu_bei + --_config:GetChild("btn_jihubuchihu").selected =data.jihunotchihu + --_config:GetChild("btn_zimo").selected =data.special_zimo + _config:GetChild("btn_shibeibujifen").selected =data["10bei_bu_jifen"] + + _config:GetChild("btn_qianggangquanbao").selected =data.qianggang_type + _config:GetChild("btn_fengdingshibei").selected =data["10bei_fengding"] + + end + + + + + +return M + \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhou/EXMainView.lua b/lua_probject/extend_project/extend/majiang/chaozhou/EXMainView.lua new file mode 100644 index 00000000..374d077f --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhou/EXMainView.lua @@ -0,0 +1,849 @@ +local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local MJMainView = require("main.majiang.MJMainView") +local EXClearingView = import(".EXClearingView") +local TX_GameEvent = import(".GameEvent") +local HuTipView = import("main.majiang.HuTipView") +local SettingView = import("main.majiang.MJSettingViewNew") +local PlayerInfoView = import(".EXPlayerInfoView") +local M = {} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M,{__index = MJMainView}) + local self = setmetatable({}, {__index = M}) + self.class = "MainView" + self.asset_group = "ChaoZhou_MJ" + self:init() + ViewUtil.PlayMuisc(self.asset_group, "extend/majiang/chaozhou/sound/bg.mp3") + return self +end + +function M:InitView(url) + local room = self._room + self._style = 1 + self._gps_style = 1 + self._full = true + UIPackage.AddPackage("extend/majiang/chaozhou/ui/Extend_MJ_ChaoZhou") + MJMainView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num .. "_s2") + self._hu_tip = HuTipView.new(self) + + self._view:GetChild('wanfa_text').text =room.room_config.people_num .. '人潮州 ' .. room.score_times .. '倍' + + self.LaiziBG=self._view:GetChild('n103') + self.LaiziBG.text="鬼牌" + self.LaiziBG.visible=false + self.selectLaiziBtn=self._view:GetChild('selectlaizi') + self.Laizi1Btn=self._view:GetChild('selectlaizi1') + self.Laizi2Btn=self._view:GetChild('selectlaizi2') + self.Laizi1Btn.visible=false + self.Laizi2Btn.visible=false + self.selectLaiziBtn.visible=false + self:SetReconnentLaiziTips() + + self:PlayerChangeLineState() + + if room.playing or room.curren_round > 0 then + self:ReloadRoom() + end +end + + + +function M:SetReconnentLaiziTips() + local room=DataManager.CurrenRoom + if room.beforelaiziCardId and room.beforelaiziCardId>0 then + self:SetShowLaiZiProcess(room.beforelaiziCardId,room.laiziInfo[1],room.laiziInfo[2],false) + end +end + + +function M:SetLaiZiCard(btn,cardId) + btn.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..cardId +end + + +function M:IsShowLaiZi(btn,isShow) + btn.visible=isShow +end + + +function M:HideAllLaiZiCard() + self.Laizi1Btn.visible=false + self.Laizi2Btn.visible=false + self.selectLaiziBtn.visible=false + self.LaiziBG.visible=false +end + +function M:SetShowLaiZiProcess(beforeLaiziID,currentLaizi1ID,currentLaizi2ID,isShowAnim) + --zhongid=currentLaizi1ID + if isShowAnim==nil then isShowAnim=false end + + printlog("当前赋值结果为====>>>") + print(beforeLaiziID) + print(currentLaizi1ID) + print(currentLaizi2ID) + self:HideAllLaiZiCard() + self:SetLaiZiCard(self.selectLaiziBtn,beforeLaiziID) + self:SetLaiZiCard(self.Laizi1Btn,currentLaizi1ID) + if currentLaizi2ID then + self:SetLaiZiCard(self.Laizi2Btn,currentLaizi2ID) + end + + + if isShowAnim==true then + self:IsShowLaiZi(self.selectLaiziBtn,true) + coroutine.start( + function() + coroutine.wait(1) + self:HideAllLaiZiCard() + self.LaiziBG.visible=true + self:IsShowLaiZi(self.Laizi1Btn,true) + if currentLaizi2ID then + self:IsShowLaiZi(self.Laizi2Btn,true) + end + + end + ) + else + self.LaiziBG.visible=true + self:IsShowLaiZi(self.Laizi1Btn,true) + if currentLaizi2ID then + self:IsShowLaiZi(self.Laizi2Btn,true) + end + end + self.LaiziBG.visible=true +end + + +function M:UpdateRound() + self._view:GetChild("tex_round1").text = self._room.curren_round + self._view:GetChild("tex_round2").text = self._room.room_config.round +end + +function M:InitPlayerInfoView() + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem,self) + tem.visible = false + end +end + +function M:NewMJPlayerCardInfoView(view,index) + if index == 1 then + return MJPlayerSelfCardInfoView.new(view,self) + end + return MJPlayerCardInfoView.new(view,self) +end + +function M:EventInit() + -- UIPackage.AddPackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong") + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _gcm_outcard_url = UIPackage.GetItemURL("Main_Majiang", "Gcm_OutCard") + local _player_info = self._player_info + local _gamectr = self._gamectr + + + + _gamectr:AddEventListener(TX_GameEvent.SendLaiZi, function(...) + local arg = {...} + self:SetShowLaiZiProcess(arg[1],arg[2],arg[3],arg[4]) + end) + + + + + _gamectr:AddEventListener(TX_GameEvent.SendCards,function( ... ) + -- self:ShowHuTip() + self:UpdateRound() + self._state.selectedIndex = 1 + local list = _room.player_list + for i=1,#list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateHandCard() + end + end) + _gamectr:AddEventListener(TX_GameEvent.EventTurn, function(...) + local arg = {...} + self._left_time = 15 + local seat = arg[1] + self:UpdateCardBox(self:GetPos(seat)) + -- if seat == self._room.self_player.seat then + -- self:ShowHuTip() + -- end + end) + + _gamectr:AddEventListener(TX_GameEvent.OutHint, function(...) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:UpdateHandCard(true) + end) + + local _gcm_outcard_url ="ui://Main_Majiang/Gcm_OutCard" + _gamectr:AddEventListener(TX_GameEvent.OutCard, function(...) + self:__CloseTip() + self._left_time = 0 + local arg = {...} + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:RemoveCursor() + info:UpdateHandCard() + local outcard = UIPackage.CreateObjectFromURL(_gcm_outcard_url) + info:UpdateOutCardList(outcard, card, self._cursor) + self:PlaySound("ChaoZhou_MJ", p.self_user.sex, tostring(card)) + self:PlayMJSound("chupai.mp3") + if seat == _room.self_player.seat then + _room.curren_outcard_seat = -1 + end + end) + _gamectr:AddEventListener(TX_GameEvent.GetCard, function(...) + self:__CloseTip() + local arg = {...} + local seat = arg[1] + local card = arg[2] + -- self._tex_leftTime.text = arg[3] + self._tex_LeftCard.text = arg[3] + -- self:UpdateRoomInfo() + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateHandCard(true) + end) + + _gamectr:AddEventListener(TX_GameEvent.FZTips, function(...) + local arg = {...} + local _tip = arg[1] + local weight = arg[2] + self:__FangziTip(_tip, weight) + end) + + _gamectr:AddEventListener(TX_GameEvent.FangziAction, handler(self,self.OnFangziAction)) + + _gamectr:AddEventListener(TX_GameEvent.ZPHuCard, function(...) + self._left_time = 0 + self:UpdateCardBox(0) + self:__CloseTip() + self._popEvent = false + local arg = {...} + local win_seat = arg[1] + local lose_seat = arg[2] + local win_card = arg[3] + local cards = arg[4] + local win_list = arg[5] + local index = self:GetPos(win_seat) + local info = self._player_card_info[index] + self:RemoveCursor() + info:UpdateHandCard(true, true) + + local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card") + obj_win_card.icon = "ui://Main_Majiang/202_" .. win_card + obj_win_card:GetController("bg").selectedIndex = 1 + info._view:AddChild(obj_win_card) + obj_win_card:Center() + + local url, pNode + local player = _room:GetPlayerBySeat(win_seat) + if win_seat ~= _room.self_player.seat then + url = "ui://Main_Majiang/别人胡" + pNode = info._mask_liangpai + elseif win_seat == _room.self_player.seat then + url = "ui://Main_Majiang/自己胡牌" + pNode = self._view + end + if win_seat == lose_seat then + url = "ui://Main_Majiang/eff_zimo" + end + + local he = UIPackage.CreateObjectFromURL(url) + pNode:AddChild(he) + he:GetTransition("t2"):Play() + he:Center() + if _room.room_config.people_num==2 then + if win_seat ~= _room.self_player.seat then + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + end + + if win_seat == _room.self_player.seat then + printlog("自己位置=====") + he:Center() + elseif url == "ui://Main_Majiang/eff_zimo" then + printlog("自摸地址==========") + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + + + + --- + local isZiMo=win_seat==lose_seat + DataManager.CurrenRoom.isZiMoHu=isZiMo + local hu_sound = isZiMo and ("zimo"..math.random(1, 3)) or ("hu"..math.random(1, 2)) + printlog("声音====>>>",hu_sound) + self:PlaySound("ChaoZhou_MJ",player.self_user.sex, hu_sound) + + local pNode = info._view + local url = "eff_list1" + local he_list = UIPackage.CreateObjectFromURL("ui://Extend_MJ_ChaoZhou/" .. url) + he_list.touchable = false + pNode:AddChild(he_list) + he_list:Center() + + coroutine.start(function() + for i = 1 ,#win_list do + local tem = win_list[i] + if tem.type>0 and tem.type<32 then + local com_name = "he" .. tem.type + local item = he_list:GetChild("list"):AddItemFromPool("ui://Extend_MJ_ChaoZhou/" .. com_name) + coroutine.wait(0.3) + end + + end + + coroutine.wait(2) + obj_win_card:Dispose() + he:Dispose() + he_list:Dispose() + self._popEvent = true + end) + + end) + + _gamectr:AddEventListener(TX_GameEvent.EventNiao, function(...) + local arg = {...} + self._popEvent = false + local list = arg[1] + local start_seat = arg[2] + --ViewUtil.PlaySound("ChaoZhou_MJ", "extend/majiang/chaozhou/sound/zhuaniao.mp3") + coroutine.start(self.RunNiao,self,list, start_seat) + end) + + + _gamectr:AddEventListener(TX_GameEvent.EventMa, function(...) + local arg = {...} + self._popEvent = false + local list = arg[1] + local start_seat = arg[2] + --ViewUtil.PlaySound("ChaoZhou_MJ", "extend/majiang/chaozhou/sound/zhuaniao.mp3") + coroutine.start(self.RunNiao,self,list, start_seat) + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult1, function(...) + self._popEvent = false + self:__CloseTip() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = {...} + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local niao = result.niao + if liuju then + local le = UIPackage.CreateObjectFromURL("ui://Main_Majiang/LiuJu") + self._view:AddChild(le) + le:Center() + le:GetTransition("t0"):Play() + coroutine.start(function() + coroutine.wait(1) + le:Dispose() + end) + end + self:RemoveCursor() + if self._clearingView == nil then + self._clearingView = EXClearingView.new(self._root_view) + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + self._popEvent = true + end) + end + + if _room.curren_round ~= _room.room_config.round then + -- if #niao == 0 then self._view:GetChild("n13").visible = false end + self._clearingView:InitData(0, _room, result, nil, function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:ResetCardType() + if _room:checkHpNonnegative() then + p.cur_hp = data[i].hp_info.cur_hp + end + info:UpdateScore() + info._view:GetChild("zhanji").visible = true + local num = data[i].hp_info.total_hp + if num > 0 then + info._view:GetController("text_color").selectedIndex = 0 + info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + else + info._view:GetController("text_color").selectedIndex = 1 + info._view:GetChild("text_jifen").text = d2ad(num) + end + + info._view:GetChild("mask_piao").title = "" + info._view:GetController("piao_niao").selectedIndex = 0 + p.fz_list = {} + end + DataManager.CurrenRoom.self_player.card_list = {} + self._state.selectedIndex = 2 + self._clearingView = nil + end) + end + self._player_card_info[1]:ShowHuTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult2, function(...) + self:UnmarkSelfTuoguan() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = {...} + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + self._clearingView = EXClearingView.new() + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + end) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiaoTip, function() + self:UpdateRound() + self._tex_LeftCard.text = "0" + self._state.selectedIndex = 1 + self:__PiaoNiaoTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiao, function(...) + local arg = {...} + local seat = arg[1] + local num = arg[2] + if num > 0 then + local head_info = self._player_info[self:GetPos(seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. num + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + if seat == _room.self_player.seat then + if self._com_piao and _room.self_player.entrust then + self._com_piao:Dispose() + self._com_piao = nil + _room.curren_round = _room.curren_round - 1 + end + end + end) +end + +function M:OutCard(card) + if card ~= 0 then + printlog("当前出牌为===>>>"..card) + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card, function() + local info = self._player_card_info[1] + self:RemoveCursor() + info:UpdateHandCard() + + info:UpdateOutCardList(nil, card, self._cursor) + self:PlaySound("ChaoZhou_MJ", self._room.self_player.self_user.sex,tostring(card)) + self:PlayMJSound("chupai.mp3") + -- self:ShowHuTip() + end) + else + printlog("鬼牌不能出===>>>"..card) + end +end + +function M:__FangziTip(tip, weight) + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject("Main_Majiang", "Gcm_action_tips") + _chipeng_tip:GetController("hide_bg").selectedIndex = 1 + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + -- self._player_card_info[self:GetPos(p.seat)] + + local _lit_fanzi = _chipeng_tip:GetChild("lit_fanzi") + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + + if DataManager.CurrenRoom.room_config.must_hu and DataManager.CurrenRoom.room_config.must_hu==true then + local tip_hu = false + local count = #_tlist + + for i=1,count do + if tip.tip_map_id[i].type==6 then + tip_hu=true + end + end + + + for k=1,#_tlist do + + local td = tip.tip_map_type[_tlist[k]][1] + local url = "ui://Main_Majiang/Btn_fztip" + local td_weight = td.weight + if td_weight == 16 then td_weight = 8 end + if td_weight == 8 then url = "ui://Main_Majiang/Btn_hu" end + if tip_hu==true then + if td.type==6 then + local btn_t = _lit_fanzi:AddItemFromPool(url) + btn_t.icon = "ui://Main_Majiang/fztip_"..td_weight + btn_t.data = { tip, td } + btn_t.onClick:Add(self.__TipAction,self) + end + + else + local btn_t = _lit_fanzi:AddItemFromPool(url) + btn_t.icon = "ui://Main_Majiang/fztip_"..td_weight + btn_t.data = { tip, td } + btn_t.onClick:Add(self.__TipAction,self) + end + + end + + if tip_hu==false then + local _btn_pass = _lit_fanzi:AddItemFromPool("ui://Main_Majiang/Btn_pass") + -- local _btn_pass = _chipeng_tip:GetChild("btn_pass") + _btn_pass.onClick:Set(function() + if tonumber(weight) >= 8 then + local guo_msg = MsgWindow.new(self._root_view, "确定要点过吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end) + guo_msg:Show() + else + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end) + end + + else + local tip_hu = false + local count = #_tlist + for k=1,#_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + local url = "ui://Main_Majiang/Btn_fztip" + local td_weight = td.weight + if td_weight == 16 then td_weight = 8 end + if td_weight == 8 then url = "ui://Main_Majiang/Btn_hu" end + local btn_t = _lit_fanzi:AddItemFromPool(url) + btn_t.icon = "ui://Main_Majiang/fztip_"..td_weight + btn_t.data = { tip, td } + btn_t.onClick:Add(self.__TipAction,self) + end + + -- if not (tonumber(weight) >= 16) then + local _btn_pass = _lit_fanzi:AddItemFromPool("ui://Main_Majiang/Btn_pass") + -- local _btn_pass = _chipeng_tip:GetChild("btn_pass") + _btn_pass.onClick:Set(function() + if tonumber(weight) >= 8 then + local guo_msg = MsgWindow.new(self._root_view, "确定要点过吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end) + guo_msg:Show() + else + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end) + -- end + + + end + + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() +end + +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local list = tip.tip_map_type[td.weight] + if (#list > 1) then + self:_ChiView(list, function(id) + _gamectr:SendAction(id) + self:__CloseTip() + end) + self._chipeng_tip.visible = false + return + end + + _gamectr:SendAction(td.id) + if (self._chipeng_tip == nil) then return end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil +end + +function M:_ChiView(tiplist, callback) + self._chipeng_tip.visible = false + local _pop_tip_choice = UIPackage.CreateObject("Main_Majiang", "Pop_tip_choice") + local list_choose = _pop_tip_choice:GetChild("Lst_choose") + local crossCtr = _pop_tip_choice:GetController("state") + crossCtr.selectedIndex = #tiplist == 3 and 0 or 1 + _pop_tip_choice:GetChild("Btn_cross").onClick:Add(function() + _pop_tip_choice:Dispose() + self._chipeng_tip.visible = true + end) + list_choose:RemoveChildrenToPool() + for i = 1, #tiplist do + local item_choose = list_choose:AddItemFromPool() + item_choose:GetController("type").selectedIndex = 0 + for j = 1, 4 do + item_choose:GetChild("card"..j).icon = UIPackage.GetItemURL("Main_Majiang", "202_"..tiplist[i].card) + end + item_choose.onClick:Add(function() + callback(tiplist[i].id) + end) + end + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width)/2, (self._view.height - _pop_tip_choice.height)/2) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:OnFangziAction(...) + self:__CloseTip() + local arg = {...} + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local index = arg[3] + + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject("Extend_MJ_ChaoZhou", "FzEffect") + if fz.type == FZType.Peng then + self:PlaySound("ChaoZhou_MJ", player.self_user.sex,"peng"..math.random(1, 3)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "碰框") + else + + self:PlaySound("ChaoZhou_MJ", player.self_user.sex,"gang"..math.random(1, 2)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "杠框") + end + effect.touchable = false + effect:GetTransition("t2"):Play() + pNode:AddChild(effect) + coroutine.start(function() + coroutine.wait(2) + effect:Dispose() + end) + + self:RemoveCursor() + if (player.seat ~= fz.from_seat) then + local fs_info = _player_card_info[self:GetPos(fz.from_seat)] + fs_info:UpdateOutCardList() + end + info:UpdateFzList(fz, index, true) + local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi + info:UpdateHandCard(getcard) + self:__CloseTip() +end + +function M:RunNiao(list, start_seat) + local _room = self._room + --local _niao_View = self._niao_View + self._niao_View = UIPackage.CreateObject("Extend_MJ_ChaoZhou","Panel_Birds") + self._view:AddChild(self._niao_View) + self._niao_View:Center() + local _niao_View = self._niao_View + local list_niao_card = self._niao_View:GetChild("Lst_birds") + list_niao_card:RemoveChildrenToPool() + for i = 1, #list do + --添加背面的麻將 + local item = list_niao_card:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "202_00") + item:GetChild("tex_score").text = "+" .. list[i].score + end + for i = 1, #list do + --顯示正面 + local item = list_niao_card:GetChildAt(i - 1) + local card = list[i].card + coroutine.wait(0.3) + item:GetTransition("appear"):Play() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_"..card) + if list[i].score > 0 then item:GetController("bg").selectedIndex = 1 end + end + coroutine.start(function() + coroutine.wait(2) + _niao_View:Dispose() + self._popEvent = true + end) +end + +-- function M:markOutCards(showTip, data) +-- for i = 1, #self._room.player_list do +-- local p = self._room.player_list[i] +-- local info = self._player_card_info[self:GetPos(p.seat)] +-- for j = 1, #p.outcard_list do +-- local card = p.outcard_list[j] +-- if card == data then +-- local obj = info:GetOutCardByIndex(j) +-- obj:GetController("gray").selectedIndex = showTip and 1 or 0 +-- end +-- end +-- end +-- end + +function M:__PiaoNiaoTip() + local obj_piao = UIPackage.CreateObject("Main_Majiang", "panel_piao_niao") + self._view:AddChild(obj_piao) + obj_piao.x = (self._view.width - obj_piao.width) * 0.5 + obj_piao.y = self._view.height * 0.6 + for i = 1, 4 do + obj_piao:GetChild("btn_" .. i).onClick:Add(function() + self._gamectr:SendAction(i - 1) + obj_piao:Dispose() + end) + end + self._com_piao = obj_piao +end + +function M:ReloadRoom(bskip) + local room = self._room + -- if not room.playing then + -- self._state.selectedIndex = 2 + -- else + -- self._state.selectedIndex = 1 + -- self._room._reload_flag = true + -- end + + if bskip == nil or bskip == false then + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + self._room._reload_flag = true + end + end + + for i = 1, #room.player_list do + local p = room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + for i = 1, #p.fz_list do + info:UpdateFzList(p.fz_list[i], -1) + end + info:UpdateHandCard() + local head_info = self._player_info[self:GetPos(p.seat)] + head_info:UpdateScore() + head_info._view:GetChild('zhanji').visible = true + local num = p.total_hp or 0 + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(num) + end + + if p.seat == room.last_outcard_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil,card, self._cursor) + elseif p.seat == room.curren_outcard_seat then + info:UpdateHandCard(true) + info:UpdateOutCardList() + else + info:UpdateOutCardList() + end + if p.seat == room.banker_seat then + head_info:MarkBank(true) + end + -- if p.ready then + -- self._player_info[self:GetPos(p.seat)]:Ready(true) + -- end + if bskip == nil or bskip == false then + if p.ready and room.playing == false then + self._player_info[self:GetPos(p.seat)]:Ready(true) + end + end + if p.piao_niao~=nil and p.piao_niao > 0 then + local head_info = self._player_info[self:GetPos(p.seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + end + -- self:ShowHuTip() + + if bskip == nil or bskip == false then + self:UpdateCardBox(self:GetPos(room.curren_outcard_seat)) + self._tex_LeftCard.text = room.left_count + self:UpdateRound() + end +end + +function M:PlayerChangeLineState() + -- local isOutCard = true + -- local str = "玩家 " + -- for _ , player in ipairs(self._room.player_list) do + -- if player.line_state == 0 then + -- isOutCard = false + -- end + -- end + -- self._player_card_info[1]._area_handcard_list.touchable = isOutCard +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:__CloseTip() + if self._chipeng_tip then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if self._pop_tip_choice then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +function M:closeTipOnTuoguan() + self:__CloseTip() +end + +function M:Destroy() + MJMainView.Destroy(self) + UIPackage.RemovePackage("extend/majiang/chaozhou/ui/Extend_MJ_ChaoZhou") +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhou/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/chaozhou/EXPlayBackView.lua new file mode 100644 index 00000000..ba29547d --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhou/EXPlayBackView.lua @@ -0,0 +1,298 @@ +local MJPlayBackView = require("main.majiang.MJPlayBackView") +local EXRoomConfig = import(".EXRoomConfig") +local EXClearingView = import(".EXClearingView") + +local Record_Event = import(".RecordEvent") + + +local M = {} + +--- Create a new +function M.new() + setmetatable(M,{__index = MJPlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = "PlayBackView" + self:init() + + return self +end + + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/majiang/chaozhou/ui/Extend_MJ_ChaoZhou") + MJPlayBackView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num) + local _cardbox = self._view:GetChild("cardbox") + --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false + self._ctr_cardbox = _cardbox:GetController("c1") + self._tex_round = self._view:GetChild("tex_round") + self._tex_LeftCard = self._view:GetChild("remaining_card") + self._anchor = self._view:GetChild("mask_tips") + self._eventmap = {} + + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao + self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao + self._cmdmap[Record_Event.Evt_Result] = self.CmdResult +end + +function M:FillRoomData(data) + MJPlayBackView.FillRoomData(self) + if self._win_pic then self._win_pic:Dispose() end + if self._niao then self._niao:Dispose() end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local left_count = data.info.left_card + self:UpdateLeftCard(left_count) + local round = data.info.round + self:UpdateRound(round) + + local roominfo_panel = self._view:GetChild("roominfo_panel1") + roominfo_panel:GetChild("tex_roomid").text = room.room_id + roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + table.sort(p.card_list, ViewUtil.HandCardSort) + card_info:UpdateHandCard(false, true) + self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0 + end + + self:GenerateAllStepData(data) + self:UpdateStep(1) + -- self:ShowStep(0) +end + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateLeftCard(step.left_card) + -- self._ctr_cardbox.selectedIndex = step.current_out_seat + self:UpdateCardBox(self:GetPos(step.current_out_seat)) + self:UpdateStep(index + 1) + if step.cmd ~= Record_Event.Evt_OutCard then + self:RemoveCursor() + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hand_left_count = #p.card_list + info:Clear() + info:ResetFzList() + p.piao_niao = step.player_card_data[i].piao_niao + local head_info = self._player_info[self:GetPos(i)] + if p.piao_niao and p.piao_niao > 0 then + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + else + head_info._view:GetController("piao_niao").selectedIndex = 0 + end + if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil, nil, self._cursor) + else + info:UpdateOutCardList() + end + if step.cmd == Record_Event.Evt_GetCard and p.seat == step.current_out_seat then + info:UpdateHandCard(true, true) + else + info:UpdateHandCard(false, true) + end + end + if step.cmd == Record_Event.Evt_Win then + self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡") + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + else + if self._win_pic then + self._win_pic:Dispose() + end + end + if step.cmd == Record_Event.Evt_Niao then + local niao_list = step.niao + self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_ChaoZhou/Panel_Birds") + local list = self._niao:GetChild("Lst_birds") + list:RemoveChildrenToPool() + for i = 1, #niao_list do + local item = list:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_"..niao_list[i].card) + if niao_list[i].score > 0 then + item:GetController("bg").selectedIndex = 2 + end + end + self._view:AddChild(self._niao) + self._view:AddChild(self._view:GetChild("panel_record")) + self._niao:Center() + else + if self._niao then + self._niao:Dispose() + end + end + if step.cmd == Record_Event.Evt_Result then + if not self.result then + self.result = EXClearingView.new(self._root_view, true) + self.result:InitData(0, self._room, step.result_data) + self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5 + self.result._view.width = GRoot.inst.width + self.result._view.height = GRoot.inst.height + self.result._view:GetChild("btn_confirm").visible = false + self._anchor:AddChild(self.result._view) + self.result._view.x = self._anchor.x * -1 + self.result._view.y = self._anchor.y * -1 + else + self.result._view.visible = true + end + -- self.result._view:Center() + else + if self.result then + self.result._view.visible = false + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = "" + step.left_card = info.left_card + step.last_out_seat = 0 + step.current_out_seat = 1 + step.win = 0 + step.niao = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.piao_niao = p.piao_niao + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + table.sort(u.card_list, ViewUtil.HandCardSort) + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = 0 + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + for i = 1, #cmd.data.opcard do + list_remove(u.card_list, cmd.data.opcard[i]) + end + local fz = {} + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.opcard = cmd.data.opcard + local uf = data.player_card_data[cmd.data.from_seat] + if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then + table.remove(uf.outcard_list, #uf.outcard_list) + end + if fz.type ~= FZType.Gang_Peng then + u.fz_list[#u.fz_list + 1] = fz + else + for i = 1, #u.fz_list do + if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then + u.fz_list[i].type = FZType.Gang_Peng + end + end + end +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:CmdNiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.niao = cmd.data.niao +end + +function M:CmdPiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.player_card_data[cmd.seat].piao_niao = cmd.data.num +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result_data = cmd.data +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_deep_clone(last_step) + self._step[#self._step + 1] = step + step.result_data = nil + return step +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = "剩余 "..num.." 张牌" +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:UpdateRound(round) + self._tex_round.text = "第 "..round.."/"..self._room.room_config.round.." 局" +end + +function M:UpdateStep(step) + self._record:GetChild("tex_step").text = "第 " .. step .. " / " .. #self._step .. "步" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhou/EXPlayer.lua b/lua_probject/extend_project/extend/majiang/chaozhou/EXPlayer.lua new file mode 100644 index 00000000..fd26822b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhou/EXPlayer.lua @@ -0,0 +1,36 @@ + + +local EXPlayer = { + auto, + -- 手牌列表 + hand_cards = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhou/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/majiang/chaozhou/EXPlayerInfoView.lua new file mode 100644 index 00000000..f8a5fd69 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhou/EXPlayerInfoView.lua @@ -0,0 +1,76 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + +function M:init() + PlayerInfoView.init(self) + self._tex_score = self._view:GetChild("info"):GetChild("tex_score1") + self._tex_score2 = self._view:GetChild("info"):GetChild("tex_score2") + self._ct_score = self._view:GetChild("info"):GetController("score") +end + +function M:ShowInteraction(type,str) + if type == 3 then + Voice.DownLoad(str, function(clip) + if (clip ) then + self:ShowMaskVoice(clip.length) + GameApplication.Instance:PlayVoice(clip) + end + end) + elseif type == 4 then + self:SetChat(str) + elseif type == 2 then + local chat_index = tonumber(str) + self._main_view:PlayChatSound(self._player.self_user.sex,chat_index) + local language, index = self._main_view:GetChatMsgLanguage(chat_index) + self:SetChat(self._main_view.Fix_Msg_Chat[index]) + elseif type == 1 then + self:SetBiaoqing("ui://Chat/"..str) + end +end + +function M:UpdateRemainCard(card_num, hide) + if hide then + self._view:GetController("show_remain").selectedIndex = 0 + else + self._view:GetController("show_remain").selectedIndex = 1 + end + self._view:GetChild("com_remain"):GetChild("tex_remain").text = card_num +end + +function M:FillData(player) + PlayerInfoView.FillData(self, player) + self:UpdateScore(player.total_score) +end + +function M:UpdateScore() + local score = self._player.total_score + local room = DataManager.CurrenRoom + if room:checkHpNonnegative() then + score = d2ad(self._player.cur_hp) + end + if not score then + score = 0 + end + if score < 0 then + self._ct_score.selectedIndex = 1 + self._tex_score2.text = score + else + self._ct_score.selectedIndex = 0 + if not room:checkHpNonnegative() then + score = "+" .. score + end + self._tex_score.text = score + end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/chaozhou/EXRoomConfig.lua b/lua_probject/extend_project/extend/majiang/chaozhou/EXRoomConfig.lua new file mode 100644 index 00000000..bcd4dc58 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhou/EXRoomConfig.lua @@ -0,0 +1,840 @@ + + + +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.class = "RoomConfig" + self.config=config + self.must_hu=config["must_hu"] + self.mai_niao=config["mai_niao"] + self.mai_niao_opt=config["mai_niao_opt"] + self.round = config["times"] + self.Qidui = config["qidui"] + self.QiangGang = config["qiangkong"] + self.QiangGangNiao = config["qiangkong_niao"] + self.Zhama = config["niao_opt"] + local isOpenLaizi8=false + --if config["laizi"]==3 then + -- isOpenLaizi8=true + --end + self.Laizi = isOpenLaizi8 --是否是8个赖子 + self.LaiziType=config["laizi"] + self.NiaoType = config["niao"] + --self.Zhamatype= config["niao_opt"] + self.piao_niao = config["piao_niao"] + self.Jiangma = config["jiangma"] + self.isHidden = config.isHidden + + self.Qanggangquanbao=config["qianggang_type"] + self.Gangbaoquanbao=config["gangbao_type"] + self.Minggangkeqiang=config["qiangkong_ming"] + self.geng_zhuan=config["geng_zhuan"] + self.jiejiegao=config["jiejiegao"] + self.jiejiegao_first=config["jiejiegao_first"] + self.wuguijiabei=config["wuguijiabei"] + self.no_wan=config["no_wan"] + self.ma_gen_di_fen=config["ma_gen_di_fen"] + self.ma_gen_gong=config["ma_gen_gong"] + self.qidui_jiafan=config["qidui_jiafan"] + + + + return self +end + +function M:GetDes(sp) + sp = sp or " " + local count=0 + local str = self.round and self.round .. "局" .. " " or "" + str = str .. RoomConfig.GetDes(self, sp).."\n" + + if self.config["no_wan"] then + str = str .."无字" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["budaifeng"] then + str = str .."无风" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["geng_zhuan"] then + str = str .."跟庄一分" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["jiejiegao"] then + str = str .."连庄" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["huangzhuang_huanggang"] then + str = str .."留局算杠" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["gangbaoquanbao"] then + str = str .."吃杠杠爆全包" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["must_hu"] then + str = str .."必胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["da_hu_cheng"] then + str = str .."大胡相乘" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["qiangkong_2bei"] then + str = str .."抢杠胡两倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["dianpao"] then + str = str .."吃胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["xiaohu_bei"] then + str = str .."小胡(鸡胡1倍,其它两倍)" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["jihunotchihu"] then + str = str .."鸡胡不能吃胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["special_zimo"] then + str = str .."自摸(20分以上可以吃胡)" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + + if self.config["wuguijiabei"] then + str = str .."无鬼加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["laizi4_hu"] then + str = str .."四鬼胡牌" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["laizi4_hu_2bei"] then + str = str .."四鬼胡牌双倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["10bei_fengding"] then + str = str .."10倍封顶" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["qianggang_type"] then + str = str .."抢杠全包" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["10bei_bu_jifen"] then + str = str .."10倍不计分" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if (self.LaiziType==3) then + str = str .. "翻双鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.LaiziType==1 then + str = str .. "白板做鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.LaiziType==2 then + str = str .. "翻鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.LaiziType==4 then + str = str .. "红中做鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str .. "无鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["mai_niao"]==0 then + str = str .. "无买马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["mai_niao"]==1 then + if self.config["mai_niao_opt"]==1 then + str = str .. "买一马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["mai_niao_opt"]==2 then + str = str .. "买二马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["mai_niao_opt"]==3 then + str = str .. "罚一马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["mai_niao_opt"]==4 then + str = str .. "罚二马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + end + + if self.NiaoType==0 then + str = str .. "无奖马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.NiaoType==1 then + if self.Zhama==1 then + str = str .. "奖二马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.Zhama==2 then + str = str .. "奖五马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.Zhama==3 then + str = str .. "奖八马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.Zhama==4 then + str = str .. "抓马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + elseif self.NiaoType==2 then + local strMB="爆炸马加分" + if self.Zhama==1 then + strMB="爆炸马加倍" + end + str = str .. strMB + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.ma_gen_di_fen then + str = str .."马跟底分" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.ma_gen_gong then + str = str .."马跟杠" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + + +function M:GetDes2(sp) + sp = sp or " " + local str = RoomConfig.GetDes(self, sp) + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + + + if self.config["no_wan"] then + str = str .."无字" + str = str .. sp + end + + if self.config["budaifeng"] then + str = str .."无风" + str = str .. sp + end + + if self.config["geng_zhuan"] then + str = str .."跟庄1分" + str = str .. sp + end + + + if self.config["jiejiegao"] then + str = str .."连庄" + str = str .. sp + end + + if self.config["huangzhuang_huanggang"] then + str = str .."留局算杠" + str = str .. sp + end + + if self.config["gangbaoquanbao"] then + str = str .."吃杠杠爆全包" + str = str .. sp + end + + if self.config["must_hu"] then + str = str .."比胡" + str = str .. sp + end + + if self.config["da_hu_cheng"] then + str = str .."大胡相乘" + str = str .. sp + end + + if self.config["qiangkong_2bei"] then + str = str .."抢杠胡两倍" + str = str .. sp + end + + + if self.config["dianpao"] then + str = str .."吃胡" + str = str .. sp + end + + + if self.config["xiaohu_bei"] then + str = str .."小胡(鸡胡1倍,其它两倍)" + str = str .. sp + end + + + if self.config["jihunotchihu"] then + str = str .."鸡胡不能吃胡" + str = str .. sp + end + + if self.config["special_zimo"] then + str = str .."自摸(20分以上可以吃胡)" + str = str .. sp + end + + + + if self.config["wuguijiabei"] then + str = str .."无鬼加倍" + str = str .. sp + end + + if self.config["laizi4_hu"] then + str = str .."四鬼胡牌" + str = str .. sp + end + + if self.config["laizi4_hu_2bei"] then + str = str .."四鬼胡牌-双倍" + str = str .. sp + end + + if self.config["laizi4_hu_2bei"] then + str = str .."四鬼胡牌-双倍" + str = str .. sp + end + + if self.config["10bei_fengding"] then + str = str .."10倍封顶" + str = str .. sp + end + + if self.config["qianggang_type"] then + str = str .."抢杠全包" + str = str .. sp + end + + + if self.config["10bei_bu_jifen"] then + str = str .."10倍不计分" + str = str .. sp + end + + if (self.LaiziType==3) then + str = str .. "翻双鬼" + str = str .. sp + elseif self.LaiziType==1 then + str = str .. "白板做鬼" + str = str .. sp + elseif self.LaiziType==2 then + str = str .. "翻鬼" + str = str .. sp + elseif self.LaiziType==4 then + str = str .. "红中做鬼" + str = str .. sp + else + str = str .. "无鬼" + str = str .. sp + end + + + if self.config["mai_niao"]==0 then + str = str .. "无买马" + str = str .. sp + elseif self.config["mai_niao"]==1 then + if self.config["mai_niao_opt"]==1 then + str = str .. "买1马" + str = str .. sp + elseif self.config["mai_niao_opt"]==2 then + str = str .. "买2马" + str = str .. sp + elseif self.config["mai_niao_opt"]==3 then + str = str .. "罚1马" + str = str .. sp + elseif self.config["mai_niao_opt"]==4 then + str = str .. "罚2马" + str = str .. sp + end + end + + if self.NiaoType==0 then + str = str .. "无奖马" + str = str .. sp + elseif self.NiaoType==1 then + if self.Zhama==1 then + str = str .. "奖2马" + str = str .. sp + elseif self.Zhama==2 then + str = str .. "奖5马" + str = str .. sp + elseif self.Zhama==3 then + str = str .. "奖8马" + str = str .. sp + elseif self.Zhama==4 then + str = str .. "抓马" + str = str .. sp + end + elseif self.NiaoType==2 then + local strMB="爆炸马加分" + if self.Zhama==1 then + strMB="爆炸马加倍" + end + str = str .. strMB + str = str .. sp + end + + if self.ma_gen_di_fen then + str = str .."马跟底分" + str = str .. sp + end + + if self.ma_gen_gong then + str = str .."马跟杠" + str = str .. sp + end + + + + --if (self.piao_niao) then + -- str = str .. "飘鸟" .. sp + --end + + --[[if (self.NiaoType) then + if self.NiaoType == 1 then + str = str .. string.format("扎%d码", self.Zhama * 2) + elseif self.NiaoType == 2 then + str = str .. "一码全中" + elseif self.NiaoType == 3 then + str = str .. "窝窝鸟" .. sp .. (self.Zhama == 1 and "1鸟2分" or "1鸟1分") + end + str = str .. sp + + -- if self.NiaoType ~= 2 and self.Jiangma > 0 then + -- str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp + -- end + if self.Jiangma > 0 then + str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp + end + end--]] + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_MJ_ChaoZhou/gamerule") + return gamerulepanel +end + + +function M:GetGameSMSize() + return 467,500 +end + + +function M:GetGameName() + return "潮州麻将" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhou/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/chaozhou/ExtendConfig.lua new file mode 100644 index 00000000..eee70a45 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhou/ExtendConfig.lua @@ -0,0 +1,189 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import(".EXGameInfo") +local EXMainView = import(".EXMainView") +local EXGameController = import(".EXGameController") +local EXRoomConfig = import(".EXRoomConfig") +local EXPlayBackView =import(".EXPlayBackView") +local MJRoom = require("main.majiang.MJRoom") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = "ExtendConfig" + self.extend_id = 22 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/majiang/chaozhou/ui/Info_MJ_ChaoZhou") + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage("extend/majiang/chaozhou/ui/Extend_MJ_ChaoZhou") + ResourcesManager.UnLoadGroup("ChaoZhou_MJ") +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return MJRoom.new() +end + +function M:FillRoomConfig(room,_config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + + + local reload = s2croom["reload"] + local _tableInfo = s2croom["tableInfo"] + printlog("初始化房间数据====>>>") + pt(_tableInfo) + printlog(_tableInfo.laiziCard) + printlog(_tableInfo.laiziCard2) + printlog(_tableInfo.laiziCardBefore) + printlog(_tableInfo.laiziCard2Before) + + room.laiziInfo={} + if _tableInfo.laiziCardBefore>0 then + table.insert(room.laiziInfo,_tableInfo.laiziCard) + if _tableInfo.laiziCard2>0 then + table.insert(room.laiziInfo,_tableInfo.laiziCard2) + end + room.beforelaiziCardId=_tableInfo.laiziCardBefore + else + room.laiziInfo=nil + end + + local _config = _tableInfo["config"] + pt(_config) + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo["playerData"] + room.curren_round = _tableInfo["round"] + self:FillPlayerData(playerList) + + if (reload) then + local _reloadInfo = s2croom["reloadInfo"] + local _hand_card = _reloadInfo["hand_card"] + room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + + local active_seat = _reloadInfo["active_seat"] + local bank_seat = _reloadInfo["banker_seat"] + local playing = _reloadInfo["playing"] + local _info_list = _reloadInfo["info_list"] + local last_outcard_seat = _reloadInfo["last_outcard_seat"] + room.left_count = _reloadInfo["left_card"] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo["curren_outcard_seat"] + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i=1,#_info_list do + local tem = _info_list[i] + local playerid = tem["playerid"] + local p = room:GetPlayerById(playerid) + local outcard_list = tem["outcard_list"] + p.outcard_list = outcard_list + p.total_score = tem["score"] + p.hand_left_count = tem["card_count"] + p.piao_niao = tem["piao_niao"] or 0 + local opcard = tem["opcard"] + for k=1,#opcard do + local op = opcard[k] + local fz = {} + fz.type = op["type"] + fz.card = op["card"] + p.fz_list[#p.fz_list+1] = fz + end + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.left_count = _tableInfo["left_card"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + + local _info_list = _tableInfo["playerData"] + for i = 1,#_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + p.piao_niao = _jp["piao_niao"] + -- print(DataManager.SelfUser.account_id,pid) + -- if (278 == pid) then + -- room.self_player = p + -- p.self_user = DataManager.SelfUser + -- else + if p.seat == 1 then room.self_player = p end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.card_list = _hand_card + --room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + p.total_score = _jp["score"] + p.hand_left_count = #_hand_card + if _jp.hp_info then + room.room_config.isNonnegative = 1 + p.cur_hp = _jp.hp_info.cur_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhou/GameEvent.lua b/lua_probject/extend_project/extend/majiang/chaozhou/GameEvent.lua new file mode 100644 index 00000000..ca556bb5 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhou/GameEvent.lua @@ -0,0 +1,36 @@ + +local TX_GameEvent = { + -- 发牌 + SendCards = "SendCards", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + EventNiao = "EventNiao", + + EventMa = "EventMa", + + EvnetPiaoTip = "EvnetPiaoTip", + + EvnetPiao = "EvnetPiao", + + + --- + SendLaiZi="SendLaiZi" +} +return TX_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhou/MJPlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/majiang/chaozhou/MJPlayerSelfCardInfoView.lua new file mode 100644 index 00000000..51ef5dd2 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhou/MJPlayerSelfCardInfoView.lua @@ -0,0 +1,212 @@ +local MJPlayerSelfCardInfoView = require("main.majiang.MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local CardCheck = import(".CardCheck") + +local M = {} +-- +function M.new(view,mainView) + setmetatable(MJPlayerSelfCardInfoView, {__index = MJPlayerCardInfoView}) + setmetatable(M, {__index = MJPlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:ShowHuTip(card_list) + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + for i=1,#DataManager.CurrenRoom.laiziInfo do + if IsHasDictionary(DataManager.CurrenRoom.laiziInfo[i],tingList)==false then + table.insert(tingList,DataManager.CurrenRoom.laiziInfo[i] ) + end + end + end + + end + self._mainView._hu_tip:FillData(tingList) +end + +function M:UpdateHandCard(getcard, mp) + MJPlayerSelfCardInfoView.UpdateHandCard(self, getcard, mp) + local _carViewList = self._carViewList + + if DataManager.CurrenRoom.laiziInfo and #self._carViewList>0 then + for i=1,#self._carViewList do + local obj=self._carViewList[i] + if obj and obj.card then + if IsHasDictionary(obj.card_item,DataManager.CurrenRoom.laiziInfo) then + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=1 + end + + end + else + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=0 + end + end + end + + end + end + + + end + + + local card_list = DataManager.CurrenRoom.self_player.card_list + self:ShowHuTip(card_list) + if getcard then + self._out_card = true + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + -- 记录需要标记听牌提示的牌 + local lst_mark = {} + local total_num = 0 + for i = 1, #_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + list_remove(card_list, card) + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + local count = 0 + for j = 1, #tingList do + count = count + self._mainView:CountCardLeftNum(tingList[j]) + end + local tem = {} + tem.item = btn + tem.count = count + total_num = total_num + count + table.insert(lst_mark, tem) + end + table.insert(card_list, card) + end + table.sort(lst_mark, function(a, b) + return a.count > b.count + end) + -- 如果几张牌的可胡牌数一致,也只显示'三角',可胡牌数不一致才显示'多' + local all_same = #lst_mark ~= 0 and lst_mark[1].count == total_num / #lst_mark or false + for i = 1, #lst_mark do + local tem = lst_mark[i] + if all_same or tem.count < lst_mark[1].count then + tem.item:GetController("mark_ting").selectedIndex = 1 + else + tem.item:GetController("mark_ting").selectedIndex = 2 + end + end + else + for i = 1, #_carViewList do + local btn = _carViewList[i].card + if btn:GetController("mark_ting").selectedIndex ~= 0 then + btn:GetController("mark_ting").selectedIndex = 0 + end + end + self._out_card = false + end + +end + +function M:__OnClickHandCard(context) + local button = context.sender + local _carViewList = self._carViewList + local refresh = true + local card_list = {} + for i=1,#_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + if btn ~= button and btn.selected == true then + if button.data.card_item == card then + refresh = false + else + self._mainView:markOutCards(false, card) + end + btn.selected = false + end + if not btn.selected then + table.insert(card_list, card) + end + end + + if self._out_card then + self:ShowHuTip(card_list) + end + + -- 标记出牌 + if refresh then + if button.selected then + self._mainView:markOutCards(true, button.data.card_item) + else + self._mainView:markOutCards(false, button.data.card_item) + end + end + + local _room = DataManager.CurrenRoom + if not button.selected and _room.curren_outcard_seat == _room.self_player.seat then + local card = button.data + self._mainView:OutCard(card.card_item) + end +end + +function M:__OnDragStart(card) + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + list_remove(card_list, card) + self:ShowHuTip(card_list) +end + +function M:__OnDragEnd(context) + if self.outcard_button then + self.outcard_button:Dispose() + self.outcard_button = nil + end + local button = context.sender + + --button:RemoveFromParent() + local card = button.data + local _room = DataManager.CurrenRoom + + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + if (button.y - card.old_postion.y < -50 and _room.curren_outcard_seat == _room.self_player.seat and card.card_item ~= 0) then + self._mainView:OutCard(card.card_item) + button.touchable = false + self.outcard_button = button + else + self._area_handcard_list:AddChildAt(button, card.index) + button:TweenMove(card.old_postion, 0.2) + end +end + +function M:CheckPlayerOnlineState() + local room = DataManager.CurrenRoom + for i = 1, #room.player_list do + if room.player_list[i].line_state == 0 then + return false + end + end + return true +end +function M:Clear(bskip) + --self._ctr_state.selectedIndex = 0 + self._area_fz_list.x = self._src_fz_list.x + self._area_fz_list.y = self._src_fz_list.y + self._area_fz_list.width = self._src_fz_list.z + self._area_fz_list.height = self._src_fz_list.w + + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_outcard_list:RemoveChildren(0, -1, true) + if bskip == nil or bskip == false then + self._mask_liangpai:RemoveChildren(0, -1, true) + end + + for i=1,#self._carViewList do + self._carViewList[i].card:Dispose() + end + self._carViewList = {} + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhou/Protocol.lua b/lua_probject/extend_project/extend/majiang/chaozhou/Protocol.lua new file mode 100644 index 00000000..21de5e56 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhou/Protocol.lua @@ -0,0 +1,51 @@ +local Protocol = { + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌 + GAME_DIS_CARD = "611", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- 提示选择行为 + GAME_ACTION = "612", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 小结算 + GAME_EVT_RESULT1 = "817", + + -- 大结算 + GAME_EVT_RESULT2 = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + + -- 抓鸟事件 + GAME_EVT_NIAO = "821", + + --买马或罚马 + GAME_EVT_MAI_NIAO = "20822", + + -- 飘鸟提示 + GAME_EVT_PIAOTIP = "833", + + -- 飘鸟事件 + GAME_EVT_PIAO = "834", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhou/RecordEvent.lua b/lua_probject/extend_project/extend/majiang/chaozhou/RecordEvent.lua new file mode 100644 index 00000000..09748550 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhou/RecordEvent.lua @@ -0,0 +1,11 @@ +local Record_Event = { + Evt_GetCard = "GetCard", + Evt_OutCard = "OutCard", + Evt_Action = "Action", + Evt_Win = "Win", + Evt_Niao = "Niao", + Evt_Piao = "PiaoNiao", + Evt_Result = "Result", +} + +return Record_Event \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhougui/CS_Win_Type.lua b/lua_probject/extend_project/extend/majiang/chaozhougui/CS_Win_Type.lua new file mode 100644 index 00000000..39ea8560 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhougui/CS_Win_Type.lua @@ -0,0 +1,37 @@ +local CS_Win_Type = { + "鸡胡", + "平胡", + "七小对", + "豪华七小对", + "双豪华七小对", + "三豪华七小对", + "清一色", + "碰碰胡", + "杠上开花", + "杠上炮", + "抢杠胡", + "混一色", + "十三幺", + "天胡", + "地胡", + "人胡", + "十八罗汉", + "小三元", + "大三元", + "小四喜", + "大四喜", + "幺九", + "四鬼胡牌", + "全风", + "全求人", + "清幺九", + "字一色", + "无鬼翻倍", + "流局翻倍", + "海底捞月", + "门清", + "大胡", + +} +return CS_Win_Type + diff --git a/lua_probject/extend_project/extend/majiang/chaozhougui/CardCheck.lua b/lua_probject/extend_project/extend/majiang/chaozhougui/CardCheck.lua new file mode 100644 index 00000000..71dd7f8e --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhougui/CardCheck.lua @@ -0,0 +1,378 @@ +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + num = num == nil and 1 or num + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if(result ==num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local zhongid = 0 + + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + zhong_count = 0, + qidui = false, + hongzhong_count = 0, + qidui_pari_count = 0 +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + if (card == zhongid) then + self.zhong_count = self.zhong_count +1 + else + self.cardList[#self.cardList + 1] = card + end + end + table.sort(self.cardList) +end + +function M:tryShunzi(card) + if (card < 400 and card % 100 > 7) then + return false + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryKezi(card) + if (checkCardAndRomve(card, self.cardList, 3)) then + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (checkCardAndRomve(card, self.cardList, 2)) then + local cardGroup = {card,card} + self:push(cardGroup) + self.pair_count = 1 + return true + end + return false +end + + +function M:tryKezi1Zhong(card) + if (self.zhong_count >= 1 and checkCardAndRomve(card, self.cardList,2)) then + local cardGroup = {card,card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + return true + end + return false +end + +function M:tryKezi2Zhong(card) + if (self.zhong_count >= 2 and checkCardAndRomve(card, self.cardList,1)) then + local cardGroup = {card,zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + return true + end + return false +end + +function M:tryShunzi1Zhong(card) + if (card % 100 > 8) then + return false + end + + if (self.zhong_count < 1) then + return false + end + + if (checkCard(card + 1, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,card+1,zhongid} + self:push(cardGroup) + return true + end + + if (checkCard(card + 2, self.cardList) and ((card + 1) % 100 ~= 0)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 2, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,zhongid,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair1Zhong(card) + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 1) then + return false + end + removeCard(self.cardList, card, 1) + local cardGroup = {card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + self.pair_count = 1 + return true +end + +function M:tryPair2Zhong() + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 2) then + return false + end + local cardGroup = {zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + self.pair_count = 1 + return true +end + +function M:tryWin() + if (self.zhong_count == 4 and not self.eight_laizi) or (self.zhong_count == 8 and self.eight_laizi) then + return true + end + if (#self.cardList == 0 and self.pair_count == 1) then + return true + end + if (#self.cardList == 0 and self.pair_count == 0) then + return self:tryPair2Zhong() + end + + if (#self.cardList == 0) then + return false + end + + local activeCard = self.cardList[1] + if (self:tryPair(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + + if (self:tryKezi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi2Zhong(activeCard)) then + + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryPair1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + return false +end + +function M:checkQidui() + if (not self.qidui) then + return false + end + if ((#self.cardList + self.zhong_count) ~= 14) then + return false + end + local cardList = membe_clone(self.cardList) + self.qidui_pari_count = 0 + self.hongzhong_count = self.zhong_count + return self:isQdPari(cardList) +end + +function M:isQdPari(cardList) + if(self.qidui_pari_count == 7) then + return true + end + if (#cardList== 0) then + return true + end + local card = cardList[1] + if (cardNum(card, cardList) >= 2) then + removeCard(cardList, card, 2) + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + + if (self.hongzhong_count > 0) then + removeCard(cardList, card, 1) + self.hongzhong_count = self.hongzhong_count - 1 + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + return false +end + +local function init(self,cardInhand,addCard,isZhong,qidui,eightLaizi) + self.stack = {} + self.pair_count = 0 + self.cardList = membe_clone(cardInhand) + self.qidui = qidui + self.eight_laizi = eightLaizi + self.cardList[#self.cardList+1] = addCard + if (isZhong) then + self.zhong_count = cardNum(zhongid, self.cardList) + removeCard(self.cardList, zhongid, self.zhong_count) + end + table.sort(self.cardList) + --printlog("添加排序====>>>") + --pt(self.cardList) + return self:checkQidui() or self:tryWin() +end + +local specialCardList={400,403,406,409,412,415,418} +function M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + --printlog("isZhong",isZhong) + --printlog("qidui",qidui) + --printlog("eightLaizi",eightLaizi) + --pt(cardInhand) + local self = setmetatable({}, {__index = M}) + local tingList = {} + if not cardInhand or #cardInhand == 0 then + return tingList + end + for k=100,300,100 do + for i=1,9 do + local tem = k + i + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + --printlog("返回结果为===>>>",result) + if(result) then + tingList[#tingList + 1] = tem + end + end + end + + for j=1,#specialCardList do + local tem = specialCardList[j] + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + if(result) then + tingList[#tingList + 1] = tem + end + end + + return tingList +end + +function M.MuiltiplteCaculateTingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + zhongid=DataManager.CurrenRoom.laiziInfo[1] + local tempTingList2={} + local tempTingList1=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo[2] then + zhongid=DataManager.CurrenRoom.laiziInfo[2] + tempTingList2=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + zhongid=DataManager.CurrenRoom.laiziInfo[1] + end + local currentTingList={} + if #tempTingList1>0 and #tempTingList2>0 then + currentTingList=CombineDictionaryAndRemoveSomeItem(tempTingList1,tempTingList2) + elseif #tempTingList1>0 then + currentTingList=tempTingList1 + elseif #tempTingList2>0 then + currentTingList=tempTingList2 + end + + return currentTingList + + else + zhongid=0 + return M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + end + +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhougui/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/chaozhougui/EXClearingView.lua new file mode 100644 index 00000000..7ec75dd7 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhougui/EXClearingView.lua @@ -0,0 +1,635 @@ +require("Game.View.ResultView") +local Hu_Type_Name = import(".CS_Win_Type") + +local EXClearingView = {} + +local M = EXClearingView + +function EXClearingView.new(blur_view) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self._full = true + ResultView.init(self, "ui://Main_Majiang/clearing") + + self._currenIndex = 0 + self._blur_view = blur_view + self._close_zone = false + self:InitMaPai() + + return self +end + +function M:InitMaPai() + self.maPaiCtr=self._view:GetController("mapai") + self.maPaiCtr.selectedIndex=0 + + self.maPaiList={} + + for i=1,8 do + local tempMP=self._view:GetChild("niao"..i) + table.insert(self.maPaiList,tempMP) + end + +end + + +function M:IsMapaiShow(niao,isShow) + if niao then + niao.visible=isShow + end +end + + +function M:SetMaPaiValue(niao,value) + if niao then + niao.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..value + end +end + +function M:SetMaPaiColor(niao,num) + niao:GetController("color").selectedIndex=num +end + +function M:HideAllMapai() + for i=1,#self.maPaiList do + self:IsMapaiShow(self.maPaiList[i],false) + self:SetMaPaiColor(self.maPaiList[i],0) + end +end + + + +function M:ShowSelectMaPai(niaoList) + if niaoList and #niaoList>0 then + self.maPaiCtr.selectedIndex=1 + self:HideAllMapai() + for i=1,#niaoList do + self:IsMapaiShow(self.maPaiList[i],true) + self:SetMaPaiValue(self.maPaiList[i],niaoList[i].card) + if niaoList[i].score>0 then + self:SetMaPaiColor(self.maPaiList[i],2) + end + end + else + self.maPaiCtr.selectedIndex=0 + end +end + + + +function M:CalculatePaixingInfo(result) + self.WinList={} + if result.info_list and #result.info_list>0 then + for i=1,#result.info_list do + if result.info_list[i].win_list and #result.info_list[i].win_list>0 then + table.insert(self.WinList,result.info_list[i].win_list) + end + end + end + + printlog("牌型列表====>>>") + pt(self.WinList) +end + + +function M:SetPaixingxiangqing(num) + for i=1,#self.PaiXingXiangQingCtrList do + if self.PaiXingXiangQingCtrList[i] then + self.PaiXingXiangQingCtrList[i].selectedIndex=num + end + end +end + + + +function M:InitData(over, room, result, total_result, callback) + self._callback = callback + local _overCtr = self._view:GetController("over") + local btn_confirm = self._view:GetChild("btn_confirm") + local btn_result = self._view:GetChild("btn_showResult") + local btn_close = self._view:GetChild("big_result"):GetChild("btn_close") + local _btnCtr = self._view:GetController("button") + local _sdkCtr = self._view:GetController("sdk") + local ctr_type = self._view:GetController("type") + self._view:GetChild("tex_roominfo").text = string.format("房号%s 局%s/%s %s", room.room_id, room.curren_round, room.room_config.round, os.date("%Y-%m-%d %H:%M:%S", os.time())) + self._view:GetChild("tex_gameinfo").text = string.gsub(room.room_config:GetDes2(), "\r", "") + + if result then + self:ShowSelectMaPai(result.niao) + self:CalculatePaixingInfo(result) + end + + + self.PaiXingXiangQingCtrList={} + + local paixingxiangqing=self._view:GetChild("btn_detal") + local fanhuipaixing=self._view:GetChild("btn_fanhuipaixing") + fanhuipaixing.visible=false + paixingxiangqing.visible=true + paixingxiangqing.onClick:Add(function() + paixingxiangqing.visible=false + fanhuipaixing.visible=true + self:SetPaixingxiangqing(1) + end) + fanhuipaixing.onClick:Add(function() + paixingxiangqing.visible=true + fanhuipaixing.visible=false + self:SetPaixingxiangqing(0) + end) + + + if over ~= 2 then + if result.liuju then + ctr_type.selectedIndex = 3 + else + local info_list = result.info_list + for i = 1, #info_list do + local is_win = info_list[i].is_win + if is_win then + if info_list[i].seat == room.self_player.seat then + ctr_type.selectedIndex = 1 + else + ctr_type.selectedIndex = 2 + end + end + end + end + if over == 0 then + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + btn_confirm.onClick:Add(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:DestroyWithCallback() + end) + self:AddClearItem(room, result.info_list, nil, over, result.niao, result.active_player) + elseif over == 1 then + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add(function() + self.maPaiCtr.selectedIndex=0 + _overCtr.selectedIndex = 1 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + if self._qsinfo_view then + self._qsinfo_view:Dispose() + end + end) + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + self:AddClearItem(room, result.info_list, total_result.info_list, over, result.niao, result.active_player) + end + else + _overCtr.selectedIndex = 1 + self.maPaiCtr.selectedIndex=0 + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + self:AddClearItem(room, nil, total_result.info_list, over) + end +end + +function M:AddClearItem(room, data, total_data,over, niao, active_player) + local n = over + 1 + local list_view1 = self._view:GetChild("player_list_1") + local list_view2 = self._view:GetChild("player_list_2") + if 0 == over or 1 == over then + table.sort(data, function(a,b) return a.seat < b.seat end) + list_view1:RemoveChildrenToPool() + for i=1,#data do + local item = list_view1:AddItemFromPool() + self:FillItemData(room, data[i], item, active_player, niao) + end + if #data == 3 then + list_view1.lineGap = 54 + elseif #data == 2 then + list_view1.lineGap = 108 + end + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end +end + +function M:FillItemData(room, data, item, active_player, niao) + local _gamectr = ControllerManager.GetController(GameController) + local p = room:GetPlayerBySeat(data["seat"]) + item:GetChild("playerName").text = p.self_user.nick_name + item:GetChild("lab_hp").text="抓马" + local user = room:GetPlayerBySeat(data["seat"]).self_user + local head = item:GetChild('head'):GetChild('n4') + ImageLoad.Load(user.head_url, head) + + -- 手牌 + local hand_cards = data["hand_card"] + table.sort( hand_cards, ViewUtil.HandCardSort) + local hand_list_view = item:GetChild("hand_card_list") + hand_list_view:RemoveChildrenToPool() + for i=1,#hand_cards do + local card = hand_list_view:AddItemFromPool() + card.icon = "ui://Main_Majiang/202_"..hand_cards[i] + end + hand_list_view.width = 52 * #hand_cards + + local fz_card = p.fz_list + local fz_card_list = item:GetChild("fz_card_list") + fz_card_list.width = 157 * #fz_card * 0.8 + fz_card_list:RemoveChildrenToPool() + for i=1,#fz_card do + if fz_card[i].type == FZType.Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j=1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + elseif fz_card[i].type == FZType.Gang or fz_card[i].type == FZType.Gang_An or fz_card[i].type == FZType.Gang_Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_4") + for j=1,4 do + local card = item:GetChild("card_" .. j) + if fz_card[i].type == FZType.Gang_An and j == 4 then + card.icon = "ui://Main_Majiang/202_00" + else + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + end + end + end + + local huadd = data["hu_score"] + local gangadd = data["gang_score"] + local birdadd = data["niao_score"] + local total = data["round_score"] + local geng_zhuan=data["geng_zhuan"] + local sp = " " + local str = "胡:"..huadd.."分" + str = str..sp.."杠:"..gangadd.."分" + str = str..sp.."中马:"..birdadd.."分" + + if data["mai_niao_score"] and data["mai_niao_score"]~=0 then + str = str..sp.."买马:"..data["mai_niao_score"].."分" + end + + if data["ma_geng_gong"] and data["ma_geng_gong"]~=0 then + str = str..sp.."马跟杠:"..data["ma_geng_gong"].."分" + end + + if geng_zhuan and geng_zhuan~=0 then + str = str..sp.."跟庄:"..geng_zhuan.."分" + end + + if data["repeat_win"] and data["repeat_win"]~=0 then + str = str..sp.."连庄x"..data["repeat_win"] + end + + + + + + item:GetChild("score1").text = str + -- local total_score = data["total_score"] + if total >= 0 then + item:GetChild("score2").text = "+"..total + item:GetChild("score2").grayed = false + else + item:GetChild("score2").text = total + item:GetChild("score2").grayed = true + end + + + --计算牌型 + local totalPeson=DataManager.CurrenRoom.room_config.people_num-1 + local win_list = data["win_list"] + local is_win = data["is_win"] or false + local str1="" + sp="、" + if is_win then + if win_list then + if DataManager.CurrenRoom.isZiMoHu then + str1="自摸" + else + str1="接炮" + end + for i=1,#win_list do + local huName=Hu_Type_Name[win_list[i].type] + if huName then + str1=str1..sp..huName.."x"..win_list[i].score + end + + end + str1=str1.." +"..huadd.."分" + end + + else + printlog("输家============") + if DataManager.CurrenRoom.isZiMoHu then + printlog("自摸处理============") + --str1="" + if #self.WinList==1 then + for i=1,#self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + if j==1 then + str1=str1..huName.."x"..self.WinList[i][j].score + else + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + + end + end + + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + else + printlog("非自摸处理====>>>") + --点炮 一炮多响 + local yipaoduoxiang=false + if #self.WinList>1 then + yipaoduoxiang=true + end + + if yipaoduoxiang then + printlog("一炮多响====>>>") + str="点炮" + local allTypeList={} + local isHas=false + for i=1,#self.WinList do + for j=1,#self.WinList[i] do + isHas=IsHasDictionary(self.WinList[i][j].type,allTypeList) + if isHas==false then + table.insert(allTypeList,self.WinList[i][j].type) + end + end + + end + + if #allTypeList>0 then + for i=1,#allTypeList do + local huName=Hu_Type_Name[allTypeList[i]] + if huName then + str1=str1..huName.."、" + end + end + str1=str1.." "..huadd.."分" + end + + else + + if p.self_user.account_id == active_player and is_win == false and not data["liuju"] then + str1="点炮" + if #self.WinList==1 then + for i=1,# self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + end + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + end + + end + + + end + end + + -- + printlog("牌型计算==>>>",str1) + + if data["ming_gang_num"]>0 then + str1=str1.." 明杠x"..data["ming_gang_num"] + end + + if data["an_gang_num"]>0 then + str1=str1.." 暗杠x"..data["an_gang_num"] + end + + if data["dian_gang_num"]>0 then + str1=str1.." 点杠x"..data["dian_gang_num"] + end + + if gangadd~=0 then + if gangadd>0 then + str1=str1.." +"..gangadd.."分" + else + str1=str1.." "..gangadd.."分" + end + + end + + if birdadd~=0 then + if birdadd>0 then + str1=str1.." 中马分数+"..birdadd.."分" + else + str1=str1.." 中马分数"..birdadd.."分" + end + + end + + + if data["mai_niao_score"] and data["mai_niao_score"]~=0 then + if data["mai_niao_score"]>0 then + str = str..sp.."买马/罚马分数:+"..data["mai_niao_score"].."分" + else + str = str..sp.."买马/罚马分数:"..data["mai_niao_score"].."分" + end + + end + + + if data["ma_geng_gong"] and data["ma_geng_gong"]~=0 then + if data["ma_geng_gong"]>0 then + str1 = str1.." 马跟杠:+"..data["ma_geng_gong"].."分" + else + str1 = str1.." 马跟杠:"..data["ma_geng_gong"].."分" + end + + end + + + if data["ma_gen_di_fen"] and data["ma_gen_di_fen"]~=0 then + if data["ma_gen_di_fen"]>0 then + str1 = str1.." 马跟底分:+"..data["ma_gen_di_fen"].."分" + else + str1 = str1.." 马跟底分:"..data["ma_gen_di_fen"].."分" + end + + end + + if geng_zhuan and geng_zhuan~=0 then + if geng_zhuan>0 then + str1 = str1.." 跟庄:+"..geng_zhuan.."分" + else + str1 = str1.." 跟庄:"..geng_zhuan.."分" + end + + end + + + + + + item:GetChild("score3").text=str1 + local paixingCtr=item:GetController("detail") + table.insert(self.PaiXingXiangQingCtrList,paixingCtr) + ------------------------- + + local hp_nonnegative = room:checkHpNonnegative() + item:GetController("nonnegative").selectedIndex = hp_nonnegative and 1 or 0 + if hp_nonnegative then + local hp_info = data.hp_info + local ctr_hp_limit = item:GetController("hp_limit") + local hp = d2ad(hp_info.round_actual_hp) + if hp >= 0 then hp = "+" .. tostring(hp) end + item:GetChild("tex_hp").text = hp + ctr_hp_limit.selectedIndex = hp_info.upper_limit and 1 or 0 + end + + + item:GetController("win").selectedIndex = is_win and 0 or 1 + if p.self_user.account_id == active_player and is_win == false and total < 0 then + item:GetController("win").selectedIndex = 2 + end + + if is_win then + item:GetController("bg").selectedIndex=1 + else + item:GetController("bg").selectedIndex=0 + end + local win_card = item:GetChild("win_card") + win_card.icon = "ui://Main_Majiang/202_"..data["win_card"] + + if niao and #niao>0 then + local currentNiaoList=self:CalculateNiao(niao ,data["seat"]) + if currentNiaoList and #currentNiaoList>0 then + local lst_niao = item:GetChild("list_niao") + lst_niao:RemoveChildrenToPool() + for i = 1, #currentNiaoList do + if currentNiaoList[i].score > 0 then + local card_niao = lst_niao:AddItemFromPool() + card_niao.icon = "ui://Main_Majiang/202_" .. currentNiaoList[i].card + end + end + end + end + + + if p.seat == room.banker_seat then + item:GetController("bank").selectedIndex = 1 + end +end + +function M:CalculateNiao(niaoList,seat) + local tempNiao={} + for i=1,#niaoList do + if niaoList[i].seat==seat then + table.insert(tempNiao,niaoList[i]) + end + end + return tempNiao +end + + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + player_list[i].id = user.account_id + player_list[i].hp_info = data[i].hp_info + player_list[i].score = data[i].total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + + local settle_log = data[i].settle_log + player_list[i].param = {} + player_list[i].param[1]={} + player_list[i].param[1].key = "自摸次数:" + player_list[i].param[1].value = tostring(data[i].settle_log.zimo) + player_list[i].param[2]={} + player_list[i].param[2].key = "接炮次数:" + player_list[i].param[2].value = tostring(data[i].settle_log.jie_pao) + player_list[i].param[3]={} + player_list[i].param[3].key = "点炮次数:" + player_list[i].param[3].value = tostring(data[i].settle_log.dian_pao) + player_list[i].param[4]={} + player_list[i].param[4].key = "暗杠次数:" + player_list[i].param[4].value = tostring(data[i].settle_log.an_kong) + player_list[i].param[5]={} + player_list[i].param[5].key = "明杠次数:" + player_list[i].param[5].value = tostring(data[i].settle_log.ming_kong) + end + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + local big_result = self._view:GetChild("big_result") + big_result:GetChild("txt_room_info").text = string.format("%s 房号%s 局%s/%s", os.date("%Y/%m/%d", os.time()), room.room_id, room.curren_round, room.room_config.round) + local lst_p = big_result:GetChild("player_list") + if #player_list == 3 then + lst_p.columnGap = 108 + elseif #player_list == 2 then + lst_p.columnGap = 208 + end + self:InitBigResult(room, 30) + local show_detail = room.hpOnOff == 1 + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + com_p:GetController("jsicon").selectedIndex=i-1 + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + if show_detail then + local score = 0 + if com_p:GetController("pn").selectedIndex == 0 then + score = com_p:GetChild("txt_navigate").text + else + score = com_p:GetChild("txt_positive").text + end + score = score / room.score_times + com_p:GetChild("tex_detail_score").text = string.format("%s × %s倍", score, room.score_times) + end + end + if room.group_id ~= 0 then + big_result:GetController("group").selectedIndex = 1 + end + DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild("btn_head") + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= "" then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end + +function M:DestroyWithCallback() + if self._callback then + self._callback() + end + self:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhougui/EXGameController.lua b/lua_probject/extend_project/extend/majiang/chaozhougui/EXGameController.lua new file mode 100644 index 00000000..420e67c0 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhougui/EXGameController.lua @@ -0,0 +1,410 @@ +local TX_Protocol = import(".Protocol") +local FZTipList = require("main.majiang.FZData") +local TX_GameEvent = import(".GameEvent") + +local M = {} + +--- Create a new GameController +function M.new() + setmetatable(M,{__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("测试麻将") + self.class = "TX_GameController" + return self +end + +function M:init(name) + GameController.init(self,name) + + self._eventmap[TX_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[TX_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[TX_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[TX_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[TX_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[TX_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + self._eventmap[TX_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[TX_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[TX_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[TX_Protocol.GAME_EVT_RESULT2] = self.OnEventResult2 + self._eventmap[TX_Protocol.GAME_EVT_NIAO] = self.OnEventNiao + self._eventmap[TX_Protocol.GAME_EVT_MAI_NIAO] = self.OnEventMa + + self._eventmap[TX_Protocol.GAME_EVT_PIAOTIP] = self.OnEventPiaoTip + self._eventmap[TX_Protocol.GAME_EVT_PIAO] = self.OnEventPiao +end + +local __pre_delete_card = false +-- 发送出牌指令到服务器 +function M:SendOutCard(card, callback) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_DIS_CARD, _data) + + -- 进行预删牌处理 + local p = _room.self_player + _room.curren_outcard_seat = -1 + list_remove(p.card_list,card) + table.sort(p.card_list, ViewUtil.HandCardSort) + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + __pre_delete_card = true + callback() +end + + +-- 发送放子选择到服务器 +function M:SendAction(id) + local _data = {} + _data["id"] = id + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_ACTION, _data) +end + +function M:OnEventSendCards(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + if not _room.room_config.piao_niao or _room.self_player.entrust then + _room.curren_round = _room.curren_round + 1 + end + if _room.curren_round > 0 then _room.playing = true end + + printlog("开始发牌===========>>>") + pt(evt_data) + + local room = DataManager.CurrenRoom + --printlog(evt_data.laiziCard) + --printlog(evt_data.laiziCard2) + --printlog(evt_data.laiziCardBefore) + --printlog(evt_data.laiziCard2Before) + + room.laiziInfo={} + if evt_data.laiziCardBefore>0 then + table.insert(room.laiziInfo,evt_data.laiziCard) + if evt_data.laiziCard2>0 then + table.insert(room.laiziInfo,evt_data.laiziCard2) + end + else + room.laiziInfo=nil + end + + if evt_data.laiziCardBefore>0 then + DispatchEvent(self._dispatcher,TX_GameEvent.SendLaiZi,evt_data.laiziCardBefore,evt_data.laiziCard,evt_data.laiziCard2,true ) + end + + + + + -- _room.SelfPlayer.AutoOutCard = false + local handcards = evt_data["card_list"] + local p = _room.self_player + local seat = evt_data["bank_seat"] + self._cacheEvent:Enqueue(function() + _room.banker_seat = seat + for i=1,#_room.player_list do + _room.player_list[i].hand_left_count = 13 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + end + p.card_list = handcards + self._room.self_player.hand_left_count = #handcards + table.sort( handcards, ViewUtil.HandCardSort ) + DispatchEvent(self._dispatcher,TX_GameEvent.SendCards, p) + end) +end + +function M:OnEventOutCard(evt_data) + printlog("出牌事件===========>>>") + pt(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local ting_list = nil + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + _room.last_outcard_seat = seat + if seat == _room.self_player.seat and __pre_delete_card then + __pre_delete_card = false + else + if seat == _room.self_player.seat then + list_remove(p.card_list, card) + table.sort(p.card_list, ViewUtil.HandCardSort) + end + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + DispatchEvent(self._dispatcher,TX_GameEvent.OutCard, p, card) + end + end) +end + + +function M:OnEventTakeCard(evt_data) + printlog("抓牌===========>>>") + pt(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + p.hand_left_count = p.hand_left_count +1 + if (seat == _room.self_player.seat) then + _room.self_player.card_list[#_room.self_player.card_list+1] = card + -- table.sort( _room.self_player.card_list, ViewUtil.HandCardSort ) + end + DispatchEvent(self._dispatcher,TX_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnEventOutHint(evt_data) + printlog("出牌提示事件===========>>>") + pt(evt_data) + self._cacheEvent:Enqueue(function() + self._room.curren_outcard_seat = self._room.self_player.seat + DispatchEvent(self._dispatcher,TX_GameEvent.OutHint) + end) +end + +function M:OnEventTurn(evt_data) + printlog("转轮指向===========>>>") + pt(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + -- self._room.curren_outcard_seat = seat + DispatchEvent(self._dispatcher,TX_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + printlog("放子提示事件===========>>>") + pt(evt_data) + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + local weight = evt_data["weight"] + for i=1,#list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + -- if (dtip["opcard"]) then + -- local opcard = dtip["opcard"] + -- tip.OpCard = opcard + -- tip.OpCard[3] = tip.Card + -- table.sort(tip.OpCard) + -- end + tiplist:AddTip(tip) + end + DispatchEvent(self._dispatcher,TX_GameEvent.FZTips, tiplist, weight) + end) +end + +function M:OnEventFzAction(evt_data) + printlog("吃杠碰行为事件===========>>>") + pt(evt_data) + local _room = self._room + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local type = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + -- local openkong = evt_data["openkong"] + + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local fz = nil + local index = -1 + local ftype = type + if (ftype == FZType.Gang_Peng) then + for i=1,#p.fz_list do + if (p.fz_list[i].card == card) then + p.fz_list[i].card = card + fz = p.fz_list[i] + fz.type = type + index = i -1 + break + end + end + end + if (index == -1) then + fz = {} + fz.card = card + fz.type = type + fz.active_card = actice_card + p.fz_list[#p.fz_list+1] = fz + end + fz.from_seat = from_seat + local remove_num = #opcard + + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(p.card_list,opcard[i]) + end + end + + p.hand_left_count = p.hand_left_count - remove_num + if from_seat ~= p.seat then + -- if (fz.Type == FZType.Chi) then card = actice_card end + local fp = _room:GetPlayerBySeat(from_seat) + table.remove(fp.outcard_list,#fp.outcard_list) + end + + DispatchEvent(self._dispatcher,TX_GameEvent.FangziAction, fz, p, index) + end) +end + +function M:OnEventHu(evt_data) + printlog("胡牌===========>>>") + pt(evt_data) + + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local win_card = evt_data["win_card"] + local win_list = evt_data["win_list"] + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + table.sort( win_p.card_list, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher,TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], win_card, cards, win_list) + end) + + --[[local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local hu_card = evt_data["win_card"] + table.sort(cards, ViewUtil.HandCardSort) + cards[#cards +1] = hu_card + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + DispatchEvent(self._dispatcher,TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], cards, hu_card) + end)--]] +end + +function M:OneventResult1(evt_data) + printlog("小结算===========>>>") + pt(evt_data) + local over = evt_data.type + --0:小结算 1:小大结算 2:大结算 + self._room._reload_flag = false + self._room.playing = false + if 0 == over then + local result = evt_data.result + self._cacheEvent:Enqueue(function() + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil,true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +-- function M:OnEventResult2(evt_data) +-- DataManager.CurrenRoom.Over = true +-- ControllerManager.SetGameNetClient(nil,true) + -- local info_list = evt_data["info_list"] + -- if self._result ~= nil then + -- self._cacheEvent:Enqueue(function() + -- self:OneventResult1(self._result) + -- self._result = nil + -- end) + -- end +-- self._cacheEvent:Enqueue(function() +-- DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, info_list) +-- ControllerManager.ChangeController(LoddyController) +-- end) +-- end + +function M:OnEventNiao(evt_data) + printlog("抓鸟事件====>>>") + pt(evt_data) + local list = evt_data["niao"] + local start_seat = evt_data["start_seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EventNiao, list, start_seat) + end) +end + + +function M:OnEventMa(evt_data) + printlog("买马或罚马事件====>>>") + pt(evt_data) + local list = evt_data["mai_niao"] + local start_seat = evt_data["start_seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EventMa, list, start_seat) + end) +end + + + +function M:OnEventPiaoTip() + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + self._cacheEvent:Enqueue(function() + if not self._room._reload_flag then + self._room.curren_round = self._room.curren_round + 1 + end + self._room.playing = true + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiaoTip, evt_data) + end) +end + +function M:OnEventPiao(evt_data) + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiao, evt_data.seat, evt_data.num) + end) +end + +function M:GetPosString( seat ) + if DataManager.CurrenRoom.room_config.people_num ~= 4 then return"" end + if seat == 1 then + return "北" + elseif seat == 2 then + return "西" + elseif seat == 3 then + return "南" + elseif seat == 4 then + return "东" + end +end + +function M:Discard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + -- list_remove(_room.SelfPlayer.Cards,card) + -- table.sort(_room.SelfPlayer.Cards) + _client:send(Protocol.Game_Da, _data) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhougui/EXGameInfo.lua b/lua_probject/extend_project/extend/majiang/chaozhougui/EXGameInfo.lua new file mode 100644 index 00000000..581e7eac --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhougui/EXGameInfo.lua @@ -0,0 +1,229 @@ +local EXGameInfo = {} + +local M = EXGameInfo + + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/majiang/chaozhougui/ui/Info_MJ_ChaoZhouGui") + return self +end + +function M:FillData() + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 3 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_ChaoZhouGui/Cgm_create_room") +end + +local _help_url= "ui://Info_MJ_ChaoZhouGui/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_MJ_ChaoZhouGui/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_MJ_ChaoZhouGui/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list ={} --{"四人潮鬼","三人潮鬼","二人潮鬼"} +function M:GetPlayList() + return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + 1 + local people = _config:GetController("play_list").selectedIndex+2 + + local laizi=_config:GetController("GuiType").selectedIndex + if laizi==3 then + laizi=4 + end + + local wuguijiabei=false + if laizi>0 then + wuguijiabei=_config:GetChild("btn_wuguijiabei").selected and true or false + end + + local laizi4_hu=_config:GetChild("btn_siguihupai").selected and true or false + local laizi4_hu_2bei=false + if laizi4_hu then + laizi4_hu_2bei=_config:GetChild("btn_siguihupaishuangbei").selected and true or false + end + + local zhama=_config:GetController("zhama").selectedIndex + local niao=0 + local niao_opt=0 + local magengdifen=false + local magenggang=false + if zhama>0 and zhama<5 then + niao=1 + niao_opt=zhama + magengdifen=_config:GetChild("btn_magengdi").selected and true or false + magenggang=_config:GetChild("btn_magenggang1").selected and true or false + --elseif zhama==4 then + -- niao=3 + --local baozhama=_config:GetController("baozhama").selectedIndex + -- niao_opt=0 + end + + + --[[local jiangma=_config:GetController("jiangma").selectedIndex + local mai_niao=0 + local mai_niao_opt=0 + if jiangma>0 and jiangma <5 then + mai_niao=1 + mai_niao_opt=jiangma + --magengdifen=_config:GetChild("btn_magengdifen").selected and true or false + magenggang=_config:GetChild("btn_magenggang1").selected and true or false + end--]] + + local no_wan=_config:GetChild("btn_wuzi").selected and true or false + local budaifeng=_config:GetChild("btn_wufeng").selected and true or false + local geng_zhuan=_config:GetChild("btn_fengzhuang").selected and true or false + local lian_zhuang=_config:GetChild("btn_lianzhuang").selected and true or false + local huangzhuang_huanggang=_config:GetChild("btn_liujusuangang").selected and true or false + local gangbaoquanbao=_config:GetChild("btn_chigang").selected and true or false + local must_hu=_config:GetChild("btn_bihu").selected and true or false + --local da_hu_cheng=_config:GetChild("btn_dahuxiangcheng").selected and true or false + local qiangganghu=_config:GetChild("btn_qiangganghu").selected and true or false + + local dianpao=_config:GetChild("btn_chihu").selected and true or false + local xiaohu_bei=false + local jihunotchihu=false + if dianpao then + xiaohu_bei=_config:GetChild("btn_xiaohu").selected and true or false + jihunotchihu=_config:GetChild("btn_jihubuchihu").selected and true or false + end + + local special_zimo=_config:GetChild("btn_zimo").selected and true or false + local bujifen=false + if special_zimo then + bujifen=_config:GetChild("btn_shibeibujifen").selected and true or false + end + + ------ + local _data = {} + _data["opt"] = round + _data["maxPlayers"] = people + + _data["laizi"] = laizi + _data["wuguijiabei"] = wuguijiabei + _data["laizi4_hu"] = laizi4_hu + _data["laizi4_hu_2bei"] = laizi4_hu_2bei + + _data["niao"] = niao + _data["niao_opt"] = niao_opt + _data["ma_gen_di_fen"] = magengdifen + _data["ma_gen_gong"] = magenggang + --_data["mai_niao"] = mai_niao + -- _data["mai_niao_opt"] = mai_niao_opt + + _data["dianpao"] = dianpao + _data["xiaohu_bei"] = xiaohu_bei + _data["jihunotchihu"] = jihunotchihu + + _data["special_zimo"] = special_zimo + _data["10bei_bu_jifen"] = bujifen + + + _data["no_wan"] = no_wan + _data["wu_feng"] = budaifeng + _data["geng_zhuan"] = geng_zhuan + _data["lian_zhuang"] = lian_zhuang + _data["huangzhuang_huanggang"] = not huangzhuang_huanggang + _data["gangbao_type"] = gangbaoquanbao + _data["zi_dong_hu"] = must_hu + --_data["da_hu_cheng"] = da_hu_cheng + _data["qiangkong_2bei"] = qiangganghu + + + + + printlog("上传房间配置==========>>>") + pt(_data) + + return _data +end + +function M:LoadConfigData(data) + --printlog("加载房间配置=========>>>") + --pt(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt -1 + _config:GetController("play_list").selectedIndex = data.maxPlayers-2 + + if data.laizi==4 then + data.laizi=3 + end + _config:GetController("GuiType").selectedIndex = data.laizi + + _config:GetChild("btn_wuguijiabei").selected =data.wuguijiabei + + _config:GetChild("btn_siguihupai").selected =data.laizi4_hu + + _config:GetChild("btn_siguihupaishuangbei").selected=data.laizi4_hu_2bei + + + --_config:GetChild("btn_magengdifen").selected = false + --_config:GetChild("btn_magenggang").selected = false + + local GuiTypeValue=0 + if data.niao ==0 then + GuiTypeValue=0 + elseif data.niao ==1 then + GuiTypeValue=data.niao_opt + --_config:GetChild("btn_magengdifen").selected = data.ma_gen_di_fen + --_config:GetChild("btn_magenggang").selected = data.ma_gen_gong + elseif data.niao ==3 then + GuiTypeValue=4 + --_config:GetController("baozhama").selectedIndex = data.niao_opt + end + + _config:GetController("zhama").selectedIndex = GuiTypeValue + + + local maimaypeValue=0 + if data.mai_niao ==0 then + maimaypeValue=0 + elseif data.mai_niao ==1 then + maimaypeValue=data.mai_niao_opt + --_config:GetChild("btn_magenggang").selected = data.ma_gen_gong + end + + + _config:GetChild("btn_magengdi").selected = data.ma_gen_di_fen + _config:GetChild("btn_magenggang1").selected = data.ma_gen_gong + + --_config:GetController("jiangma").selectedIndex = maimaypeValue + + _config:GetChild("btn_wuzi").selected=data.no_wan + _config:GetChild("btn_wufeng").selected =data.wu_feng + _config:GetChild("btn_fengzhuang").selected =data.geng_zhuan + _config:GetChild("btn_lianzhuang").selected =data.lian_zhuang + _config:GetChild("btn_liujusuangang").selected=not data.huangzhuang_huanggang + _config:GetChild("btn_chigang").selected =data.gangbao_type + _config:GetChild("btn_bihu").selected =data.zi_dong_hu + --_config:GetChild("btn_dahuxiangcheng").selected =data.da_hu_cheng + _config:GetChild("btn_qiangganghu").selected =data.qiangkong_2bei + _config:GetChild("btn_chihu").selected =data.dianpao + _config:GetChild("btn_xiaohu").selected =data.xiaohu_bei + _config:GetChild("btn_jihubuchihu").selected =data.jihunotchihu + _config:GetChild("btn_zimo").selected =data.special_zimo + _config:GetChild("btn_shibeibujifen").selected =data["10bei_bu_jifen"] + + end + + + + + +return M + \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhougui/EXMainView.lua b/lua_probject/extend_project/extend/majiang/chaozhougui/EXMainView.lua new file mode 100644 index 00000000..85cf20a4 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhougui/EXMainView.lua @@ -0,0 +1,849 @@ +local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local MJMainView = require("main.majiang.MJMainView") +local EXClearingView = import(".EXClearingView") +local TX_GameEvent = import(".GameEvent") +local HuTipView = import("main.majiang.HuTipView") +local SettingView = import("main.majiang.MJSettingViewNew") +local PlayerInfoView = import(".EXPlayerInfoView") +local M = {} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M,{__index = MJMainView}) + local self = setmetatable({}, {__index = M}) + self.class = "MainView" + self.asset_group = "ChaoZhouGui_MJ" + self:init() + ViewUtil.PlayMuisc(self.asset_group, "extend/majiang/chaozhougui/sound/bg.mp3") + return self +end + +function M:InitView(url) + local room = self._room + self._style = 1 + self._gps_style = 1 + self._full = true + UIPackage.AddPackage("extend/majiang/chaozhougui/ui/Extend_MJ_ChaoZhouGui") + MJMainView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num .. "_s2") + self._hu_tip = HuTipView.new(self) + + self._view:GetChild('wanfa_text').text =room.room_config.people_num .. '人潮鬼 ' .. room.score_times .. '倍' + + self.LaiziBG=self._view:GetChild('n103') + self.LaiziBG.text="鬼牌" + self.LaiziBG.visible=false + self.selectLaiziBtn=self._view:GetChild('selectlaizi') + self.Laizi1Btn=self._view:GetChild('selectlaizi1') + self.Laizi2Btn=self._view:GetChild('selectlaizi2') + self.Laizi1Btn.visible=false + self.Laizi2Btn.visible=false + self.selectLaiziBtn.visible=false + self:SetReconnentLaiziTips() + + self:PlayerChangeLineState() + + if room.playing or room.curren_round > 0 then + self:ReloadRoom() + end +end + + + +function M:SetReconnentLaiziTips() + local room=DataManager.CurrenRoom + if room.beforelaiziCardId and room.beforelaiziCardId>0 then + self:SetShowLaiZiProcess(room.beforelaiziCardId,room.laiziInfo[1],room.laiziInfo[2],false) + end +end + + +function M:SetLaiZiCard(btn,cardId) + btn.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..cardId +end + + +function M:IsShowLaiZi(btn,isShow) + btn.visible=isShow +end + + +function M:HideAllLaiZiCard() + self.Laizi1Btn.visible=false + self.Laizi2Btn.visible=false + self.selectLaiziBtn.visible=false + self.LaiziBG.visible=false +end + +function M:SetShowLaiZiProcess(beforeLaiziID,currentLaizi1ID,currentLaizi2ID,isShowAnim) + --zhongid=currentLaizi1ID + if isShowAnim==nil then isShowAnim=false end + + printlog("当前赋值结果为====>>>") + print(beforeLaiziID) + print(currentLaizi1ID) + print(currentLaizi2ID) + self:HideAllLaiZiCard() + self:SetLaiZiCard(self.selectLaiziBtn,beforeLaiziID) + self:SetLaiZiCard(self.Laizi1Btn,currentLaizi1ID) + if currentLaizi2ID then + self:SetLaiZiCard(self.Laizi2Btn,currentLaizi2ID) + end + + + if isShowAnim==true then + self:IsShowLaiZi(self.selectLaiziBtn,true) + coroutine.start( + function() + coroutine.wait(1) + self:HideAllLaiZiCard() + self.LaiziBG.visible=true + self:IsShowLaiZi(self.Laizi1Btn,true) + if currentLaizi2ID then + self:IsShowLaiZi(self.Laizi2Btn,true) + end + + end + ) + else + self.LaiziBG.visible=true + self:IsShowLaiZi(self.Laizi1Btn,true) + if currentLaizi2ID then + self:IsShowLaiZi(self.Laizi2Btn,true) + end + end + self.LaiziBG.visible=true +end + + +function M:UpdateRound() + self._view:GetChild("tex_round1").text = self._room.curren_round + self._view:GetChild("tex_round2").text = self._room.room_config.round +end + +function M:InitPlayerInfoView() + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem,self) + tem.visible = false + end +end + +function M:NewMJPlayerCardInfoView(view,index) + if index == 1 then + return MJPlayerSelfCardInfoView.new(view,self) + end + return MJPlayerCardInfoView.new(view,self) +end + +function M:EventInit() + -- UIPackage.AddPackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong") + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _gcm_outcard_url = UIPackage.GetItemURL("Main_Majiang", "Gcm_OutCard") + local _player_info = self._player_info + local _gamectr = self._gamectr + + + + _gamectr:AddEventListener(TX_GameEvent.SendLaiZi, function(...) + local arg = {...} + self:SetShowLaiZiProcess(arg[1],arg[2],arg[3],arg[4]) + end) + + + + + _gamectr:AddEventListener(TX_GameEvent.SendCards,function( ... ) + -- self:ShowHuTip() + self:UpdateRound() + self._state.selectedIndex = 1 + local list = _room.player_list + for i=1,#list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateHandCard() + end + end) + _gamectr:AddEventListener(TX_GameEvent.EventTurn, function(...) + local arg = {...} + self._left_time = 15 + local seat = arg[1] + self:UpdateCardBox(self:GetPos(seat)) + -- if seat == self._room.self_player.seat then + -- self:ShowHuTip() + -- end + end) + + _gamectr:AddEventListener(TX_GameEvent.OutHint, function(...) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:UpdateHandCard(true) + end) + + local _gcm_outcard_url ="ui://Main_Majiang/Gcm_OutCard" + _gamectr:AddEventListener(TX_GameEvent.OutCard, function(...) + self:__CloseTip() + self._left_time = 0 + local arg = {...} + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:RemoveCursor() + info:UpdateHandCard() + local outcard = UIPackage.CreateObjectFromURL(_gcm_outcard_url) + info:UpdateOutCardList(outcard, card, self._cursor) + self:PlaySound("ChaoZhouGui_MJ", p.self_user.sex, tostring(card)) + self:PlayMJSound("chupai.mp3") + if seat == _room.self_player.seat then + _room.curren_outcard_seat = -1 + end + end) + _gamectr:AddEventListener(TX_GameEvent.GetCard, function(...) + self:__CloseTip() + local arg = {...} + local seat = arg[1] + local card = arg[2] + -- self._tex_leftTime.text = arg[3] + self._tex_LeftCard.text = arg[3] + -- self:UpdateRoomInfo() + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateHandCard(true) + end) + + _gamectr:AddEventListener(TX_GameEvent.FZTips, function(...) + local arg = {...} + local _tip = arg[1] + local weight = arg[2] + self:__FangziTip(_tip, weight) + end) + + _gamectr:AddEventListener(TX_GameEvent.FangziAction, handler(self,self.OnFangziAction)) + + _gamectr:AddEventListener(TX_GameEvent.ZPHuCard, function(...) + self._left_time = 0 + self:UpdateCardBox(0) + self:__CloseTip() + self._popEvent = false + local arg = {...} + local win_seat = arg[1] + local lose_seat = arg[2] + local win_card = arg[3] + local cards = arg[4] + local win_list = arg[5] + local index = self:GetPos(win_seat) + local info = self._player_card_info[index] + self:RemoveCursor() + info:UpdateHandCard(true, true) + + local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card") + obj_win_card.icon = "ui://Main_Majiang/202_" .. win_card + obj_win_card:GetController("bg").selectedIndex = 1 + info._view:AddChild(obj_win_card) + obj_win_card:Center() + + local url, pNode + local player = _room:GetPlayerBySeat(win_seat) + if win_seat ~= _room.self_player.seat then + url = "ui://Main_Majiang/别人胡" + pNode = info._mask_liangpai + elseif win_seat == _room.self_player.seat then + url = "ui://Main_Majiang/自己胡牌" + pNode = self._view + end + if win_seat == lose_seat then + url = "ui://Main_Majiang/eff_zimo" + end + + local he = UIPackage.CreateObjectFromURL(url) + pNode:AddChild(he) + he:GetTransition("t2"):Play() + he:Center() + if _room.room_config.people_num==2 then + if win_seat ~= _room.self_player.seat then + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + end + + if win_seat == _room.self_player.seat then + printlog("自己位置=====") + he:Center() + elseif url == "ui://Main_Majiang/eff_zimo" then + printlog("自摸地址==========") + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + + + + --- + local isZiMo=win_seat==lose_seat + DataManager.CurrenRoom.isZiMoHu=isZiMo + local hu_sound = isZiMo and ("zimo"..math.random(1, 3)) or ("hu"..math.random(1, 2)) + printlog("声音====>>>",hu_sound) + self:PlaySound("ChaoZhouGui_MJ",player.self_user.sex, hu_sound) + + local pNode = info._view + local url = "eff_list1" + local he_list = UIPackage.CreateObjectFromURL("ui://Extend_MJ_ChaoZhouGui/" .. url) + he_list.touchable = false + pNode:AddChild(he_list) + he_list:Center() + + coroutine.start(function() + for i = 1 ,#win_list do + local tem = win_list[i] + if tem.type>0 and tem.type<32 then + local com_name = "he" .. tem.type + local item = he_list:GetChild("list"):AddItemFromPool("ui://Extend_MJ_ChaoZhouGui/" .. com_name) + coroutine.wait(0.3) + end + + end + + coroutine.wait(2) + obj_win_card:Dispose() + he:Dispose() + he_list:Dispose() + self._popEvent = true + end) + + end) + + _gamectr:AddEventListener(TX_GameEvent.EventNiao, function(...) + local arg = {...} + self._popEvent = false + local list = arg[1] + local start_seat = arg[2] + --ViewUtil.PlaySound("ChaoZhou_MJ", "extend/majiang/chaozhou/sound/zhuaniao.mp3") + coroutine.start(self.RunNiao,self,list, start_seat) + end) + + + _gamectr:AddEventListener(TX_GameEvent.EventMa, function(...) + local arg = {...} + self._popEvent = false + local list = arg[1] + local start_seat = arg[2] + --ViewUtil.PlaySound("ChaoZhou_MJ", "extend/majiang/chaozhou/sound/zhuaniao.mp3") + coroutine.start(self.RunNiao,self,list, start_seat) + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult1, function(...) + self._popEvent = false + self:__CloseTip() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = {...} + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local niao = result.niao + if liuju then + local le = UIPackage.CreateObjectFromURL("ui://Main_Majiang/LiuJu") + self._view:AddChild(le) + le:Center() + le:GetTransition("t0"):Play() + coroutine.start(function() + coroutine.wait(1) + le:Dispose() + end) + end + self:RemoveCursor() + if self._clearingView == nil then + self._clearingView = EXClearingView.new(self._root_view) + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + self._popEvent = true + end) + end + + if _room.curren_round ~= _room.room_config.round then + -- if #niao == 0 then self._view:GetChild("n13").visible = false end + self._clearingView:InitData(0, _room, result, nil, function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:ResetCardType() + if _room:checkHpNonnegative() then + p.cur_hp = data[i].hp_info.cur_hp + end + info:UpdateScore() + info._view:GetChild("zhanji").visible = true + local num = data[i].hp_info.total_hp + if num > 0 then + info._view:GetController("text_color").selectedIndex = 0 + info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + else + info._view:GetController("text_color").selectedIndex = 1 + info._view:GetChild("text_jifen").text = d2ad(num) + end + + info._view:GetChild("mask_piao").title = "" + info._view:GetController("piao_niao").selectedIndex = 0 + p.fz_list = {} + end + DataManager.CurrenRoom.self_player.card_list = {} + self._state.selectedIndex = 2 + self._clearingView = nil + end) + end + self._player_card_info[1]:ShowHuTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult2, function(...) + self:UnmarkSelfTuoguan() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = {...} + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + self._clearingView = EXClearingView.new() + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + end) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiaoTip, function() + self:UpdateRound() + self._tex_LeftCard.text = "0" + self._state.selectedIndex = 1 + self:__PiaoNiaoTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiao, function(...) + local arg = {...} + local seat = arg[1] + local num = arg[2] + if num > 0 then + local head_info = self._player_info[self:GetPos(seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. num + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + if seat == _room.self_player.seat then + if self._com_piao and _room.self_player.entrust then + self._com_piao:Dispose() + self._com_piao = nil + _room.curren_round = _room.curren_round - 1 + end + end + end) +end + +function M:OutCard(card) + if card ~= 0 then + printlog("当前出牌为===>>>"..card) + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card, function() + local info = self._player_card_info[1] + self:RemoveCursor() + info:UpdateHandCard() + + info:UpdateOutCardList(nil, card, self._cursor) + self:PlaySound("ChaoZhouGui_MJ", self._room.self_player.self_user.sex,tostring(card)) + self:PlayMJSound("chupai.mp3") + -- self:ShowHuTip() + end) + else + printlog("鬼牌不能出===>>>"..card) + end +end + +function M:__FangziTip(tip, weight) + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject("Main_Majiang", "Gcm_action_tips") + _chipeng_tip:GetController("hide_bg").selectedIndex = 1 + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + -- self._player_card_info[self:GetPos(p.seat)] + + local _lit_fanzi = _chipeng_tip:GetChild("lit_fanzi") + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + + if DataManager.CurrenRoom.room_config.must_hu and DataManager.CurrenRoom.room_config.must_hu==true then + local tip_hu = false + local count = #_tlist + + for i=1,count do + if tip.tip_map_id[i].type==6 then + tip_hu=true + end + end + + + for k=1,#_tlist do + + local td = tip.tip_map_type[_tlist[k]][1] + local url = "ui://Main_Majiang/Btn_fztip" + local td_weight = td.weight + if td_weight == 16 then td_weight = 8 end + if td_weight == 8 then url = "ui://Main_Majiang/Btn_hu" end + if tip_hu==true then + if td.type==6 then + local btn_t = _lit_fanzi:AddItemFromPool(url) + btn_t.icon = "ui://Main_Majiang/fztip_"..td_weight + btn_t.data = { tip, td } + btn_t.onClick:Add(self.__TipAction,self) + end + + else + local btn_t = _lit_fanzi:AddItemFromPool(url) + btn_t.icon = "ui://Main_Majiang/fztip_"..td_weight + btn_t.data = { tip, td } + btn_t.onClick:Add(self.__TipAction,self) + end + + end + + if tip_hu==false then + local _btn_pass = _lit_fanzi:AddItemFromPool("ui://Main_Majiang/Btn_pass") + -- local _btn_pass = _chipeng_tip:GetChild("btn_pass") + _btn_pass.onClick:Set(function() + if tonumber(weight) >= 8 then + local guo_msg = MsgWindow.new(self._root_view, "确定要点过吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end) + guo_msg:Show() + else + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end) + end + + else + local tip_hu = false + local count = #_tlist + for k=1,#_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + local url = "ui://Main_Majiang/Btn_fztip" + local td_weight = td.weight + if td_weight == 16 then td_weight = 8 end + if td_weight == 8 then url = "ui://Main_Majiang/Btn_hu" end + local btn_t = _lit_fanzi:AddItemFromPool(url) + btn_t.icon = "ui://Main_Majiang/fztip_"..td_weight + btn_t.data = { tip, td } + btn_t.onClick:Add(self.__TipAction,self) + end + + -- if not (tonumber(weight) >= 16) then + local _btn_pass = _lit_fanzi:AddItemFromPool("ui://Main_Majiang/Btn_pass") + -- local _btn_pass = _chipeng_tip:GetChild("btn_pass") + _btn_pass.onClick:Set(function() + if tonumber(weight) >= 8 then + local guo_msg = MsgWindow.new(self._root_view, "确定要点过吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end) + guo_msg:Show() + else + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end) + -- end + + + end + + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() +end + +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local list = tip.tip_map_type[td.weight] + if (#list > 1) then + self:_ChiView(list, function(id) + _gamectr:SendAction(id) + self:__CloseTip() + end) + self._chipeng_tip.visible = false + return + end + + _gamectr:SendAction(td.id) + if (self._chipeng_tip == nil) then return end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil +end + +function M:_ChiView(tiplist, callback) + self._chipeng_tip.visible = false + local _pop_tip_choice = UIPackage.CreateObject("Main_Majiang", "Pop_tip_choice") + local list_choose = _pop_tip_choice:GetChild("Lst_choose") + local crossCtr = _pop_tip_choice:GetController("state") + crossCtr.selectedIndex = #tiplist == 3 and 0 or 1 + _pop_tip_choice:GetChild("Btn_cross").onClick:Add(function() + _pop_tip_choice:Dispose() + self._chipeng_tip.visible = true + end) + list_choose:RemoveChildrenToPool() + for i = 1, #tiplist do + local item_choose = list_choose:AddItemFromPool() + item_choose:GetController("type").selectedIndex = 0 + for j = 1, 4 do + item_choose:GetChild("card"..j).icon = UIPackage.GetItemURL("Main_Majiang", "202_"..tiplist[i].card) + end + item_choose.onClick:Add(function() + callback(tiplist[i].id) + end) + end + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width)/2, (self._view.height - _pop_tip_choice.height)/2) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:OnFangziAction(...) + self:__CloseTip() + local arg = {...} + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local index = arg[3] + + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject("Extend_MJ_ChaoZhouGui", "FzEffect") + if fz.type == FZType.Peng then + self:PlaySound("ChaoZhouGui_MJ", player.self_user.sex,"peng"..math.random(1, 3)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "碰框") + else + + self:PlaySound("ChaoZhouGui_MJ", player.self_user.sex,"gang"..math.random(1, 2)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "杠框") + end + effect.touchable = false + effect:GetTransition("t2"):Play() + pNode:AddChild(effect) + coroutine.start(function() + coroutine.wait(2) + effect:Dispose() + end) + + self:RemoveCursor() + if (player.seat ~= fz.from_seat) then + local fs_info = _player_card_info[self:GetPos(fz.from_seat)] + fs_info:UpdateOutCardList() + end + info:UpdateFzList(fz, index, true) + local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi + info:UpdateHandCard(getcard) + self:__CloseTip() +end + +function M:RunNiao(list, start_seat) + local _room = self._room + --local _niao_View = self._niao_View + self._niao_View = UIPackage.CreateObject("Extend_MJ_ChaoZhouGui","Panel_Birds") + self._view:AddChild(self._niao_View) + self._niao_View:Center() + local _niao_View = self._niao_View + local list_niao_card = self._niao_View:GetChild("Lst_birds") + list_niao_card:RemoveChildrenToPool() + for i = 1, #list do + --添加背面的麻將 + local item = list_niao_card:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "202_00") + item:GetChild("tex_score").text = "+" .. list[i].score + end + for i = 1, #list do + --顯示正面 + local item = list_niao_card:GetChildAt(i - 1) + local card = list[i].card + coroutine.wait(0.3) + item:GetTransition("appear"):Play() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_"..card) + if list[i].score > 0 then item:GetController("bg").selectedIndex = 1 end + end + coroutine.start(function() + coroutine.wait(2) + _niao_View:Dispose() + self._popEvent = true + end) +end + +-- function M:markOutCards(showTip, data) +-- for i = 1, #self._room.player_list do +-- local p = self._room.player_list[i] +-- local info = self._player_card_info[self:GetPos(p.seat)] +-- for j = 1, #p.outcard_list do +-- local card = p.outcard_list[j] +-- if card == data then +-- local obj = info:GetOutCardByIndex(j) +-- obj:GetController("gray").selectedIndex = showTip and 1 or 0 +-- end +-- end +-- end +-- end + +function M:__PiaoNiaoTip() + local obj_piao = UIPackage.CreateObject("Main_Majiang", "panel_piao_niao") + self._view:AddChild(obj_piao) + obj_piao.x = (self._view.width - obj_piao.width) * 0.5 + obj_piao.y = self._view.height * 0.6 + for i = 1, 4 do + obj_piao:GetChild("btn_" .. i).onClick:Add(function() + self._gamectr:SendAction(i - 1) + obj_piao:Dispose() + end) + end + self._com_piao = obj_piao +end + +function M:ReloadRoom(bskip) + local room = self._room + -- if not room.playing then + -- self._state.selectedIndex = 2 + -- else + -- self._state.selectedIndex = 1 + -- self._room._reload_flag = true + -- end + + if bskip == nil or bskip == false then + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + self._room._reload_flag = true + end + end + + for i = 1, #room.player_list do + local p = room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + for i = 1, #p.fz_list do + info:UpdateFzList(p.fz_list[i], -1) + end + info:UpdateHandCard() + local head_info = self._player_info[self:GetPos(p.seat)] + head_info:UpdateScore() + head_info._view:GetChild('zhanji').visible = true + local num = p.total_hp or 0 + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(num) + end + + if p.seat == room.last_outcard_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil,card, self._cursor) + elseif p.seat == room.curren_outcard_seat then + info:UpdateHandCard(true) + info:UpdateOutCardList() + else + info:UpdateOutCardList() + end + if p.seat == room.banker_seat then + head_info:MarkBank(true) + end + -- if p.ready then + -- self._player_info[self:GetPos(p.seat)]:Ready(true) + -- end + if bskip == nil or bskip == false then + if p.ready and room.playing == false then + self._player_info[self:GetPos(p.seat)]:Ready(true) + end + end + if p.piao_niao~=nil and p.piao_niao > 0 then + local head_info = self._player_info[self:GetPos(p.seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + end + -- self:ShowHuTip() + + if bskip == nil or bskip == false then + self:UpdateCardBox(self:GetPos(room.curren_outcard_seat)) + self._tex_LeftCard.text = room.left_count + self:UpdateRound() + end +end + +function M:PlayerChangeLineState() + -- local isOutCard = true + -- local str = "玩家 " + -- for _ , player in ipairs(self._room.player_list) do + -- if player.line_state == 0 then + -- isOutCard = false + -- end + -- end + -- self._player_card_info[1]._area_handcard_list.touchable = isOutCard +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:__CloseTip() + if self._chipeng_tip then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if self._pop_tip_choice then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +function M:closeTipOnTuoguan() + self:__CloseTip() +end + +function M:Destroy() + MJMainView.Destroy(self) + UIPackage.RemovePackage("extend/majiang/chaozhougui/ui/Extend_MJ_ChaoZhouGui") +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhougui/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/chaozhougui/EXPlayBackView.lua new file mode 100644 index 00000000..5e584354 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhougui/EXPlayBackView.lua @@ -0,0 +1,298 @@ +local MJPlayBackView = require("main.majiang.MJPlayBackView") +local EXRoomConfig = import(".EXRoomConfig") +local EXClearingView = import(".EXClearingView") + +local Record_Event = import(".RecordEvent") + + +local M = {} + +--- Create a new +function M.new() + setmetatable(M,{__index = MJPlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = "PlayBackView" + self:init() + + return self +end + + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/majiang/chaozhougui/ui/Extend_MJ_ChaoZhouGui") + MJPlayBackView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num) + local _cardbox = self._view:GetChild("cardbox") + --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false + self._ctr_cardbox = _cardbox:GetController("c1") + self._tex_round = self._view:GetChild("tex_round") + self._tex_LeftCard = self._view:GetChild("remaining_card") + self._anchor = self._view:GetChild("mask_tips") + self._eventmap = {} + + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao + self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao + self._cmdmap[Record_Event.Evt_Result] = self.CmdResult +end + +function M:FillRoomData(data) + MJPlayBackView.FillRoomData(self) + if self._win_pic then self._win_pic:Dispose() end + if self._niao then self._niao:Dispose() end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local left_count = data.info.left_card + self:UpdateLeftCard(left_count) + local round = data.info.round + self:UpdateRound(round) + + local roominfo_panel = self._view:GetChild("roominfo_panel1") + roominfo_panel:GetChild("tex_roomid").text = room.room_id + roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + table.sort(p.card_list, ViewUtil.HandCardSort) + card_info:UpdateHandCard(false, true) + self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0 + end + + self:GenerateAllStepData(data) + self:UpdateStep(1) + -- self:ShowStep(0) +end + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateLeftCard(step.left_card) + -- self._ctr_cardbox.selectedIndex = step.current_out_seat + self:UpdateCardBox(self:GetPos(step.current_out_seat)) + self:UpdateStep(index + 1) + if step.cmd ~= Record_Event.Evt_OutCard then + self:RemoveCursor() + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hand_left_count = #p.card_list + info:Clear() + info:ResetFzList() + p.piao_niao = step.player_card_data[i].piao_niao + local head_info = self._player_info[self:GetPos(i)] + if p.piao_niao and p.piao_niao > 0 then + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + else + head_info._view:GetController("piao_niao").selectedIndex = 0 + end + if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil, nil, self._cursor) + else + info:UpdateOutCardList() + end + if step.cmd == Record_Event.Evt_GetCard and p.seat == step.current_out_seat then + info:UpdateHandCard(true, true) + else + info:UpdateHandCard(false, true) + end + end + if step.cmd == Record_Event.Evt_Win then + self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡") + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + else + if self._win_pic then + self._win_pic:Dispose() + end + end + if step.cmd == Record_Event.Evt_Niao then + local niao_list = step.niao + self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_ChaoZhouGui/Panel_Birds") + local list = self._niao:GetChild("Lst_birds") + list:RemoveChildrenToPool() + for i = 1, #niao_list do + local item = list:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_"..niao_list[i].card) + if niao_list[i].score > 0 then + item:GetController("bg").selectedIndex = 2 + end + end + self._view:AddChild(self._niao) + self._view:AddChild(self._view:GetChild("panel_record")) + self._niao:Center() + else + if self._niao then + self._niao:Dispose() + end + end + if step.cmd == Record_Event.Evt_Result then + if not self.result then + self.result = EXClearingView.new(self._root_view, true) + self.result:InitData(0, self._room, step.result_data) + self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5 + self.result._view.width = GRoot.inst.width + self.result._view.height = GRoot.inst.height + self.result._view:GetChild("btn_confirm").visible = false + self._anchor:AddChild(self.result._view) + self.result._view.x = self._anchor.x * -1 + self.result._view.y = self._anchor.y * -1 + else + self.result._view.visible = true + end + -- self.result._view:Center() + else + if self.result then + self.result._view.visible = false + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = "" + step.left_card = info.left_card + step.last_out_seat = 0 + step.current_out_seat = 1 + step.win = 0 + step.niao = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.piao_niao = p.piao_niao + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + table.sort(u.card_list, ViewUtil.HandCardSort) + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = 0 + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + for i = 1, #cmd.data.opcard do + list_remove(u.card_list, cmd.data.opcard[i]) + end + local fz = {} + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.opcard = cmd.data.opcard + local uf = data.player_card_data[cmd.data.from_seat] + if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then + table.remove(uf.outcard_list, #uf.outcard_list) + end + if fz.type ~= FZType.Gang_Peng then + u.fz_list[#u.fz_list + 1] = fz + else + for i = 1, #u.fz_list do + if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then + u.fz_list[i].type = FZType.Gang_Peng + end + end + end +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:CmdNiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.niao = cmd.data.niao +end + +function M:CmdPiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.player_card_data[cmd.seat].piao_niao = cmd.data.num +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result_data = cmd.data +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_deep_clone(last_step) + self._step[#self._step + 1] = step + step.result_data = nil + return step +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = "剩余 "..num.." 张牌" +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:UpdateRound(round) + self._tex_round.text = "第 "..round.."/"..self._room.room_config.round.." 局" +end + +function M:UpdateStep(step) + self._record:GetChild("tex_step").text = "第 " .. step .. " / " .. #self._step .. "步" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhougui/EXPlayer.lua b/lua_probject/extend_project/extend/majiang/chaozhougui/EXPlayer.lua new file mode 100644 index 00000000..fd26822b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhougui/EXPlayer.lua @@ -0,0 +1,36 @@ + + +local EXPlayer = { + auto, + -- 手牌列表 + hand_cards = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhougui/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/majiang/chaozhougui/EXPlayerInfoView.lua new file mode 100644 index 00000000..f8a5fd69 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhougui/EXPlayerInfoView.lua @@ -0,0 +1,76 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + +function M:init() + PlayerInfoView.init(self) + self._tex_score = self._view:GetChild("info"):GetChild("tex_score1") + self._tex_score2 = self._view:GetChild("info"):GetChild("tex_score2") + self._ct_score = self._view:GetChild("info"):GetController("score") +end + +function M:ShowInteraction(type,str) + if type == 3 then + Voice.DownLoad(str, function(clip) + if (clip ) then + self:ShowMaskVoice(clip.length) + GameApplication.Instance:PlayVoice(clip) + end + end) + elseif type == 4 then + self:SetChat(str) + elseif type == 2 then + local chat_index = tonumber(str) + self._main_view:PlayChatSound(self._player.self_user.sex,chat_index) + local language, index = self._main_view:GetChatMsgLanguage(chat_index) + self:SetChat(self._main_view.Fix_Msg_Chat[index]) + elseif type == 1 then + self:SetBiaoqing("ui://Chat/"..str) + end +end + +function M:UpdateRemainCard(card_num, hide) + if hide then + self._view:GetController("show_remain").selectedIndex = 0 + else + self._view:GetController("show_remain").selectedIndex = 1 + end + self._view:GetChild("com_remain"):GetChild("tex_remain").text = card_num +end + +function M:FillData(player) + PlayerInfoView.FillData(self, player) + self:UpdateScore(player.total_score) +end + +function M:UpdateScore() + local score = self._player.total_score + local room = DataManager.CurrenRoom + if room:checkHpNonnegative() then + score = d2ad(self._player.cur_hp) + end + if not score then + score = 0 + end + if score < 0 then + self._ct_score.selectedIndex = 1 + self._tex_score2.text = score + else + self._ct_score.selectedIndex = 0 + if not room:checkHpNonnegative() then + score = "+" .. score + end + self._tex_score.text = score + end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/chaozhougui/EXRoomConfig.lua b/lua_probject/extend_project/extend/majiang/chaozhougui/EXRoomConfig.lua new file mode 100644 index 00000000..4723db26 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhougui/EXRoomConfig.lua @@ -0,0 +1,991 @@ + + + +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.class = "RoomConfig" + self.config=config + self.must_hu=config["must_hu"] + self.mai_niao=config["mai_niao"] + self.mai_niao_opt=config["mai_niao_opt"] + self.round = config["times"] + self.Qidui = config["qidui"] + self.QiangGang = config["qiangkong"] + self.QiangGangNiao = config["qiangkong_niao"] + self.Zhama = config["niao_opt"] + local isOpenLaizi8=false + --if config["laizi"]==3 then + -- isOpenLaizi8=true + --end + self.Laizi = isOpenLaizi8 --是否是8个赖子 + self.LaiziType=config["laizi"] + self.NiaoType = config["niao"] + --self.Zhamatype= config["niao_opt"] + self.piao_niao = config["piao_niao"] + self.Jiangma = config["jiangma"] + self.isHidden = config.isHidden + + self.Qanggangquanbao=config["qianggang_type"] + self.Gangbaoquanbao=config["gangbao_type"] + self.Minggangkeqiang=config["qiangkong_ming"] + self.geng_zhuan=config["geng_zhuan"] + self.jiejiegao=config["jiejiegao"] + self.jiejiegao_first=config["jiejiegao_first"] + self.wuguijiabei=config["wuguijiabei"] + self.no_wan=config["no_wan"] + self.ma_gen_di_fen=config["ma_gen_di_fen"] + self.ma_gen_gong=config["ma_gen_gong"] + self.qidui_jiafan=config["qidui_jiafan"] + + + + return self +end + +function M:GetDes(sp) + sp = sp or " " + local count=0 + local str = self.round and self.round .. "局" .. " " or "" + str = str .. RoomConfig.GetDes(self, sp).."\n" + + + --[[if self.config["no_wan"] then + str = str .."无字" + str = str .. sp + end + + if self.config["budaifeng"] then + str = str .."无风" + str = str .. sp + end + + if self.config["geng_zhuan"] then + str = str .."跟庄1分" + str = str .. sp + end + + + if self.config["jiejiegao"] then + str = str .."连庄" + str = str .. sp + end + + if self.config["huangzhuang_huanggang"] then + str = str .."留局算杠" + str = str .. sp + end + + if self.config["gangbaoquanbao"] then + str = str .."吃杠杠爆全包" + str = str .. sp + end + + if self.config["must_hu"] then + str = str .."比胡" + str = str .. sp + end + + if self.config["da_hu_cheng"] then + str = str .."大胡相乘" + str = str .. sp + end + + if self.config["qiangkong_2bei"] then + str = str .."抢杠胡两倍" + str = str .. sp + end + + + if self.config["dianpao"] then + str = str .."吃胡" + str = str .. sp + end + + + if self.config["xiaohu_bei"] then + str = str .."小胡(鸡胡1倍,其它两倍)" + str = str .. sp + end + + + if self.config["jihunotchihu"] then + str = str .."鸡胡不能吃胡" + str = str .. sp + end + + if self.config["special_zimo"] then + str = str .."自摸(20分以上可以吃胡)" + str = str .. sp + end + + if self.config["bujifen"] then + str = str .."-10倍不计分" + str = str .. sp + end + + if self.config["wuguijiabei"] then + str = str .."无鬼加倍" + str = str .. sp + end + + if self.config["laizi4_hu"] then + str = str .."四鬼胡牌" + str = str .. sp + end + + if self.config["laizi4_hu_2bei"] then + str = str .."四鬼胡牌-双倍" + str = str .. sp + end + + + if (self.LaiziType==3) then + str = str .. "翻双鬼" + str = str .. sp + elseif self.LaiziType==1 then + str = str .. "白板做鬼" + str = str .. sp + elseif self.LaiziType==2 then + str = str .. "翻鬼" + str = str .. sp + elseif self.LaiziType==4 then + str = str .. "红中做鬼" + str = str .. sp + else + str = str .. "无鬼" + str = str .. sp + end + + + if self.config["mai_niao"]==0 then + str = str .. "无买马" + str = str .. sp + elseif self.config["mai_niao"]==1 then + if self.config["mai_niao_opt"]==1 then + str = str .. "买1马" + str = str .. sp + elseif self.config["mai_niao_opt"]==2 then + str = str .. "买2马" + str = str .. sp + elseif self.config["mai_niao_opt"]==3 then + str = str .. "罚1马" + str = str .. sp + elseif self.config["mai_niao_opt"]==4 then + str = str .. "罚2马" + str = str .. sp + end + end + + if self.NiaoType==0 then + str = str .. "无奖马" + str = str .. sp + elseif self.NiaoType==1 then + if self.Zhama==1 then + str = str .. "奖2马" + str = str .. sp + elseif self.Zhama==2 then + str = str .. "奖5马" + str = str .. sp + elseif self.Zhama==3 then + str = str .. "奖8马" + str = str .. sp + elseif self.Zhama==4 then + str = str .. "抓马" + str = str .. sp + end + elseif self.NiaoType==2 then + local strMB="爆炸马加分" + if self.Zhama==1 then + strMB="爆炸马加倍" + end + str = str .. strMB + str = str .. sp + end + + if self.ma_gen_di_fen then + str = str .."马跟底分" + str = str .. sp + end + + if self.ma_gen_gong then + str = str .."马跟杠" + str = str .. sp + end--]] + + + + + ----------------- + if self.config["no_wan"] then + str = str .."无字" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["budaifeng"] then + str = str .."无风" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["geng_zhuan"] then + str = str .."跟庄一分" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["jiejiegao"] then + str = str .."连庄" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["huangzhuang_huanggang"] then + str = str .."留局算杠" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["gangbaoquanbao"] then + str = str .."吃杠杠爆全包" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["must_hu"] then + str = str .."必胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["da_hu_cheng"] then + str = str .."大胡相乘" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["qiangkong_2bei"] then + str = str .."抢杠胡两倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["dianpao"] then + str = str .."吃胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["xiaohu_bei"] then + str = str .."小胡(鸡胡1倍,其它两倍)" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["jihunotchihu"] then + str = str .."鸡胡不能吃胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["special_zimo"] then + str = str .."自摸(20分以上可以吃胡)" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + + if self.config["wuguijiabei"] then + str = str .."无鬼加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["laizi4_hu"] then + str = str .."四鬼胡牌" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["laizi4_hu_2bei"] then + str = str .."四鬼胡牌双倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["10bei_fengding"] then + str = str .."10倍封顶" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["qianggang_type"] then + str = str .."抢杠全包" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["10bei_bu_jifen"] then + str = str .."10倍不计分" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if (self.LaiziType==3) then + str = str .. "翻双鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.LaiziType==1 then + str = str .. "白板做鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.LaiziType==2 then + str = str .. "翻鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.LaiziType==4 then + str = str .. "红中做鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str .. "无鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["mai_niao"]==0 then + str = str .. "无买马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["mai_niao"]==1 then + if self.config["mai_niao_opt"]==1 then + str = str .. "买一马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["mai_niao_opt"]==2 then + str = str .. "买二马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["mai_niao_opt"]==3 then + str = str .. "罚一马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["mai_niao_opt"]==4 then + str = str .. "罚二马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + end + + if self.NiaoType==0 then + str = str .. "无奖马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.NiaoType==1 then + if self.Zhama==1 then + str = str .. "奖二马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.Zhama==2 then + str = str .. "奖五马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.Zhama==3 then + str = str .. "奖八马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.Zhama==4 then + str = str .. "抓马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + elseif self.NiaoType==2 then + local strMB="爆炸马加分" + if self.Zhama==1 then + strMB="爆炸马加倍" + end + str = str .. strMB + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.ma_gen_di_fen then + str = str .."马跟底分" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.ma_gen_gong then + str = str .."马跟杠" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + + +function M:GetDes2(sp) + sp = sp or " " + local str = RoomConfig.GetDes(self, sp) + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + + + if self.config["no_wan"] then + str = str .."无字" + str = str .. sp + end + + if self.config["budaifeng"] then + str = str .."无风" + str = str .. sp + end + + if self.config["geng_zhuan"] then + str = str .."跟庄1分" + str = str .. sp + end + + + if self.config["jiejiegao"] then + str = str .."连庄" + str = str .. sp + end + + if self.config["huangzhuang_huanggang"] then + str = str .."留局算杠" + str = str .. sp + end + + if self.config["gangbaoquanbao"] then + str = str .."吃杠杠爆全包" + str = str .. sp + end + + if self.config["must_hu"] then + str = str .."比胡" + str = str .. sp + end + + if self.config["da_hu_cheng"] then + str = str .."大胡相乘" + str = str .. sp + end + + if self.config["qiangkong_2bei"] then + str = str .."抢杠胡两倍" + str = str .. sp + end + + + if self.config["dianpao"] then + str = str .."吃胡" + str = str .. sp + end + + + if self.config["xiaohu_bei"] then + str = str .."小胡(鸡胡1倍,其它两倍)" + str = str .. sp + end + + + if self.config["jihunotchihu"] then + str = str .."鸡胡不能吃胡" + str = str .. sp + end + + if self.config["special_zimo"] then + str = str .."自摸(20分以上可以吃胡)" + str = str .. sp + end + + if self.config["bujifen"] then + str = str .."-10倍不计分" + str = str .. sp + end + + if self.config["wuguijiabei"] then + str = str .."无鬼加倍" + str = str .. sp + end + + if self.config["laizi4_hu"] then + str = str .."四鬼胡牌" + str = str .. sp + end + + if self.config["laizi4_hu_2bei"] then + str = str .."四鬼胡牌-双倍" + str = str .. sp + end + + + if (self.LaiziType==3) then + str = str .. "翻双鬼" + str = str .. sp + elseif self.LaiziType==1 then + str = str .. "白板做鬼" + str = str .. sp + elseif self.LaiziType==2 then + str = str .. "翻鬼" + str = str .. sp + elseif self.LaiziType==4 then + str = str .. "红中做鬼" + str = str .. sp + else + str = str .. "无鬼" + str = str .. sp + end + + + if self.config["mai_niao"]==0 then + str = str .. "无买马" + str = str .. sp + elseif self.config["mai_niao"]==1 then + if self.config["mai_niao_opt"]==1 then + str = str .. "买1马" + str = str .. sp + elseif self.config["mai_niao_opt"]==2 then + str = str .. "买2马" + str = str .. sp + elseif self.config["mai_niao_opt"]==3 then + str = str .. "罚1马" + str = str .. sp + elseif self.config["mai_niao_opt"]==4 then + str = str .. "罚2马" + str = str .. sp + end + end + + if self.NiaoType==0 then + str = str .. "无奖马" + str = str .. sp + elseif self.NiaoType==1 then + if self.Zhama==1 then + str = str .. "奖2马" + str = str .. sp + elseif self.Zhama==2 then + str = str .. "奖5马" + str = str .. sp + elseif self.Zhama==3 then + str = str .. "奖8马" + str = str .. sp + elseif self.Zhama==4 then + str = str .. "抓马" + str = str .. sp + end + elseif self.NiaoType==2 then + local strMB="爆炸马加分" + if self.Zhama==1 then + strMB="爆炸马加倍" + end + str = str .. strMB + str = str .. sp + end + + if self.ma_gen_di_fen then + str = str .."马跟底分" + str = str .. sp + end + + if self.ma_gen_gong then + str = str .."马跟杠" + str = str .. sp + end + + + + --if (self.piao_niao) then + -- str = str .. "飘鸟" .. sp + --end + + --[[if (self.NiaoType) then + if self.NiaoType == 1 then + str = str .. string.format("扎%d码", self.Zhama * 2) + elseif self.NiaoType == 2 then + str = str .. "一码全中" + elseif self.NiaoType == 3 then + str = str .. "窝窝鸟" .. sp .. (self.Zhama == 1 and "1鸟2分" or "1鸟1分") + end + str = str .. sp + + -- if self.NiaoType ~= 2 and self.Jiangma > 0 then + -- str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp + -- end + if self.Jiangma > 0 then + str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp + end + end--]] + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_MJ_ChaoZhouGui/gamerule") + return gamerulepanel +end + + +function M:GetGameSMSize() + return 467,500 +end + + +function M:GetGameName() + return "潮汕鬼牌" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhougui/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/chaozhougui/ExtendConfig.lua new file mode 100644 index 00000000..773f5f08 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhougui/ExtendConfig.lua @@ -0,0 +1,189 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import(".EXGameInfo") +local EXMainView = import(".EXMainView") +local EXGameController = import(".EXGameController") +local EXRoomConfig = import(".EXRoomConfig") +local EXPlayBackView =import(".EXPlayBackView") +local MJRoom = require("main.majiang.MJRoom") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = "ExtendConfig" + self.extend_id = 22 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/majiang/chaozhougui/ui/Info_MJ_ChaoZhouGui") + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage("extend/majiang/chaozhougui/ui/Extend_MJ_ChaoZhouGui") + ResourcesManager.UnLoadGroup("ChaoZhouGui_MJ") +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return MJRoom.new() +end + +function M:FillRoomConfig(room,_config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + + + local reload = s2croom["reload"] + local _tableInfo = s2croom["tableInfo"] + printlog("初始化房间数据====>>>") + pt(_tableInfo) + printlog(_tableInfo.laiziCard) + printlog(_tableInfo.laiziCard2) + printlog(_tableInfo.laiziCardBefore) + printlog(_tableInfo.laiziCard2Before) + + room.laiziInfo={} + if _tableInfo.laiziCardBefore>0 then + table.insert(room.laiziInfo,_tableInfo.laiziCard) + if _tableInfo.laiziCard2>0 then + table.insert(room.laiziInfo,_tableInfo.laiziCard2) + end + room.beforelaiziCardId=_tableInfo.laiziCardBefore + else + room.laiziInfo=nil + end + + local _config = _tableInfo["config"] + pt(_config) + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo["playerData"] + room.curren_round = _tableInfo["round"] + self:FillPlayerData(playerList) + + if (reload) then + local _reloadInfo = s2croom["reloadInfo"] + local _hand_card = _reloadInfo["hand_card"] + room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + + local active_seat = _reloadInfo["active_seat"] + local bank_seat = _reloadInfo["banker_seat"] + local playing = _reloadInfo["playing"] + local _info_list = _reloadInfo["info_list"] + local last_outcard_seat = _reloadInfo["last_outcard_seat"] + room.left_count = _reloadInfo["left_card"] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo["curren_outcard_seat"] + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i=1,#_info_list do + local tem = _info_list[i] + local playerid = tem["playerid"] + local p = room:GetPlayerById(playerid) + local outcard_list = tem["outcard_list"] + p.outcard_list = outcard_list + p.total_score = tem["score"] + p.hand_left_count = tem["card_count"] + p.piao_niao = tem["piao_niao"] or 0 + local opcard = tem["opcard"] + for k=1,#opcard do + local op = opcard[k] + local fz = {} + fz.type = op["type"] + fz.card = op["card"] + p.fz_list[#p.fz_list+1] = fz + end + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.left_count = _tableInfo["left_card"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + + local _info_list = _tableInfo["playerData"] + for i = 1,#_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + p.piao_niao = _jp["piao_niao"] + -- print(DataManager.SelfUser.account_id,pid) + -- if (278 == pid) then + -- room.self_player = p + -- p.self_user = DataManager.SelfUser + -- else + if p.seat == 1 then room.self_player = p end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.card_list = _hand_card + --room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + p.total_score = _jp["score"] + p.hand_left_count = #_hand_card + if _jp.hp_info then + room.room_config.isNonnegative = 1 + p.cur_hp = _jp.hp_info.cur_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhougui/GameEvent.lua b/lua_probject/extend_project/extend/majiang/chaozhougui/GameEvent.lua new file mode 100644 index 00000000..ca556bb5 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhougui/GameEvent.lua @@ -0,0 +1,36 @@ + +local TX_GameEvent = { + -- 发牌 + SendCards = "SendCards", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + EventNiao = "EventNiao", + + EventMa = "EventMa", + + EvnetPiaoTip = "EvnetPiaoTip", + + EvnetPiao = "EvnetPiao", + + + --- + SendLaiZi="SendLaiZi" +} +return TX_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhougui/MJPlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/majiang/chaozhougui/MJPlayerSelfCardInfoView.lua new file mode 100644 index 00000000..51ef5dd2 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhougui/MJPlayerSelfCardInfoView.lua @@ -0,0 +1,212 @@ +local MJPlayerSelfCardInfoView = require("main.majiang.MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local CardCheck = import(".CardCheck") + +local M = {} +-- +function M.new(view,mainView) + setmetatable(MJPlayerSelfCardInfoView, {__index = MJPlayerCardInfoView}) + setmetatable(M, {__index = MJPlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:ShowHuTip(card_list) + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + for i=1,#DataManager.CurrenRoom.laiziInfo do + if IsHasDictionary(DataManager.CurrenRoom.laiziInfo[i],tingList)==false then + table.insert(tingList,DataManager.CurrenRoom.laiziInfo[i] ) + end + end + end + + end + self._mainView._hu_tip:FillData(tingList) +end + +function M:UpdateHandCard(getcard, mp) + MJPlayerSelfCardInfoView.UpdateHandCard(self, getcard, mp) + local _carViewList = self._carViewList + + if DataManager.CurrenRoom.laiziInfo and #self._carViewList>0 then + for i=1,#self._carViewList do + local obj=self._carViewList[i] + if obj and obj.card then + if IsHasDictionary(obj.card_item,DataManager.CurrenRoom.laiziInfo) then + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=1 + end + + end + else + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=0 + end + end + end + + end + end + + + end + + + local card_list = DataManager.CurrenRoom.self_player.card_list + self:ShowHuTip(card_list) + if getcard then + self._out_card = true + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + -- 记录需要标记听牌提示的牌 + local lst_mark = {} + local total_num = 0 + for i = 1, #_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + list_remove(card_list, card) + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + local count = 0 + for j = 1, #tingList do + count = count + self._mainView:CountCardLeftNum(tingList[j]) + end + local tem = {} + tem.item = btn + tem.count = count + total_num = total_num + count + table.insert(lst_mark, tem) + end + table.insert(card_list, card) + end + table.sort(lst_mark, function(a, b) + return a.count > b.count + end) + -- 如果几张牌的可胡牌数一致,也只显示'三角',可胡牌数不一致才显示'多' + local all_same = #lst_mark ~= 0 and lst_mark[1].count == total_num / #lst_mark or false + for i = 1, #lst_mark do + local tem = lst_mark[i] + if all_same or tem.count < lst_mark[1].count then + tem.item:GetController("mark_ting").selectedIndex = 1 + else + tem.item:GetController("mark_ting").selectedIndex = 2 + end + end + else + for i = 1, #_carViewList do + local btn = _carViewList[i].card + if btn:GetController("mark_ting").selectedIndex ~= 0 then + btn:GetController("mark_ting").selectedIndex = 0 + end + end + self._out_card = false + end + +end + +function M:__OnClickHandCard(context) + local button = context.sender + local _carViewList = self._carViewList + local refresh = true + local card_list = {} + for i=1,#_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + if btn ~= button and btn.selected == true then + if button.data.card_item == card then + refresh = false + else + self._mainView:markOutCards(false, card) + end + btn.selected = false + end + if not btn.selected then + table.insert(card_list, card) + end + end + + if self._out_card then + self:ShowHuTip(card_list) + end + + -- 标记出牌 + if refresh then + if button.selected then + self._mainView:markOutCards(true, button.data.card_item) + else + self._mainView:markOutCards(false, button.data.card_item) + end + end + + local _room = DataManager.CurrenRoom + if not button.selected and _room.curren_outcard_seat == _room.self_player.seat then + local card = button.data + self._mainView:OutCard(card.card_item) + end +end + +function M:__OnDragStart(card) + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + list_remove(card_list, card) + self:ShowHuTip(card_list) +end + +function M:__OnDragEnd(context) + if self.outcard_button then + self.outcard_button:Dispose() + self.outcard_button = nil + end + local button = context.sender + + --button:RemoveFromParent() + local card = button.data + local _room = DataManager.CurrenRoom + + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + if (button.y - card.old_postion.y < -50 and _room.curren_outcard_seat == _room.self_player.seat and card.card_item ~= 0) then + self._mainView:OutCard(card.card_item) + button.touchable = false + self.outcard_button = button + else + self._area_handcard_list:AddChildAt(button, card.index) + button:TweenMove(card.old_postion, 0.2) + end +end + +function M:CheckPlayerOnlineState() + local room = DataManager.CurrenRoom + for i = 1, #room.player_list do + if room.player_list[i].line_state == 0 then + return false + end + end + return true +end +function M:Clear(bskip) + --self._ctr_state.selectedIndex = 0 + self._area_fz_list.x = self._src_fz_list.x + self._area_fz_list.y = self._src_fz_list.y + self._area_fz_list.width = self._src_fz_list.z + self._area_fz_list.height = self._src_fz_list.w + + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_outcard_list:RemoveChildren(0, -1, true) + if bskip == nil or bskip == false then + self._mask_liangpai:RemoveChildren(0, -1, true) + end + + for i=1,#self._carViewList do + self._carViewList[i].card:Dispose() + end + self._carViewList = {} + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhougui/Protocol.lua b/lua_probject/extend_project/extend/majiang/chaozhougui/Protocol.lua new file mode 100644 index 00000000..21de5e56 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhougui/Protocol.lua @@ -0,0 +1,51 @@ +local Protocol = { + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌 + GAME_DIS_CARD = "611", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- 提示选择行为 + GAME_ACTION = "612", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 小结算 + GAME_EVT_RESULT1 = "817", + + -- 大结算 + GAME_EVT_RESULT2 = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + + -- 抓鸟事件 + GAME_EVT_NIAO = "821", + + --买马或罚马 + GAME_EVT_MAI_NIAO = "20822", + + -- 飘鸟提示 + GAME_EVT_PIAOTIP = "833", + + -- 飘鸟事件 + GAME_EVT_PIAO = "834", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/chaozhougui/RecordEvent.lua b/lua_probject/extend_project/extend/majiang/chaozhougui/RecordEvent.lua new file mode 100644 index 00000000..09748550 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/chaozhougui/RecordEvent.lua @@ -0,0 +1,11 @@ +local Record_Event = { + Evt_GetCard = "GetCard", + Evt_OutCard = "OutCard", + Evt_Action = "Action", + Evt_Win = "Win", + Evt_Niao = "Niao", + Evt_Piao = "PiaoNiao", + Evt_Result = "Result", +} + +return Record_Event \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/CS_Win_Type.lua b/lua_probject/extend_project/extend/majiang/fuzhou/CS_Win_Type.lua new file mode 100644 index 00000000..ef287d99 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/fuzhou/CS_Win_Type.lua @@ -0,0 +1,40 @@ +local CS_Win_Type = { + "点炮", + "平胡", + "小七对", + "一般高", + "七星", + "龙夹背", + "清大对", + "七星一般高", + "双龙夹背", + "三龙夹背", + "十老头", + "塘子十三ㄠ", + "塘子小七对", + "大对子", + "烂牌", + "一条龙", + "落地龙", + "混一色", + "庄家", + "清一色", + "字一色", + "抢杠胡", + "杠上开花", + "杠上炮", + "双杠花", + "双杠上炮", + "三杠花", + "三杠上炮", + "四杠花", + "四杠上炮", + "塘子七星", + "塘子一般高", + "塘子七星一般高", + "塘子烂牌", + "闲家", + "塘子胡", +} +return CS_Win_Type + diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/CardCheck.lua b/lua_probject/extend_project/extend/majiang/fuzhou/CardCheck.lua new file mode 100644 index 00000000..71dd7f8e --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/fuzhou/CardCheck.lua @@ -0,0 +1,378 @@ +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + num = num == nil and 1 or num + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if(result ==num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local zhongid = 0 + + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + zhong_count = 0, + qidui = false, + hongzhong_count = 0, + qidui_pari_count = 0 +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + if (card == zhongid) then + self.zhong_count = self.zhong_count +1 + else + self.cardList[#self.cardList + 1] = card + end + end + table.sort(self.cardList) +end + +function M:tryShunzi(card) + if (card < 400 and card % 100 > 7) then + return false + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryKezi(card) + if (checkCardAndRomve(card, self.cardList, 3)) then + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (checkCardAndRomve(card, self.cardList, 2)) then + local cardGroup = {card,card} + self:push(cardGroup) + self.pair_count = 1 + return true + end + return false +end + + +function M:tryKezi1Zhong(card) + if (self.zhong_count >= 1 and checkCardAndRomve(card, self.cardList,2)) then + local cardGroup = {card,card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + return true + end + return false +end + +function M:tryKezi2Zhong(card) + if (self.zhong_count >= 2 and checkCardAndRomve(card, self.cardList,1)) then + local cardGroup = {card,zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + return true + end + return false +end + +function M:tryShunzi1Zhong(card) + if (card % 100 > 8) then + return false + end + + if (self.zhong_count < 1) then + return false + end + + if (checkCard(card + 1, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,card+1,zhongid} + self:push(cardGroup) + return true + end + + if (checkCard(card + 2, self.cardList) and ((card + 1) % 100 ~= 0)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 2, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,zhongid,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair1Zhong(card) + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 1) then + return false + end + removeCard(self.cardList, card, 1) + local cardGroup = {card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + self.pair_count = 1 + return true +end + +function M:tryPair2Zhong() + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 2) then + return false + end + local cardGroup = {zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + self.pair_count = 1 + return true +end + +function M:tryWin() + if (self.zhong_count == 4 and not self.eight_laizi) or (self.zhong_count == 8 and self.eight_laizi) then + return true + end + if (#self.cardList == 0 and self.pair_count == 1) then + return true + end + if (#self.cardList == 0 and self.pair_count == 0) then + return self:tryPair2Zhong() + end + + if (#self.cardList == 0) then + return false + end + + local activeCard = self.cardList[1] + if (self:tryPair(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + + if (self:tryKezi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi2Zhong(activeCard)) then + + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryPair1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + return false +end + +function M:checkQidui() + if (not self.qidui) then + return false + end + if ((#self.cardList + self.zhong_count) ~= 14) then + return false + end + local cardList = membe_clone(self.cardList) + self.qidui_pari_count = 0 + self.hongzhong_count = self.zhong_count + return self:isQdPari(cardList) +end + +function M:isQdPari(cardList) + if(self.qidui_pari_count == 7) then + return true + end + if (#cardList== 0) then + return true + end + local card = cardList[1] + if (cardNum(card, cardList) >= 2) then + removeCard(cardList, card, 2) + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + + if (self.hongzhong_count > 0) then + removeCard(cardList, card, 1) + self.hongzhong_count = self.hongzhong_count - 1 + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + return false +end + +local function init(self,cardInhand,addCard,isZhong,qidui,eightLaizi) + self.stack = {} + self.pair_count = 0 + self.cardList = membe_clone(cardInhand) + self.qidui = qidui + self.eight_laizi = eightLaizi + self.cardList[#self.cardList+1] = addCard + if (isZhong) then + self.zhong_count = cardNum(zhongid, self.cardList) + removeCard(self.cardList, zhongid, self.zhong_count) + end + table.sort(self.cardList) + --printlog("添加排序====>>>") + --pt(self.cardList) + return self:checkQidui() or self:tryWin() +end + +local specialCardList={400,403,406,409,412,415,418} +function M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + --printlog("isZhong",isZhong) + --printlog("qidui",qidui) + --printlog("eightLaizi",eightLaizi) + --pt(cardInhand) + local self = setmetatable({}, {__index = M}) + local tingList = {} + if not cardInhand or #cardInhand == 0 then + return tingList + end + for k=100,300,100 do + for i=1,9 do + local tem = k + i + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + --printlog("返回结果为===>>>",result) + if(result) then + tingList[#tingList + 1] = tem + end + end + end + + for j=1,#specialCardList do + local tem = specialCardList[j] + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + if(result) then + tingList[#tingList + 1] = tem + end + end + + return tingList +end + +function M.MuiltiplteCaculateTingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + zhongid=DataManager.CurrenRoom.laiziInfo[1] + local tempTingList2={} + local tempTingList1=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo[2] then + zhongid=DataManager.CurrenRoom.laiziInfo[2] + tempTingList2=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + zhongid=DataManager.CurrenRoom.laiziInfo[1] + end + local currentTingList={} + if #tempTingList1>0 and #tempTingList2>0 then + currentTingList=CombineDictionaryAndRemoveSomeItem(tempTingList1,tempTingList2) + elseif #tempTingList1>0 then + currentTingList=tempTingList1 + elseif #tempTingList2>0 then + currentTingList=tempTingList2 + end + + return currentTingList + + else + zhongid=0 + return M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + end + +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXClearingView.lua new file mode 100644 index 00000000..e4bd30a6 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXClearingView.lua @@ -0,0 +1,615 @@ +require("Game.View.ResultView") +local Hu_Type_Name = import(".CS_Win_Type") + +local EXClearingView = {} + +local M = EXClearingView + +function EXClearingView.new(blur_view) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self._full = true + ResultView.init(self, "ui://Main_Majiang/clearing") + + self._currenIndex = 0 + self._blur_view = blur_view + self._close_zone = false + self:InitMaPai() + + return self +end + +function M:InitMaPai() + self.maPaiCtr=self._view:GetController("mapai") + self.maPaiCtr.selectedIndex=0 + + self.maPaiList={} + + for i=1,8 do + local tempMP=self._view:GetChild("niao"..i) + table.insert(self.maPaiList,tempMP) + end + +end + + +function M:IsMapaiShow(niao,isShow) + if niao then + niao.visible=isShow + end +end + + +function M:SetMaPaiValue(niao,value) + if niao then + niao.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..value + end +end + +function M:SetMaPaiColor(niao,num) + niao:GetController("color").selectedIndex=num +end + +function M:HideAllMapai() + for i=1,#self.maPaiList do + self:IsMapaiShow(self.maPaiList[i],false) + self:SetMaPaiColor(self.maPaiList[i],0) + end +end + + + +function M:ShowSelectMaPai(niaoList) + if niaoList and #niaoList>0 then + self.maPaiCtr.selectedIndex=1 + self:HideAllMapai() + for i=1,#niaoList do + self:IsMapaiShow(self.maPaiList[i],true) + self:SetMaPaiValue(self.maPaiList[i],niaoList[i].card) + if niaoList[i].score>0 then + self:SetMaPaiColor(self.maPaiList[i],2) + end + end + else + self.maPaiCtr.selectedIndex=0 + end +end + + + +function M:CalculatePaixingInfo(result) + self.WinList={} + if result.info_list and #result.info_list>0 then + for i=1,#result.info_list do + if result.info_list[i].win_list and #result.info_list[i].win_list>0 then + table.insert(self.WinList,result.info_list[i].win_list) + end + end + end + + printlog("牌型列表====>>>") + pt(self.WinList) +end + + +function M:SetPaixingxiangqing(num) + for i=1,#self.PaiXingXiangQingCtrList do + if self.PaiXingXiangQingCtrList[i] then + self.PaiXingXiangQingCtrList[i].selectedIndex=num + end + end +end + + + +function M:InitData(over, room, result, total_result, callback) + + self._callback = callback + local _overCtr = self._view:GetController("over") + local btn_confirm = self._view:GetChild("btn_confirm") + local btn_result = self._view:GetChild("btn_showResult") + local btn_close = self._view:GetChild("big_result"):GetChild("btn_close") + local _btnCtr = self._view:GetController("button") + local _sdkCtr = self._view:GetController("sdk") + local ctr_type = self._view:GetController("type") + + self._view:GetChild("tex_roominfo").text = string.format("房号%s 局%s/%s %s", room.room_id, room.curren_round, room.room_config.round, os.date("%Y-%m-%d %H:%M:%S", os.time())) + self._view:GetChild("tex_gameinfo").text = string.gsub(room.room_config:GetDes2(), "\r", "") + + if result then + self:ShowSelectMaPai(result.niao) + self:CalculatePaixingInfo(result) + end + + self.PaiXingXiangQingCtrList={} + + local paixingxiangqing=self._view:GetChild("btn_detal") + local fanhuipaixing=self._view:GetChild("btn_fanhuipaixing") + fanhuipaixing.visible=false + paixingxiangqing.visible=true + paixingxiangqing.onClick:Add(function() + paixingxiangqing.visible=false + fanhuipaixing.visible=true + self:SetPaixingxiangqing(1) + end) + fanhuipaixing.onClick:Add(function() + paixingxiangqing.visible=true + fanhuipaixing.visible=false + self:SetPaixingxiangqing(0) + end) + + + if over ~= 2 then + if result.liuju then + ctr_type.selectedIndex = 3 + else + local info_list = result.info_list + for i = 1, #info_list do + local is_win = info_list[i].is_win + if is_win then + if info_list[i].seat == room.self_player.seat then + ctr_type.selectedIndex = 1 + else + ctr_type.selectedIndex = 2 + end + end + end + end + + if over == 0 then + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + btn_confirm.onClick:Add(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:DestroyWithCallback() + end) + self:AddClearItem(room, result.info_list, nil, over, result.niao, result.active_player) + elseif over == 1 then + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add(function() + self.maPaiCtr.selectedIndex=0 + _overCtr.selectedIndex = 1 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + if self._qsinfo_view then + self._qsinfo_view:Dispose() + end + end) + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + + self:AddClearItem(room, result.info_list, total_result.info_list, over, result.niao, result.active_player) + end + else + _overCtr.selectedIndex = 1 + self.maPaiCtr.selectedIndex=0 + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + + self:AddClearItem(room, nil, total_result.info_list, over) + end +end + +function M:AddClearItem(room, data, total_data,over, niao, active_player) + local n = over + 1 + local list_view1 = self._view:GetChild("player_list_1") + local list_view2 = self._view:GetChild("player_list_2") + + if 0 == over or 1 == over then + table.sort(data, function(a,b) return a.seat < b.seat end) + list_view1:RemoveChildrenToPool() + + for i=1,#data do + local item = list_view1:AddItemFromPool() + self:FillItemData(room, data[i], item, active_player, niao) + end + if #data == 3 then + list_view1.lineGap = 54 + elseif #data == 2 then + list_view1.lineGap = 108 + end + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end +end + +function M:FillItemData(room, data, item, active_player, niao) + + local _gamectr = ControllerManager.GetController(GameController) + local p = room:GetPlayerBySeat(data["seat"]) + item:GetChild("playerName").text = p.self_user.nick_name + item:GetChild("lab_hp").text=""--抓马 + local user = room:GetPlayerBySeat(data["seat"]).self_user + local head = item:GetChild('head'):GetChild('n4') + ImageLoad.Load(user.head_url, head) + + -- 手牌 + local hand_cards = data["hand_card"] + table.sort( hand_cards, ViewUtil.HandCardSort) + local hand_list_view = item:GetChild("hand_card_list") + hand_list_view:RemoveChildrenToPool() + for i=1,#hand_cards do + local card = hand_list_view:AddItemFromPool() + card.icon = "ui://Main_Majiang/202_"..hand_cards[i] + end + hand_list_view.width = 52 * #hand_cards + + local fz_card = p.fz_list + local fz_card_list = item:GetChild("fz_card_list") + fz_card_list.width = 157 * #fz_card * 0.8 + fz_card_list:RemoveChildrenToPool() + + for i=1,#fz_card do + if fz_card[i].type == FZType.Peng then + + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j=1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + elseif fz_card[i].type == FZType.Chi then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j = 1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/" .. self:GetPrefix().."202_"..fz_card[i].opcard[j] + end + elseif fz_card[i].type == FZType.Gang or fz_card[i].type == FZType.Gang_An or fz_card[i].type == FZType.Gang_Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_4") + for j=1,4 do + local card = item:GetChild("card_" .. j) + if fz_card[i].type == FZType.Gang_An and j == 4 then + card.icon = "ui://Main_Majiang/202_00" + else + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + end + end + end + + local huadd = data["hu_score"] + local gangadd = data["gang_score"] + local total = data["round_score"] + local geng_zhuan=data["geng_zhuan"] + local sp = " " + local str = "胡:"..huadd.."分" + str = str..sp.."杠:"..gangadd.."分" + + + + + + item:GetChild("score1").text = str + -- local total_score = data["total_score"] + if total >= 0 then + item:GetChild("score2").text = "+"..total + item:GetChild("score2").grayed = false + else + item:GetChild("score2").text = total + item:GetChild("score2").grayed = true + end + + + --计算牌型 + local totalPeson=DataManager.CurrenRoom.room_config.people_num-1 + local win_list = data["win_list"] + local is_win = data["is_win"] or false + local str1="" + sp="、" + if is_win then + if win_list then + if DataManager.CurrenRoom.isZiMoHu then + str1="自摸" + else + str1="接炮" + end + for i=1,#win_list do + local huName=Hu_Type_Name[win_list[i].type] + if huName then + str1=str1..sp..huName.."x"..win_list[i].score + end + + end + str1=str1.." +"..huadd.."分" + end + + else + printlog("输家============") + if DataManager.CurrenRoom.isZiMoHu then + printlog("自摸处理============") + --str1="" + if #self.WinList==1 then + for i=1,#self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + if j==1 then + str1=str1..huName.."x"..self.WinList[i][j].score + else + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + + end + end + + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + else + printlog("非自摸处理====>>>") + --点炮 一炮多响 + local yipaoduoxiang=false + if #self.WinList>1 then + yipaoduoxiang=true + end + + if yipaoduoxiang then + printlog("一炮多响====>>>") + str="点炮" + local allTypeList={} + local isHas=false + for i=1,#self.WinList do + for j=1,#self.WinList[i] do + isHas=IsHasDictionary(self.WinList[i][j].type,allTypeList) + if isHas==false then + table.insert(allTypeList,self.WinList[i][j].type) + end + end + + end + + if #allTypeList>0 then + for i=1,#allTypeList do + local huName=Hu_Type_Name[allTypeList[i]] + if huName then + str1=str1..huName.."、" + end + end + str1=str1.." "..huadd.."分" + end + + else + + if p.self_user.account_id == active_player and is_win == false and not data["liuju"] then + str1="点炮" + if #self.WinList==1 then + for i=1,# self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + end + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + end + + end + + + end + end + + -- + printlog("牌型计算==>>>",str1) + + if data["ming_gang_num"]>0 then + str1=str1.." 明杠x"..data["ming_gang_num"] + end + + if data["an_gang_num"]>0 then + str1=str1.." 暗杠x"..data["an_gang_num"] + end + + if data["dian_gang_num"]>0 then + str1=str1.." 点杠x"..data["dian_gang_num"] + end + + if gangadd~=0 then + if gangadd>0 then + str1=str1.." +"..gangadd.."分" + else + str1=str1.." "..gangadd.."分" + end + + end + + if data["ma_geng_gong"] and data["ma_geng_gong"]~=0 then + if data["ma_geng_gong"]>0 then + str1 = str1.." 马跟杠:+"..data["ma_geng_gong"].."分" + else + str1 = str1.." 马跟杠:"..data["ma_geng_gong"].."分" + end + + end + + if geng_zhuan and geng_zhuan~=0 then + if geng_zhuan>0 then + str1 = str1.." 跟庄:+"..geng_zhuan.."分" + else + str1 = str1.." 跟庄:"..geng_zhuan.."分" + end + + end + + + + + + item:GetChild("score3").text=str1 + item:GetChild("score4").text=str1 + local paixingCtr=item:GetController("detail") + table.insert(self.PaiXingXiangQingCtrList,paixingCtr) + ------------------------- + + local hp_nonnegative = room:checkHpNonnegative() + item:GetController("nonnegative").selectedIndex = hp_nonnegative and 1 or 0 + if hp_nonnegative then + local hp_info = data.hp_info + local ctr_hp_limit = item:GetController("hp_limit") + local hp = d2ad(hp_info.round_actual_hp) + if hp >= 0 then hp = "+" .. tostring(hp) end + item:GetChild("tex_hp").text = hp + ctr_hp_limit.selectedIndex = hp_info.upper_limit and 1 or 0 + end + + + item:GetController("win").selectedIndex = is_win and 0 or 1 + if p.self_user.account_id == active_player and is_win == false and total < 0 then + item:GetController("win").selectedIndex = 2 + end + + if is_win then + item:GetController("bg").selectedIndex=1 + else + item:GetController("bg").selectedIndex=0 + end + local win_card = item:GetChild("win_card") + win_card.icon = "ui://Main_Majiang/202_"..data["win_card"] + + if niao and #niao>0 then + local currentNiaoList=self:CalculateNiao(niao ,data["seat"]) + if currentNiaoList and #currentNiaoList>0 then + local lst_niao = item:GetChild("list_niao") + lst_niao:RemoveChildrenToPool() + for i = 1, #currentNiaoList do + if currentNiaoList[i].score > 0 then + local card_niao = lst_niao:AddItemFromPool() + card_niao.icon = "ui://Main_Majiang/202_" .. currentNiaoList[i].card + end + end + end + end + + + + if p.seat == room.banker_seat then + item:GetController("bank").selectedIndex = 1 + end +end + +function M:CalculateNiao(niaoList,seat) + local tempNiao={} + for i=1,#niaoList do + if niaoList[i].seat==seat then + table.insert(tempNiao,niaoList[i]) + end + end + return tempNiao +end + + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + player_list[i].id = user.account_id + player_list[i].hp_info = data[i].hp_info + player_list[i].score = data[i].total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + + local settle_log = data[i].settle_log + player_list[i].param = {} + player_list[i].param[1]={} + player_list[i].param[1].key = "自摸次数:" + player_list[i].param[1].value = tostring(data[i].settle_log.zimo) + player_list[i].param[2]={} + player_list[i].param[2].key = "接炮次数:" + player_list[i].param[2].value = tostring(data[i].settle_log.jie_pao) + player_list[i].param[3]={} + player_list[i].param[3].key = "点炮次数:" + player_list[i].param[3].value = tostring(data[i].settle_log.dian_pao) + player_list[i].param[4]={} + player_list[i].param[4].key = "暗杠次数:" + player_list[i].param[4].value = tostring(data[i].settle_log.an_kong) + player_list[i].param[5]={} + player_list[i].param[5].key = "明杠次数:" + player_list[i].param[5].value = tostring(data[i].settle_log.ming_kong) + end + + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + local big_result = self._view:GetChild("big_result") + big_result:GetChild("txt_room_info").text = string.format("%s 房号%s 局%s/%s", os.date("%Y/%m/%d", os.time()), room.room_id, room.curren_round, room.room_config.round) + local lst_p = big_result:GetChild("player_list") + if #player_list == 3 then + lst_p.columnGap = 108 + elseif #player_list == 2 then + lst_p.columnGap = 208 + end + + self:InitBigResult(room, 30) + local show_detail = room.hpOnOff == 1 + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + com_p:GetController("jsicon").selectedIndex=i-1 + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + if show_detail then + local score = 0 + if com_p:GetController("pn").selectedIndex == 0 then + score = com_p:GetChild("txt_navigate").text + else + score = com_p:GetChild("txt_positive").text + end + score = score / room.score_times + com_p:GetChild("tex_detail_score").text = string.format("%s × %s倍", score, room.score_times) + end + end + + if room.group_id ~= 0 then + big_result:GetController("group").selectedIndex = 1 + end + DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild("btn_head") + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= "" then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end + +local prefix +function M:GetPrefix() + -- if not prefix then + prefix = get_majiang_prefix(10) + -- end + return prefix +end + +function M:DestroyWithCallback() + if self._callback then + self._callback() + end + self:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXGameController.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXGameController.lua new file mode 100644 index 00000000..6b8e0459 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXGameController.lua @@ -0,0 +1,385 @@ +local TX_Protocol = import(".Protocol") +local FZTipList = require("main.majiang.FZData") +local TX_GameEvent = import(".GameEvent") + +local M = {} + +--- Create a new GameController +function M.new() + setmetatable(M, { __index = GameController }) + local self = setmetatable({}, { __index = M }) + self:init("抚州麻将") + self.class = "TX_GameController" + return self +end + +function M:init(name) + GameController.init(self, name) + + self._eventmap[TX_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[TX_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[TX_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[TX_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[TX_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[TX_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + self._eventmap[TX_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[TX_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[TX_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[TX_Protocol.GAME_EVT_RESULT2] = self.OnEventResult2 + self._eventmap[TX_Protocol.GAME_EVT_NIAO] = self.OnEventNiao + self._eventmap[TX_Protocol.GAME_EVT_PIAOTIP] = self.OnEventPiaoTip + self._eventmap[TX_Protocol.GAME_EVT_PIAO] = self.OnEventPiao + + self._eventmap[TX_Protocol.GAME_EVT_GANGZI] = self.OnEventGangCards + self._eventmap[TX_Protocol.GAME_EVT_BUGANG] = self.OnEventBuGang +end + +local __pre_delete_card = false +-- 发送出牌指令到服务器 +function M:SendOutCard(card, callback) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_DIS_CARD, _data) + + -- 进行预删牌处理 + local p = _room.self_player + _room.curren_outcard_seat = -1 + list_remove(p.card_list, card) + table.sort(p.card_list, ViewUtil.HandCardSort) + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list + 1] = card + __pre_delete_card = true + callback() +end + +function M:SendGangCard(card) + local _data = {} + _data["card"] = card + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_EVT_DOGANG, _data) +end + +function M:OnEventGangCards(evt_data) + printlog("OnEventGangCards") + pt(evt_data) + DispatchEvent(self._dispatcher, TX_GameEvent.SendGangZi, evt_data["gangzi1"], evt_data["gangzi2"], + evt_data["gangnum"], true) +end + +function M:OnEventBuGang(evt_data) + printlog("OnEventBuGang") + pt(evt_data) + DispatchEvent(self._dispatcher, TX_GameEvent.EventBuGang, evt_data["info"][1], evt_data["info"][2], true) +end + +-- 发送放子选择到服务器 +function M:SendAction(id) + local _data = {} + _data["id"] = id + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_ACTION, _data) +end + +function M:OnEventSendCards(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + if not _room.room_config.piao_niao or _room.self_player.entrust then + _room.curren_round = _room.curren_round + 1 + end + if _room.curren_round > 0 then _room.playing = true end + + printlog("开始发牌===========>>>") + pt(evt_data) + + local room = DataManager.CurrenRoom + --printlog(evt_data.laiziCard) + --printlog(evt_data.laiziCard2) + --printlog(evt_data.laiziCardBefore) + --printlog(evt_data.laiziCard2Before) + + + DispatchEvent(self._dispatcher, TX_GameEvent.SendGangZi, 102, 103, 0, true) + + + + -- _room.SelfPlayer.AutoOutCard = false + local handcards = evt_data["card_list"] + local p = _room.self_player + local seat = evt_data["bank_seat"] + self._cacheEvent:Enqueue(function() + _room.banker_seat = seat + for i = 1, #_room.player_list do + _room.player_list[i].hand_left_count = 13 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + end + p.card_list = handcards + self._room.self_player.hand_left_count = #handcards + table.sort(handcards, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher, TX_GameEvent.SendCards, p) + end) +end + +function M:OnEventOutCard(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local ting_list = nil + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + _room.last_outcard_seat = seat + if seat == _room.self_player.seat and __pre_delete_card then + __pre_delete_card = false + else + if seat == _room.self_player.seat then + list_remove(p.card_list, card) + table.sort(p.card_list, ViewUtil.HandCardSort) + end + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list + 1] = card + DispatchEvent(self._dispatcher, TX_GameEvent.OutCard, p, card) + end + end) +end + +function M:OnEventTakeCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + p.hand_left_count = p.hand_left_count + 1 + if (seat == _room.self_player.seat) then + _room.self_player.card_list[#_room.self_player.card_list + 1] = card + -- table.sort( _room.self_player.card_list, ViewUtil.HandCardSort ) + end + DispatchEvent(self._dispatcher, TX_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnEventOutHint(evt_data) + self._cacheEvent:Enqueue(function() + self._room.curren_outcard_seat = self._room.self_player.seat + DispatchEvent(self._dispatcher, TX_GameEvent.OutHint) + end) +end + +function M:OnEventTurn(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + -- self._room.curren_outcard_seat = seat + DispatchEvent(self._dispatcher, TX_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + local weight = evt_data["weight"] + for i = 1, #list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + tip.opcard = dtip["opcard"] + + -- if (dtip["opcard"]) then + -- local opcard = dtip["opcard"] + -- tip.OpCard = opcard + -- tip.OpCard[3] = tip.Card + -- table.sort(tip.OpCard) + -- end + tiplist:AddTip(tip) + end + DispatchEvent(self._dispatcher, TX_GameEvent.FZTips, tiplist, weight) + end) +end + +function M:OnEventFzAction(evt_data) + local _room = self._room + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local type = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + -- local openkong = evt_data["openkong"] + + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local fz = nil + local index = -1 + local ftype = type + if (ftype == FZType.Gang_Peng) then + for i = 1, #p.fz_list do + if (p.fz_list[i].card == card) then + p.fz_list[i].card = card + fz = p.fz_list[i] + fz.type = type + index = i - 1 + break + end + end + end + fz = {} + fz.card = card + fz.type = type + fz.active_card = actice_card + if (index == -1) then + if (ftype == FZType.Chi) then + local data = {} + data[1] = opcard[1] + data[2] = card + data[3] = opcard[2] + fz.opcard = data + end + p.fz_list[#p.fz_list + 1] = fz + end + fz.from_seat = from_seat + local remove_num = #opcard + + if (p == _room.self_player) then + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + end + + p.hand_left_count = p.hand_left_count - remove_num + if from_seat ~= p.seat then + -- if (fz.Type == FZType.Chi) then card = actice_card end + local fp = _room:GetPlayerBySeat(from_seat) + table.remove(fp.outcard_list, #fp.outcard_list) + end + + DispatchEvent(self._dispatcher, TX_GameEvent.FangziAction, fz, p, index) + end) +end + +function M:OnEventHu(evt_data) + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local win_card = evt_data["win_card"] + local win_list = evt_data["win_list"] + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + table.sort(win_p.card_list, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher, TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], win_card, cards, + win_list) + end) +end + +function M:OneventResult1(evt_data) + local over = evt_data.type + printlog("OneventResult1") + pt(evt_data) + --0:小结算 1:小大结算 2:大结算 + self._room._reload_flag = false + self._room.playing = false + if 0 == over then + local result = evt_data.result + self._cacheEvent:Enqueue(function() + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + DispatchEvent(self._dispatcher, TX_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil, true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher, TX_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +-- function M:OnEventResult2(evt_data) +-- DataManager.CurrenRoom.Over = true +-- ControllerManager.SetGameNetClient(nil,true) +-- local info_list = evt_data["info_list"] +-- if self._result ~= nil then +-- self._cacheEvent:Enqueue(function() +-- self:OneventResult1(self._result) +-- self._result = nil +-- end) +-- end +-- self._cacheEvent:Enqueue(function() +-- DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, info_list) +-- ControllerManager.ChangeController(LoddyController) +-- end) +-- end + +function M:OnEventNiao(evt_data) + local list = evt_data["niao"] + local start_seat = evt_data["start_seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher, TX_GameEvent.EventNiao, list, start_seat) + end) +end + +function M:OnEventPiaoTip() + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + self._cacheEvent:Enqueue(function() + if not self._room._reload_flag then + self._room.curren_round = self._room.curren_round + 1 + end + self._room.playing = true + DispatchEvent(self._dispatcher, TX_GameEvent.EvnetPiaoTip, evt_data) + end) +end + +function M:OnEventPiao(evt_data) + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher, TX_GameEvent.EvnetPiao, evt_data.seat, evt_data.num) + end) +end + +function M:GetPosString(seat) + if DataManager.CurrenRoom.room_config.people_num ~= 4 then return "" end + if seat == 1 then + return "北" + elseif seat == 2 then + return "西" + elseif seat == 3 then + return "南" + elseif seat == 4 then + return "东" + end +end + +function M:Discard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + -- list_remove(_room.SelfPlayer.Cards,card) + -- table.sort(_room.SelfPlayer.Cards) + _client:send(Protocol.Game_Da, _data) +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXGameInfo.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXGameInfo.lua new file mode 100644 index 00000000..839d7671 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXGameInfo.lua @@ -0,0 +1,183 @@ +local EXGameInfo = {} + +local M = EXGameInfo + + +function EXGameInfo.new(blur_view) + setmetatable(M, { __index = IGameInfo }) + local self = setmetatable({}, { __index = M }) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/majiang/fuzhou/ui/Info_MJ_FuZhou") + return self +end + +function M:FillData() + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 3 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_FuZhou/Cgm_create_room") + + if oldGameVersion == 2 then + self._config:GetController("xipai").selectedIndex = 0 + + self.xipaiValueText = self._config:GetChild('xipaifen') + self.xipaiValueText.text = 1 + self.xipaiValue = 1 + + self.anchouValueText = self._config:GetChild('anchoufen') + self.anchouValueText.text = 1 + self.anchouValue = 1 + + local btn_cr = self._config:GetChild('sdsrbtn') + btn_cr.onClick:Set( + function() + local gniv = GroupNumberInputView_Game.new(nil, function(num) + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == -1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1, "输入数据异常!") + end + + self.xipaiValueText.text = value / 1000 + self.xipaiValue = value / 1000 + end, 3, nil) + gniv:Show() + end + ) + + + local btn_cr2 = self._config:GetChild('anchoubtn') + btn_cr2.onClick:Set( + function() + local gniv = GroupNumberInputView_Game.new(nil, function(num) + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == -1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1, "输入数据异常!") + end + + self.anchouValueText.text = value / 1000 + self.anchouValue = value / 1000 + end, 3, nil) + gniv:Show() + end + ) + end +end + +local _help_url = "ui://Info_MJ_FuZhou/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_MJ_FuZhou/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_MJ_FuZhou/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list = {} +function M:GetPlayList() + return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + 1 + local people = _config:GetController("play_list").selectedIndex + 2 + + local fengding = _config:GetController("fengding").selectedIndex + local wanfa = _config:GetController("wanfa").selectedIndex + local qiduijiafan = _config:GetChild("btn_qidui").selected + local shoudailongjiafan = _config:GetChild("btn_shoudailong").selected + local loudilongjiafan = _config:GetChild("btn_loudilong").selected + local bunengchi = _config:GetChild("btn_bunengchi").selected + local doudizhu = _config:GetChild("btn_doudizhu").selected + local doudizhufanbei = _config:GetChild("btn_doudizhufanbei").selected + local xi_pai = false + local xi_paifen = 0 + if _config:GetChild("xipai") then + xi_pai = _config:GetChild("xipai").selected + end + + + + ------ + local _data = {} + _data["opt"] = round + _data["maxPlayers"] = people + + _data["fengding"] = fengding + _data["wanfa"] = wanfa + _data["qiduijiafan"] = qiduijiafan + _data["shoudailongjiafan"] = shoudailongjiafan + _data["loudilongjiafan"] = loudilongjiafan + _data["bunengchi"] = bunengchi + _data["doudizhu"] = doudizhu + _data["doudizhufanbei"] = doudizhufanbei + _data['xi_pai'] = xi_pai + + local xi_pai_score = 0 + local an_chou_score = 0 + if oldGameVersion == 2 then + xi_pai_score = self.xipaiValue + an_chou_score = self.anchouValue + end + + _data['xi_pai_score'] = xi_pai_score * 1000 + _data['an_chou_score'] = an_chou_score * 1000 + + + return _data +end + +function M:LoadConfigData(data) + --printlog("加载房间配置=========>>>") + --pt(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt - 1 + _config:GetController("play_list").selectedIndex = data.maxPlayers - 2 + + + _config:GetController("fengding").selectedIndex = data.fengding + + _config:GetController("wanfa").selectedIndex = data.wanfa + _config:GetChild("btn_qidui").selected = data.qiduijiafan + _config:GetChild("btn_shoudailong").selected = data.shoudailongjiafan + _config:GetChild("btn_loudilong").selected = data.loudilongjiafan + _config:GetChild("btn_bunengchi").selected = data.bunengchi + + _config:GetChild("btn_doudizhu").selected = data.doudizhu + _config:GetChild("btn_doudizhufanbei").selected = data.doudizhufanbei + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected = data.xi_pai + end + + if oldGameVersion == 2 then + self.xipaiValueText.text = data.xi_pai_score / 1000 + self.xipaiValue = data.xi_pai_score / 1000 + + self.anchouValueText.text = data.an_chou_score / 1000 + self.anchouValue = data.an_chou_score / 1000 + end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua new file mode 100644 index 00000000..c996fab9 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXMainView.lua @@ -0,0 +1,819 @@ +local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local MJMainView = require("main.majiang.MJMainView") +local EXClearingView = import(".EXClearingView") +local TX_GameEvent = import(".GameEvent") +local HuTipView = import("main.majiang.HuTipView") +local SettingView = import("main.majiang.MJSettingViewNew") +local PlayerInfoView = import(".EXPlayerInfoView") +local M = {} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M, { __index = MJMainView }) + local self = setmetatable({}, { __index = M }) + self.class = "MainView" + self.asset_group = "FuZhou_MJ" + self:init() + ViewUtil.PlayMuisc(self.asset_group, "extend/majiang/fuzhou/sound/bg.mp3") + return self +end + +function M:InitView(url) + local room = self._room + self._style = 1 + self._gps_style = 1 + self._full = true + UIPackage.AddPackage("extend/majiang/fuzhou/ui/Extend_MJ_FuZhou") + MJMainView.InitView(self, "ui://Main_Majiang/Main_" .. room.room_config.people_num .. "_s2") + self._hu_tip = HuTipView.new(self) + + self._view:GetChild('wanfa_text').text = room.room_config.people_num .. '人个旧麻将 ' .. room.score_times .. '倍' + + self.selectLaiziBtn = self._view:GetChild('selectlaizi') + self.Laizi1Btn = self._view:GetChild('selectgang1') + self.Laizi2Btn = self._view:GetChild('selectgang2') + self._view:GetChild("n108").visible = true + self.Laizi1Btn.visible = true + self.Laizi2Btn.visible = true + self.bugangnum = self._view:GetChild("bugangnum") + + self:PlayerChangeLineState() + + if room.playing or room.curren_round > 0 then + self:ReloadRoom() + end +end + +function M:__BuGang(card1, card2, callback) + local _gang_tip_choice = UIPackage.CreateObject("Extend_MJ_FuZhou", "Gang_tip_choice") + _gang_tip_choice.visible = true + + local gangcard1 = _gang_tip_choice:GetChild("card1") + local gangcard2 = _gang_tip_choice:GetChild("card2") + + + gangcard1.icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. card1) + gangcard2.icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. card2) + + gangcard1.onClick:Add(function() + callback(card1) + end) + + gangcard2.onClick:Add(function() + callback(card2) + end) + + _gang_tip_choice.xy = Vector2((self._view.width - _gang_tip_choice.width) / 2, + (self._view.height - _gang_tip_choice.height) / 2) + self._view:AddChild(_gang_tip_choice) + self._gang_tip_choice = _gang_tip_choice +end + +function M:SetShowGangZiProcess(currentLaizi1ID, currentLaizi2ID, bugangnum, isShowAnim) + --zhongid=currentLaizi1ID + if isShowAnim == nil then isShowAnim = false end + + self:SetGangZiCard(self.Laizi1Btn, currentLaizi1ID) + self:SetGangZiCard(self.Laizi2Btn, currentLaizi2ID) + self:IsShowGangZi(self.Laizi1Btn, true) + self:IsShowGangZi(self.Laizi2Btn, true) + self.bugangnum.text = "当前 " .. bugangnum .. " 杠" +end + +function M:HideAllGangZiCard() + self.Laizi1Btn.visible = false + self.Laizi2Btn.visible = false + self.selectLaiziBtn.visible = false + --self.LaiziBG.visible=false +end + +function M:SetGangZiCard(btn, cardId) + btn.icon = 'ui://Main_Majiang/' .. get_majiang_prefix(DataManager.CurrenRoom.game_id) .. "201_" .. cardId +end + +function M:IsShowGangZi(btn, isShow) + btn.visible = isShow +end + +function M:UpdateRound() + self._view:GetChild("tex_round1").text = self._room.curren_round + self._view:GetChild("tex_round2").text = self._room.room_config.round +end + +function M:InitPlayerInfoView() + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem, self) + tem.visible = false + end +end + +function M:NewMJPlayerCardInfoView(view, index) + if index == 1 then + return MJPlayerSelfCardInfoView.new(view, self) + end + return MJPlayerCardInfoView.new(view, self) +end + +function M:EventInit() + -- UIPackage.AddPackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong") + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _gcm_outcard_url = UIPackage.GetItemURL("Main_Majiang", "Gcm_OutCard") + local _player_info = self._player_info + local _gamectr = self._gamectr + + + + _gamectr:AddEventListener(TX_GameEvent.SendLaiZi, function(...) + local arg = { ... } + self:SetShowLaiZiProcess(arg[1], arg[2], arg[3], arg[4]) + end) + + _gamectr:AddEventListener(TX_GameEvent.SendGangZi, function(...) + local arg = { ... } + self:SetShowGangZiProcess(arg[1], arg[2], arg[3], arg[4]) + end) + + _gamectr:AddEventListener(TX_GameEvent.EventBuGang, function(...) + local arg = { ... } + self:__BuGang(arg[1], arg[2], + function(id) + printlog(id) + _gamectr:SendGangCard(id) + self:__CloseGangTip() + end) + end) + + + + _gamectr:AddEventListener(TX_GameEvent.SendCards, function(...) + -- self:ShowHuTip() + self:UpdateRound() + self._state.selectedIndex = 1 + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateHandCard() + end + end) + _gamectr:AddEventListener(TX_GameEvent.EventTurn, function(...) + local arg = { ... } + self._left_time = 15 + local seat = arg[1] + self:UpdateCardBox(self:GetPos(seat)) + -- if seat == self._room.self_player.seat then + -- self:ShowHuTip() + -- end + end) + + _gamectr:AddEventListener(TX_GameEvent.OutHint, function(...) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:UpdateHandCard(true) + end) + + local _gcm_outcard_url = "ui://Main_Majiang/Gcm_OutCard" + _gamectr:AddEventListener(TX_GameEvent.OutCard, function(...) + self:__CloseTip() + self._left_time = 0 + local arg = { ... } + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:RemoveCursor() + info:UpdateHandCard() + local outcard = UIPackage.CreateObjectFromURL(_gcm_outcard_url) + info:UpdateOutCardList(outcard, card, self._cursor) + self:PlaySound("FuZhou_MJ", p.self_user.sex, tostring(card)) + self:PlayMJSound("chupai.mp3") + if seat == _room.self_player.seat then + _room.curren_outcard_seat = -1 + end + end) + _gamectr:AddEventListener(TX_GameEvent.GetCard, function(...) + self:__CloseTip() + local arg = { ... } + local seat = arg[1] + local card = arg[2] + -- self._tex_leftTime.text = arg[3] + self._tex_LeftCard.text = arg[3] + -- self:UpdateRoomInfo() + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateHandCard(true) + end) + + _gamectr:AddEventListener(TX_GameEvent.FZTips, function(...) + local arg = { ... } + local _tip = arg[1] + local weight = arg[2] + self:__FangziTip(_tip, weight) + end) + + _gamectr:AddEventListener(TX_GameEvent.FangziAction, handler(self, self.OnFangziAction)) + + _gamectr:AddEventListener(TX_GameEvent.ZPHuCard, function(...) + self._left_time = 0 + self:UpdateCardBox(0) + self:__CloseTip() + self._popEvent = false + local arg = { ... } + local win_seat = arg[1] + local lose_seat = arg[2] + local win_card = arg[3] + local cards = arg[4] + local win_list = arg[5] + local index = self:GetPos(win_seat) + local info = self._player_card_info[index] + self:RemoveCursor() + info:UpdateHandCard(true, true) + + local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card") + obj_win_card.icon = "ui://Main_Majiang/202_" .. win_card + obj_win_card:GetController("bg").selectedIndex = 1 + info._view:AddChild(obj_win_card) + obj_win_card:Center() + + local url, pNode + local player = _room:GetPlayerBySeat(win_seat) + if win_seat ~= _room.self_player.seat then + url = "ui://Main_Majiang/别人胡" + pNode = info._mask_liangpai + elseif win_seat == _room.self_player.seat then + url = "ui://Main_Majiang/自己胡牌" + pNode = self._view + end + if win_seat == lose_seat then + url = "ui://Main_Majiang/eff_zimo" + end + + local he = UIPackage.CreateObjectFromURL(url) + pNode:AddChild(he) + he:GetTransition("t2"):Play() + he:Center() + if _room.room_config.people_num == 2 then + if win_seat ~= _room.self_player.seat then + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + end + + if win_seat == _room.self_player.seat then + printlog("自己位置=====") + he:Center() + elseif url == "ui://Main_Majiang/eff_zimo" then + printlog("自摸地址==========") + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + + + + --- + local isZiMo = win_seat == lose_seat + DataManager.CurrenRoom.isZiMoHu = isZiMo + local hu_sound = isZiMo and ("zimo" .. math.random(1, 3)) or ("hu" .. math.random(1, 2)) + printlog("声音====>>>", hu_sound) + self:PlaySound("FuZhou_MJ", player.self_user.sex, hu_sound) + + local pNode = info._view + local url = "eff_list1" + local he_list = UIPackage.CreateObjectFromURL("ui://Extend_MJ_FuZhou/" .. url) + he_list.touchable = false + pNode:AddChild(he_list) + he_list:Center() + + coroutine.start(function() + for i = 1, #win_list do + local tem = win_list[i] + if tem.type > 0 and tem.type < 32 then + local com_name = "he" .. tem.type + local item = he_list:GetChild("list"):AddItemFromPool("ui://Extend_MJ_FuZhou/" .. com_name) + coroutine.wait(0.3) + end + end + + coroutine.wait(2) + obj_win_card:Dispose() + he:Dispose() + he_list:Dispose() + self._popEvent = true + end) + end) + + _gamectr:AddEventListener(TX_GameEvent.EventNiao, function(...) + local arg = { ... } + self._popEvent = false + local list = arg[1] + local start_seat = arg[2] + -- ViewUtil.PlaySound("FuZhou_MJ", "extend/majiang/chaozhou/sound/zhuaniao.mp3") + coroutine.start(self.RunNiao, self, list, start_seat) + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult1, function(...) + self._popEvent = false + self:__CloseTip() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = { ... } + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local niao = result.niao + if liuju then + local le = UIPackage.CreateObjectFromURL("ui://Main_Majiang/LiuJu") + self._view:AddChild(le) + le:Center() + le:GetTransition("t0"):Play() + coroutine.start(function() + coroutine.wait(1) + le:Dispose() + end) + end + self:RemoveCursor() + if self._clearingView == nil then + self._clearingView = EXClearingView.new(self._root_view) + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + self._popEvent = true + end) + end + + if _room.curren_round ~= _room.room_config.round then + -- if #niao == 0 then self._view:GetChild("n13").visible = false end + self._clearingView:InitData(0, _room, result, nil, function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:ResetCardType() + if _room:checkHpNonnegative() then + p.cur_hp = data[i].hp_info.cur_hp + end + info:UpdateScore() + info._view:GetChild("zhanji").visible = true + local num = data[i].hp_info.total_hp + if num > 0 then + info._view:GetController("text_color").selectedIndex = 0 + info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + else + info._view:GetController("text_color").selectedIndex = 1 + info._view:GetChild("text_jifen").text = d2ad(num) + end + + info._view:GetChild("mask_piao").title = "" + info._view:GetController("piao_niao").selectedIndex = 0 + p.fz_list = {} + end + DataManager.CurrenRoom.self_player.card_list = {} + self._state.selectedIndex = 2 + self._clearingView = nil + end) + end + self._player_card_info[1]:ShowHuTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult2, function(...) + self:UnmarkSelfTuoguan() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = { ... } + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + self._clearingView = EXClearingView.new() + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + end) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiaoTip, function() + self:UpdateRound() + self._tex_LeftCard.text = "0" + self._state.selectedIndex = 1 + self:__PiaoNiaoTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiao, function(...) + local arg = { ... } + local seat = arg[1] + local num = arg[2] + if num > 0 then + local head_info = self._player_info[self:GetPos(seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. num + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + if seat == _room.self_player.seat then + if self._com_piao and _room.self_player.entrust then + self._com_piao:Dispose() + self._com_piao = nil + _room.curren_round = _room.curren_round - 1 + end + end + end) +end + +function M:OutCard(card) + if card ~= 0 then + printlog("当前出牌为===>>>" .. card) + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card, function() + local info = self._player_card_info[1] + self:RemoveCursor() + info:UpdateHandCard() + + info:UpdateOutCardList(nil, card, self._cursor) + self:PlaySound("FuZhou_MJ", self._room.self_player.self_user.sex, tostring(card)) + self:PlayMJSound("chupai.mp3") + -- self:ShowHuTip() + end) + else + printlog("鬼牌不能出===>>>" .. card) + end +end + +function M:__FangziTip(tip, weight) + printlog("__FangziTip") + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject("Main_Majiang", "Gcm_action_tips") + _chipeng_tip:GetController("hide_bg").selectedIndex = 1 + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + -- self._player_card_info[self:GetPos(p.seat)] + + local _lit_fanzi = _chipeng_tip:GetChild("lit_fanzi") + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + printlog(tip.tip_map_type) + pt(_tlist) + local tip_hu = false + local count = #_tlist + table.sort(_tlist) + local isHu = false + for k = 1, #_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + local url = "ui://Main_Majiang/Btn_fztip" + local td_weight = td.weight + if td_weight == 16 then td_weight = 8 end + if td_weight == 8 then url = "ui://Main_Majiang/Btn_hu" end + local btn_t = _lit_fanzi:AddItemFromPool(url) + btn_t.icon = "ui://Main_Majiang/fztip_" .. td_weight + btn_t.data = { tip, td } + btn_t.onClick:Add(self.__TipAction, self) + end + + -- if not (tonumber(weight) >= 16) then + local _btn_pass = _lit_fanzi:AddItemFromPool("ui://Main_Majiang/Btn_pass") + -- local _btn_pass = _chipeng_tip:GetChild("btn_pass") + _btn_pass.onClick:Set(function() + if tonumber(weight) >= 8 then + local guo_msg = MsgWindow.new(self._root_view, "确定要点过吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end) + guo_msg:Show() + else + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end) + -- end + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() +end + +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local list = tip.tip_map_type[td.weight] + printlog("__TipAction") + pt(list) + if (#list > 1) then + self:_ChiView(list, function(id) + _gamectr:SendAction(id) + self:__CloseTip() + end) + self._chipeng_tip.visible = false + return + end + + _gamectr:SendAction(td.id) + if (self._chipeng_tip == nil) then return end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil +end + +function M:_ChiView(tiplist, callback) + self._chipeng_tip.visible = false + printlog("_ChiView") + pt(tiplist) + local _pop_tip_choice = UIPackage.CreateObject("Extend_MJ_FuZhou", "Pop_tip_choice") + local list_choose1 = _pop_tip_choice:GetChild("Lst_choose") + local list_choose2 = _pop_tip_choice:GetChild("Lst_choose2") + local crossCtr = _pop_tip_choice:GetController("state") + crossCtr.selectedIndex = #tiplist == 3 and 0 or + (#tiplist == 2 and 1 or (#tiplist == 4 and 2 or (#tiplist == 5 and 3 or 4))) + _pop_tip_choice:GetChild("Btn_cross").onClick:Add(function() + _pop_tip_choice:Dispose() + self._chipeng_tip.visible = true + end) + list_choose1:RemoveChildrenToPool() + list_choose2:RemoveChildrenToPool() + for i = 1, #tiplist do + local list_choose = i <= 3 and list_choose1 or list_choose2 + local item_choose = list_choose:AddItemFromPool() + item_choose:GetController("type").selectedIndex = (1 == tiplist[i].weight or 2 == tiplist[i].weight) and 1 or 0 + if tiplist[i].weight ~= 1 then + for j = 1, 4 do + item_choose:GetChild("card" .. j).icon = UIPackage.GetItemURL("Main_Majiang", + self:GetPrefix() .. "202_" .. tiplist[i].card) + end + else + local tem = {} + table.insert(tem, tiplist[i].opcard[1]) + table.insert(tem, tiplist[i].opcard[2]) + local tcard = tiplist[i].card + table.insert(tem, tcard) + table.sort(tem, function(a, b) + return a < b + end) + item_choose:GetChild("card1").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. + tem[1]) + item_choose:GetChild("card2").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. + tem[2]) + item_choose:GetChild("card4").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. + tem[3]) + local cardpos = tem[2] > tcard and 1 or (tem[2] < tcard and 4 or 2) + item_choose:GetChild("card" .. cardpos):GetController("color").selectedIndex = 1 + end + item_choose.onClick:Add(function() + callback(tiplist[i].id) + end) + end + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width) / 2, + (self._view.height - _pop_tip_choice.height) / 2) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:OnFangziAction(...) + self:__CloseTip() + local arg = { ... } + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local index = arg[3] + printlog("OnFangziAction") + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject("Extend_MJ_FuZhou", "FzEffect") + if fz.type == FZType.Peng then + self:PlaySound("FuZhou_MJ", player.self_user.sex, "peng" .. math.random(1, 3)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "碰框") + elseif fz.type == FZType.Chi then + self:PlaySound("FuZhou_MJ", player.self_user.sex, "chi" .. math.random(1, 3)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "吃") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "吃") + else + self:PlaySound("FuZhou_MJ", player.self_user.sex, "gang" .. math.random(1, 2)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "杠框") + end + effect.touchable = false + effect:GetTransition("t2"):Play() + pNode:AddChild(effect) + coroutine.start(function() + coroutine.wait(0.3) + self._popEvent = true + end) + coroutine.start(function() + coroutine.wait(2) + effect:Dispose() + end) + + self:RemoveCursor() + if (player.seat ~= fz.from_seat) then + local fs_info = _player_card_info[self:GetPos(fz.from_seat)] + fs_info:UpdateOutCardList() + end + info:UpdateFzList(fz, index, true) + local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi + printlog(getcard) + info:UpdateHandCard(getcard) + self:__CloseTip() +end + +function M:RunNiao(list, start_seat) + local _room = self._room + --local _niao_View = self._niao_View + self._niao_View = UIPackage.CreateObject("Extend_MJ_FuZhou", "Panel_Birds") + self._view:AddChild(self._niao_View) + self._niao_View:Center() + local _niao_View = self._niao_View + local list_niao_card = self._niao_View:GetChild("Lst_birds") + list_niao_card:RemoveChildrenToPool() + for i = 1, #list do + --添加背面的麻將 + local item = list_niao_card:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "202_00") + item:GetChild("tex_score").text = "+" .. list[i].score + end + for i = 1, #list do + --顯示正面 + local item = list_niao_card:GetChildAt(i - 1) + local card = list[i].card + coroutine.wait(0.3) + item:GetTransition("appear"):Play() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_" .. card) + if list[i].score > 0 then item:GetController("bg").selectedIndex = 1 end + end + coroutine.start(function() + coroutine.wait(1) + _niao_View:Dispose() + self._popEvent = true + end) +end + +-- function M:markOutCards(showTip, data) +-- for i = 1, #self._room.player_list do +-- local p = self._room.player_list[i] +-- local info = self._player_card_info[self:GetPos(p.seat)] +-- for j = 1, #p.outcard_list do +-- local card = p.outcard_list[j] +-- if card == data then +-- local obj = info:GetOutCardByIndex(j) +-- obj:GetController("gray").selectedIndex = showTip and 1 or 0 +-- end +-- end +-- end +-- end + +function M:__PiaoNiaoTip() + local obj_piao = UIPackage.CreateObject("Main_Majiang", "panel_piao_niao") + self._view:AddChild(obj_piao) + obj_piao.x = (self._view.width - obj_piao.width) * 0.5 + obj_piao.y = self._view.height * 0.6 + for i = 1, 4 do + obj_piao:GetChild("btn_" .. i).onClick:Add(function() + self._gamectr:SendAction(i - 1) + obj_piao:Dispose() + end) + end + self._com_piao = obj_piao +end + +function M:ReloadRoom(bskip) + local room = self._room + -- if not room.playing then + -- self._state.selectedIndex = 2 + -- else + -- self._state.selectedIndex = 1 + -- self._room._reload_flag = true + -- end + + if bskip == nil or bskip == false then + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + self._room._reload_flag = true + end + end + + + for i = 1, #room.player_list do + local p = room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + for i = 1, #p.fz_list do + info:UpdateFzList(p.fz_list[i], -1) + end + info:UpdateHandCard() + local head_info = self._player_info[self:GetPos(p.seat)] + head_info:UpdateScore() + head_info._view:GetChild('zhanji').visible = true + local num = p.total_hp or 0 + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(num) + end + + if p.seat == room.last_outcard_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil, card, self._cursor) + elseif p.seat == room.curren_outcard_seat then + info:UpdateHandCard(true) + info:UpdateOutCardList() + else + info:UpdateOutCardList() + end + if p.seat == room.banker_seat then + head_info:MarkBank(true) + end + -- if p.ready then + -- self._player_info[self:GetPos(p.seat)]:Ready(true) + -- end + if bskip == nil or bskip == false then + if p.ready and room.playing == false then + self._player_info[self:GetPos(p.seat)]:Ready(true) + end + end + if p.piao_niao ~= nil and p.piao_niao > 0 then + local head_info = self._player_info[self:GetPos(p.seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + end + -- self:ShowHuTip() + + if bskip == nil or bskip == false then + self:UpdateCardBox(self:GetPos(room.curren_outcard_seat)) + self._tex_LeftCard.text = room.left_count + self:UpdateRound() + end +end + +function M:PlayerChangeLineState() + -- local isOutCard = true + -- local str = "玩家 " + -- for _ , player in ipairs(self._room.player_list) do + -- if player.line_state == 0 then + -- isOutCard = false + -- end + -- end + -- self._player_card_info[1]._area_handcard_list.touchable = isOutCard +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:__CloseTip() + if self._chipeng_tip then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if self._pop_tip_choice then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +function M:__CloseGangTip() + if self._gang_tip_choice then + self._gang_tip_choice:Dispose() + self._gang_tip_choice = nil + end +end + +function M:closeTipOnTuoguan() + self:__CloseTip() +end + +function M:Destroy() + MJMainView.Destroy(self) + UIPackage.RemovePackage("extend/majiang/fuzhou/ui/Extend_MJ_FuZhou") +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayBackView.lua new file mode 100644 index 00000000..e0174e50 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayBackView.lua @@ -0,0 +1,297 @@ +local MJPlayBackView = require("main.majiang.MJPlayBackView") +local EXRoomConfig = import(".EXRoomConfig") +local EXClearingView = import(".EXClearingView") + +local Record_Event = import(".RecordEvent") + + +local M = {} + +--- Create a new +function M.new() + setmetatable(M, { __index = MJPlayBackView }) + local self = setmetatable({}, { __index = M }) + self.class = "PlayBackView" + self:init() + + return self +end + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/majiang/fuzhou/ui/Extend_MJ_FuZhou") + MJPlayBackView.InitView(self, "ui://Main_Majiang/Main_" .. room.room_config.people_num) + local _cardbox = self._view:GetChild("cardbox") + --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false + self._ctr_cardbox = _cardbox:GetController("c1") + self._tex_round = self._view:GetChild("tex_round") + self._tex_LeftCard = self._view:GetChild("remaining_card") + self._anchor = self._view:GetChild("mask_tips") + self._eventmap = {} + + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao + self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao + self._cmdmap[Record_Event.Evt_Result] = self.CmdResult +end + +function M:FillRoomData(data) + MJPlayBackView.FillRoomData(self) + if self._win_pic then self._win_pic:Dispose() end + if self._niao then self._niao:Dispose() end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local left_count = data.info.left_card + self:UpdateLeftCard(left_count) + local round = data.info.round + self:UpdateRound(round) + + local roominfo_panel = self._view:GetChild("roominfo_panel1") + roominfo_panel:GetChild("tex_roomid").text = room.room_id + roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + table.sort(p.card_list, ViewUtil.HandCardSort) + card_info:UpdateHandCard(false, true) + self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0 + end + + self:GenerateAllStepData(data) + self:UpdateStep(1) + -- self:ShowStep(0) +end + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateLeftCard(step.left_card) + -- self._ctr_cardbox.selectedIndex = step.current_out_seat + self:UpdateCardBox(self:GetPos(step.current_out_seat)) + self:UpdateStep(index + 1) + if step.cmd ~= Record_Event.Evt_OutCard then + self:RemoveCursor() + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hand_left_count = #p.card_list + info:Clear() + info:ResetFzList() + p.piao_niao = step.player_card_data[i].piao_niao + local head_info = self._player_info[self:GetPos(i)] + if p.piao_niao and p.piao_niao > 0 then + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + else + head_info._view:GetController("piao_niao").selectedIndex = 0 + end + if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil, nil, self._cursor) + else + info:UpdateOutCardList() + end + if step.cmd == Record_Event.Evt_GetCard and p.seat == step.current_out_seat then + info:UpdateHandCard(true, true) + else + info:UpdateHandCard(false, true) + end + end + if step.cmd == Record_Event.Evt_Win then + self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡") + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + else + if self._win_pic then + self._win_pic:Dispose() + end + end + if step.cmd == Record_Event.Evt_Niao then + local niao_list = step.niao + self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_FuZhou/Panel_Birds") + local list = self._niao:GetChild("Lst_birds") + list:RemoveChildrenToPool() + for i = 1, #niao_list do + local item = list:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_" .. niao_list[i].card) + if niao_list[i].score > 0 then + item:GetController("bg").selectedIndex = 2 + end + end + self._view:AddChild(self._niao) + self._view:AddChild(self._view:GetChild("panel_record")) + self._niao:Center() + else + if self._niao then + self._niao:Dispose() + end + end + if step.cmd == Record_Event.Evt_Result then + if not self.result then + self.result = EXClearingView.new(self._root_view, true) + self.result:InitData(0, self._room, step.result_data) + self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5 + self.result._view.width = GRoot.inst.width + self.result._view.height = GRoot.inst.height + self.result._view:GetChild("btn_confirm").visible = false + self._anchor:AddChild(self.result._view) + self.result._view.x = self._anchor.x * -1 + self.result._view.y = self._anchor.y * -1 + else + self.result._view.visible = true + end + -- self.result._view:Center() + else + if self.result then + self.result._view.visible = false + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = "" + step.left_card = info.left_card + step.last_out_seat = 0 + step.current_out_seat = 1 + step.win = 0 + step.niao = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.piao_niao = p.piao_niao + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + table.sort(u.card_list, ViewUtil.HandCardSort) + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = 0 + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + for i = 1, #cmd.data.opcard do + list_remove(u.card_list, cmd.data.opcard[i]) + end + local fz = {} + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.opcard = cmd.data.opcard + local uf = data.player_card_data[cmd.data.from_seat] + if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then + table.remove(uf.outcard_list, #uf.outcard_list) + end + if fz.type ~= FZType.Gang_Peng then + u.fz_list[#u.fz_list + 1] = fz + else + for i = 1, #u.fz_list do + if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then + u.fz_list[i].type = FZType.Gang_Peng + end + end + end +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:CmdNiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.niao = cmd.data.niao +end + +function M:CmdPiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.player_card_data[cmd.seat].piao_niao = cmd.data.num +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result_data = cmd.data +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_deep_clone(last_step) + self._step[#self._step + 1] = step + step.result_data = nil + return step +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = "剩余 " .. num .. " 张牌" +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:UpdateRound(round) + self._tex_round.text = "第 " .. round .. "/" .. self._room.room_config.round .. " 局" +end + +function M:UpdateStep(step) + self._record:GetChild("tex_step").text = "第 " .. step .. " / " .. #self._step .. "步" +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayer.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayer.lua new file mode 100644 index 00000000..fd26822b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayer.lua @@ -0,0 +1,36 @@ + + +local EXPlayer = { + auto, + -- 手牌列表 + hand_cards = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayerInfoView.lua new file mode 100644 index 00000000..f8a5fd69 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXPlayerInfoView.lua @@ -0,0 +1,76 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + +function M:init() + PlayerInfoView.init(self) + self._tex_score = self._view:GetChild("info"):GetChild("tex_score1") + self._tex_score2 = self._view:GetChild("info"):GetChild("tex_score2") + self._ct_score = self._view:GetChild("info"):GetController("score") +end + +function M:ShowInteraction(type,str) + if type == 3 then + Voice.DownLoad(str, function(clip) + if (clip ) then + self:ShowMaskVoice(clip.length) + GameApplication.Instance:PlayVoice(clip) + end + end) + elseif type == 4 then + self:SetChat(str) + elseif type == 2 then + local chat_index = tonumber(str) + self._main_view:PlayChatSound(self._player.self_user.sex,chat_index) + local language, index = self._main_view:GetChatMsgLanguage(chat_index) + self:SetChat(self._main_view.Fix_Msg_Chat[index]) + elseif type == 1 then + self:SetBiaoqing("ui://Chat/"..str) + end +end + +function M:UpdateRemainCard(card_num, hide) + if hide then + self._view:GetController("show_remain").selectedIndex = 0 + else + self._view:GetController("show_remain").selectedIndex = 1 + end + self._view:GetChild("com_remain"):GetChild("tex_remain").text = card_num +end + +function M:FillData(player) + PlayerInfoView.FillData(self, player) + self:UpdateScore(player.total_score) +end + +function M:UpdateScore() + local score = self._player.total_score + local room = DataManager.CurrenRoom + if room:checkHpNonnegative() then + score = d2ad(self._player.cur_hp) + end + if not score then + score = 0 + end + if score < 0 then + self._ct_score.selectedIndex = 1 + self._tex_score2.text = score + else + self._ct_score.selectedIndex = 0 + if not room:checkHpNonnegative() then + score = "+" .. score + end + self._tex_score.text = score + end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/EXRoomConfig.lua b/lua_probject/extend_project/extend/majiang/fuzhou/EXRoomConfig.lua new file mode 100644 index 00000000..9da41e9a --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/fuzhou/EXRoomConfig.lua @@ -0,0 +1,152 @@ +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M, { __index = RoomConfig }) + local self = setmetatable({}, { __index = M }) + RoomConfig.init(self, config) + self.config = config + self.class = "RoomConfig" + self.round = config["times"] + self.maxPlayers = config["maxPlayers"] + self.fengding = config["fengding"] + self.wanfa = config["wanfa"] + self.qiduijiafan = config["qiduijiafan"] + self.shoudailongjiafan = config["shoudailongjiafan"] + self.loudilongjiafan = config["loudilongjiafan"] + self.bunengchi = config["bunengchi"] + + return self +end + +function M:GetDes(sp) + sp = sp or " " + local count = 0 + local str = self.round and self.round .. "局" .. " " or "" + str = str .. RoomConfig.GetDes(self, sp) .. "\n" + + + if (self.fengding) then + str = str .. "封顶" + count = count + 1 + if count % 2 == 0 then + str = str .. "\n" + else + sp1 = "" + local strL = 2 + for i = 1, strL do + sp1 = sp1 .. " " + end + str = str .. sp1 .. sp + end + end + + if (self.qiduijiafan) then + local strL = 2 + str = str .. "可胡七对" + if self.qiduijiafan then + str = str .. "翻倍" + strL = 0 + end + count = count + 1 + if count % 2 == 0 then + str = str .. "\n" + else + sp1 = "" + for i = 1, strL do + sp1 = sp1 .. " " + end + str = str .. sp1 .. sp + end + end + + + if self.shoudailongjiafan then + str = str .. "手逮龙加番" + count = count + 1 + if count % 2 == 0 then + str = str .. "\n" + else + sp1 = "" + local strL = 2 + for i = 1, strL do + sp1 = sp1 .. " " + end + str = str .. sp1 .. sp + end + end + + if self.loudilongjiafan then + str = str .. "落地龙" + count = count + 1 + if count % 2 == 0 then + str = str .. "\n" + else + sp1 = "" + local strL = 3 + for i = 1, strL do + sp1 = sp1 .. " " + end + str = str .. sp1 .. sp + end + end + + if self.bunengchi then + str = str .. "不能吃" + count = count + 1 + if count % 2 == 0 then + str = str .. "\n" + else + sp1 = "" + local strL = 3 + for i = 1, strL do + sp1 = sp1 .. " " + end + str = str .. sp1 .. sp + end + end + + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + +function M:GetDes2(sp) + sp = sp or " " + local str = RoomConfig.GetDes(self, sp) + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + + + + + if (self.qiduijiafan) then + str = str .. "可胡七对" + if self.qiduijiafan then + str = str .. "-翻倍" + end + str = str .. sp + end + + + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + +function M:GetGameJS() + local gamerulepanel = UIPackage.CreateObjectFromURL("ui://Extend_MJ_FuZhou/gamerule") + return gamerulepanel +end + +function M:GetGameSMSize() + return 467, 500 +end + +function M:GetGameName() + return "个旧麻将" +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/fuzhou/ExtendConfig.lua new file mode 100644 index 00000000..76e867c0 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/fuzhou/ExtendConfig.lua @@ -0,0 +1,173 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import(".EXGameInfo") +local EXMainView = import(".EXMainView") +local EXGameController = import(".EXGameController") +local EXRoomConfig = import(".EXRoomConfig") +local EXPlayBackView = import(".EXPlayBackView") +local MJRoom = require("main.majiang.MJRoom") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, { __index = IExtendConfig }) + local self = setmetatable({}, { __index = M }) + self.class = "ExtendConfig" + self.extend_id = 33 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/majiang/fuzhou/ui/Info_MJ_FuZhou") + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage("extend/majiang/fuzhou/ui/Extend_MJ_FuZhou") + ResourcesManager.UnLoadGroup("FuZhou_MJ") +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return MJRoom.new() +end + +function M:FillRoomConfig(room, _config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + + + local reload = s2croom["reload"] + local _tableInfo = s2croom["tableInfo"] + + local _config = _tableInfo["config"] + + pt(_config) + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo["playerData"] + room.curren_round = _tableInfo["round"] + self:FillPlayerData(playerList) + + if (reload) then + local _reloadInfo = s2croom["reloadInfo"] + local _hand_card = _reloadInfo["hand_card"] + room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + + local active_seat = _reloadInfo["active_seat"] + local bank_seat = _reloadInfo["banker_seat"] + local playing = _reloadInfo["playing"] + local _info_list = _reloadInfo["info_list"] + local last_outcard_seat = _reloadInfo["last_outcard_seat"] + room.left_count = _reloadInfo["left_card"] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo["curren_outcard_seat"] + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i = 1, #_info_list do + local tem = _info_list[i] + local playerid = tem["playerid"] + local p = room:GetPlayerById(playerid) + local outcard_list = tem["outcard_list"] + p.outcard_list = outcard_list + p.total_score = tem["score"] + p.hand_left_count = tem["card_count"] + p.piao_niao = tem["piao_niao"] or 0 + local opcard = tem["opcard"] + for k = 1, #opcard do + local op = opcard[k] + local fz = {} + fz.type = op["type"] + fz.card = op["card"] + p.fz_list[#p.fz_list + 1] = fz + end + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.left_count = _tableInfo["left_card"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + + local _info_list = _tableInfo["playerData"] + for i = 1, #_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + p.piao_niao = _jp["piao_niao"] + -- print(DataManager.SelfUser.account_id,pid) + -- if (278 == pid) then + -- room.self_player = p + -- p.self_user = DataManager.SelfUser + -- else + if p.seat == 1 then room.self_player = p end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.card_list = _hand_card + --room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + p.total_score = _jp["score"] + p.hand_left_count = #_hand_card + if _jp.hp_info then + room.room_config.isNonnegative = 1 + p.cur_hp = _jp.hp_info.cur_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/GameEvent.lua b/lua_probject/extend_project/extend/majiang/fuzhou/GameEvent.lua new file mode 100644 index 00000000..9180694e --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/fuzhou/GameEvent.lua @@ -0,0 +1,37 @@ + +local TX_GameEvent = { + -- 发牌 + SendCards = "SendCards", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + EventNiao = "EventNiao", + + EvnetPiaoTip = "EvnetPiaoTip", + + EvnetPiao = "EvnetPiao", + + + --- + SendLaiZi="SendLaiZi", + SendGangZi = "SendGangZi", + EventBuGang = "EventBuGang", + +} +return TX_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/MJPlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/majiang/fuzhou/MJPlayerSelfCardInfoView.lua new file mode 100644 index 00000000..72d1d092 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/fuzhou/MJPlayerSelfCardInfoView.lua @@ -0,0 +1,213 @@ +local MJPlayerSelfCardInfoView = require("main.majiang.MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local CardCheck = import(".CardCheck") + +local M = {} +-- +function M.new(view,mainView) + setmetatable(MJPlayerSelfCardInfoView, {__index = MJPlayerCardInfoView}) + setmetatable(M, {__index = MJPlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:ShowHuTip(card_list) + printlog("ShowHuTip") + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + for i=1,#DataManager.CurrenRoom.laiziInfo do + if IsHasDictionary(DataManager.CurrenRoom.laiziInfo[i],tingList)==false then + table.insert(tingList,DataManager.CurrenRoom.laiziInfo[i] ) + end + end + end + + end + self._mainView._hu_tip:FillData(tingList) +end + +function M:UpdateHandCard(getcard, mp) + MJPlayerSelfCardInfoView.UpdateHandCard(self, getcard, mp) + local _carViewList = self._carViewList + + if DataManager.CurrenRoom.laiziInfo and #self._carViewList>0 then + for i=1,#self._carViewList do + local obj=self._carViewList[i] + if obj and obj.card then + if IsHasDictionary(obj.card_item,DataManager.CurrenRoom.laiziInfo) then + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=1 + end + + end + else + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=0 + end + end + end + + end + end + + + end + + + local card_list = DataManager.CurrenRoom.self_player.card_list + self:ShowHuTip(card_list) + if getcard then + self._out_card = true + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + -- 记录需要标记听牌提示的牌 + local lst_mark = {} + local total_num = 0 + for i = 1, #_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + list_remove(card_list, card) + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + local count = 0 + for j = 1, #tingList do + count = count + self._mainView:CountCardLeftNum(tingList[j]) + end + local tem = {} + tem.item = btn + tem.count = count + total_num = total_num + count + table.insert(lst_mark, tem) + end + table.insert(card_list, card) + end + table.sort(lst_mark, function(a, b) + return a.count > b.count + end) + -- 如果几张牌的可胡牌数一致,也只显示'三角',可胡牌数不一致才显示'多' + local all_same = #lst_mark ~= 0 and lst_mark[1].count == total_num / #lst_mark or false + for i = 1, #lst_mark do + local tem = lst_mark[i] + if all_same or tem.count < lst_mark[1].count then + tem.item:GetController("mark_ting").selectedIndex = 1 + else + tem.item:GetController("mark_ting").selectedIndex = 2 + end + end + else + for i = 1, #_carViewList do + local btn = _carViewList[i].card + if btn:GetController("mark_ting").selectedIndex ~= 0 then + btn:GetController("mark_ting").selectedIndex = 0 + end + end + self._out_card = false + end + +end + +function M:__OnClickHandCard(context) + local button = context.sender + local _carViewList = self._carViewList + local refresh = true + local card_list = {} + for i=1,#_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + if btn ~= button and btn.selected == true then + if button.data.card_item == card then + refresh = false + else + self._mainView:markOutCards(false, card) + end + btn.selected = false + end + if not btn.selected then + table.insert(card_list, card) + end + end + + if self._out_card then + self:ShowHuTip(card_list) + end + + -- 标记出牌 + if refresh then + if button.selected then + self._mainView:markOutCards(true, button.data.card_item) + else + self._mainView:markOutCards(false, button.data.card_item) + end + end + + local _room = DataManager.CurrenRoom + if not button.selected and _room.curren_outcard_seat == _room.self_player.seat then + local card = button.data + self._mainView:OutCard(card.card_item) + end +end + +function M:__OnDragStart(card) + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + list_remove(card_list, card) + self:ShowHuTip(card_list) +end + +function M:__OnDragEnd(context) + if self.outcard_button then + self.outcard_button:Dispose() + self.outcard_button = nil + end + local button = context.sender + + --button:RemoveFromParent() + local card = button.data + local _room = DataManager.CurrenRoom + + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + if (button.y - card.old_postion.y < -50 and _room.curren_outcard_seat == _room.self_player.seat and card.card_item ~= 0) then + self._mainView:OutCard(card.card_item) + button.touchable = false + self.outcard_button = button + else + self._area_handcard_list:AddChildAt(button, card.index) + button:TweenMove(card.old_postion, 0.2) + end +end + +function M:CheckPlayerOnlineState() + local room = DataManager.CurrenRoom + for i = 1, #room.player_list do + if room.player_list[i].line_state == 0 then + return false + end + end + return true +end +function M:Clear(bskip) + --self._ctr_state.selectedIndex = 0 + self._area_fz_list.x = self._src_fz_list.x + self._area_fz_list.y = self._src_fz_list.y + self._area_fz_list.width = self._src_fz_list.z + self._area_fz_list.height = self._src_fz_list.w + + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_outcard_list:RemoveChildren(0, -1, true) + if bskip == nil or bskip == false then + self._mask_liangpai:RemoveChildren(0, -1, true) + end + + for i=1,#self._carViewList do + self._carViewList[i].card:Dispose() + end + self._carViewList = {} + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/Protocol.lua b/lua_probject/extend_project/extend/majiang/fuzhou/Protocol.lua new file mode 100644 index 00000000..4df49454 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/fuzhou/Protocol.lua @@ -0,0 +1,52 @@ +local Protocol = { + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌 + GAME_DIS_CARD = "611", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- 提示选择行为 + GAME_ACTION = "612", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 小结算 + GAME_EVT_RESULT1 = "817", + + -- 大结算 + GAME_EVT_RESULT2 = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + + -- 抓鸟事件 + GAME_EVT_NIAO = "821", + + -- 飘鸟提示 + GAME_EVT_PIAOTIP = "833", + + -- 飘鸟事件 + GAME_EVT_PIAO = "834", + + GAME_EVT_GANGZI = "837", + GAME_EVT_BUGANG = "838", + GAME_EVT_DOGANG = "839", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/fuzhou/RecordEvent.lua b/lua_probject/extend_project/extend/majiang/fuzhou/RecordEvent.lua new file mode 100644 index 00000000..09748550 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/fuzhou/RecordEvent.lua @@ -0,0 +1,11 @@ +local Record_Event = { + Evt_GetCard = "GetCard", + Evt_OutCard = "OutCard", + Evt_Action = "Action", + Evt_Win = "Win", + Evt_Niao = "Niao", + Evt_Piao = "PiaoNiao", + Evt_Result = "Result", +} + +return Record_Event \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/gejiu/CS_Win_Type.lua b/lua_probject/extend_project/extend/majiang/gejiu/CS_Win_Type.lua new file mode 100644 index 00000000..ef287d99 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/gejiu/CS_Win_Type.lua @@ -0,0 +1,40 @@ +local CS_Win_Type = { + "点炮", + "平胡", + "小七对", + "一般高", + "七星", + "龙夹背", + "清大对", + "七星一般高", + "双龙夹背", + "三龙夹背", + "十老头", + "塘子十三ㄠ", + "塘子小七对", + "大对子", + "烂牌", + "一条龙", + "落地龙", + "混一色", + "庄家", + "清一色", + "字一色", + "抢杠胡", + "杠上开花", + "杠上炮", + "双杠花", + "双杠上炮", + "三杠花", + "三杠上炮", + "四杠花", + "四杠上炮", + "塘子七星", + "塘子一般高", + "塘子七星一般高", + "塘子烂牌", + "闲家", + "塘子胡", +} +return CS_Win_Type + diff --git a/lua_probject/extend_project/extend/majiang/gejiu/CardCheck.lua b/lua_probject/extend_project/extend/majiang/gejiu/CardCheck.lua new file mode 100644 index 00000000..71dd7f8e --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/gejiu/CardCheck.lua @@ -0,0 +1,378 @@ +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + num = num == nil and 1 or num + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if(result ==num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local zhongid = 0 + + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + zhong_count = 0, + qidui = false, + hongzhong_count = 0, + qidui_pari_count = 0 +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + if (card == zhongid) then + self.zhong_count = self.zhong_count +1 + else + self.cardList[#self.cardList + 1] = card + end + end + table.sort(self.cardList) +end + +function M:tryShunzi(card) + if (card < 400 and card % 100 > 7) then + return false + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryKezi(card) + if (checkCardAndRomve(card, self.cardList, 3)) then + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (checkCardAndRomve(card, self.cardList, 2)) then + local cardGroup = {card,card} + self:push(cardGroup) + self.pair_count = 1 + return true + end + return false +end + + +function M:tryKezi1Zhong(card) + if (self.zhong_count >= 1 and checkCardAndRomve(card, self.cardList,2)) then + local cardGroup = {card,card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + return true + end + return false +end + +function M:tryKezi2Zhong(card) + if (self.zhong_count >= 2 and checkCardAndRomve(card, self.cardList,1)) then + local cardGroup = {card,zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + return true + end + return false +end + +function M:tryShunzi1Zhong(card) + if (card % 100 > 8) then + return false + end + + if (self.zhong_count < 1) then + return false + end + + if (checkCard(card + 1, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,card+1,zhongid} + self:push(cardGroup) + return true + end + + if (checkCard(card + 2, self.cardList) and ((card + 1) % 100 ~= 0)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 2, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,zhongid,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair1Zhong(card) + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 1) then + return false + end + removeCard(self.cardList, card, 1) + local cardGroup = {card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + self.pair_count = 1 + return true +end + +function M:tryPair2Zhong() + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 2) then + return false + end + local cardGroup = {zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + self.pair_count = 1 + return true +end + +function M:tryWin() + if (self.zhong_count == 4 and not self.eight_laizi) or (self.zhong_count == 8 and self.eight_laizi) then + return true + end + if (#self.cardList == 0 and self.pair_count == 1) then + return true + end + if (#self.cardList == 0 and self.pair_count == 0) then + return self:tryPair2Zhong() + end + + if (#self.cardList == 0) then + return false + end + + local activeCard = self.cardList[1] + if (self:tryPair(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + + if (self:tryKezi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi2Zhong(activeCard)) then + + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryPair1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + return false +end + +function M:checkQidui() + if (not self.qidui) then + return false + end + if ((#self.cardList + self.zhong_count) ~= 14) then + return false + end + local cardList = membe_clone(self.cardList) + self.qidui_pari_count = 0 + self.hongzhong_count = self.zhong_count + return self:isQdPari(cardList) +end + +function M:isQdPari(cardList) + if(self.qidui_pari_count == 7) then + return true + end + if (#cardList== 0) then + return true + end + local card = cardList[1] + if (cardNum(card, cardList) >= 2) then + removeCard(cardList, card, 2) + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + + if (self.hongzhong_count > 0) then + removeCard(cardList, card, 1) + self.hongzhong_count = self.hongzhong_count - 1 + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + return false +end + +local function init(self,cardInhand,addCard,isZhong,qidui,eightLaizi) + self.stack = {} + self.pair_count = 0 + self.cardList = membe_clone(cardInhand) + self.qidui = qidui + self.eight_laizi = eightLaizi + self.cardList[#self.cardList+1] = addCard + if (isZhong) then + self.zhong_count = cardNum(zhongid, self.cardList) + removeCard(self.cardList, zhongid, self.zhong_count) + end + table.sort(self.cardList) + --printlog("添加排序====>>>") + --pt(self.cardList) + return self:checkQidui() or self:tryWin() +end + +local specialCardList={400,403,406,409,412,415,418} +function M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + --printlog("isZhong",isZhong) + --printlog("qidui",qidui) + --printlog("eightLaizi",eightLaizi) + --pt(cardInhand) + local self = setmetatable({}, {__index = M}) + local tingList = {} + if not cardInhand or #cardInhand == 0 then + return tingList + end + for k=100,300,100 do + for i=1,9 do + local tem = k + i + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + --printlog("返回结果为===>>>",result) + if(result) then + tingList[#tingList + 1] = tem + end + end + end + + for j=1,#specialCardList do + local tem = specialCardList[j] + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + if(result) then + tingList[#tingList + 1] = tem + end + end + + return tingList +end + +function M.MuiltiplteCaculateTingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + zhongid=DataManager.CurrenRoom.laiziInfo[1] + local tempTingList2={} + local tempTingList1=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo[2] then + zhongid=DataManager.CurrenRoom.laiziInfo[2] + tempTingList2=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + zhongid=DataManager.CurrenRoom.laiziInfo[1] + end + local currentTingList={} + if #tempTingList1>0 and #tempTingList2>0 then + currentTingList=CombineDictionaryAndRemoveSomeItem(tempTingList1,tempTingList2) + elseif #tempTingList1>0 then + currentTingList=tempTingList1 + elseif #tempTingList2>0 then + currentTingList=tempTingList2 + end + + return currentTingList + + else + zhongid=0 + return M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + end + +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/gejiu/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/gejiu/EXClearingView.lua new file mode 100644 index 00000000..e4bd30a6 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/gejiu/EXClearingView.lua @@ -0,0 +1,615 @@ +require("Game.View.ResultView") +local Hu_Type_Name = import(".CS_Win_Type") + +local EXClearingView = {} + +local M = EXClearingView + +function EXClearingView.new(blur_view) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self._full = true + ResultView.init(self, "ui://Main_Majiang/clearing") + + self._currenIndex = 0 + self._blur_view = blur_view + self._close_zone = false + self:InitMaPai() + + return self +end + +function M:InitMaPai() + self.maPaiCtr=self._view:GetController("mapai") + self.maPaiCtr.selectedIndex=0 + + self.maPaiList={} + + for i=1,8 do + local tempMP=self._view:GetChild("niao"..i) + table.insert(self.maPaiList,tempMP) + end + +end + + +function M:IsMapaiShow(niao,isShow) + if niao then + niao.visible=isShow + end +end + + +function M:SetMaPaiValue(niao,value) + if niao then + niao.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..value + end +end + +function M:SetMaPaiColor(niao,num) + niao:GetController("color").selectedIndex=num +end + +function M:HideAllMapai() + for i=1,#self.maPaiList do + self:IsMapaiShow(self.maPaiList[i],false) + self:SetMaPaiColor(self.maPaiList[i],0) + end +end + + + +function M:ShowSelectMaPai(niaoList) + if niaoList and #niaoList>0 then + self.maPaiCtr.selectedIndex=1 + self:HideAllMapai() + for i=1,#niaoList do + self:IsMapaiShow(self.maPaiList[i],true) + self:SetMaPaiValue(self.maPaiList[i],niaoList[i].card) + if niaoList[i].score>0 then + self:SetMaPaiColor(self.maPaiList[i],2) + end + end + else + self.maPaiCtr.selectedIndex=0 + end +end + + + +function M:CalculatePaixingInfo(result) + self.WinList={} + if result.info_list and #result.info_list>0 then + for i=1,#result.info_list do + if result.info_list[i].win_list and #result.info_list[i].win_list>0 then + table.insert(self.WinList,result.info_list[i].win_list) + end + end + end + + printlog("牌型列表====>>>") + pt(self.WinList) +end + + +function M:SetPaixingxiangqing(num) + for i=1,#self.PaiXingXiangQingCtrList do + if self.PaiXingXiangQingCtrList[i] then + self.PaiXingXiangQingCtrList[i].selectedIndex=num + end + end +end + + + +function M:InitData(over, room, result, total_result, callback) + + self._callback = callback + local _overCtr = self._view:GetController("over") + local btn_confirm = self._view:GetChild("btn_confirm") + local btn_result = self._view:GetChild("btn_showResult") + local btn_close = self._view:GetChild("big_result"):GetChild("btn_close") + local _btnCtr = self._view:GetController("button") + local _sdkCtr = self._view:GetController("sdk") + local ctr_type = self._view:GetController("type") + + self._view:GetChild("tex_roominfo").text = string.format("房号%s 局%s/%s %s", room.room_id, room.curren_round, room.room_config.round, os.date("%Y-%m-%d %H:%M:%S", os.time())) + self._view:GetChild("tex_gameinfo").text = string.gsub(room.room_config:GetDes2(), "\r", "") + + if result then + self:ShowSelectMaPai(result.niao) + self:CalculatePaixingInfo(result) + end + + self.PaiXingXiangQingCtrList={} + + local paixingxiangqing=self._view:GetChild("btn_detal") + local fanhuipaixing=self._view:GetChild("btn_fanhuipaixing") + fanhuipaixing.visible=false + paixingxiangqing.visible=true + paixingxiangqing.onClick:Add(function() + paixingxiangqing.visible=false + fanhuipaixing.visible=true + self:SetPaixingxiangqing(1) + end) + fanhuipaixing.onClick:Add(function() + paixingxiangqing.visible=true + fanhuipaixing.visible=false + self:SetPaixingxiangqing(0) + end) + + + if over ~= 2 then + if result.liuju then + ctr_type.selectedIndex = 3 + else + local info_list = result.info_list + for i = 1, #info_list do + local is_win = info_list[i].is_win + if is_win then + if info_list[i].seat == room.self_player.seat then + ctr_type.selectedIndex = 1 + else + ctr_type.selectedIndex = 2 + end + end + end + end + + if over == 0 then + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + btn_confirm.onClick:Add(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:DestroyWithCallback() + end) + self:AddClearItem(room, result.info_list, nil, over, result.niao, result.active_player) + elseif over == 1 then + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add(function() + self.maPaiCtr.selectedIndex=0 + _overCtr.selectedIndex = 1 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + if self._qsinfo_view then + self._qsinfo_view:Dispose() + end + end) + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + + self:AddClearItem(room, result.info_list, total_result.info_list, over, result.niao, result.active_player) + end + else + _overCtr.selectedIndex = 1 + self.maPaiCtr.selectedIndex=0 + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + + self:AddClearItem(room, nil, total_result.info_list, over) + end +end + +function M:AddClearItem(room, data, total_data,over, niao, active_player) + local n = over + 1 + local list_view1 = self._view:GetChild("player_list_1") + local list_view2 = self._view:GetChild("player_list_2") + + if 0 == over or 1 == over then + table.sort(data, function(a,b) return a.seat < b.seat end) + list_view1:RemoveChildrenToPool() + + for i=1,#data do + local item = list_view1:AddItemFromPool() + self:FillItemData(room, data[i], item, active_player, niao) + end + if #data == 3 then + list_view1.lineGap = 54 + elseif #data == 2 then + list_view1.lineGap = 108 + end + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end +end + +function M:FillItemData(room, data, item, active_player, niao) + + local _gamectr = ControllerManager.GetController(GameController) + local p = room:GetPlayerBySeat(data["seat"]) + item:GetChild("playerName").text = p.self_user.nick_name + item:GetChild("lab_hp").text=""--抓马 + local user = room:GetPlayerBySeat(data["seat"]).self_user + local head = item:GetChild('head'):GetChild('n4') + ImageLoad.Load(user.head_url, head) + + -- 手牌 + local hand_cards = data["hand_card"] + table.sort( hand_cards, ViewUtil.HandCardSort) + local hand_list_view = item:GetChild("hand_card_list") + hand_list_view:RemoveChildrenToPool() + for i=1,#hand_cards do + local card = hand_list_view:AddItemFromPool() + card.icon = "ui://Main_Majiang/202_"..hand_cards[i] + end + hand_list_view.width = 52 * #hand_cards + + local fz_card = p.fz_list + local fz_card_list = item:GetChild("fz_card_list") + fz_card_list.width = 157 * #fz_card * 0.8 + fz_card_list:RemoveChildrenToPool() + + for i=1,#fz_card do + if fz_card[i].type == FZType.Peng then + + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j=1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + elseif fz_card[i].type == FZType.Chi then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j = 1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/" .. self:GetPrefix().."202_"..fz_card[i].opcard[j] + end + elseif fz_card[i].type == FZType.Gang or fz_card[i].type == FZType.Gang_An or fz_card[i].type == FZType.Gang_Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_4") + for j=1,4 do + local card = item:GetChild("card_" .. j) + if fz_card[i].type == FZType.Gang_An and j == 4 then + card.icon = "ui://Main_Majiang/202_00" + else + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + end + end + end + + local huadd = data["hu_score"] + local gangadd = data["gang_score"] + local total = data["round_score"] + local geng_zhuan=data["geng_zhuan"] + local sp = " " + local str = "胡:"..huadd.."分" + str = str..sp.."杠:"..gangadd.."分" + + + + + + item:GetChild("score1").text = str + -- local total_score = data["total_score"] + if total >= 0 then + item:GetChild("score2").text = "+"..total + item:GetChild("score2").grayed = false + else + item:GetChild("score2").text = total + item:GetChild("score2").grayed = true + end + + + --计算牌型 + local totalPeson=DataManager.CurrenRoom.room_config.people_num-1 + local win_list = data["win_list"] + local is_win = data["is_win"] or false + local str1="" + sp="、" + if is_win then + if win_list then + if DataManager.CurrenRoom.isZiMoHu then + str1="自摸" + else + str1="接炮" + end + for i=1,#win_list do + local huName=Hu_Type_Name[win_list[i].type] + if huName then + str1=str1..sp..huName.."x"..win_list[i].score + end + + end + str1=str1.." +"..huadd.."分" + end + + else + printlog("输家============") + if DataManager.CurrenRoom.isZiMoHu then + printlog("自摸处理============") + --str1="" + if #self.WinList==1 then + for i=1,#self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + if j==1 then + str1=str1..huName.."x"..self.WinList[i][j].score + else + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + + end + end + + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + else + printlog("非自摸处理====>>>") + --点炮 一炮多响 + local yipaoduoxiang=false + if #self.WinList>1 then + yipaoduoxiang=true + end + + if yipaoduoxiang then + printlog("一炮多响====>>>") + str="点炮" + local allTypeList={} + local isHas=false + for i=1,#self.WinList do + for j=1,#self.WinList[i] do + isHas=IsHasDictionary(self.WinList[i][j].type,allTypeList) + if isHas==false then + table.insert(allTypeList,self.WinList[i][j].type) + end + end + + end + + if #allTypeList>0 then + for i=1,#allTypeList do + local huName=Hu_Type_Name[allTypeList[i]] + if huName then + str1=str1..huName.."、" + end + end + str1=str1.." "..huadd.."分" + end + + else + + if p.self_user.account_id == active_player and is_win == false and not data["liuju"] then + str1="点炮" + if #self.WinList==1 then + for i=1,# self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + end + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + end + + end + + + end + end + + -- + printlog("牌型计算==>>>",str1) + + if data["ming_gang_num"]>0 then + str1=str1.." 明杠x"..data["ming_gang_num"] + end + + if data["an_gang_num"]>0 then + str1=str1.." 暗杠x"..data["an_gang_num"] + end + + if data["dian_gang_num"]>0 then + str1=str1.." 点杠x"..data["dian_gang_num"] + end + + if gangadd~=0 then + if gangadd>0 then + str1=str1.." +"..gangadd.."分" + else + str1=str1.." "..gangadd.."分" + end + + end + + if data["ma_geng_gong"] and data["ma_geng_gong"]~=0 then + if data["ma_geng_gong"]>0 then + str1 = str1.." 马跟杠:+"..data["ma_geng_gong"].."分" + else + str1 = str1.." 马跟杠:"..data["ma_geng_gong"].."分" + end + + end + + if geng_zhuan and geng_zhuan~=0 then + if geng_zhuan>0 then + str1 = str1.." 跟庄:+"..geng_zhuan.."分" + else + str1 = str1.." 跟庄:"..geng_zhuan.."分" + end + + end + + + + + + item:GetChild("score3").text=str1 + item:GetChild("score4").text=str1 + local paixingCtr=item:GetController("detail") + table.insert(self.PaiXingXiangQingCtrList,paixingCtr) + ------------------------- + + local hp_nonnegative = room:checkHpNonnegative() + item:GetController("nonnegative").selectedIndex = hp_nonnegative and 1 or 0 + if hp_nonnegative then + local hp_info = data.hp_info + local ctr_hp_limit = item:GetController("hp_limit") + local hp = d2ad(hp_info.round_actual_hp) + if hp >= 0 then hp = "+" .. tostring(hp) end + item:GetChild("tex_hp").text = hp + ctr_hp_limit.selectedIndex = hp_info.upper_limit and 1 or 0 + end + + + item:GetController("win").selectedIndex = is_win and 0 or 1 + if p.self_user.account_id == active_player and is_win == false and total < 0 then + item:GetController("win").selectedIndex = 2 + end + + if is_win then + item:GetController("bg").selectedIndex=1 + else + item:GetController("bg").selectedIndex=0 + end + local win_card = item:GetChild("win_card") + win_card.icon = "ui://Main_Majiang/202_"..data["win_card"] + + if niao and #niao>0 then + local currentNiaoList=self:CalculateNiao(niao ,data["seat"]) + if currentNiaoList and #currentNiaoList>0 then + local lst_niao = item:GetChild("list_niao") + lst_niao:RemoveChildrenToPool() + for i = 1, #currentNiaoList do + if currentNiaoList[i].score > 0 then + local card_niao = lst_niao:AddItemFromPool() + card_niao.icon = "ui://Main_Majiang/202_" .. currentNiaoList[i].card + end + end + end + end + + + + if p.seat == room.banker_seat then + item:GetController("bank").selectedIndex = 1 + end +end + +function M:CalculateNiao(niaoList,seat) + local tempNiao={} + for i=1,#niaoList do + if niaoList[i].seat==seat then + table.insert(tempNiao,niaoList[i]) + end + end + return tempNiao +end + + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + player_list[i].id = user.account_id + player_list[i].hp_info = data[i].hp_info + player_list[i].score = data[i].total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + + local settle_log = data[i].settle_log + player_list[i].param = {} + player_list[i].param[1]={} + player_list[i].param[1].key = "自摸次数:" + player_list[i].param[1].value = tostring(data[i].settle_log.zimo) + player_list[i].param[2]={} + player_list[i].param[2].key = "接炮次数:" + player_list[i].param[2].value = tostring(data[i].settle_log.jie_pao) + player_list[i].param[3]={} + player_list[i].param[3].key = "点炮次数:" + player_list[i].param[3].value = tostring(data[i].settle_log.dian_pao) + player_list[i].param[4]={} + player_list[i].param[4].key = "暗杠次数:" + player_list[i].param[4].value = tostring(data[i].settle_log.an_kong) + player_list[i].param[5]={} + player_list[i].param[5].key = "明杠次数:" + player_list[i].param[5].value = tostring(data[i].settle_log.ming_kong) + end + + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + local big_result = self._view:GetChild("big_result") + big_result:GetChild("txt_room_info").text = string.format("%s 房号%s 局%s/%s", os.date("%Y/%m/%d", os.time()), room.room_id, room.curren_round, room.room_config.round) + local lst_p = big_result:GetChild("player_list") + if #player_list == 3 then + lst_p.columnGap = 108 + elseif #player_list == 2 then + lst_p.columnGap = 208 + end + + self:InitBigResult(room, 30) + local show_detail = room.hpOnOff == 1 + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + com_p:GetController("jsicon").selectedIndex=i-1 + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + if show_detail then + local score = 0 + if com_p:GetController("pn").selectedIndex == 0 then + score = com_p:GetChild("txt_navigate").text + else + score = com_p:GetChild("txt_positive").text + end + score = score / room.score_times + com_p:GetChild("tex_detail_score").text = string.format("%s × %s倍", score, room.score_times) + end + end + + if room.group_id ~= 0 then + big_result:GetController("group").selectedIndex = 1 + end + DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild("btn_head") + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= "" then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end + +local prefix +function M:GetPrefix() + -- if not prefix then + prefix = get_majiang_prefix(10) + -- end + return prefix +end + +function M:DestroyWithCallback() + if self._callback then + self._callback() + end + self:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/gejiu/EXGameController.lua b/lua_probject/extend_project/extend/majiang/gejiu/EXGameController.lua new file mode 100644 index 00000000..cd808d0b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/gejiu/EXGameController.lua @@ -0,0 +1,386 @@ +local TX_Protocol = import(".Protocol") +local FZTipList = require("main.majiang.FZData") +local TX_GameEvent = import(".GameEvent") + +local M = {} + +--- Create a new GameController +function M.new() + setmetatable(M,{__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("个旧麻将") + self.class = "TX_GameController" + return self +end + +function M:init(name) + GameController.init(self,name) + + self._eventmap[TX_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[TX_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[TX_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[TX_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[TX_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[TX_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + self._eventmap[TX_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[TX_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[TX_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[TX_Protocol.GAME_EVT_RESULT2] = self.OnEventResult2 + self._eventmap[TX_Protocol.GAME_EVT_NIAO] = self.OnEventNiao + self._eventmap[TX_Protocol.GAME_EVT_PIAOTIP] = self.OnEventPiaoTip + self._eventmap[TX_Protocol.GAME_EVT_PIAO] = self.OnEventPiao + + self._eventmap[TX_Protocol.GAME_EVT_GANGZI] = self.OnEventGangCards + self._eventmap[TX_Protocol.GAME_EVT_BUGANG] = self.OnEventBuGang + +end + +local __pre_delete_card = false +-- 发送出牌指令到服务器 +function M:SendOutCard(card, callback) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_DIS_CARD, _data) + + -- 进行预删牌处理 + local p = _room.self_player + _room.curren_outcard_seat = -1 + list_remove(p.card_list,card) + table.sort(p.card_list, ViewUtil.HandCardSort) + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + __pre_delete_card = true + callback() +end + +function M:SendGangCard(card) + local _data = {} + _data["card"] = card + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_EVT_DOGANG, _data) +end + + +function M:OnEventGangCards(evt_data) + printlog("OnEventGangCards") + pt(evt_data) + DispatchEvent(self._dispatcher,TX_GameEvent.SendGangZi,evt_data["gangzi1"],evt_data["gangzi2"],evt_data["gangnum"],true ) +end + +function M:OnEventBuGang(evt_data) + printlog("OnEventBuGang") + pt(evt_data) + DispatchEvent(self._dispatcher,TX_GameEvent.EventBuGang,evt_data["info"][1],evt_data["info"][2],true ) +end + +-- 发送放子选择到服务器 +function M:SendAction(id) + local _data = {} + _data["id"] = id + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_ACTION, _data) +end + +function M:OnEventSendCards(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + if not _room.room_config.piao_niao or _room.self_player.entrust then + _room.curren_round = _room.curren_round + 1 + end + if _room.curren_round > 0 then _room.playing = true end + + printlog("开始发牌===========>>>") + pt(evt_data) + + local room = DataManager.CurrenRoom + --printlog(evt_data.laiziCard) + --printlog(evt_data.laiziCard2) + --printlog(evt_data.laiziCardBefore) + --printlog(evt_data.laiziCard2Before) + + + DispatchEvent(self._dispatcher,TX_GameEvent.SendGangZi,102,103,0,true ) + + + + -- _room.SelfPlayer.AutoOutCard = false + local handcards = evt_data["card_list"] + local p = _room.self_player + local seat = evt_data["bank_seat"] + self._cacheEvent:Enqueue(function() + _room.banker_seat = seat + for i=1,#_room.player_list do + _room.player_list[i].hand_left_count = 13 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + end + p.card_list = handcards + self._room.self_player.hand_left_count = #handcards + table.sort( handcards, ViewUtil.HandCardSort ) + DispatchEvent(self._dispatcher,TX_GameEvent.SendCards, p) + end) +end + +function M:OnEventOutCard(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local ting_list = nil + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + _room.last_outcard_seat = seat + if seat == _room.self_player.seat and __pre_delete_card then + __pre_delete_card = false + else + if seat == _room.self_player.seat then + list_remove(p.card_list, card) + table.sort(p.card_list, ViewUtil.HandCardSort) + end + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + DispatchEvent(self._dispatcher,TX_GameEvent.OutCard, p, card) + end + end) +end + + +function M:OnEventTakeCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + p.hand_left_count = p.hand_left_count +1 + if (seat == _room.self_player.seat) then + _room.self_player.card_list[#_room.self_player.card_list+1] = card + -- table.sort( _room.self_player.card_list, ViewUtil.HandCardSort ) + end + DispatchEvent(self._dispatcher,TX_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnEventOutHint(evt_data) + self._cacheEvent:Enqueue(function() + self._room.curren_outcard_seat = self._room.self_player.seat + DispatchEvent(self._dispatcher,TX_GameEvent.OutHint) + end) +end + +function M:OnEventTurn(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + -- self._room.curren_outcard_seat = seat + DispatchEvent(self._dispatcher,TX_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + local weight = evt_data["weight"] + for i=1,#list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + tip.opcard = dtip["opcard"] + + -- if (dtip["opcard"]) then + -- local opcard = dtip["opcard"] + -- tip.OpCard = opcard + -- tip.OpCard[3] = tip.Card + -- table.sort(tip.OpCard) + -- end + tiplist:AddTip(tip) + end + DispatchEvent(self._dispatcher,TX_GameEvent.FZTips, tiplist, weight) + end) +end + +function M:OnEventFzAction(evt_data) + local _room = self._room + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local type = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + -- local openkong = evt_data["openkong"] + + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local fz = nil + local index = -1 + local ftype = type + if (ftype == FZType.Gang_Peng) then + for i=1,#p.fz_list do + if (p.fz_list[i].card == card) then + p.fz_list[i].card = card + fz = p.fz_list[i] + fz.type = type + index = i -1 + break + end + end + end + fz = {} + fz.card = card + fz.type = type + fz.active_card = actice_card + if (index == -1) then + if (ftype == FZType.Chi) then + local data ={} + data[1] = opcard[1] + data[2] = card + data[3] = opcard[2] + fz.opcard =data + end + p.fz_list[#p.fz_list+1] = fz + end + fz.from_seat = from_seat + local remove_num = #opcard + + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(p.card_list,opcard[i]) + end + end + + p.hand_left_count = p.hand_left_count - remove_num + if from_seat ~= p.seat then + -- if (fz.Type == FZType.Chi) then card = actice_card end + local fp = _room:GetPlayerBySeat(from_seat) + table.remove(fp.outcard_list,#fp.outcard_list) + end + + DispatchEvent(self._dispatcher,TX_GameEvent.FangziAction, fz, p, index) + end) +end + +function M:OnEventHu(evt_data) + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local win_card = evt_data["win_card"] + local win_list = evt_data["win_list"] + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + table.sort( win_p.card_list, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher,TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], win_card, cards, win_list) + end) +end + +function M:OneventResult1(evt_data) + local over = evt_data.type + printlog("OneventResult1") + pt(evt_data) + --0:小结算 1:小大结算 2:大结算 + self._room._reload_flag = false + self._room.playing = false + if 0 == over then + local result = evt_data.result + self._cacheEvent:Enqueue(function() + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil,true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +-- function M:OnEventResult2(evt_data) +-- DataManager.CurrenRoom.Over = true +-- ControllerManager.SetGameNetClient(nil,true) + -- local info_list = evt_data["info_list"] + -- if self._result ~= nil then + -- self._cacheEvent:Enqueue(function() + -- self:OneventResult1(self._result) + -- self._result = nil + -- end) + -- end +-- self._cacheEvent:Enqueue(function() +-- DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, info_list) +-- ControllerManager.ChangeController(LoddyController) +-- end) +-- end + +function M:OnEventNiao(evt_data) + local list = evt_data["niao"] + local start_seat = evt_data["start_seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EventNiao, list, start_seat) + end) +end + +function M:OnEventPiaoTip() + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + self._cacheEvent:Enqueue(function() + if not self._room._reload_flag then + self._room.curren_round = self._room.curren_round + 1 + end + self._room.playing = true + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiaoTip, evt_data) + end) +end + +function M:OnEventPiao(evt_data) + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiao, evt_data.seat, evt_data.num) + end) +end + +function M:GetPosString( seat ) + if DataManager.CurrenRoom.room_config.people_num ~= 4 then return"" end + if seat == 1 then + return "北" + elseif seat == 2 then + return "西" + elseif seat == 3 then + return "南" + elseif seat == 4 then + return "东" + end +end + +function M:Discard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + -- list_remove(_room.SelfPlayer.Cards,card) + -- table.sort(_room.SelfPlayer.Cards) + _client:send(Protocol.Game_Da, _data) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/gejiu/EXGameInfo.lua b/lua_probject/extend_project/extend/majiang/gejiu/EXGameInfo.lua new file mode 100644 index 00000000..ffea1e1c --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/gejiu/EXGameInfo.lua @@ -0,0 +1,200 @@ +local EXGameInfo = {} + +local M = EXGameInfo + + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/majiang/gejiu/ui/Info_MJ_GeJiu") + return self +end + +function M:FillData() + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 3 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_GeJiu/Cgm_create_room") + + if oldGameVersion==2 then + self._config:GetController("xipai").selectedIndex=0 + + self.xipaiValueText=self._config:GetChild('xipaifen') + self.xipaiValueText.text=1 + self.xipaiValue=1 + + self.anchouValueText=self._config:GetChild('anchoufen') + self.anchouValueText.text=1 + self.anchouValue=1 + + local btn_cr = self._config:GetChild('sdsrbtn') + btn_cr.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.xipaiValueText.text=value/1000 + self.xipaiValue=value/1000 + + end, 3, nil) + gniv:Show() + + + end + ) + + + local btn_cr2 = self._config:GetChild('anchoubtn') + btn_cr2.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.anchouValueText.text=value/1000 + self.anchouValue=value/1000 + + end, 3, nil) + gniv:Show() + + + end + ) + + end +end + +local _help_url= "ui://Info_MJ_GeJiu/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_MJ_GeJiu/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_MJ_GeJiu/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list ={} +function M:GetPlayList() + return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + 1 + local people = _config:GetController("play_list").selectedIndex+2 + + local fengding=_config:GetController("fengding").selectedIndex + local wanfa=_config:GetController("wanfa").selectedIndex + local qiduijiafan=_config:GetChild("btn_qidui").selected + local shoudailongjiafan=_config:GetChild("btn_shoudailong").selected + local loudilongjiafan=_config:GetChild("btn_loudilong").selected + local bunengchi=_config:GetChild("btn_bunengchi").selected + local doudizhu=_config:GetChild("btn_doudizhu").selected + local doudizhufanbei=_config:GetChild("btn_doudizhufanbei").selected + local xi_pai=false + local xi_paifen=0 + if _config:GetChild("xipai") then + xi_pai=_config:GetChild("xipai").selected + end + + + + ------ + local _data = {} + _data["opt"] = round + _data["maxPlayers"] = people + + _data["fengding"] = fengding + _data["wanfa"] = wanfa + _data["qiduijiafan"] = qiduijiafan + _data["shoudailongjiafan"] = shoudailongjiafan + _data["loudilongjiafan"] = loudilongjiafan + _data["bunengchi"] = bunengchi + _data["doudizhu"] = doudizhu + _data["doudizhufanbei"] = doudizhufanbei + _data['xi_pai'] = xi_pai + + local xi_pai_score=0 + local an_chou_score=0 + if oldGameVersion==2 then + xi_pai_score=self.xipaiValue + an_chou_score=self.anchouValue + end + + _data['xi_pai_score'] = xi_pai_score*1000 + _data['an_chou_score'] = an_chou_score*1000 + + + return _data +end + +function M:LoadConfigData(data) + --printlog("加载房间配置=========>>>") + --pt(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt -1 + _config:GetController("play_list").selectedIndex = data.maxPlayers-2 + + + _config:GetController("fengding").selectedIndex = data.fengding + + _config:GetController("wanfa").selectedIndex = data.wanfa + _config:GetChild("btn_qidui").selected = data.qiduijiafan + _config:GetChild("btn_shoudailong").selected = data.shoudailongjiafan + _config:GetChild("btn_loudilong").selected = data.loudilongjiafan + _config:GetChild("btn_bunengchi").selected = data.bunengchi + + _config:GetChild("btn_doudizhu").selected = data.doudizhu + _config:GetChild("btn_doudizhufanbei").selected = data.doudizhufanbei + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected=data.xi_pai + end + + if oldGameVersion==2 then + self.xipaiValueText.text=data.xi_pai_score/1000 + self.xipaiValue=data.xi_pai_score/1000 + + self.anchouValueText.text=data.an_chou_score/1000 + self.anchouValue=data.an_chou_score/1000 + end + + end + + + + + +return M + \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/gejiu/EXMainView.lua b/lua_probject/extend_project/extend/majiang/gejiu/EXMainView.lua new file mode 100644 index 00000000..570ca54d --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/gejiu/EXMainView.lua @@ -0,0 +1,820 @@ +local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local MJMainView = require("main.majiang.MJMainView") +local EXClearingView = import(".EXClearingView") +local TX_GameEvent = import(".GameEvent") +local HuTipView = import("main.majiang.HuTipView") +local SettingView = import("main.majiang.MJSettingViewNew") +local PlayerInfoView = import(".EXPlayerInfoView") +local M = {} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M,{__index = MJMainView}) + local self = setmetatable({}, {__index = M}) + self.class = "MainView" + self.asset_group = "GeJiu_MJ" + self:init() + ViewUtil.PlayMuisc(self.asset_group, "extend/majiang/gejiu/sound/bg.mp3") + return self +end + +function M:InitView(url) + local room = self._room + self._style = 1 + self._gps_style = 1 + self._full = true + UIPackage.AddPackage("extend/majiang/gejiu/ui/Extend_MJ_GeJiu") + MJMainView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num .. "_s2") + self._hu_tip = HuTipView.new(self) + + self._view:GetChild('wanfa_text').text =room.room_config.people_num .. '人个旧麻将 ' .. room.score_times .. '倍' + + self.selectLaiziBtn=self._view:GetChild('selectlaizi') + self.Laizi1Btn=self._view:GetChild('selectgang1') + self.Laizi2Btn=self._view:GetChild('selectgang2') + self._view:GetChild("n108").visible = true + self.Laizi1Btn.visible=true + self.Laizi2Btn.visible=true + self.bugangnum = self._view:GetChild("bugangnum") + + self:PlayerChangeLineState() + + if room.playing or room.curren_round > 0 then + self:ReloadRoom() + end +end + +function M:__BuGang(card1,card2, callback) + + local _gang_tip_choice = UIPackage.CreateObject("Extend_MJ_GeJiu", "Gang_tip_choice") + _gang_tip_choice.visible = true + + local gangcard1 = _gang_tip_choice:GetChild("card1") + local gangcard2 = _gang_tip_choice:GetChild("card2") + + + gangcard1.icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_"..card1) + gangcard2.icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_"..card2) + + gangcard1.onClick:Add(function() + callback(card1) + end) + + gangcard2.onClick:Add(function() + callback(card2) + end) + + _gang_tip_choice.xy = Vector2((self._view.width - _gang_tip_choice.width)/2, (self._view.height - _gang_tip_choice.height)/2) + self._view:AddChild(_gang_tip_choice) + self._gang_tip_choice = _gang_tip_choice +end + + +function M:SetShowGangZiProcess(currentLaizi1ID,currentLaizi2ID,bugangnum,isShowAnim) + --zhongid=currentLaizi1ID + if isShowAnim==nil then isShowAnim=false end + + self:SetGangZiCard(self.Laizi1Btn,currentLaizi1ID) + self:SetGangZiCard(self.Laizi2Btn,currentLaizi2ID) + self:IsShowGangZi(self.Laizi1Btn,true) + self:IsShowGangZi(self.Laizi2Btn,true) + self.bugangnum.text = "当前 "..bugangnum.." 杠" + +end + + +function M:HideAllGangZiCard() + self.Laizi1Btn.visible=false + self.Laizi2Btn.visible=false + self.selectLaiziBtn.visible=false + --self.LaiziBG.visible=false +end + +function M:SetGangZiCard(btn,cardId) + btn.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..cardId +end + +function M:IsShowGangZi(btn,isShow) + btn.visible=isShow +end + +function M:UpdateRound() + self._view:GetChild("tex_round1").text = self._room.curren_round + self._view:GetChild("tex_round2").text = self._room.room_config.round +end + +function M:InitPlayerInfoView() + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem,self) + tem.visible = false + end +end + +function M:NewMJPlayerCardInfoView(view,index) + if index == 1 then + return MJPlayerSelfCardInfoView.new(view,self) + end + return MJPlayerCardInfoView.new(view,self) +end + +function M:EventInit() + -- UIPackage.AddPackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong") + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _gcm_outcard_url = UIPackage.GetItemURL("Main_Majiang", "Gcm_OutCard") + local _player_info = self._player_info + local _gamectr = self._gamectr + + + + _gamectr:AddEventListener(TX_GameEvent.SendLaiZi, function(...) + local arg = {...} + self:SetShowLaiZiProcess(arg[1],arg[2],arg[3],arg[4]) + end) + + _gamectr:AddEventListener(TX_GameEvent.SendGangZi, function(...) + local arg = {...} + self:SetShowGangZiProcess(arg[1],arg[2],arg[3],arg[4]) + end) + + _gamectr:AddEventListener(TX_GameEvent.EventBuGang, function(...) + local arg = {...} + self:__BuGang(arg[1],arg[2], + function(id) + printlog(id) + _gamectr:SendGangCard(id) + self:__CloseGangTip() + end) + end) + + + + _gamectr:AddEventListener(TX_GameEvent.SendCards,function( ... ) + -- self:ShowHuTip() + self:UpdateRound() + self._state.selectedIndex = 1 + local list = _room.player_list + for i=1,#list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateHandCard() + end + end) + _gamectr:AddEventListener(TX_GameEvent.EventTurn, function(...) + local arg = {...} + self._left_time = 15 + local seat = arg[1] + self:UpdateCardBox(self:GetPos(seat)) + -- if seat == self._room.self_player.seat then + -- self:ShowHuTip() + -- end + end) + + _gamectr:AddEventListener(TX_GameEvent.OutHint, function(...) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:UpdateHandCard(true) + end) + + local _gcm_outcard_url ="ui://Main_Majiang/Gcm_OutCard" + _gamectr:AddEventListener(TX_GameEvent.OutCard, function(...) + self:__CloseTip() + self._left_time = 0 + local arg = {...} + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:RemoveCursor() + info:UpdateHandCard() + local outcard = UIPackage.CreateObjectFromURL(_gcm_outcard_url) + info:UpdateOutCardList(outcard, card, self._cursor) + self:PlaySound("GeJiu_MJ", p.self_user.sex, tostring(card)) + self:PlayMJSound("chupai.mp3") + if seat == _room.self_player.seat then + _room.curren_outcard_seat = -1 + end + end) + _gamectr:AddEventListener(TX_GameEvent.GetCard, function(...) + self:__CloseTip() + local arg = {...} + local seat = arg[1] + local card = arg[2] + -- self._tex_leftTime.text = arg[3] + self._tex_LeftCard.text = arg[3] + -- self:UpdateRoomInfo() + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateHandCard(true) + end) + + _gamectr:AddEventListener(TX_GameEvent.FZTips, function(...) + local arg = {...} + local _tip = arg[1] + local weight = arg[2] + self:__FangziTip(_tip, weight) + end) + + _gamectr:AddEventListener(TX_GameEvent.FangziAction, handler(self,self.OnFangziAction)) + + _gamectr:AddEventListener(TX_GameEvent.ZPHuCard, function(...) + self._left_time = 0 + self:UpdateCardBox(0) + self:__CloseTip() + self._popEvent = false + local arg = {...} + local win_seat = arg[1] + local lose_seat = arg[2] + local win_card = arg[3] + local cards = arg[4] + local win_list = arg[5] + local index = self:GetPos(win_seat) + local info = self._player_card_info[index] + self:RemoveCursor() + info:UpdateHandCard(true, true) + + local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card") + obj_win_card.icon = "ui://Main_Majiang/202_" .. win_card + obj_win_card:GetController("bg").selectedIndex = 1 + info._view:AddChild(obj_win_card) + obj_win_card:Center() + + local url, pNode + local player = _room:GetPlayerBySeat(win_seat) + if win_seat ~= _room.self_player.seat then + url = "ui://Main_Majiang/别人胡" + pNode = info._mask_liangpai + elseif win_seat == _room.self_player.seat then + url = "ui://Main_Majiang/自己胡牌" + pNode = self._view + end + if win_seat == lose_seat then + url = "ui://Main_Majiang/eff_zimo" + end + + local he = UIPackage.CreateObjectFromURL(url) + pNode:AddChild(he) + he:GetTransition("t2"):Play() + he:Center() + if _room.room_config.people_num==2 then + if win_seat ~= _room.self_player.seat then + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + end + + if win_seat == _room.self_player.seat then + printlog("自己位置=====") + he:Center() + elseif url == "ui://Main_Majiang/eff_zimo" then + printlog("自摸地址==========") + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + + + + --- + local isZiMo=win_seat==lose_seat + DataManager.CurrenRoom.isZiMoHu=isZiMo + local hu_sound = isZiMo and ("zimo"..math.random(1, 3)) or ("hu"..math.random(1, 2)) + printlog("声音====>>>",hu_sound) + self:PlaySound("GeJiu_MJ",player.self_user.sex, hu_sound) + + local pNode = info._view + local url = "eff_list1" + local he_list = UIPackage.CreateObjectFromURL("ui://Extend_MJ_GeJiu/" .. url) + he_list.touchable = false + pNode:AddChild(he_list) + he_list:Center() + + coroutine.start(function() + for i = 1 ,#win_list do + local tem = win_list[i] + if tem.type>0 and tem.type<32 then + local com_name = "he" .. tem.type + local item = he_list:GetChild("list"):AddItemFromPool("ui://Extend_MJ_GeJiu/" .. com_name) + coroutine.wait(0.3) + end + + end + + coroutine.wait(2) + obj_win_card:Dispose() + he:Dispose() + he_list:Dispose() + self._popEvent = true + end) + end) + + _gamectr:AddEventListener(TX_GameEvent.EventNiao, function(...) + local arg = {...} + self._popEvent = false + local list = arg[1] + local start_seat = arg[2] + -- ViewUtil.PlaySound("GeJiu_MJ", "extend/majiang/chaozhou/sound/zhuaniao.mp3") + coroutine.start(self.RunNiao,self,list, start_seat) + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult1, function(...) + self._popEvent = false + self:__CloseTip() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = {...} + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local niao = result.niao + if liuju then + local le = UIPackage.CreateObjectFromURL("ui://Main_Majiang/LiuJu") + self._view:AddChild(le) + le:Center() + le:GetTransition("t0"):Play() + coroutine.start(function() + coroutine.wait(1) + le:Dispose() + end) + end + self:RemoveCursor() + if self._clearingView == nil then + self._clearingView = EXClearingView.new(self._root_view) + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + self._popEvent = true + end) + end + + if _room.curren_round ~= _room.room_config.round then + -- if #niao == 0 then self._view:GetChild("n13").visible = false end + self._clearingView:InitData(0, _room, result, nil, function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:ResetCardType() + if _room:checkHpNonnegative() then + p.cur_hp = data[i].hp_info.cur_hp + end + info:UpdateScore() + info._view:GetChild("zhanji").visible = true + local num = data[i].hp_info.total_hp + if num > 0 then + info._view:GetController("text_color").selectedIndex = 0 + info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + else + info._view:GetController("text_color").selectedIndex = 1 + info._view:GetChild("text_jifen").text = d2ad(num) + end + + info._view:GetChild("mask_piao").title = "" + info._view:GetController("piao_niao").selectedIndex = 0 + p.fz_list = {} + end + DataManager.CurrenRoom.self_player.card_list = {} + self._state.selectedIndex = 2 + self._clearingView = nil + end) + end + self._player_card_info[1]:ShowHuTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult2, function(...) + self:UnmarkSelfTuoguan() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = {...} + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + self._clearingView = EXClearingView.new() + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + end) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiaoTip, function() + self:UpdateRound() + self._tex_LeftCard.text = "0" + self._state.selectedIndex = 1 + self:__PiaoNiaoTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiao, function(...) + local arg = {...} + local seat = arg[1] + local num = arg[2] + if num > 0 then + local head_info = self._player_info[self:GetPos(seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. num + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + if seat == _room.self_player.seat then + if self._com_piao and _room.self_player.entrust then + self._com_piao:Dispose() + self._com_piao = nil + _room.curren_round = _room.curren_round - 1 + end + end + end) +end + +function M:OutCard(card) + if card ~= 0 then + printlog("当前出牌为===>>>"..card) + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card, function() + local info = self._player_card_info[1] + self:RemoveCursor() + info:UpdateHandCard() + + info:UpdateOutCardList(nil, card, self._cursor) + self:PlaySound("GeJiu_MJ", self._room.self_player.self_user.sex,tostring(card)) + self:PlayMJSound("chupai.mp3") + -- self:ShowHuTip() + end) + else + printlog("鬼牌不能出===>>>"..card) + end +end + +function M:__FangziTip(tip, weight) + printlog("__FangziTip") + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject("Main_Majiang", "Gcm_action_tips") + _chipeng_tip:GetController("hide_bg").selectedIndex = 1 + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + -- self._player_card_info[self:GetPos(p.seat)] + + local _lit_fanzi = _chipeng_tip:GetChild("lit_fanzi") + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + printlog(tip.tip_map_type) + pt(_tlist) + local tip_hu = false + local count = #_tlist + table.sort(_tlist) + local isHu = false + for k=1,#_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + local url = "ui://Main_Majiang/Btn_fztip" + local td_weight = td.weight + if td_weight == 16 then td_weight = 8 end + if td_weight == 8 then url = "ui://Main_Majiang/Btn_hu" end + local btn_t = _lit_fanzi:AddItemFromPool(url) + btn_t.icon = "ui://Main_Majiang/fztip_"..td_weight + btn_t.data = { tip, td } + btn_t.onClick:Add(self.__TipAction,self) + end + + -- if not (tonumber(weight) >= 16) then + local _btn_pass = _lit_fanzi:AddItemFromPool("ui://Main_Majiang/Btn_pass") + -- local _btn_pass = _chipeng_tip:GetChild("btn_pass") + _btn_pass.onClick:Set(function() + if tonumber(weight) >= 8 then + local guo_msg = MsgWindow.new(self._root_view, "确定要点过吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end) + guo_msg:Show() + else + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end) + -- end + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() +end + +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local list = tip.tip_map_type[td.weight] + printlog("__TipAction") + pt(list) + if (#list > 1) then + self:_ChiView(list, function(id) + _gamectr:SendAction(id) + self:__CloseTip() + end) + self._chipeng_tip.visible = false + return + end + + _gamectr:SendAction(td.id) + if (self._chipeng_tip == nil) then return end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil +end + +function M:_ChiView(tiplist, callback) + self._chipeng_tip.visible = false + printlog("_ChiView") + pt(tiplist) + local _pop_tip_choice = UIPackage.CreateObject("Extend_MJ_GeJiu", "Pop_tip_choice") + local list_choose1 = _pop_tip_choice:GetChild("Lst_choose") + local list_choose2 = _pop_tip_choice:GetChild("Lst_choose2") + local crossCtr = _pop_tip_choice:GetController("state") + crossCtr.selectedIndex = #tiplist == 3 and 0 or (#tiplist == 2 and 1 or (#tiplist == 4 and 2 or (#tiplist == 5 and 3 or 4))) + _pop_tip_choice:GetChild("Btn_cross").onClick:Add(function() + _pop_tip_choice:Dispose() + self._chipeng_tip.visible = true + end) + list_choose1:RemoveChildrenToPool() + list_choose2:RemoveChildrenToPool() + for i = 1, #tiplist do + local list_choose = i <= 3 and list_choose1 or list_choose2 + local item_choose = list_choose:AddItemFromPool() + item_choose:GetController("type").selectedIndex = (1 == tiplist[i].weight or 2 == tiplist[i].weight) and 1 or 0 + if tiplist[i].weight ~= 1 then + for j = 1, 4 do + item_choose:GetChild("card"..j).icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_"..tiplist[i].card) + end + else + local tem = {} + table.insert(tem, tiplist[i].opcard[1]) + table.insert(tem, tiplist[i].opcard[2]) + local tcard = tiplist[i].card + table.insert(tem, tcard) + table.sort(tem, function(a, b) + return a < b + end) + item_choose:GetChild("card1").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_"..tem[1]) + item_choose:GetChild("card2").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_"..tem[2]) + item_choose:GetChild("card4").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_"..tem[3]) + local cardpos = tem[2] > tcard and 1 or (tem[2] < tcard and 4 or 2) + item_choose:GetChild("card" .. cardpos):GetController("color").selectedIndex = 1 + end + item_choose.onClick:Add(function() + callback(tiplist[i].id) + end) + end + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width)/2, (self._view.height - _pop_tip_choice.height)/2) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:OnFangziAction(...) + self:__CloseTip() + local arg = {...} + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local index = arg[3] + printlog("OnFangziAction") + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject("Extend_MJ_GeJiu", "FzEffect") + if fz.type == FZType.Peng then + self:PlaySound("GeJiu_MJ", player.self_user.sex,"peng"..math.random(1, 3)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "碰框") + elseif fz.type == FZType.Chi then + self:PlaySound("GeJiu_MJ", player.self_user.sex,"chi"..math.random(1, 3)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "吃") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "吃") + else + self:PlaySound("GeJiu_MJ", player.self_user.sex,"gang"..math.random(1, 2)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "杠框") + end + effect.touchable = false + effect:GetTransition("t2"):Play() + pNode:AddChild(effect) + coroutine.start(function() + coroutine.wait(0.3) + self._popEvent = true + end) + coroutine.start(function() + coroutine.wait(2) + effect:Dispose() + end) + + self:RemoveCursor() + if (player.seat ~= fz.from_seat) then + local fs_info = _player_card_info[self:GetPos(fz.from_seat)] + fs_info:UpdateOutCardList() + end + info:UpdateFzList(fz, index, true) + local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi + printlog(getcard) + info:UpdateHandCard(getcard) + self:__CloseTip() +end + +function M:RunNiao(list, start_seat) + local _room = self._room + --local _niao_View = self._niao_View + self._niao_View = UIPackage.CreateObject("Extend_MJ_GeJiu","Panel_Birds") + self._view:AddChild(self._niao_View) + self._niao_View:Center() + local _niao_View = self._niao_View + local list_niao_card = self._niao_View:GetChild("Lst_birds") + list_niao_card:RemoveChildrenToPool() + for i = 1, #list do + --添加背面的麻將 + local item = list_niao_card:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "202_00") + item:GetChild("tex_score").text = "+" .. list[i].score + end + for i = 1, #list do + --顯示正面 + local item = list_niao_card:GetChildAt(i - 1) + local card = list[i].card + coroutine.wait(0.3) + item:GetTransition("appear"):Play() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_"..card) + if list[i].score > 0 then item:GetController("bg").selectedIndex = 1 end + end + coroutine.start(function() + coroutine.wait(1) + _niao_View:Dispose() + self._popEvent = true + end) +end + +-- function M:markOutCards(showTip, data) +-- for i = 1, #self._room.player_list do +-- local p = self._room.player_list[i] +-- local info = self._player_card_info[self:GetPos(p.seat)] +-- for j = 1, #p.outcard_list do +-- local card = p.outcard_list[j] +-- if card == data then +-- local obj = info:GetOutCardByIndex(j) +-- obj:GetController("gray").selectedIndex = showTip and 1 or 0 +-- end +-- end +-- end +-- end + +function M:__PiaoNiaoTip() + local obj_piao = UIPackage.CreateObject("Main_Majiang", "panel_piao_niao") + self._view:AddChild(obj_piao) + obj_piao.x = (self._view.width - obj_piao.width) * 0.5 + obj_piao.y = self._view.height * 0.6 + for i = 1, 4 do + obj_piao:GetChild("btn_" .. i).onClick:Add(function() + self._gamectr:SendAction(i - 1) + obj_piao:Dispose() + end) + end + self._com_piao = obj_piao +end + +function M:ReloadRoom(bskip) + local room = self._room + -- if not room.playing then + -- self._state.selectedIndex = 2 + -- else + -- self._state.selectedIndex = 1 + -- self._room._reload_flag = true + -- end + + if bskip == nil or bskip == false then + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + self._room._reload_flag = true + end + end + + + for i = 1, #room.player_list do + local p = room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + for i = 1, #p.fz_list do + info:UpdateFzList(p.fz_list[i], -1) + end + info:UpdateHandCard() + local head_info = self._player_info[self:GetPos(p.seat)] + head_info:UpdateScore() + head_info._view:GetChild('zhanji').visible = true + local num = p.total_hp or 0 + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(num) + end + + if p.seat == room.last_outcard_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil,card, self._cursor) + elseif p.seat == room.curren_outcard_seat then + info:UpdateHandCard(true) + info:UpdateOutCardList() + else + info:UpdateOutCardList() + end + if p.seat == room.banker_seat then + head_info:MarkBank(true) + end + -- if p.ready then + -- self._player_info[self:GetPos(p.seat)]:Ready(true) + -- end + if bskip == nil or bskip == false then + if p.ready and room.playing == false then + self._player_info[self:GetPos(p.seat)]:Ready(true) + end + end + if p.piao_niao~=nil and p.piao_niao > 0 then + local head_info = self._player_info[self:GetPos(p.seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + end + -- self:ShowHuTip() + + if bskip == nil or bskip == false then + self:UpdateCardBox(self:GetPos(room.curren_outcard_seat)) + self._tex_LeftCard.text = room.left_count + self:UpdateRound() + end +end + +function M:PlayerChangeLineState() + -- local isOutCard = true + -- local str = "玩家 " + -- for _ , player in ipairs(self._room.player_list) do + -- if player.line_state == 0 then + -- isOutCard = false + -- end + -- end + -- self._player_card_info[1]._area_handcard_list.touchable = isOutCard +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:__CloseTip() + if self._chipeng_tip then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if self._pop_tip_choice then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end + +end + +function M:__CloseGangTip() + if self._gang_tip_choice then + self._gang_tip_choice:Dispose() + self._gang_tip_choice = nil + end +end + + + +function M:closeTipOnTuoguan() + self:__CloseTip() +end + +function M:Destroy() + MJMainView.Destroy(self) + UIPackage.RemovePackage("extend/majiang/gejiu/ui/Extend_MJ_GeJiu") +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/gejiu/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/gejiu/EXPlayBackView.lua new file mode 100644 index 00000000..03bc01df --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/gejiu/EXPlayBackView.lua @@ -0,0 +1,298 @@ +local MJPlayBackView = require("main.majiang.MJPlayBackView") +local EXRoomConfig = import(".EXRoomConfig") +local EXClearingView = import(".EXClearingView") + +local Record_Event = import(".RecordEvent") + + +local M = {} + +--- Create a new +function M.new() + setmetatable(M,{__index = MJPlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = "PlayBackView" + self:init() + + return self +end + + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/majiang/gejiu/ui/Extend_MJ_GeJiu") + MJPlayBackView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num) + local _cardbox = self._view:GetChild("cardbox") + --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false + self._ctr_cardbox = _cardbox:GetController("c1") + self._tex_round = self._view:GetChild("tex_round") + self._tex_LeftCard = self._view:GetChild("remaining_card") + self._anchor = self._view:GetChild("mask_tips") + self._eventmap = {} + + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao + self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao + self._cmdmap[Record_Event.Evt_Result] = self.CmdResult +end + +function M:FillRoomData(data) + MJPlayBackView.FillRoomData(self) + if self._win_pic then self._win_pic:Dispose() end + if self._niao then self._niao:Dispose() end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local left_count = data.info.left_card + self:UpdateLeftCard(left_count) + local round = data.info.round + self:UpdateRound(round) + + local roominfo_panel = self._view:GetChild("roominfo_panel1") + roominfo_panel:GetChild("tex_roomid").text = room.room_id + roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + table.sort(p.card_list, ViewUtil.HandCardSort) + card_info:UpdateHandCard(false, true) + self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0 + end + + self:GenerateAllStepData(data) + self:UpdateStep(1) + -- self:ShowStep(0) +end + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateLeftCard(step.left_card) + -- self._ctr_cardbox.selectedIndex = step.current_out_seat + self:UpdateCardBox(self:GetPos(step.current_out_seat)) + self:UpdateStep(index + 1) + if step.cmd ~= Record_Event.Evt_OutCard then + self:RemoveCursor() + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hand_left_count = #p.card_list + info:Clear() + info:ResetFzList() + p.piao_niao = step.player_card_data[i].piao_niao + local head_info = self._player_info[self:GetPos(i)] + if p.piao_niao and p.piao_niao > 0 then + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + else + head_info._view:GetController("piao_niao").selectedIndex = 0 + end + if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil, nil, self._cursor) + else + info:UpdateOutCardList() + end + if step.cmd == Record_Event.Evt_GetCard and p.seat == step.current_out_seat then + info:UpdateHandCard(true, true) + else + info:UpdateHandCard(false, true) + end + end + if step.cmd == Record_Event.Evt_Win then + self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡") + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + else + if self._win_pic then + self._win_pic:Dispose() + end + end + if step.cmd == Record_Event.Evt_Niao then + local niao_list = step.niao + self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_GeJiu/Panel_Birds") + local list = self._niao:GetChild("Lst_birds") + list:RemoveChildrenToPool() + for i = 1, #niao_list do + local item = list:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_"..niao_list[i].card) + if niao_list[i].score > 0 then + item:GetController("bg").selectedIndex = 2 + end + end + self._view:AddChild(self._niao) + self._view:AddChild(self._view:GetChild("panel_record")) + self._niao:Center() + else + if self._niao then + self._niao:Dispose() + end + end + if step.cmd == Record_Event.Evt_Result then + if not self.result then + self.result = EXClearingView.new(self._root_view, true) + self.result:InitData(0, self._room, step.result_data) + self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5 + self.result._view.width = GRoot.inst.width + self.result._view.height = GRoot.inst.height + self.result._view:GetChild("btn_confirm").visible = false + self._anchor:AddChild(self.result._view) + self.result._view.x = self._anchor.x * -1 + self.result._view.y = self._anchor.y * -1 + else + self.result._view.visible = true + end + -- self.result._view:Center() + else + if self.result then + self.result._view.visible = false + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = "" + step.left_card = info.left_card + step.last_out_seat = 0 + step.current_out_seat = 1 + step.win = 0 + step.niao = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.piao_niao = p.piao_niao + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + table.sort(u.card_list, ViewUtil.HandCardSort) + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = 0 + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + for i = 1, #cmd.data.opcard do + list_remove(u.card_list, cmd.data.opcard[i]) + end + local fz = {} + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.opcard = cmd.data.opcard + local uf = data.player_card_data[cmd.data.from_seat] + if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then + table.remove(uf.outcard_list, #uf.outcard_list) + end + if fz.type ~= FZType.Gang_Peng then + u.fz_list[#u.fz_list + 1] = fz + else + for i = 1, #u.fz_list do + if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then + u.fz_list[i].type = FZType.Gang_Peng + end + end + end +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:CmdNiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.niao = cmd.data.niao +end + +function M:CmdPiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.player_card_data[cmd.seat].piao_niao = cmd.data.num +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result_data = cmd.data +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_deep_clone(last_step) + self._step[#self._step + 1] = step + step.result_data = nil + return step +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = "剩余 "..num.." 张牌" +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:UpdateRound(round) + self._tex_round.text = "第 "..round.."/"..self._room.room_config.round.." 局" +end + +function M:UpdateStep(step) + self._record:GetChild("tex_step").text = "第 " .. step .. " / " .. #self._step .. "步" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/gejiu/EXPlayer.lua b/lua_probject/extend_project/extend/majiang/gejiu/EXPlayer.lua new file mode 100644 index 00000000..fd26822b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/gejiu/EXPlayer.lua @@ -0,0 +1,36 @@ + + +local EXPlayer = { + auto, + -- 手牌列表 + hand_cards = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/gejiu/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/majiang/gejiu/EXPlayerInfoView.lua new file mode 100644 index 00000000..f8a5fd69 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/gejiu/EXPlayerInfoView.lua @@ -0,0 +1,76 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + +function M:init() + PlayerInfoView.init(self) + self._tex_score = self._view:GetChild("info"):GetChild("tex_score1") + self._tex_score2 = self._view:GetChild("info"):GetChild("tex_score2") + self._ct_score = self._view:GetChild("info"):GetController("score") +end + +function M:ShowInteraction(type,str) + if type == 3 then + Voice.DownLoad(str, function(clip) + if (clip ) then + self:ShowMaskVoice(clip.length) + GameApplication.Instance:PlayVoice(clip) + end + end) + elseif type == 4 then + self:SetChat(str) + elseif type == 2 then + local chat_index = tonumber(str) + self._main_view:PlayChatSound(self._player.self_user.sex,chat_index) + local language, index = self._main_view:GetChatMsgLanguage(chat_index) + self:SetChat(self._main_view.Fix_Msg_Chat[index]) + elseif type == 1 then + self:SetBiaoqing("ui://Chat/"..str) + end +end + +function M:UpdateRemainCard(card_num, hide) + if hide then + self._view:GetController("show_remain").selectedIndex = 0 + else + self._view:GetController("show_remain").selectedIndex = 1 + end + self._view:GetChild("com_remain"):GetChild("tex_remain").text = card_num +end + +function M:FillData(player) + PlayerInfoView.FillData(self, player) + self:UpdateScore(player.total_score) +end + +function M:UpdateScore() + local score = self._player.total_score + local room = DataManager.CurrenRoom + if room:checkHpNonnegative() then + score = d2ad(self._player.cur_hp) + end + if not score then + score = 0 + end + if score < 0 then + self._ct_score.selectedIndex = 1 + self._tex_score2.text = score + else + self._ct_score.selectedIndex = 0 + if not room:checkHpNonnegative() then + score = "+" .. score + end + self._tex_score.text = score + end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/gejiu/EXRoomConfig.lua b/lua_probject/extend_project/extend/majiang/gejiu/EXRoomConfig.lua new file mode 100644 index 00000000..040d9ac0 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/gejiu/EXRoomConfig.lua @@ -0,0 +1,159 @@ + + + +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.config=config + self.class = "RoomConfig" + self.round = config["times"] + self.maxPlayers = config["maxPlayers"] + self.fengding = config["fengding"] + self.wanfa = config["wanfa"] + self.qiduijiafan=config["qiduijiafan"] + self.shoudailongjiafan=config["shoudailongjiafan"] + self.loudilongjiafan=config["loudilongjiafan"] + self.bunengchi=config["bunengchi"] + + return self +end + +function M:GetDes(sp) + sp = sp or " " + local count=0 + local str = self.round and self.round .. "局" .. " " or "" + str = str .. RoomConfig.GetDes(self, sp).."\n" + + + if (self.fengding) then + str = str .. "封顶" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if (self.qiduijiafan) then + local strL=2 + str = str .."可胡七对" + if self.qiduijiafan then + str = str .."翻倍" + strL=0 + end + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.shoudailongjiafan then + str = str .."手逮龙加番" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.loudilongjiafan then + str = str .."落地龙" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.bunengchi then + str = str .."不能吃" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + + +function M:GetDes2(sp) + sp = sp or " " + local str = RoomConfig.GetDes(self, sp) + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + + + + + if (self.qiduijiafan) then + str = str .."可胡七对" + if self.qiduijiafan then + str = str .."-翻倍" + end + str = str .. sp + end + + + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_MJ_GeJiu/gamerule") + return gamerulepanel +end + + +function M:GetGameSMSize() + return 467,500 +end + + +function M:GetGameName() + return "个旧麻将" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/gejiu/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/gejiu/ExtendConfig.lua new file mode 100644 index 00000000..96c86352 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/gejiu/ExtendConfig.lua @@ -0,0 +1,173 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import(".EXGameInfo") +local EXMainView = import(".EXMainView") +local EXGameController = import(".EXGameController") +local EXRoomConfig = import(".EXRoomConfig") +local EXPlayBackView =import(".EXPlayBackView") +local MJRoom = require("main.majiang.MJRoom") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = "ExtendConfig" + self.extend_id = 33 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/majiang/gejiu/ui/Info_MJ_GeJiu") + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage("extend/majiang/gejiu/ui/Extend_MJ_GeJiu") + ResourcesManager.UnLoadGroup("GeJiu_MJ") +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return MJRoom.new() +end + +function M:FillRoomConfig(room,_config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + + + local reload = s2croom["reload"] + local _tableInfo = s2croom["tableInfo"] + + local _config = _tableInfo["config"] + + pt(_config) + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo["playerData"] + room.curren_round = _tableInfo["round"] + self:FillPlayerData(playerList) + + if (reload) then + local _reloadInfo = s2croom["reloadInfo"] + local _hand_card = _reloadInfo["hand_card"] + room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + + local active_seat = _reloadInfo["active_seat"] + local bank_seat = _reloadInfo["banker_seat"] + local playing = _reloadInfo["playing"] + local _info_list = _reloadInfo["info_list"] + local last_outcard_seat = _reloadInfo["last_outcard_seat"] + room.left_count = _reloadInfo["left_card"] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo["curren_outcard_seat"] + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i=1,#_info_list do + local tem = _info_list[i] + local playerid = tem["playerid"] + local p = room:GetPlayerById(playerid) + local outcard_list = tem["outcard_list"] + p.outcard_list = outcard_list + p.total_score = tem["score"] + p.hand_left_count = tem["card_count"] + p.piao_niao = tem["piao_niao"] or 0 + local opcard = tem["opcard"] + for k=1,#opcard do + local op = opcard[k] + local fz = {} + fz.type = op["type"] + fz.card = op["card"] + p.fz_list[#p.fz_list+1] = fz + end + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.left_count = _tableInfo["left_card"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + + local _info_list = _tableInfo["playerData"] + for i = 1,#_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + p.piao_niao = _jp["piao_niao"] + -- print(DataManager.SelfUser.account_id,pid) + -- if (278 == pid) then + -- room.self_player = p + -- p.self_user = DataManager.SelfUser + -- else + if p.seat == 1 then room.self_player = p end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.card_list = _hand_card + --room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + p.total_score = _jp["score"] + p.hand_left_count = #_hand_card + if _jp.hp_info then + room.room_config.isNonnegative = 1 + p.cur_hp = _jp.hp_info.cur_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/gejiu/GameEvent.lua b/lua_probject/extend_project/extend/majiang/gejiu/GameEvent.lua new file mode 100644 index 00000000..9180694e --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/gejiu/GameEvent.lua @@ -0,0 +1,37 @@ + +local TX_GameEvent = { + -- 发牌 + SendCards = "SendCards", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + EventNiao = "EventNiao", + + EvnetPiaoTip = "EvnetPiaoTip", + + EvnetPiao = "EvnetPiao", + + + --- + SendLaiZi="SendLaiZi", + SendGangZi = "SendGangZi", + EventBuGang = "EventBuGang", + +} +return TX_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/gejiu/MJPlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/majiang/gejiu/MJPlayerSelfCardInfoView.lua new file mode 100644 index 00000000..72d1d092 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/gejiu/MJPlayerSelfCardInfoView.lua @@ -0,0 +1,213 @@ +local MJPlayerSelfCardInfoView = require("main.majiang.MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local CardCheck = import(".CardCheck") + +local M = {} +-- +function M.new(view,mainView) + setmetatable(MJPlayerSelfCardInfoView, {__index = MJPlayerCardInfoView}) + setmetatable(M, {__index = MJPlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:ShowHuTip(card_list) + printlog("ShowHuTip") + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + for i=1,#DataManager.CurrenRoom.laiziInfo do + if IsHasDictionary(DataManager.CurrenRoom.laiziInfo[i],tingList)==false then + table.insert(tingList,DataManager.CurrenRoom.laiziInfo[i] ) + end + end + end + + end + self._mainView._hu_tip:FillData(tingList) +end + +function M:UpdateHandCard(getcard, mp) + MJPlayerSelfCardInfoView.UpdateHandCard(self, getcard, mp) + local _carViewList = self._carViewList + + if DataManager.CurrenRoom.laiziInfo and #self._carViewList>0 then + for i=1,#self._carViewList do + local obj=self._carViewList[i] + if obj and obj.card then + if IsHasDictionary(obj.card_item,DataManager.CurrenRoom.laiziInfo) then + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=1 + end + + end + else + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=0 + end + end + end + + end + end + + + end + + + local card_list = DataManager.CurrenRoom.self_player.card_list + self:ShowHuTip(card_list) + if getcard then + self._out_card = true + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + -- 记录需要标记听牌提示的牌 + local lst_mark = {} + local total_num = 0 + for i = 1, #_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + list_remove(card_list, card) + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + local count = 0 + for j = 1, #tingList do + count = count + self._mainView:CountCardLeftNum(tingList[j]) + end + local tem = {} + tem.item = btn + tem.count = count + total_num = total_num + count + table.insert(lst_mark, tem) + end + table.insert(card_list, card) + end + table.sort(lst_mark, function(a, b) + return a.count > b.count + end) + -- 如果几张牌的可胡牌数一致,也只显示'三角',可胡牌数不一致才显示'多' + local all_same = #lst_mark ~= 0 and lst_mark[1].count == total_num / #lst_mark or false + for i = 1, #lst_mark do + local tem = lst_mark[i] + if all_same or tem.count < lst_mark[1].count then + tem.item:GetController("mark_ting").selectedIndex = 1 + else + tem.item:GetController("mark_ting").selectedIndex = 2 + end + end + else + for i = 1, #_carViewList do + local btn = _carViewList[i].card + if btn:GetController("mark_ting").selectedIndex ~= 0 then + btn:GetController("mark_ting").selectedIndex = 0 + end + end + self._out_card = false + end + +end + +function M:__OnClickHandCard(context) + local button = context.sender + local _carViewList = self._carViewList + local refresh = true + local card_list = {} + for i=1,#_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + if btn ~= button and btn.selected == true then + if button.data.card_item == card then + refresh = false + else + self._mainView:markOutCards(false, card) + end + btn.selected = false + end + if not btn.selected then + table.insert(card_list, card) + end + end + + if self._out_card then + self:ShowHuTip(card_list) + end + + -- 标记出牌 + if refresh then + if button.selected then + self._mainView:markOutCards(true, button.data.card_item) + else + self._mainView:markOutCards(false, button.data.card_item) + end + end + + local _room = DataManager.CurrenRoom + if not button.selected and _room.curren_outcard_seat == _room.self_player.seat then + local card = button.data + self._mainView:OutCard(card.card_item) + end +end + +function M:__OnDragStart(card) + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + list_remove(card_list, card) + self:ShowHuTip(card_list) +end + +function M:__OnDragEnd(context) + if self.outcard_button then + self.outcard_button:Dispose() + self.outcard_button = nil + end + local button = context.sender + + --button:RemoveFromParent() + local card = button.data + local _room = DataManager.CurrenRoom + + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + if (button.y - card.old_postion.y < -50 and _room.curren_outcard_seat == _room.self_player.seat and card.card_item ~= 0) then + self._mainView:OutCard(card.card_item) + button.touchable = false + self.outcard_button = button + else + self._area_handcard_list:AddChildAt(button, card.index) + button:TweenMove(card.old_postion, 0.2) + end +end + +function M:CheckPlayerOnlineState() + local room = DataManager.CurrenRoom + for i = 1, #room.player_list do + if room.player_list[i].line_state == 0 then + return false + end + end + return true +end +function M:Clear(bskip) + --self._ctr_state.selectedIndex = 0 + self._area_fz_list.x = self._src_fz_list.x + self._area_fz_list.y = self._src_fz_list.y + self._area_fz_list.width = self._src_fz_list.z + self._area_fz_list.height = self._src_fz_list.w + + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_outcard_list:RemoveChildren(0, -1, true) + if bskip == nil or bskip == false then + self._mask_liangpai:RemoveChildren(0, -1, true) + end + + for i=1,#self._carViewList do + self._carViewList[i].card:Dispose() + end + self._carViewList = {} + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/gejiu/Protocol.lua b/lua_probject/extend_project/extend/majiang/gejiu/Protocol.lua new file mode 100644 index 00000000..4df49454 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/gejiu/Protocol.lua @@ -0,0 +1,52 @@ +local Protocol = { + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌 + GAME_DIS_CARD = "611", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- 提示选择行为 + GAME_ACTION = "612", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 小结算 + GAME_EVT_RESULT1 = "817", + + -- 大结算 + GAME_EVT_RESULT2 = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + + -- 抓鸟事件 + GAME_EVT_NIAO = "821", + + -- 飘鸟提示 + GAME_EVT_PIAOTIP = "833", + + -- 飘鸟事件 + GAME_EVT_PIAO = "834", + + GAME_EVT_GANGZI = "837", + GAME_EVT_BUGANG = "838", + GAME_EVT_DOGANG = "839", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/gejiu/RecordEvent.lua b/lua_probject/extend_project/extend/majiang/gejiu/RecordEvent.lua new file mode 100644 index 00000000..09748550 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/gejiu/RecordEvent.lua @@ -0,0 +1,11 @@ +local Record_Event = { + Evt_GetCard = "GetCard", + Evt_OutCard = "OutCard", + Evt_Action = "Action", + Evt_Win = "Win", + Evt_Niao = "Niao", + Evt_Piao = "PiaoNiao", + Evt_Result = "Result", +} + +return Record_Event \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/hongzhong/CardCheck.lua b/lua_probject/extend_project/extend/majiang/hongzhong/CardCheck.lua new file mode 100644 index 00000000..c22ab3a8 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/hongzhong/CardCheck.lua @@ -0,0 +1,333 @@ +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + num = num == nil and 1 or num + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if(result ==num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local zhongid = 412 + + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + zhong_count = 0, + qidui = false, + hongzhong_count = 0, + qidui_pari_count = 0 +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + if (card == zhongid) then + self.zhong_count = self.zhong_count +1 + else + self.cardList[#self.cardList + 1] = card + end + end + table.sort(self.cardList) +end + +function M:tryShunzi(card) + if (card < 400 and card % 100 > 7) then + return false + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryKezi(card) + if (checkCardAndRomve(card, self.cardList, 3)) then + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (checkCardAndRomve(card, self.cardList, 2)) then + local cardGroup = {card,card} + self:push(cardGroup) + self.pair_count = 1 + return true + end + return false +end + + +function M:tryKezi1Zhong(card) + if (self.zhong_count >= 1 and checkCardAndRomve(card, self.cardList,2)) then + local cardGroup = {card,card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + return true + end + return false +end + +function M:tryKezi2Zhong(card) + if (self.zhong_count >= 2 and checkCardAndRomve(card, self.cardList,1)) then + local cardGroup = {card,zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + return true + end + return false +end + +function M:tryShunzi1Zhong(card) + if (card % 100 > 8) then + return false + end + + if (self.zhong_count < 1) then + return false + end + + if (checkCard(card + 1, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,card+1,zhongid} + self:push(cardGroup) + return true + end + + if (checkCard(card + 2, self.cardList) and ((card + 1) % 100 ~= 0)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 2, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,zhongid,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair1Zhong(card) + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 1) then + return false + end + removeCard(self.cardList, card, 1) + local cardGroup = {card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + self.pair_count = 1 + return true +end + +function M:tryPair2Zhong() + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 2) then + return false + end + local cardGroup = {zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + self.pair_count = 1 + return true +end + +function M:tryWin() + if (self.zhong_count == 4 and not self.eight_laizi) or (self.zhong_count == 8 and self.eight_laizi) then + return true + end + if (#self.cardList == 0 and self.pair_count == 1) then + return true + end + if (#self.cardList == 0 and self.pair_count == 0) then + return self:tryPair2Zhong() + end + + if (#self.cardList == 0) then + return false + end + + local activeCard = self.cardList[1] + if (self:tryPair(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + + if (self:tryKezi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi2Zhong(activeCard)) then + + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryPair1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + return false +end + +function M:checkQidui() + if (not self.qidui) then + return false + end + if ((#self.cardList + self.zhong_count) ~= 14) then + return false + end + local cardList = membe_clone(self.cardList) + self.qidui_pari_count = 0 + self.hongzhong_count = self.zhong_count + return self:isQdPari(cardList) +end + +function M:isQdPari(cardList) + if(self.qidui_pari_count == 7) then + return true + end + if (#cardList== 0) then + return true + end + local card = cardList[1] + if (cardNum(card, cardList) >= 2) then + removeCard(cardList, card, 2) + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + + if (self.hongzhong_count > 0) then + removeCard(cardList, card, 1) + self.hongzhong_count = self.hongzhong_count - 1 + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + return false +end + +local function init(self,cardInhand,addCard,isZhong,qidui,eightLaizi) + self.stack = {} + self.pair_count = 0 + self.cardList = membe_clone(cardInhand) + self.qidui = qidui + self.eight_laizi = eightLaizi + self.cardList[#self.cardList+1] = addCard + if (isZhong) then + self.zhong_count = cardNum(zhongid, self.cardList) + removeCard(self.cardList, zhongid, self.zhong_count) + end + table.sort(self.cardList) + return self:checkQidui() or self:tryWin() +end + +function M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + local self = setmetatable({}, {__index = M}) + local tingList = {} + if not cardInhand or #cardInhand == 0 then + return tingList + end + for k=100,300,100 do + for i=1,9 do + local tem = k + i + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + if(result) then + tingList[#tingList + 1] = tem + end + end + end + return tingList +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/hongzhong/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/hongzhong/EXClearingView.lua new file mode 100644 index 00000000..d0597da6 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/hongzhong/EXClearingView.lua @@ -0,0 +1,385 @@ +require("Game.View.ResultView") + +local EXClearingView = {} + +local M = EXClearingView + +function EXClearingView.new(blur_view) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self._full = true + ResultView.init(self, "ui://Main_Majiang/clearing") + + self._currenIndex = 0 + self._blur_view = blur_view + self._close_zone = false + self.xiPaiCtr=self._view:GetController("xipai") + + self:InitMaPai() + return self +end + + +function M:InitMaPai() + self.maPaiCtr=self._view:GetController("mapai") + self.maPaiCtr.selectedIndex=0 + + self.maPaiList={} + + for i=1,10 do + local tempMP=self._view:GetChild("niao"..i) + table.insert(self.maPaiList,tempMP) + end + +end + + +function M:IsMapaiShow(niao,isShow) + if niao then + niao.visible=isShow + end +end + + +function M:SetMaPaiValue(niao,value) + if niao then + niao.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..value + end +end + +function M:SetMaPaiColor(niao,num) + niao:GetController("color").selectedIndex=num +end + +function M:HideAllMapai() + for i=1,#self.maPaiList do + self:IsMapaiShow(self.maPaiList[i],false) + self:SetMaPaiColor(self.maPaiList[i],0) + end +end + + + +function M:ShowSelectMaPai(niaoList) + printlog("ccccccccccccccccccaaaaaaaaaaaaaa00") + pt(niaoList) + if niaoList and #niaoList>0 then + self.maPaiCtr.selectedIndex=1 + self:HideAllMapai() + for i=1,#niaoList do + self:IsMapaiShow(self.maPaiList[i],true) + self:SetMaPaiValue(self.maPaiList[i],niaoList[i].card) + if niaoList[i].score>0 then + self:SetMaPaiColor(self.maPaiList[i],2) + end + end + else + self.maPaiCtr.selectedIndex=0 + end +end + + +function M:InitData(over, room, result, total_result, callback) + self._callback = callback + local _overCtr = self._view:GetController("over") + local btn_confirm = self._view:GetChild("btn_confirm") + local btn_result = self._view:GetChild("btn_showResult") + local btn_close = self._view:GetChild("big_result"):GetChild("btn_close") + local _btnCtr = self._view:GetController("button") + local _sdkCtr = self._view:GetController("sdk") + local ctr_type = self._view:GetController("type") + self._view:GetChild("tex_roominfo").text = string.format("房号%s 局%s/%s %s", room.room_id, room.curren_round, room.room_config.round, os.date("%Y-%m-%d %H:%M:%S", os.time())) + self._view:GetChild("tex_gameinfo").text = string.gsub(room.room_config:GetDes(), "\r", "") + + local paixingxiangqing=self._view:GetChild("btn_detal") + paixingxiangqing.visible=false + + local fanhuipaixing=self._view:GetChild("btn_fanhuipaixing") + fanhuipaixing.visible=false + + + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig and round>1 then + self.xiPaiCtr.selectedIndex=1 + else + self.xiPaiCtr.selectedIndex=0 + end + + + if result then + self:ShowSelectMaPai(result.niao) + end + + if over ~= 2 then + local xipai=self._view:GetChild("btn_xipai") + xipai.touchable=true + xipai.onClick:Add(function() + local xiPaiCallBack=function () + xipai.touchable=false + self.xiPaiCtr.selectedIndex=0 + ViewUtil.ErrorTip(1000000,"申请洗牌成功") + end + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendXiPaiAction(xiPaiCallBack) + end) + if result and result.xipai_score then + --xipai.text="洗牌 积分x"..result.xipai_score + end + + if result.liuju then + ctr_type.selectedIndex = 3 + else + local info_list = result.info_list + for i = 1, #info_list do + local is_win = info_list[i].is_win + if is_win then + if info_list[i].seat == room.self_player.seat then + ctr_type.selectedIndex = 1 + else + ctr_type.selectedIndex = 2 + end + end + end + end + if over == 0 then + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + btn_confirm.onClick:Add(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:DestroyWithCallback() + end) + self:AddClearItem(room, result.info_list, nil, over, result.niao, result.active_player) + elseif over == 1 then + self.xiPaiCtr.selectedIndex=0 + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add(function() + _overCtr.selectedIndex = 1 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + self.maPaiCtr.selectedIndex=0 + if self._qsinfo_view then + self._qsinfo_view:Dispose() + end + end) + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + self:AddClearItem(room, result.info_list, total_result.info_list, over, result.niao, result.active_player) + end + else + _overCtr.selectedIndex = 1 + self.xiPaiCtr.selectedIndex=0 + self.maPaiCtr.selectedIndex=0 + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + self:AddClearItem(room, nil, total_result.info_list, over) + end +end + +function M:AddClearItem(room, data, total_data,over, niao, active_player) + local n = over + 1 + local list_view1 = self._view:GetChild("player_list_1") + local list_view2 = self._view:GetChild("player_list_2") + if 0 == over or 1 == over then + table.sort(data, function(a,b) return a.seat > b.seat end) + list_view1:RemoveChildrenToPool() + for i=1,#data do + local item = list_view1:AddItemFromPool() + self:FillItemData(room, data[i], item, active_player, niao) + end + if #data == 3 then + list_view1.lineGap = 54 + elseif #data == 2 then + list_view1.lineGap = 108 + end + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end +end + +function M:FillItemData(room, data, item, active_player, niao) + local _gamectr = ControllerManager.GetController(GameController) + local p = room:GetPlayerBySeat(data["seat"]) + item:GetChild("playerName").text = p.self_user.nick_name + + -- 手牌 + local hand_cards = data["hand_card"] + table.sort( hand_cards, ViewUtil.HandCardSort) + local hand_list_view = item:GetChild("hand_card_list") + hand_list_view:RemoveChildrenToPool() + for i=1,#hand_cards do + local card = hand_list_view:AddItemFromPool() + card.icon = "ui://Main_Majiang/202_"..hand_cards[i] + end + hand_list_view.width = 52 * #hand_cards + + local fz_card = p.fz_list + local fz_card_list = item:GetChild("fz_card_list") + fz_card_list.width = 157 * #fz_card * 0.8 + fz_card_list:RemoveChildrenToPool() + for i=1,#fz_card do + if fz_card[i].type == FZType.Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j=1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + elseif fz_card[i].type == FZType.Gang or fz_card[i].type == FZType.Gang_An or fz_card[i].type == FZType.Gang_Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_4") + for j=1,4 do + local card = item:GetChild("card_" .. j) + if fz_card[i].type == FZType.Gang_An and j == 4 then + card.icon = "ui://Main_Majiang/202_00" + else + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + end + end + end + + local huadd = data["hu_score"] + local gangadd = data["gang_score"] + local birdadd = data["niao_score"] + local total = data["round_score"] + local sp = " " + local str = "胡:"..huadd.."分" + str = str..sp.."杠:"..gangadd.."分" + str = str..sp.."扎鸟:"..birdadd.."分" + if data["piao_niao_score"] then + str = str..sp.."飘鸟:"..data["piao_niao_score"].."分" + end + item:GetChild("score1").text = str + -- local total_score = data["total_score"] + if total >= 0 then + item:GetChild("score2").text = "+"..total + item:GetChild("score2").grayed = false + else + item:GetChild("score2").text = total + item:GetChild("score2").grayed = true + end + + local hp_nonnegative = room:checkHpNonnegative() + item:GetController("nonnegative").selectedIndex = hp_nonnegative and 1 or 0 + if hp_nonnegative then + local hp_info = data.hp_info + local ctr_hp_limit = item:GetController("hp_limit") + local hp = d2ad(hp_info.round_actual_hp) + if hp >= 0 then hp = "+" .. tostring(hp) end + item:GetChild("tex_hp").text = hp + ctr_hp_limit.selectedIndex = hp_info.upper_limit and 1 or 0 + end + + local is_win = data["is_win"] or false + item:GetController("win").selectedIndex = is_win and 0 or 1 + if p.self_user.account_id == active_player and is_win == false and total < 0 then + item:GetController("win").selectedIndex = 2 + end + local win_card = item:GetChild("win_card") + if is_win then + win_card.icon = "ui://Main_Majiang/202_"..data["win_card"] + local lst_niao = item:GetChild("list_niao") + lst_niao:RemoveChildrenToPool() + for i = 1, #niao do + if niao[i].score > 0 then + local card_niao = lst_niao:AddItemFromPool() + card_niao.icon = "ui://Main_Majiang/202_" .. niao[i].card + end + end + end + if p.seat == room.banker_seat then + item:GetController("bank").selectedIndex = 1 + end +end + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + player_list[i].id = user.account_id + player_list[i].hp_info = data[i].hp_info + player_list[i].score = data[i].total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + + local settle_log = data[i].settle_log + player_list[i].param = {} + player_list[i].param[1]={} + player_list[i].param[1].key = "自摸次数:" + player_list[i].param[1].value = tostring(data[i].settle_log.zimo) + player_list[i].param[2]={} + player_list[i].param[2].key = "接炮次数:" + player_list[i].param[2].value = tostring(data[i].settle_log.jie_pao) + player_list[i].param[3]={} + player_list[i].param[3].key = "点炮次数:" + player_list[i].param[3].value = tostring(data[i].settle_log.dian_pao) + player_list[i].param[4]={} + player_list[i].param[4].key = "暗杠次数:" + player_list[i].param[4].value = tostring(data[i].settle_log.an_kong) + player_list[i].param[5]={} + player_list[i].param[5].key = "明杠次数:" + player_list[i].param[5].value = tostring(data[i].settle_log.ming_kong) + end + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + local big_result = self._view:GetChild("big_result") + big_result:GetChild("txt_room_info").text = string.format("%s 房号%s 局%s/%s", os.date("%Y/%m/%d", os.time()), room.room_id, room.curren_round, room.room_config.round) + local lst_p = big_result:GetChild("player_list") + if #player_list == 3 then + lst_p.columnGap = 108 + elseif #player_list == 2 then + lst_p.columnGap = 208 + end + self:InitBigResult(room, 30) + local show_detail = room.hpOnOff == 1 + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + if show_detail then + local score = 0 + if com_p:GetController("pn").selectedIndex == 0 then + score = com_p:GetChild("txt_navigate").text + else + score = com_p:GetChild("txt_positive").text + end + score = score / room.score_times + com_p:GetChild("tex_detail_score").text = string.format("%s × %s倍", score, room.score_times) + end + end + if room.group_id ~= 0 then + big_result:GetController("group").selectedIndex = 1 + end + DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild("btn_head") + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= "" then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end + +function M:DestroyWithCallback() + if self._callback then + self._callback() + end + self:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/hongzhong/EXGameController.lua b/lua_probject/extend_project/extend/majiang/hongzhong/EXGameController.lua new file mode 100644 index 00000000..b89f9cd7 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/hongzhong/EXGameController.lua @@ -0,0 +1,394 @@ +local TX_Protocol = import(".Protocol") +local FZTipList = require("main.majiang.FZData") +local TX_GameEvent = import(".GameEvent") + +local M = {} + +--- Create a new GameController +function M.new() + setmetatable(M,{__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("测试麻将") + self.class = "TX_GameController" + return self +end + +function M:init(name) + GameController.init(self,name) + + self._eventmap[TX_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[TX_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[TX_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[TX_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[TX_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[TX_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + self._eventmap[TX_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[TX_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[TX_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[TX_Protocol.GAME_EVT_RESULT2] = self.OnEventResult2 + self._eventmap[TX_Protocol.GAME_EVT_NIAO] = self.OnEventNiao + self._eventmap[TX_Protocol.GAME_EVT_PIAOTIP] = self.OnEventPiaoTip + self._eventmap[TX_Protocol.GAME_EVT_PIAO] = self.OnEventPiao + self._eventmap[TX_Protocol.GAME_EVENT_XIPAI] = self.OnEventXiPai + self._eventmap[TX_Protocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim + +end + + +function M:SendXiPaiAction(callBack) + local _data = {} + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_XIPAI, _data) + self.XiPaiCallBack=callBack +end + +function M:OnEventXiPai(evt_data) + if evt_data["result"]==0 then + if self.XiPaiCallBack then + self.XiPaiCallBack() + end + else + ViewUtil.ErrorTip(1000000,"申请洗牌失败") + end + +end + +function M:OnEventXiPaiAnim(evt_data) + printlog("洗牌动画===》》》》") + pt(evt_data) + local playeridList = evt_data["list"] + local my_isXiPai=false + local other_isXiPai=false + if playeridList and #playeridList>0 then + for i=1,#playeridList do + local p = self._room:GetPlayerById(playeridList[i]) + if p== self._room.self_player then + my_isXiPai=true + else + other_isXiPai=true + end + end + end + + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EventXiPai,my_isXiPai,other_isXiPai) + end) +end + + +local __pre_delete_card = false +-- 发送出牌指令到服务器 +function M:SendOutCard(card, callback) + local _room = self._room + local p = _room.self_player + + + local _data = {} + _data["card"] = card + _data["card_list"] = p.card_list + if p.outcard_list and #p.outcard_list>0 then + _data["outcard_list"] = p.outcard_list + end + + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_DIS_CARD, _data) + + -- 进行预删牌处理 + local p = _room.self_player + _room.curren_outcard_seat = -1 + list_remove(p.card_list,card) + table.sort(p.card_list, ViewUtil.HandCardSort) + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + __pre_delete_card = true + callback() +end + + +-- 发送放子选择到服务器 +function M:SendAction(id) + local _data = {} + _data["id"] = id + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_ACTION, _data) +end + +function M:OnEventSendCards(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + --if not _room.room_config.piao_niao or _room.self_player.entrust then + -- _room.curren_round = _room.curren_round + 1 + --end + _room.curren_round = evt_data["round"] + + if _room.curren_round > 0 then _room.playing = true end + + -- _room.SelfPlayer.AutoOutCard = false + local handcards = evt_data["card_list"] + local p = _room.self_player + local seat = evt_data["bank_seat"] + self._cacheEvent:Enqueue(function() + _room.banker_seat = seat + for i=1,#_room.player_list do + _room.player_list[i].hand_left_count = 13 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + end + p.card_list = handcards + self._room.self_player.hand_left_count = #handcards + table.sort( handcards, ViewUtil.HandCardSort ) + DispatchEvent(self._dispatcher,TX_GameEvent.SendCards, p) + end) +end + +function M:OnEventOutCard(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local ting_list = nil + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + _room.last_outcard_seat = seat + if seat == _room.self_player.seat and __pre_delete_card then + __pre_delete_card = false + else + if seat == _room.self_player.seat then + list_remove(p.card_list, card) + table.sort(p.card_list, ViewUtil.HandCardSort) + end + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + DispatchEvent(self._dispatcher,TX_GameEvent.OutCard, p, card) + end + end) +end + + +function M:OnEventTakeCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + p.hand_left_count = p.hand_left_count +1 + if (seat == _room.self_player.seat) then + _room.self_player.card_list[#_room.self_player.card_list+1] = card + -- table.sort( _room.self_player.card_list, ViewUtil.HandCardSort ) + end + DispatchEvent(self._dispatcher,TX_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnEventOutHint(evt_data) + self._cacheEvent:Enqueue(function() + self._room.curren_outcard_seat = self._room.self_player.seat + DispatchEvent(self._dispatcher,TX_GameEvent.OutHint) + end) +end + +function M:OnEventTurn(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + -- self._room.curren_outcard_seat = seat + DispatchEvent(self._dispatcher,TX_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + local weight = evt_data["weight"] + for i=1,#list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + -- if (dtip["opcard"]) then + -- local opcard = dtip["opcard"] + -- tip.OpCard = opcard + -- tip.OpCard[3] = tip.Card + -- table.sort(tip.OpCard) + -- end + tiplist:AddTip(tip) + end + DispatchEvent(self._dispatcher,TX_GameEvent.FZTips, tiplist, weight) + end) +end + +function M:OnEventFzAction(evt_data) + local _room = self._room + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local type = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + -- local openkong = evt_data["openkong"] + + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local fz = nil + local index = -1 + local ftype = type + if (ftype == FZType.Gang_Peng) then + for i=1,#p.fz_list do + if (p.fz_list[i].card == card) then + p.fz_list[i].card = card + fz = p.fz_list[i] + fz.type = type + index = i -1 + break + end + end + end + if (index == -1) then + fz = {} + fz.card = card + fz.type = type + fz.active_card = actice_card + p.fz_list[#p.fz_list+1] = fz + end + fz.from_seat = from_seat + local remove_num = #opcard + + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(p.card_list,opcard[i]) + end + end + + p.hand_left_count = p.hand_left_count - remove_num + if from_seat ~= p.seat then + -- if (fz.Type == FZType.Chi) then card = actice_card end + local fp = _room:GetPlayerBySeat(from_seat) + table.remove(fp.outcard_list,#fp.outcard_list) + end + + DispatchEvent(self._dispatcher,TX_GameEvent.FangziAction, fz, p, index) + end) +end + +function M:OnEventHu(evt_data) + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local hu_card = evt_data["win_card"] + table.sort(cards, ViewUtil.HandCardSort) + cards[#cards +1] = hu_card + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + DispatchEvent(self._dispatcher,TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], cards, hu_card) + end) +end + +function M:OneventResult1(evt_data) + local over = evt_data.type + --0:小结算 1:小大结算 2:大结算 + self._room._reload_flag = false + self._room.playing = false + if 0 == over then + local result = evt_data.result + self._cacheEvent:Enqueue(function() + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil,true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +-- function M:OnEventResult2(evt_data) +-- DataManager.CurrenRoom.Over = true +-- ControllerManager.SetGameNetClient(nil,true) + -- local info_list = evt_data["info_list"] + -- if self._result ~= nil then + -- self._cacheEvent:Enqueue(function() + -- self:OneventResult1(self._result) + -- self._result = nil + -- end) + -- end +-- self._cacheEvent:Enqueue(function() +-- DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, info_list) +-- ControllerManager.ChangeController(LoddyController) +-- end) +-- end + +function M:OnEventNiao(evt_data) + local list = evt_data["niao"] + local start_seat = evt_data["start_seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EventNiao, list, start_seat) + end) +end + +function M:OnEventPiaoTip() + printlog("OnEventPiaoTip=====》》》") + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + self._cacheEvent:Enqueue(function() + if not self._room._reload_flag then + self._room.curren_round = self._room.curren_round + 1 + end + self._room.playing = true + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiaoTip, evt_data) + end) +end + +function M:OnEventPiao(evt_data) + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiao, evt_data.seat, evt_data.num) + end) +end + +function M:GetPosString( seat ) + if DataManager.CurrenRoom.room_config.people_num ~= 4 then return"" end + if seat == 1 then + return "北" + elseif seat == 2 then + return "西" + elseif seat == 3 then + return "南" + elseif seat == 4 then + return "东" + end +end + +function M:Discard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + -- list_remove(_room.SelfPlayer.Cards,card) + -- table.sort(_room.SelfPlayer.Cards) + _client:send(Protocol.Game_Da, _data) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/hongzhong/EXGameInfo.lua b/lua_probject/extend_project/extend/majiang/hongzhong/EXGameInfo.lua new file mode 100644 index 00000000..2ee052c4 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/hongzhong/EXGameInfo.lua @@ -0,0 +1,308 @@ +local EXGameInfo = {} + +local M = EXGameInfo + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/majiang/hongzhong/ui/Info_MJ_HongZhong") + return self +end + +function M:FillData() + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 4 -- 回合选项数 + + if oldGameVersion==1 then + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_HongZhong/Cgm_create_room") + else + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_HongZhong/Cgm_create_room_yueyang") + end + + if oldGameVersion==2 then + self._config:GetController("xipai").selectedIndex=0 + + self.xipaiValueText=self._config:GetChild('xipaifen') + self.xipaiValue=1 + + self.anchouValueText=self._config:GetChild('anchoufen') + self.anchouValueText.text=1 + self.anchouValue=1 + + local btn_cr = self._config:GetChild('sdsrbtn') + btn_cr.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.xipaiValueText.text=value/1000 + self.xipaiValue=value/1000 + + end, 3, nil) + gniv:Show() + + + end + ) + + + + local btn_cr2 = self._config:GetChild('anchoubtn') + btn_cr2.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.anchouValueText.text=value/1000 + self.anchouValue=value/1000 + + end, 3, nil) + gniv:Show() + + + end + ) + + end + +end + +local _help_url= "ui://Info_MJ_HongZhong/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_MJ_HongZhong/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_MJ_HongZhong/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list = {}--{"红中麻将","三人红中","二人红中"} +function M:GetPlayList() + return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + 1 + local people = _config:GetController("play_list").selectedIndex+2 + local qiangkong = _config:GetChild("btn_qgh").selected and true or false + local qiangkong_niao = _config:GetChild("btn_qghjm").selected and true or false + local seven_pair = _config:GetChild("btn_qidui").selected and true or false + local niao_type = _config:GetController("NiaoType").selectedIndex + 1 + local zha_ma = _config:GetController("zha").selectedIndex + 1 + local wo_niao = _config:GetController("wowoniao").selectedIndex + 1 + local laizi = _config:GetChild("btn_laizi").selected and true or false + local aa = _config:GetController("Cost").selectedIndex + -- local zhuangxian = _config:GetChild("btn_zhuangxian").selected and true or false + local piao_niao = _config:GetChild("btn_piao_niao").selected + local jiangma = _config:GetController("jiangma").selectedIndex + local wuguizhuopaojiabei = _config:GetChild("btn_wuhongzhongzuobaofanbei").selected + + ---------- + local piao_niao1=0 + if _config:GetController('piao') then + piao_niao1=_config:GetController('piao').selectedIndex + end + local piao1=false + local piao2=false + local piao3=false + local piao_niao_opt=0 + if piao_niao1==2 then + piao_niao_opt=_config:GetController("piaofen").selectedIndex + end + + + local laizi4_hu = false + if _config:GetChild("btn_sihongzhong") then + laizi4_hu = _config:GetChild("btn_sihongzhong").selected + end + + local hz_hu =false + if _config:GetChild("btn_wuhongzhong") then + hz_hu = _config:GetChild("btn_wuhongzhong").selected + end + + local wuguijiabei =false + if _config:GetChild("btn_wuhongzhongzimo") then + wuguijiabei = _config:GetChild("btn_wuhongzhongzimo").selected + end + + local di_fen=false + if _config:GetController('difen') then + di_fen=_config:GetController('difen').selectedIndex + end + + local xi_pai=false + if _config:GetChild("xipai") then + xi_pai=_config:GetChild("xipai").selected + end + + local fengding_score=0 + if _config:GetController("fengding") then + fengding_score=_config:GetController("fengding").selectedIndex + end + ---------- + + local _data = {} + _data["opt"] = round + _data["maxPlayers"] = people + -- _data["maxPlayers"] = 2 + -- _data["zhuangxian"] = zhuangxian + _data["qidui"] = seven_pair + _data["qiangkong"] = qiangkong + _data["qiangkong_niao"] = not qiangkong and false or qiangkong_niao + _data["niao"] = niao_type + if oldGameVersion==1 then + _data["niao_opt"] = niao_type == 2 and 1 or (niao_type == 3 and wo_niao or zha_ma) + else + _data["niao_opt"] = niao_type == 2 and 1 or (niao_type == 3 and wo_niao or zha_ma) + end + + _data["niao_opt_score"] = wo_niao + + + _data["laizi8"] = laizi + _data["AA"] = aa + if oldGameVersion==1 then + _data["piao_niao"] = piao_niao + else + _data["piao_niao"] = piao_niao1 + end + + _data["jiangma"] = jiangma + + _data['piao1'] = piao1 + _data['piao2'] = piao2 + _data['piao3'] = piao3 + _data['laizi4_hu'] = laizi4_hu + _data['hz_hu'] = hz_hu + _data['wuguijiabei'] = wuguijiabei + _data['di_fen'] = di_fen + _data['xi_pai'] = xi_pai + + auto_piao=false + if piao_niao==2 then + if piao1 or piao2 or piao3 then + auto_piao=true + end + end + _data['auto_piao'] = auto_piao + _data['piao_niao_opt'] = piao_niao_opt + + local xi_pai_score=0 + local an_chou_score=0 + if oldGameVersion==2 then + xi_pai_score=self.xipaiValue + an_chou_score=self.anchouValue + end + + _data['xi_pai_score'] = xi_pai_score*1000 + _data['an_chou_score'] = an_chou_score*1000 + + _data["fengding_score"] = fengding_score + _data["wuguizhuopaojiabei"] = wuguizhuopaojiabei + + + return _data +end + +function M:LoadConfigData(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt-1 + _config:GetController("play_list").selectedIndex = data.maxPlayers-2 + _config:GetChild("btn_qgh").selected = data.qiangkong + _config:GetChild("btn_qghjm").selected = data.qiangkong_niao + _config:GetChild("btn_qidui").selected = data.qidui + -- _config:GetChild("btn_zhuangxian").selected = data.zhuangxian + _config:GetController("NiaoType").selectedIndex = data.niao - 1 + if data.niao == 1 then + _config:GetController("zha").selectedIndex = data.niao_opt - 1 + elseif data.niao == 3 then + _config:GetController("wowoniao").selectedIndex = data.niao_opt - 1 + end + _config:GetController("wowoniao").selectedIndex = data.niao_opt_score - 1 + + _config:GetChild("btn_laizi").selected = data.laizi8 + _config:GetController("Cost").selectedIndex = data.AA or 0 + if oldGameVersion==1 then + _config:GetChild("btn_piao_niao").selected = data.piao_niao + end + _config:GetController("jiangma").selectedIndex = data.jiangma + + + if _config:GetController("piao") then + _config:GetController("piao").selectedIndex=data.piao_niao + _config:GetChild('pf1').selected=data.piao1 + _config:GetChild('pf2').selected=data.piao2 + _config:GetChild('pf3').selected=data.piao3 + end + + if _config:GetChild("btn_sihongzhong") then + _config:GetChild("btn_sihongzhong").selected=data.laizi4_hu + _config:GetChild("btn_wuhongzhong").selected=data.hz_hu + _config:GetChild("btn_wuhongzhongzimo").selected=data.wuguijiabei + end + + if _config:GetController("difen") then + _config:GetController("difen").selectedIndex=data.di_fen + end + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected=data.xi_pai + end + + if _config:GetController("piaofen") then + _config:GetController("piaofen").selectedIndex=data.piao_niao_opt + end + + if oldGameVersion==2 then + self.xipaiValueText.text=data.xi_pai_score/1000 + self.xipaiValue=data.xi_pai_score/1000 + + self.anchouValueText.text=data.an_chou_score/1000 + self.anchouValue=data.an_chou_score/1000 + end + + if _config:GetController("fengding") then + _config:GetController("fengding").selectedIndex=data.fengding_score + end + + _config:GetChild("btn_wuhongzhongzuobaofanbei").selected=data.wuguizhuopaojiabei + + end + +return M + \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/hongzhong/EXMainView.lua b/lua_probject/extend_project/extend/majiang/hongzhong/EXMainView.lua new file mode 100644 index 00000000..b6514381 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/hongzhong/EXMainView.lua @@ -0,0 +1,745 @@ +local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local MJMainView = require("main.majiang.MJMainView") +local EXClearingView = import(".EXClearingView") +local TX_GameEvent = import(".GameEvent") +local HuTipView = import("main.majiang.HuTipView") +local SettingView = import("main.majiang.MJSettingViewNew") +local PlayerInfoView = import(".EXPlayerInfoView") +local M = {} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M,{__index = MJMainView}) + local self = setmetatable({}, {__index = M}) + self.class = "MainView" + self.asset_group = "HongZhong_MJ" + self:init() + ViewUtil.PlayMuisc(self.asset_group, "extend/majiang/hongzhong/sound/bg.mp3") + return self +end + +function M:InitView(url) + local room = self._room + self._style = 1 + self._gps_style = 1 + self._full = true + UIPackage.AddPackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong") + MJMainView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num .. "_s2") + self._hu_tip = HuTipView.new(self) + + self._view:GetChild('wanfa_text').text =room.room_config.people_num .. '人红中 ' .. room.score_times .. '倍' + + self.LaiziBG=self._view:GetChild('n103') + self.LaiziBG.text="鬼牌" + self.LaiziBG.visible=false + self.selectLaiziBtn=self._view:GetChild('selectlaizi') + self.Laizi1Btn=self._view:GetChild('selectlaizi1') + self.Laizi2Btn=self._view:GetChild('selectlaizi2') + self.Laizi1Btn.visible=false + self.Laizi2Btn.visible=false + self.selectLaiziBtn.visible=false + + self:PlayerChangeLineState() + + if room.playing or room.curren_round > 0 then + self:ReloadRoom() + end +end + +function M:UpdateRound() + local currRD=self._room.curren_round + if self._room.curren_round==0 then + currRD=1 + end + + self._view:GetChild("tex_round1").text = currRD + self._view:GetChild("tex_round2").text = self._room.room_config.round +end + +function M:InitPlayerInfoView() + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem,self) + tem.visible = false + end +end + +function M:NewMJPlayerCardInfoView(view,index) + if index == 1 then + return MJPlayerSelfCardInfoView.new(view,self) + end + return MJPlayerCardInfoView.new(view,self) +end + +function M:EventInit() + -- UIPackage.AddPackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong") + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _gcm_outcard_url = UIPackage.GetItemURL("Main_Majiang", "Gcm_OutCard") + local _player_info = self._player_info + local _gamectr = self._gamectr + + _gamectr:AddEventListener(TX_GameEvent.EventXiPai,function( ... ) + local arg = {...} + local currentPlayer1=arg[1] + local currentPlayer2=arg[2] + self._popEvent = false + if ( currentPlayer1 ) then + + local xipaiCB=function () + self._popEvent = true + end + self:PlayXiPai(xipaiCB) + + end + + + if ( currentPlayer2 ) then + --self._popEvent = false + local xipaiCB2=function () + self._popEvent = true + end + self:PlayXiPai1(xipaiCB2) + end + + + end) + + _gamectr:AddEventListener(TX_GameEvent.SendCards,function( ... ) + -- self:ShowHuTip() + self:UpdateRound() + self._state.selectedIndex = 1 + local list = _room.player_list + for i=1,#list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateHandCard() + end + end) + _gamectr:AddEventListener(TX_GameEvent.EventTurn, function(...) + local arg = {...} + self._left_time = 15 + local seat = arg[1] + self:UpdateCardBox(self:GetPos(seat)) + -- if seat == self._room.self_player.seat then + -- self:ShowHuTip() + -- end + end) + + _gamectr:AddEventListener(TX_GameEvent.OutHint, function(...) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:UpdateHandCard(true) + end) + + local _gcm_outcard_url ="ui://Main_Majiang/Gcm_OutCard" + _gamectr:AddEventListener(TX_GameEvent.OutCard, function(...) + self:__CloseTip() + self._left_time = 0 + local arg = {...} + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:RemoveCursor() + info:UpdateHandCard() + local outcard = UIPackage.CreateObjectFromURL(_gcm_outcard_url) + info:UpdateOutCardList(outcard, card, self._cursor) + self:PlaySound("HongZhong_MJ", p.self_user.sex, tostring(card)) + self:PlayMJSound("chupai.mp3") + if seat == _room.self_player.seat then + _room.curren_outcard_seat = -1 + end + end) + _gamectr:AddEventListener(TX_GameEvent.GetCard, function(...) + self:__CloseTip() + local arg = {...} + local seat = arg[1] + local card = arg[2] + -- self._tex_leftTime.text = arg[3] + self._tex_LeftCard.text = arg[3] + -- self:UpdateRoomInfo() + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateHandCard(true) + end) + + _gamectr:AddEventListener(TX_GameEvent.FZTips, function(...) + local arg = {...} + local _tip = arg[1] + local weight = arg[2] + self:__FangziTip(_tip, weight) + end) + + _gamectr:AddEventListener(TX_GameEvent.FangziAction, handler(self,self.OnFangziAction)) + + _gamectr:AddEventListener(TX_GameEvent.ZPHuCard, function(...) + self._left_time = 0 + self:UpdateCardBox(0) + self:__CloseTip() + self._popEvent = false + local arg = {...} + local win_seat = arg[1] + local lose_seat = arg[2] + local cards = arg[3] + local win_card = arg[4] + local info = self._player_card_info[self:GetPos(win_seat)] + self:RemoveCursor() + info:UpdateHandCard(true, true) + + local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card") + obj_win_card.icon = "ui://Main_Majiang/202_" .. win_card + obj_win_card:GetController("bg").selectedIndex = 1 + info._view:AddChild(obj_win_card) + obj_win_card:Center() + + local url, pNode + local player = _room:GetPlayerBySeat(win_seat) + if win_seat ~= _room.self_player.seat then + url = "ui://Main_Majiang/别人胡" + pNode = info._mask_liangpai + elseif win_seat == _room.self_player.seat then + url = "ui://Main_Majiang/自己胡牌" + pNode = self._view + end + if win_seat == lose_seat then + url = "ui://Main_Majiang/eff_zimo" + end + local hu_sound = win_seat == lose_seat and "zimo" or "hu" + self:PlaySound("HongZhong_MJ", player.self_user.sex, hu_sound .. math.random(1, 2)) + local he = UIPackage.CreateObjectFromURL(url) + pNode:AddChild(he) + he:GetTransition("t2"):Play() + if win_seat == _room.self_player.seat then + he:Center() + elseif url == "ui://Main_Majiang/eff_zimo" then + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + coroutine.start(function() + coroutine.wait(2) + obj_win_card:Dispose() + he:Dispose() + self._popEvent = true + end) + end) + + _gamectr:AddEventListener(TX_GameEvent.EventNiao, function(...) + local arg = {...} + self._popEvent = false + local list = arg[1] + local start_seat = arg[2] + ViewUtil.PlaySound("HongZhong_MJ", "extend/majiang/hongzhong/sound/zhuaniao.mp3") + coroutine.start(self.RunNiao,self,list, start_seat) + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult1, function(...) + self._popEvent = false + self:__CloseTip() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = {...} + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local niao = result.niao + if liuju then + local le = UIPackage.CreateObjectFromURL("ui://Main_Majiang/LiuJu") + self._view:AddChild(le) + le:Center() + le:GetTransition("t0"):Play() + coroutine.start(function() + coroutine.wait(1) + le:Dispose() + end) + end + self:RemoveCursor() + if self._clearingView == nil then + self._clearingView = EXClearingView.new(self._root_view) + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + self._popEvent = true + end) + end + + if _room.curren_round ~= _room.room_config.round then + -- if #niao == 0 then self._view:GetChild("n13").visible = false end + self._clearingView:InitData(0, _room, result, nil, function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:ResetCardType() + if _room:checkHpNonnegative() then + p.cur_hp = data[i].hp_info.cur_hp + end + info:UpdateScore() + info._view:GetChild("zhanji").visible = true + local num = data[i].hp_info.total_hp + if num > 0 then + info._view:GetController("text_color").selectedIndex = 0 + info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + else + info._view:GetController("text_color").selectedIndex = 1 + info._view:GetChild("text_jifen").text = d2ad(num) + end + + info._view:GetChild("mask_piao").title = "" + info._view:GetController("piao_niao").selectedIndex = 0 + p.fz_list = {} + end + DataManager.CurrenRoom.self_player.card_list = {} + self._state.selectedIndex = 2 + self._clearingView = nil + end) + end + self._player_card_info[1]:ShowHuTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult2, function(...) + self:UnmarkSelfTuoguan() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = {...} + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + self._clearingView = EXClearingView.new() + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + end) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiaoTip, function() + self:UpdateRound() + self._tex_LeftCard.text = "0" + self._state.selectedIndex = 1 + self:__PiaoNiaoTip() + --if oldGameVersion==1 then + -- self:__PiaoNiaoTip() + --else + -- self:__PiaoNiaoTip1() + --end + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiao, function(...) + local arg = {...} + local seat = arg[1] + local num = arg[2] + if num > 0 then + local head_info = self._player_info[self:GetPos(seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. num + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + if seat == _room.self_player.seat then + if self._com_piao and _room.self_player.entrust then + self._com_piao:Dispose() + self._com_piao = nil + _room.curren_round = _room.curren_round - 1 + end + end + end) +end + +function M:OutCard(card) + --if card ~= 412 then + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card, function() + local info = self._player_card_info[1] + self:RemoveCursor() + info:UpdateHandCard() + + info:UpdateOutCardList(nil, card, self._cursor) + self:PlaySound("HongZhong_MJ", self._room.self_player.self_user.sex,tostring(card)) + self:PlayMJSound("chupai.mp3") + -- self:ShowHuTip() + end) + -- end +end + +function M:__FangziTip(tip, weight) + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject("Main_Majiang", "Gcm_action_tips") + _chipeng_tip:GetController("hide_bg").selectedIndex = 1 + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + -- self._player_card_info[self:GetPos(p.seat)] + + local _lit_fanzi = _chipeng_tip:GetChild("lit_fanzi") + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + + local tip_hu = false + local count = #_tlist + for k=1,#_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + local url = "ui://Main_Majiang/Btn_fztip" + local td_weight = td.weight + if td_weight == 16 then td_weight = 8 end + if td_weight == 8 then url = "ui://Main_Majiang/Btn_hu" end + local btn_t = _lit_fanzi:AddItemFromPool(url) + if url == "ui://Main_Majiang/Btn_hu" then + btn_t:GetChild("hupai").icon="ui://Main_Majiang/202_" .. td.card + btn_t:GetController("hupai").selectedIndex=1 + end + btn_t.icon = "ui://Main_Majiang/fztip_"..td_weight + btn_t.data = { tip, td } + btn_t.onClick:Add(self.__TipAction,self) + end + + -- if not (tonumber(weight) >= 16) then + local _btn_pass = _lit_fanzi:AddItemFromPool("ui://Main_Majiang/Btn_pass") + -- local _btn_pass = _chipeng_tip:GetChild("btn_pass") + _btn_pass.onClick:Set(function() + if tonumber(weight) >= 8 then + local guo_msg = MsgWindow.new(self._root_view, "确定要点过吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end) + guo_msg:Show() + else + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end) + -- end + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() +end + +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local list = tip.tip_map_type[td.weight] + if (#list > 1) then + self:_ChiView(list, function(id) + _gamectr:SendAction(id) + self:__CloseTip() + end) + self._chipeng_tip.visible = false + return + end + + _gamectr:SendAction(td.id) + if (self._chipeng_tip == nil) then return end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil +end + +function M:_ChiView(tiplist, callback) + self._chipeng_tip.visible = false + local _pop_tip_choice = UIPackage.CreateObject("Main_Majiang", "Pop_tip_choice") + local list_choose = _pop_tip_choice:GetChild("Lst_choose") + local crossCtr = _pop_tip_choice:GetController("state") + crossCtr.selectedIndex = #tiplist == 3 and 0 or 1 + _pop_tip_choice:GetChild("Btn_cross").onClick:Add(function() + _pop_tip_choice:Dispose() + self._chipeng_tip.visible = true + end) + list_choose:RemoveChildrenToPool() + for i = 1, #tiplist do + local item_choose = list_choose:AddItemFromPool() + item_choose:GetController("type").selectedIndex = 0 + for j = 1, 4 do + item_choose:GetChild("card"..j).icon = UIPackage.GetItemURL("Main_Majiang", "202_"..tiplist[i].card) + end + item_choose.onClick:Add(function() + callback(tiplist[i].id) + end) + end + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width)/2, (self._view.height - _pop_tip_choice.height)/2) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:OnFangziAction(...) + self._popEvent = false + self:__CloseTip() + local arg = {...} + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local index = arg[3] + + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject("Extend_MJ_HongZhong", "FzEffect") + if fz.type == FZType.Peng then + self:PlaySound("HongZhong_MJ", player.self_user.sex,"peng"..math.random(1, 3)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "碰框") + else + self:PlaySound("HongZhong_MJ", player.self_user.sex,"gang"..math.random(1, 2)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "杠框") + end + effect.touchable = false + effect:GetTransition("t2"):Play() + pNode:AddChild(effect) + + coroutine.start(function() + coroutine.wait(0.2) + self._popEvent = true + end) + + coroutine.start(function() + coroutine.wait(1.5) + effect:Dispose() + end) + + self:RemoveCursor() + if (player.seat ~= fz.from_seat) then + local fs_info = _player_card_info[self:GetPos(fz.from_seat)] + fs_info:UpdateOutCardList() + end + info:UpdateFzList(fz, index, true) + local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi + info:UpdateHandCard(getcard) + self:__CloseTip() +end + +function M:RunNiao(list, start_seat) + local _room = self._room + --local _niao_View = self._niao_View + self._niao_View = UIPackage.CreateObject("Extend_MJ_HongZhong","Panel_Birds") + self._view:AddChild(self._niao_View) + self._niao_View:Center() + local _niao_View = self._niao_View + local list_niao_card = self._niao_View:GetChild("Lst_birds") + list_niao_card:RemoveChildrenToPool() + for i = 1, #list do + --添加背面的麻將 + local item = list_niao_card:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "202_00") + item:GetChild("tex_score").text = "+" .. list[i].score + end + for i = 1, #list do + --顯示正面 + local item = list_niao_card:GetChildAt(i - 1) + local card = list[i].card + coroutine.wait(0.3) + item:GetTransition("appear"):Play() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_"..card) + if list[i].score > 0 then item:GetController("bg").selectedIndex = 1 end + end + coroutine.start(function() + coroutine.wait(1) + _niao_View:Dispose() + self._popEvent = true + end) +end + +-- function M:markOutCards(showTip, data) +-- for i = 1, #self._room.player_list do +-- local p = self._room.player_list[i] +-- local info = self._player_card_info[self:GetPos(p.seat)] +-- for j = 1, #p.outcard_list do +-- local card = p.outcard_list[j] +-- if card == data then +-- local obj = info:GetOutCardByIndex(j) +-- obj:GetController("gray").selectedIndex = showTip and 1 or 0 +-- end +-- end +-- end +-- end + + +function M:__PiaoNiaoTip() + local obj_piao = UIPackage.CreateObject("Main_Majiang", "panel_piao_niao") + self._view:AddChild(obj_piao) + obj_piao.x = (self._view.width - obj_piao.width) * 0.5 + obj_piao.y = self._view.height * 0.6 + local piaoState=obj_piao:GetController('piao') + piaoState.selectedIndex=1 + for i = 1, 4 do + obj_piao:GetChild("btn_" .. i).onClick:Add(function() + self._gamectr:SendAction(i - 1) + obj_piao:Dispose() + end) + end + self._com_piao = obj_piao +end + + +function M:__PiaoNiaoTip1() + local obj_piao = UIPackage.CreateObject("Main_Majiang", "panel_piao_niao") + self._view:AddChild(obj_piao) + obj_piao.x = (self._view.width - obj_piao.width) * 0.5 + obj_piao.y = self._view.height * 0.6 + local piaoState=obj_piao:GetController('piao') + + local tconfig=DataManager.CurrenRoom.room_config.config + + + + local piaoList={} + + for i = 1, 4 do + local piaoT=obj_piao:GetChild("btn_" .. i) + table.insert(piaoList,piaoT) + piaoT.onClick:Add(function() + self._gamectr:SendAction(i - 1) + obj_piao:Dispose() + end) + + end + self._com_piao = obj_piao + + + + if tconfig.piao_niao<2 then + for i=1,#piaoList do + piaoList[i].visible=true + end + piaoState.selectedIndex=1 + else + piaoList[1].visible=false + for i=2,#piaoList do + piaoList[i].visible=tconfig["piao"..(i-1)] + end + piaoState.selectedIndex=2 + end + +end + +function M:ReloadRoom(bskip) + local room = self._room + -- if not room.playing then + -- self._state.selectedIndex = 2 + -- else + -- self._state.selectedIndex = 1 + -- self._room._reload_flag = true + -- end + + if bskip == nil or bskip == false then + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + self._room._reload_flag = true + end + end + + for i = 1, #room.player_list do + local p = room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + for i = 1, #p.fz_list do + info:UpdateFzList(p.fz_list[i], -1) + end + info:UpdateHandCard() + local head_info = self._player_info[self:GetPos(p.seat)] + head_info:UpdateScore() + head_info._view:GetChild('zhanji').visible = true + local num = p.total_hp or 0 + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(num) + end + + if p.seat == room.last_outcard_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil,card, self._cursor) + elseif p.seat == room.curren_outcard_seat then + info:UpdateHandCard(true) + info:UpdateOutCardList() + else + info:UpdateOutCardList() + end + if p.seat == room.banker_seat then + head_info:MarkBank(true) + end + -- if p.ready then + -- self._player_info[self:GetPos(p.seat)]:Ready(true) + -- end + if bskip == nil or bskip == false then + if p.ready and room.playing == false then + self._player_info[self:GetPos(p.seat)]:Ready(true) + end + end + if p.piao_niao~=nil and p.piao_niao > 0 then + local head_info = self._player_info[self:GetPos(p.seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + end + -- self:ShowHuTip() + + if bskip == nil or bskip == false then + self:UpdateCardBox(self:GetPos(room.curren_outcard_seat)) + self._tex_LeftCard.text = room.left_count + self:UpdateRound() + end +end + +function M:PlayerChangeLineState() + -- local isOutCard = true + -- local str = "玩家 " + -- for _ , player in ipairs(self._room.player_list) do + -- if player.line_state == 0 then + -- isOutCard = false + -- end + -- end + -- self._player_card_info[1]._area_handcard_list.touchable = isOutCard +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:__CloseTip() + if self._chipeng_tip then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if self._pop_tip_choice then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +function M:closeTipOnTuoguan() + self:__CloseTip() +end + +function M:Destroy() + MJMainView.Destroy(self) + UIPackage.RemovePackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong") +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/hongzhong/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/hongzhong/EXPlayBackView.lua new file mode 100644 index 00000000..c66e33d1 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/hongzhong/EXPlayBackView.lua @@ -0,0 +1,298 @@ +local MJPlayBackView = require("main.majiang.MJPlayBackView") +local EXRoomConfig = import(".EXRoomConfig") +local EXClearingView = import(".EXClearingView") + +local Record_Event = import(".RecordEvent") + + +local M = {} + +--- Create a new +function M.new() + setmetatable(M,{__index = MJPlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = "PlayBackView" + self:init() + + return self +end + + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong") + MJPlayBackView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num) + local _cardbox = self._view:GetChild("cardbox") + --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false + self._ctr_cardbox = _cardbox:GetController("c1") + self._tex_round = self._view:GetChild("tex_round") + self._tex_LeftCard = self._view:GetChild("remaining_card") + self._anchor = self._view:GetChild("mask_tips") + self._eventmap = {} + + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao + self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao + self._cmdmap[Record_Event.Evt_Result] = self.CmdResult +end + +function M:FillRoomData(data) + MJPlayBackView.FillRoomData(self) + if self._win_pic then self._win_pic:Dispose() end + if self._niao then self._niao:Dispose() end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local left_count = data.info.left_card + self:UpdateLeftCard(left_count) + local round = data.info.round + self:UpdateRound(round) + + local roominfo_panel = self._view:GetChild("roominfo_panel1") + roominfo_panel:GetChild("tex_roomid").text = room.room_id + roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + table.sort(p.card_list, ViewUtil.HandCardSort) + card_info:UpdateHandCard(false, true) + self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0 + end + + self:GenerateAllStepData(data) + self:UpdateStep(1) + -- self:ShowStep(0) +end + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateLeftCard(step.left_card) + -- self._ctr_cardbox.selectedIndex = step.current_out_seat + self:UpdateCardBox(self:GetPos(step.current_out_seat)) + self:UpdateStep(index + 1) + if step.cmd ~= Record_Event.Evt_OutCard then + self:RemoveCursor() + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hand_left_count = #p.card_list + info:Clear() + info:ResetFzList() + p.piao_niao = step.player_card_data[i].piao_niao + local head_info = self._player_info[self:GetPos(i)] + if p.piao_niao and p.piao_niao > 0 then + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + else + head_info._view:GetController("piao_niao").selectedIndex = 0 + end + if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil, nil, self._cursor) + else + info:UpdateOutCardList() + end + if step.cmd == Record_Event.Evt_GetCard and p.seat == step.current_out_seat then + info:UpdateHandCard(true, true) + else + info:UpdateHandCard(false, true) + end + end + if step.cmd == Record_Event.Evt_Win then + self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡") + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + else + if self._win_pic then + self._win_pic:Dispose() + end + end + if step.cmd == Record_Event.Evt_Niao then + local niao_list = step.niao + self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_HongZhong/Panel_Birds") + local list = self._niao:GetChild("Lst_birds") + list:RemoveChildrenToPool() + for i = 1, #niao_list do + local item = list:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_"..niao_list[i].card) + if niao_list[i].score > 0 then + item:GetController("bg").selectedIndex = 2 + end + end + self._view:AddChild(self._niao) + self._view:AddChild(self._view:GetChild("panel_record")) + self._niao:Center() + else + if self._niao then + self._niao:Dispose() + end + end + if step.cmd == Record_Event.Evt_Result then + if not self.result then + self.result = EXClearingView.new(self._root_view, true) + self.result:InitData(0, self._room, step.result_data) + self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5 + self.result._view.width = GRoot.inst.width + self.result._view.height = GRoot.inst.height + self.result._view:GetChild("btn_confirm").visible = false + self._anchor:AddChild(self.result._view) + self.result._view.x = self._anchor.x * -1 + self.result._view.y = self._anchor.y * -1 + else + self.result._view.visible = true + end + -- self.result._view:Center() + else + if self.result then + self.result._view.visible = false + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = "" + step.left_card = info.left_card + step.last_out_seat = 0 + step.current_out_seat = 1 + step.win = 0 + step.niao = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.piao_niao = p.piao_niao + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + table.sort(u.card_list, ViewUtil.HandCardSort) + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = 0 + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + for i = 1, #cmd.data.opcard do + list_remove(u.card_list, cmd.data.opcard[i]) + end + local fz = {} + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.opcard = cmd.data.opcard + local uf = data.player_card_data[cmd.data.from_seat] + if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then + table.remove(uf.outcard_list, #uf.outcard_list) + end + if fz.type ~= FZType.Gang_Peng then + u.fz_list[#u.fz_list + 1] = fz + else + for i = 1, #u.fz_list do + if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then + u.fz_list[i].type = FZType.Gang_Peng + end + end + end +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:CmdNiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.niao = cmd.data.niao +end + +function M:CmdPiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.player_card_data[cmd.seat].piao_niao = cmd.data.num +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result_data = cmd.data +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_deep_clone(last_step) + self._step[#self._step + 1] = step + step.result_data = nil + return step +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = "剩余 "..num.." 张牌" +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:UpdateRound(round) + self._tex_round.text = "第 "..round.."/"..self._room.room_config.round.." 局" +end + +function M:UpdateStep(step) + self._record:GetChild("tex_step").text = "第 " .. step .. " / " .. #self._step .. "步" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/hongzhong/EXPlayer.lua b/lua_probject/extend_project/extend/majiang/hongzhong/EXPlayer.lua new file mode 100644 index 00000000..fd26822b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/hongzhong/EXPlayer.lua @@ -0,0 +1,36 @@ + + +local EXPlayer = { + auto, + -- 手牌列表 + hand_cards = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/hongzhong/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/majiang/hongzhong/EXPlayerInfoView.lua new file mode 100644 index 00000000..f8a5fd69 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/hongzhong/EXPlayerInfoView.lua @@ -0,0 +1,76 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + +function M:init() + PlayerInfoView.init(self) + self._tex_score = self._view:GetChild("info"):GetChild("tex_score1") + self._tex_score2 = self._view:GetChild("info"):GetChild("tex_score2") + self._ct_score = self._view:GetChild("info"):GetController("score") +end + +function M:ShowInteraction(type,str) + if type == 3 then + Voice.DownLoad(str, function(clip) + if (clip ) then + self:ShowMaskVoice(clip.length) + GameApplication.Instance:PlayVoice(clip) + end + end) + elseif type == 4 then + self:SetChat(str) + elseif type == 2 then + local chat_index = tonumber(str) + self._main_view:PlayChatSound(self._player.self_user.sex,chat_index) + local language, index = self._main_view:GetChatMsgLanguage(chat_index) + self:SetChat(self._main_view.Fix_Msg_Chat[index]) + elseif type == 1 then + self:SetBiaoqing("ui://Chat/"..str) + end +end + +function M:UpdateRemainCard(card_num, hide) + if hide then + self._view:GetController("show_remain").selectedIndex = 0 + else + self._view:GetController("show_remain").selectedIndex = 1 + end + self._view:GetChild("com_remain"):GetChild("tex_remain").text = card_num +end + +function M:FillData(player) + PlayerInfoView.FillData(self, player) + self:UpdateScore(player.total_score) +end + +function M:UpdateScore() + local score = self._player.total_score + local room = DataManager.CurrenRoom + if room:checkHpNonnegative() then + score = d2ad(self._player.cur_hp) + end + if not score then + score = 0 + end + if score < 0 then + self._ct_score.selectedIndex = 1 + self._tex_score2.text = score + else + self._ct_score.selectedIndex = 0 + if not room:checkHpNonnegative() then + score = "+" .. score + end + self._tex_score.text = score + end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/hongzhong/EXRoomConfig.lua b/lua_probject/extend_project/extend/majiang/hongzhong/EXRoomConfig.lua new file mode 100644 index 00000000..86e80b96 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/hongzhong/EXRoomConfig.lua @@ -0,0 +1,159 @@ + + + +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.config=config + self.class = "RoomConfig" + self.round = config["times"] + self.Qidui = config["qidui"] + self.QiangGang = config["qiangkong"] + self.QiangGangNiao = config["qiangkong_niao"] + self.Zhama = config["niao_opt"] + self.Laizi = config["laizi8"] + self.NiaoType = config["niao"] + self.piao_niao = config["piao_niao"] + self.Jiangma = config["jiangma"] + self.isHidden = config.isHidden + + return self +end + +function M:GetDes(sp) + sp = sp or " " + local str = RoomConfig.GetDes(self, sp) + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + + if (self.QiangGang) then + str = str .. "可抢杠胡" + str = str .. sp + if (self.QiangGangNiao) then + str = str .. "抢杠胡奖码" + str = str .. sp + end + end + + if (self.Qidui) then + str = str .."可胡七对" + str = str .. sp + end + + + if (self.Laizi) then + str = str .. "八个红中" + str = str .. sp + end + + if self.config["laizi4_hu"] then + str = str .."四红中起手胡" + str = str .. sp + end + + if self.config["qiangkong_niao"] then + str = str .."抢杠胡奖码" + str = str .. sp + end + + if self.config["hz_hu"] then + str = str .."无红中可捉炮" + str = str .. sp + end + + if self.config["wuguijiabei"] then + str = str .."无红中自摸翻倍" + str = str .. sp + end + + if self.config["wuguizhuopaojiabei"] then + str = str .."无红中捉炮翻倍" + str = str .. sp + end + + + if (self.piao_niao) then + str = str .. "飘鸟" .. sp + end + + + if (self.NiaoType) then + if self.NiaoType == 1 then + str = str .. string.format("扎%d码", self.Zhama * 2) + elseif self.NiaoType == 2 then + str = str .. "一码全中" + elseif self.NiaoType == 3 then + str = str .. "窝窝鸟" .. sp + end + + str = str..(self.config["niao_opt_score"] == 1 and "1鸟2分" or "1鸟1分") + str = str .. sp + + + if self.Jiangma > 0 then + str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp + end + + + end + + if self.config["piao_niao"]==1 then + str = str .."自由飘" + str = str .. sp + elseif self.config["piao_niao"]==2 then + str = str .."固定飘" + str = str .. sp + if self.config["piao1"] then + str = str .."飘1" + str = str .. sp + end + + if self.config["piao2"] then + str = str .."飘2" + str = str .. sp + end + + if self.config["piao3"] then + str = str .."飘3" + str = str .. sp + end + end + + + if self.config["fengding_score"]==0 then + str = str .."无封顶" + str = str .. sp + elseif self.config["fengding_score"]==1 then + str = str .."35分封顶" + str = str .. sp + elseif self.config["fengding_score"]==1 then + str = str .."40分封顶" + str = str .. sp + elseif self.config["fengding_score"]==1 then + str = str .."45分封顶" + str = str .. sp + + end + + + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + +function M:GetGameName() + return "红中麻将" +end + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_MJ_HongZhong/gamerule") + return gamerulepanel +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/hongzhong/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/hongzhong/ExtendConfig.lua new file mode 100644 index 00000000..681f4cf3 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/hongzhong/ExtendConfig.lua @@ -0,0 +1,170 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import(".EXGameInfo") +local EXMainView = import(".EXMainView") +local EXGameController = import(".EXGameController") +local EXRoomConfig = import(".EXRoomConfig") +local EXPlayBackView =import(".EXPlayBackView") +local MJRoom = require("main.majiang.MJRoom") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = "ExtendConfig" + self.extend_id = 22 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/majiang/hongzhong/ui/Info_MJ_HongZhong") + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong") + ResourcesManager.UnLoadGroup("HongZhong_MJ") +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return MJRoom.new() +end + +function M:FillRoomConfig(room,_config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + + local reload = s2croom["reload"] + local _tableInfo = s2croom["tableInfo"] + + local _config = _tableInfo["config"] + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo["playerData"] + room.curren_round = _tableInfo["round"] + self:FillPlayerData(playerList) + + if (reload) then + local _reloadInfo = s2croom["reloadInfo"] + local _hand_card = _reloadInfo["hand_card"] + room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + + local active_seat = _reloadInfo["active_seat"] + local bank_seat = _reloadInfo["banker_seat"] + local playing = _reloadInfo["playing"] + local _info_list = _reloadInfo["info_list"] + local last_outcard_seat = _reloadInfo["last_outcard_seat"] + room.left_count = _reloadInfo["left_card"] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo["curren_outcard_seat"] + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i=1,#_info_list do + local tem = _info_list[i] + local playerid = tem["playerid"] + local p = room:GetPlayerById(playerid) + local outcard_list = tem["outcard_list"] + p.outcard_list = outcard_list + p.total_score = tem["score"] + p.hand_left_count = tem["card_count"] + p.piao_niao = tem["piao_niao"] or 0 + local opcard = tem["opcard"] + for k=1,#opcard do + local op = opcard[k] + local fz = {} + fz.type = op["type"] + fz.card = op["card"] + p.fz_list[#p.fz_list+1] = fz + end + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.left_count = _tableInfo["left_card"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + + local _info_list = _tableInfo["playerData"] + for i = 1,#_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + p.piao_niao = _jp["piao_niao"] + -- print(DataManager.SelfUser.account_id,pid) + -- if (278 == pid) then + -- room.self_player = p + -- p.self_user = DataManager.SelfUser + -- else + if p.seat == 1 then room.self_player = p end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.card_list = _hand_card + --room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + p.total_score = _jp["score"] + p.hand_left_count = #_hand_card + if _jp.hp_info then + room.room_config.isNonnegative = 1 + p.cur_hp = _jp.hp_info.cur_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/hongzhong/GameEvent.lua b/lua_probject/extend_project/extend/majiang/hongzhong/GameEvent.lua new file mode 100644 index 00000000..0550da46 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/hongzhong/GameEvent.lua @@ -0,0 +1,32 @@ + +local TX_GameEvent = { + -- 发牌 + SendCards = "SendCards", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + EventNiao = "EventNiao", + + EvnetPiaoTip = "EvnetPiaoTip", + + EvnetPiao = "EvnetPiao", + + EventXiPai="EventXiPai", +} +return TX_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/hongzhong/MJPlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/majiang/hongzhong/MJPlayerSelfCardInfoView.lua new file mode 100644 index 00000000..68453705 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/hongzhong/MJPlayerSelfCardInfoView.lua @@ -0,0 +1,177 @@ +local MJPlayerSelfCardInfoView = require("main.majiang.MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local CardCheck = import(".CardCheck") + +local M = {} +-- +function M.new(view,mainView) + setmetatable(MJPlayerSelfCardInfoView, {__index = MJPlayerCardInfoView}) + setmetatable(M, {__index = MJPlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:ShowHuTip(card_list) + local tingList = CardCheck.tingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + table.insert(tingList, 412) + end + self._mainView._hu_tip:FillData(tingList) +end + +function M:UpdateHandCard(getcard, mp) + MJPlayerSelfCardInfoView.UpdateHandCard(self, getcard, mp) + local _carViewList = self._carViewList + local card_list = DataManager.CurrenRoom.self_player.card_list + self:ShowHuTip(card_list) + if getcard then + self._out_card = true + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + -- 记录需要标记听牌提示的牌 + local lst_mark = {} + local total_num = 0 + for i = 1, #_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + list_remove(card_list, card) + local tingList = CardCheck.tingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + local count = 0 + for j = 1, #tingList do + count = count + self._mainView:CountCardLeftNum(tingList[j]) + end + local tem = {} + tem.item = btn + tem.count = count + total_num = total_num + count + table.insert(lst_mark, tem) + end + table.insert(card_list, card) + end + table.sort(lst_mark, function(a, b) + return a.count > b.count + end) + -- 如果几张牌的可胡牌数一致,也只显示'三角',可胡牌数不一致才显示'多' + local all_same = #lst_mark ~= 0 and lst_mark[1].count == total_num / #lst_mark or false + for i = 1, #lst_mark do + local tem = lst_mark[i] + if all_same or tem.count < lst_mark[1].count then + tem.item:GetController("mark_ting").selectedIndex = 1 + else + tem.item:GetController("mark_ting").selectedIndex = 2 + end + end + else + for i = 1, #_carViewList do + local btn = _carViewList[i].card + if btn:GetController("mark_ting").selectedIndex ~= 0 then + btn:GetController("mark_ting").selectedIndex = 0 + end + end + self._out_card = false + end +end + +function M:__OnClickHandCard(context) + local button = context.sender + local _carViewList = self._carViewList + local refresh = true + local card_list = {} + for i=1,#_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + if btn ~= button and btn.selected == true then + if button.data.card_item == card then + refresh = false + else + self._mainView:markOutCards(false, card) + end + btn.selected = false + end + if not btn.selected then + table.insert(card_list, card) + end + end + + if self._out_card then + self:ShowHuTip(card_list) + end + + -- 标记出牌 + if refresh then + if button.selected then + self._mainView:markOutCards(true, button.data.card_item) + else + self._mainView:markOutCards(false, button.data.card_item) + end + end + + local _room = DataManager.CurrenRoom + if not button.selected and _room.curren_outcard_seat == _room.self_player.seat then + local card = button.data + self._mainView:OutCard(card.card_item) + end +end + +function M:__OnDragStart(card) + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + list_remove(card_list, card) + self:ShowHuTip(card_list) +end + +function M:__OnDragEnd(context) + if self.outcard_button then + self.outcard_button:Dispose() + self.outcard_button = nil + end + local button = context.sender + + --button:RemoveFromParent() + local card = button.data + local _room = DataManager.CurrenRoom + + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + if (button.y - card.old_postion.y < -50 and _room.curren_outcard_seat == _room.self_player.seat and card.card_item ~= 412) then + self._mainView:OutCard(card.card_item) + button.touchable = false + self.outcard_button = button + else + self._area_handcard_list:AddChildAt(button, card.index) + button:TweenMove(card.old_postion, 0.2) + end +end + +function M:CheckPlayerOnlineState() + local room = DataManager.CurrenRoom + for i = 1, #room.player_list do + if room.player_list[i].line_state == 0 then + return false + end + end + return true +end +function M:Clear(bskip) + --self._ctr_state.selectedIndex = 0 + self._area_fz_list.x = self._src_fz_list.x + self._area_fz_list.y = self._src_fz_list.y + self._area_fz_list.width = self._src_fz_list.z + self._area_fz_list.height = self._src_fz_list.w + + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_outcard_list:RemoveChildren(0, -1, true) + if bskip == nil or bskip == false then + self._mask_liangpai:RemoveChildren(0, -1, true) + end + + for i=1,#self._carViewList do + self._carViewList[i].card:Dispose() + end + self._carViewList = {} + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/hongzhong/Protocol.lua b/lua_probject/extend_project/extend/majiang/hongzhong/Protocol.lua new file mode 100644 index 00000000..e0efab7e --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/hongzhong/Protocol.lua @@ -0,0 +1,52 @@ +local Protocol = { + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌 + GAME_DIS_CARD = "611", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- 提示选择行为 + GAME_ACTION = "612", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 小结算 + GAME_EVT_RESULT1 = "817", + + -- 大结算 + GAME_EVT_RESULT2 = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + + -- 抓鸟事件 + GAME_EVT_NIAO = "821", + + -- 飘鸟提示 + GAME_EVT_PIAOTIP = "833", + + -- 飘鸟事件 + GAME_EVT_PIAO = "834", + + GAME_XIPAI = "20836", + GAME_EVENT_XIPAI = "20837", + GAME_EVENT_NOTIFY_XIPAI = "20838", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/hongzhong/RecordEvent.lua b/lua_probject/extend_project/extend/majiang/hongzhong/RecordEvent.lua new file mode 100644 index 00000000..09748550 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/hongzhong/RecordEvent.lua @@ -0,0 +1,11 @@ +local Record_Event = { + Evt_GetCard = "GetCard", + Evt_OutCard = "OutCard", + Evt_Action = "Action", + Evt_Win = "Win", + Evt_Niao = "Niao", + Evt_Piao = "PiaoNiao", + Evt_Result = "Result", +} + +return Record_Event \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/jinxi/CS_Win_Type.lua b/lua_probject/extend_project/extend/majiang/jinxi/CS_Win_Type.lua new file mode 100644 index 00000000..ef287d99 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/jinxi/CS_Win_Type.lua @@ -0,0 +1,40 @@ +local CS_Win_Type = { + "点炮", + "平胡", + "小七对", + "一般高", + "七星", + "龙夹背", + "清大对", + "七星一般高", + "双龙夹背", + "三龙夹背", + "十老头", + "塘子十三ㄠ", + "塘子小七对", + "大对子", + "烂牌", + "一条龙", + "落地龙", + "混一色", + "庄家", + "清一色", + "字一色", + "抢杠胡", + "杠上开花", + "杠上炮", + "双杠花", + "双杠上炮", + "三杠花", + "三杠上炮", + "四杠花", + "四杠上炮", + "塘子七星", + "塘子一般高", + "塘子七星一般高", + "塘子烂牌", + "闲家", + "塘子胡", +} +return CS_Win_Type + diff --git a/lua_probject/extend_project/extend/majiang/jinxi/CardCheck.lua b/lua_probject/extend_project/extend/majiang/jinxi/CardCheck.lua new file mode 100644 index 00000000..71dd7f8e --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/jinxi/CardCheck.lua @@ -0,0 +1,378 @@ +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + num = num == nil and 1 or num + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if(result ==num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local zhongid = 0 + + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + zhong_count = 0, + qidui = false, + hongzhong_count = 0, + qidui_pari_count = 0 +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + if (card == zhongid) then + self.zhong_count = self.zhong_count +1 + else + self.cardList[#self.cardList + 1] = card + end + end + table.sort(self.cardList) +end + +function M:tryShunzi(card) + if (card < 400 and card % 100 > 7) then + return false + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryKezi(card) + if (checkCardAndRomve(card, self.cardList, 3)) then + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (checkCardAndRomve(card, self.cardList, 2)) then + local cardGroup = {card,card} + self:push(cardGroup) + self.pair_count = 1 + return true + end + return false +end + + +function M:tryKezi1Zhong(card) + if (self.zhong_count >= 1 and checkCardAndRomve(card, self.cardList,2)) then + local cardGroup = {card,card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + return true + end + return false +end + +function M:tryKezi2Zhong(card) + if (self.zhong_count >= 2 and checkCardAndRomve(card, self.cardList,1)) then + local cardGroup = {card,zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + return true + end + return false +end + +function M:tryShunzi1Zhong(card) + if (card % 100 > 8) then + return false + end + + if (self.zhong_count < 1) then + return false + end + + if (checkCard(card + 1, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,card+1,zhongid} + self:push(cardGroup) + return true + end + + if (checkCard(card + 2, self.cardList) and ((card + 1) % 100 ~= 0)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 2, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,zhongid,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair1Zhong(card) + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 1) then + return false + end + removeCard(self.cardList, card, 1) + local cardGroup = {card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + self.pair_count = 1 + return true +end + +function M:tryPair2Zhong() + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 2) then + return false + end + local cardGroup = {zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + self.pair_count = 1 + return true +end + +function M:tryWin() + if (self.zhong_count == 4 and not self.eight_laizi) or (self.zhong_count == 8 and self.eight_laizi) then + return true + end + if (#self.cardList == 0 and self.pair_count == 1) then + return true + end + if (#self.cardList == 0 and self.pair_count == 0) then + return self:tryPair2Zhong() + end + + if (#self.cardList == 0) then + return false + end + + local activeCard = self.cardList[1] + if (self:tryPair(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + + if (self:tryKezi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi2Zhong(activeCard)) then + + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryPair1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + return false +end + +function M:checkQidui() + if (not self.qidui) then + return false + end + if ((#self.cardList + self.zhong_count) ~= 14) then + return false + end + local cardList = membe_clone(self.cardList) + self.qidui_pari_count = 0 + self.hongzhong_count = self.zhong_count + return self:isQdPari(cardList) +end + +function M:isQdPari(cardList) + if(self.qidui_pari_count == 7) then + return true + end + if (#cardList== 0) then + return true + end + local card = cardList[1] + if (cardNum(card, cardList) >= 2) then + removeCard(cardList, card, 2) + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + + if (self.hongzhong_count > 0) then + removeCard(cardList, card, 1) + self.hongzhong_count = self.hongzhong_count - 1 + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + return false +end + +local function init(self,cardInhand,addCard,isZhong,qidui,eightLaizi) + self.stack = {} + self.pair_count = 0 + self.cardList = membe_clone(cardInhand) + self.qidui = qidui + self.eight_laizi = eightLaizi + self.cardList[#self.cardList+1] = addCard + if (isZhong) then + self.zhong_count = cardNum(zhongid, self.cardList) + removeCard(self.cardList, zhongid, self.zhong_count) + end + table.sort(self.cardList) + --printlog("添加排序====>>>") + --pt(self.cardList) + return self:checkQidui() or self:tryWin() +end + +local specialCardList={400,403,406,409,412,415,418} +function M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + --printlog("isZhong",isZhong) + --printlog("qidui",qidui) + --printlog("eightLaizi",eightLaizi) + --pt(cardInhand) + local self = setmetatable({}, {__index = M}) + local tingList = {} + if not cardInhand or #cardInhand == 0 then + return tingList + end + for k=100,300,100 do + for i=1,9 do + local tem = k + i + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + --printlog("返回结果为===>>>",result) + if(result) then + tingList[#tingList + 1] = tem + end + end + end + + for j=1,#specialCardList do + local tem = specialCardList[j] + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + if(result) then + tingList[#tingList + 1] = tem + end + end + + return tingList +end + +function M.MuiltiplteCaculateTingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + zhongid=DataManager.CurrenRoom.laiziInfo[1] + local tempTingList2={} + local tempTingList1=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo[2] then + zhongid=DataManager.CurrenRoom.laiziInfo[2] + tempTingList2=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + zhongid=DataManager.CurrenRoom.laiziInfo[1] + end + local currentTingList={} + if #tempTingList1>0 and #tempTingList2>0 then + currentTingList=CombineDictionaryAndRemoveSomeItem(tempTingList1,tempTingList2) + elseif #tempTingList1>0 then + currentTingList=tempTingList1 + elseif #tempTingList2>0 then + currentTingList=tempTingList2 + end + + return currentTingList + + else + zhongid=0 + return M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + end + +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/jinxi/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/jinxi/EXClearingView.lua new file mode 100644 index 00000000..e4bd30a6 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/jinxi/EXClearingView.lua @@ -0,0 +1,615 @@ +require("Game.View.ResultView") +local Hu_Type_Name = import(".CS_Win_Type") + +local EXClearingView = {} + +local M = EXClearingView + +function EXClearingView.new(blur_view) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self._full = true + ResultView.init(self, "ui://Main_Majiang/clearing") + + self._currenIndex = 0 + self._blur_view = blur_view + self._close_zone = false + self:InitMaPai() + + return self +end + +function M:InitMaPai() + self.maPaiCtr=self._view:GetController("mapai") + self.maPaiCtr.selectedIndex=0 + + self.maPaiList={} + + for i=1,8 do + local tempMP=self._view:GetChild("niao"..i) + table.insert(self.maPaiList,tempMP) + end + +end + + +function M:IsMapaiShow(niao,isShow) + if niao then + niao.visible=isShow + end +end + + +function M:SetMaPaiValue(niao,value) + if niao then + niao.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..value + end +end + +function M:SetMaPaiColor(niao,num) + niao:GetController("color").selectedIndex=num +end + +function M:HideAllMapai() + for i=1,#self.maPaiList do + self:IsMapaiShow(self.maPaiList[i],false) + self:SetMaPaiColor(self.maPaiList[i],0) + end +end + + + +function M:ShowSelectMaPai(niaoList) + if niaoList and #niaoList>0 then + self.maPaiCtr.selectedIndex=1 + self:HideAllMapai() + for i=1,#niaoList do + self:IsMapaiShow(self.maPaiList[i],true) + self:SetMaPaiValue(self.maPaiList[i],niaoList[i].card) + if niaoList[i].score>0 then + self:SetMaPaiColor(self.maPaiList[i],2) + end + end + else + self.maPaiCtr.selectedIndex=0 + end +end + + + +function M:CalculatePaixingInfo(result) + self.WinList={} + if result.info_list and #result.info_list>0 then + for i=1,#result.info_list do + if result.info_list[i].win_list and #result.info_list[i].win_list>0 then + table.insert(self.WinList,result.info_list[i].win_list) + end + end + end + + printlog("牌型列表====>>>") + pt(self.WinList) +end + + +function M:SetPaixingxiangqing(num) + for i=1,#self.PaiXingXiangQingCtrList do + if self.PaiXingXiangQingCtrList[i] then + self.PaiXingXiangQingCtrList[i].selectedIndex=num + end + end +end + + + +function M:InitData(over, room, result, total_result, callback) + + self._callback = callback + local _overCtr = self._view:GetController("over") + local btn_confirm = self._view:GetChild("btn_confirm") + local btn_result = self._view:GetChild("btn_showResult") + local btn_close = self._view:GetChild("big_result"):GetChild("btn_close") + local _btnCtr = self._view:GetController("button") + local _sdkCtr = self._view:GetController("sdk") + local ctr_type = self._view:GetController("type") + + self._view:GetChild("tex_roominfo").text = string.format("房号%s 局%s/%s %s", room.room_id, room.curren_round, room.room_config.round, os.date("%Y-%m-%d %H:%M:%S", os.time())) + self._view:GetChild("tex_gameinfo").text = string.gsub(room.room_config:GetDes2(), "\r", "") + + if result then + self:ShowSelectMaPai(result.niao) + self:CalculatePaixingInfo(result) + end + + self.PaiXingXiangQingCtrList={} + + local paixingxiangqing=self._view:GetChild("btn_detal") + local fanhuipaixing=self._view:GetChild("btn_fanhuipaixing") + fanhuipaixing.visible=false + paixingxiangqing.visible=true + paixingxiangqing.onClick:Add(function() + paixingxiangqing.visible=false + fanhuipaixing.visible=true + self:SetPaixingxiangqing(1) + end) + fanhuipaixing.onClick:Add(function() + paixingxiangqing.visible=true + fanhuipaixing.visible=false + self:SetPaixingxiangqing(0) + end) + + + if over ~= 2 then + if result.liuju then + ctr_type.selectedIndex = 3 + else + local info_list = result.info_list + for i = 1, #info_list do + local is_win = info_list[i].is_win + if is_win then + if info_list[i].seat == room.self_player.seat then + ctr_type.selectedIndex = 1 + else + ctr_type.selectedIndex = 2 + end + end + end + end + + if over == 0 then + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + btn_confirm.onClick:Add(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:DestroyWithCallback() + end) + self:AddClearItem(room, result.info_list, nil, over, result.niao, result.active_player) + elseif over == 1 then + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add(function() + self.maPaiCtr.selectedIndex=0 + _overCtr.selectedIndex = 1 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + if self._qsinfo_view then + self._qsinfo_view:Dispose() + end + end) + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + + self:AddClearItem(room, result.info_list, total_result.info_list, over, result.niao, result.active_player) + end + else + _overCtr.selectedIndex = 1 + self.maPaiCtr.selectedIndex=0 + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + + self:AddClearItem(room, nil, total_result.info_list, over) + end +end + +function M:AddClearItem(room, data, total_data,over, niao, active_player) + local n = over + 1 + local list_view1 = self._view:GetChild("player_list_1") + local list_view2 = self._view:GetChild("player_list_2") + + if 0 == over or 1 == over then + table.sort(data, function(a,b) return a.seat < b.seat end) + list_view1:RemoveChildrenToPool() + + for i=1,#data do + local item = list_view1:AddItemFromPool() + self:FillItemData(room, data[i], item, active_player, niao) + end + if #data == 3 then + list_view1.lineGap = 54 + elseif #data == 2 then + list_view1.lineGap = 108 + end + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end +end + +function M:FillItemData(room, data, item, active_player, niao) + + local _gamectr = ControllerManager.GetController(GameController) + local p = room:GetPlayerBySeat(data["seat"]) + item:GetChild("playerName").text = p.self_user.nick_name + item:GetChild("lab_hp").text=""--抓马 + local user = room:GetPlayerBySeat(data["seat"]).self_user + local head = item:GetChild('head'):GetChild('n4') + ImageLoad.Load(user.head_url, head) + + -- 手牌 + local hand_cards = data["hand_card"] + table.sort( hand_cards, ViewUtil.HandCardSort) + local hand_list_view = item:GetChild("hand_card_list") + hand_list_view:RemoveChildrenToPool() + for i=1,#hand_cards do + local card = hand_list_view:AddItemFromPool() + card.icon = "ui://Main_Majiang/202_"..hand_cards[i] + end + hand_list_view.width = 52 * #hand_cards + + local fz_card = p.fz_list + local fz_card_list = item:GetChild("fz_card_list") + fz_card_list.width = 157 * #fz_card * 0.8 + fz_card_list:RemoveChildrenToPool() + + for i=1,#fz_card do + if fz_card[i].type == FZType.Peng then + + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j=1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + elseif fz_card[i].type == FZType.Chi then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j = 1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/" .. self:GetPrefix().."202_"..fz_card[i].opcard[j] + end + elseif fz_card[i].type == FZType.Gang or fz_card[i].type == FZType.Gang_An or fz_card[i].type == FZType.Gang_Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_4") + for j=1,4 do + local card = item:GetChild("card_" .. j) + if fz_card[i].type == FZType.Gang_An and j == 4 then + card.icon = "ui://Main_Majiang/202_00" + else + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + end + end + end + + local huadd = data["hu_score"] + local gangadd = data["gang_score"] + local total = data["round_score"] + local geng_zhuan=data["geng_zhuan"] + local sp = " " + local str = "胡:"..huadd.."分" + str = str..sp.."杠:"..gangadd.."分" + + + + + + item:GetChild("score1").text = str + -- local total_score = data["total_score"] + if total >= 0 then + item:GetChild("score2").text = "+"..total + item:GetChild("score2").grayed = false + else + item:GetChild("score2").text = total + item:GetChild("score2").grayed = true + end + + + --计算牌型 + local totalPeson=DataManager.CurrenRoom.room_config.people_num-1 + local win_list = data["win_list"] + local is_win = data["is_win"] or false + local str1="" + sp="、" + if is_win then + if win_list then + if DataManager.CurrenRoom.isZiMoHu then + str1="自摸" + else + str1="接炮" + end + for i=1,#win_list do + local huName=Hu_Type_Name[win_list[i].type] + if huName then + str1=str1..sp..huName.."x"..win_list[i].score + end + + end + str1=str1.." +"..huadd.."分" + end + + else + printlog("输家============") + if DataManager.CurrenRoom.isZiMoHu then + printlog("自摸处理============") + --str1="" + if #self.WinList==1 then + for i=1,#self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + if j==1 then + str1=str1..huName.."x"..self.WinList[i][j].score + else + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + + end + end + + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + else + printlog("非自摸处理====>>>") + --点炮 一炮多响 + local yipaoduoxiang=false + if #self.WinList>1 then + yipaoduoxiang=true + end + + if yipaoduoxiang then + printlog("一炮多响====>>>") + str="点炮" + local allTypeList={} + local isHas=false + for i=1,#self.WinList do + for j=1,#self.WinList[i] do + isHas=IsHasDictionary(self.WinList[i][j].type,allTypeList) + if isHas==false then + table.insert(allTypeList,self.WinList[i][j].type) + end + end + + end + + if #allTypeList>0 then + for i=1,#allTypeList do + local huName=Hu_Type_Name[allTypeList[i]] + if huName then + str1=str1..huName.."、" + end + end + str1=str1.." "..huadd.."分" + end + + else + + if p.self_user.account_id == active_player and is_win == false and not data["liuju"] then + str1="点炮" + if #self.WinList==1 then + for i=1,# self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + end + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + end + + end + + + end + end + + -- + printlog("牌型计算==>>>",str1) + + if data["ming_gang_num"]>0 then + str1=str1.." 明杠x"..data["ming_gang_num"] + end + + if data["an_gang_num"]>0 then + str1=str1.." 暗杠x"..data["an_gang_num"] + end + + if data["dian_gang_num"]>0 then + str1=str1.." 点杠x"..data["dian_gang_num"] + end + + if gangadd~=0 then + if gangadd>0 then + str1=str1.." +"..gangadd.."分" + else + str1=str1.." "..gangadd.."分" + end + + end + + if data["ma_geng_gong"] and data["ma_geng_gong"]~=0 then + if data["ma_geng_gong"]>0 then + str1 = str1.." 马跟杠:+"..data["ma_geng_gong"].."分" + else + str1 = str1.." 马跟杠:"..data["ma_geng_gong"].."分" + end + + end + + if geng_zhuan and geng_zhuan~=0 then + if geng_zhuan>0 then + str1 = str1.." 跟庄:+"..geng_zhuan.."分" + else + str1 = str1.." 跟庄:"..geng_zhuan.."分" + end + + end + + + + + + item:GetChild("score3").text=str1 + item:GetChild("score4").text=str1 + local paixingCtr=item:GetController("detail") + table.insert(self.PaiXingXiangQingCtrList,paixingCtr) + ------------------------- + + local hp_nonnegative = room:checkHpNonnegative() + item:GetController("nonnegative").selectedIndex = hp_nonnegative and 1 or 0 + if hp_nonnegative then + local hp_info = data.hp_info + local ctr_hp_limit = item:GetController("hp_limit") + local hp = d2ad(hp_info.round_actual_hp) + if hp >= 0 then hp = "+" .. tostring(hp) end + item:GetChild("tex_hp").text = hp + ctr_hp_limit.selectedIndex = hp_info.upper_limit and 1 or 0 + end + + + item:GetController("win").selectedIndex = is_win and 0 or 1 + if p.self_user.account_id == active_player and is_win == false and total < 0 then + item:GetController("win").selectedIndex = 2 + end + + if is_win then + item:GetController("bg").selectedIndex=1 + else + item:GetController("bg").selectedIndex=0 + end + local win_card = item:GetChild("win_card") + win_card.icon = "ui://Main_Majiang/202_"..data["win_card"] + + if niao and #niao>0 then + local currentNiaoList=self:CalculateNiao(niao ,data["seat"]) + if currentNiaoList and #currentNiaoList>0 then + local lst_niao = item:GetChild("list_niao") + lst_niao:RemoveChildrenToPool() + for i = 1, #currentNiaoList do + if currentNiaoList[i].score > 0 then + local card_niao = lst_niao:AddItemFromPool() + card_niao.icon = "ui://Main_Majiang/202_" .. currentNiaoList[i].card + end + end + end + end + + + + if p.seat == room.banker_seat then + item:GetController("bank").selectedIndex = 1 + end +end + +function M:CalculateNiao(niaoList,seat) + local tempNiao={} + for i=1,#niaoList do + if niaoList[i].seat==seat then + table.insert(tempNiao,niaoList[i]) + end + end + return tempNiao +end + + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + player_list[i].id = user.account_id + player_list[i].hp_info = data[i].hp_info + player_list[i].score = data[i].total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + + local settle_log = data[i].settle_log + player_list[i].param = {} + player_list[i].param[1]={} + player_list[i].param[1].key = "自摸次数:" + player_list[i].param[1].value = tostring(data[i].settle_log.zimo) + player_list[i].param[2]={} + player_list[i].param[2].key = "接炮次数:" + player_list[i].param[2].value = tostring(data[i].settle_log.jie_pao) + player_list[i].param[3]={} + player_list[i].param[3].key = "点炮次数:" + player_list[i].param[3].value = tostring(data[i].settle_log.dian_pao) + player_list[i].param[4]={} + player_list[i].param[4].key = "暗杠次数:" + player_list[i].param[4].value = tostring(data[i].settle_log.an_kong) + player_list[i].param[5]={} + player_list[i].param[5].key = "明杠次数:" + player_list[i].param[5].value = tostring(data[i].settle_log.ming_kong) + end + + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + local big_result = self._view:GetChild("big_result") + big_result:GetChild("txt_room_info").text = string.format("%s 房号%s 局%s/%s", os.date("%Y/%m/%d", os.time()), room.room_id, room.curren_round, room.room_config.round) + local lst_p = big_result:GetChild("player_list") + if #player_list == 3 then + lst_p.columnGap = 108 + elseif #player_list == 2 then + lst_p.columnGap = 208 + end + + self:InitBigResult(room, 30) + local show_detail = room.hpOnOff == 1 + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + com_p:GetController("jsicon").selectedIndex=i-1 + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + if show_detail then + local score = 0 + if com_p:GetController("pn").selectedIndex == 0 then + score = com_p:GetChild("txt_navigate").text + else + score = com_p:GetChild("txt_positive").text + end + score = score / room.score_times + com_p:GetChild("tex_detail_score").text = string.format("%s × %s倍", score, room.score_times) + end + end + + if room.group_id ~= 0 then + big_result:GetController("group").selectedIndex = 1 + end + DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild("btn_head") + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= "" then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end + +local prefix +function M:GetPrefix() + -- if not prefix then + prefix = get_majiang_prefix(10) + -- end + return prefix +end + +function M:DestroyWithCallback() + if self._callback then + self._callback() + end + self:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/jinxi/EXGameController.lua b/lua_probject/extend_project/extend/majiang/jinxi/EXGameController.lua new file mode 100644 index 00000000..cf8bb7b1 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/jinxi/EXGameController.lua @@ -0,0 +1,386 @@ +local TX_Protocol = import(".Protocol") +local FZTipList = require("main.majiang.FZData") +local TX_GameEvent = import(".GameEvent") + +local M = {} + +--- Create a new GameController +function M.new() + setmetatable(M,{__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("南城麻将") + self.class = "TX_GameController" + return self +end + +function M:init(name) + GameController.init(self,name) + + self._eventmap[TX_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[TX_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[TX_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[TX_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[TX_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[TX_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + self._eventmap[TX_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[TX_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[TX_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[TX_Protocol.GAME_EVT_RESULT2] = self.OnEventResult2 + self._eventmap[TX_Protocol.GAME_EVT_NIAO] = self.OnEventNiao + self._eventmap[TX_Protocol.GAME_EVT_PIAOTIP] = self.OnEventPiaoTip + self._eventmap[TX_Protocol.GAME_EVT_PIAO] = self.OnEventPiao + + self._eventmap[TX_Protocol.GAME_EVT_GANGZI] = self.OnEventGangCards + self._eventmap[TX_Protocol.GAME_EVT_BUGANG] = self.OnEventBuGang + +end + +local __pre_delete_card = false +-- 发送出牌指令到服务器 +function M:SendOutCard(card, callback) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_DIS_CARD, _data) + + -- 进行预删牌处理 + local p = _room.self_player + _room.curren_outcard_seat = -1 + list_remove(p.card_list,card) + table.sort(p.card_list, ViewUtil.HandCardSort) + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + __pre_delete_card = true + callback() +end + +function M:SendGangCard(card) + local _data = {} + _data["card"] = card + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_EVT_DOGANG, _data) +end + + +function M:OnEventGangCards(evt_data) + printlog("OnEventGangCards") + pt(evt_data) + DispatchEvent(self._dispatcher,TX_GameEvent.SendGangZi,evt_data["gangzi1"],evt_data["gangzi2"],evt_data["gangnum"],true ) +end + +function M:OnEventBuGang(evt_data) + printlog("OnEventBuGang") + pt(evt_data) + DispatchEvent(self._dispatcher,TX_GameEvent.EventBuGang,evt_data["info"][1],evt_data["info"][2],true ) +end + +-- 发送放子选择到服务器 +function M:SendAction(id) + local _data = {} + _data["id"] = id + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_ACTION, _data) +end + +function M:OnEventSendCards(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + if not _room.room_config.piao_niao or _room.self_player.entrust then + _room.curren_round = _room.curren_round + 1 + end + if _room.curren_round > 0 then _room.playing = true end + + printlog("开始发牌===========>>>") + pt(evt_data) + + local room = DataManager.CurrenRoom + --printlog(evt_data.laiziCard) + --printlog(evt_data.laiziCard2) + --printlog(evt_data.laiziCardBefore) + --printlog(evt_data.laiziCard2Before) + + + DispatchEvent(self._dispatcher,TX_GameEvent.SendGangZi,102,103,0,true ) + + + + -- _room.SelfPlayer.AutoOutCard = false + local handcards = evt_data["card_list"] + local p = _room.self_player + local seat = evt_data["bank_seat"] + self._cacheEvent:Enqueue(function() + _room.banker_seat = seat + for i=1,#_room.player_list do + _room.player_list[i].hand_left_count = 13 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + end + p.card_list = handcards + self._room.self_player.hand_left_count = #handcards + table.sort( handcards, ViewUtil.HandCardSort ) + DispatchEvent(self._dispatcher,TX_GameEvent.SendCards, p) + end) +end + +function M:OnEventOutCard(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local ting_list = nil + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + _room.last_outcard_seat = seat + if seat == _room.self_player.seat and __pre_delete_card then + __pre_delete_card = false + else + if seat == _room.self_player.seat then + list_remove(p.card_list, card) + table.sort(p.card_list, ViewUtil.HandCardSort) + end + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + DispatchEvent(self._dispatcher,TX_GameEvent.OutCard, p, card) + end + end) +end + + +function M:OnEventTakeCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + p.hand_left_count = p.hand_left_count +1 + if (seat == _room.self_player.seat) then + _room.self_player.card_list[#_room.self_player.card_list+1] = card + -- table.sort( _room.self_player.card_list, ViewUtil.HandCardSort ) + end + DispatchEvent(self._dispatcher,TX_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnEventOutHint(evt_data) + self._cacheEvent:Enqueue(function() + self._room.curren_outcard_seat = self._room.self_player.seat + DispatchEvent(self._dispatcher,TX_GameEvent.OutHint) + end) +end + +function M:OnEventTurn(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + -- self._room.curren_outcard_seat = seat + DispatchEvent(self._dispatcher,TX_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + local weight = evt_data["weight"] + for i=1,#list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + tip.opcard = dtip["opcard"] + + -- if (dtip["opcard"]) then + -- local opcard = dtip["opcard"] + -- tip.OpCard = opcard + -- tip.OpCard[3] = tip.Card + -- table.sort(tip.OpCard) + -- end + tiplist:AddTip(tip) + end + DispatchEvent(self._dispatcher,TX_GameEvent.FZTips, tiplist, weight) + end) +end + +function M:OnEventFzAction(evt_data) + local _room = self._room + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local type = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + -- local openkong = evt_data["openkong"] + + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local fz = nil + local index = -1 + local ftype = type + if (ftype == FZType.Gang_Peng) then + for i=1,#p.fz_list do + if (p.fz_list[i].card == card) then + p.fz_list[i].card = card + fz = p.fz_list[i] + fz.type = type + index = i -1 + break + end + end + end + fz = {} + fz.card = card + fz.type = type + fz.active_card = actice_card + if (index == -1) then + if (ftype == FZType.Chi) then + local data ={} + data[1] = opcard[1] + data[2] = card + data[3] = opcard[2] + fz.opcard =data + end + p.fz_list[#p.fz_list+1] = fz + end + fz.from_seat = from_seat + local remove_num = #opcard + + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(p.card_list,opcard[i]) + end + end + + p.hand_left_count = p.hand_left_count - remove_num + if from_seat ~= p.seat then + -- if (fz.Type == FZType.Chi) then card = actice_card end + local fp = _room:GetPlayerBySeat(from_seat) + table.remove(fp.outcard_list,#fp.outcard_list) + end + + DispatchEvent(self._dispatcher,TX_GameEvent.FangziAction, fz, p, index) + end) +end + +function M:OnEventHu(evt_data) + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local win_card = evt_data["win_card"] + local win_list = evt_data["win_list"] + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + table.sort( win_p.card_list, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher,TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], win_card, cards, win_list) + end) +end + +function M:OneventResult1(evt_data) + local over = evt_data.type + printlog("OneventResult1") + pt(evt_data) + --0:小结算 1:小大结算 2:大结算 + self._room._reload_flag = false + self._room.playing = false + if 0 == over then + local result = evt_data.result + self._cacheEvent:Enqueue(function() + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil,true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +-- function M:OnEventResult2(evt_data) +-- DataManager.CurrenRoom.Over = true +-- ControllerManager.SetGameNetClient(nil,true) + -- local info_list = evt_data["info_list"] + -- if self._result ~= nil then + -- self._cacheEvent:Enqueue(function() + -- self:OneventResult1(self._result) + -- self._result = nil + -- end) + -- end +-- self._cacheEvent:Enqueue(function() +-- DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, info_list) +-- ControllerManager.ChangeController(LoddyController) +-- end) +-- end + +function M:OnEventNiao(evt_data) + local list = evt_data["niao"] + local start_seat = evt_data["start_seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EventNiao, list, start_seat) + end) +end + +function M:OnEventPiaoTip() + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + self._cacheEvent:Enqueue(function() + if not self._room._reload_flag then + self._room.curren_round = self._room.curren_round + 1 + end + self._room.playing = true + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiaoTip, evt_data) + end) +end + +function M:OnEventPiao(evt_data) + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiao, evt_data.seat, evt_data.num) + end) +end + +function M:GetPosString( seat ) + if DataManager.CurrenRoom.room_config.people_num ~= 4 then return"" end + if seat == 1 then + return "北" + elseif seat == 2 then + return "西" + elseif seat == 3 then + return "南" + elseif seat == 4 then + return "东" + end +end + +function M:Discard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + -- list_remove(_room.SelfPlayer.Cards,card) + -- table.sort(_room.SelfPlayer.Cards) + _client:send(Protocol.Game_Da, _data) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/jinxi/EXGameInfo.lua b/lua_probject/extend_project/extend/majiang/jinxi/EXGameInfo.lua new file mode 100644 index 00000000..1bc2a5d8 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/jinxi/EXGameInfo.lua @@ -0,0 +1,183 @@ +local EXGameInfo = {} + +local M = EXGameInfo + + +function EXGameInfo.new(blur_view) + setmetatable(M, { __index = IGameInfo }) + local self = setmetatable({}, { __index = M }) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/majiang/jinxi/ui/Info_MJ_JinXi") + return self +end + +function M:FillData() + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 3 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_JinXi/Cgm_create_room") + + if oldGameVersion == 2 then + self._config:GetController("xipai").selectedIndex = 0 + + self.xipaiValueText = self._config:GetChild('xipaifen') + self.xipaiValueText.text = 1 + self.xipaiValue = 1 + + self.anchouValueText = self._config:GetChild('anchoufen') + self.anchouValueText.text = 1 + self.anchouValue = 1 + + local btn_cr = self._config:GetChild('sdsrbtn') + btn_cr.onClick:Set( + function() + local gniv = GroupNumberInputView_Game.new(nil, function(num) + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == -1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1, "输入数据异常!") + end + + self.xipaiValueText.text = value / 1000 + self.xipaiValue = value / 1000 + end, 3, nil) + gniv:Show() + end + ) + + + local btn_cr2 = self._config:GetChild('anchoubtn') + btn_cr2.onClick:Set( + function() + local gniv = GroupNumberInputView_Game.new(nil, function(num) + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == -1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1, "输入数据异常!") + end + + self.anchouValueText.text = value / 1000 + self.anchouValue = value / 1000 + end, 3, nil) + gniv:Show() + end + ) + end +end + +local _help_url = "ui://Info_MJ_JinXi/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_MJ_JinXi/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_MJ_JinXi/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list = {} +function M:GetPlayList() + return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + 1 + local people = _config:GetController("play_list").selectedIndex + 2 + + local fengding = _config:GetController("fengding").selectedIndex + local wanfa = _config:GetController("wanfa").selectedIndex + local qiduijiafan = _config:GetChild("btn_qidui").selected + local shoudailongjiafan = _config:GetChild("btn_shoudailong").selected + local loudilongjiafan = _config:GetChild("btn_loudilong").selected + local bunengchi = _config:GetChild("btn_bunengchi").selected + local doudizhu = _config:GetChild("btn_doudizhu").selected + local doudizhufanbei = _config:GetChild("btn_doudizhufanbei").selected + local xi_pai = false + local xi_paifen = 0 + if _config:GetChild("xipai") then + xi_pai = _config:GetChild("xipai").selected + end + + + + ------ + local _data = {} + _data["opt"] = round + _data["maxPlayers"] = people + + _data["fengding"] = fengding + _data["wanfa"] = wanfa + _data["qiduijiafan"] = qiduijiafan + _data["shoudailongjiafan"] = shoudailongjiafan + _data["loudilongjiafan"] = loudilongjiafan + _data["bunengchi"] = bunengchi + _data["doudizhu"] = doudizhu + _data["doudizhufanbei"] = doudizhufanbei + _data['xi_pai'] = xi_pai + + local xi_pai_score = 0 + local an_chou_score = 0 + if oldGameVersion == 2 then + xi_pai_score = self.xipaiValue + an_chou_score = self.anchouValue + end + + _data['xi_pai_score'] = xi_pai_score * 1000 + _data['an_chou_score'] = an_chou_score * 1000 + + + return _data +end + +function M:LoadConfigData(data) + --printlog("加载房间配置=========>>>") + --pt(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt - 1 + _config:GetController("play_list").selectedIndex = data.maxPlayers - 2 + + + _config:GetController("fengding").selectedIndex = data.fengding + + _config:GetController("wanfa").selectedIndex = data.wanfa + _config:GetChild("btn_qidui").selected = data.qiduijiafan + _config:GetChild("btn_shoudailong").selected = data.shoudailongjiafan + _config:GetChild("btn_loudilong").selected = data.loudilongjiafan + _config:GetChild("btn_bunengchi").selected = data.bunengchi + + _config:GetChild("btn_doudizhu").selected = data.doudizhu + _config:GetChild("btn_doudizhufanbei").selected = data.doudizhufanbei + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected = data.xi_pai + end + + if oldGameVersion == 2 then + self.xipaiValueText.text = data.xi_pai_score / 1000 + self.xipaiValue = data.xi_pai_score / 1000 + + self.anchouValueText.text = data.an_chou_score / 1000 + self.anchouValue = data.an_chou_score / 1000 + end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/jinxi/EXMainView.lua b/lua_probject/extend_project/extend/majiang/jinxi/EXMainView.lua new file mode 100644 index 00000000..467333c1 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/jinxi/EXMainView.lua @@ -0,0 +1,819 @@ +local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local MJMainView = require("main.majiang.MJMainView") +local EXClearingView = import(".EXClearingView") +local TX_GameEvent = import(".GameEvent") +local HuTipView = import("main.majiang.HuTipView") +local SettingView = import("main.majiang.MJSettingViewNew") +local PlayerInfoView = import(".EXPlayerInfoView") +local M = {} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M, { __index = MJMainView }) + local self = setmetatable({}, { __index = M }) + self.class = "MainView" + self.asset_group = "JinXi_MJ" + self:init() + ViewUtil.PlayMuisc(self.asset_group, "extend/majiang/jinxi/sound/bg.mp3") + return self +end + +function M:InitView(url) + local room = self._room + self._style = 1 + self._gps_style = 1 + self._full = true + UIPackage.AddPackage("extend/majiang/jinxi/ui/Extend_MJ_JinXi") + MJMainView.InitView(self, "ui://Main_Majiang/Main_" .. room.room_config.people_num .. "_s2") + self._hu_tip = HuTipView.new(self) + + self._view:GetChild('wanfa_text').text = room.room_config.people_num .. '人个旧麻将 ' .. room.score_times .. '倍' + + self.selectLaiziBtn = self._view:GetChild('selectlaizi') + self.Laizi1Btn = self._view:GetChild('selectgang1') + self.Laizi2Btn = self._view:GetChild('selectgang2') + self._view:GetChild("n108").visible = true + self.Laizi1Btn.visible = true + self.Laizi2Btn.visible = true + self.bugangnum = self._view:GetChild("bugangnum") + + self:PlayerChangeLineState() + + if room.playing or room.curren_round > 0 then + self:ReloadRoom() + end +end + +function M:__BuGang(card1, card2, callback) + local _gang_tip_choice = UIPackage.CreateObject("Extend_MJ_JinXi", "Gang_tip_choice") + _gang_tip_choice.visible = true + + local gangcard1 = _gang_tip_choice:GetChild("card1") + local gangcard2 = _gang_tip_choice:GetChild("card2") + + + gangcard1.icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. card1) + gangcard2.icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. card2) + + gangcard1.onClick:Add(function() + callback(card1) + end) + + gangcard2.onClick:Add(function() + callback(card2) + end) + + _gang_tip_choice.xy = Vector2((self._view.width - _gang_tip_choice.width) / 2, + (self._view.height - _gang_tip_choice.height) / 2) + self._view:AddChild(_gang_tip_choice) + self._gang_tip_choice = _gang_tip_choice +end + +function M:SetShowGangZiProcess(currentLaizi1ID, currentLaizi2ID, bugangnum, isShowAnim) + --zhongid=currentLaizi1ID + if isShowAnim == nil then isShowAnim = false end + + self:SetGangZiCard(self.Laizi1Btn, currentLaizi1ID) + self:SetGangZiCard(self.Laizi2Btn, currentLaizi2ID) + self:IsShowGangZi(self.Laizi1Btn, true) + self:IsShowGangZi(self.Laizi2Btn, true) + self.bugangnum.text = "当前 " .. bugangnum .. " 杠" +end + +function M:HideAllGangZiCard() + self.Laizi1Btn.visible = false + self.Laizi2Btn.visible = false + self.selectLaiziBtn.visible = false + --self.LaiziBG.visible=false +end + +function M:SetGangZiCard(btn, cardId) + btn.icon = 'ui://Main_Majiang/' .. get_majiang_prefix(DataManager.CurrenRoom.game_id) .. "201_" .. cardId +end + +function M:IsShowGangZi(btn, isShow) + btn.visible = isShow +end + +function M:UpdateRound() + self._view:GetChild("tex_round1").text = self._room.curren_round + self._view:GetChild("tex_round2").text = self._room.room_config.round +end + +function M:InitPlayerInfoView() + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem, self) + tem.visible = false + end +end + +function M:NewMJPlayerCardInfoView(view, index) + if index == 1 then + return MJPlayerSelfCardInfoView.new(view, self) + end + return MJPlayerCardInfoView.new(view, self) +end + +function M:EventInit() + -- UIPackage.AddPackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong") + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _gcm_outcard_url = UIPackage.GetItemURL("Main_Majiang", "Gcm_OutCard") + local _player_info = self._player_info + local _gamectr = self._gamectr + + + + _gamectr:AddEventListener(TX_GameEvent.SendLaiZi, function(...) + local arg = { ... } + self:SetShowLaiZiProcess(arg[1], arg[2], arg[3], arg[4]) + end) + + _gamectr:AddEventListener(TX_GameEvent.SendGangZi, function(...) + local arg = { ... } + self:SetShowGangZiProcess(arg[1], arg[2], arg[3], arg[4]) + end) + + _gamectr:AddEventListener(TX_GameEvent.EventBuGang, function(...) + local arg = { ... } + self:__BuGang(arg[1], arg[2], + function(id) + printlog(id) + _gamectr:SendGangCard(id) + self:__CloseGangTip() + end) + end) + + + + _gamectr:AddEventListener(TX_GameEvent.SendCards, function(...) + -- self:ShowHuTip() + self:UpdateRound() + self._state.selectedIndex = 1 + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateHandCard() + end + end) + _gamectr:AddEventListener(TX_GameEvent.EventTurn, function(...) + local arg = { ... } + self._left_time = 15 + local seat = arg[1] + self:UpdateCardBox(self:GetPos(seat)) + -- if seat == self._room.self_player.seat then + -- self:ShowHuTip() + -- end + end) + + _gamectr:AddEventListener(TX_GameEvent.OutHint, function(...) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:UpdateHandCard(true) + end) + + local _gcm_outcard_url = "ui://Main_Majiang/Gcm_OutCard" + _gamectr:AddEventListener(TX_GameEvent.OutCard, function(...) + self:__CloseTip() + self._left_time = 0 + local arg = { ... } + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:RemoveCursor() + info:UpdateHandCard() + local outcard = UIPackage.CreateObjectFromURL(_gcm_outcard_url) + info:UpdateOutCardList(outcard, card, self._cursor) + self:PlaySound("JinXi_MJ", p.self_user.sex, tostring(card)) + self:PlayMJSound("chupai.mp3") + if seat == _room.self_player.seat then + _room.curren_outcard_seat = -1 + end + end) + _gamectr:AddEventListener(TX_GameEvent.GetCard, function(...) + self:__CloseTip() + local arg = { ... } + local seat = arg[1] + local card = arg[2] + -- self._tex_leftTime.text = arg[3] + self._tex_LeftCard.text = arg[3] + -- self:UpdateRoomInfo() + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateHandCard(true) + end) + + _gamectr:AddEventListener(TX_GameEvent.FZTips, function(...) + local arg = { ... } + local _tip = arg[1] + local weight = arg[2] + self:__FangziTip(_tip, weight) + end) + + _gamectr:AddEventListener(TX_GameEvent.FangziAction, handler(self, self.OnFangziAction)) + + _gamectr:AddEventListener(TX_GameEvent.ZPHuCard, function(...) + self._left_time = 0 + self:UpdateCardBox(0) + self:__CloseTip() + self._popEvent = false + local arg = { ... } + local win_seat = arg[1] + local lose_seat = arg[2] + local win_card = arg[3] + local cards = arg[4] + local win_list = arg[5] + local index = self:GetPos(win_seat) + local info = self._player_card_info[index] + self:RemoveCursor() + info:UpdateHandCard(true, true) + + local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card") + obj_win_card.icon = "ui://Main_Majiang/202_" .. win_card + obj_win_card:GetController("bg").selectedIndex = 1 + info._view:AddChild(obj_win_card) + obj_win_card:Center() + + local url, pNode + local player = _room:GetPlayerBySeat(win_seat) + if win_seat ~= _room.self_player.seat then + url = "ui://Main_Majiang/别人胡" + pNode = info._mask_liangpai + elseif win_seat == _room.self_player.seat then + url = "ui://Main_Majiang/自己胡牌" + pNode = self._view + end + if win_seat == lose_seat then + url = "ui://Main_Majiang/eff_zimo" + end + + local he = UIPackage.CreateObjectFromURL(url) + pNode:AddChild(he) + he:GetTransition("t2"):Play() + he:Center() + if _room.room_config.people_num == 2 then + if win_seat ~= _room.self_player.seat then + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + end + + if win_seat == _room.self_player.seat then + printlog("自己位置=====") + he:Center() + elseif url == "ui://Main_Majiang/eff_zimo" then + printlog("自摸地址==========") + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + + + + --- + local isZiMo = win_seat == lose_seat + DataManager.CurrenRoom.isZiMoHu = isZiMo + local hu_sound = isZiMo and ("zimo" .. math.random(1, 3)) or ("hu" .. math.random(1, 2)) + printlog("声音====>>>", hu_sound) + self:PlaySound("JinXi_MJ", player.self_user.sex, hu_sound) + + local pNode = info._view + local url = "eff_list1" + local he_list = UIPackage.CreateObjectFromURL("ui://Extend_MJ_JinXi/" .. url) + he_list.touchable = false + pNode:AddChild(he_list) + he_list:Center() + + coroutine.start(function() + for i = 1, #win_list do + local tem = win_list[i] + if tem.type > 0 and tem.type < 32 then + local com_name = "he" .. tem.type + local item = he_list:GetChild("list"):AddItemFromPool("ui://Extend_MJ_JinXi/" .. com_name) + coroutine.wait(0.3) + end + end + + coroutine.wait(2) + obj_win_card:Dispose() + he:Dispose() + he_list:Dispose() + self._popEvent = true + end) + end) + + _gamectr:AddEventListener(TX_GameEvent.EventNiao, function(...) + local arg = { ... } + self._popEvent = false + local list = arg[1] + local start_seat = arg[2] + -- ViewUtil.PlaySound("JinXi_MJ", "extend/majiang/chaozhou/sound/zhuaniao.mp3") + coroutine.start(self.RunNiao, self, list, start_seat) + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult1, function(...) + self._popEvent = false + self:__CloseTip() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = { ... } + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local niao = result.niao + if liuju then + local le = UIPackage.CreateObjectFromURL("ui://Main_Majiang/LiuJu") + self._view:AddChild(le) + le:Center() + le:GetTransition("t0"):Play() + coroutine.start(function() + coroutine.wait(1) + le:Dispose() + end) + end + self:RemoveCursor() + if self._clearingView == nil then + self._clearingView = EXClearingView.new(self._root_view) + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + self._popEvent = true + end) + end + + if _room.curren_round ~= _room.room_config.round then + -- if #niao == 0 then self._view:GetChild("n13").visible = false end + self._clearingView:InitData(0, _room, result, nil, function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:ResetCardType() + if _room:checkHpNonnegative() then + p.cur_hp = data[i].hp_info.cur_hp + end + info:UpdateScore() + info._view:GetChild("zhanji").visible = true + local num = data[i].hp_info.total_hp + if num > 0 then + info._view:GetController("text_color").selectedIndex = 0 + info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + else + info._view:GetController("text_color").selectedIndex = 1 + info._view:GetChild("text_jifen").text = d2ad(num) + end + + info._view:GetChild("mask_piao").title = "" + info._view:GetController("piao_niao").selectedIndex = 0 + p.fz_list = {} + end + DataManager.CurrenRoom.self_player.card_list = {} + self._state.selectedIndex = 2 + self._clearingView = nil + end) + end + self._player_card_info[1]:ShowHuTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult2, function(...) + self:UnmarkSelfTuoguan() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = { ... } + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + self._clearingView = EXClearingView.new() + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + end) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiaoTip, function() + self:UpdateRound() + self._tex_LeftCard.text = "0" + self._state.selectedIndex = 1 + self:__PiaoNiaoTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiao, function(...) + local arg = { ... } + local seat = arg[1] + local num = arg[2] + if num > 0 then + local head_info = self._player_info[self:GetPos(seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. num + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + if seat == _room.self_player.seat then + if self._com_piao and _room.self_player.entrust then + self._com_piao:Dispose() + self._com_piao = nil + _room.curren_round = _room.curren_round - 1 + end + end + end) +end + +function M:OutCard(card) + if card ~= 0 then + printlog("当前出牌为===>>>" .. card) + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card, function() + local info = self._player_card_info[1] + self:RemoveCursor() + info:UpdateHandCard() + + info:UpdateOutCardList(nil, card, self._cursor) + self:PlaySound("JinXi_MJ", self._room.self_player.self_user.sex, tostring(card)) + self:PlayMJSound("chupai.mp3") + -- self:ShowHuTip() + end) + else + printlog("鬼牌不能出===>>>" .. card) + end +end + +function M:__FangziTip(tip, weight) + printlog("__FangziTip") + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject("Main_Majiang", "Gcm_action_tips") + _chipeng_tip:GetController("hide_bg").selectedIndex = 1 + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + -- self._player_card_info[self:GetPos(p.seat)] + + local _lit_fanzi = _chipeng_tip:GetChild("lit_fanzi") + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + printlog(tip.tip_map_type) + pt(_tlist) + local tip_hu = false + local count = #_tlist + table.sort(_tlist) + local isHu = false + for k = 1, #_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + local url = "ui://Main_Majiang/Btn_fztip" + local td_weight = td.weight + if td_weight == 16 then td_weight = 8 end + if td_weight == 8 then url = "ui://Main_Majiang/Btn_hu" end + local btn_t = _lit_fanzi:AddItemFromPool(url) + btn_t.icon = "ui://Main_Majiang/fztip_" .. td_weight + btn_t.data = { tip, td } + btn_t.onClick:Add(self.__TipAction, self) + end + + -- if not (tonumber(weight) >= 16) then + local _btn_pass = _lit_fanzi:AddItemFromPool("ui://Main_Majiang/Btn_pass") + -- local _btn_pass = _chipeng_tip:GetChild("btn_pass") + _btn_pass.onClick:Set(function() + if tonumber(weight) >= 8 then + local guo_msg = MsgWindow.new(self._root_view, "确定要点过吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end) + guo_msg:Show() + else + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end) + -- end + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() +end + +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local list = tip.tip_map_type[td.weight] + printlog("__TipAction") + pt(list) + if (#list > 1) then + self:_ChiView(list, function(id) + _gamectr:SendAction(id) + self:__CloseTip() + end) + self._chipeng_tip.visible = false + return + end + + _gamectr:SendAction(td.id) + if (self._chipeng_tip == nil) then return end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil +end + +function M:_ChiView(tiplist, callback) + self._chipeng_tip.visible = false + printlog("_ChiView") + pt(tiplist) + local _pop_tip_choice = UIPackage.CreateObject("Extend_MJ_JinXi", "Pop_tip_choice") + local list_choose1 = _pop_tip_choice:GetChild("Lst_choose") + local list_choose2 = _pop_tip_choice:GetChild("Lst_choose2") + local crossCtr = _pop_tip_choice:GetController("state") + crossCtr.selectedIndex = #tiplist == 3 and 0 or + (#tiplist == 2 and 1 or (#tiplist == 4 and 2 or (#tiplist == 5 and 3 or 4))) + _pop_tip_choice:GetChild("Btn_cross").onClick:Add(function() + _pop_tip_choice:Dispose() + self._chipeng_tip.visible = true + end) + list_choose1:RemoveChildrenToPool() + list_choose2:RemoveChildrenToPool() + for i = 1, #tiplist do + local list_choose = i <= 3 and list_choose1 or list_choose2 + local item_choose = list_choose:AddItemFromPool() + item_choose:GetController("type").selectedIndex = (1 == tiplist[i].weight or 2 == tiplist[i].weight) and 1 or 0 + if tiplist[i].weight ~= 1 then + for j = 1, 4 do + item_choose:GetChild("card" .. j).icon = UIPackage.GetItemURL("Main_Majiang", + self:GetPrefix() .. "202_" .. tiplist[i].card) + end + else + local tem = {} + table.insert(tem, tiplist[i].opcard[1]) + table.insert(tem, tiplist[i].opcard[2]) + local tcard = tiplist[i].card + table.insert(tem, tcard) + table.sort(tem, function(a, b) + return a < b + end) + item_choose:GetChild("card1").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. + tem[1]) + item_choose:GetChild("card2").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. + tem[2]) + item_choose:GetChild("card4").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. + tem[3]) + local cardpos = tem[2] > tcard and 1 or (tem[2] < tcard and 4 or 2) + item_choose:GetChild("card" .. cardpos):GetController("color").selectedIndex = 1 + end + item_choose.onClick:Add(function() + callback(tiplist[i].id) + end) + end + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width) / 2, + (self._view.height - _pop_tip_choice.height) / 2) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:OnFangziAction(...) + self:__CloseTip() + local arg = { ... } + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local index = arg[3] + printlog("OnFangziAction") + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject("Extend_MJ_JinXi", "FzEffect") + if fz.type == FZType.Peng then + self:PlaySound("JinXi_MJ", player.self_user.sex, "peng" .. math.random(1, 3)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "碰框") + elseif fz.type == FZType.Chi then + self:PlaySound("JinXi_MJ", player.self_user.sex, "chi" .. math.random(1, 3)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "吃") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "吃") + else + self:PlaySound("JinXi_MJ", player.self_user.sex, "gang" .. math.random(1, 2)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "杠框") + end + effect.touchable = false + effect:GetTransition("t2"):Play() + pNode:AddChild(effect) + coroutine.start(function() + coroutine.wait(0.3) + self._popEvent = true + end) + coroutine.start(function() + coroutine.wait(2) + effect:Dispose() + end) + + self:RemoveCursor() + if (player.seat ~= fz.from_seat) then + local fs_info = _player_card_info[self:GetPos(fz.from_seat)] + fs_info:UpdateOutCardList() + end + info:UpdateFzList(fz, index, true) + local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi + printlog(getcard) + info:UpdateHandCard(getcard) + self:__CloseTip() +end + +function M:RunNiao(list, start_seat) + local _room = self._room + --local _niao_View = self._niao_View + self._niao_View = UIPackage.CreateObject("Extend_MJ_JinXi", "Panel_Birds") + self._view:AddChild(self._niao_View) + self._niao_View:Center() + local _niao_View = self._niao_View + local list_niao_card = self._niao_View:GetChild("Lst_birds") + list_niao_card:RemoveChildrenToPool() + for i = 1, #list do + --添加背面的麻將 + local item = list_niao_card:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "202_00") + item:GetChild("tex_score").text = "+" .. list[i].score + end + for i = 1, #list do + --顯示正面 + local item = list_niao_card:GetChildAt(i - 1) + local card = list[i].card + coroutine.wait(0.3) + item:GetTransition("appear"):Play() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_" .. card) + if list[i].score > 0 then item:GetController("bg").selectedIndex = 1 end + end + coroutine.start(function() + coroutine.wait(1) + _niao_View:Dispose() + self._popEvent = true + end) +end + +-- function M:markOutCards(showTip, data) +-- for i = 1, #self._room.player_list do +-- local p = self._room.player_list[i] +-- local info = self._player_card_info[self:GetPos(p.seat)] +-- for j = 1, #p.outcard_list do +-- local card = p.outcard_list[j] +-- if card == data then +-- local obj = info:GetOutCardByIndex(j) +-- obj:GetController("gray").selectedIndex = showTip and 1 or 0 +-- end +-- end +-- end +-- end + +function M:__PiaoNiaoTip() + local obj_piao = UIPackage.CreateObject("Main_Majiang", "panel_piao_niao") + self._view:AddChild(obj_piao) + obj_piao.x = (self._view.width - obj_piao.width) * 0.5 + obj_piao.y = self._view.height * 0.6 + for i = 1, 4 do + obj_piao:GetChild("btn_" .. i).onClick:Add(function() + self._gamectr:SendAction(i - 1) + obj_piao:Dispose() + end) + end + self._com_piao = obj_piao +end + +function M:ReloadRoom(bskip) + local room = self._room + -- if not room.playing then + -- self._state.selectedIndex = 2 + -- else + -- self._state.selectedIndex = 1 + -- self._room._reload_flag = true + -- end + + if bskip == nil or bskip == false then + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + self._room._reload_flag = true + end + end + + + for i = 1, #room.player_list do + local p = room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + for i = 1, #p.fz_list do + info:UpdateFzList(p.fz_list[i], -1) + end + info:UpdateHandCard() + local head_info = self._player_info[self:GetPos(p.seat)] + head_info:UpdateScore() + head_info._view:GetChild('zhanji').visible = true + local num = p.total_hp or 0 + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(num) + end + + if p.seat == room.last_outcard_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil, card, self._cursor) + elseif p.seat == room.curren_outcard_seat then + info:UpdateHandCard(true) + info:UpdateOutCardList() + else + info:UpdateOutCardList() + end + if p.seat == room.banker_seat then + head_info:MarkBank(true) + end + -- if p.ready then + -- self._player_info[self:GetPos(p.seat)]:Ready(true) + -- end + if bskip == nil or bskip == false then + if p.ready and room.playing == false then + self._player_info[self:GetPos(p.seat)]:Ready(true) + end + end + if p.piao_niao ~= nil and p.piao_niao > 0 then + local head_info = self._player_info[self:GetPos(p.seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + end + -- self:ShowHuTip() + + if bskip == nil or bskip == false then + self:UpdateCardBox(self:GetPos(room.curren_outcard_seat)) + self._tex_LeftCard.text = room.left_count + self:UpdateRound() + end +end + +function M:PlayerChangeLineState() + -- local isOutCard = true + -- local str = "玩家 " + -- for _ , player in ipairs(self._room.player_list) do + -- if player.line_state == 0 then + -- isOutCard = false + -- end + -- end + -- self._player_card_info[1]._area_handcard_list.touchable = isOutCard +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:__CloseTip() + if self._chipeng_tip then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if self._pop_tip_choice then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +function M:__CloseGangTip() + if self._gang_tip_choice then + self._gang_tip_choice:Dispose() + self._gang_tip_choice = nil + end +end + +function M:closeTipOnTuoguan() + self:__CloseTip() +end + +function M:Destroy() + MJMainView.Destroy(self) + UIPackage.RemovePackage("extend/majiang/jinxi/ui/Extend_MJ_JinXi") +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/jinxi/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/jinxi/EXPlayBackView.lua new file mode 100644 index 00000000..21dfa3e4 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/jinxi/EXPlayBackView.lua @@ -0,0 +1,297 @@ +local MJPlayBackView = require("main.majiang.MJPlayBackView") +local EXRoomConfig = import(".EXRoomConfig") +local EXClearingView = import(".EXClearingView") + +local Record_Event = import(".RecordEvent") + + +local M = {} + +--- Create a new +function M.new() + setmetatable(M, { __index = MJPlayBackView }) + local self = setmetatable({}, { __index = M }) + self.class = "PlayBackView" + self:init() + + return self +end + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/majiang/jinxi/ui/Extend_MJ_JinXi") + MJPlayBackView.InitView(self, "ui://Main_Majiang/Main_" .. room.room_config.people_num) + local _cardbox = self._view:GetChild("cardbox") + --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false + self._ctr_cardbox = _cardbox:GetController("c1") + self._tex_round = self._view:GetChild("tex_round") + self._tex_LeftCard = self._view:GetChild("remaining_card") + self._anchor = self._view:GetChild("mask_tips") + self._eventmap = {} + + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao + self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao + self._cmdmap[Record_Event.Evt_Result] = self.CmdResult +end + +function M:FillRoomData(data) + MJPlayBackView.FillRoomData(self) + if self._win_pic then self._win_pic:Dispose() end + if self._niao then self._niao:Dispose() end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local left_count = data.info.left_card + self:UpdateLeftCard(left_count) + local round = data.info.round + self:UpdateRound(round) + + local roominfo_panel = self._view:GetChild("roominfo_panel1") + roominfo_panel:GetChild("tex_roomid").text = room.room_id + roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + table.sort(p.card_list, ViewUtil.HandCardSort) + card_info:UpdateHandCard(false, true) + self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0 + end + + self:GenerateAllStepData(data) + self:UpdateStep(1) + -- self:ShowStep(0) +end + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateLeftCard(step.left_card) + -- self._ctr_cardbox.selectedIndex = step.current_out_seat + self:UpdateCardBox(self:GetPos(step.current_out_seat)) + self:UpdateStep(index + 1) + if step.cmd ~= Record_Event.Evt_OutCard then + self:RemoveCursor() + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hand_left_count = #p.card_list + info:Clear() + info:ResetFzList() + p.piao_niao = step.player_card_data[i].piao_niao + local head_info = self._player_info[self:GetPos(i)] + if p.piao_niao and p.piao_niao > 0 then + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + else + head_info._view:GetController("piao_niao").selectedIndex = 0 + end + if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil, nil, self._cursor) + else + info:UpdateOutCardList() + end + if step.cmd == Record_Event.Evt_GetCard and p.seat == step.current_out_seat then + info:UpdateHandCard(true, true) + else + info:UpdateHandCard(false, true) + end + end + if step.cmd == Record_Event.Evt_Win then + self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡") + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + else + if self._win_pic then + self._win_pic:Dispose() + end + end + if step.cmd == Record_Event.Evt_Niao then + local niao_list = step.niao + self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_JinXi/Panel_Birds") + local list = self._niao:GetChild("Lst_birds") + list:RemoveChildrenToPool() + for i = 1, #niao_list do + local item = list:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_" .. niao_list[i].card) + if niao_list[i].score > 0 then + item:GetController("bg").selectedIndex = 2 + end + end + self._view:AddChild(self._niao) + self._view:AddChild(self._view:GetChild("panel_record")) + self._niao:Center() + else + if self._niao then + self._niao:Dispose() + end + end + if step.cmd == Record_Event.Evt_Result then + if not self.result then + self.result = EXClearingView.new(self._root_view, true) + self.result:InitData(0, self._room, step.result_data) + self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5 + self.result._view.width = GRoot.inst.width + self.result._view.height = GRoot.inst.height + self.result._view:GetChild("btn_confirm").visible = false + self._anchor:AddChild(self.result._view) + self.result._view.x = self._anchor.x * -1 + self.result._view.y = self._anchor.y * -1 + else + self.result._view.visible = true + end + -- self.result._view:Center() + else + if self.result then + self.result._view.visible = false + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = "" + step.left_card = info.left_card + step.last_out_seat = 0 + step.current_out_seat = 1 + step.win = 0 + step.niao = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.piao_niao = p.piao_niao + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + table.sort(u.card_list, ViewUtil.HandCardSort) + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = 0 + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + for i = 1, #cmd.data.opcard do + list_remove(u.card_list, cmd.data.opcard[i]) + end + local fz = {} + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.opcard = cmd.data.opcard + local uf = data.player_card_data[cmd.data.from_seat] + if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then + table.remove(uf.outcard_list, #uf.outcard_list) + end + if fz.type ~= FZType.Gang_Peng then + u.fz_list[#u.fz_list + 1] = fz + else + for i = 1, #u.fz_list do + if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then + u.fz_list[i].type = FZType.Gang_Peng + end + end + end +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:CmdNiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.niao = cmd.data.niao +end + +function M:CmdPiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.player_card_data[cmd.seat].piao_niao = cmd.data.num +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result_data = cmd.data +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_deep_clone(last_step) + self._step[#self._step + 1] = step + step.result_data = nil + return step +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = "剩余 " .. num .. " 张牌" +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:UpdateRound(round) + self._tex_round.text = "第 " .. round .. "/" .. self._room.room_config.round .. " 局" +end + +function M:UpdateStep(step) + self._record:GetChild("tex_step").text = "第 " .. step .. " / " .. #self._step .. "步" +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/jinxi/EXPlayer.lua b/lua_probject/extend_project/extend/majiang/jinxi/EXPlayer.lua new file mode 100644 index 00000000..fd26822b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/jinxi/EXPlayer.lua @@ -0,0 +1,36 @@ + + +local EXPlayer = { + auto, + -- 手牌列表 + hand_cards = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/jinxi/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/majiang/jinxi/EXPlayerInfoView.lua new file mode 100644 index 00000000..f8a5fd69 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/jinxi/EXPlayerInfoView.lua @@ -0,0 +1,76 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + +function M:init() + PlayerInfoView.init(self) + self._tex_score = self._view:GetChild("info"):GetChild("tex_score1") + self._tex_score2 = self._view:GetChild("info"):GetChild("tex_score2") + self._ct_score = self._view:GetChild("info"):GetController("score") +end + +function M:ShowInteraction(type,str) + if type == 3 then + Voice.DownLoad(str, function(clip) + if (clip ) then + self:ShowMaskVoice(clip.length) + GameApplication.Instance:PlayVoice(clip) + end + end) + elseif type == 4 then + self:SetChat(str) + elseif type == 2 then + local chat_index = tonumber(str) + self._main_view:PlayChatSound(self._player.self_user.sex,chat_index) + local language, index = self._main_view:GetChatMsgLanguage(chat_index) + self:SetChat(self._main_view.Fix_Msg_Chat[index]) + elseif type == 1 then + self:SetBiaoqing("ui://Chat/"..str) + end +end + +function M:UpdateRemainCard(card_num, hide) + if hide then + self._view:GetController("show_remain").selectedIndex = 0 + else + self._view:GetController("show_remain").selectedIndex = 1 + end + self._view:GetChild("com_remain"):GetChild("tex_remain").text = card_num +end + +function M:FillData(player) + PlayerInfoView.FillData(self, player) + self:UpdateScore(player.total_score) +end + +function M:UpdateScore() + local score = self._player.total_score + local room = DataManager.CurrenRoom + if room:checkHpNonnegative() then + score = d2ad(self._player.cur_hp) + end + if not score then + score = 0 + end + if score < 0 then + self._ct_score.selectedIndex = 1 + self._tex_score2.text = score + else + self._ct_score.selectedIndex = 0 + if not room:checkHpNonnegative() then + score = "+" .. score + end + self._tex_score.text = score + end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/jinxi/EXRoomConfig.lua b/lua_probject/extend_project/extend/majiang/jinxi/EXRoomConfig.lua new file mode 100644 index 00000000..818b310b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/jinxi/EXRoomConfig.lua @@ -0,0 +1,152 @@ +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M, { __index = RoomConfig }) + local self = setmetatable({}, { __index = M }) + RoomConfig.init(self, config) + self.config = config + self.class = "RoomConfig" + self.round = config["times"] + self.maxPlayers = config["maxPlayers"] + self.fengding = config["fengding"] + self.wanfa = config["wanfa"] + self.qiduijiafan = config["qiduijiafan"] + self.shoudailongjiafan = config["shoudailongjiafan"] + self.loudilongjiafan = config["loudilongjiafan"] + self.bunengchi = config["bunengchi"] + + return self +end + +function M:GetDes(sp) + sp = sp or " " + local count = 0 + local str = self.round and self.round .. "局" .. " " or "" + str = str .. RoomConfig.GetDes(self, sp) .. "\n" + + + if (self.fengding) then + str = str .. "封顶" + count = count + 1 + if count % 2 == 0 then + str = str .. "\n" + else + sp1 = "" + local strL = 2 + for i = 1, strL do + sp1 = sp1 .. " " + end + str = str .. sp1 .. sp + end + end + + if (self.qiduijiafan) then + local strL = 2 + str = str .. "可胡七对" + if self.qiduijiafan then + str = str .. "翻倍" + strL = 0 + end + count = count + 1 + if count % 2 == 0 then + str = str .. "\n" + else + sp1 = "" + for i = 1, strL do + sp1 = sp1 .. " " + end + str = str .. sp1 .. sp + end + end + + + if self.shoudailongjiafan then + str = str .. "手逮龙加番" + count = count + 1 + if count % 2 == 0 then + str = str .. "\n" + else + sp1 = "" + local strL = 2 + for i = 1, strL do + sp1 = sp1 .. " " + end + str = str .. sp1 .. sp + end + end + + if self.loudilongjiafan then + str = str .. "落地龙" + count = count + 1 + if count % 2 == 0 then + str = str .. "\n" + else + sp1 = "" + local strL = 3 + for i = 1, strL do + sp1 = sp1 .. " " + end + str = str .. sp1 .. sp + end + end + + if self.bunengchi then + str = str .. "不能吃" + count = count + 1 + if count % 2 == 0 then + str = str .. "\n" + else + sp1 = "" + local strL = 3 + for i = 1, strL do + sp1 = sp1 .. " " + end + str = str .. sp1 .. sp + end + end + + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + +function M:GetDes2(sp) + sp = sp or " " + local str = RoomConfig.GetDes(self, sp) + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + + + + + if (self.qiduijiafan) then + str = str .. "可胡七对" + if self.qiduijiafan then + str = str .. "-翻倍" + end + str = str .. sp + end + + + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + +function M:GetGameJS() + local gamerulepanel = UIPackage.CreateObjectFromURL("ui://Extend_MJ_JinXi/gamerule") + return gamerulepanel +end + +function M:GetGameSMSize() + return 467, 500 +end + +function M:GetGameName() + return "个旧麻将" +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/jinxi/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/jinxi/ExtendConfig.lua new file mode 100644 index 00000000..66751b58 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/jinxi/ExtendConfig.lua @@ -0,0 +1,173 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import(".EXGameInfo") +local EXMainView = import(".EXMainView") +local EXGameController = import(".EXGameController") +local EXRoomConfig = import(".EXRoomConfig") +local EXPlayBackView = import(".EXPlayBackView") +local MJRoom = require("main.majiang.MJRoom") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, { __index = IExtendConfig }) + local self = setmetatable({}, { __index = M }) + self.class = "ExtendConfig" + self.extend_id = 33 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/majiang/jinxi/ui/Info_MJ_JinXi") + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage("extend/majiang/jinxi/ui/Extend_MJ_JinXi") + ResourcesManager.UnLoadGroup("JinXi_MJ") +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return MJRoom.new() +end + +function M:FillRoomConfig(room, _config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + + + local reload = s2croom["reload"] + local _tableInfo = s2croom["tableInfo"] + + local _config = _tableInfo["config"] + + pt(_config) + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo["playerData"] + room.curren_round = _tableInfo["round"] + self:FillPlayerData(playerList) + + if (reload) then + local _reloadInfo = s2croom["reloadInfo"] + local _hand_card = _reloadInfo["hand_card"] + room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + + local active_seat = _reloadInfo["active_seat"] + local bank_seat = _reloadInfo["banker_seat"] + local playing = _reloadInfo["playing"] + local _info_list = _reloadInfo["info_list"] + local last_outcard_seat = _reloadInfo["last_outcard_seat"] + room.left_count = _reloadInfo["left_card"] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo["curren_outcard_seat"] + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i = 1, #_info_list do + local tem = _info_list[i] + local playerid = tem["playerid"] + local p = room:GetPlayerById(playerid) + local outcard_list = tem["outcard_list"] + p.outcard_list = outcard_list + p.total_score = tem["score"] + p.hand_left_count = tem["card_count"] + p.piao_niao = tem["piao_niao"] or 0 + local opcard = tem["opcard"] + for k = 1, #opcard do + local op = opcard[k] + local fz = {} + fz.type = op["type"] + fz.card = op["card"] + p.fz_list[#p.fz_list + 1] = fz + end + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.left_count = _tableInfo["left_card"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + + local _info_list = _tableInfo["playerData"] + for i = 1, #_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + p.piao_niao = _jp["piao_niao"] + -- print(DataManager.SelfUser.account_id,pid) + -- if (278 == pid) then + -- room.self_player = p + -- p.self_user = DataManager.SelfUser + -- else + if p.seat == 1 then room.self_player = p end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.card_list = _hand_card + --room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + p.total_score = _jp["score"] + p.hand_left_count = #_hand_card + if _jp.hp_info then + room.room_config.isNonnegative = 1 + p.cur_hp = _jp.hp_info.cur_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/jinxi/GameEvent.lua b/lua_probject/extend_project/extend/majiang/jinxi/GameEvent.lua new file mode 100644 index 00000000..9180694e --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/jinxi/GameEvent.lua @@ -0,0 +1,37 @@ + +local TX_GameEvent = { + -- 发牌 + SendCards = "SendCards", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + EventNiao = "EventNiao", + + EvnetPiaoTip = "EvnetPiaoTip", + + EvnetPiao = "EvnetPiao", + + + --- + SendLaiZi="SendLaiZi", + SendGangZi = "SendGangZi", + EventBuGang = "EventBuGang", + +} +return TX_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/jinxi/MJPlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/majiang/jinxi/MJPlayerSelfCardInfoView.lua new file mode 100644 index 00000000..72d1d092 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/jinxi/MJPlayerSelfCardInfoView.lua @@ -0,0 +1,213 @@ +local MJPlayerSelfCardInfoView = require("main.majiang.MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local CardCheck = import(".CardCheck") + +local M = {} +-- +function M.new(view,mainView) + setmetatable(MJPlayerSelfCardInfoView, {__index = MJPlayerCardInfoView}) + setmetatable(M, {__index = MJPlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:ShowHuTip(card_list) + printlog("ShowHuTip") + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + for i=1,#DataManager.CurrenRoom.laiziInfo do + if IsHasDictionary(DataManager.CurrenRoom.laiziInfo[i],tingList)==false then + table.insert(tingList,DataManager.CurrenRoom.laiziInfo[i] ) + end + end + end + + end + self._mainView._hu_tip:FillData(tingList) +end + +function M:UpdateHandCard(getcard, mp) + MJPlayerSelfCardInfoView.UpdateHandCard(self, getcard, mp) + local _carViewList = self._carViewList + + if DataManager.CurrenRoom.laiziInfo and #self._carViewList>0 then + for i=1,#self._carViewList do + local obj=self._carViewList[i] + if obj and obj.card then + if IsHasDictionary(obj.card_item,DataManager.CurrenRoom.laiziInfo) then + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=1 + end + + end + else + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=0 + end + end + end + + end + end + + + end + + + local card_list = DataManager.CurrenRoom.self_player.card_list + self:ShowHuTip(card_list) + if getcard then + self._out_card = true + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + -- 记录需要标记听牌提示的牌 + local lst_mark = {} + local total_num = 0 + for i = 1, #_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + list_remove(card_list, card) + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + local count = 0 + for j = 1, #tingList do + count = count + self._mainView:CountCardLeftNum(tingList[j]) + end + local tem = {} + tem.item = btn + tem.count = count + total_num = total_num + count + table.insert(lst_mark, tem) + end + table.insert(card_list, card) + end + table.sort(lst_mark, function(a, b) + return a.count > b.count + end) + -- 如果几张牌的可胡牌数一致,也只显示'三角',可胡牌数不一致才显示'多' + local all_same = #lst_mark ~= 0 and lst_mark[1].count == total_num / #lst_mark or false + for i = 1, #lst_mark do + local tem = lst_mark[i] + if all_same or tem.count < lst_mark[1].count then + tem.item:GetController("mark_ting").selectedIndex = 1 + else + tem.item:GetController("mark_ting").selectedIndex = 2 + end + end + else + for i = 1, #_carViewList do + local btn = _carViewList[i].card + if btn:GetController("mark_ting").selectedIndex ~= 0 then + btn:GetController("mark_ting").selectedIndex = 0 + end + end + self._out_card = false + end + +end + +function M:__OnClickHandCard(context) + local button = context.sender + local _carViewList = self._carViewList + local refresh = true + local card_list = {} + for i=1,#_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + if btn ~= button and btn.selected == true then + if button.data.card_item == card then + refresh = false + else + self._mainView:markOutCards(false, card) + end + btn.selected = false + end + if not btn.selected then + table.insert(card_list, card) + end + end + + if self._out_card then + self:ShowHuTip(card_list) + end + + -- 标记出牌 + if refresh then + if button.selected then + self._mainView:markOutCards(true, button.data.card_item) + else + self._mainView:markOutCards(false, button.data.card_item) + end + end + + local _room = DataManager.CurrenRoom + if not button.selected and _room.curren_outcard_seat == _room.self_player.seat then + local card = button.data + self._mainView:OutCard(card.card_item) + end +end + +function M:__OnDragStart(card) + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + list_remove(card_list, card) + self:ShowHuTip(card_list) +end + +function M:__OnDragEnd(context) + if self.outcard_button then + self.outcard_button:Dispose() + self.outcard_button = nil + end + local button = context.sender + + --button:RemoveFromParent() + local card = button.data + local _room = DataManager.CurrenRoom + + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + if (button.y - card.old_postion.y < -50 and _room.curren_outcard_seat == _room.self_player.seat and card.card_item ~= 0) then + self._mainView:OutCard(card.card_item) + button.touchable = false + self.outcard_button = button + else + self._area_handcard_list:AddChildAt(button, card.index) + button:TweenMove(card.old_postion, 0.2) + end +end + +function M:CheckPlayerOnlineState() + local room = DataManager.CurrenRoom + for i = 1, #room.player_list do + if room.player_list[i].line_state == 0 then + return false + end + end + return true +end +function M:Clear(bskip) + --self._ctr_state.selectedIndex = 0 + self._area_fz_list.x = self._src_fz_list.x + self._area_fz_list.y = self._src_fz_list.y + self._area_fz_list.width = self._src_fz_list.z + self._area_fz_list.height = self._src_fz_list.w + + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_outcard_list:RemoveChildren(0, -1, true) + if bskip == nil or bskip == false then + self._mask_liangpai:RemoveChildren(0, -1, true) + end + + for i=1,#self._carViewList do + self._carViewList[i].card:Dispose() + end + self._carViewList = {} + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/jinxi/Protocol.lua b/lua_probject/extend_project/extend/majiang/jinxi/Protocol.lua new file mode 100644 index 00000000..4df49454 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/jinxi/Protocol.lua @@ -0,0 +1,52 @@ +local Protocol = { + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌 + GAME_DIS_CARD = "611", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- 提示选择行为 + GAME_ACTION = "612", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 小结算 + GAME_EVT_RESULT1 = "817", + + -- 大结算 + GAME_EVT_RESULT2 = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + + -- 抓鸟事件 + GAME_EVT_NIAO = "821", + + -- 飘鸟提示 + GAME_EVT_PIAOTIP = "833", + + -- 飘鸟事件 + GAME_EVT_PIAO = "834", + + GAME_EVT_GANGZI = "837", + GAME_EVT_BUGANG = "838", + GAME_EVT_DOGANG = "839", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/jinxi/RecordEvent.lua b/lua_probject/extend_project/extend/majiang/jinxi/RecordEvent.lua new file mode 100644 index 00000000..09748550 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/jinxi/RecordEvent.lua @@ -0,0 +1,11 @@ +local Record_Event = { + Evt_GetCard = "GetCard", + Evt_OutCard = "OutCard", + Evt_Action = "Action", + Evt_Win = "Win", + Evt_Niao = "Niao", + Evt_Piao = "PiaoNiao", + Evt_Result = "Result", +} + +return Record_Event \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/lichuan/CS_Win_Type.lua b/lua_probject/extend_project/extend/majiang/lichuan/CS_Win_Type.lua new file mode 100644 index 00000000..ef287d99 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/lichuan/CS_Win_Type.lua @@ -0,0 +1,40 @@ +local CS_Win_Type = { + "点炮", + "平胡", + "小七对", + "一般高", + "七星", + "龙夹背", + "清大对", + "七星一般高", + "双龙夹背", + "三龙夹背", + "十老头", + "塘子十三ㄠ", + "塘子小七对", + "大对子", + "烂牌", + "一条龙", + "落地龙", + "混一色", + "庄家", + "清一色", + "字一色", + "抢杠胡", + "杠上开花", + "杠上炮", + "双杠花", + "双杠上炮", + "三杠花", + "三杠上炮", + "四杠花", + "四杠上炮", + "塘子七星", + "塘子一般高", + "塘子七星一般高", + "塘子烂牌", + "闲家", + "塘子胡", +} +return CS_Win_Type + diff --git a/lua_probject/extend_project/extend/majiang/lichuan/CardCheck.lua b/lua_probject/extend_project/extend/majiang/lichuan/CardCheck.lua new file mode 100644 index 00000000..71dd7f8e --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/lichuan/CardCheck.lua @@ -0,0 +1,378 @@ +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + num = num == nil and 1 or num + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if(result ==num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local zhongid = 0 + + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + zhong_count = 0, + qidui = false, + hongzhong_count = 0, + qidui_pari_count = 0 +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + if (card == zhongid) then + self.zhong_count = self.zhong_count +1 + else + self.cardList[#self.cardList + 1] = card + end + end + table.sort(self.cardList) +end + +function M:tryShunzi(card) + if (card < 400 and card % 100 > 7) then + return false + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryKezi(card) + if (checkCardAndRomve(card, self.cardList, 3)) then + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (checkCardAndRomve(card, self.cardList, 2)) then + local cardGroup = {card,card} + self:push(cardGroup) + self.pair_count = 1 + return true + end + return false +end + + +function M:tryKezi1Zhong(card) + if (self.zhong_count >= 1 and checkCardAndRomve(card, self.cardList,2)) then + local cardGroup = {card,card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + return true + end + return false +end + +function M:tryKezi2Zhong(card) + if (self.zhong_count >= 2 and checkCardAndRomve(card, self.cardList,1)) then + local cardGroup = {card,zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + return true + end + return false +end + +function M:tryShunzi1Zhong(card) + if (card % 100 > 8) then + return false + end + + if (self.zhong_count < 1) then + return false + end + + if (checkCard(card + 1, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,card+1,zhongid} + self:push(cardGroup) + return true + end + + if (checkCard(card + 2, self.cardList) and ((card + 1) % 100 ~= 0)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 2, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,zhongid,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair1Zhong(card) + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 1) then + return false + end + removeCard(self.cardList, card, 1) + local cardGroup = {card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + self.pair_count = 1 + return true +end + +function M:tryPair2Zhong() + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 2) then + return false + end + local cardGroup = {zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + self.pair_count = 1 + return true +end + +function M:tryWin() + if (self.zhong_count == 4 and not self.eight_laizi) or (self.zhong_count == 8 and self.eight_laizi) then + return true + end + if (#self.cardList == 0 and self.pair_count == 1) then + return true + end + if (#self.cardList == 0 and self.pair_count == 0) then + return self:tryPair2Zhong() + end + + if (#self.cardList == 0) then + return false + end + + local activeCard = self.cardList[1] + if (self:tryPair(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + + if (self:tryKezi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi2Zhong(activeCard)) then + + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryPair1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + return false +end + +function M:checkQidui() + if (not self.qidui) then + return false + end + if ((#self.cardList + self.zhong_count) ~= 14) then + return false + end + local cardList = membe_clone(self.cardList) + self.qidui_pari_count = 0 + self.hongzhong_count = self.zhong_count + return self:isQdPari(cardList) +end + +function M:isQdPari(cardList) + if(self.qidui_pari_count == 7) then + return true + end + if (#cardList== 0) then + return true + end + local card = cardList[1] + if (cardNum(card, cardList) >= 2) then + removeCard(cardList, card, 2) + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + + if (self.hongzhong_count > 0) then + removeCard(cardList, card, 1) + self.hongzhong_count = self.hongzhong_count - 1 + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + return false +end + +local function init(self,cardInhand,addCard,isZhong,qidui,eightLaizi) + self.stack = {} + self.pair_count = 0 + self.cardList = membe_clone(cardInhand) + self.qidui = qidui + self.eight_laizi = eightLaizi + self.cardList[#self.cardList+1] = addCard + if (isZhong) then + self.zhong_count = cardNum(zhongid, self.cardList) + removeCard(self.cardList, zhongid, self.zhong_count) + end + table.sort(self.cardList) + --printlog("添加排序====>>>") + --pt(self.cardList) + return self:checkQidui() or self:tryWin() +end + +local specialCardList={400,403,406,409,412,415,418} +function M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + --printlog("isZhong",isZhong) + --printlog("qidui",qidui) + --printlog("eightLaizi",eightLaizi) + --pt(cardInhand) + local self = setmetatable({}, {__index = M}) + local tingList = {} + if not cardInhand or #cardInhand == 0 then + return tingList + end + for k=100,300,100 do + for i=1,9 do + local tem = k + i + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + --printlog("返回结果为===>>>",result) + if(result) then + tingList[#tingList + 1] = tem + end + end + end + + for j=1,#specialCardList do + local tem = specialCardList[j] + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + if(result) then + tingList[#tingList + 1] = tem + end + end + + return tingList +end + +function M.MuiltiplteCaculateTingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + zhongid=DataManager.CurrenRoom.laiziInfo[1] + local tempTingList2={} + local tempTingList1=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo[2] then + zhongid=DataManager.CurrenRoom.laiziInfo[2] + tempTingList2=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + zhongid=DataManager.CurrenRoom.laiziInfo[1] + end + local currentTingList={} + if #tempTingList1>0 and #tempTingList2>0 then + currentTingList=CombineDictionaryAndRemoveSomeItem(tempTingList1,tempTingList2) + elseif #tempTingList1>0 then + currentTingList=tempTingList1 + elseif #tempTingList2>0 then + currentTingList=tempTingList2 + end + + return currentTingList + + else + zhongid=0 + return M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + end + +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXClearingView.lua new file mode 100644 index 00000000..e4bd30a6 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXClearingView.lua @@ -0,0 +1,615 @@ +require("Game.View.ResultView") +local Hu_Type_Name = import(".CS_Win_Type") + +local EXClearingView = {} + +local M = EXClearingView + +function EXClearingView.new(blur_view) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self._full = true + ResultView.init(self, "ui://Main_Majiang/clearing") + + self._currenIndex = 0 + self._blur_view = blur_view + self._close_zone = false + self:InitMaPai() + + return self +end + +function M:InitMaPai() + self.maPaiCtr=self._view:GetController("mapai") + self.maPaiCtr.selectedIndex=0 + + self.maPaiList={} + + for i=1,8 do + local tempMP=self._view:GetChild("niao"..i) + table.insert(self.maPaiList,tempMP) + end + +end + + +function M:IsMapaiShow(niao,isShow) + if niao then + niao.visible=isShow + end +end + + +function M:SetMaPaiValue(niao,value) + if niao then + niao.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..value + end +end + +function M:SetMaPaiColor(niao,num) + niao:GetController("color").selectedIndex=num +end + +function M:HideAllMapai() + for i=1,#self.maPaiList do + self:IsMapaiShow(self.maPaiList[i],false) + self:SetMaPaiColor(self.maPaiList[i],0) + end +end + + + +function M:ShowSelectMaPai(niaoList) + if niaoList and #niaoList>0 then + self.maPaiCtr.selectedIndex=1 + self:HideAllMapai() + for i=1,#niaoList do + self:IsMapaiShow(self.maPaiList[i],true) + self:SetMaPaiValue(self.maPaiList[i],niaoList[i].card) + if niaoList[i].score>0 then + self:SetMaPaiColor(self.maPaiList[i],2) + end + end + else + self.maPaiCtr.selectedIndex=0 + end +end + + + +function M:CalculatePaixingInfo(result) + self.WinList={} + if result.info_list and #result.info_list>0 then + for i=1,#result.info_list do + if result.info_list[i].win_list and #result.info_list[i].win_list>0 then + table.insert(self.WinList,result.info_list[i].win_list) + end + end + end + + printlog("牌型列表====>>>") + pt(self.WinList) +end + + +function M:SetPaixingxiangqing(num) + for i=1,#self.PaiXingXiangQingCtrList do + if self.PaiXingXiangQingCtrList[i] then + self.PaiXingXiangQingCtrList[i].selectedIndex=num + end + end +end + + + +function M:InitData(over, room, result, total_result, callback) + + self._callback = callback + local _overCtr = self._view:GetController("over") + local btn_confirm = self._view:GetChild("btn_confirm") + local btn_result = self._view:GetChild("btn_showResult") + local btn_close = self._view:GetChild("big_result"):GetChild("btn_close") + local _btnCtr = self._view:GetController("button") + local _sdkCtr = self._view:GetController("sdk") + local ctr_type = self._view:GetController("type") + + self._view:GetChild("tex_roominfo").text = string.format("房号%s 局%s/%s %s", room.room_id, room.curren_round, room.room_config.round, os.date("%Y-%m-%d %H:%M:%S", os.time())) + self._view:GetChild("tex_gameinfo").text = string.gsub(room.room_config:GetDes2(), "\r", "") + + if result then + self:ShowSelectMaPai(result.niao) + self:CalculatePaixingInfo(result) + end + + self.PaiXingXiangQingCtrList={} + + local paixingxiangqing=self._view:GetChild("btn_detal") + local fanhuipaixing=self._view:GetChild("btn_fanhuipaixing") + fanhuipaixing.visible=false + paixingxiangqing.visible=true + paixingxiangqing.onClick:Add(function() + paixingxiangqing.visible=false + fanhuipaixing.visible=true + self:SetPaixingxiangqing(1) + end) + fanhuipaixing.onClick:Add(function() + paixingxiangqing.visible=true + fanhuipaixing.visible=false + self:SetPaixingxiangqing(0) + end) + + + if over ~= 2 then + if result.liuju then + ctr_type.selectedIndex = 3 + else + local info_list = result.info_list + for i = 1, #info_list do + local is_win = info_list[i].is_win + if is_win then + if info_list[i].seat == room.self_player.seat then + ctr_type.selectedIndex = 1 + else + ctr_type.selectedIndex = 2 + end + end + end + end + + if over == 0 then + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + btn_confirm.onClick:Add(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:DestroyWithCallback() + end) + self:AddClearItem(room, result.info_list, nil, over, result.niao, result.active_player) + elseif over == 1 then + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add(function() + self.maPaiCtr.selectedIndex=0 + _overCtr.selectedIndex = 1 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + if self._qsinfo_view then + self._qsinfo_view:Dispose() + end + end) + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + + self:AddClearItem(room, result.info_list, total_result.info_list, over, result.niao, result.active_player) + end + else + _overCtr.selectedIndex = 1 + self.maPaiCtr.selectedIndex=0 + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + + self:AddClearItem(room, nil, total_result.info_list, over) + end +end + +function M:AddClearItem(room, data, total_data,over, niao, active_player) + local n = over + 1 + local list_view1 = self._view:GetChild("player_list_1") + local list_view2 = self._view:GetChild("player_list_2") + + if 0 == over or 1 == over then + table.sort(data, function(a,b) return a.seat < b.seat end) + list_view1:RemoveChildrenToPool() + + for i=1,#data do + local item = list_view1:AddItemFromPool() + self:FillItemData(room, data[i], item, active_player, niao) + end + if #data == 3 then + list_view1.lineGap = 54 + elseif #data == 2 then + list_view1.lineGap = 108 + end + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end +end + +function M:FillItemData(room, data, item, active_player, niao) + + local _gamectr = ControllerManager.GetController(GameController) + local p = room:GetPlayerBySeat(data["seat"]) + item:GetChild("playerName").text = p.self_user.nick_name + item:GetChild("lab_hp").text=""--抓马 + local user = room:GetPlayerBySeat(data["seat"]).self_user + local head = item:GetChild('head'):GetChild('n4') + ImageLoad.Load(user.head_url, head) + + -- 手牌 + local hand_cards = data["hand_card"] + table.sort( hand_cards, ViewUtil.HandCardSort) + local hand_list_view = item:GetChild("hand_card_list") + hand_list_view:RemoveChildrenToPool() + for i=1,#hand_cards do + local card = hand_list_view:AddItemFromPool() + card.icon = "ui://Main_Majiang/202_"..hand_cards[i] + end + hand_list_view.width = 52 * #hand_cards + + local fz_card = p.fz_list + local fz_card_list = item:GetChild("fz_card_list") + fz_card_list.width = 157 * #fz_card * 0.8 + fz_card_list:RemoveChildrenToPool() + + for i=1,#fz_card do + if fz_card[i].type == FZType.Peng then + + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j=1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + elseif fz_card[i].type == FZType.Chi then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j = 1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/" .. self:GetPrefix().."202_"..fz_card[i].opcard[j] + end + elseif fz_card[i].type == FZType.Gang or fz_card[i].type == FZType.Gang_An or fz_card[i].type == FZType.Gang_Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_4") + for j=1,4 do + local card = item:GetChild("card_" .. j) + if fz_card[i].type == FZType.Gang_An and j == 4 then + card.icon = "ui://Main_Majiang/202_00" + else + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + end + end + end + + local huadd = data["hu_score"] + local gangadd = data["gang_score"] + local total = data["round_score"] + local geng_zhuan=data["geng_zhuan"] + local sp = " " + local str = "胡:"..huadd.."分" + str = str..sp.."杠:"..gangadd.."分" + + + + + + item:GetChild("score1").text = str + -- local total_score = data["total_score"] + if total >= 0 then + item:GetChild("score2").text = "+"..total + item:GetChild("score2").grayed = false + else + item:GetChild("score2").text = total + item:GetChild("score2").grayed = true + end + + + --计算牌型 + local totalPeson=DataManager.CurrenRoom.room_config.people_num-1 + local win_list = data["win_list"] + local is_win = data["is_win"] or false + local str1="" + sp="、" + if is_win then + if win_list then + if DataManager.CurrenRoom.isZiMoHu then + str1="自摸" + else + str1="接炮" + end + for i=1,#win_list do + local huName=Hu_Type_Name[win_list[i].type] + if huName then + str1=str1..sp..huName.."x"..win_list[i].score + end + + end + str1=str1.." +"..huadd.."分" + end + + else + printlog("输家============") + if DataManager.CurrenRoom.isZiMoHu then + printlog("自摸处理============") + --str1="" + if #self.WinList==1 then + for i=1,#self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + if j==1 then + str1=str1..huName.."x"..self.WinList[i][j].score + else + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + + end + end + + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + else + printlog("非自摸处理====>>>") + --点炮 一炮多响 + local yipaoduoxiang=false + if #self.WinList>1 then + yipaoduoxiang=true + end + + if yipaoduoxiang then + printlog("一炮多响====>>>") + str="点炮" + local allTypeList={} + local isHas=false + for i=1,#self.WinList do + for j=1,#self.WinList[i] do + isHas=IsHasDictionary(self.WinList[i][j].type,allTypeList) + if isHas==false then + table.insert(allTypeList,self.WinList[i][j].type) + end + end + + end + + if #allTypeList>0 then + for i=1,#allTypeList do + local huName=Hu_Type_Name[allTypeList[i]] + if huName then + str1=str1..huName.."、" + end + end + str1=str1.." "..huadd.."分" + end + + else + + if p.self_user.account_id == active_player and is_win == false and not data["liuju"] then + str1="点炮" + if #self.WinList==1 then + for i=1,# self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + end + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + end + + end + + + end + end + + -- + printlog("牌型计算==>>>",str1) + + if data["ming_gang_num"]>0 then + str1=str1.." 明杠x"..data["ming_gang_num"] + end + + if data["an_gang_num"]>0 then + str1=str1.." 暗杠x"..data["an_gang_num"] + end + + if data["dian_gang_num"]>0 then + str1=str1.." 点杠x"..data["dian_gang_num"] + end + + if gangadd~=0 then + if gangadd>0 then + str1=str1.." +"..gangadd.."分" + else + str1=str1.." "..gangadd.."分" + end + + end + + if data["ma_geng_gong"] and data["ma_geng_gong"]~=0 then + if data["ma_geng_gong"]>0 then + str1 = str1.." 马跟杠:+"..data["ma_geng_gong"].."分" + else + str1 = str1.." 马跟杠:"..data["ma_geng_gong"].."分" + end + + end + + if geng_zhuan and geng_zhuan~=0 then + if geng_zhuan>0 then + str1 = str1.." 跟庄:+"..geng_zhuan.."分" + else + str1 = str1.." 跟庄:"..geng_zhuan.."分" + end + + end + + + + + + item:GetChild("score3").text=str1 + item:GetChild("score4").text=str1 + local paixingCtr=item:GetController("detail") + table.insert(self.PaiXingXiangQingCtrList,paixingCtr) + ------------------------- + + local hp_nonnegative = room:checkHpNonnegative() + item:GetController("nonnegative").selectedIndex = hp_nonnegative and 1 or 0 + if hp_nonnegative then + local hp_info = data.hp_info + local ctr_hp_limit = item:GetController("hp_limit") + local hp = d2ad(hp_info.round_actual_hp) + if hp >= 0 then hp = "+" .. tostring(hp) end + item:GetChild("tex_hp").text = hp + ctr_hp_limit.selectedIndex = hp_info.upper_limit and 1 or 0 + end + + + item:GetController("win").selectedIndex = is_win and 0 or 1 + if p.self_user.account_id == active_player and is_win == false and total < 0 then + item:GetController("win").selectedIndex = 2 + end + + if is_win then + item:GetController("bg").selectedIndex=1 + else + item:GetController("bg").selectedIndex=0 + end + local win_card = item:GetChild("win_card") + win_card.icon = "ui://Main_Majiang/202_"..data["win_card"] + + if niao and #niao>0 then + local currentNiaoList=self:CalculateNiao(niao ,data["seat"]) + if currentNiaoList and #currentNiaoList>0 then + local lst_niao = item:GetChild("list_niao") + lst_niao:RemoveChildrenToPool() + for i = 1, #currentNiaoList do + if currentNiaoList[i].score > 0 then + local card_niao = lst_niao:AddItemFromPool() + card_niao.icon = "ui://Main_Majiang/202_" .. currentNiaoList[i].card + end + end + end + end + + + + if p.seat == room.banker_seat then + item:GetController("bank").selectedIndex = 1 + end +end + +function M:CalculateNiao(niaoList,seat) + local tempNiao={} + for i=1,#niaoList do + if niaoList[i].seat==seat then + table.insert(tempNiao,niaoList[i]) + end + end + return tempNiao +end + + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + player_list[i].id = user.account_id + player_list[i].hp_info = data[i].hp_info + player_list[i].score = data[i].total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + + local settle_log = data[i].settle_log + player_list[i].param = {} + player_list[i].param[1]={} + player_list[i].param[1].key = "自摸次数:" + player_list[i].param[1].value = tostring(data[i].settle_log.zimo) + player_list[i].param[2]={} + player_list[i].param[2].key = "接炮次数:" + player_list[i].param[2].value = tostring(data[i].settle_log.jie_pao) + player_list[i].param[3]={} + player_list[i].param[3].key = "点炮次数:" + player_list[i].param[3].value = tostring(data[i].settle_log.dian_pao) + player_list[i].param[4]={} + player_list[i].param[4].key = "暗杠次数:" + player_list[i].param[4].value = tostring(data[i].settle_log.an_kong) + player_list[i].param[5]={} + player_list[i].param[5].key = "明杠次数:" + player_list[i].param[5].value = tostring(data[i].settle_log.ming_kong) + end + + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + local big_result = self._view:GetChild("big_result") + big_result:GetChild("txt_room_info").text = string.format("%s 房号%s 局%s/%s", os.date("%Y/%m/%d", os.time()), room.room_id, room.curren_round, room.room_config.round) + local lst_p = big_result:GetChild("player_list") + if #player_list == 3 then + lst_p.columnGap = 108 + elseif #player_list == 2 then + lst_p.columnGap = 208 + end + + self:InitBigResult(room, 30) + local show_detail = room.hpOnOff == 1 + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + com_p:GetController("jsicon").selectedIndex=i-1 + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + if show_detail then + local score = 0 + if com_p:GetController("pn").selectedIndex == 0 then + score = com_p:GetChild("txt_navigate").text + else + score = com_p:GetChild("txt_positive").text + end + score = score / room.score_times + com_p:GetChild("tex_detail_score").text = string.format("%s × %s倍", score, room.score_times) + end + end + + if room.group_id ~= 0 then + big_result:GetController("group").selectedIndex = 1 + end + DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild("btn_head") + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= "" then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end + +local prefix +function M:GetPrefix() + -- if not prefix then + prefix = get_majiang_prefix(10) + -- end + return prefix +end + +function M:DestroyWithCallback() + if self._callback then + self._callback() + end + self:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXGameController.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXGameController.lua new file mode 100644 index 00000000..cf8bb7b1 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXGameController.lua @@ -0,0 +1,386 @@ +local TX_Protocol = import(".Protocol") +local FZTipList = require("main.majiang.FZData") +local TX_GameEvent = import(".GameEvent") + +local M = {} + +--- Create a new GameController +function M.new() + setmetatable(M,{__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("南城麻将") + self.class = "TX_GameController" + return self +end + +function M:init(name) + GameController.init(self,name) + + self._eventmap[TX_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[TX_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[TX_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[TX_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[TX_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[TX_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + self._eventmap[TX_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[TX_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[TX_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[TX_Protocol.GAME_EVT_RESULT2] = self.OnEventResult2 + self._eventmap[TX_Protocol.GAME_EVT_NIAO] = self.OnEventNiao + self._eventmap[TX_Protocol.GAME_EVT_PIAOTIP] = self.OnEventPiaoTip + self._eventmap[TX_Protocol.GAME_EVT_PIAO] = self.OnEventPiao + + self._eventmap[TX_Protocol.GAME_EVT_GANGZI] = self.OnEventGangCards + self._eventmap[TX_Protocol.GAME_EVT_BUGANG] = self.OnEventBuGang + +end + +local __pre_delete_card = false +-- 发送出牌指令到服务器 +function M:SendOutCard(card, callback) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_DIS_CARD, _data) + + -- 进行预删牌处理 + local p = _room.self_player + _room.curren_outcard_seat = -1 + list_remove(p.card_list,card) + table.sort(p.card_list, ViewUtil.HandCardSort) + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + __pre_delete_card = true + callback() +end + +function M:SendGangCard(card) + local _data = {} + _data["card"] = card + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_EVT_DOGANG, _data) +end + + +function M:OnEventGangCards(evt_data) + printlog("OnEventGangCards") + pt(evt_data) + DispatchEvent(self._dispatcher,TX_GameEvent.SendGangZi,evt_data["gangzi1"],evt_data["gangzi2"],evt_data["gangnum"],true ) +end + +function M:OnEventBuGang(evt_data) + printlog("OnEventBuGang") + pt(evt_data) + DispatchEvent(self._dispatcher,TX_GameEvent.EventBuGang,evt_data["info"][1],evt_data["info"][2],true ) +end + +-- 发送放子选择到服务器 +function M:SendAction(id) + local _data = {} + _data["id"] = id + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_ACTION, _data) +end + +function M:OnEventSendCards(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + if not _room.room_config.piao_niao or _room.self_player.entrust then + _room.curren_round = _room.curren_round + 1 + end + if _room.curren_round > 0 then _room.playing = true end + + printlog("开始发牌===========>>>") + pt(evt_data) + + local room = DataManager.CurrenRoom + --printlog(evt_data.laiziCard) + --printlog(evt_data.laiziCard2) + --printlog(evt_data.laiziCardBefore) + --printlog(evt_data.laiziCard2Before) + + + DispatchEvent(self._dispatcher,TX_GameEvent.SendGangZi,102,103,0,true ) + + + + -- _room.SelfPlayer.AutoOutCard = false + local handcards = evt_data["card_list"] + local p = _room.self_player + local seat = evt_data["bank_seat"] + self._cacheEvent:Enqueue(function() + _room.banker_seat = seat + for i=1,#_room.player_list do + _room.player_list[i].hand_left_count = 13 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + end + p.card_list = handcards + self._room.self_player.hand_left_count = #handcards + table.sort( handcards, ViewUtil.HandCardSort ) + DispatchEvent(self._dispatcher,TX_GameEvent.SendCards, p) + end) +end + +function M:OnEventOutCard(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local ting_list = nil + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + _room.last_outcard_seat = seat + if seat == _room.self_player.seat and __pre_delete_card then + __pre_delete_card = false + else + if seat == _room.self_player.seat then + list_remove(p.card_list, card) + table.sort(p.card_list, ViewUtil.HandCardSort) + end + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + DispatchEvent(self._dispatcher,TX_GameEvent.OutCard, p, card) + end + end) +end + + +function M:OnEventTakeCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + p.hand_left_count = p.hand_left_count +1 + if (seat == _room.self_player.seat) then + _room.self_player.card_list[#_room.self_player.card_list+1] = card + -- table.sort( _room.self_player.card_list, ViewUtil.HandCardSort ) + end + DispatchEvent(self._dispatcher,TX_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnEventOutHint(evt_data) + self._cacheEvent:Enqueue(function() + self._room.curren_outcard_seat = self._room.self_player.seat + DispatchEvent(self._dispatcher,TX_GameEvent.OutHint) + end) +end + +function M:OnEventTurn(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + -- self._room.curren_outcard_seat = seat + DispatchEvent(self._dispatcher,TX_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + local weight = evt_data["weight"] + for i=1,#list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + tip.opcard = dtip["opcard"] + + -- if (dtip["opcard"]) then + -- local opcard = dtip["opcard"] + -- tip.OpCard = opcard + -- tip.OpCard[3] = tip.Card + -- table.sort(tip.OpCard) + -- end + tiplist:AddTip(tip) + end + DispatchEvent(self._dispatcher,TX_GameEvent.FZTips, tiplist, weight) + end) +end + +function M:OnEventFzAction(evt_data) + local _room = self._room + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local type = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + -- local openkong = evt_data["openkong"] + + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local fz = nil + local index = -1 + local ftype = type + if (ftype == FZType.Gang_Peng) then + for i=1,#p.fz_list do + if (p.fz_list[i].card == card) then + p.fz_list[i].card = card + fz = p.fz_list[i] + fz.type = type + index = i -1 + break + end + end + end + fz = {} + fz.card = card + fz.type = type + fz.active_card = actice_card + if (index == -1) then + if (ftype == FZType.Chi) then + local data ={} + data[1] = opcard[1] + data[2] = card + data[3] = opcard[2] + fz.opcard =data + end + p.fz_list[#p.fz_list+1] = fz + end + fz.from_seat = from_seat + local remove_num = #opcard + + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(p.card_list,opcard[i]) + end + end + + p.hand_left_count = p.hand_left_count - remove_num + if from_seat ~= p.seat then + -- if (fz.Type == FZType.Chi) then card = actice_card end + local fp = _room:GetPlayerBySeat(from_seat) + table.remove(fp.outcard_list,#fp.outcard_list) + end + + DispatchEvent(self._dispatcher,TX_GameEvent.FangziAction, fz, p, index) + end) +end + +function M:OnEventHu(evt_data) + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local win_card = evt_data["win_card"] + local win_list = evt_data["win_list"] + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + table.sort( win_p.card_list, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher,TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], win_card, cards, win_list) + end) +end + +function M:OneventResult1(evt_data) + local over = evt_data.type + printlog("OneventResult1") + pt(evt_data) + --0:小结算 1:小大结算 2:大结算 + self._room._reload_flag = false + self._room.playing = false + if 0 == over then + local result = evt_data.result + self._cacheEvent:Enqueue(function() + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil,true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +-- function M:OnEventResult2(evt_data) +-- DataManager.CurrenRoom.Over = true +-- ControllerManager.SetGameNetClient(nil,true) + -- local info_list = evt_data["info_list"] + -- if self._result ~= nil then + -- self._cacheEvent:Enqueue(function() + -- self:OneventResult1(self._result) + -- self._result = nil + -- end) + -- end +-- self._cacheEvent:Enqueue(function() +-- DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, info_list) +-- ControllerManager.ChangeController(LoddyController) +-- end) +-- end + +function M:OnEventNiao(evt_data) + local list = evt_data["niao"] + local start_seat = evt_data["start_seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EventNiao, list, start_seat) + end) +end + +function M:OnEventPiaoTip() + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + self._cacheEvent:Enqueue(function() + if not self._room._reload_flag then + self._room.curren_round = self._room.curren_round + 1 + end + self._room.playing = true + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiaoTip, evt_data) + end) +end + +function M:OnEventPiao(evt_data) + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiao, evt_data.seat, evt_data.num) + end) +end + +function M:GetPosString( seat ) + if DataManager.CurrenRoom.room_config.people_num ~= 4 then return"" end + if seat == 1 then + return "北" + elseif seat == 2 then + return "西" + elseif seat == 3 then + return "南" + elseif seat == 4 then + return "东" + end +end + +function M:Discard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + -- list_remove(_room.SelfPlayer.Cards,card) + -- table.sort(_room.SelfPlayer.Cards) + _client:send(Protocol.Game_Da, _data) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXGameInfo.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXGameInfo.lua new file mode 100644 index 00000000..971d52d0 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXGameInfo.lua @@ -0,0 +1,183 @@ +local EXGameInfo = {} + +local M = EXGameInfo + + +function EXGameInfo.new(blur_view) + setmetatable(M, { __index = IGameInfo }) + local self = setmetatable({}, { __index = M }) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/majiang/lichuan/ui/Info_MJ_LiChuan") + return self +end + +function M:FillData() + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 3 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_LiChuan/Cgm_create_room") + + if oldGameVersion == 2 then + self._config:GetController("xipai").selectedIndex = 0 + + self.xipaiValueText = self._config:GetChild('xipaifen') + self.xipaiValueText.text = 1 + self.xipaiValue = 1 + + self.anchouValueText = self._config:GetChild('anchoufen') + self.anchouValueText.text = 1 + self.anchouValue = 1 + + local btn_cr = self._config:GetChild('sdsrbtn') + btn_cr.onClick:Set( + function() + local gniv = GroupNumberInputView_Game.new(nil, function(num) + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == -1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1, "输入数据异常!") + end + + self.xipaiValueText.text = value / 1000 + self.xipaiValue = value / 1000 + end, 3, nil) + gniv:Show() + end + ) + + + local btn_cr2 = self._config:GetChild('anchoubtn') + btn_cr2.onClick:Set( + function() + local gniv = GroupNumberInputView_Game.new(nil, function(num) + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == -1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1, "输入数据异常!") + end + + self.anchouValueText.text = value / 1000 + self.anchouValue = value / 1000 + end, 3, nil) + gniv:Show() + end + ) + end +end + +local _help_url = "ui://Info_MJ_LiChuan/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_MJ_LiChuan/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_MJ_LiChuan/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list = {} +function M:GetPlayList() + return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + 1 + local people = _config:GetController("play_list").selectedIndex + 2 + + local fengding = _config:GetController("fengding").selectedIndex + local wanfa = _config:GetController("wanfa").selectedIndex + local qiduijiafan = _config:GetChild("btn_qidui").selected + local shoudailongjiafan = _config:GetChild("btn_shoudailong").selected + local loudilongjiafan = _config:GetChild("btn_loudilong").selected + local bunengchi = _config:GetChild("btn_bunengchi").selected + local doudizhu = _config:GetChild("btn_doudizhu").selected + local doudizhufanbei = _config:GetChild("btn_doudizhufanbei").selected + local xi_pai = false + local xi_paifen = 0 + if _config:GetChild("xipai") then + xi_pai = _config:GetChild("xipai").selected + end + + + + ------ + local _data = {} + _data["opt"] = round + _data["maxPlayers"] = people + + _data["fengding"] = fengding + _data["wanfa"] = wanfa + _data["qiduijiafan"] = qiduijiafan + _data["shoudailongjiafan"] = shoudailongjiafan + _data["loudilongjiafan"] = loudilongjiafan + _data["bunengchi"] = bunengchi + _data["doudizhu"] = doudizhu + _data["doudizhufanbei"] = doudizhufanbei + _data['xi_pai'] = xi_pai + + local xi_pai_score = 0 + local an_chou_score = 0 + if oldGameVersion == 2 then + xi_pai_score = self.xipaiValue + an_chou_score = self.anchouValue + end + + _data['xi_pai_score'] = xi_pai_score * 1000 + _data['an_chou_score'] = an_chou_score * 1000 + + + return _data +end + +function M:LoadConfigData(data) + --printlog("加载房间配置=========>>>") + --pt(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt - 1 + _config:GetController("play_list").selectedIndex = data.maxPlayers - 2 + + + _config:GetController("fengding").selectedIndex = data.fengding + + _config:GetController("wanfa").selectedIndex = data.wanfa + _config:GetChild("btn_qidui").selected = data.qiduijiafan + _config:GetChild("btn_shoudailong").selected = data.shoudailongjiafan + _config:GetChild("btn_loudilong").selected = data.loudilongjiafan + _config:GetChild("btn_bunengchi").selected = data.bunengchi + + _config:GetChild("btn_doudizhu").selected = data.doudizhu + _config:GetChild("btn_doudizhufanbei").selected = data.doudizhufanbei + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected = data.xi_pai + end + + if oldGameVersion == 2 then + self.xipaiValueText.text = data.xi_pai_score / 1000 + self.xipaiValue = data.xi_pai_score / 1000 + + self.anchouValueText.text = data.an_chou_score / 1000 + self.anchouValue = data.an_chou_score / 1000 + end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua new file mode 100644 index 00000000..c6f7abc0 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXMainView.lua @@ -0,0 +1,819 @@ +local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local MJMainView = require("main.majiang.MJMainView") +local EXClearingView = import(".EXClearingView") +local TX_GameEvent = import(".GameEvent") +local HuTipView = import("main.majiang.HuTipView") +local SettingView = import("main.majiang.MJSettingViewNew") +local PlayerInfoView = import(".EXPlayerInfoView") +local M = {} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M, { __index = MJMainView }) + local self = setmetatable({}, { __index = M }) + self.class = "MainView" + self.asset_group = "LiChuan_MJ" + self:init() + ViewUtil.PlayMuisc(self.asset_group, "extend/majiang/lichuan/sound/bg.mp3") + return self +end + +function M:InitView(url) + local room = self._room + self._style = 1 + self._gps_style = 1 + self._full = true + UIPackage.AddPackage("extend/majiang/lichuan/ui/Extend_MJ_LiChuan") + MJMainView.InitView(self, "ui://Main_Majiang/Main_" .. room.room_config.people_num .. "_s2") + self._hu_tip = HuTipView.new(self) + + self._view:GetChild('wanfa_text').text = room.room_config.people_num .. '人个旧麻将 ' .. room.score_times .. '倍' + + self.selectLaiziBtn = self._view:GetChild('selectlaizi') + self.Laizi1Btn = self._view:GetChild('selectgang1') + self.Laizi2Btn = self._view:GetChild('selectgang2') + self._view:GetChild("n108").visible = true + self.Laizi1Btn.visible = true + self.Laizi2Btn.visible = true + self.bugangnum = self._view:GetChild("bugangnum") + + self:PlayerChangeLineState() + + if room.playing or room.curren_round > 0 then + self:ReloadRoom() + end +end + +function M:__BuGang(card1, card2, callback) + local _gang_tip_choice = UIPackage.CreateObject("Extend_MJ_LiChuan", "Gang_tip_choice") + _gang_tip_choice.visible = true + + local gangcard1 = _gang_tip_choice:GetChild("card1") + local gangcard2 = _gang_tip_choice:GetChild("card2") + + + gangcard1.icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. card1) + gangcard2.icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. card2) + + gangcard1.onClick:Add(function() + callback(card1) + end) + + gangcard2.onClick:Add(function() + callback(card2) + end) + + _gang_tip_choice.xy = Vector2((self._view.width - _gang_tip_choice.width) / 2, + (self._view.height - _gang_tip_choice.height) / 2) + self._view:AddChild(_gang_tip_choice) + self._gang_tip_choice = _gang_tip_choice +end + +function M:SetShowGangZiProcess(currentLaizi1ID, currentLaizi2ID, bugangnum, isShowAnim) + --zhongid=currentLaizi1ID + if isShowAnim == nil then isShowAnim = false end + + self:SetGangZiCard(self.Laizi1Btn, currentLaizi1ID) + self:SetGangZiCard(self.Laizi2Btn, currentLaizi2ID) + self:IsShowGangZi(self.Laizi1Btn, true) + self:IsShowGangZi(self.Laizi2Btn, true) + self.bugangnum.text = "当前 " .. bugangnum .. " 杠" +end + +function M:HideAllGangZiCard() + self.Laizi1Btn.visible = false + self.Laizi2Btn.visible = false + self.selectLaiziBtn.visible = false + --self.LaiziBG.visible=false +end + +function M:SetGangZiCard(btn, cardId) + btn.icon = 'ui://Main_Majiang/' .. get_majiang_prefix(DataManager.CurrenRoom.game_id) .. "201_" .. cardId +end + +function M:IsShowGangZi(btn, isShow) + btn.visible = isShow +end + +function M:UpdateRound() + self._view:GetChild("tex_round1").text = self._room.curren_round + self._view:GetChild("tex_round2").text = self._room.room_config.round +end + +function M:InitPlayerInfoView() + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem, self) + tem.visible = false + end +end + +function M:NewMJPlayerCardInfoView(view, index) + if index == 1 then + return MJPlayerSelfCardInfoView.new(view, self) + end + return MJPlayerCardInfoView.new(view, self) +end + +function M:EventInit() + -- UIPackage.AddPackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong") + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _gcm_outcard_url = UIPackage.GetItemURL("Main_Majiang", "Gcm_OutCard") + local _player_info = self._player_info + local _gamectr = self._gamectr + + + + _gamectr:AddEventListener(TX_GameEvent.SendLaiZi, function(...) + local arg = { ... } + self:SetShowLaiZiProcess(arg[1], arg[2], arg[3], arg[4]) + end) + + _gamectr:AddEventListener(TX_GameEvent.SendGangZi, function(...) + local arg = { ... } + self:SetShowGangZiProcess(arg[1], arg[2], arg[3], arg[4]) + end) + + _gamectr:AddEventListener(TX_GameEvent.EventBuGang, function(...) + local arg = { ... } + self:__BuGang(arg[1], arg[2], + function(id) + printlog(id) + _gamectr:SendGangCard(id) + self:__CloseGangTip() + end) + end) + + + + _gamectr:AddEventListener(TX_GameEvent.SendCards, function(...) + -- self:ShowHuTip() + self:UpdateRound() + self._state.selectedIndex = 1 + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateHandCard() + end + end) + _gamectr:AddEventListener(TX_GameEvent.EventTurn, function(...) + local arg = { ... } + self._left_time = 15 + local seat = arg[1] + self:UpdateCardBox(self:GetPos(seat)) + -- if seat == self._room.self_player.seat then + -- self:ShowHuTip() + -- end + end) + + _gamectr:AddEventListener(TX_GameEvent.OutHint, function(...) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:UpdateHandCard(true) + end) + + local _gcm_outcard_url = "ui://Main_Majiang/Gcm_OutCard" + _gamectr:AddEventListener(TX_GameEvent.OutCard, function(...) + self:__CloseTip() + self._left_time = 0 + local arg = { ... } + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:RemoveCursor() + info:UpdateHandCard() + local outcard = UIPackage.CreateObjectFromURL(_gcm_outcard_url) + info:UpdateOutCardList(outcard, card, self._cursor) + self:PlaySound("LiChuan_MJ", p.self_user.sex, tostring(card)) + self:PlayMJSound("chupai.mp3") + if seat == _room.self_player.seat then + _room.curren_outcard_seat = -1 + end + end) + _gamectr:AddEventListener(TX_GameEvent.GetCard, function(...) + self:__CloseTip() + local arg = { ... } + local seat = arg[1] + local card = arg[2] + -- self._tex_leftTime.text = arg[3] + self._tex_LeftCard.text = arg[3] + -- self:UpdateRoomInfo() + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateHandCard(true) + end) + + _gamectr:AddEventListener(TX_GameEvent.FZTips, function(...) + local arg = { ... } + local _tip = arg[1] + local weight = arg[2] + self:__FangziTip(_tip, weight) + end) + + _gamectr:AddEventListener(TX_GameEvent.FangziAction, handler(self, self.OnFangziAction)) + + _gamectr:AddEventListener(TX_GameEvent.ZPHuCard, function(...) + self._left_time = 0 + self:UpdateCardBox(0) + self:__CloseTip() + self._popEvent = false + local arg = { ... } + local win_seat = arg[1] + local lose_seat = arg[2] + local win_card = arg[3] + local cards = arg[4] + local win_list = arg[5] + local index = self:GetPos(win_seat) + local info = self._player_card_info[index] + self:RemoveCursor() + info:UpdateHandCard(true, true) + + local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card") + obj_win_card.icon = "ui://Main_Majiang/202_" .. win_card + obj_win_card:GetController("bg").selectedIndex = 1 + info._view:AddChild(obj_win_card) + obj_win_card:Center() + + local url, pNode + local player = _room:GetPlayerBySeat(win_seat) + if win_seat ~= _room.self_player.seat then + url = "ui://Main_Majiang/别人胡" + pNode = info._mask_liangpai + elseif win_seat == _room.self_player.seat then + url = "ui://Main_Majiang/自己胡牌" + pNode = self._view + end + if win_seat == lose_seat then + url = "ui://Main_Majiang/eff_zimo" + end + + local he = UIPackage.CreateObjectFromURL(url) + pNode:AddChild(he) + he:GetTransition("t2"):Play() + he:Center() + if _room.room_config.people_num == 2 then + if win_seat ~= _room.self_player.seat then + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + end + + if win_seat == _room.self_player.seat then + printlog("自己位置=====") + he:Center() + elseif url == "ui://Main_Majiang/eff_zimo" then + printlog("自摸地址==========") + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + + + + --- + local isZiMo = win_seat == lose_seat + DataManager.CurrenRoom.isZiMoHu = isZiMo + local hu_sound = isZiMo and ("zimo" .. math.random(1, 3)) or ("hu" .. math.random(1, 2)) + printlog("声音====>>>", hu_sound) + self:PlaySound("LiChuan_MJ", player.self_user.sex, hu_sound) + + local pNode = info._view + local url = "eff_list1" + local he_list = UIPackage.CreateObjectFromURL("ui://Extend_MJ_LiChuan/" .. url) + he_list.touchable = false + pNode:AddChild(he_list) + he_list:Center() + + coroutine.start(function() + for i = 1, #win_list do + local tem = win_list[i] + if tem.type > 0 and tem.type < 32 then + local com_name = "he" .. tem.type + local item = he_list:GetChild("list"):AddItemFromPool("ui://Extend_MJ_LiChuan/" .. com_name) + coroutine.wait(0.3) + end + end + + coroutine.wait(2) + obj_win_card:Dispose() + he:Dispose() + he_list:Dispose() + self._popEvent = true + end) + end) + + _gamectr:AddEventListener(TX_GameEvent.EventNiao, function(...) + local arg = { ... } + self._popEvent = false + local list = arg[1] + local start_seat = arg[2] + -- ViewUtil.PlaySound("LiChuan_MJ", "extend/majiang/chaozhou/sound/zhuaniao.mp3") + coroutine.start(self.RunNiao, self, list, start_seat) + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult1, function(...) + self._popEvent = false + self:__CloseTip() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = { ... } + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local niao = result.niao + if liuju then + local le = UIPackage.CreateObjectFromURL("ui://Main_Majiang/LiuJu") + self._view:AddChild(le) + le:Center() + le:GetTransition("t0"):Play() + coroutine.start(function() + coroutine.wait(1) + le:Dispose() + end) + end + self:RemoveCursor() + if self._clearingView == nil then + self._clearingView = EXClearingView.new(self._root_view) + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + self._popEvent = true + end) + end + + if _room.curren_round ~= _room.room_config.round then + -- if #niao == 0 then self._view:GetChild("n13").visible = false end + self._clearingView:InitData(0, _room, result, nil, function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:ResetCardType() + if _room:checkHpNonnegative() then + p.cur_hp = data[i].hp_info.cur_hp + end + info:UpdateScore() + info._view:GetChild("zhanji").visible = true + local num = data[i].hp_info.total_hp + if num > 0 then + info._view:GetController("text_color").selectedIndex = 0 + info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + else + info._view:GetController("text_color").selectedIndex = 1 + info._view:GetChild("text_jifen").text = d2ad(num) + end + + info._view:GetChild("mask_piao").title = "" + info._view:GetController("piao_niao").selectedIndex = 0 + p.fz_list = {} + end + DataManager.CurrenRoom.self_player.card_list = {} + self._state.selectedIndex = 2 + self._clearingView = nil + end) + end + self._player_card_info[1]:ShowHuTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult2, function(...) + self:UnmarkSelfTuoguan() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = { ... } + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + self._clearingView = EXClearingView.new() + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + end) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiaoTip, function() + self:UpdateRound() + self._tex_LeftCard.text = "0" + self._state.selectedIndex = 1 + self:__PiaoNiaoTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiao, function(...) + local arg = { ... } + local seat = arg[1] + local num = arg[2] + if num > 0 then + local head_info = self._player_info[self:GetPos(seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. num + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + if seat == _room.self_player.seat then + if self._com_piao and _room.self_player.entrust then + self._com_piao:Dispose() + self._com_piao = nil + _room.curren_round = _room.curren_round - 1 + end + end + end) +end + +function M:OutCard(card) + if card ~= 0 then + printlog("当前出牌为===>>>" .. card) + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card, function() + local info = self._player_card_info[1] + self:RemoveCursor() + info:UpdateHandCard() + + info:UpdateOutCardList(nil, card, self._cursor) + self:PlaySound("LiChuan_MJ", self._room.self_player.self_user.sex, tostring(card)) + self:PlayMJSound("chupai.mp3") + -- self:ShowHuTip() + end) + else + printlog("鬼牌不能出===>>>" .. card) + end +end + +function M:__FangziTip(tip, weight) + printlog("__FangziTip") + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject("Main_Majiang", "Gcm_action_tips") + _chipeng_tip:GetController("hide_bg").selectedIndex = 1 + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + -- self._player_card_info[self:GetPos(p.seat)] + + local _lit_fanzi = _chipeng_tip:GetChild("lit_fanzi") + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + printlog(tip.tip_map_type) + pt(_tlist) + local tip_hu = false + local count = #_tlist + table.sort(_tlist) + local isHu = false + for k = 1, #_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + local url = "ui://Main_Majiang/Btn_fztip" + local td_weight = td.weight + if td_weight == 16 then td_weight = 8 end + if td_weight == 8 then url = "ui://Main_Majiang/Btn_hu" end + local btn_t = _lit_fanzi:AddItemFromPool(url) + btn_t.icon = "ui://Main_Majiang/fztip_" .. td_weight + btn_t.data = { tip, td } + btn_t.onClick:Add(self.__TipAction, self) + end + + -- if not (tonumber(weight) >= 16) then + local _btn_pass = _lit_fanzi:AddItemFromPool("ui://Main_Majiang/Btn_pass") + -- local _btn_pass = _chipeng_tip:GetChild("btn_pass") + _btn_pass.onClick:Set(function() + if tonumber(weight) >= 8 then + local guo_msg = MsgWindow.new(self._root_view, "确定要点过吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end) + guo_msg:Show() + else + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end) + -- end + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() +end + +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local list = tip.tip_map_type[td.weight] + printlog("__TipAction") + pt(list) + if (#list > 1) then + self:_ChiView(list, function(id) + _gamectr:SendAction(id) + self:__CloseTip() + end) + self._chipeng_tip.visible = false + return + end + + _gamectr:SendAction(td.id) + if (self._chipeng_tip == nil) then return end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil +end + +function M:_ChiView(tiplist, callback) + self._chipeng_tip.visible = false + printlog("_ChiView") + pt(tiplist) + local _pop_tip_choice = UIPackage.CreateObject("Extend_MJ_LiChuan", "Pop_tip_choice") + local list_choose1 = _pop_tip_choice:GetChild("Lst_choose") + local list_choose2 = _pop_tip_choice:GetChild("Lst_choose2") + local crossCtr = _pop_tip_choice:GetController("state") + crossCtr.selectedIndex = #tiplist == 3 and 0 or + (#tiplist == 2 and 1 or (#tiplist == 4 and 2 or (#tiplist == 5 and 3 or 4))) + _pop_tip_choice:GetChild("Btn_cross").onClick:Add(function() + _pop_tip_choice:Dispose() + self._chipeng_tip.visible = true + end) + list_choose1:RemoveChildrenToPool() + list_choose2:RemoveChildrenToPool() + for i = 1, #tiplist do + local list_choose = i <= 3 and list_choose1 or list_choose2 + local item_choose = list_choose:AddItemFromPool() + item_choose:GetController("type").selectedIndex = (1 == tiplist[i].weight or 2 == tiplist[i].weight) and 1 or 0 + if tiplist[i].weight ~= 1 then + for j = 1, 4 do + item_choose:GetChild("card" .. j).icon = UIPackage.GetItemURL("Main_Majiang", + self:GetPrefix() .. "202_" .. tiplist[i].card) + end + else + local tem = {} + table.insert(tem, tiplist[i].opcard[1]) + table.insert(tem, tiplist[i].opcard[2]) + local tcard = tiplist[i].card + table.insert(tem, tcard) + table.sort(tem, function(a, b) + return a < b + end) + item_choose:GetChild("card1").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. + tem[1]) + item_choose:GetChild("card2").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. + tem[2]) + item_choose:GetChild("card4").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. + tem[3]) + local cardpos = tem[2] > tcard and 1 or (tem[2] < tcard and 4 or 2) + item_choose:GetChild("card" .. cardpos):GetController("color").selectedIndex = 1 + end + item_choose.onClick:Add(function() + callback(tiplist[i].id) + end) + end + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width) / 2, + (self._view.height - _pop_tip_choice.height) / 2) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:OnFangziAction(...) + self:__CloseTip() + local arg = { ... } + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local index = arg[3] + printlog("OnFangziAction") + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject("Extend_MJ_LiChuan", "FzEffect") + if fz.type == FZType.Peng then + self:PlaySound("LiChuan_MJ", player.self_user.sex, "peng" .. math.random(1, 3)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "碰框") + elseif fz.type == FZType.Chi then + self:PlaySound("LiChuan_MJ", player.self_user.sex, "chi" .. math.random(1, 3)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "吃") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "吃") + else + self:PlaySound("LiChuan_MJ", player.self_user.sex, "gang" .. math.random(1, 2)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "杠框") + end + effect.touchable = false + effect:GetTransition("t2"):Play() + pNode:AddChild(effect) + coroutine.start(function() + coroutine.wait(0.3) + self._popEvent = true + end) + coroutine.start(function() + coroutine.wait(2) + effect:Dispose() + end) + + self:RemoveCursor() + if (player.seat ~= fz.from_seat) then + local fs_info = _player_card_info[self:GetPos(fz.from_seat)] + fs_info:UpdateOutCardList() + end + info:UpdateFzList(fz, index, true) + local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi + printlog(getcard) + info:UpdateHandCard(getcard) + self:__CloseTip() +end + +function M:RunNiao(list, start_seat) + local _room = self._room + --local _niao_View = self._niao_View + self._niao_View = UIPackage.CreateObject("Extend_MJ_LiChuan", "Panel_Birds") + self._view:AddChild(self._niao_View) + self._niao_View:Center() + local _niao_View = self._niao_View + local list_niao_card = self._niao_View:GetChild("Lst_birds") + list_niao_card:RemoveChildrenToPool() + for i = 1, #list do + --添加背面的麻將 + local item = list_niao_card:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "202_00") + item:GetChild("tex_score").text = "+" .. list[i].score + end + for i = 1, #list do + --顯示正面 + local item = list_niao_card:GetChildAt(i - 1) + local card = list[i].card + coroutine.wait(0.3) + item:GetTransition("appear"):Play() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_" .. card) + if list[i].score > 0 then item:GetController("bg").selectedIndex = 1 end + end + coroutine.start(function() + coroutine.wait(1) + _niao_View:Dispose() + self._popEvent = true + end) +end + +-- function M:markOutCards(showTip, data) +-- for i = 1, #self._room.player_list do +-- local p = self._room.player_list[i] +-- local info = self._player_card_info[self:GetPos(p.seat)] +-- for j = 1, #p.outcard_list do +-- local card = p.outcard_list[j] +-- if card == data then +-- local obj = info:GetOutCardByIndex(j) +-- obj:GetController("gray").selectedIndex = showTip and 1 or 0 +-- end +-- end +-- end +-- end + +function M:__PiaoNiaoTip() + local obj_piao = UIPackage.CreateObject("Main_Majiang", "panel_piao_niao") + self._view:AddChild(obj_piao) + obj_piao.x = (self._view.width - obj_piao.width) * 0.5 + obj_piao.y = self._view.height * 0.6 + for i = 1, 4 do + obj_piao:GetChild("btn_" .. i).onClick:Add(function() + self._gamectr:SendAction(i - 1) + obj_piao:Dispose() + end) + end + self._com_piao = obj_piao +end + +function M:ReloadRoom(bskip) + local room = self._room + -- if not room.playing then + -- self._state.selectedIndex = 2 + -- else + -- self._state.selectedIndex = 1 + -- self._room._reload_flag = true + -- end + + if bskip == nil or bskip == false then + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + self._room._reload_flag = true + end + end + + + for i = 1, #room.player_list do + local p = room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + for i = 1, #p.fz_list do + info:UpdateFzList(p.fz_list[i], -1) + end + info:UpdateHandCard() + local head_info = self._player_info[self:GetPos(p.seat)] + head_info:UpdateScore() + head_info._view:GetChild('zhanji').visible = true + local num = p.total_hp or 0 + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(num) + end + + if p.seat == room.last_outcard_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil, card, self._cursor) + elseif p.seat == room.curren_outcard_seat then + info:UpdateHandCard(true) + info:UpdateOutCardList() + else + info:UpdateOutCardList() + end + if p.seat == room.banker_seat then + head_info:MarkBank(true) + end + -- if p.ready then + -- self._player_info[self:GetPos(p.seat)]:Ready(true) + -- end + if bskip == nil or bskip == false then + if p.ready and room.playing == false then + self._player_info[self:GetPos(p.seat)]:Ready(true) + end + end + if p.piao_niao ~= nil and p.piao_niao > 0 then + local head_info = self._player_info[self:GetPos(p.seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + end + -- self:ShowHuTip() + + if bskip == nil or bskip == false then + self:UpdateCardBox(self:GetPos(room.curren_outcard_seat)) + self._tex_LeftCard.text = room.left_count + self:UpdateRound() + end +end + +function M:PlayerChangeLineState() + -- local isOutCard = true + -- local str = "玩家 " + -- for _ , player in ipairs(self._room.player_list) do + -- if player.line_state == 0 then + -- isOutCard = false + -- end + -- end + -- self._player_card_info[1]._area_handcard_list.touchable = isOutCard +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:__CloseTip() + if self._chipeng_tip then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if self._pop_tip_choice then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +function M:__CloseGangTip() + if self._gang_tip_choice then + self._gang_tip_choice:Dispose() + self._gang_tip_choice = nil + end +end + +function M:closeTipOnTuoguan() + self:__CloseTip() +end + +function M:Destroy() + MJMainView.Destroy(self) + UIPackage.RemovePackage("extend/majiang/lichuan/ui/Extend_MJ_LiChuan") +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXPlayBackView.lua new file mode 100644 index 00000000..5d17a205 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXPlayBackView.lua @@ -0,0 +1,297 @@ +local MJPlayBackView = require("main.majiang.MJPlayBackView") +local EXRoomConfig = import(".EXRoomConfig") +local EXClearingView = import(".EXClearingView") + +local Record_Event = import(".RecordEvent") + + +local M = {} + +--- Create a new +function M.new() + setmetatable(M, { __index = MJPlayBackView }) + local self = setmetatable({}, { __index = M }) + self.class = "PlayBackView" + self:init() + + return self +end + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/majiang/lichuan/ui/Extend_MJ_LiChuan") + MJPlayBackView.InitView(self, "ui://Main_Majiang/Main_" .. room.room_config.people_num) + local _cardbox = self._view:GetChild("cardbox") + --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false + self._ctr_cardbox = _cardbox:GetController("c1") + self._tex_round = self._view:GetChild("tex_round") + self._tex_LeftCard = self._view:GetChild("remaining_card") + self._anchor = self._view:GetChild("mask_tips") + self._eventmap = {} + + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao + self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao + self._cmdmap[Record_Event.Evt_Result] = self.CmdResult +end + +function M:FillRoomData(data) + MJPlayBackView.FillRoomData(self) + if self._win_pic then self._win_pic:Dispose() end + if self._niao then self._niao:Dispose() end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local left_count = data.info.left_card + self:UpdateLeftCard(left_count) + local round = data.info.round + self:UpdateRound(round) + + local roominfo_panel = self._view:GetChild("roominfo_panel1") + roominfo_panel:GetChild("tex_roomid").text = room.room_id + roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + table.sort(p.card_list, ViewUtil.HandCardSort) + card_info:UpdateHandCard(false, true) + self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0 + end + + self:GenerateAllStepData(data) + self:UpdateStep(1) + -- self:ShowStep(0) +end + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateLeftCard(step.left_card) + -- self._ctr_cardbox.selectedIndex = step.current_out_seat + self:UpdateCardBox(self:GetPos(step.current_out_seat)) + self:UpdateStep(index + 1) + if step.cmd ~= Record_Event.Evt_OutCard then + self:RemoveCursor() + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hand_left_count = #p.card_list + info:Clear() + info:ResetFzList() + p.piao_niao = step.player_card_data[i].piao_niao + local head_info = self._player_info[self:GetPos(i)] + if p.piao_niao and p.piao_niao > 0 then + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + else + head_info._view:GetController("piao_niao").selectedIndex = 0 + end + if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil, nil, self._cursor) + else + info:UpdateOutCardList() + end + if step.cmd == Record_Event.Evt_GetCard and p.seat == step.current_out_seat then + info:UpdateHandCard(true, true) + else + info:UpdateHandCard(false, true) + end + end + if step.cmd == Record_Event.Evt_Win then + self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡") + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + else + if self._win_pic then + self._win_pic:Dispose() + end + end + if step.cmd == Record_Event.Evt_Niao then + local niao_list = step.niao + self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_LiChuan/Panel_Birds") + local list = self._niao:GetChild("Lst_birds") + list:RemoveChildrenToPool() + for i = 1, #niao_list do + local item = list:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_" .. niao_list[i].card) + if niao_list[i].score > 0 then + item:GetController("bg").selectedIndex = 2 + end + end + self._view:AddChild(self._niao) + self._view:AddChild(self._view:GetChild("panel_record")) + self._niao:Center() + else + if self._niao then + self._niao:Dispose() + end + end + if step.cmd == Record_Event.Evt_Result then + if not self.result then + self.result = EXClearingView.new(self._root_view, true) + self.result:InitData(0, self._room, step.result_data) + self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5 + self.result._view.width = GRoot.inst.width + self.result._view.height = GRoot.inst.height + self.result._view:GetChild("btn_confirm").visible = false + self._anchor:AddChild(self.result._view) + self.result._view.x = self._anchor.x * -1 + self.result._view.y = self._anchor.y * -1 + else + self.result._view.visible = true + end + -- self.result._view:Center() + else + if self.result then + self.result._view.visible = false + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = "" + step.left_card = info.left_card + step.last_out_seat = 0 + step.current_out_seat = 1 + step.win = 0 + step.niao = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.piao_niao = p.piao_niao + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + table.sort(u.card_list, ViewUtil.HandCardSort) + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = 0 + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + for i = 1, #cmd.data.opcard do + list_remove(u.card_list, cmd.data.opcard[i]) + end + local fz = {} + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.opcard = cmd.data.opcard + local uf = data.player_card_data[cmd.data.from_seat] + if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then + table.remove(uf.outcard_list, #uf.outcard_list) + end + if fz.type ~= FZType.Gang_Peng then + u.fz_list[#u.fz_list + 1] = fz + else + for i = 1, #u.fz_list do + if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then + u.fz_list[i].type = FZType.Gang_Peng + end + end + end +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:CmdNiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.niao = cmd.data.niao +end + +function M:CmdPiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.player_card_data[cmd.seat].piao_niao = cmd.data.num +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result_data = cmd.data +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_deep_clone(last_step) + self._step[#self._step + 1] = step + step.result_data = nil + return step +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = "剩余 " .. num .. " 张牌" +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:UpdateRound(round) + self._tex_round.text = "第 " .. round .. "/" .. self._room.room_config.round .. " 局" +end + +function M:UpdateStep(step) + self._record:GetChild("tex_step").text = "第 " .. step .. " / " .. #self._step .. "步" +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXPlayer.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXPlayer.lua new file mode 100644 index 00000000..fd26822b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXPlayer.lua @@ -0,0 +1,36 @@ + + +local EXPlayer = { + auto, + -- 手牌列表 + hand_cards = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXPlayerInfoView.lua new file mode 100644 index 00000000..f8a5fd69 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXPlayerInfoView.lua @@ -0,0 +1,76 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + +function M:init() + PlayerInfoView.init(self) + self._tex_score = self._view:GetChild("info"):GetChild("tex_score1") + self._tex_score2 = self._view:GetChild("info"):GetChild("tex_score2") + self._ct_score = self._view:GetChild("info"):GetController("score") +end + +function M:ShowInteraction(type,str) + if type == 3 then + Voice.DownLoad(str, function(clip) + if (clip ) then + self:ShowMaskVoice(clip.length) + GameApplication.Instance:PlayVoice(clip) + end + end) + elseif type == 4 then + self:SetChat(str) + elseif type == 2 then + local chat_index = tonumber(str) + self._main_view:PlayChatSound(self._player.self_user.sex,chat_index) + local language, index = self._main_view:GetChatMsgLanguage(chat_index) + self:SetChat(self._main_view.Fix_Msg_Chat[index]) + elseif type == 1 then + self:SetBiaoqing("ui://Chat/"..str) + end +end + +function M:UpdateRemainCard(card_num, hide) + if hide then + self._view:GetController("show_remain").selectedIndex = 0 + else + self._view:GetController("show_remain").selectedIndex = 1 + end + self._view:GetChild("com_remain"):GetChild("tex_remain").text = card_num +end + +function M:FillData(player) + PlayerInfoView.FillData(self, player) + self:UpdateScore(player.total_score) +end + +function M:UpdateScore() + local score = self._player.total_score + local room = DataManager.CurrenRoom + if room:checkHpNonnegative() then + score = d2ad(self._player.cur_hp) + end + if not score then + score = 0 + end + if score < 0 then + self._ct_score.selectedIndex = 1 + self._tex_score2.text = score + else + self._ct_score.selectedIndex = 0 + if not room:checkHpNonnegative() then + score = "+" .. score + end + self._tex_score.text = score + end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXRoomConfig.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXRoomConfig.lua new file mode 100644 index 00000000..8a08bead --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXRoomConfig.lua @@ -0,0 +1,152 @@ +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M, { __index = RoomConfig }) + local self = setmetatable({}, { __index = M }) + RoomConfig.init(self, config) + self.config = config + self.class = "RoomConfig" + self.round = config["times"] + self.maxPlayers = config["maxPlayers"] + self.fengding = config["fengding"] + self.wanfa = config["wanfa"] + self.qiduijiafan = config["qiduijiafan"] + self.shoudailongjiafan = config["shoudailongjiafan"] + self.loudilongjiafan = config["loudilongjiafan"] + self.bunengchi = config["bunengchi"] + + return self +end + +function M:GetDes(sp) + sp = sp or " " + local count = 0 + local str = self.round and self.round .. "局" .. " " or "" + str = str .. RoomConfig.GetDes(self, sp) .. "\n" + + + if (self.fengding) then + str = str .. "封顶" + count = count + 1 + if count % 2 == 0 then + str = str .. "\n" + else + sp1 = "" + local strL = 2 + for i = 1, strL do + sp1 = sp1 .. " " + end + str = str .. sp1 .. sp + end + end + + if (self.qiduijiafan) then + local strL = 2 + str = str .. "可胡七对" + if self.qiduijiafan then + str = str .. "翻倍" + strL = 0 + end + count = count + 1 + if count % 2 == 0 then + str = str .. "\n" + else + sp1 = "" + for i = 1, strL do + sp1 = sp1 .. " " + end + str = str .. sp1 .. sp + end + end + + + if self.shoudailongjiafan then + str = str .. "手逮龙加番" + count = count + 1 + if count % 2 == 0 then + str = str .. "\n" + else + sp1 = "" + local strL = 2 + for i = 1, strL do + sp1 = sp1 .. " " + end + str = str .. sp1 .. sp + end + end + + if self.loudilongjiafan then + str = str .. "落地龙" + count = count + 1 + if count % 2 == 0 then + str = str .. "\n" + else + sp1 = "" + local strL = 3 + for i = 1, strL do + sp1 = sp1 .. " " + end + str = str .. sp1 .. sp + end + end + + if self.bunengchi then + str = str .. "不能吃" + count = count + 1 + if count % 2 == 0 then + str = str .. "\n" + else + sp1 = "" + local strL = 3 + for i = 1, strL do + sp1 = sp1 .. " " + end + str = str .. sp1 .. sp + end + end + + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + +function M:GetDes2(sp) + sp = sp or " " + local str = RoomConfig.GetDes(self, sp) + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + + + + + if (self.qiduijiafan) then + str = str .. "可胡七对" + if self.qiduijiafan then + str = str .. "-翻倍" + end + str = str .. sp + end + + + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + +function M:GetGameJS() + local gamerulepanel = UIPackage.CreateObjectFromURL("ui://Extend_MJ_LiChuan/gamerule") + return gamerulepanel +end + +function M:GetGameSMSize() + return 467, 500 +end + +function M:GetGameName() + return "个旧麻将" +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/lichuan/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/lichuan/ExtendConfig.lua new file mode 100644 index 00000000..7a351cc3 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/lichuan/ExtendConfig.lua @@ -0,0 +1,173 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import(".EXGameInfo") +local EXMainView = import(".EXMainView") +local EXGameController = import(".EXGameController") +local EXRoomConfig = import(".EXRoomConfig") +local EXPlayBackView = import(".EXPlayBackView") +local MJRoom = require("main.majiang.MJRoom") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, { __index = IExtendConfig }) + local self = setmetatable({}, { __index = M }) + self.class = "ExtendConfig" + self.extend_id = 33 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/majiang/lichuan/ui/Info_MJ_LiChuan") + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage("extend/majiang/lichuan/ui/Extend_MJ_LiChuan") + ResourcesManager.UnLoadGroup("LiChuan_MJ") +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return MJRoom.new() +end + +function M:FillRoomConfig(room, _config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + + + local reload = s2croom["reload"] + local _tableInfo = s2croom["tableInfo"] + + local _config = _tableInfo["config"] + + pt(_config) + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo["playerData"] + room.curren_round = _tableInfo["round"] + self:FillPlayerData(playerList) + + if (reload) then + local _reloadInfo = s2croom["reloadInfo"] + local _hand_card = _reloadInfo["hand_card"] + room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + + local active_seat = _reloadInfo["active_seat"] + local bank_seat = _reloadInfo["banker_seat"] + local playing = _reloadInfo["playing"] + local _info_list = _reloadInfo["info_list"] + local last_outcard_seat = _reloadInfo["last_outcard_seat"] + room.left_count = _reloadInfo["left_card"] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo["curren_outcard_seat"] + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i = 1, #_info_list do + local tem = _info_list[i] + local playerid = tem["playerid"] + local p = room:GetPlayerById(playerid) + local outcard_list = tem["outcard_list"] + p.outcard_list = outcard_list + p.total_score = tem["score"] + p.hand_left_count = tem["card_count"] + p.piao_niao = tem["piao_niao"] or 0 + local opcard = tem["opcard"] + for k = 1, #opcard do + local op = opcard[k] + local fz = {} + fz.type = op["type"] + fz.card = op["card"] + p.fz_list[#p.fz_list + 1] = fz + end + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.left_count = _tableInfo["left_card"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + + local _info_list = _tableInfo["playerData"] + for i = 1, #_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + p.piao_niao = _jp["piao_niao"] + -- print(DataManager.SelfUser.account_id,pid) + -- if (278 == pid) then + -- room.self_player = p + -- p.self_user = DataManager.SelfUser + -- else + if p.seat == 1 then room.self_player = p end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.card_list = _hand_card + --room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + p.total_score = _jp["score"] + p.hand_left_count = #_hand_card + if _jp.hp_info then + room.room_config.isNonnegative = 1 + p.cur_hp = _jp.hp_info.cur_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/lichuan/GameEvent.lua b/lua_probject/extend_project/extend/majiang/lichuan/GameEvent.lua new file mode 100644 index 00000000..9180694e --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/lichuan/GameEvent.lua @@ -0,0 +1,37 @@ + +local TX_GameEvent = { + -- 发牌 + SendCards = "SendCards", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + EventNiao = "EventNiao", + + EvnetPiaoTip = "EvnetPiaoTip", + + EvnetPiao = "EvnetPiao", + + + --- + SendLaiZi="SendLaiZi", + SendGangZi = "SendGangZi", + EventBuGang = "EventBuGang", + +} +return TX_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/lichuan/MJPlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/majiang/lichuan/MJPlayerSelfCardInfoView.lua new file mode 100644 index 00000000..72d1d092 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/lichuan/MJPlayerSelfCardInfoView.lua @@ -0,0 +1,213 @@ +local MJPlayerSelfCardInfoView = require("main.majiang.MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local CardCheck = import(".CardCheck") + +local M = {} +-- +function M.new(view,mainView) + setmetatable(MJPlayerSelfCardInfoView, {__index = MJPlayerCardInfoView}) + setmetatable(M, {__index = MJPlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:ShowHuTip(card_list) + printlog("ShowHuTip") + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + for i=1,#DataManager.CurrenRoom.laiziInfo do + if IsHasDictionary(DataManager.CurrenRoom.laiziInfo[i],tingList)==false then + table.insert(tingList,DataManager.CurrenRoom.laiziInfo[i] ) + end + end + end + + end + self._mainView._hu_tip:FillData(tingList) +end + +function M:UpdateHandCard(getcard, mp) + MJPlayerSelfCardInfoView.UpdateHandCard(self, getcard, mp) + local _carViewList = self._carViewList + + if DataManager.CurrenRoom.laiziInfo and #self._carViewList>0 then + for i=1,#self._carViewList do + local obj=self._carViewList[i] + if obj and obj.card then + if IsHasDictionary(obj.card_item,DataManager.CurrenRoom.laiziInfo) then + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=1 + end + + end + else + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=0 + end + end + end + + end + end + + + end + + + local card_list = DataManager.CurrenRoom.self_player.card_list + self:ShowHuTip(card_list) + if getcard then + self._out_card = true + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + -- 记录需要标记听牌提示的牌 + local lst_mark = {} + local total_num = 0 + for i = 1, #_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + list_remove(card_list, card) + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + local count = 0 + for j = 1, #tingList do + count = count + self._mainView:CountCardLeftNum(tingList[j]) + end + local tem = {} + tem.item = btn + tem.count = count + total_num = total_num + count + table.insert(lst_mark, tem) + end + table.insert(card_list, card) + end + table.sort(lst_mark, function(a, b) + return a.count > b.count + end) + -- 如果几张牌的可胡牌数一致,也只显示'三角',可胡牌数不一致才显示'多' + local all_same = #lst_mark ~= 0 and lst_mark[1].count == total_num / #lst_mark or false + for i = 1, #lst_mark do + local tem = lst_mark[i] + if all_same or tem.count < lst_mark[1].count then + tem.item:GetController("mark_ting").selectedIndex = 1 + else + tem.item:GetController("mark_ting").selectedIndex = 2 + end + end + else + for i = 1, #_carViewList do + local btn = _carViewList[i].card + if btn:GetController("mark_ting").selectedIndex ~= 0 then + btn:GetController("mark_ting").selectedIndex = 0 + end + end + self._out_card = false + end + +end + +function M:__OnClickHandCard(context) + local button = context.sender + local _carViewList = self._carViewList + local refresh = true + local card_list = {} + for i=1,#_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + if btn ~= button and btn.selected == true then + if button.data.card_item == card then + refresh = false + else + self._mainView:markOutCards(false, card) + end + btn.selected = false + end + if not btn.selected then + table.insert(card_list, card) + end + end + + if self._out_card then + self:ShowHuTip(card_list) + end + + -- 标记出牌 + if refresh then + if button.selected then + self._mainView:markOutCards(true, button.data.card_item) + else + self._mainView:markOutCards(false, button.data.card_item) + end + end + + local _room = DataManager.CurrenRoom + if not button.selected and _room.curren_outcard_seat == _room.self_player.seat then + local card = button.data + self._mainView:OutCard(card.card_item) + end +end + +function M:__OnDragStart(card) + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + list_remove(card_list, card) + self:ShowHuTip(card_list) +end + +function M:__OnDragEnd(context) + if self.outcard_button then + self.outcard_button:Dispose() + self.outcard_button = nil + end + local button = context.sender + + --button:RemoveFromParent() + local card = button.data + local _room = DataManager.CurrenRoom + + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + if (button.y - card.old_postion.y < -50 and _room.curren_outcard_seat == _room.self_player.seat and card.card_item ~= 0) then + self._mainView:OutCard(card.card_item) + button.touchable = false + self.outcard_button = button + else + self._area_handcard_list:AddChildAt(button, card.index) + button:TweenMove(card.old_postion, 0.2) + end +end + +function M:CheckPlayerOnlineState() + local room = DataManager.CurrenRoom + for i = 1, #room.player_list do + if room.player_list[i].line_state == 0 then + return false + end + end + return true +end +function M:Clear(bskip) + --self._ctr_state.selectedIndex = 0 + self._area_fz_list.x = self._src_fz_list.x + self._area_fz_list.y = self._src_fz_list.y + self._area_fz_list.width = self._src_fz_list.z + self._area_fz_list.height = self._src_fz_list.w + + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_outcard_list:RemoveChildren(0, -1, true) + if bskip == nil or bskip == false then + self._mask_liangpai:RemoveChildren(0, -1, true) + end + + for i=1,#self._carViewList do + self._carViewList[i].card:Dispose() + end + self._carViewList = {} + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/lichuan/Protocol.lua b/lua_probject/extend_project/extend/majiang/lichuan/Protocol.lua new file mode 100644 index 00000000..4df49454 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/lichuan/Protocol.lua @@ -0,0 +1,52 @@ +local Protocol = { + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌 + GAME_DIS_CARD = "611", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- 提示选择行为 + GAME_ACTION = "612", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 小结算 + GAME_EVT_RESULT1 = "817", + + -- 大结算 + GAME_EVT_RESULT2 = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + + -- 抓鸟事件 + GAME_EVT_NIAO = "821", + + -- 飘鸟提示 + GAME_EVT_PIAOTIP = "833", + + -- 飘鸟事件 + GAME_EVT_PIAO = "834", + + GAME_EVT_GANGZI = "837", + GAME_EVT_BUGANG = "838", + GAME_EVT_DOGANG = "839", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/lichuan/RecordEvent.lua b/lua_probject/extend_project/extend/majiang/lichuan/RecordEvent.lua new file mode 100644 index 00000000..09748550 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/lichuan/RecordEvent.lua @@ -0,0 +1,11 @@ +local Record_Event = { + Evt_GetCard = "GetCard", + Evt_OutCard = "OutCard", + Evt_Action = "Action", + Evt_Win = "Win", + Evt_Niao = "Niao", + Evt_Piao = "PiaoNiao", + Evt_Result = "Result", +} + +return Record_Event \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/nancheng/CS_Win_Type.lua b/lua_probject/extend_project/extend/majiang/nancheng/CS_Win_Type.lua new file mode 100644 index 00000000..39c4692b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/nancheng/CS_Win_Type.lua @@ -0,0 +1,20 @@ +local CS_Win_Type = { + "点炮", + "自摸", + "十三烂", + "七星十三烂", + "碰碰胡", + "碰碰胡清一色", + "碰碰胡字一色", + "七小对", + "七小对清一色", + "七小对字一色", + "清一色真胡", + "清一色假胡", + "字一色真胡", + "字一色假胡", + "天胡", + "地胡", + "平胡", +} +return CS_Win_Type diff --git a/lua_probject/extend_project/extend/majiang/nancheng/CardCheck.lua b/lua_probject/extend_project/extend/majiang/nancheng/CardCheck.lua new file mode 100644 index 00000000..71dd7f8e --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/nancheng/CardCheck.lua @@ -0,0 +1,378 @@ +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + num = num == nil and 1 or num + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if(result ==num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local zhongid = 0 + + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + zhong_count = 0, + qidui = false, + hongzhong_count = 0, + qidui_pari_count = 0 +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + if (card == zhongid) then + self.zhong_count = self.zhong_count +1 + else + self.cardList[#self.cardList + 1] = card + end + end + table.sort(self.cardList) +end + +function M:tryShunzi(card) + if (card < 400 and card % 100 > 7) then + return false + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryKezi(card) + if (checkCardAndRomve(card, self.cardList, 3)) then + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (checkCardAndRomve(card, self.cardList, 2)) then + local cardGroup = {card,card} + self:push(cardGroup) + self.pair_count = 1 + return true + end + return false +end + + +function M:tryKezi1Zhong(card) + if (self.zhong_count >= 1 and checkCardAndRomve(card, self.cardList,2)) then + local cardGroup = {card,card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + return true + end + return false +end + +function M:tryKezi2Zhong(card) + if (self.zhong_count >= 2 and checkCardAndRomve(card, self.cardList,1)) then + local cardGroup = {card,zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + return true + end + return false +end + +function M:tryShunzi1Zhong(card) + if (card % 100 > 8) then + return false + end + + if (self.zhong_count < 1) then + return false + end + + if (checkCard(card + 1, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,card+1,zhongid} + self:push(cardGroup) + return true + end + + if (checkCard(card + 2, self.cardList) and ((card + 1) % 100 ~= 0)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 2, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,zhongid,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair1Zhong(card) + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 1) then + return false + end + removeCard(self.cardList, card, 1) + local cardGroup = {card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + self.pair_count = 1 + return true +end + +function M:tryPair2Zhong() + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 2) then + return false + end + local cardGroup = {zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + self.pair_count = 1 + return true +end + +function M:tryWin() + if (self.zhong_count == 4 and not self.eight_laizi) or (self.zhong_count == 8 and self.eight_laizi) then + return true + end + if (#self.cardList == 0 and self.pair_count == 1) then + return true + end + if (#self.cardList == 0 and self.pair_count == 0) then + return self:tryPair2Zhong() + end + + if (#self.cardList == 0) then + return false + end + + local activeCard = self.cardList[1] + if (self:tryPair(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + + if (self:tryKezi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi2Zhong(activeCard)) then + + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryPair1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + return false +end + +function M:checkQidui() + if (not self.qidui) then + return false + end + if ((#self.cardList + self.zhong_count) ~= 14) then + return false + end + local cardList = membe_clone(self.cardList) + self.qidui_pari_count = 0 + self.hongzhong_count = self.zhong_count + return self:isQdPari(cardList) +end + +function M:isQdPari(cardList) + if(self.qidui_pari_count == 7) then + return true + end + if (#cardList== 0) then + return true + end + local card = cardList[1] + if (cardNum(card, cardList) >= 2) then + removeCard(cardList, card, 2) + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + + if (self.hongzhong_count > 0) then + removeCard(cardList, card, 1) + self.hongzhong_count = self.hongzhong_count - 1 + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + return false +end + +local function init(self,cardInhand,addCard,isZhong,qidui,eightLaizi) + self.stack = {} + self.pair_count = 0 + self.cardList = membe_clone(cardInhand) + self.qidui = qidui + self.eight_laizi = eightLaizi + self.cardList[#self.cardList+1] = addCard + if (isZhong) then + self.zhong_count = cardNum(zhongid, self.cardList) + removeCard(self.cardList, zhongid, self.zhong_count) + end + table.sort(self.cardList) + --printlog("添加排序====>>>") + --pt(self.cardList) + return self:checkQidui() or self:tryWin() +end + +local specialCardList={400,403,406,409,412,415,418} +function M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + --printlog("isZhong",isZhong) + --printlog("qidui",qidui) + --printlog("eightLaizi",eightLaizi) + --pt(cardInhand) + local self = setmetatable({}, {__index = M}) + local tingList = {} + if not cardInhand or #cardInhand == 0 then + return tingList + end + for k=100,300,100 do + for i=1,9 do + local tem = k + i + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + --printlog("返回结果为===>>>",result) + if(result) then + tingList[#tingList + 1] = tem + end + end + end + + for j=1,#specialCardList do + local tem = specialCardList[j] + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + if(result) then + tingList[#tingList + 1] = tem + end + end + + return tingList +end + +function M.MuiltiplteCaculateTingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + zhongid=DataManager.CurrenRoom.laiziInfo[1] + local tempTingList2={} + local tempTingList1=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo[2] then + zhongid=DataManager.CurrenRoom.laiziInfo[2] + tempTingList2=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + zhongid=DataManager.CurrenRoom.laiziInfo[1] + end + local currentTingList={} + if #tempTingList1>0 and #tempTingList2>0 then + currentTingList=CombineDictionaryAndRemoveSomeItem(tempTingList1,tempTingList2) + elseif #tempTingList1>0 then + currentTingList=tempTingList1 + elseif #tempTingList2>0 then + currentTingList=tempTingList2 + end + + return currentTingList + + else + zhongid=0 + return M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + end + +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXClearingView.lua new file mode 100644 index 00000000..e4bd30a6 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/nancheng/EXClearingView.lua @@ -0,0 +1,615 @@ +require("Game.View.ResultView") +local Hu_Type_Name = import(".CS_Win_Type") + +local EXClearingView = {} + +local M = EXClearingView + +function EXClearingView.new(blur_view) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self._full = true + ResultView.init(self, "ui://Main_Majiang/clearing") + + self._currenIndex = 0 + self._blur_view = blur_view + self._close_zone = false + self:InitMaPai() + + return self +end + +function M:InitMaPai() + self.maPaiCtr=self._view:GetController("mapai") + self.maPaiCtr.selectedIndex=0 + + self.maPaiList={} + + for i=1,8 do + local tempMP=self._view:GetChild("niao"..i) + table.insert(self.maPaiList,tempMP) + end + +end + + +function M:IsMapaiShow(niao,isShow) + if niao then + niao.visible=isShow + end +end + + +function M:SetMaPaiValue(niao,value) + if niao then + niao.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..value + end +end + +function M:SetMaPaiColor(niao,num) + niao:GetController("color").selectedIndex=num +end + +function M:HideAllMapai() + for i=1,#self.maPaiList do + self:IsMapaiShow(self.maPaiList[i],false) + self:SetMaPaiColor(self.maPaiList[i],0) + end +end + + + +function M:ShowSelectMaPai(niaoList) + if niaoList and #niaoList>0 then + self.maPaiCtr.selectedIndex=1 + self:HideAllMapai() + for i=1,#niaoList do + self:IsMapaiShow(self.maPaiList[i],true) + self:SetMaPaiValue(self.maPaiList[i],niaoList[i].card) + if niaoList[i].score>0 then + self:SetMaPaiColor(self.maPaiList[i],2) + end + end + else + self.maPaiCtr.selectedIndex=0 + end +end + + + +function M:CalculatePaixingInfo(result) + self.WinList={} + if result.info_list and #result.info_list>0 then + for i=1,#result.info_list do + if result.info_list[i].win_list and #result.info_list[i].win_list>0 then + table.insert(self.WinList,result.info_list[i].win_list) + end + end + end + + printlog("牌型列表====>>>") + pt(self.WinList) +end + + +function M:SetPaixingxiangqing(num) + for i=1,#self.PaiXingXiangQingCtrList do + if self.PaiXingXiangQingCtrList[i] then + self.PaiXingXiangQingCtrList[i].selectedIndex=num + end + end +end + + + +function M:InitData(over, room, result, total_result, callback) + + self._callback = callback + local _overCtr = self._view:GetController("over") + local btn_confirm = self._view:GetChild("btn_confirm") + local btn_result = self._view:GetChild("btn_showResult") + local btn_close = self._view:GetChild("big_result"):GetChild("btn_close") + local _btnCtr = self._view:GetController("button") + local _sdkCtr = self._view:GetController("sdk") + local ctr_type = self._view:GetController("type") + + self._view:GetChild("tex_roominfo").text = string.format("房号%s 局%s/%s %s", room.room_id, room.curren_round, room.room_config.round, os.date("%Y-%m-%d %H:%M:%S", os.time())) + self._view:GetChild("tex_gameinfo").text = string.gsub(room.room_config:GetDes2(), "\r", "") + + if result then + self:ShowSelectMaPai(result.niao) + self:CalculatePaixingInfo(result) + end + + self.PaiXingXiangQingCtrList={} + + local paixingxiangqing=self._view:GetChild("btn_detal") + local fanhuipaixing=self._view:GetChild("btn_fanhuipaixing") + fanhuipaixing.visible=false + paixingxiangqing.visible=true + paixingxiangqing.onClick:Add(function() + paixingxiangqing.visible=false + fanhuipaixing.visible=true + self:SetPaixingxiangqing(1) + end) + fanhuipaixing.onClick:Add(function() + paixingxiangqing.visible=true + fanhuipaixing.visible=false + self:SetPaixingxiangqing(0) + end) + + + if over ~= 2 then + if result.liuju then + ctr_type.selectedIndex = 3 + else + local info_list = result.info_list + for i = 1, #info_list do + local is_win = info_list[i].is_win + if is_win then + if info_list[i].seat == room.self_player.seat then + ctr_type.selectedIndex = 1 + else + ctr_type.selectedIndex = 2 + end + end + end + end + + if over == 0 then + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + btn_confirm.onClick:Add(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:DestroyWithCallback() + end) + self:AddClearItem(room, result.info_list, nil, over, result.niao, result.active_player) + elseif over == 1 then + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add(function() + self.maPaiCtr.selectedIndex=0 + _overCtr.selectedIndex = 1 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + if self._qsinfo_view then + self._qsinfo_view:Dispose() + end + end) + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + + self:AddClearItem(room, result.info_list, total_result.info_list, over, result.niao, result.active_player) + end + else + _overCtr.selectedIndex = 1 + self.maPaiCtr.selectedIndex=0 + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + + self:AddClearItem(room, nil, total_result.info_list, over) + end +end + +function M:AddClearItem(room, data, total_data,over, niao, active_player) + local n = over + 1 + local list_view1 = self._view:GetChild("player_list_1") + local list_view2 = self._view:GetChild("player_list_2") + + if 0 == over or 1 == over then + table.sort(data, function(a,b) return a.seat < b.seat end) + list_view1:RemoveChildrenToPool() + + for i=1,#data do + local item = list_view1:AddItemFromPool() + self:FillItemData(room, data[i], item, active_player, niao) + end + if #data == 3 then + list_view1.lineGap = 54 + elseif #data == 2 then + list_view1.lineGap = 108 + end + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end +end + +function M:FillItemData(room, data, item, active_player, niao) + + local _gamectr = ControllerManager.GetController(GameController) + local p = room:GetPlayerBySeat(data["seat"]) + item:GetChild("playerName").text = p.self_user.nick_name + item:GetChild("lab_hp").text=""--抓马 + local user = room:GetPlayerBySeat(data["seat"]).self_user + local head = item:GetChild('head'):GetChild('n4') + ImageLoad.Load(user.head_url, head) + + -- 手牌 + local hand_cards = data["hand_card"] + table.sort( hand_cards, ViewUtil.HandCardSort) + local hand_list_view = item:GetChild("hand_card_list") + hand_list_view:RemoveChildrenToPool() + for i=1,#hand_cards do + local card = hand_list_view:AddItemFromPool() + card.icon = "ui://Main_Majiang/202_"..hand_cards[i] + end + hand_list_view.width = 52 * #hand_cards + + local fz_card = p.fz_list + local fz_card_list = item:GetChild("fz_card_list") + fz_card_list.width = 157 * #fz_card * 0.8 + fz_card_list:RemoveChildrenToPool() + + for i=1,#fz_card do + if fz_card[i].type == FZType.Peng then + + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j=1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + elseif fz_card[i].type == FZType.Chi then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j = 1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/" .. self:GetPrefix().."202_"..fz_card[i].opcard[j] + end + elseif fz_card[i].type == FZType.Gang or fz_card[i].type == FZType.Gang_An or fz_card[i].type == FZType.Gang_Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_4") + for j=1,4 do + local card = item:GetChild("card_" .. j) + if fz_card[i].type == FZType.Gang_An and j == 4 then + card.icon = "ui://Main_Majiang/202_00" + else + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + end + end + end + + local huadd = data["hu_score"] + local gangadd = data["gang_score"] + local total = data["round_score"] + local geng_zhuan=data["geng_zhuan"] + local sp = " " + local str = "胡:"..huadd.."分" + str = str..sp.."杠:"..gangadd.."分" + + + + + + item:GetChild("score1").text = str + -- local total_score = data["total_score"] + if total >= 0 then + item:GetChild("score2").text = "+"..total + item:GetChild("score2").grayed = false + else + item:GetChild("score2").text = total + item:GetChild("score2").grayed = true + end + + + --计算牌型 + local totalPeson=DataManager.CurrenRoom.room_config.people_num-1 + local win_list = data["win_list"] + local is_win = data["is_win"] or false + local str1="" + sp="、" + if is_win then + if win_list then + if DataManager.CurrenRoom.isZiMoHu then + str1="自摸" + else + str1="接炮" + end + for i=1,#win_list do + local huName=Hu_Type_Name[win_list[i].type] + if huName then + str1=str1..sp..huName.."x"..win_list[i].score + end + + end + str1=str1.." +"..huadd.."分" + end + + else + printlog("输家============") + if DataManager.CurrenRoom.isZiMoHu then + printlog("自摸处理============") + --str1="" + if #self.WinList==1 then + for i=1,#self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + if j==1 then + str1=str1..huName.."x"..self.WinList[i][j].score + else + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + + end + end + + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + else + printlog("非自摸处理====>>>") + --点炮 一炮多响 + local yipaoduoxiang=false + if #self.WinList>1 then + yipaoduoxiang=true + end + + if yipaoduoxiang then + printlog("一炮多响====>>>") + str="点炮" + local allTypeList={} + local isHas=false + for i=1,#self.WinList do + for j=1,#self.WinList[i] do + isHas=IsHasDictionary(self.WinList[i][j].type,allTypeList) + if isHas==false then + table.insert(allTypeList,self.WinList[i][j].type) + end + end + + end + + if #allTypeList>0 then + for i=1,#allTypeList do + local huName=Hu_Type_Name[allTypeList[i]] + if huName then + str1=str1..huName.."、" + end + end + str1=str1.." "..huadd.."分" + end + + else + + if p.self_user.account_id == active_player and is_win == false and not data["liuju"] then + str1="点炮" + if #self.WinList==1 then + for i=1,# self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + end + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + end + + end + + + end + end + + -- + printlog("牌型计算==>>>",str1) + + if data["ming_gang_num"]>0 then + str1=str1.." 明杠x"..data["ming_gang_num"] + end + + if data["an_gang_num"]>0 then + str1=str1.." 暗杠x"..data["an_gang_num"] + end + + if data["dian_gang_num"]>0 then + str1=str1.." 点杠x"..data["dian_gang_num"] + end + + if gangadd~=0 then + if gangadd>0 then + str1=str1.." +"..gangadd.."分" + else + str1=str1.." "..gangadd.."分" + end + + end + + if data["ma_geng_gong"] and data["ma_geng_gong"]~=0 then + if data["ma_geng_gong"]>0 then + str1 = str1.." 马跟杠:+"..data["ma_geng_gong"].."分" + else + str1 = str1.." 马跟杠:"..data["ma_geng_gong"].."分" + end + + end + + if geng_zhuan and geng_zhuan~=0 then + if geng_zhuan>0 then + str1 = str1.." 跟庄:+"..geng_zhuan.."分" + else + str1 = str1.." 跟庄:"..geng_zhuan.."分" + end + + end + + + + + + item:GetChild("score3").text=str1 + item:GetChild("score4").text=str1 + local paixingCtr=item:GetController("detail") + table.insert(self.PaiXingXiangQingCtrList,paixingCtr) + ------------------------- + + local hp_nonnegative = room:checkHpNonnegative() + item:GetController("nonnegative").selectedIndex = hp_nonnegative and 1 or 0 + if hp_nonnegative then + local hp_info = data.hp_info + local ctr_hp_limit = item:GetController("hp_limit") + local hp = d2ad(hp_info.round_actual_hp) + if hp >= 0 then hp = "+" .. tostring(hp) end + item:GetChild("tex_hp").text = hp + ctr_hp_limit.selectedIndex = hp_info.upper_limit and 1 or 0 + end + + + item:GetController("win").selectedIndex = is_win and 0 or 1 + if p.self_user.account_id == active_player and is_win == false and total < 0 then + item:GetController("win").selectedIndex = 2 + end + + if is_win then + item:GetController("bg").selectedIndex=1 + else + item:GetController("bg").selectedIndex=0 + end + local win_card = item:GetChild("win_card") + win_card.icon = "ui://Main_Majiang/202_"..data["win_card"] + + if niao and #niao>0 then + local currentNiaoList=self:CalculateNiao(niao ,data["seat"]) + if currentNiaoList and #currentNiaoList>0 then + local lst_niao = item:GetChild("list_niao") + lst_niao:RemoveChildrenToPool() + for i = 1, #currentNiaoList do + if currentNiaoList[i].score > 0 then + local card_niao = lst_niao:AddItemFromPool() + card_niao.icon = "ui://Main_Majiang/202_" .. currentNiaoList[i].card + end + end + end + end + + + + if p.seat == room.banker_seat then + item:GetController("bank").selectedIndex = 1 + end +end + +function M:CalculateNiao(niaoList,seat) + local tempNiao={} + for i=1,#niaoList do + if niaoList[i].seat==seat then + table.insert(tempNiao,niaoList[i]) + end + end + return tempNiao +end + + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + player_list[i].id = user.account_id + player_list[i].hp_info = data[i].hp_info + player_list[i].score = data[i].total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + + local settle_log = data[i].settle_log + player_list[i].param = {} + player_list[i].param[1]={} + player_list[i].param[1].key = "自摸次数:" + player_list[i].param[1].value = tostring(data[i].settle_log.zimo) + player_list[i].param[2]={} + player_list[i].param[2].key = "接炮次数:" + player_list[i].param[2].value = tostring(data[i].settle_log.jie_pao) + player_list[i].param[3]={} + player_list[i].param[3].key = "点炮次数:" + player_list[i].param[3].value = tostring(data[i].settle_log.dian_pao) + player_list[i].param[4]={} + player_list[i].param[4].key = "暗杠次数:" + player_list[i].param[4].value = tostring(data[i].settle_log.an_kong) + player_list[i].param[5]={} + player_list[i].param[5].key = "明杠次数:" + player_list[i].param[5].value = tostring(data[i].settle_log.ming_kong) + end + + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + local big_result = self._view:GetChild("big_result") + big_result:GetChild("txt_room_info").text = string.format("%s 房号%s 局%s/%s", os.date("%Y/%m/%d", os.time()), room.room_id, room.curren_round, room.room_config.round) + local lst_p = big_result:GetChild("player_list") + if #player_list == 3 then + lst_p.columnGap = 108 + elseif #player_list == 2 then + lst_p.columnGap = 208 + end + + self:InitBigResult(room, 30) + local show_detail = room.hpOnOff == 1 + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + com_p:GetController("jsicon").selectedIndex=i-1 + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + if show_detail then + local score = 0 + if com_p:GetController("pn").selectedIndex == 0 then + score = com_p:GetChild("txt_navigate").text + else + score = com_p:GetChild("txt_positive").text + end + score = score / room.score_times + com_p:GetChild("tex_detail_score").text = string.format("%s × %s倍", score, room.score_times) + end + end + + if room.group_id ~= 0 then + big_result:GetController("group").selectedIndex = 1 + end + DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild("btn_head") + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= "" then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end + +local prefix +function M:GetPrefix() + -- if not prefix then + prefix = get_majiang_prefix(10) + -- end + return prefix +end + +function M:DestroyWithCallback() + if self._callback then + self._callback() + end + self:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXGameController.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXGameController.lua new file mode 100644 index 00000000..3bd6a49a --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/nancheng/EXGameController.lua @@ -0,0 +1,385 @@ +local TX_Protocol = import(".Protocol") +local FZTipList = require("main.majiang.FZData") +local TX_GameEvent = import(".GameEvent") + +local M = {} + +--- Create a new GameController +function M.new() + setmetatable(M, { __index = GameController }) + local self = setmetatable({}, { __index = M }) + self:init("南城麻将") + self.class = "TX_GameController" + return self +end + +function M:init(name) + GameController.init(self, name) + + self._eventmap[TX_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[TX_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[TX_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[TX_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[TX_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[TX_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + self._eventmap[TX_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[TX_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[TX_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[TX_Protocol.GAME_EVT_RESULT2] = self.OnEventResult2 + self._eventmap[TX_Protocol.GAME_EVT_NIAO] = self.OnEventNiao + self._eventmap[TX_Protocol.GAME_EVT_PIAOTIP] = self.OnEventPiaoTip + self._eventmap[TX_Protocol.GAME_EVT_PIAO] = self.OnEventPiao + + self._eventmap[TX_Protocol.GAME_EVT_GANGZI] = self.OnEventGangCards + self._eventmap[TX_Protocol.GAME_EVT_BUGANG] = self.OnEventBuGang +end + +local __pre_delete_card = false +-- 发送出牌指令到服务器 +function M:SendOutCard(card, callback) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_DIS_CARD, _data) + + -- 进行预删牌处理 + local p = _room.self_player + _room.curren_outcard_seat = -1 + list_remove(p.card_list, card) + table.sort(p.card_list, ViewUtil.HandCardSort) + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list + 1] = card + __pre_delete_card = true + callback() +end + +function M:SendGangCard(card) + local _data = {} + _data["card"] = card + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_EVT_DOGANG, _data) +end + +function M:OnEventGangCards(evt_data) + printlog("OnEventGangCards") + pt(evt_data) + DispatchEvent(self._dispatcher, TX_GameEvent.SendGangZi, evt_data["gangzi1"], evt_data["gangzi2"], + evt_data["gangnum"], true) +end + +function M:OnEventBuGang(evt_data) + printlog("OnEventBuGang") + pt(evt_data) + DispatchEvent(self._dispatcher, TX_GameEvent.EventBuGang, evt_data["info"], true) +end + +-- 发送放子选择到服务器 +function M:SendAction(id) + local _data = {} + _data["id"] = id + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_ACTION, _data) +end + +function M:OnEventSendCards(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + if not _room.room_config.piao_niao or _room.self_player.entrust then + _room.curren_round = _room.curren_round + 1 + end + if _room.curren_round > 0 then _room.playing = true end + + printlog("开始发牌===========>>>") + pt(evt_data) + + local room = DataManager.CurrenRoom + --printlog(evt_data.laiziCard) + --printlog(evt_data.laiziCard2) + --printlog(evt_data.laiziCardBefore) + --printlog(evt_data.laiziCard2Before) + + + DispatchEvent(self._dispatcher, TX_GameEvent.SendGangZi, 102, 103, 0, true) + + + + -- _room.SelfPlayer.AutoOutCard = false + local handcards = evt_data["card_list"] + local p = _room.self_player + local seat = evt_data["bank_seat"] + self._cacheEvent:Enqueue(function() + _room.banker_seat = seat + for i = 1, #_room.player_list do + _room.player_list[i].hand_left_count = 13 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + end + p.card_list = handcards + self._room.self_player.hand_left_count = #handcards + table.sort(handcards, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher, TX_GameEvent.SendCards, p) + end) +end + +function M:OnEventOutCard(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local ting_list = nil + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + _room.last_outcard_seat = seat + if seat == _room.self_player.seat and __pre_delete_card then + __pre_delete_card = false + else + if seat == _room.self_player.seat then + list_remove(p.card_list, card) + table.sort(p.card_list, ViewUtil.HandCardSort) + end + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list + 1] = card + DispatchEvent(self._dispatcher, TX_GameEvent.OutCard, p, card) + end + end) +end + +function M:OnEventTakeCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + p.hand_left_count = p.hand_left_count + 1 + if (seat == _room.self_player.seat) then + _room.self_player.card_list[#_room.self_player.card_list + 1] = card + -- table.sort( _room.self_player.card_list, ViewUtil.HandCardSort ) + end + DispatchEvent(self._dispatcher, TX_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnEventOutHint(evt_data) + self._cacheEvent:Enqueue(function() + self._room.curren_outcard_seat = self._room.self_player.seat + DispatchEvent(self._dispatcher, TX_GameEvent.OutHint) + end) +end + +function M:OnEventTurn(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + -- self._room.curren_outcard_seat = seat + DispatchEvent(self._dispatcher, TX_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + local weight = evt_data["weight"] + for i = 1, #list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + tip.opcard = dtip["opcard"] + + -- if (dtip["opcard"]) then + -- local opcard = dtip["opcard"] + -- tip.OpCard = opcard + -- tip.OpCard[3] = tip.Card + -- table.sort(tip.OpCard) + -- end + tiplist:AddTip(tip) + end + DispatchEvent(self._dispatcher, TX_GameEvent.FZTips, tiplist, weight) + end) +end + +function M:OnEventFzAction(evt_data) + local _room = self._room + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local type = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + -- local openkong = evt_data["openkong"] + + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local fz = nil + local index = -1 + local ftype = type + if (ftype == FZType.Gang_Peng) then + for i = 1, #p.fz_list do + if (p.fz_list[i].card == card) then + p.fz_list[i].card = card + fz = p.fz_list[i] + fz.type = type + index = i - 1 + break + end + end + end + fz = {} + fz.card = card + fz.type = type + fz.active_card = actice_card + if (index == -1) then + if (ftype == FZType.Chi) then + local data = {} + data[1] = opcard[1] + data[2] = card + data[3] = opcard[2] + fz.opcard = data + end + p.fz_list[#p.fz_list + 1] = fz + end + fz.from_seat = from_seat + local remove_num = #opcard + + if (p == _room.self_player) then + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + end + + p.hand_left_count = p.hand_left_count - remove_num + if from_seat ~= p.seat then + -- if (fz.Type == FZType.Chi) then card = actice_card end + local fp = _room:GetPlayerBySeat(from_seat) + table.remove(fp.outcard_list, #fp.outcard_list) + end + + DispatchEvent(self._dispatcher, TX_GameEvent.FangziAction, fz, p, index) + end) +end + +function M:OnEventHu(evt_data) + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local win_card = evt_data["win_card"] + local win_list = evt_data["win_list"] + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + table.sort(win_p.card_list, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher, TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], win_card, cards, + win_list) + end) +end + +function M:OneventResult1(evt_data) + local over = evt_data.type + printlog("OneventResult1") + pt(evt_data) + --0:小结算 1:小大结算 2:大结算 + self._room._reload_flag = false + self._room.playing = false + if 0 == over then + local result = evt_data.result + self._cacheEvent:Enqueue(function() + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + DispatchEvent(self._dispatcher, TX_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil, true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher, TX_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +-- function M:OnEventResult2(evt_data) +-- DataManager.CurrenRoom.Over = true +-- ControllerManager.SetGameNetClient(nil,true) +-- local info_list = evt_data["info_list"] +-- if self._result ~= nil then +-- self._cacheEvent:Enqueue(function() +-- self:OneventResult1(self._result) +-- self._result = nil +-- end) +-- end +-- self._cacheEvent:Enqueue(function() +-- DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, info_list) +-- ControllerManager.ChangeController(LoddyController) +-- end) +-- end + +function M:OnEventNiao(evt_data) + local list = evt_data["niao"] + local start_seat = evt_data["start_seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher, TX_GameEvent.EventNiao, list, start_seat) + end) +end + +function M:OnEventPiaoTip() + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + self._cacheEvent:Enqueue(function() + if not self._room._reload_flag then + self._room.curren_round = self._room.curren_round + 1 + end + self._room.playing = true + DispatchEvent(self._dispatcher, TX_GameEvent.EvnetPiaoTip, evt_data) + end) +end + +function M:OnEventPiao(evt_data) + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher, TX_GameEvent.EvnetPiao, evt_data.seat, evt_data.num) + end) +end + +function M:GetPosString(seat) + if DataManager.CurrenRoom.room_config.people_num ~= 4 then return "" end + if seat == 1 then + return "北" + elseif seat == 2 then + return "西" + elseif seat == 3 then + return "南" + elseif seat == 4 then + return "东" + end +end + +function M:Discard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + -- list_remove(_room.SelfPlayer.Cards,card) + -- table.sort(_room.SelfPlayer.Cards) + _client:send(Protocol.Game_Da, _data) +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXGameInfo.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXGameInfo.lua new file mode 100644 index 00000000..e6a63c52 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/nancheng/EXGameInfo.lua @@ -0,0 +1,185 @@ +local EXGameInfo = {} + +local M = EXGameInfo + + +function EXGameInfo.new(blur_view) + setmetatable(M, { __index = IGameInfo }) + local self = setmetatable({}, { __index = M }) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/majiang/nancheng/ui/Info_MJ_NanCheng") + return self +end + +function M:FillData() + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 3 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_NanCheng/Label_Detail_83") + + -- if oldGameVersion == 2 then + -- self._config:GetController("xipai").selectedIndex = 0 + + -- self.xipaiValueText = self._config:GetChild('xipaifen') + -- self.xipaiValueText.text = 1 + -- self.xipaiValue = 1 + + -- self.anchouValueText = self._config:GetChild('anchoufen') + -- self.anchouValueText.text = 1 + -- self.anchouValue = 1 + + -- local btn_cr = self._config:GetChild('sdsrbtn') + -- btn_cr.onClick:Set( + -- function() + -- local gniv = GroupNumberInputView_Game.new(nil, function(num) + -- local value = limit + -- if otype == 1 then + -- value = value + ad2d(num) + -- elseif otype == -1 then + -- value = value - ad2d(num) + -- else + -- value = ad2d(num) + -- end + + -- if value < 0 then + -- ViewUtil.ErrorTip(1, "输入数据异常!") + -- end + + -- self.xipaiValueText.text = value / 1000 + -- self.xipaiValue = value / 1000 + -- end, 3, nil) + -- gniv:Show() + -- end + -- ) + + + -- local btn_cr2 = self._config:GetChild('anchoubtn') + -- btn_cr2.onClick:Set( + -- function() + -- local gniv = GroupNumberInputView_Game.new(nil, function(num) + -- local value = limit + -- if otype == 1 then + -- value = value + ad2d(num) + -- elseif otype == -1 then + -- value = value - ad2d(num) + -- else + -- value = ad2d(num) + -- end + + -- if value < 0 then + -- ViewUtil.ErrorTip(1, "输入数据异常!") + -- end + + -- self.anchouValueText.text = value / 1000 + -- self.anchouValue = value / 1000 + -- end, 3, nil) + -- gniv:Show() + -- end + -- ) + -- end +end + +local _help_url = "ui://Info_MJ_NanCheng/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_MJ_NanCheng/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_MJ_NanCheng/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list = {} +function M:GetPlayList() + return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + 1 + local people = _config:GetController("peopleNum").selectedIndex + 2 + + local zimo = _config:GetController("ZiMo").selectedIndex + local shaozhuang = _config:GetController("ShaoZhuang").selectedIndex + local fengding = _config:GetController("FengDing").selectedIndex + local zuoma = _config:GetController("ZuoMa").selectedIndex + local zhuanwan = _config:GetController("ZhuanWan").selectedIndex + local jiahu = _config:GetController("JiaHu").selectedIndex + + + local jiangma = _config:GetChild("n92").value + + local xi_pai = false + local xi_paifen = 0 + if _config:GetChild("xipai") then + xi_pai = _config:GetChild("xipai").selected + end + + + + ------ + local _data = {} + _data["opt"] = round + _data["maxPlayers"] = people + + _data["zimo"] = zimo + _data["shaozhuang"] = shaozhuang + _data["fengding"] = fengding + _data["zuoma"] = zuoma + _data["zhuanwan"] = zhuanwan + _data["jiahu"] = jiahu + + _data["jiangma"] = jiangma + _data['xi_pai'] = xi_pai + + local xi_pai_score = 0 + local an_chou_score = 0 + -- if oldGameVersion == 2 then + -- xi_pai_score = self.xipaiValue + -- an_chou_score = self.anchouValue + -- end + + _data['xi_pai_score'] = xi_pai_score * 1000 + _data['an_chou_score'] = an_chou_score * 1000 + + + return _data +end + +function M:LoadConfigData(data) + --printlog("加载房间配置=========>>>") + --pt(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt - 1 + _config:GetController("play_list").selectedIndex = data.maxPlayers - 2 + + + _config:GetController("fengding").selectedIndex = data.fengding + + _config:GetController("wanfa").selectedIndex = data.wanfa + _config:GetChild("btn_qidui").selected = data.qiduijiafan + _config:GetChild("btn_shoudailong").selected = data.shoudailongjiafan + _config:GetChild("btn_loudilong").selected = data.loudilongjiafan + _config:GetChild("btn_bunengchi").selected = data.bunengchi + + _config:GetChild("btn_doudizhu").selected = data.doudizhu + _config:GetChild("btn_doudizhufanbei").selected = data.doudizhufanbei + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected = data.xi_pai + end + + -- if oldGameVersion == 2 then + -- self.xipaiValueText.text = data.xi_pai_score / 1000 + -- self.xipaiValue = data.xi_pai_score / 1000 + + -- self.anchouValueText.text = data.an_chou_score / 1000 + -- self.anchouValue = data.an_chou_score / 1000 + -- end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua new file mode 100644 index 00000000..43a04a0b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/nancheng/EXMainView.lua @@ -0,0 +1,817 @@ +local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local MJMainView = require("main.majiang.MJMainView") +local EXClearingView = import(".EXClearingView") +local TX_GameEvent = import(".GameEvent") +local HuTipView = import("main.majiang.HuTipView") +local SettingView = import("main.majiang.MJSettingViewNew") +local PlayerInfoView = import(".EXPlayerInfoView") +local M = {} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M, { __index = MJMainView }) + local self = setmetatable({}, { __index = M }) + self.class = "MainView" + self.asset_group = "NanCheng_MJ" + self:init() + ViewUtil.PlayMuisc(self.asset_group, "extend/majiang/nancheng/sound/bg.mp3") + return self +end + +function M:InitView(url) + local room = self._room + self._style = 1 + self._gps_style = 1 + self._full = true + UIPackage.AddPackage("extend/majiang/nancheng/ui/Extend_MJ_NanCheng") + MJMainView.InitView(self, "ui://Main_Majiang/Main_" .. room.room_config.people_num .. "_s2") + self._hu_tip = HuTipView.new(self) + + self._view:GetChild('wanfa_text').text = room.room_config.people_num .. '人个旧麻将 ' .. room.score_times .. '倍' + + self.selectLaiziBtn = self._view:GetChild('selectlaizi') + self.Laizi1Btn = self._view:GetChild('selectgang1') + self.Laizi2Btn = self._view:GetChild('selectgang2') + self._view:GetChild("n108").visible = true + self.Laizi1Btn.visible = true + self.Laizi2Btn.visible = true + self.bugangnum = self._view:GetChild("bugangnum") + + self:PlayerChangeLineState() + + if room.playing or room.curren_round > 0 then + self:ReloadRoom() + end +end + +function M:__BuGang(cardInfo, callback) + local _gang_tip_choice = UIPackage.CreateObject("Extend_MJ_NanCheng", "Gang_tip_choice") + _gang_tip_choice.visible = true + + local list_card = _gang_tip_choice:GetChild("list_card") + list_card:SetVirtual() + list_card.itemRenderer = function(index, obj) + obj.icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. cardInfo[index + 1]) + end + list_card.numItems = #cardInfo + list_card.onClickItem:Set(function(context) + local item = context.data + local index = item.data + callback(cardInfo[index + 1]) + end) + + + _gang_tip_choice.xy = Vector2((self._view.width - _gang_tip_choice.width) / 2, + (self._view.height - _gang_tip_choice.height) / 2) + self._view:AddChild(_gang_tip_choice) + self._gang_tip_choice = _gang_tip_choice +end + +function M:SetShowGangZiProcess(currentLaizi1ID, currentLaizi2ID, bugangnum, isShowAnim) + --zhongid=currentLaizi1ID + if isShowAnim == nil then isShowAnim = false end + + self:SetGangZiCard(self.Laizi1Btn, currentLaizi1ID) + self:SetGangZiCard(self.Laizi2Btn, currentLaizi2ID) + self:IsShowGangZi(self.Laizi1Btn, true) + self:IsShowGangZi(self.Laizi2Btn, true) + self.bugangnum.text = "当前 " .. bugangnum .. " 杠" +end + +function M:HideAllGangZiCard() + self.Laizi1Btn.visible = false + self.Laizi2Btn.visible = false + self.selectLaiziBtn.visible = false + --self.LaiziBG.visible=false +end + +function M:SetGangZiCard(btn, cardId) + btn.icon = 'ui://Main_Majiang/' .. get_majiang_prefix(DataManager.CurrenRoom.game_id) .. "201_" .. cardId +end + +function M:IsShowGangZi(btn, isShow) + btn.visible = isShow +end + +function M:UpdateRound() + self._view:GetChild("tex_round1").text = self._room.curren_round + self._view:GetChild("tex_round2").text = self._room.room_config.round +end + +function M:InitPlayerInfoView() + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem, self) + tem.visible = false + end +end + +function M:NewMJPlayerCardInfoView(view, index) + if index == 1 then + return MJPlayerSelfCardInfoView.new(view, self) + end + return MJPlayerCardInfoView.new(view, self) +end + +function M:EventInit() + -- UIPackage.AddPackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong") + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _gcm_outcard_url = UIPackage.GetItemURL("Main_Majiang", "Gcm_OutCard") + local _player_info = self._player_info + local _gamectr = self._gamectr + + + + _gamectr:AddEventListener(TX_GameEvent.SendLaiZi, function(...) + local arg = { ... } + self:SetShowLaiZiProcess(arg[1], arg[2], arg[3], arg[4]) + end) + + _gamectr:AddEventListener(TX_GameEvent.SendGangZi, function(...) + local arg = { ... } + self:SetShowGangZiProcess(arg[1], arg[2], arg[3], arg[4]) + end) + + _gamectr:AddEventListener(TX_GameEvent.EventBuGang, function(...) + local arg = { ... } + self:__BuGang(arg[1], + function(id) + printlog(id) + _gamectr:SendGangCard(id) + self:__CloseGangTip() + end) + end) + + + + _gamectr:AddEventListener(TX_GameEvent.SendCards, function(...) + -- self:ShowHuTip() + self:UpdateRound() + self._state.selectedIndex = 1 + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateHandCard() + end + end) + _gamectr:AddEventListener(TX_GameEvent.EventTurn, function(...) + local arg = { ... } + self._left_time = 15 + local seat = arg[1] + self:UpdateCardBox(self:GetPos(seat)) + -- if seat == self._room.self_player.seat then + -- self:ShowHuTip() + -- end + end) + + _gamectr:AddEventListener(TX_GameEvent.OutHint, function(...) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:UpdateHandCard(true) + end) + + local _gcm_outcard_url = "ui://Main_Majiang/Gcm_OutCard" + _gamectr:AddEventListener(TX_GameEvent.OutCard, function(...) + self:__CloseTip() + self._left_time = 0 + local arg = { ... } + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:RemoveCursor() + info:UpdateHandCard() + local outcard = UIPackage.CreateObjectFromURL(_gcm_outcard_url) + info:UpdateOutCardList(outcard, card, self._cursor) + self:PlaySound("NanCheng_MJ", p.self_user.sex, tostring(card)) + self:PlayMJSound("chupai.mp3") + if seat == _room.self_player.seat then + _room.curren_outcard_seat = -1 + end + end) + _gamectr:AddEventListener(TX_GameEvent.GetCard, function(...) + self:__CloseTip() + local arg = { ... } + local seat = arg[1] + local card = arg[2] + -- self._tex_leftTime.text = arg[3] + self._tex_LeftCard.text = arg[3] + -- self:UpdateRoomInfo() + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateHandCard(true) + end) + + _gamectr:AddEventListener(TX_GameEvent.FZTips, function(...) + local arg = { ... } + local _tip = arg[1] + local weight = arg[2] + self:__FangziTip(_tip, weight) + end) + + _gamectr:AddEventListener(TX_GameEvent.FangziAction, handler(self, self.OnFangziAction)) + + _gamectr:AddEventListener(TX_GameEvent.ZPHuCard, function(...) + self._left_time = 0 + self:UpdateCardBox(0) + self:__CloseTip() + self._popEvent = false + local arg = { ... } + local win_seat = arg[1] + local lose_seat = arg[2] + local win_card = arg[3] + local cards = arg[4] + local win_list = arg[5] + local index = self:GetPos(win_seat) + local info = self._player_card_info[index] + self:RemoveCursor() + info:UpdateHandCard(true, true) + + local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card") + obj_win_card.icon = "ui://Main_Majiang/202_" .. win_card + obj_win_card:GetController("bg").selectedIndex = 1 + info._view:AddChild(obj_win_card) + obj_win_card:Center() + + local url, pNode + local player = _room:GetPlayerBySeat(win_seat) + if win_seat ~= _room.self_player.seat then + url = "ui://Main_Majiang/别人胡" + pNode = info._mask_liangpai + elseif win_seat == _room.self_player.seat then + url = "ui://Main_Majiang/自己胡牌" + pNode = self._view + end + if win_seat == lose_seat then + url = "ui://Main_Majiang/eff_zimo" + end + + local he = UIPackage.CreateObjectFromURL(url) + pNode:AddChild(he) + he:GetTransition("t2"):Play() + he:Center() + if _room.room_config.people_num == 2 then + if win_seat ~= _room.self_player.seat then + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + end + + if win_seat == _room.self_player.seat then + printlog("自己位置=====") + he:Center() + elseif url == "ui://Main_Majiang/eff_zimo" then + printlog("自摸地址==========") + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + + + + --- + local isZiMo = win_seat == lose_seat + DataManager.CurrenRoom.isZiMoHu = isZiMo + local hu_sound = isZiMo and ("zimo" .. math.random(1, 3)) or ("hu" .. math.random(1, 2)) + printlog("声音====>>>", hu_sound) + self:PlaySound("NanCheng_MJ", player.self_user.sex, hu_sound) + + local pNode = info._view + local url = "eff_list1" + local he_list = UIPackage.CreateObjectFromURL("ui://Extend_MJ_NanCheng/" .. url) + he_list.touchable = false + pNode:AddChild(he_list) + he_list:Center() + + coroutine.start(function() + for i = 1, #win_list do + local tem = win_list[i] + if tem.type > 0 and tem.type < 32 then + local com_name = "he" .. tem.type + local item = he_list:GetChild("list"):AddItemFromPool("ui://Extend_MJ_NanCheng/" .. com_name) + coroutine.wait(0.3) + end + end + + coroutine.wait(2) + obj_win_card:Dispose() + he:Dispose() + he_list:Dispose() + self._popEvent = true + end) + end) + + _gamectr:AddEventListener(TX_GameEvent.EventNiao, function(...) + local arg = { ... } + self._popEvent = false + local list = arg[1] + local start_seat = arg[2] + -- ViewUtil.PlaySound("NanCheng_MJ", "extend/majiang/chaozhou/sound/zhuaniao.mp3") + coroutine.start(self.RunNiao, self, list, start_seat) + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult1, function(...) + self._popEvent = false + self:__CloseTip() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = { ... } + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local niao = result.niao + if liuju then + local le = UIPackage.CreateObjectFromURL("ui://Main_Majiang/LiuJu") + self._view:AddChild(le) + le:Center() + le:GetTransition("t0"):Play() + coroutine.start(function() + coroutine.wait(1) + le:Dispose() + end) + end + self:RemoveCursor() + if self._clearingView == nil then + self._clearingView = EXClearingView.new(self._root_view) + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + self._popEvent = true + end) + end + + if _room.curren_round ~= _room.room_config.round then + -- if #niao == 0 then self._view:GetChild("n13").visible = false end + self._clearingView:InitData(0, _room, result, nil, function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:ResetCardType() + if _room:checkHpNonnegative() then + p.cur_hp = data[i].hp_info.cur_hp + end + info:UpdateScore() + info._view:GetChild("zhanji").visible = true + local num = data[i].hp_info.total_hp + if num > 0 then + info._view:GetController("text_color").selectedIndex = 0 + info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + else + info._view:GetController("text_color").selectedIndex = 1 + info._view:GetChild("text_jifen").text = d2ad(num) + end + + info._view:GetChild("mask_piao").title = "" + info._view:GetController("piao_niao").selectedIndex = 0 + p.fz_list = {} + end + DataManager.CurrenRoom.self_player.card_list = {} + self._state.selectedIndex = 2 + self._clearingView = nil + end) + end + self._player_card_info[1]:ShowHuTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult2, function(...) + self:UnmarkSelfTuoguan() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = { ... } + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + self._clearingView = EXClearingView.new() + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + end) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiaoTip, function() + self:UpdateRound() + self._tex_LeftCard.text = "0" + self._state.selectedIndex = 1 + self:__PiaoNiaoTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiao, function(...) + local arg = { ... } + local seat = arg[1] + local num = arg[2] + if num > 0 then + local head_info = self._player_info[self:GetPos(seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. num + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + if seat == _room.self_player.seat then + if self._com_piao and _room.self_player.entrust then + self._com_piao:Dispose() + self._com_piao = nil + _room.curren_round = _room.curren_round - 1 + end + end + end) +end + +function M:OutCard(card) + if card ~= 0 then + printlog("当前出牌为===>>>" .. card) + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card, function() + local info = self._player_card_info[1] + self:RemoveCursor() + info:UpdateHandCard() + + info:UpdateOutCardList(nil, card, self._cursor) + self:PlaySound("NanCheng_MJ", self._room.self_player.self_user.sex, tostring(card)) + self:PlayMJSound("chupai.mp3") + -- self:ShowHuTip() + end) + else + printlog("鬼牌不能出===>>>" .. card) + end +end + +function M:__FangziTip(tip, weight) + printlog("__FangziTip") + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject("Main_Majiang", "Gcm_action_tips") + _chipeng_tip:GetController("hide_bg").selectedIndex = 1 + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + -- self._player_card_info[self:GetPos(p.seat)] + + local _lit_fanzi = _chipeng_tip:GetChild("lit_fanzi") + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + printlog(tip.tip_map_type) + pt(_tlist) + local tip_hu = false + local count = #_tlist + table.sort(_tlist) + local isHu = false + for k = 1, #_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + local url = "ui://Main_Majiang/Btn_fztip" + local td_weight = td.weight + if td_weight == 16 then td_weight = 8 end + if td_weight == 8 then url = "ui://Main_Majiang/Btn_hu" end + local btn_t = _lit_fanzi:AddItemFromPool(url) + btn_t.icon = "ui://Main_Majiang/fztip_" .. td_weight + btn_t.data = { tip, td } + btn_t.onClick:Add(self.__TipAction, self) + end + + -- if not (tonumber(weight) >= 16) then + local _btn_pass = _lit_fanzi:AddItemFromPool("ui://Main_Majiang/Btn_pass") + -- local _btn_pass = _chipeng_tip:GetChild("btn_pass") + _btn_pass.onClick:Set(function() + if tonumber(weight) >= 8 then + local guo_msg = MsgWindow.new(self._root_view, "确定要点过吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end) + guo_msg:Show() + else + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end) + -- end + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() +end + +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local list = tip.tip_map_type[td.weight] + printlog("__TipAction") + pt(list) + if (#list > 1) then + self:_ChiView(list, function(id) + _gamectr:SendAction(id) + self:__CloseTip() + end) + self._chipeng_tip.visible = false + return + end + + _gamectr:SendAction(td.id) + if (self._chipeng_tip == nil) then return end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil +end + +function M:_ChiView(tiplist, callback) + self._chipeng_tip.visible = false + printlog("_ChiView") + pt(tiplist) + local _pop_tip_choice = UIPackage.CreateObject("Extend_MJ_NanCheng", "Pop_tip_choice") + local list_choose1 = _pop_tip_choice:GetChild("Lst_choose") + local list_choose2 = _pop_tip_choice:GetChild("Lst_choose2") + local crossCtr = _pop_tip_choice:GetController("state") + crossCtr.selectedIndex = #tiplist == 3 and 0 or + (#tiplist == 2 and 1 or (#tiplist == 4 and 2 or (#tiplist == 5 and 3 or 4))) + _pop_tip_choice:GetChild("Btn_cross").onClick:Add(function() + _pop_tip_choice:Dispose() + self._chipeng_tip.visible = true + end) + list_choose1:RemoveChildrenToPool() + list_choose2:RemoveChildrenToPool() + for i = 1, #tiplist do + local list_choose = i <= 3 and list_choose1 or list_choose2 + local item_choose = list_choose:AddItemFromPool() + item_choose:GetController("type").selectedIndex = (1 == tiplist[i].weight or 2 == tiplist[i].weight) and 1 or 0 + if tiplist[i].weight ~= 1 then + for j = 1, 4 do + item_choose:GetChild("card" .. j).icon = UIPackage.GetItemURL("Main_Majiang", + self:GetPrefix() .. "202_" .. tiplist[i].card) + end + else + local tem = {} + table.insert(tem, tiplist[i].opcard[1]) + table.insert(tem, tiplist[i].opcard[2]) + local tcard = tiplist[i].card + table.insert(tem, tcard) + table.sort(tem, function(a, b) + return a < b + end) + item_choose:GetChild("card1").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. + tem[1]) + item_choose:GetChild("card2").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. + tem[2]) + item_choose:GetChild("card4").icon = UIPackage.GetItemURL("Main_Majiang", self:GetPrefix() .. "202_" .. + tem[3]) + local cardpos = tem[2] > tcard and 1 or (tem[2] < tcard and 4 or 2) + item_choose:GetChild("card" .. cardpos):GetController("color").selectedIndex = 1 + end + item_choose.onClick:Add(function() + callback(tiplist[i].id) + end) + end + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width) / 2, + (self._view.height - _pop_tip_choice.height) / 2) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:OnFangziAction(...) + self:__CloseTip() + local arg = { ... } + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local index = arg[3] + printlog("OnFangziAction") + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject("Extend_MJ_NanCheng", "FzEffect") + if fz.type == FZType.Peng then + self:PlaySound("NanCheng_MJ", player.self_user.sex, "peng" .. math.random(1, 3)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "碰框") + elseif fz.type == FZType.Chi then + self:PlaySound("NanCheng_MJ", player.self_user.sex, "chi" .. math.random(1, 3)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "吃") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "吃") + else + self:PlaySound("NanCheng_MJ", player.self_user.sex, "gang" .. math.random(1, 2)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "杠框") + end + effect.touchable = false + effect:GetTransition("t2"):Play() + pNode:AddChild(effect) + coroutine.start(function() + coroutine.wait(0.3) + self._popEvent = true + end) + coroutine.start(function() + coroutine.wait(2) + effect:Dispose() + end) + + self:RemoveCursor() + if (player.seat ~= fz.from_seat) then + local fs_info = _player_card_info[self:GetPos(fz.from_seat)] + fs_info:UpdateOutCardList() + end + info:UpdateFzList(fz, index, true) + local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi + printlog(getcard) + info:UpdateHandCard(getcard) + self:__CloseTip() +end + +function M:RunNiao(list, start_seat) + local _room = self._room + --local _niao_View = self._niao_View + self._niao_View = UIPackage.CreateObject("Extend_MJ_NanCheng", "Panel_Birds") + self._view:AddChild(self._niao_View) + self._niao_View:Center() + local _niao_View = self._niao_View + local list_niao_card = self._niao_View:GetChild("Lst_birds") + list_niao_card:RemoveChildrenToPool() + for i = 1, #list do + --添加背面的麻將 + local item = list_niao_card:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "202_00") + item:GetChild("tex_score").text = "+" .. list[i].score + end + for i = 1, #list do + --顯示正面 + local item = list_niao_card:GetChildAt(i - 1) + local card = list[i].card + coroutine.wait(0.3) + item:GetTransition("appear"):Play() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_" .. card) + if list[i].score > 0 then item:GetController("bg").selectedIndex = 1 end + end + coroutine.start(function() + coroutine.wait(1) + _niao_View:Dispose() + self._popEvent = true + end) +end + +-- function M:markOutCards(showTip, data) +-- for i = 1, #self._room.player_list do +-- local p = self._room.player_list[i] +-- local info = self._player_card_info[self:GetPos(p.seat)] +-- for j = 1, #p.outcard_list do +-- local card = p.outcard_list[j] +-- if card == data then +-- local obj = info:GetOutCardByIndex(j) +-- obj:GetController("gray").selectedIndex = showTip and 1 or 0 +-- end +-- end +-- end +-- end + +function M:__PiaoNiaoTip() + local obj_piao = UIPackage.CreateObject("Main_Majiang", "panel_piao_niao") + self._view:AddChild(obj_piao) + obj_piao.x = (self._view.width - obj_piao.width) * 0.5 + obj_piao.y = self._view.height * 0.6 + for i = 1, 4 do + obj_piao:GetChild("btn_" .. i).onClick:Add(function() + self._gamectr:SendAction(i - 1) + obj_piao:Dispose() + end) + end + self._com_piao = obj_piao +end + +function M:ReloadRoom(bskip) + local room = self._room + -- if not room.playing then + -- self._state.selectedIndex = 2 + -- else + -- self._state.selectedIndex = 1 + -- self._room._reload_flag = true + -- end + + if bskip == nil or bskip == false then + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + self._room._reload_flag = true + end + end + + + for i = 1, #room.player_list do + local p = room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + for i = 1, #p.fz_list do + info:UpdateFzList(p.fz_list[i], -1) + end + info:UpdateHandCard() + local head_info = self._player_info[self:GetPos(p.seat)] + head_info:UpdateScore() + head_info._view:GetChild('zhanji').visible = true + local num = p.total_hp or 0 + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(num) + end + + if p.seat == room.last_outcard_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil, card, self._cursor) + elseif p.seat == room.curren_outcard_seat then + info:UpdateHandCard(true) + info:UpdateOutCardList() + else + info:UpdateOutCardList() + end + if p.seat == room.banker_seat then + head_info:MarkBank(true) + end + -- if p.ready then + -- self._player_info[self:GetPos(p.seat)]:Ready(true) + -- end + if bskip == nil or bskip == false then + if p.ready and room.playing == false then + self._player_info[self:GetPos(p.seat)]:Ready(true) + end + end + if p.piao_niao ~= nil and p.piao_niao > 0 then + local head_info = self._player_info[self:GetPos(p.seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + end + -- self:ShowHuTip() + + if bskip == nil or bskip == false then + self:UpdateCardBox(self:GetPos(room.curren_outcard_seat)) + self._tex_LeftCard.text = room.left_count + self:UpdateRound() + end +end + +function M:PlayerChangeLineState() + -- local isOutCard = true + -- local str = "玩家 " + -- for _ , player in ipairs(self._room.player_list) do + -- if player.line_state == 0 then + -- isOutCard = false + -- end + -- end + -- self._player_card_info[1]._area_handcard_list.touchable = isOutCard +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:__CloseTip() + if self._chipeng_tip then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if self._pop_tip_choice then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +function M:__CloseGangTip() + if self._gang_tip_choice then + self._gang_tip_choice:Dispose() + self._gang_tip_choice = nil + end +end + +function M:closeTipOnTuoguan() + self:__CloseTip() +end + +function M:Destroy() + MJMainView.Destroy(self) + UIPackage.RemovePackage("extend/majiang/nancheng/ui/Extend_MJ_NanCheng") +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXPlayBackView.lua new file mode 100644 index 00000000..fd902285 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/nancheng/EXPlayBackView.lua @@ -0,0 +1,298 @@ +local MJPlayBackView = require("main.majiang.MJPlayBackView") +local EXRoomConfig = import(".EXRoomConfig") +local EXClearingView = import(".EXClearingView") + +local Record_Event = import(".RecordEvent") + + +local M = {} + +--- Create a new +function M.new() + setmetatable(M,{__index = MJPlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = "PlayBackView" + self:init() + + return self +end + + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/majiang/nancheng/ui/Extend_MJ_NanCheng") + MJPlayBackView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num) + local _cardbox = self._view:GetChild("cardbox") + --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false + self._ctr_cardbox = _cardbox:GetController("c1") + self._tex_round = self._view:GetChild("tex_round") + self._tex_LeftCard = self._view:GetChild("remaining_card") + self._anchor = self._view:GetChild("mask_tips") + self._eventmap = {} + + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao + self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao + self._cmdmap[Record_Event.Evt_Result] = self.CmdResult +end + +function M:FillRoomData(data) + MJPlayBackView.FillRoomData(self) + if self._win_pic then self._win_pic:Dispose() end + if self._niao then self._niao:Dispose() end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local left_count = data.info.left_card + self:UpdateLeftCard(left_count) + local round = data.info.round + self:UpdateRound(round) + + local roominfo_panel = self._view:GetChild("roominfo_panel1") + roominfo_panel:GetChild("tex_roomid").text = room.room_id + roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + table.sort(p.card_list, ViewUtil.HandCardSort) + card_info:UpdateHandCard(false, true) + self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0 + end + + self:GenerateAllStepData(data) + self:UpdateStep(1) + -- self:ShowStep(0) +end + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateLeftCard(step.left_card) + -- self._ctr_cardbox.selectedIndex = step.current_out_seat + self:UpdateCardBox(self:GetPos(step.current_out_seat)) + self:UpdateStep(index + 1) + if step.cmd ~= Record_Event.Evt_OutCard then + self:RemoveCursor() + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hand_left_count = #p.card_list + info:Clear() + info:ResetFzList() + p.piao_niao = step.player_card_data[i].piao_niao + local head_info = self._player_info[self:GetPos(i)] + if p.piao_niao and p.piao_niao > 0 then + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + else + head_info._view:GetController("piao_niao").selectedIndex = 0 + end + if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil, nil, self._cursor) + else + info:UpdateOutCardList() + end + if step.cmd == Record_Event.Evt_GetCard and p.seat == step.current_out_seat then + info:UpdateHandCard(true, true) + else + info:UpdateHandCard(false, true) + end + end + if step.cmd == Record_Event.Evt_Win then + self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡") + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + else + if self._win_pic then + self._win_pic:Dispose() + end + end + if step.cmd == Record_Event.Evt_Niao then + local niao_list = step.niao + self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_NanCheng/Panel_Birds") + local list = self._niao:GetChild("Lst_birds") + list:RemoveChildrenToPool() + for i = 1, #niao_list do + local item = list:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_"..niao_list[i].card) + if niao_list[i].score > 0 then + item:GetController("bg").selectedIndex = 2 + end + end + self._view:AddChild(self._niao) + self._view:AddChild(self._view:GetChild("panel_record")) + self._niao:Center() + else + if self._niao then + self._niao:Dispose() + end + end + if step.cmd == Record_Event.Evt_Result then + if not self.result then + self.result = EXClearingView.new(self._root_view, true) + self.result:InitData(0, self._room, step.result_data) + self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5 + self.result._view.width = GRoot.inst.width + self.result._view.height = GRoot.inst.height + self.result._view:GetChild("btn_confirm").visible = false + self._anchor:AddChild(self.result._view) + self.result._view.x = self._anchor.x * -1 + self.result._view.y = self._anchor.y * -1 + else + self.result._view.visible = true + end + -- self.result._view:Center() + else + if self.result then + self.result._view.visible = false + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = "" + step.left_card = info.left_card + step.last_out_seat = 0 + step.current_out_seat = 1 + step.win = 0 + step.niao = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.piao_niao = p.piao_niao + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + table.sort(u.card_list, ViewUtil.HandCardSort) + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = 0 + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + for i = 1, #cmd.data.opcard do + list_remove(u.card_list, cmd.data.opcard[i]) + end + local fz = {} + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.opcard = cmd.data.opcard + local uf = data.player_card_data[cmd.data.from_seat] + if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then + table.remove(uf.outcard_list, #uf.outcard_list) + end + if fz.type ~= FZType.Gang_Peng then + u.fz_list[#u.fz_list + 1] = fz + else + for i = 1, #u.fz_list do + if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then + u.fz_list[i].type = FZType.Gang_Peng + end + end + end +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:CmdNiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.niao = cmd.data.niao +end + +function M:CmdPiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.player_card_data[cmd.seat].piao_niao = cmd.data.num +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result_data = cmd.data +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_deep_clone(last_step) + self._step[#self._step + 1] = step + step.result_data = nil + return step +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = "剩余 "..num.." 张牌" +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:UpdateRound(round) + self._tex_round.text = "第 "..round.."/"..self._room.room_config.round.." 局" +end + +function M:UpdateStep(step) + self._record:GetChild("tex_step").text = "第 " .. step .. " / " .. #self._step .. "步" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXPlayer.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXPlayer.lua new file mode 100644 index 00000000..fd26822b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/nancheng/EXPlayer.lua @@ -0,0 +1,36 @@ + + +local EXPlayer = { + auto, + -- 手牌列表 + hand_cards = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXPlayerInfoView.lua new file mode 100644 index 00000000..f8a5fd69 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/nancheng/EXPlayerInfoView.lua @@ -0,0 +1,76 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + +function M:init() + PlayerInfoView.init(self) + self._tex_score = self._view:GetChild("info"):GetChild("tex_score1") + self._tex_score2 = self._view:GetChild("info"):GetChild("tex_score2") + self._ct_score = self._view:GetChild("info"):GetController("score") +end + +function M:ShowInteraction(type,str) + if type == 3 then + Voice.DownLoad(str, function(clip) + if (clip ) then + self:ShowMaskVoice(clip.length) + GameApplication.Instance:PlayVoice(clip) + end + end) + elseif type == 4 then + self:SetChat(str) + elseif type == 2 then + local chat_index = tonumber(str) + self._main_view:PlayChatSound(self._player.self_user.sex,chat_index) + local language, index = self._main_view:GetChatMsgLanguage(chat_index) + self:SetChat(self._main_view.Fix_Msg_Chat[index]) + elseif type == 1 then + self:SetBiaoqing("ui://Chat/"..str) + end +end + +function M:UpdateRemainCard(card_num, hide) + if hide then + self._view:GetController("show_remain").selectedIndex = 0 + else + self._view:GetController("show_remain").selectedIndex = 1 + end + self._view:GetChild("com_remain"):GetChild("tex_remain").text = card_num +end + +function M:FillData(player) + PlayerInfoView.FillData(self, player) + self:UpdateScore(player.total_score) +end + +function M:UpdateScore() + local score = self._player.total_score + local room = DataManager.CurrenRoom + if room:checkHpNonnegative() then + score = d2ad(self._player.cur_hp) + end + if not score then + score = 0 + end + if score < 0 then + self._ct_score.selectedIndex = 1 + self._tex_score2.text = score + else + self._ct_score.selectedIndex = 0 + if not room:checkHpNonnegative() then + score = "+" .. score + end + self._tex_score.text = score + end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/nancheng/EXRoomConfig.lua b/lua_probject/extend_project/extend/majiang/nancheng/EXRoomConfig.lua new file mode 100644 index 00000000..de4f2c33 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/nancheng/EXRoomConfig.lua @@ -0,0 +1,159 @@ + + + +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.config=config + self.class = "RoomConfig" + self.round = config["times"] + self.maxPlayers = config["maxPlayers"] + self.fengding = config["fengding"] + self.wanfa = config["wanfa"] + self.qiduijiafan=config["qiduijiafan"] + self.shoudailongjiafan=config["shoudailongjiafan"] + self.loudilongjiafan=config["loudilongjiafan"] + self.bunengchi=config["bunengchi"] + + return self +end + +function M:GetDes(sp) + sp = sp or " " + local count=0 + local str = self.round and self.round .. "局" .. " " or "" + str = str .. RoomConfig.GetDes(self, sp).."\n" + + + if (self.fengding) then + str = str .. "封顶" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if (self.qiduijiafan) then + local strL=2 + str = str .."可胡七对" + if self.qiduijiafan then + str = str .."翻倍" + strL=0 + end + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.shoudailongjiafan then + str = str .."手逮龙加番" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.loudilongjiafan then + str = str .."落地龙" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.bunengchi then + str = str .."不能吃" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + + +function M:GetDes2(sp) + sp = sp or " " + local str = RoomConfig.GetDes(self, sp) + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + + + + + if (self.qiduijiafan) then + str = str .."可胡七对" + if self.qiduijiafan then + str = str .."-翻倍" + end + str = str .. sp + end + + + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_MJ_NanCheng/gamerule") + return gamerulepanel +end + + +function M:GetGameSMSize() + return 467,500 +end + + +function M:GetGameName() + return "个旧麻将" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/nancheng/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/nancheng/ExtendConfig.lua new file mode 100644 index 00000000..1e9a00cb --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/nancheng/ExtendConfig.lua @@ -0,0 +1,173 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import(".EXGameInfo") +local EXMainView = import(".EXMainView") +local EXGameController = import(".EXGameController") +local EXRoomConfig = import(".EXRoomConfig") +local EXPlayBackView =import(".EXPlayBackView") +local MJRoom = require("main.majiang.MJRoom") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = "ExtendConfig" + self.extend_id = 33 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/majiang/nancheng/ui/Info_MJ_NanCheng") + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage("extend/majiang/nancheng/ui/Extend_MJ_NanCheng") + ResourcesManager.UnLoadGroup("NanCheng_MJ") +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return MJRoom.new() +end + +function M:FillRoomConfig(room,_config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + + + local reload = s2croom["reload"] + local _tableInfo = s2croom["tableInfo"] + + local _config = _tableInfo["config"] + + pt(_config) + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo["playerData"] + room.curren_round = _tableInfo["round"] + self:FillPlayerData(playerList) + + if (reload) then + local _reloadInfo = s2croom["reloadInfo"] + local _hand_card = _reloadInfo["hand_card"] + room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + + local active_seat = _reloadInfo["active_seat"] + local bank_seat = _reloadInfo["banker_seat"] + local playing = _reloadInfo["playing"] + local _info_list = _reloadInfo["info_list"] + local last_outcard_seat = _reloadInfo["last_outcard_seat"] + room.left_count = _reloadInfo["left_card"] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo["curren_outcard_seat"] + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i=1,#_info_list do + local tem = _info_list[i] + local playerid = tem["playerid"] + local p = room:GetPlayerById(playerid) + local outcard_list = tem["outcard_list"] + p.outcard_list = outcard_list + p.total_score = tem["score"] + p.hand_left_count = tem["card_count"] + p.piao_niao = tem["piao_niao"] or 0 + local opcard = tem["opcard"] + for k=1,#opcard do + local op = opcard[k] + local fz = {} + fz.type = op["type"] + fz.card = op["card"] + p.fz_list[#p.fz_list+1] = fz + end + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.left_count = _tableInfo["left_card"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + + local _info_list = _tableInfo["playerData"] + for i = 1,#_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + p.piao_niao = _jp["piao_niao"] + -- print(DataManager.SelfUser.account_id,pid) + -- if (278 == pid) then + -- room.self_player = p + -- p.self_user = DataManager.SelfUser + -- else + if p.seat == 1 then room.self_player = p end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.card_list = _hand_card + --room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + p.total_score = _jp["score"] + p.hand_left_count = #_hand_card + if _jp.hp_info then + room.room_config.isNonnegative = 1 + p.cur_hp = _jp.hp_info.cur_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/nancheng/GameEvent.lua b/lua_probject/extend_project/extend/majiang/nancheng/GameEvent.lua new file mode 100644 index 00000000..9180694e --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/nancheng/GameEvent.lua @@ -0,0 +1,37 @@ + +local TX_GameEvent = { + -- 发牌 + SendCards = "SendCards", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + EventNiao = "EventNiao", + + EvnetPiaoTip = "EvnetPiaoTip", + + EvnetPiao = "EvnetPiao", + + + --- + SendLaiZi="SendLaiZi", + SendGangZi = "SendGangZi", + EventBuGang = "EventBuGang", + +} +return TX_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/nancheng/MJPlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/majiang/nancheng/MJPlayerSelfCardInfoView.lua new file mode 100644 index 00000000..72d1d092 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/nancheng/MJPlayerSelfCardInfoView.lua @@ -0,0 +1,213 @@ +local MJPlayerSelfCardInfoView = require("main.majiang.MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local CardCheck = import(".CardCheck") + +local M = {} +-- +function M.new(view,mainView) + setmetatable(MJPlayerSelfCardInfoView, {__index = MJPlayerCardInfoView}) + setmetatable(M, {__index = MJPlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:ShowHuTip(card_list) + printlog("ShowHuTip") + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + for i=1,#DataManager.CurrenRoom.laiziInfo do + if IsHasDictionary(DataManager.CurrenRoom.laiziInfo[i],tingList)==false then + table.insert(tingList,DataManager.CurrenRoom.laiziInfo[i] ) + end + end + end + + end + self._mainView._hu_tip:FillData(tingList) +end + +function M:UpdateHandCard(getcard, mp) + MJPlayerSelfCardInfoView.UpdateHandCard(self, getcard, mp) + local _carViewList = self._carViewList + + if DataManager.CurrenRoom.laiziInfo and #self._carViewList>0 then + for i=1,#self._carViewList do + local obj=self._carViewList[i] + if obj and obj.card then + if IsHasDictionary(obj.card_item,DataManager.CurrenRoom.laiziInfo) then + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=1 + end + + end + else + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=0 + end + end + end + + end + end + + + end + + + local card_list = DataManager.CurrenRoom.self_player.card_list + self:ShowHuTip(card_list) + if getcard then + self._out_card = true + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + -- 记录需要标记听牌提示的牌 + local lst_mark = {} + local total_num = 0 + for i = 1, #_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + list_remove(card_list, card) + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + local count = 0 + for j = 1, #tingList do + count = count + self._mainView:CountCardLeftNum(tingList[j]) + end + local tem = {} + tem.item = btn + tem.count = count + total_num = total_num + count + table.insert(lst_mark, tem) + end + table.insert(card_list, card) + end + table.sort(lst_mark, function(a, b) + return a.count > b.count + end) + -- 如果几张牌的可胡牌数一致,也只显示'三角',可胡牌数不一致才显示'多' + local all_same = #lst_mark ~= 0 and lst_mark[1].count == total_num / #lst_mark or false + for i = 1, #lst_mark do + local tem = lst_mark[i] + if all_same or tem.count < lst_mark[1].count then + tem.item:GetController("mark_ting").selectedIndex = 1 + else + tem.item:GetController("mark_ting").selectedIndex = 2 + end + end + else + for i = 1, #_carViewList do + local btn = _carViewList[i].card + if btn:GetController("mark_ting").selectedIndex ~= 0 then + btn:GetController("mark_ting").selectedIndex = 0 + end + end + self._out_card = false + end + +end + +function M:__OnClickHandCard(context) + local button = context.sender + local _carViewList = self._carViewList + local refresh = true + local card_list = {} + for i=1,#_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + if btn ~= button and btn.selected == true then + if button.data.card_item == card then + refresh = false + else + self._mainView:markOutCards(false, card) + end + btn.selected = false + end + if not btn.selected then + table.insert(card_list, card) + end + end + + if self._out_card then + self:ShowHuTip(card_list) + end + + -- 标记出牌 + if refresh then + if button.selected then + self._mainView:markOutCards(true, button.data.card_item) + else + self._mainView:markOutCards(false, button.data.card_item) + end + end + + local _room = DataManager.CurrenRoom + if not button.selected and _room.curren_outcard_seat == _room.self_player.seat then + local card = button.data + self._mainView:OutCard(card.card_item) + end +end + +function M:__OnDragStart(card) + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + list_remove(card_list, card) + self:ShowHuTip(card_list) +end + +function M:__OnDragEnd(context) + if self.outcard_button then + self.outcard_button:Dispose() + self.outcard_button = nil + end + local button = context.sender + + --button:RemoveFromParent() + local card = button.data + local _room = DataManager.CurrenRoom + + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + if (button.y - card.old_postion.y < -50 and _room.curren_outcard_seat == _room.self_player.seat and card.card_item ~= 0) then + self._mainView:OutCard(card.card_item) + button.touchable = false + self.outcard_button = button + else + self._area_handcard_list:AddChildAt(button, card.index) + button:TweenMove(card.old_postion, 0.2) + end +end + +function M:CheckPlayerOnlineState() + local room = DataManager.CurrenRoom + for i = 1, #room.player_list do + if room.player_list[i].line_state == 0 then + return false + end + end + return true +end +function M:Clear(bskip) + --self._ctr_state.selectedIndex = 0 + self._area_fz_list.x = self._src_fz_list.x + self._area_fz_list.y = self._src_fz_list.y + self._area_fz_list.width = self._src_fz_list.z + self._area_fz_list.height = self._src_fz_list.w + + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_outcard_list:RemoveChildren(0, -1, true) + if bskip == nil or bskip == false then + self._mask_liangpai:RemoveChildren(0, -1, true) + end + + for i=1,#self._carViewList do + self._carViewList[i].card:Dispose() + end + self._carViewList = {} + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/nancheng/Protocol.lua b/lua_probject/extend_project/extend/majiang/nancheng/Protocol.lua new file mode 100644 index 00000000..4df49454 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/nancheng/Protocol.lua @@ -0,0 +1,52 @@ +local Protocol = { + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌 + GAME_DIS_CARD = "611", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- 提示选择行为 + GAME_ACTION = "612", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 小结算 + GAME_EVT_RESULT1 = "817", + + -- 大结算 + GAME_EVT_RESULT2 = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + + -- 抓鸟事件 + GAME_EVT_NIAO = "821", + + -- 飘鸟提示 + GAME_EVT_PIAOTIP = "833", + + -- 飘鸟事件 + GAME_EVT_PIAO = "834", + + GAME_EVT_GANGZI = "837", + GAME_EVT_BUGANG = "838", + GAME_EVT_DOGANG = "839", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/nancheng/RecordEvent.lua b/lua_probject/extend_project/extend/majiang/nancheng/RecordEvent.lua new file mode 100644 index 00000000..09748550 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/nancheng/RecordEvent.lua @@ -0,0 +1,11 @@ +local Record_Event = { + Evt_GetCard = "GetCard", + Evt_OutCard = "OutCard", + Evt_Action = "Action", + Evt_Win = "Win", + Evt_Niao = "Niao", + Evt_Piao = "PiaoNiao", + Evt_Result = "Result", +} + +return Record_Event \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/CS_Win_Type.lua b/lua_probject/extend_project/extend/majiang/qizhiba/CS_Win_Type.lua new file mode 100644 index 00000000..5260b600 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/CS_Win_Type.lua @@ -0,0 +1,37 @@ +local CS_Win_Type = { + "鸡胡", + "平胡", + "四小对", + "豪华四小对", + "双豪华四小对", + "三豪华七小对", + "清一色", + "碰碰胡", + "杠上开花", + "杠上炮", + "抢杠胡", + "混一色", + "十三幺", + "天胡", + "地胡", + "人胡", + "十八罗汉", + "小三元", + "大三元", + "小四喜", + "大四喜", + "幺九", + "四鬼胡牌", + "全风", + "全求人", + "清幺九", + "字一色", + "无鬼翻倍", + "流局翻倍", + "海底捞月", + "门清", + "大胡", + +} +return CS_Win_Type + diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/CardCheck.lua b/lua_probject/extend_project/extend/majiang/qizhiba/CardCheck.lua new file mode 100644 index 00000000..ad28dfd1 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/CardCheck.lua @@ -0,0 +1,378 @@ +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + num = num == nil and 1 or num + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if(result ==num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local zhongid = 0 + + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + zhong_count = 0, + qidui = false, + hongzhong_count = 0, + qidui_pari_count = 0 +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + if (card == zhongid) then + self.zhong_count = self.zhong_count +1 + else + self.cardList[#self.cardList + 1] = card + end + end + table.sort(self.cardList) +end + +function M:tryShunzi(card) + if (card < 400 and card % 100 > 7) then + return false + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryKezi(card) + if (checkCardAndRomve(card, self.cardList, 3)) then + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (checkCardAndRomve(card, self.cardList, 2)) then + local cardGroup = {card,card} + self:push(cardGroup) + self.pair_count = 1 + return true + end + return false +end + + +function M:tryKezi1Zhong(card) + if (self.zhong_count >= 1 and checkCardAndRomve(card, self.cardList,2)) then + local cardGroup = {card,card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + return true + end + return false +end + +function M:tryKezi2Zhong(card) + if (self.zhong_count >= 2 and checkCardAndRomve(card, self.cardList,1)) then + local cardGroup = {card,zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + return true + end + return false +end + +function M:tryShunzi1Zhong(card) + if (card % 100 > 8) then + return false + end + + if (self.zhong_count < 1) then + return false + end + + if (checkCard(card + 1, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,card+1,zhongid} + self:push(cardGroup) + return true + end + + if (checkCard(card + 2, self.cardList) and ((card + 1) % 100 ~= 0)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 2, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,zhongid,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair1Zhong(card) + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 1) then + return false + end + removeCard(self.cardList, card, 1) + local cardGroup = {card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + self.pair_count = 1 + return true +end + +function M:tryPair2Zhong() + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 2) then + return false + end + local cardGroup = {zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + self.pair_count = 1 + return true +end + +function M:tryWin() + if (self.zhong_count == 4 and not self.eight_laizi) or (self.zhong_count == 8 and self.eight_laizi) then + return true + end + if (#self.cardList == 0 and self.pair_count == 1) then + return true + end + if (#self.cardList == 0 and self.pair_count == 0) then + return self:tryPair2Zhong() + end + + if (#self.cardList == 0) then + return false + end + + local activeCard = self.cardList[1] + if (self:tryPair(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + + if (self:tryKezi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi2Zhong(activeCard)) then + + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryPair1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + return false +end + +function M:checkQidui() + if (not self.qidui) then + return false + end + if ((#self.cardList + self.zhong_count) ~= 14) then + return false + end + local cardList = membe_clone(self.cardList) + self.qidui_pari_count = 0 + self.hongzhong_count = self.zhong_count + return self:isQdPari(cardList) +end + +function M:isQdPari(cardList) + if(self.qidui_pari_count == 7) then + return true + end + if (#cardList== 0) then + return true + end + local card = cardList[1] + if (cardNum(card, cardList) >= 2) then + removeCard(cardList, card, 2) + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + + if (self.hongzhong_count > 0) then + removeCard(cardList, card, 1) + self.hongzhong_count = self.hongzhong_count - 1 + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + return false +end + +local function init(self,cardInhand,addCard,isZhong,qidui,eightLaizi) + self.stack = {} + self.pair_count = 0 + self.cardList = membe_clone(cardInhand) + self.qidui = qidui + self.eight_laizi = eightLaizi + self.cardList[#self.cardList+1] = addCard + if (isZhong) then + self.zhong_count = cardNum(zhongid, self.cardList) + removeCard(self.cardList, zhongid, self.zhong_count) + end + table.sort(self.cardList) + --printlog("添加排序====>>>") + --pt(self.cardList) + return self:checkQidui() or self:tryWin() +end + +local specialCardList={515,616} +function M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + printlog("isZhong",isZhong) + printlog("qidui",qidui) + printlog("eightLaizi",eightLaizi) + pt(cardInhand) + local self = setmetatable({}, {__index = M}) + local tingList = {} + if not cardInhand or #cardInhand == 0 then + return tingList + end + for k=100,400,100 do + for i=1,13 do + local tem = k + i + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + --printlog("返回结果为===>>>",result) + if(result) then + tingList[#tingList + 1] = tem + end + end + end + + --[[for j=1,#specialCardList do + local tem = specialCardList[j] + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + if(result) then + tingList[#tingList + 1] = tem + end + end--]] + + return tingList +end + +function M.MuiltiplteCaculateTingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + zhongid=DataManager.CurrenRoom.laiziInfo[1] + local tempTingList2={} + local tempTingList1=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo[2] then + zhongid=DataManager.CurrenRoom.laiziInfo[2] + tempTingList2=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + zhongid=DataManager.CurrenRoom.laiziInfo[1] + end + local currentTingList={} + if #tempTingList1>0 and #tempTingList2>0 then + currentTingList=CombineDictionaryAndRemoveSomeItem(tempTingList1,tempTingList2) + elseif #tempTingList1>0 then + currentTingList=tempTingList1 + elseif #tempTingList2>0 then + currentTingList=tempTingList2 + end + + return currentTingList + + else + zhongid=0 + return M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + end + +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/qizhiba/EXClearingView.lua new file mode 100644 index 00000000..bb3c51ba --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/EXClearingView.lua @@ -0,0 +1,644 @@ +require("Game.View.ResultView") +local Hu_Type_Name = import(".CS_Win_Type") + +local EXClearingView = {} + +local M = EXClearingView + +function EXClearingView.new(blur_view) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self._full = true + ResultView.init(self, "ui://Main_PokeMaJiang/clearing") + + self._currenIndex = 0 + self._blur_view = blur_view + self._close_zone = false + self:InitMaPai() + + return self +end + +function M:InitMaPai() + self.maPaiCtr=self._view:GetController("mapai") + self.maPaiCtr.selectedIndex=0 + + self.maPaiList={} + + for i=1,8 do + local tempMP=self._view:GetChild("niao"..i) + table.insert(self.maPaiList,tempMP) + end + +end + + +function M:IsMapaiShow(niao,isShow) + if niao then + niao.visible=isShow + end +end + + +function M:SetMaPaiValue(niao,value) + if niao then + niao.icon='ui://Main_PokeMaJiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..value + end +end + +function M:SetMaPaiColor(niao,num) + niao:GetController("color").selectedIndex=num +end + +function M:HideAllMapai() + for i=1,#self.maPaiList do + self:IsMapaiShow(self.maPaiList[i],false) + self:SetMaPaiColor(self.maPaiList[i],0) + end +end + + + +function M:ShowSelectMaPai(niaoList) + if niaoList and #niaoList>0 then + self.maPaiCtr.selectedIndex=1 + self:HideAllMapai() + for i=1,#niaoList do + self:IsMapaiShow(self.maPaiList[i],true) + self:SetMaPaiValue(self.maPaiList[i],niaoList[i].card) + if niaoList[i].score>0 then + self:SetMaPaiColor(self.maPaiList[i],2) + end + end + else + self.maPaiCtr.selectedIndex=0 + end +end + + + +function M:CalculatePaixingInfo(result) + self.WinList={} + if result.info_list and #result.info_list>0 then + for i=1,#result.info_list do + if result.info_list[i].win_list and #result.info_list[i].win_list>0 then + table.insert(self.WinList,result.info_list[i].win_list) + end + end + end + + printlog("牌型列表====>>>") + pt(self.WinList) +end + + +function M:SetPaixingxiangqing(num) + for i=1,#self.PaiXingXiangQingCtrList do + if self.PaiXingXiangQingCtrList[i] then + self.PaiXingXiangQingCtrList[i].selectedIndex=num + end + end +end + + + +function M:InitData(over, room, result, total_result, callback) + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:HideHutips() + + self._callback = callback + local _overCtr = self._view:GetController("over") + local btn_confirm = self._view:GetChild("btn_confirm") + local btn_result = self._view:GetChild("btn_showResult") + local btn_close = self._view:GetChild("big_result"):GetChild("btn_close") + local _btnCtr = self._view:GetController("button") + local _sdkCtr = self._view:GetController("sdk") + local ctr_type = self._view:GetController("type") + self._view:GetChild("tex_roominfo").text = string.format("房号%s 局%s/%s %s", room.room_id, room.curren_round, room.room_config.round, os.date("%Y-%m-%d %H:%M:%S", os.time())) + self._view:GetChild("tex_gameinfo").text = string.gsub(room.room_config:GetDes2(), "\r", "") + + if result then + --self:ShowSelectMaPai(result.niao) + self:CalculatePaixingInfo(result) + end + + + self.PaiXingXiangQingCtrList={} + + local paixingxiangqing=self._view:GetChild("btn_detal") + local fanhuipaixing=self._view:GetChild("btn_fanhuipaixing") + fanhuipaixing.visible=false + paixingxiangqing.visible=true + paixingxiangqing.onClick:Add(function() + paixingxiangqing.visible=false + fanhuipaixing.visible=true + self:SetPaixingxiangqing(1) + end) + fanhuipaixing.onClick:Add(function() + paixingxiangqing.visible=true + fanhuipaixing.visible=false + self:SetPaixingxiangqing(0) + end) + + + if over ~= 2 then + if result.liuju then + ctr_type.selectedIndex = 3 + else + local info_list = result.info_list + for i = 1, #info_list do + local is_win = info_list[i].is_win + if is_win then + if info_list[i].seat == room.self_player.seat then + ctr_type.selectedIndex = 1 + else + ctr_type.selectedIndex = 2 + end + end + end + end + if over == 0 then + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + btn_confirm.onClick:Add(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:DestroyWithCallback() + end) + self:AddClearItem(room, result.info_list, nil, over, result.niao, result.active_player) + elseif over == 1 then + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add(function() + self.maPaiCtr.selectedIndex=0 + _overCtr.selectedIndex = 1 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + if self._qsinfo_view then + self._qsinfo_view:Dispose() + end + end) + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + self:AddClearItem(room, result.info_list, total_result.info_list, over, result.niao, result.active_player) + end + else + _overCtr.selectedIndex = 1 + self.maPaiCtr.selectedIndex=0 + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + self:AddClearItem(room, nil, total_result.info_list, over) + end +end + +function M:AddClearItem(room, data, total_data,over, niao, active_player) + local n = over + 1 + local list_view1 = self._view:GetChild("player_list_1") + local list_view2 = self._view:GetChild("player_list_2") + if 0 == over or 1 == over then + table.sort(data, function(a,b) return a.seat < b.seat end) + list_view1:RemoveChildrenToPool() + for i=1,#data do + local item = list_view1:AddItemFromPool() + self:FillItemData(room, data[i], item, active_player, niao) + end + if #data == 3 then + list_view1.lineGap = 54 + elseif #data == 2 then + list_view1.lineGap = 108 + end + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end +end + +function M:FillItemData(room, data, item, active_player, niao) + local _gamectr = ControllerManager.GetController(GameController) + local p = room:GetPlayerBySeat(data["seat"]) + item:GetChild("playerName").text = p.self_user.nick_name + item:GetChild("lab_hp").text="抓马" + local user = room:GetPlayerBySeat(data["seat"]).self_user + local head = item:GetChild('head'):GetChild('n4') + ImageLoad.Load(user.head_url, head) + + -- 手牌 + local hand_cards = data["hand_card"] + table.sort( hand_cards, ViewUtil.HandCardSort2) + local hand_list_view = item:GetChild("hand_card_list") + hand_list_view:RemoveChildrenToPool() + for i=1,#hand_cards do + local card = hand_list_view:AddItemFromPool() + card.icon = "ui://Main_PokeMaJiang/201_"..hand_cards[i] + end + hand_list_view.width = 52 * #hand_cards + + + local fz_card = p.fz_list + local fz_card_list = item:GetChild("fz_card_list") + fz_card_list.width = 157 * #fz_card * 0.8 + fz_card_list:RemoveChildrenToPool() + for i=1,#fz_card do + if fz_card[i].type == FZType.Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_PokeMaJiang/clearing_fz_3") + for j=1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_PokeMaJiang/" .. self:GetPrefix() .. "201_"..fz_card[i].card + end + elseif fz_card[i].type == FZType.Chi then + local item = fz_card_list:AddItemFromPool("ui://Main_PokeMaJiang/clearing_fz_3") + for j = 1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_PokeMaJiang/" .. self:GetPrefix() .. "201_"..fz_card[i].allCard[j] + end + elseif fz_card[i].type == FZType.Gang or fz_card[i].type == FZType.Gang_An or fz_card[i].type == FZType.Gang_Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_PokeMaJiang/clearing_fz_4") + for j=1,4 do + local card = item:GetChild("card_" .. j) + if fz_card[i].type == FZType.Gang_An and j == 4 then + card.icon = "ui://Main_PokeMaJiang/201_00" + else + card.icon = "ui://Main_PokeMaJiang/" .. self:GetPrefix() .. "201_"..fz_card[i].card + end + end + end + end + + local huadd = data["hu_score"] + local gangadd = data["gang_score"] + local birdadd = data["niao_score"] + local total = data["round_score"] + local geng_zhuan=data["geng_zhuan"] + local sp = " " + local str = "胡:"..huadd.."分" + --str = str..sp.."杠:"..gangadd.."分" + str = str..sp.."中马:"..birdadd.."分" + + if data["mai_niao_score"] and data["mai_niao_score"]~=0 then + str = str..sp.."买马:"..data["mai_niao_score"].."分" + end + + if data["ma_geng_gong"] and data["ma_geng_gong"]~=0 then + str = str..sp.."马跟杠:"..data["ma_geng_gong"].."分" + end + + if geng_zhuan and geng_zhuan~=0 then + str = str..sp.."跟庄:"..geng_zhuan.."分" + end + + if data["repeat_win"] and data["repeat_win"]~=0 then + str = str..sp.."连庄x"..data["repeat_win"] + end + + + + + + item:GetChild("score1").text = str + -- local total_score = data["total_score"] + if total >= 0 then + item:GetChild("score2").text = "+"..total + item:GetChild("score2").grayed = false + else + item:GetChild("score2").text = total + item:GetChild("score2").grayed = true + end + + + --计算牌型 + local totalPeson=DataManager.CurrenRoom.room_config.people_num-1 + local win_list = data["win_list"] + local is_win = data["is_win"] or false + local str1="" + sp="、" + if is_win then + if win_list then + if DataManager.CurrenRoom.isZiMoHu then + str1="自摸" + else + str1="接炮" + end + for i=1,#win_list do + local huName=Hu_Type_Name[win_list[i].type] + if huName then + str1=str1..sp..huName.."x"..win_list[i].score + end + + end + str1=str1.." +"..huadd.."分" + end + + else + printlog("输家============") + if DataManager.CurrenRoom.isZiMoHu then + printlog("自摸处理============") + --str1="" + if #self.WinList==1 then + for i=1,#self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + if j==1 then + str1=str1..huName.."x"..self.WinList[i][j].score + else + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + + end + end + + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + else + printlog("非自摸处理====>>>") + --点炮 一炮多响 + local yipaoduoxiang=false + if #self.WinList>1 then + yipaoduoxiang=true + end + + if yipaoduoxiang then + printlog("一炮多响====>>>") + str="点炮" + local allTypeList={} + local isHas=false + for i=1,#self.WinList do + for j=1,#self.WinList[i] do + isHas=IsHasDictionary(self.WinList[i][j].type,allTypeList) + if isHas==false then + table.insert(allTypeList,self.WinList[i][j].type) + end + end + + end + + if #allTypeList>0 then + for i=1,#allTypeList do + local huName=Hu_Type_Name[allTypeList[i]] + if huName then + str1=str1..huName.."、" + end + end + str1=str1.." "..huadd.."分" + end + + else + + if p.self_user.account_id == active_player and is_win == false and not data["liuju"] then + str1="点炮" + if #self.WinList==1 then + for i=1,# self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + end + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + end + + end + + + end + end + + -- + printlog("牌型计算==>>>",str1) + + --[[if data["ming_gang_num"]>0 then + str1=str1.." 明杠x"..data["ming_gang_num"] + end + + if data["an_gang_num"]>0 then + str1=str1.." 暗杠x"..data["an_gang_num"] + end + + if data["dian_gang_num"]>0 then + str1=str1.." 点杠x"..data["dian_gang_num"] + end + + if gangadd~=0 then + if gangadd>0 then + str1=str1.." +"..gangadd.."分" + else + str1=str1.." "..gangadd.."分" + end + + end--]] + + if birdadd~=0 then + if birdadd>0 then + str1=str1.." 中马分数+"..birdadd.."分" + else + str1=str1.." 中马分数"..birdadd.."分" + end + + end + + + if data["mai_niao_score"] and data["mai_niao_score"]~=0 then + if data["mai_niao_score"]>0 then + str = str..sp.."买马/罚马分数:+"..data["mai_niao_score"].."分" + else + str = str..sp.."买马/罚马分数:"..data["mai_niao_score"].."分" + end + + end + + + if data["ma_geng_gong"] and data["ma_geng_gong"]~=0 then + if data["ma_geng_gong"]>0 then + str1 = str1.." 马跟杠:+"..data["ma_geng_gong"].."分" + else + str1 = str1.." 马跟杠:"..data["ma_geng_gong"].."分" + end + + end + + if geng_zhuan and geng_zhuan~=0 then + if geng_zhuan>0 then + str1 = str1.." 跟庄:+"..geng_zhuan.."分" + else + str1 = str1.." 跟庄:"..geng_zhuan.."分" + end + + end + + + + + + item:GetChild("score3").text=str1 + local paixingCtr=item:GetController("detail") + table.insert(self.PaiXingXiangQingCtrList,paixingCtr) + ------------------------- + + local hp_nonnegative = room:checkHpNonnegative() + item:GetController("nonnegative").selectedIndex = hp_nonnegative and 1 or 0 + if hp_nonnegative then + local hp_info = data.hp_info + local ctr_hp_limit = item:GetController("hp_limit") + local hp = d2ad(hp_info.round_actual_hp) + if hp >= 0 then hp = "+" .. tostring(hp) end + item:GetChild("tex_hp").text = hp + ctr_hp_limit.selectedIndex = hp_info.upper_limit and 1 or 0 + end + + + item:GetController("win").selectedIndex = is_win and 0 or 1 + if p.self_user.account_id == active_player and is_win == false and total < 0 then + item:GetController("win").selectedIndex = 2 + end + + if is_win then + item:GetController("bg").selectedIndex=1 + else + item:GetController("bg").selectedIndex=0 + end + local win_card = item:GetChild("win_card") + win_card.icon = "ui://Main_PokeMaJiang/201_"..data["win_card"] + + if niao and #niao>0 then + local currentNiaoList=self:CalculateNiao(niao ,data["seat"]) + if currentNiaoList and #currentNiaoList>0 then + local lst_niao = item:GetChild("list_niao") + lst_niao:RemoveChildrenToPool() + for i = 1, #currentNiaoList do + if currentNiaoList[i].score > 0 then + local card_niao = lst_niao:AddItemFromPool() + card_niao.icon = "ui://Main_PokeMaJiang/201_" .. currentNiaoList[i].card + end + end + end + end + + + if p.seat == room.banker_seat then + item:GetController("bank").selectedIndex = 1 + end +end + +function M:CalculateNiao(niaoList,seat) + local tempNiao={} + for i=1,#niaoList do + if niaoList[i].seat==seat then + table.insert(tempNiao,niaoList[i]) + end + end + return tempNiao +end + + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + player_list[i].id = user.account_id + player_list[i].hp_info = data[i].hp_info + player_list[i].score = data[i].total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + + local settle_log = data[i].settle_log + player_list[i].param = {} + player_list[i].param[1]={} + player_list[i].param[1].key = "自摸次数:" + player_list[i].param[1].value = tostring(data[i].settle_log.zimo) + player_list[i].param[2]={} + player_list[i].param[2].key = "接炮次数:" + player_list[i].param[2].value = tostring(data[i].settle_log.jie_pao) + player_list[i].param[3]={} + player_list[i].param[3].key = "点炮次数:" + player_list[i].param[3].value = tostring(data[i].settle_log.dian_pao) + player_list[i].param[4]={} + player_list[i].param[4].key = "暗杠次数:" + player_list[i].param[4].value = tostring(data[i].settle_log.an_kong) + player_list[i].param[5]={} + player_list[i].param[5].key = "明杠次数:" + player_list[i].param[5].value = tostring(data[i].settle_log.ming_kong) + end + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + local big_result = self._view:GetChild("big_result") + big_result:GetChild("txt_room_info").text = string.format("%s 房号%s 局%s/%s", os.date("%Y/%m/%d", os.time()), room.room_id, room.curren_round, room.room_config.round) + local lst_p = big_result:GetChild("player_list") + if #player_list == 3 then + lst_p.columnGap = 108 + elseif #player_list == 2 then + lst_p.columnGap = 208 + end + self:InitBigResult(room, 30) + local show_detail = room.hpOnOff == 1 + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + com_p:GetController("jsicon").selectedIndex=i-1 + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + if show_detail then + local score = 0 + if com_p:GetController("pn").selectedIndex == 0 then + score = com_p:GetChild("txt_navigate").text + else + score = com_p:GetChild("txt_positive").text + end + score = score / room.score_times + com_p:GetChild("tex_detail_score").text = string.format("%s × %s倍", score, room.score_times) + end + end + if room.group_id ~= 0 then + big_result:GetController("group").selectedIndex = 1 + end + DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild("btn_head") + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= "" then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end + +local prefix +function M:GetPrefix() + -- if not prefix then + prefix = get_majiang_prefix(10) + -- end + return prefix +end + + +function M:DestroyWithCallback() + if self._callback then + self._callback() + end + self:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/EXGameController.lua b/lua_probject/extend_project/extend/majiang/qizhiba/EXGameController.lua new file mode 100644 index 00000000..1a879c74 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/EXGameController.lua @@ -0,0 +1,472 @@ +local TX_Protocol = import(".Protocol") +local FZTipList = import(".main.FZData") +local TX_GameEvent = import(".GameEvent") + +local M = {} + +--- Create a new GameController +function M.new() + setmetatable(M,{__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("测试麻将") + self.class = "TX_GameController" + return self +end + +function M:init(name) + GameController.init(self,name) + + self._eventmap[TX_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[TX_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[TX_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[TX_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[TX_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[TX_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + self._eventmap[TX_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[TX_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[TX_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[TX_Protocol.GAME_EVT_RESULT2] = self.OnEventResult2 + self._eventmap[TX_Protocol.GAME_EVT_NIAO] = self.OnEventNiao + self._eventmap[TX_Protocol.GAME_EVT_PIAOTIP] = self.OnEventPiaoTip + self._eventmap[TX_Protocol.GAME_EVT_PIAO] = self.OnEventPiao +end + +local __pre_delete_card = false +-- 发送出牌指令到服务器 +function M:SendOutCard(card, callback) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_DIS_CARD, _data) + + -- 进行预删牌处理 + local p = _room.self_player + _room.curren_outcard_seat = -1 + list_remove(p.card_list,card) + table.sort(p.card_list, ViewUtil.HandCardSort2) + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + __pre_delete_card = true + callback() +end + + +-- 发送放子选择到服务器 +function M:SendAction(id) + local _data = {} + _data["id"] = id + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_ACTION, _data) +end + + +function M:HideHutips() + DispatchEvent(self._dispatcher,TX_GameEvent.HuTipsAction) +end + +function M:OnEventSendCards(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + if not _room.room_config.piao_niao or _room.self_player.entrust then + _room.curren_round = _room.curren_round + 1 + end + if _room.curren_round > 0 then _room.playing = true end + + printlog("开始发牌===========>>>") + pt(evt_data) + + local room = DataManager.CurrenRoom + --printlog(evt_data.laiziCard) + --printlog(evt_data.laiziCard2) + --printlog(evt_data.laiziCard3) + + room.laiziInfo={} + if evt_data.laiziCard2>0 then + table.insert(room.laiziInfo,evt_data.laiziCard) + table.insert(room.laiziInfo,evt_data.laiziCard2) + if evt_data.laiziCard3>0 then + --table.insert(room.laiziInfo,evt_data.laiziCard3) + local str=string.sub(evt_data.laiziCard3,2) + for i=1,4 do + table.insert(room.laiziInfo,tonumber(i..str)) + end + end + else + room.laiziInfo=nil + end + + if evt_data.laiziCard3>0 then + DispatchEvent(self._dispatcher,TX_GameEvent.SendLaiZi,evt_data.laiziCard3,evt_data.laiziCard3,0,true ) + end + + + + + -- _room.SelfPlayer.AutoOutCard = false + local handcards = evt_data["card_list"] + local p = _room.self_player + local seat = evt_data["bank_seat"] + self._cacheEvent:Enqueue(function() + _room.banker_seat = seat + for i=1,#_room.player_list do + _room.player_list[i].hand_left_count = 7 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + end + p.card_list = handcards + self._room.self_player.hand_left_count = #handcards + table.sort( handcards, ViewUtil.HandCardSort2 ) + DispatchEvent(self._dispatcher,TX_GameEvent.SendCards, p) + end) +end + + +local function tableSortNumber(a, b) + return a > b +end + + +function M:OnEventOutCard(evt_data) + printlog("出牌事件===========>>>") + pt(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local ting_list = nil + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + _room.last_outcard_seat = seat + if seat == _room.self_player.seat and __pre_delete_card then + __pre_delete_card = false + else + if seat == _room.self_player.seat then + list_remove(p.card_list, card) + table.sort(p.card_list, ViewUtil.HandCardSort2) + end + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + DispatchEvent(self._dispatcher,TX_GameEvent.OutCard, p, card) + end + end) +end + + +function M:OnEventTakeCard(evt_data) + printlog("抓牌===========>>>") + pt(evt_data) + self._room.self_player.tingPaiList=evt_data.ting_list + + if evt_data.ting_list and #evt_data.ting_list>0 then + local tempTingList={} + local tempCardTingList={} + for i=1,#DataManager.CurrenRoom.self_player.tingPaiList do + local tempCard=DataManager.CurrenRoom.self_player.tingPaiList[i].card + local tempV=DataManager.CurrenRoom.self_player.tingPaiList[i].value + tempCardTingList[tempCard]=tempV + if tempV and #tempV>0 then + for j=1,#tempV do + if IsHasDictionary(tempV[j],tempTingList)==false then + table.insert(tempTingList,tempV[j]) + end + end + end + end + if #tempTingList>0 then + self._room.self_player.allTingPaiList=tempTingList + self._room.self_player.CardTingList=tempCardTingList + --pt(tempCardTingList) + end + end + + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + p.hand_left_count = p.hand_left_count +1 + if (seat == _room.self_player.seat) then + _room.self_player.card_list[#_room.self_player.card_list+1] = card + -- table.sort( _room.self_player.card_list, ViewUtil.HandCardSort ) + end + DispatchEvent(self._dispatcher,TX_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnEventOutHint(evt_data) + printlog("出牌提示事件===========>>>") + pt(evt_data) + self._cacheEvent:Enqueue(function() + self._room.curren_outcard_seat = self._room.self_player.seat + DispatchEvent(self._dispatcher,TX_GameEvent.OutHint) + end) +end + +function M:OnEventTurn(evt_data) + printlog("转轮指向===========>>>") + pt(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + -- self._room.curren_outcard_seat = seat + DispatchEvent(self._dispatcher,TX_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + printlog("放子提示事件===========>>>") + pt(evt_data) + + self._cacheEvent:Enqueue(function() + + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + for i=1,#list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + tip.opcard = dtip["opcard"] + tiplist:AddTip(tip) + end + DispatchEvent(self._dispatcher,TX_GameEvent.FZTips, tiplist) + end) +end + +function M:OnEventFzAction(evt_data) + printlog("吃杠碰行为事件===========>>>") + pt(evt_data) + + self._room.self_player.CardTingList={} + self._room.self_player.allTingPaiList={} + self._room.self_player.tingPaiList=evt_data.ting_list + + if evt_data.ting_list and #evt_data.ting_list>0 then + local tempTingList={} + local tempCardTingList={} + for i=1,#DataManager.CurrenRoom.self_player.tingPaiList do + local tempCard=DataManager.CurrenRoom.self_player.tingPaiList[i].card + local tempV=DataManager.CurrenRoom.self_player.tingPaiList[i].value + tempCardTingList[tempCard]=tempV + if tempV and #tempV>0 then + for j=1,#tempV do + if IsHasDictionary(tempV[j],tempTingList)==false then + table.insert(tempTingList,tempV[j]) + end + end + end + end + if #tempTingList>0 then + self._room.self_player.allTingPaiList=tempTingList + self._room.self_player.CardTingList=tempCardTingList + --pt(tempCardTingList) + end + end + + local _room = self._room + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local type = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + -- local openkong = evt_data["openkong"] + + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local fz = nil + local index = -1 + local ftype = type + if (ftype == FZType.Gang_Peng) then + for i=1,#p.fz_list do + if (p.fz_list[i].card == card) then + p.fz_list[i].card = card + fz = p.fz_list[i] + fz.type = type + index = i -1 + break + end + end + end + if (index == -1) then + fz = {} + fz.card = card + fz.type = type + fz.active_card = actice_card + p.fz_list[#p.fz_list+1] = fz + end + + fz.allCard={} + if from_seat ~= p.seat then + table.insert(fz.allCard,card) + if opcard and #opcard>0 then + for i=1,#opcard do + table.insert(fz.allCard,opcard[i]) + end + end + else + fz.allCard=opcard + end + + printlog("吃杠碰显示牌=====>>>") + pt(fz.allCard) + + fz.opcard=opcard + fz.from_seat = from_seat + local remove_num = #opcard + + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(p.card_list,opcard[i]) + end + end + + p.hand_left_count = p.hand_left_count - remove_num + if from_seat ~= p.seat then + -- if (fz.Type == FZType.Chi) then card = actice_card end + local fp = _room:GetPlayerBySeat(from_seat) + table.remove(fp.outcard_list,#fp.outcard_list) + end + + DispatchEvent(self._dispatcher,TX_GameEvent.FangziAction, fz, p, index) + end) +end + +function M:OnEventHu(evt_data) + printlog("胡牌===========>>>") + pt(evt_data) + + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local win_card = evt_data["win_card"] + local win_list = evt_data["win_list"] + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + table.sort( win_p.card_list, ViewUtil.HandCardSort2) + DispatchEvent(self._dispatcher,TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], win_card, cards, win_list) + end) + + --[[local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local hu_card = evt_data["win_card"] + table.sort(cards, ViewUtil.HandCardSort) + cards[#cards +1] = hu_card + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + DispatchEvent(self._dispatcher,TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], cards, hu_card) + end)--]] +end + +function M:OneventResult1(evt_data) + printlog("小结算===========>>>") + pt(evt_data) + local over = evt_data.type + --0:小结算 1:小大结算 2:大结算 + self._room._reload_flag = false + self._room.playing = false + if 0 == over then + local result = evt_data.result + self._cacheEvent:Enqueue(function() + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil,true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +-- function M:OnEventResult2(evt_data) +-- DataManager.CurrenRoom.Over = true +-- ControllerManager.SetGameNetClient(nil,true) + -- local info_list = evt_data["info_list"] + -- if self._result ~= nil then + -- self._cacheEvent:Enqueue(function() + -- self:OneventResult1(self._result) + -- self._result = nil + -- end) + -- end +-- self._cacheEvent:Enqueue(function() +-- DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, info_list) +-- ControllerManager.ChangeController(LoddyController) +-- end) +-- end + +function M:OnEventNiao(evt_data) + local list = evt_data["niao"] + local start_seat = evt_data["start_seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EventNiao, list, start_seat) + end) +end + +function M:OnEventPiaoTip() + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + self._cacheEvent:Enqueue(function() + if not self._room._reload_flag then + self._room.curren_round = self._room.curren_round + 1 + end + self._room.playing = true + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiaoTip, evt_data) + end) +end + +function M:OnEventPiao(evt_data) + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiao, evt_data.seat, evt_data.num) + end) +end + +function M:GetPosString( seat ) + if DataManager.CurrenRoom.room_config.people_num ~= 4 then return"" end + if seat == 1 then + return "北" + elseif seat == 2 then + return "西" + elseif seat == 3 then + return "南" + elseif seat == 4 then + return "东" + end +end + +function M:Discard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + -- list_remove(_room.SelfPlayer.Cards,card) + -- table.sort(_room.SelfPlayer.Cards) + _client:send(Protocol.Game_Da, _data) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/EXGameInfo.lua b/lua_probject/extend_project/extend/majiang/qizhiba/EXGameInfo.lua new file mode 100644 index 00000000..ccd87da2 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/EXGameInfo.lua @@ -0,0 +1,117 @@ +local EXGameInfo = {} + +local M = EXGameInfo + + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/majiang/qizhiba/ui/Info_MJ_QiZhiBa") + return self +end + +function M:FillData() + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 3 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_QiZhiBa/Cgm_create_room") +end + +local _help_url= "ui://Info_MJ_QiZhiBa/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_MJ_QiZhiBa/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_MJ_QiZhiBa/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list ={} --{"七支八-4","七支八-3","七支八-2"} +function M:GetPlayList() + return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + 1 + local people = _config:GetController("play_list").selectedIndex+2 + + local laizi=_config:GetController("GuiType").selectedIndex + local zhama=_config:GetController("zhama").selectedIndex + local niao=0 + local niao_opt=0 + if zhama>0 and zhama<5 then + niao=1 + niao_opt=zhama + end + + + + + local lian_zhuang=_config:GetChild("btn_lianzhuang").selected and true or false + local must_hu=_config:GetChild("btn_zidonghu").selected and true or false + local chipai=_config:GetChild("btn_chipai").selected and true or false + + + + ------ + local _data = {} + _data["opt"] = round + _data["maxPlayers"] = people + + _data["laizi"] = laizi + _data["niao"] = niao + _data["niao_opt"] = niao_opt + + + + _data["lian_zhuang"] = lian_zhuang + _data["zi_dong_hu"] = must_hu + _data["chipai"] = chipai + + --printlog("上传房间配置==========>>>") + --pt(_data) + + return _data +end + +function M:LoadConfigData(data) + --printlog("加载房间配置=========>>>") + --pt(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt -1 + _config:GetController("play_list").selectedIndex = data.maxPlayers-2 + + _config:GetController("GuiType").selectedIndex = data.laizi + + + local GuiTypeValue=0 + if data.niao ==0 then + GuiTypeValue=0 + elseif data.niao ==1 then + GuiTypeValue=data.niao_opt + end + + _config:GetController("zhama").selectedIndex = GuiTypeValue + + + _config:GetChild("btn_lianzhuang").selected = data.lian_zhuang or false + _config:GetChild("btn_zidonghu").selected = data.zi_dong_hu or false + _config:GetChild("btn_chipai").selected = data.chipai or false + + + + end + + + + + +return M + \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/EXMainView.lua b/lua_probject/extend_project/extend/majiang/qizhiba/EXMainView.lua new file mode 100644 index 00000000..fca9e309 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/EXMainView.lua @@ -0,0 +1,835 @@ +local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = import(".main.MJPlayerCardInfoView") +local MJMainView = import(".main.MJMainView") +local EXClearingView = import(".EXClearingView") +local TX_GameEvent = import(".GameEvent") +local HuTipView = import(".main.HuTipView") +local SettingView = import(".main.MJSettingViewNew") +local PlayerInfoView = import(".EXPlayerInfoView") +local M = {} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M,{__index = MJMainView}) + local self = setmetatable({}, {__index = M}) + self.class = "MainView" + self.asset_group = "QiZhiBa_MJ" + self:init() + ViewUtil.PlayMuisc(self.asset_group, "extend/majiang/qizhiba/sound/bg.mp3") + return self +end + +function M:InitView(url) + local room = self._room + self._style = 1 + self._gps_style = 1 + self._full = true + UIPackage.AddPackage("extend/majiang/qizhiba/ui/Extend_MJ_QiZhiBa") + MJMainView.InitView(self,"ui://Main_PokeMaJiang/Main_"..room.room_config.people_num .. "_s2") + self._hu_tip = HuTipView.new(self) + + self._view:GetChild('wanfa_text').text =room.room_config.people_num .. '人七支八 ' .. room.score_times .. '倍' + + self.LaiziBG=self._view:GetChild('n103') + self.LaiziBG.text="鬼牌" + self.LaiziBG.visible=false + self.selectLaiziBtn=self._view:GetChild('selectlaizi') + self.Laizi1Btn=self._view:GetChild('selectlaizi1') + self.Laizi2Btn=self._view:GetChild('selectlaizi2') + self.Laizi1Btn.visible=false + self.Laizi2Btn.visible=false + self.selectLaiziBtn.visible=false + self:SetReconnentLaiziTips() + + self:PlayerChangeLineState() + + if room.playing or room.curren_round > 0 then + self:ReloadRoom() + end +end + + + +function M:SetReconnentLaiziTips() + local room=DataManager.CurrenRoom + if room.laiziInfo and room.laiziInfo[3] and tonumber(room.laiziInfo[3])>0 then + self:SetShowLaiZiProcess(room.laiziInfo[3],room.laiziInfo[3],0,false) + end +end + + +function M:SetLaiZiCard(btn,cardId) + btn.icon='ui://Main_PokeMaJiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..cardId +end + + +function M:IsShowLaiZi(btn,isShow) + btn.visible=isShow +end + + +function M:HideAllLaiZiCard() + self.Laizi1Btn.visible=false + self.Laizi2Btn.visible=false + self.selectLaiziBtn.visible=false + self.LaiziBG.visible=false +end + +function M:SetShowLaiZiProcess(beforeLaiziID,currentLaizi1ID,currentLaizi2ID,isShowAnim) + --zhongid=currentLaizi1ID + if isShowAnim==nil then isShowAnim=false end + + printlog("当前赋值结果为====>>>") + print(beforeLaiziID) + print(currentLaizi1ID) + print(currentLaizi2ID) + self:HideAllLaiZiCard() + self:SetLaiZiCard(self.selectLaiziBtn,beforeLaiziID) + self:SetLaiZiCard(self.Laizi1Btn,currentLaizi1ID) + if currentLaizi2ID>0 then + self:SetLaiZiCard(self.Laizi2Btn,currentLaizi2ID) + end + + + if isShowAnim==true then + self:IsShowLaiZi(self.selectLaiziBtn,true) + coroutine.start( + function() + coroutine.wait(1) + self:HideAllLaiZiCard() + self.LaiziBG.visible=true + self:IsShowLaiZi(self.Laizi1Btn,true) + if currentLaizi2ID>0 then + self:IsShowLaiZi(self.Laizi2Btn,true) + end + + end + ) + else + self.LaiziBG.visible=true + self:IsShowLaiZi(self.Laizi1Btn,true) + if currentLaizi2ID>0 then + self:IsShowLaiZi(self.Laizi2Btn,true) + end + end + self.LaiziBG.visible=true +end + + +function M:UpdateRound() + self._view:GetChild("tex_round1").text = self._room.curren_round + self._view:GetChild("tex_round2").text = self._room.room_config.round +end + +function M:InitPlayerInfoView() + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem,self) + tem.visible = false + end +end + +function M:NewMJPlayerCardInfoView(view,index) + if index == 1 then + return MJPlayerSelfCardInfoView.new(view,self) + end + return MJPlayerCardInfoView.new(view,self) +end + +function M:EventInit() + -- UIPackage.AddPackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong") + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _gcm_outcard_url = UIPackage.GetItemURL("Main_PokeMaJiang", "Gcm_OutCard") + local _player_info = self._player_info + local _gamectr = self._gamectr + + + + _gamectr:AddEventListener(TX_GameEvent.SendLaiZi, function(...) + local arg = {...} + self:SetShowLaiZiProcess(arg[1],arg[2],arg[3],arg[4]) + end) + + _gamectr:AddEventListener(TX_GameEvent.HuTipsAction, function(...) + self._hu_tip:HideHuTipsPanel() + end) + + + _gamectr:AddEventListener(TX_GameEvent.SendCards,function( ... ) + -- self:ShowHuTip() + self:UpdateRound() + self._state.selectedIndex = 1 + local list = _room.player_list + for i=1,#list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateHandCard() + end + end) + _gamectr:AddEventListener(TX_GameEvent.EventTurn, function(...) + local arg = {...} + self._left_time = 15 + local seat = arg[1] + self:UpdateCardBox(self:GetPos(seat)) + -- if seat == self._room.self_player.seat then + -- self:ShowHuTip() + -- end + end) + + _gamectr:AddEventListener(TX_GameEvent.OutHint, function(...) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:UpdateHandCard(true) + end) + + local _gcm_outcard_url ="ui://Main_PokeMaJiang/Gcm_OutCard" + _gamectr:AddEventListener(TX_GameEvent.OutCard, function(...) + self:__CloseTip() + self._left_time = 0 + local arg = {...} + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:RemoveCursor() + info:UpdateHandCard() + local outcard = UIPackage.CreateObjectFromURL(_gcm_outcard_url) + info:UpdateOutCardList(outcard, card, self._cursor) + local cardAudio=string.sub(card,2) + self:PlaySound("QiZhiBa_MJ", p.self_user.sex, tostring(cardAudio)) + self:PlayMJSound("chupai.mp3") + if seat == _room.self_player.seat then + _room.curren_outcard_seat = -1 + end + end) + _gamectr:AddEventListener(TX_GameEvent.GetCard, function(...) + self:__CloseTip() + local arg = {...} + local seat = arg[1] + local card = arg[2] + -- self._tex_leftTime.text = arg[3] + self._tex_LeftCard.text = arg[3] + -- self:UpdateRoomInfo() + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateHandCard(true) + end) + + _gamectr:AddEventListener(TX_GameEvent.FZTips, function(...) + arg={...} + local _tip = arg[1] + self:__FangziTip(_tip) + end) + + _gamectr:AddEventListener(TX_GameEvent.FangziAction, handler(self,self.OnFangziAction)) + + _gamectr:AddEventListener(TX_GameEvent.ZPHuCard, function(...) + self._left_time = 0 + self:UpdateCardBox(0) + self:__CloseTip() + self._popEvent = false + local arg = {...} + local win_seat = arg[1] + local lose_seat = arg[2] + local win_card = arg[3] + local cards = arg[4] + local win_list = arg[5] + local index = self:GetPos(win_seat) + local info = self._player_card_info[index] + self:RemoveCursor() + info:UpdateHandCard(true, true) + + local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_PokeMaJiang/Btn_Card") + obj_win_card.icon = "ui://Main_PokeMaJiang/201_" .. win_card + obj_win_card:GetController("bg").selectedIndex = 1 + info._view:AddChild(obj_win_card) + obj_win_card:Center() + + local url, pNode + local player = _room:GetPlayerBySeat(win_seat) + if win_seat ~= _room.self_player.seat then + url = "ui://Main_PokeMaJiang/别人胡" + pNode = info._mask_liangpai + elseif win_seat == _room.self_player.seat then + url = "ui://Main_PokeMaJiang/自己胡牌" + pNode = self._view + end + if win_seat == lose_seat then + url = "ui://Main_PokeMaJiang/eff_zimo" + end + + local he = UIPackage.CreateObjectFromURL(url) + pNode:AddChild(he) + he:GetTransition("t2"):Play() + he:Center() + if _room.room_config.people_num==2 then + if win_seat ~= _room.self_player.seat then + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + end + + if win_seat == _room.self_player.seat then + printlog("自己位置=====") + he:Center() + elseif url == "ui://Main_PokeMaJiang/eff_zimo" then + printlog("自摸地址==========") + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + + + + --- + local isZiMo=win_seat==lose_seat + DataManager.CurrenRoom.isZiMoHu=isZiMo + local hu_sound = isZiMo and ("zimo"..math.random(1, 3)) or ("hu"..math.random(1, 2)) + printlog("声音====>>>",hu_sound) + self:PlaySound("QiZhiBa_MJ",player.self_user.sex, hu_sound) + + local pNode = info._view + local url = "eff_list1" + local he_list = UIPackage.CreateObjectFromURL("ui://Extend_MJ_QiZhiBa/" .. url) + he_list.touchable = false + pNode:AddChild(he_list) + he_list:Center() + + coroutine.start(function() + for i = 1 ,#win_list do + local tem = win_list[i] + if tem.type>0 and tem.type<32 then + local com_name = "he" .. tem.type + local item = he_list:GetChild("list"):AddItemFromPool("ui://Extend_MJ_QiZhiBa/" .. com_name) + coroutine.wait(0.3) + end + + end + + coroutine.wait(2) + obj_win_card:Dispose() + he:Dispose() + he_list:Dispose() + self._popEvent = true + end) + + end) + + _gamectr:AddEventListener(TX_GameEvent.EventNiao, function(...) + local arg = {...} + self._popEvent = false + local list = arg[1] + local start_seat = arg[2] + -- ViewUtil.PlaySound("ChaoShan_MJ", "extend/majiang/chaoshan/sound/zhuaniao.mp3") + coroutine.start(self.RunNiao,self,list, start_seat) + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult1, function(...) + self._popEvent = false + self:__CloseTip() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = {...} + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local niao = result.niao + if liuju then + local le = UIPackage.CreateObjectFromURL("ui://Main_PokeMaJiang/LiuJu") + self._view:AddChild(le) + le:Center() + le:GetTransition("t0"):Play() + coroutine.start(function() + coroutine.wait(1) + le:Dispose() + end) + end + self:RemoveCursor() + if self._clearingView == nil then + self._clearingView = EXClearingView.new(self._root_view) + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + self._popEvent = true + end) + end + + if _room.curren_round ~= _room.room_config.round then + -- if #niao == 0 then self._view:GetChild("n13").visible = false end + self._clearingView:InitData(0, _room, result, nil, function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:ResetCardType() + if _room:checkHpNonnegative() then + p.cur_hp = data[i].hp_info.cur_hp + end + info:UpdateScore() + info._view:GetChild("zhanji").visible = true + local num = data[i].hp_info.total_hp + if num > 0 then + info._view:GetController("text_color").selectedIndex = 0 + info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + else + info._view:GetController("text_color").selectedIndex = 1 + info._view:GetChild("text_jifen").text = d2ad(num) + end + + info._view:GetChild("mask_piao").title = "" + info._view:GetController("piao_niao").selectedIndex = 0 + p.fz_list = {} + end + DataManager.CurrenRoom.self_player.card_list = {} + self._state.selectedIndex = 2 + self._clearingView = nil + end) + end + self._player_card_info[1]:ShowHuTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult2, function(...) + self:UnmarkSelfTuoguan() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = {...} + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + self._clearingView = EXClearingView.new() + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + end) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiaoTip, function() + self:UpdateRound() + self._tex_LeftCard.text = "0" + self._state.selectedIndex = 1 + self:__PiaoNiaoTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiao, function(...) + local arg = {...} + local seat = arg[1] + local num = arg[2] + if num > 0 then + local head_info = self._player_info[self:GetPos(seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. num + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + if seat == _room.self_player.seat then + if self._com_piao and _room.self_player.entrust then + self._com_piao:Dispose() + self._com_piao = nil + _room.curren_round = _room.curren_round - 1 + end + end + end) +end + +function M:OutCard(card) + local isOut=IsHasDictionary(card,DataManager.CurrenRoom.laiziInfo) + if isOut==false then + printlog("当前出牌为===>>>"..card) + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card, function() + local info = self._player_card_info[1] + self:RemoveCursor() + info:UpdateHandCard() + + info:UpdateOutCardList(nil, card, self._cursor) + local cardAudio=string.sub(card,2) + self:PlaySound("QiZhiBa_MJ", self._room.self_player.self_user.sex,tostring(cardAudio)) + self:PlayMJSound("chupai.mp3") + -- self:ShowHuTip() + end) + else + printlog("鬼牌不能出===>>>"..card) + end +end + +function M:__FangziTip(tip, weight) + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject("Main_PokeMaJiang", "Gcm_action_tips") + _chipeng_tip:GetController("hide_bg").selectedIndex = 1 + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + -- self._player_card_info[self:GetPos(p.seat)] + + local _lit_fanzi = _chipeng_tip:GetChild("lit_fanzi") + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + + + local tip_hu = false + local count = #_tlist + table.sort(_tlist) + local isHu = false + for k=1,#_tlist do + + + local td = tip.tip_map_type[_tlist[k]][1] + local url = "ui://Main_PokeMaJiang/Btn_fztip" + local td_weight = td.weight + if td_weight == 16 then td_weight = 8 end + if td_weight == 8 then url = "ui://Main_PokeMaJiang/Btn_hu" end + local btn_t = _lit_fanzi:AddItemFromPool(url) + btn_t.icon = "ui://Main_PokeMaJiang/fztip_"..td_weight + btn_t.data = { tip, td } + btn_t.onClick:Add(self.__TipAction,self) + + end + + local _btn_pass = _lit_fanzi:AddItemFromPool("ui://Main_PokeMaJiang/Btn_pass") + _btn_pass.onClick:Set(function() + if isHu then + local guo_msg = MsgWindow.new(self._root_view, "确定要点过吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end) + guo_msg:Show() + else + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end) + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() +end + + + + +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local list = tip.tip_map_type[td.weight] + if (#list > 1) then + self:_ChiView(list, function(id) + _gamectr:SendAction(id) + self:__CloseTip() + end) + self._chipeng_tip.visible = false + return + end + + _gamectr:SendAction(td.id) + if (self._chipeng_tip == nil) then return end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil +end + + +function M:_ChiView(tiplist, callback) + self._chipeng_tip.visible = false + local _pop_tip_choice = UIPackage.CreateObject("Main_PokeMaJiang", "Pop_tip_choice") + local list_choose1 = _pop_tip_choice:GetChild("Lst_choose") + local list_choose2 = _pop_tip_choice:GetChild("Lst_choose2") + local crossCtr = _pop_tip_choice:GetController("state") + crossCtr.selectedIndex = #tiplist == 3 and 0 or (#tiplist == 2 and 1 or (#tiplist == 4 and 2 or (#tiplist == 5 and 3 or 4))) + _pop_tip_choice:GetChild("Btn_cross").onClick:Add(function() + _pop_tip_choice:Dispose() + self._chipeng_tip.visible = true + end) + list_choose1:RemoveChildrenToPool() + list_choose2:RemoveChildrenToPool() + for i = 1, #tiplist do + local list_choose = i <= 3 and list_choose1 or list_choose2 + local item_choose = list_choose:AddItemFromPool() + item_choose:GetController("type").selectedIndex = (1 == tiplist[i].weight or 2 == tiplist[i].weight) and 1 or 0 + if tiplist[i].weight ~= 1 then + for j = 1, 4 do + item_choose:GetChild("card"..j).icon = UIPackage.GetItemURL("Main_PokeMaJiang", self:GetPrefix() .. "201_"..tiplist[i].card) + end + else + local tem = {} + table.insert(tem, tiplist[i].opcard[1]) + table.insert(tem, tiplist[i].opcard[2]) + local tcard = tiplist[i].card + table.insert(tem, tcard) + table.sort(tem, function(a, b) + return a < b + end) + item_choose:GetChild("card1").icon = UIPackage.GetItemURL("Main_PokeMaJiang", self:GetPrefix() .. "201_"..tem[1]) + item_choose:GetChild("card2").icon = UIPackage.GetItemURL("Main_PokeMaJiang", self:GetPrefix() .. "201_"..tem[2]) + item_choose:GetChild("card4").icon = UIPackage.GetItemURL("Main_PokeMaJiang", self:GetPrefix() .. "201_"..tem[3]) + local cardpos = tem[2] > tcard and 1 or (tem[2] < tcard and 4 or 2) + item_choose:GetChild("card" .. cardpos):GetController("color").selectedIndex = 1 + end + item_choose.onClick:Add(function() + callback(tiplist[i].id) + end) + end + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width)/2, (self._view.height - _pop_tip_choice.height)/2) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:OnFangziAction(...) + self:__CloseTip() + local arg = {...} + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local index = arg[3] + + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject("Extend_MJ_QiZhiBa", "FzEffect") + --[[if fz.type == FZType.Peng then + self:PlaySound("QiZhiBa_MJ", player.self_user.sex,"peng"..math.random(1, 3)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_PokeMaJiang", "碰") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_PokeMaJiang", "碰") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "碰框") + else + + self:PlaySound("QiZhiBa_MJ", player.self_user.sex,"gang"..math.random(1, 2)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_PokeMaJiang", "杠") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_PokeMaJiang", "杠") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "杠框") + end--]] + + ---- + local fangzi = "" + local fz_sound = "" + if fz.type == FZType.Peng then + fangzi = "碰" + fz_sound = "peng"..math.random(1, 3) + elseif fz.type == FZType.Chi then + fangzi = "吃" + fz_sound = "chi"..math.random(1, 3) + else + if fz.opengang then + fangzi = "杠" + fz_sound = "gang"..math.random(1, 2) + else + fangzi = "补" + fz_sound = "buzhang" + end + end + self:PlaySound("QiZhiBa_MJ",player.self_user.sex,fz_sound) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_PokeMaJiang", fangzi) + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_PokeMaJiang", fangzi) + + + + + + effect.touchable = false + effect:GetTransition("t2"):Play() + pNode:AddChild(effect) + coroutine.start(function() + coroutine.wait(2) + effect:Dispose() + end) + + self:RemoveCursor() + if (player.seat ~= fz.from_seat) then + local fs_info = _player_card_info[self:GetPos(fz.from_seat)] + fs_info:UpdateOutCardList() + end + info:UpdateFzList(fz, index, true) + local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi + info:UpdateHandCard(getcard) + self:__CloseTip() +end + +function M:RunNiao(list, start_seat) + local _room = self._room + --local _niao_View = self._niao_View + self._niao_View = UIPackage.CreateObject("Extend_MJ_QiZhiBa","Panel_Birds") + self._view:AddChild(self._niao_View) + self._niao_View:Center() + local _niao_View = self._niao_View + local list_niao_card = self._niao_View:GetChild("Lst_birds") + list_niao_card:RemoveChildrenToPool() + for i = 1, #list do + --添加背面的麻將 + local item = list_niao_card:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_PokeMaJiang", "202_00") + item:GetChild("tex_score").text = "+" .. list[i].score + end + for i = 1, #list do + --顯示正面 + local item = list_niao_card:GetChildAt(i - 1) + local card = list[i].card + coroutine.wait(0.3) + item:GetTransition("appear"):Play() + item.icon = UIPackage.GetItemURL("Main_PokeMaJiang", "201_"..card) + if list[i].score > 0 then item:GetController("bg").selectedIndex = 1 end + end + coroutine.start(function() + coroutine.wait(2) + _niao_View:Dispose() + self._popEvent = true + end) +end + +-- function M:markOutCards(showTip, data) +-- for i = 1, #self._room.player_list do +-- local p = self._room.player_list[i] +-- local info = self._player_card_info[self:GetPos(p.seat)] +-- for j = 1, #p.outcard_list do +-- local card = p.outcard_list[j] +-- if card == data then +-- local obj = info:GetOutCardByIndex(j) +-- obj:GetController("gray").selectedIndex = showTip and 1 or 0 +-- end +-- end +-- end +-- end + +function M:__PiaoNiaoTip() + local obj_piao = UIPackage.CreateObject("Main_PokeMaJiang", "panel_piao_niao") + self._view:AddChild(obj_piao) + obj_piao.x = (self._view.width - obj_piao.width) * 0.5 + obj_piao.y = self._view.height * 0.6 + for i = 1, 4 do + obj_piao:GetChild("btn_" .. i).onClick:Add(function() + self._gamectr:SendAction(i - 1) + obj_piao:Dispose() + end) + end + self._com_piao = obj_piao +end + +function M:ReloadRoom(bskip) + local room = self._room + -- if not room.playing then + -- self._state.selectedIndex = 2 + -- else + -- self._state.selectedIndex = 1 + -- self._room._reload_flag = true + -- end + + if bskip == nil or bskip == false then + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + self._room._reload_flag = true + end + end + + for i = 1, #room.player_list do + local p = room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + for i = 1, #p.fz_list do + info:UpdateFzList(p.fz_list[i], -1) + end + info:UpdateHandCard() + local head_info = self._player_info[self:GetPos(p.seat)] + head_info:UpdateScore() + head_info._view:GetChild('zhanji').visible = true + local num = p.total_hp or 0 + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(num) + end + + if p.seat == room.last_outcard_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil,card, self._cursor) + elseif p.seat == room.curren_outcard_seat then + info:UpdateHandCard(true) + info:UpdateOutCardList() + else + info:UpdateOutCardList() + end + if p.seat == room.banker_seat then + head_info:MarkBank(true) + end + -- if p.ready then + -- self._player_info[self:GetPos(p.seat)]:Ready(true) + -- end + if bskip == nil or bskip == false then + if p.ready and room.playing == false then + self._player_info[self:GetPos(p.seat)]:Ready(true) + end + end + if p.piao_niao~=nil and p.piao_niao > 0 then + local head_info = self._player_info[self:GetPos(p.seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + end + -- self:ShowHuTip() + + if bskip == nil or bskip == false then + self:UpdateCardBox(self:GetPos(room.curren_outcard_seat)) + self._tex_LeftCard.text = room.left_count + self:UpdateRound() + end +end + +function M:PlayerChangeLineState() + -- local isOutCard = true + -- local str = "玩家 " + -- for _ , player in ipairs(self._room.player_list) do + -- if player.line_state == 0 then + -- isOutCard = false + -- end + -- end + -- self._player_card_info[1]._area_handcard_list.touchable = isOutCard +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:__CloseTip() + if self._chipeng_tip then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if self._pop_tip_choice then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +function M:closeTipOnTuoguan() + self:__CloseTip() +end + +function M:Destroy() + MJMainView.Destroy(self) + UIPackage.RemovePackage("extend/majiang/qizhiba/ui/Extend_MJ_QiZhiBa") +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/qizhiba/EXPlayBackView.lua new file mode 100644 index 00000000..23f3d9a8 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/EXPlayBackView.lua @@ -0,0 +1,311 @@ +local MJPlayBackView = import(".main.MJPlayBackView") +local EXRoomConfig = import(".EXRoomConfig") +local EXClearingView = import(".EXClearingView") + +local Record_Event = import(".RecordEvent") + + +local M = {} + +--- Create a new +function M.new() + setmetatable(M,{__index = MJPlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = "PlayBackView" + self:init() + + return self +end + + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/majiang/qizhiba/ui/Extend_MJ_QiZhiBa") + MJPlayBackView.InitView(self,"ui://Main_PokeMaJiang/Main_"..room.room_config.people_num) + local _cardbox = self._view:GetChild("cardbox") + --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false + self._ctr_cardbox = _cardbox:GetController("c1") + self._tex_round = self._view:GetChild("tex_round") + self._tex_LeftCard = self._view:GetChild("remaining_card") + self._anchor = self._view:GetChild("mask_tips") + self._eventmap = {} + + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao + self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao + self._cmdmap[Record_Event.Evt_Result] = self.CmdResult +end + +function M:FillRoomData(data) + MJPlayBackView.FillRoomData(self) + if self._win_pic then self._win_pic:Dispose() end + if self._niao then self._niao:Dispose() end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local left_count = data.info.left_card + self:UpdateLeftCard(left_count) + local round = data.info.round + self:UpdateRound(round) + + local roominfo_panel = self._view:GetChild("roominfo_panel1") + roominfo_panel:GetChild("tex_roomid").text = room.room_id + roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + table.sort(p.card_list, ViewUtil.HandCardSort2) + card_info:UpdateHandCard(false, true) + self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0 + end + + self:GenerateAllStepData(data) + self:UpdateStep(1) + -- self:ShowStep(0) +end + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateLeftCard(step.left_card) + -- self._ctr_cardbox.selectedIndex = step.current_out_seat + self:UpdateCardBox(self:GetPos(step.current_out_seat)) + self:UpdateStep(index + 1) + if step.cmd ~= Record_Event.Evt_OutCard then + self:RemoveCursor() + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hand_left_count = #p.card_list + info:Clear() + info:ResetFzList() + p.piao_niao = step.player_card_data[i].piao_niao + local head_info = self._player_info[self:GetPos(i)] + if p.piao_niao and p.piao_niao > 0 then + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + else + head_info._view:GetController("piao_niao").selectedIndex = 0 + end + if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil, nil, self._cursor) + else + info:UpdateOutCardList() + end + if step.cmd == Record_Event.Evt_GetCard and p.seat == step.current_out_seat then + info:UpdateHandCard(true, true) + else + info:UpdateHandCard(false, true) + end + end + if step.cmd == Record_Event.Evt_Win then + self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_PokeMaJiang/胡") + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + else + if self._win_pic then + self._win_pic:Dispose() + end + end + if step.cmd == Record_Event.Evt_Niao then + local niao_list = step.niao + self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_QiZhiBa/Panel_Birds") + local list = self._niao:GetChild("Lst_birds") + list:RemoveChildrenToPool() + for i = 1, #niao_list do + local item = list:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_PokeMaJiang", "201_"..niao_list[i].card) + if niao_list[i].score > 0 then + item:GetController("bg").selectedIndex = 2 + end + end + self._view:AddChild(self._niao) + self._view:AddChild(self._view:GetChild("panel_record")) + self._niao:Center() + else + if self._niao then + self._niao:Dispose() + end + end + if step.cmd == Record_Event.Evt_Result then + if not self.result then + self.result = EXClearingView.new(self._root_view, true) + self.result:InitData(0, self._room, step.result_data) + self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5 + self.result._view.width = GRoot.inst.width + self.result._view.height = GRoot.inst.height + self.result._view:GetChild("btn_confirm").visible = false + self._anchor:AddChild(self.result._view) + self.result._view.x = self._anchor.x * -1 + self.result._view.y = self._anchor.y * -1 + else + self.result._view.visible = true + end + -- self.result._view:Center() + else + if self.result then + self.result._view.visible = false + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = "" + step.left_card = info.left_card + step.last_out_seat = 0 + step.current_out_seat = 1 + step.win = 0 + step.niao = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.piao_niao = p.piao_niao + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + table.sort(u.card_list, ViewUtil.HandCardSort2) + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = 0 + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + for i = 1, #cmd.data.opcard do + list_remove(u.card_list, cmd.data.opcard[i]) + end + local fz = {} + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.opcard = cmd.data.opcard + + fz.allCard={} + if cmd.from_seat ~= cmd.seat then + table.insert(fz.allCard,cmd.data.card) + if fz.opcard and #fz.opcard>0 then + for i=1,#fz.opcard do + table.insert(fz.allCard,fz.opcard[i]) + end + end + else + fz.allCard=fz.opcard + end + + local uf = data.player_card_data[cmd.data.from_seat] + if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then + table.remove(uf.outcard_list, #uf.outcard_list) + end + if fz.type ~= FZType.Gang_Peng then + u.fz_list[#u.fz_list + 1] = fz + else + for i = 1, #u.fz_list do + if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then + u.fz_list[i].type = FZType.Gang_Peng + end + end + end +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:CmdNiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.niao = cmd.data.niao +end + +function M:CmdPiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.player_card_data[cmd.seat].piao_niao = cmd.data.num +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result_data = cmd.data +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_deep_clone(last_step) + self._step[#self._step + 1] = step + step.result_data = nil + return step +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = "剩余 "..num.." 张牌" +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:UpdateRound(round) + self._tex_round.text = "第 "..round.."/"..self._room.room_config.round.." 局" +end + +function M:UpdateStep(step) + self._record:GetChild("tex_step").text = "第 " .. step .. " / " .. #self._step .. "步" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/EXPlayer.lua b/lua_probject/extend_project/extend/majiang/qizhiba/EXPlayer.lua new file mode 100644 index 00000000..fd26822b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/EXPlayer.lua @@ -0,0 +1,36 @@ + + +local EXPlayer = { + auto, + -- 手牌列表 + hand_cards = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/majiang/qizhiba/EXPlayerInfoView.lua new file mode 100644 index 00000000..f8a5fd69 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/EXPlayerInfoView.lua @@ -0,0 +1,76 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + +function M:init() + PlayerInfoView.init(self) + self._tex_score = self._view:GetChild("info"):GetChild("tex_score1") + self._tex_score2 = self._view:GetChild("info"):GetChild("tex_score2") + self._ct_score = self._view:GetChild("info"):GetController("score") +end + +function M:ShowInteraction(type,str) + if type == 3 then + Voice.DownLoad(str, function(clip) + if (clip ) then + self:ShowMaskVoice(clip.length) + GameApplication.Instance:PlayVoice(clip) + end + end) + elseif type == 4 then + self:SetChat(str) + elseif type == 2 then + local chat_index = tonumber(str) + self._main_view:PlayChatSound(self._player.self_user.sex,chat_index) + local language, index = self._main_view:GetChatMsgLanguage(chat_index) + self:SetChat(self._main_view.Fix_Msg_Chat[index]) + elseif type == 1 then + self:SetBiaoqing("ui://Chat/"..str) + end +end + +function M:UpdateRemainCard(card_num, hide) + if hide then + self._view:GetController("show_remain").selectedIndex = 0 + else + self._view:GetController("show_remain").selectedIndex = 1 + end + self._view:GetChild("com_remain"):GetChild("tex_remain").text = card_num +end + +function M:FillData(player) + PlayerInfoView.FillData(self, player) + self:UpdateScore(player.total_score) +end + +function M:UpdateScore() + local score = self._player.total_score + local room = DataManager.CurrenRoom + if room:checkHpNonnegative() then + score = d2ad(self._player.cur_hp) + end + if not score then + score = 0 + end + if score < 0 then + self._ct_score.selectedIndex = 1 + self._tex_score2.text = score + else + self._ct_score.selectedIndex = 0 + if not room:checkHpNonnegative() then + score = "+" .. score + end + self._tex_score.text = score + end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/EXRoomConfig.lua b/lua_probject/extend_project/extend/majiang/qizhiba/EXRoomConfig.lua new file mode 100644 index 00000000..383ce1b9 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/EXRoomConfig.lua @@ -0,0 +1,397 @@ + + + +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.class = "RoomConfig" + self.config=config + self.round = config["times"] + self.Qidui = config["qidui"] + self.QiangGang = config["qiangkong"] + self.QiangGangNiao = config["qiangkong_niao"] + self.Zhama = config["niao_opt"] + local isOpenLaizi8=false + --if config["laizi"]==3 then + -- isOpenLaizi8=true + --end + self.Laizi = isOpenLaizi8 --是否是8个赖子 + self.LaiziType=config["laizi"] + self.NiaoType = config["niao"] + --self.Zhamatype= config["niao_opt"] + self.piao_niao = config["piao_niao"] + self.Jiangma = config["jiangma"] + self.isHidden = config.isHidden + + self.Qanggangquanbao=config["qianggang_type"] + self.Gangbaoquanbao=config["gangbao_type"] + self.Minggangkeqiang=config["qiangkong_ming"] + self.geng_zhuan=config["geng_zhuan"] + self.jiejiegao=config["jiejiegao"] + self.jiejiegao_first=config["jiejiegao_first"] + self.wuguijiabei=config["wuguijiabei"] + self.no_wan=config["no_wan"] + self.ma_gen_di_fen=config["ma_gen_di_fen"] + self.ma_gen_gong=config["ma_gen_gong"] + self.qidui_jiafan=config["qidui_jiafan"] + + + + return self +end + +function M:GetDes(sp) + sp = sp or " " + local count=0 + local str = self.round and self.round .. "局" .. " " or "" + str = str .. RoomConfig.GetDes(self, sp).."\n" + + + + if self.config["chipai"] then + str = str .."可吃牌" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["must_hu"] then + str = str .."自动胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["jiejiegao"] then + str = str .."连庄" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if (self.LaiziType==3) then + str = str .. "翻双鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.LaiziType==1 then + str = str .. "大小王做鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.LaiziType==2 then + str = str .. "大小王加翻鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str .. "无鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.NiaoType==0 then + str = str .. "无马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.NiaoType==1 then + if self.Zhama==1 then + str = str .. "买二马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.Zhama==2 then + str = str .. "买四马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.Zhama==3 then + str = str .. "买六马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.Zhama==4 then + str = str .. "买八马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + elseif self.NiaoType==2 then + local strMB="爆炸马加分" + if self.Zhama==1 then + strMB="爆炸马加倍" + end + str = str .. strMB + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.ma_gen_di_fen then + str = str .."马跟底分" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.ma_gen_gong then + str = str .."马跟杠" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + + +function M:GetDes2(sp) + sp = sp or " " + local str = RoomConfig.GetDes(self, sp) + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + + + + if self.config["chipai"] then + str = str .."可吃牌" + str = str .. sp + end + + if self.config["must_hu"] then + str = str .."自动胡" + str = str .. sp + end + + if self.config["jiejiegao"] then + str = str .."连庄" + str = str .. sp + end + + + if (self.LaiziType==3) then + str = str .. "翻双鬼" + str = str .. sp + elseif self.LaiziType==1 then + str = str .. "大小王做鬼" + str = str .. sp + elseif self.LaiziType==2 then + str = str .. "大小王加翻鬼" + str = str .. sp + else + str = str .. "无鬼" + str = str .. sp + end + + if self.NiaoType==0 then + str = str .. "无马" + str = str .. sp + elseif self.NiaoType==1 then + if self.Zhama==1 then + str = str .. "买2马" + str = str .. sp + elseif self.Zhama==2 then + str = str .. "买4马" + str = str .. sp + elseif self.Zhama==3 then + str = str .. "买6马" + str = str .. sp + elseif self.Zhama==4 then + str = str .. "买8马" + str = str .. sp + end + elseif self.NiaoType==2 then + local strMB="爆炸马加分" + if self.Zhama==1 then + strMB="爆炸马加倍" + end + str = str .. strMB + str = str .. sp + end + + if self.ma_gen_di_fen then + str = str .."马跟底分" + str = str .. sp + end + + if self.ma_gen_gong then + str = str .."马跟杠" + str = str .. sp + end + + + + --if (self.piao_niao) then + -- str = str .. "飘鸟" .. sp + --end + + --[[if (self.NiaoType) then + if self.NiaoType == 1 then + str = str .. string.format("扎%d码", self.Zhama * 2) + elseif self.NiaoType == 2 then + str = str .. "一码全中" + elseif self.NiaoType == 3 then + str = str .. "窝窝鸟" .. sp .. (self.Zhama == 1 and "1鸟2分" or "1鸟1分") + end + str = str .. sp + + -- if self.NiaoType ~= 2 and self.Jiangma > 0 then + -- str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp + -- end + if self.Jiangma > 0 then + str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp + end + end--]] + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_MJ_QiZhiBa/gamerule") + return gamerulepanel +end + + +function M:GetGameSMSize() + return 467,500 +end + + +function M:GetGameName() + return "七支八" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/qizhiba/ExtendConfig.lua new file mode 100644 index 00000000..c863f1ff --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/ExtendConfig.lua @@ -0,0 +1,193 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import(".EXGameInfo") +local EXMainView = import(".EXMainView") +local EXGameController = import(".EXGameController") +local EXRoomConfig = import(".EXRoomConfig") +local EXPlayBackView =import(".EXPlayBackView") +local MJRoom = import(".main.MJRoom") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = "ExtendConfig" + self.extend_id = 22 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/majiang/qizhiba/ui/Info_MJ_QiZhiBa") + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage("extend/majiang/qizhiba/ui/Extend_MJ_QiZhiBa") + ResourcesManager.UnLoadGroup("TuiDaoHu_MJ") +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return MJRoom.new() +end + +function M:FillRoomConfig(room,_config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + + + local reload = s2croom["reload"] + local _tableInfo = s2croom["tableInfo"] + printlog("初始化房间数据====>>>") + pt(_tableInfo) + printlog(_tableInfo.laiziCard) + printlog(_tableInfo.laiziCard2) + printlog(_tableInfo.laiziCard3) + + room.laiziInfo={} + if _tableInfo.laiziCard2>0 then + table.insert(room.laiziInfo,_tableInfo.laiziCard) + table.insert(room.laiziInfo,_tableInfo.laiziCard2) + if _tableInfo.laiziCard3>0 then + local str=string.sub(_tableInfo.laiziCard3,2) + for i=1,4 do + table.insert(room.laiziInfo,tonumber(i..str)) + end + end + room.beforelaiziCardId=_tableInfo.laiziCard3 + else + room.laiziInfo=nil + end + --pt(room.laiziInfo) + local _config = _tableInfo["config"] + pt(_config) + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo["playerData"] + room.curren_round = _tableInfo["round"] + self:FillPlayerData(playerList) + + if (reload) then + local _reloadInfo = s2croom["reloadInfo"] + local _hand_card = _reloadInfo["hand_card"] + room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort2) + + local active_seat = _reloadInfo["active_seat"] + local bank_seat = _reloadInfo["banker_seat"] + local playing = _reloadInfo["playing"] + local _info_list = _reloadInfo["info_list"] + local last_outcard_seat = _reloadInfo["last_outcard_seat"] + room.left_count = _reloadInfo["left_card"] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo["curren_outcard_seat"] + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i=1,#_info_list do + local tem = _info_list[i] + local playerid = tem["playerid"] + local p = room:GetPlayerById(playerid) + local outcard_list = tem["outcard_list"] + p.outcard_list = outcard_list + p.total_score = tem["score"] + p.hand_left_count = tem["card_count"] + p.piao_niao = tem["piao_niao"] or 0 + local opcard = tem["opcard"] + for k=1,#opcard do + local op = opcard[k] + local fz = {} + fz.type = op["type"] + fz.card = op["card"] + fz.allCard=op["opcard"] + p.fz_list[#p.fz_list+1] = fz + end + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.left_count = _tableInfo["left_card"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + + local _info_list = _tableInfo["playerData"] + for i = 1,#_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + p.piao_niao = _jp["piao_niao"] + -- print(DataManager.SelfUser.account_id,pid) + -- if (278 == pid) then + -- room.self_player = p + -- p.self_user = DataManager.SelfUser + -- else + if p.seat == 1 then room.self_player = p end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.card_list = _hand_card + --room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort2) + p.total_score = _jp["score"] + p.hand_left_count = #_hand_card + if _jp.hp_info then + room.room_config.isNonnegative = 1 + p.cur_hp = _jp.hp_info.cur_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/GameEvent.lua b/lua_probject/extend_project/extend/majiang/qizhiba/GameEvent.lua new file mode 100644 index 00000000..9bede4e9 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/GameEvent.lua @@ -0,0 +1,36 @@ + +local TX_GameEvent = { + -- 发牌 + SendCards = "SendCards", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + EventNiao = "EventNiao", + + EvnetPiaoTip = "EvnetPiaoTip", + + EvnetPiao = "EvnetPiao", + + + --- + SendLaiZi="SendLaiZi", + + HuTipsAction="HuTipsAction", +} +return TX_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/MJPlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/majiang/qizhiba/MJPlayerSelfCardInfoView.lua new file mode 100644 index 00000000..d30ec3f8 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/MJPlayerSelfCardInfoView.lua @@ -0,0 +1,207 @@ +local MJPlayerSelfCardInfoView = import(".main.MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = import(".main.MJPlayerCardInfoView") +local CardCheck = import(".CardCheck") + +local M = {} +-- +function M.new(view,mainView) + setmetatable(MJPlayerSelfCardInfoView, {__index = MJPlayerCardInfoView}) + setmetatable(M, {__index = MJPlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:ShowHuTip(card_list,currentOnclickCard) + if currentOnclickCard then + if DataManager.CurrenRoom.self_player.CardTingList then + local tempV=DataManager.CurrenRoom.self_player.CardTingList[currentOnclickCard] + if tempV and #tempV>0 then + self._mainView._hu_tip:FillData(tempV) + else + self._mainView._hu_tip:HideHuTipsPanel() + end + end + + else + --[[if DataManager.CurrenRoom.self_player.allTingPaiList and #DataManager.CurrenRoom.self_player.allTingPaiList>0 then + self._mainView._hu_tip:FillData(DataManager.CurrenRoom.self_player.allTingPaiList) + end--]] + end + +end + +function M:UpdateHandCard(getcard, mp) + MJPlayerSelfCardInfoView.UpdateHandCard(self, getcard, mp) + local _carViewList = self._carViewList + + if DataManager.CurrenRoom.laiziInfo and #self._carViewList>0 then + for i=1,#self._carViewList do + local obj=self._carViewList[i] + if obj and obj.card then + if IsHasDictionary(obj.card_item,DataManager.CurrenRoom.laiziInfo) then + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=1 + end + + end + else + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=0 + end + end + end + + end + end + + + end + + + local card_list = DataManager.CurrenRoom.self_player.card_list + self:ShowHuTip(card_list) + if getcard then + self._out_card = true + if DataManager.CurrenRoom.self_player.tingPaiList and #DataManager.CurrenRoom.self_player.tingPaiList>0 then + for i = 1, #_carViewList do + local btn = _carViewList[i].card + local isTing,curIndex=CheckDictionaryFromContent(_carViewList[i].card_item,DataManager.CurrenRoom.self_player.tingPaiList) + if isTing then + --printlog("听牌提示===》》》",curIndex) + --pt(DataManager.CurrenRoom.self_player.tingPaiList[curIndex]) + local value=#DataManager.CurrenRoom.self_player.tingPaiList[curIndex].value + if tonumber(value)>1 then + btn:GetController("mark_ting").selectedIndex=2 + else + btn:GetController("mark_ting").selectedIndex=1 + end + + end + end + + end + + --DataManager.CurrenRoom.self_player.tingPaiList=nil + + else + for i = 1, #_carViewList do + local btn = _carViewList[i].card + if btn:GetController("mark_ting").selectedIndex ~= 0 then + btn:GetController("mark_ting").selectedIndex = 0 + end + end + self._out_card = false + end + +end + + + + +function M:__OnClickHandCard(context) + local button = context.sender + local _carViewList = self._carViewList + local refresh = true + local card_list = {} + for i=1,#_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + if btn ~= button and btn.selected == true then + if button.data.card_item == card then + refresh = false + else + self._mainView:markOutCards(false, card) + end + btn.selected = false + end + if not btn.selected then + table.insert(card_list, card) + end + end + + if self._out_card then + printlog("点击开始出牌===>>>") + self:ShowHuTip(card_list,button.data.card_item) + end + + -- 标记出牌 + if refresh then + if button.selected then + self._mainView:markOutCards(true, button.data.card_item) + else + self._mainView:markOutCards(false, button.data.card_item) + end + end + + local _room = DataManager.CurrenRoom + if not button.selected and _room.curren_outcard_seat == _room.self_player.seat then + local card = button.data + self._mainView:OutCard(card.card_item) + end +end + +function M:__OnDragStart(card) + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + list_remove(card_list, card) + self:ShowHuTip(card_list) +end + +function M:__OnDragEnd(context) + if self.outcard_button then + self.outcard_button:Dispose() + self.outcard_button = nil + end + local button = context.sender + + --button:RemoveFromParent() + local card = button.data + local _room = DataManager.CurrenRoom + + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + local isOut=IsHasDictionary(card.card_item,DataManager.CurrenRoom.laiziInfo) + if (button.y - card.old_postion.y < -50 and _room.curren_outcard_seat == _room.self_player.seat and isOut==false) then + self._mainView:OutCard(card.card_item) + button.touchable = false + self.outcard_button = button + else + self._area_handcard_list:AddChildAt(button, card.index) + button:TweenMove(card.old_postion, 0.2) + end +end + +function M:CheckPlayerOnlineState() + local room = DataManager.CurrenRoom + for i = 1, #room.player_list do + if room.player_list[i].line_state == 0 then + return false + end + end + return true +end +function M:Clear(bskip) + --self._ctr_state.selectedIndex = 0 + self._area_fz_list.x = self._src_fz_list.x + self._area_fz_list.y = self._src_fz_list.y + self._area_fz_list.width = self._src_fz_list.z + self._area_fz_list.height = self._src_fz_list.w + + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_outcard_list:RemoveChildren(0, -1, true) + if bskip == nil or bskip == false then + self._mask_liangpai:RemoveChildren(0, -1, true) + end + + for i=1,#self._carViewList do + self._carViewList[i].card:Dispose() + end + self._carViewList = {} + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/Protocol.lua b/lua_probject/extend_project/extend/majiang/qizhiba/Protocol.lua new file mode 100644 index 00000000..4c9b875b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/Protocol.lua @@ -0,0 +1,48 @@ +local Protocol = { + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌 + GAME_DIS_CARD = "611", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- 提示选择行为 + GAME_ACTION = "612", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 小结算 + GAME_EVT_RESULT1 = "817", + + -- 大结算 + GAME_EVT_RESULT2 = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + + -- 抓鸟事件 + GAME_EVT_NIAO = "821", + + -- 飘鸟提示 + GAME_EVT_PIAOTIP = "833", + + -- 飘鸟事件 + GAME_EVT_PIAO = "834", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/RecordEvent.lua b/lua_probject/extend_project/extend/majiang/qizhiba/RecordEvent.lua new file mode 100644 index 00000000..09748550 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/RecordEvent.lua @@ -0,0 +1,11 @@ +local Record_Event = { + Evt_GetCard = "GetCard", + Evt_OutCard = "OutCard", + Evt_Action = "Action", + Evt_Win = "Win", + Evt_Niao = "Niao", + Evt_Piao = "PiaoNiao", + Evt_Result = "Result", +} + +return Record_Event \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/main/FZData.lua b/lua_probject/extend_project/extend/majiang/qizhiba/main/FZData.lua new file mode 100644 index 00000000..451358bc --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/main/FZData.lua @@ -0,0 +1,70 @@ +--放子数据对象 +--author:-- + +--[[ +--数据字段参考 + +local FZData = { + -- 放子类型 + type = TX_FZType.Chi, + -- 吃的牌 + card = 0, + -- 激活牌 + active_card = 0, + -- + from_seat = 0, + +} + + +local FZTip = { + --提示ID + id = 0, + --权重 + weight = 0, + --类型 + type = 0, + --牌 + card = 0, + --手牌吃牌组 + op_card = nil +} + +]]-- + +FZType = +{ + Chi = 1, + Peng = 2, + Gang = 3, + Gang_An = 4, + Gang_Peng = 5, + HU = 6, +} + +local FZTipList = { + tip_map_id = nil, + tip_map_type = nil +} + +local M = FZTipList + +function M.new() + local self = {} + setmetatable(self,{__index = FZTipList}) + self.tip_map_id = {} + self.tip_map_type = {} + return self +end + +function M:AddTip(tip) + self.tip_map_id[tip.id] = tip + local tiplist = self.tip_map_type[tip.weight] + if not tiplist then + tiplist = {} + self.tip_map_type[tip.weight] = tiplist + end + tiplist[#tiplist+1] = tip +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/main/HuTipView.lua b/lua_probject/extend_project/extend/majiang/qizhiba/main/HuTipView.lua new file mode 100644 index 00000000..9549187f --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/main/HuTipView.lua @@ -0,0 +1,124 @@ +local HuTipView = { + _view_start_pos = nil, + _touch_start_pos = nil, +} + +local M = HuTipView + +function M.new(main_view) + local self = {} + self.class = "HuTipView" + setmetatable(self,{__index = HuTipView}) + self._main_view = main_view + self:init() + return self +end + +local function SetObjEnabled(obj, enabled) + obj.visible = enabled + obj.touchable = enabled +end + +function M:HideHuTipsPanel() + SetObjEnabled(self._view,false) +end + +function M:OnTouchBegin(context) + self._view_start_pos = Vector2(self._view.x, self._view.y) + self._touch_start_pos = self._main_view._view:GlobalToLocal(Vector2(context.inputEvent.x, context.inputEvent.y)) +end +function M:OnTouchMove(context) + local xy = self._main_view._view:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + local dist = Vector2(xy.x - self._touch_start_pos.x, xy.y - self._touch_start_pos.y) + local posx = self._view_start_pos.x + dist.x + local posy = self._view_start_pos.y + dist.y + local max_x = self._main_view._view.width - self._view.width + local max_y = self._main_view._view.height - self._view.height + self._view.x = posx < 0 and 0 or posx > max_x and max_x or posx + self._view.y = posy < 0 and 0 or posy > max_y and max_y or posy +end + +function M:init() + self._view = UIPackage.CreateObjectFromURL("ui://Main_PokeMaJiang/Hu_tip") + self._main_view._view:AddChild(self._view) + local width = self._view.width + local m_width = self._main_view._view.width + local m_height = self._main_view._view.height + -- 初始位置 + self._view.x = 0 + self._view.y =340 --0.675 * m_height + SetObjEnabled(self._view, false) + self._view.onTouchBegin:Add(handler(self, self.OnTouchBegin)) + self._view.onTouchMove:Add(handler(self, self.OnTouchMove)) +end + +-- function M:FillData(cards) +-- local lst_card = self._view:GetChild("lst_card") +-- lst_card:RemoveChildrenToPool() +-- local num = #cards +-- if num > 0 then +-- if num > 3 and num <= 28 then +-- self._view.width = 191 + ((num > 7 and 7 or num) - 3) * 38 +-- self._view.height = 69 + (math.ceil(num / 7) - 1) * 56 +-- else +-- self._view.width = 191 +-- self._view.height = 69 +-- end +-- for i = 1, num do +-- local item = lst_card:AddItemFromPool() +-- item:GetChild("icon").icon = "ui://Main_Majiang/202_" .. cards[i] +-- end +-- SetObjEnabled(self._view, true) +-- else +-- SetObjEnabled(self._view, false) +-- end +-- end + +function M:FillData(cards, posX) + -- local btn_showtip = self._main_view._view:GetChild("btn_showtip") + local lst_card = self._view:GetChild("lst_card") + lst_card:RemoveChildrenToPool() + local num = #cards + if num > 0 then + local o_width = 192 + local i_width = 93 + local column_gap = 43 + lst_card.columnGap = column_gap + if num > 1 then + self._view.width = o_width + (num - 1) * i_width + else + self._view.width = o_width + end + local count = 0 + for i = 1, num do + local item = lst_card:AddItemFromPool() + item:SetScale(0.6,0.6) + local card = cards[i] + item:GetChild("icon").icon = "ui://Main_PokeMaJiang/" .. self:GetPrefix() .. "201_" .. card + local left_num = self._main_view:CountCardLeftNum(card) + local tex_num = item:GetChild("tex_num") + tex_num.text = left_num .. "张" + tex_num.visible = true + count = count + left_num + end + self._view:GetChild("tex_num").text = count + if posX then + if posX + self._view.width > 1300 then + posX = 1300 - self._view.width + end + self._view.x = posX + SetObjEnabled(self._view, true) + else + -- self._view.x = self._main_view._view.width * 0.2 - self._view.width * 0.5 + SetObjEnabled(self._view, true) + end + else + SetObjEnabled(self._view, false) + end +end + +function M:GetPrefix() + return get_majiang_prefix(DataManager.CurrenRoom.game_id) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/main/MJChange3d.lua b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJChange3d.lua new file mode 100644 index 00000000..b4931986 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJChange3d.lua @@ -0,0 +1,100 @@ +local MJSettingViewNew = import '.MJSettingViewNew' +local TableBG = import '.MJTableBG' + +local MJChange3d = {} +local M = MJChange3d + + +function M.new(blur_view) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "MJChange3d" + + self._blur_view = blur_view + self.onChangeCard3d = event("onCallback",true) + + self:init("ui://Main_PokeMaJiang/change3d") + + return self +end + +local function GetNewerFlag(data, game_id) + local bRet = true + for i = 1, #data do + if data[i].game_id == game_id then + if data[i].bNewer ~= nil then + bRet = data[i].bNewer + end + break + end + end + return bRet +end + +local function SetNewer(data, game_id) + + local contain_key = false + for i = 1, #data do + if data[i].game_id == game_id then + contain_key = true + data[i].bNewer = false + end + end + + if not contain_key then + local _data = {} + _data.game_id = game_id + _data.bNewer = false + table.insert(data, _data) + end +end + +function M:IsNewer(game_id) + local bRet = true + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + local config_data = json.decode(json_data) + bRet = GetNewerFlag(config_data, game_id) + end + + return bRet +end + + +function M:SaveNewer(game_id) + local config_data + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + config_data = json.decode(json_data) + else + config_data = {} + end + SetNewer(config_data, game_id, bg_id) + Utils.SaveLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code, json.encode(config_data)) + +end + + +function M:init(url) + + BaseWindow.init(self,url) + + local view = self._view + + local btn_confirm = view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + + local n3d = view:GetController("3d").selectedIndex + if n3d == 1 then + if self.onChangeCard3d then + + MJSettingViewNew:Change3DMode() + self.onChangeCard3d(TableBG.GetBGConfig()[4].url) + end + end + + self:Destroy() + end) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/main/MJGameController.lua b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJGameController.lua new file mode 100644 index 00000000..9b90ddcc --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJGameController.lua @@ -0,0 +1,12 @@ + +local M = {} + +setmetatable(M,{__index = GameController}) + +function M:init(name) + GameController.init(self,name) +end + + + +return M diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/main/MJMainRightPanelView.lua b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJMainRightPanelView.lua new file mode 100644 index 00000000..85565b80 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJMainRightPanelView.lua @@ -0,0 +1,99 @@ +local PlayerDistanceView = import("Game.View.PlayerDistanceView") +local MainRightPanelView = require("Game.View.MainRightPanelView") +local MJMainRightPanelView = { + -- 查看记录 + onLogCallback = nil +} + +local M = MJMainRightPanelView + + +local function __init(self,mainView,view) + + local right_panel = view + + local btn_setting = right_panel:GetChild("btn_setting") + btn_setting.onClick:Set(function() + local _settingView = mainView:NewSettingView() + _settingView.stateIndex = (mainView._room.curren_round >= 1 and mainView._allow_dissmiss) and 2 or 1 + _settingView.cd_time = mainView.dismiss_room_cd_time + _settingView:Show() + + local room = DataManager.CurrenRoom + _settingView.onCallback:Add(function(context) + local _gamectr = ControllerManager.GetController(GameController) + if (room.CurnrenState == StateType.Ready) then + _gamectr:LevelRoom(function(response) + if (response.ReturnCode == 0) then + ViewManager.ChangeView(ViewManager.View_Lobby) + GameApplication.Instance:ShowTips("房间已解散!") + end + end) + else + + if mainView.dismiss_room_cd_time > 0 then + GameApplication.Instance:ShowTips("您还处于解散冷却时间当中,请稍后重试!") + else + _gamectr:AskDismissRoom() + end + end + end) + end) + + self._tex_data = right_panel:GetChild("tex_data") + self._tex_time = right_panel:GetChild("tex_time") + self._pb_batteryLevel = right_panel:GetChild("pb_batteryLevel") + self._xinhao = right_panel:GetController("xinhao") + self.ctr_xh = right_panel:GetChild("gcm_xinhao"):GetController("c1") + self.ctr_wifi = right_panel:GetChild("gcm_wifi"):GetController("c1") + self._tex_ping = right_panel:GetChild("gcm_xinhao"):GetChild("n7") + + self.ctr_log = right_panel:GetController("log") + local btn_log = right_panel:GetChild("btn_log") + btn_log.onClick:Set(function() + if self.onLogCallback then + self.onLogCallback() + end + end) + + self._total_time = 0 + self:__UpdateTime() +end + + +--- Create a new MainRightPanelView +function MJMainRightPanelView.new(mainView,view) + setmetatable(M, {__index = MainRightPanelView}) + local self = setmetatable({}, {__index = M}) + self.class = "MJMainRightPanelView" + __init(self,mainView,view) + return self +end + + + +function M:__UpdateTime() + self._tex_data.text = os.date("%Y-%m-%d") + self._tex_time.text = os.date("%H:%M") + if Application.platform == RuntimePlatform.IPhonePlayer or Application.platform == RuntimePlatform.Android then + self._pb_batteryLevel.value = GameApplication.Instance:GetBatteryLevel() + end + + local NetworkReachability = UnityEngine.NetworkReachability + local _client = ControllerManager.GameNetClinet + if not _client then return end + local ping = _client:getAveragePingTime() + if not ping then return end + ping = math.floor(ping / 2) + if ping > 300 then ping =300 end + if ping <= 100 then + self.ctr_xh.selectedIndex = 0 + elseif ping <= 300 then + self.ctr_xh.selectedIndex = 1 + else + self.ctr_xh.selectedIndex = 2 + end + self._tex_ping.text = ping .. "ms" +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/main/MJMainView.lua b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJMainView.lua new file mode 100644 index 00000000..8179223d --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJMainView.lua @@ -0,0 +1,449 @@ +local MJPlayerCardInfoView = import(".MJPlayerCardInfoView") +local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView") +local TableBG = require("Game.Data.TableBG") +local MJSettingView = import(".MJSettingViewNew") +local MJMainRightPanelView = import(".MJMainRightPanelView") + + local bg_config = { + {id = 1, url = "base/main_pokemajiang/bg/bg1", thumb = "ui://Main_PokeMaJiang/b01"}, + {id = 2, url = "base/main_pokemajiang/bg/bg2", thumb = "ui://Main_PokeMaJiang/b02"}, + {id = 3, url = "base/main_pokemajiang/bg/bg3", thumb = "ui://Main_PokeMaJiang/b03"} +} + +local M = {} + +setmetatable(M,{__index = MainView}) + +local default_bg = 1 +function M:InitView(url, use_custom_bg) + -- 加载牌型数据 + if not DataManager.CardTypeList then + local json_data = Utils.LoadLocalFile("CardTypeData") + if json_data then + DataManager.CardTypeList = json.decode(json_data) + else + DataManager.CardTypeList = {} + end + end + self._room.card_type = DataManager.CardTypeList[tostring(self._room.game_id)] or 0 + + UIPackage.AddPackage("base/main_pokemajiang/ui/Main_PokeMaJiang") + + MainView.InitView(self,url) + local _view = self._view + self._cursor = UIPackage.CreateObjectFromURL("ui://Main_PokeMaJiang/Ani_play_bj") + if not use_custom_bg then + TableBG.LoadTableBG(default_bg, self._room.game_id, self._root_view, bg_config) + end + + local _room = self._room + + local _cardbox = _view:GetChild("cardbox") + + self._ctr_cardbox = _cardbox:GetController("c1") + self._tex_leftTime = _cardbox:GetChild("tex_leftnum") + + + if self._room.card_type == 2 then + self:Change3d(true) + else + self:Change3d(false) + end + + local rightpanel = self._view:GetChild("com_roominfo") + if self._rightPanelView ~= nil then + self._rightPanelView:Destroy() + end + self._rightPanelView = MJMainRightPanelView.new(self, rightpanel) + + --local tempdsaf=self._view:GetChild("btn_back_jiesan") + --tempdsaf:GetChild("n3").displayObject.gameObject:SetActive(false) + + --print("2222222222222222222222") + --print(self._view:GetChild("btn_back_jiesan").displayObject.gameObject.name) + --self._view:GetChild("btn_back_jiesan").displayObject.gameObject:SetActive(false) + --local temp111=self._view:GetChild("btn_back_jiesan").displayObject.gameObject + --temp111:SetActive(false) + self._view:GetChild("btn_back_jiesan").onClick:Set(function () + if self.dismiss_room_cd_time > 0 then + ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!") + else + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:AskDismissRoom() + end + + end) + + + self._tex_LeftCard = _view:GetChild("remaining_card") + + self._player_card_info = {} + + local _player_card_info = self._player_card_info + for i = 1, _room.room_config.people_num do + local tem = _view:GetChild("player_card_info" .. i) + _player_card_info[i] = self:NewMJPlayerCardInfoView(tem,i) + end + + local list = _room.player_list + for i=1,#list do + local p = list[i] + local info = _player_card_info[self:GetPos(p.seat)] + info:SetPlayer(p) + info:FillData() + end + + local list = _room.player_list + local readyNum = 0 + for i=1,#list do + local p = list[i] + if p.ready then readyNum = readyNum + 1 end + end + + for i=1,#_room.player_list do + + local p = _room.player_list[i] + local zi,icon = self:GetPosString(p.seat) + if self._room.card_type == 2 then + _cardbox:GetChild("3d_direction"..self:GetIndex(self:GetPos(p.seat))).icon = "ui://MajiangCard3d/"..icon + end + + _cardbox:GetChild("direction"..self:GetIndex(self:GetPos(p.seat))).text = zi + end + + self._ctr_action = _view:GetController("action") + if _room.banker_seat == _room.self_player.seat and readyNum == _room.room_config.people_num then + --self._ctr_action.selectedIndex = 2 + elseif not _room.self_player.ready then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 0 + end +end + +function M:EventInit() + MainView.EventInit(self) +end + +function M:Change3d(flag) + + local _room = self._room + local _view = self._view + + local _cardbox = _view:GetChild("cardbox") + + for i=1,#_room.player_list do + + local p = _room.player_list[i] + local zi,icon = self:GetPosString(p.seat) + if self._room.card_type == 2 then + _cardbox:GetChild("3d_direction"..self:GetIndex(self:GetPos(p.seat))).icon = "ui://MajiangCard3d/"..icon + end + + _cardbox:GetChild("direction"..self:GetIndex(self:GetPos(p.seat))).text = zi + end + + -- 如果要切换3d牌桌的cardbox位置及上方文字(剩余牌,回合数)显示不错乱,需要做以下改动 + -- 取消文字组合的3d控制器的位置, 并设置对cardbox的关联,左左,顶顶 + if flag == true then + + if _view:GetController("3d") ~= nil then + _view:GetController("3d").selectedIndex = 1 + _cardbox.x = (_view.width - _cardbox.width) * 0.5 + end + + _cardbox:GetController("3d").selectedIndex = 1 + _cardbox.x = (_view.width - _cardbox.width) * 0.5 + else + if _view:GetController("3d") ~= nil then + _view:GetController("3d").selectedIndex = 0 + _cardbox.x = (_view.width - _cardbox.width) * 0.5 + end + + _cardbox:GetController("3d").selectedIndex = 0 + _cardbox.x = (_view.width - _cardbox.width) * 0.5 + end +end + +-- function M:NewSettingView() +-- local settingView = MJSettingView.new(self._root_view) +-- settingView:FillBgSection(function(url) +-- LoadGameBg(url, self._root_view) +-- end, self._room.game_id, default_bg) +-- settingView.onChangeCardCallback:Add(function() + +-- self:Change3d(DataManager.CurrenRoom.card_type == 2) +-- self:ReloadRoom() + +-- for i = 1, #self._room.player_list do +-- local p = self._room.player_list[i] +-- local card_info = self._player_card_info[self:GetPos(p.seat)] +-- card_info:ResetCardType() +-- end +-- end) + +-- settingView.onEXVoiceCallback:Add(function() + +-- end) +-- settingView.onEXChuPaiCallback:Add(function() + +-- end) +-- return settingView +-- end + +function M:NewSettingView() + local settingView = MJSettingView.new(self._root_view) + -- settingView._view:GetChild("btn_card_1").icon = pack_full_name .. "com_card_preview" + -- local gear = settingView._view:GetChild("panel_bg"):GetGear(0) + -- gear.pages = {"0", "1", "2"} + -- gear:Apply() + -- settingView.Change3d = function() end + + settingView:FillBgSection(function(url,index) + printlog("NewSettingView") + LoadGameBg(url, self._root_view) + end, self._room.game_id, 1, bg_config) + + settingView.onChangeCardCallback:Add(function() + self:RemoveCursor() + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:Clear(true) + card_info:ResetCardType() + end + self:Change3d(DataManager.CurrenRoom.card_type == 2) + self:ReloadRoom(true) + end) + return settingView +end + +function M:GetIndex(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + return index +end + +function M:GetPosString(seat) + + if DataManager.CurrenRoom.room_config.people_num == 4 then + if seat == 1 then + return "东","dir_1" + elseif seat == 2 then + return "南","dir_2" + elseif seat == 3 then + return "西","dir_3" + elseif seat == 4 then + return "北","dir_4" + end + elseif DataManager.CurrenRoom.room_config.people_num == 3 then + if seat == 1 then + return "东","dir_1" + elseif seat == 2 then + return "南","dir_2" + elseif seat == 3 then + return "西","dir_3" + end + elseif DataManager.CurrenRoom.room_config.people_num == 2 then + if seat == 1 then + return "东","dir_1" + elseif seat == 2 then + return "西","dir_3" + end + end +end + +function M:SetCardBoxPosition() + local _room = self._room + for i = 1, _room.room_config.people_num do + local tex = self._view:GetChild("cardbox"):GetChild("direction"..i) + local index = _room.self_player.seat + i - 1 + index = index > 4 and index - 4 or index + tex.text = self._gamectr:GetPosString(index) + end +end + +function M:markOutCards(showTip, data) + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + for j = 1, #p.outcard_list do + local card = p.outcard_list[j] + if card == data then + for k = 1, #p.outcard_list do + local obj = info:GetOutCardByIndex(k) + if obj.data == card then + obj:GetController("gray").selectedIndex = showTip and 1 or 0 + end + end + end + end + end +end + +function M:OnPlayerEnter(...) + MainView.OnPlayerEnter(self,...) + local arg = {...} + local p = arg[1] + local info = self._player_card_info[self:GetPos(p.seat)] + info:SetPlayer(p) + info:FillData() +end + +function M:OnPlayerReady( ... ) + local arg = {...} + local p = arg[1] + local _room = self._room + local _view = self._view + + local _player_info = self._player_info + if p.seat == _room.self_player.seat then + self._ctr_action.selectedIndex = 0 + if p.entrust and self._clearingView and self._clearingView.DestroyWithCallback then + self._clearingView:DestroyWithCallback() + end + end + local info = _player_info[self:GetPos(p.seat)] + info:Ready(true) + + local readyNum = self:GetReadyNum() + + + if readyNum == _room.room_config.people_num then + local _cardbox = _view:GetChild("cardbox") + for i=1,#_room.player_list do + + local p = _room.player_list[i] + local zi,icon = self:GetPosString(p.seat) + _cardbox:GetChild("3d_direction"..self:GetIndex(self:GetPos(p.seat))).icon = "ui://MajiangCard3d/"..icon + _cardbox:GetChild("direction"..self:GetIndex(self:GetPos(p.seat))).text = zi + end + end + + if _room.banker_seat == _room.self_player.seat and readyNum == _room.room_config.people_num then + if self._state.selectedIndex == 2 then + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:StartGame() + end + + --self._ctr_action.selectedIndex = 2 + elseif not _room.self_player.ready then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 0 + end +end + +function M:CountCardLeftNum(card) + local player_list = DataManager.CurrenRoom.player_list + local count = 4 + for i = 1, #player_list do + local p = player_list[i] + if p.card_list then + for j = 1, #p.card_list do + if p.card_list[j] == card then + count = count - 1 + end + end + end + for j = 1, #p.outcard_list do + if p.outcard_list[j] == card then + count = count - 1 + end + end + for j = 1, #p.fz_list do + local fz = p.fz_list[j] + if fz.type == FZType.Chi then + for k = 1, #fz.opcard do + if card == fz.opcard[k] then + count = count - 1 + break + end + end + else + local num = fz.type == FZType.Peng and 3 or 4 + if card == fz.card then + count = count - num + end + end + end + end + return count +end + +function M:OnPlayerLeave( ... ) + MainView.OnPlayerLeave(self, ...) + local _room = self._room + if _room.banker_seat == _room.self_player.seat then + self._ctr_action.selectedIndex = 0 + end +end + +function M:PlayerChangeLineState() + local isOutCard = true + local str = "玩家 " + for _ , player in ipairs(self._room.player_list) do + if player.line_state == 0 then + isOutCard = false + -- str = str .. self._gamectr:GetPosString(player.seat) .. "、" + end + end + -- if not isOutCard then + -- str = str.sub(str, 1, string.len(str) - string.len("、")) + -- str = str .. " 正在赶来,请稍等" + -- if self._room.curren_round > 0 then + -- self._waitingView = ModalWaitingView.new(self._view, str) + -- end + -- else + -- if self._waitingView then + -- self._waitingView:CloseWaitingView() + -- end + -- end + self._player_card_info[1]._area_handcard_list.touchable = isOutCard +end + +function M:NewMJPlayerCardInfoView(view,index) + if index == 1 then + return MJPlayerSelfCardInfoView.new(view,self) + end + return MJPlayerCardInfoView.new(view,self) +end + +function M:RemoveCursor() + if self._cursor.parent then + self._cursor.parent:GetController("color").selectedIndex = 0 + end + self._cursor:RemoveFromParent() +end + +function M:Destroy() + UIPackage.RemovePackage("base/main_pokemajiang/ui/Main_PokeMaJiang") + MainView.Destroy(self) + self._cursor:Dispose() +end + +local majiang_asset_path = "base/main_pokemajiang/sound/" +function M:PlayMJSound(path) + ViewUtil.PlaySound(self.asset_group, majiang_asset_path .. path) +end + +function M:PlayMJMusic(path) + ViewUtil.PlayMuisc(self.asset_group, majiang_asset_path .. path) +end + +function M:PlaySound(group,sex,path) + local sex_path = ViewUtil.Sex_Chat[sex] + local path1 = majiang_asset_path .. string.format("%s/%s.mp3",sex_path,path) + ViewUtil.PlaySound(group,path1) +end + +function M:GetPrefix() + return get_majiang_prefix(DataManager.CurrenRoom.game_id) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/main/MJPlayBackView.lua b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJPlayBackView.lua new file mode 100644 index 00000000..b50b7149 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJPlayBackView.lua @@ -0,0 +1,191 @@ +local MJPlayerCardInfoView = import(".MJPlayerCardInfoView") +local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView") +local TableBG = import('Game.Data.TableBG') + + --- +local M = {} + +setmetatable(M,{__index = PlayBackView}) + +local bg_config = { + {id = 1, url = "base/main_pokemajiang/bg/bg1", thumb = "ui://Main_PokeMaJiang/b01"} +} +function M:InitView(url) + UIPackage.AddPackage("base/main_pokemajiang/ui/Main_PokeMaJiang") + PlayBackView.InitView(self,url) + local _view = self._view + self._cursor = UIPackage.CreateObjectFromURL("ui://Main_PokeMaJiang/Ani_play_bj") + TableBG.LoadTableBG(1, nil, self._root_view,bg_config) + + UpdateBeat:Add(self.OnUpdate,self) +end + +function M:FillRoomData() + local _room = self._room + if self._player_card_info == nil or #self._player_card_info == 0 then + self._player_card_info = {} + local _player_card_info = self._player_card_info + for i = 1, _room.room_config.people_num do + local tem = self._view:GetChild("player_card_info" .. i) + _player_card_info[i] = self:NewMJPlayerCardInfoView(tem,i) + end + end + + + local list = _room.player_list + for i=1,#list do + local p = list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + info:SetPlayer(p) + info:FillData() + end + self:SetCardBoxPosition() + + local list = _room.player_list + for i=1,#list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + end +end + +function M:SetCardBoxPosition() + local _room = self._room + for i = 1, _room.room_config.people_num do + local tex = self._view:GetChild("cardbox"):GetChild("direction"..i) + local index = _room.self_player.seat + i - 1 + index = index > 4 and index - 4 or index + tex.text = self._gamectr:GetPosString(index) + end +end + +function M:NewMJPlayerCardInfoView(view,index) + return MJPlayerCardInfoView.new(view,self) +end + +function M:NextRecordPlay() + self:RemoveCursor() + local result = PlayBackView.NextRecordPlay(self) + if not result then return end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() +end + +function M:LastRecordPlay() + self:RemoveCursor() + local result = PlayBackView.LastRecordPlay(self) + if not result then return end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() +end + +function M:Play() + self:ChangeAlpha() + self:ChangePlayState(not self._play) + if not self._play then return end + if (self._currentStep == #self.cmdList and self._playFoward) or (self._currentStep == 0 and not self._playFoward) then + self._currentStep = 0 + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:ChangePlayState(state) + self._play = state + self:ChangeTextSpeed() + local btn_play = self._view:GetChild("panel_record"):GetChild("btn_play") + if self._play then + btn_play:GetController("state").selectedIndex = 1 + else + btn_play:GetController("state").selectedIndex = 0 + end +end + +function M:ChangeTextSpeed() + local str1 = self._play and self._speed or "" + self._view:GetChild("panel_record"):GetChild("tex_speed").text = str1 + local str2 = not self._play and (self._playFoward and "播放暂停" or "回退暂停") or self._playFoward and (self._speed == 1 and "播放" or "快进") or (self._speed == 1 and "回退" or "快退") + self._view:GetChild("panel_record"):GetChild("tex_2").text = str2 + local str3 = self._play and "倍速度" or "" + self._view:GetChild("panel_record"):GetChild("tex_1").text = str3 +end + +function M:CmdLeftArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if not self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = false + self:ChangeTextSpeed() + end +end + +function M:CmdRightArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:OnUpdate() + if self._play then + if (self._currentStep == #self.cmdList and self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil,"当前已是录像结尾了,再次点击播放按钮可重新播放") + return + elseif (self._currentStep == 0 and not self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil,"当前已是录像开头了,再次点击播放按钮可重新播放") + return + end + self._timer = self._timer + Time.deltaTime + if self._timer >= 1 / self._speed then + self._timer = 0 + local step = self._playFoward and 1 or -1 + self._currentStep = self._currentStep + step + self:ShowStep(self._currentStep) + end + end +end + +function M:RemoveCursor() + if self._cursor.parent then + self._cursor.parent:GetController("color").selectedIndex = 0 + end + self._cursor:RemoveFromParent() +end + +function M:GetPrefix() + return get_majiang_prefix(DataManager.CurrenRoom.game_id) +end + +function M:Destroy() + if self._cursor then self._cursor:Dispose() end + UpdateBeat:Remove(self.OnUpdate,self) + PlayBackView.Destroy(self) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/main/MJPlayer.lua b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJPlayer.lua new file mode 100644 index 00000000..3d81cfaf --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJPlayer.lua @@ -0,0 +1,40 @@ + + +local MJPlayer = { + -- 自动出牌 + auto_out_card = false, + -- 手牌列表 + hand_cards = nil, + card_list = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil +} + +local M = MJPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_cards = {} + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_cards = {} + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/main/MJPlayerCardInfoView.lua b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJPlayerCardInfoView.lua new file mode 100644 index 00000000..26023ecf --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJPlayerCardInfoView.lua @@ -0,0 +1,617 @@ +AreaOderType = { + left_right = 'left_right', + right_left = 'right_left', + up_down = 'up_down', + down_up = 'down_up' +} + +local PlayerCardInfoView = { + _view = nil, + _mainView = nil, + _mask_liangpai = nil, + _mask_data = nil, + _area_handcard_list = nil, + _src_fz_list = nil, + _current_card_type = -1 +} + +local M = PlayerCardInfoView + +--- Create a new PlayerCardInfoView +function M.new(view, mainView) + local self = {} + setmetatable(self, {__index = M}) + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:init() + local view = self._view + local _area_mask = view:GetChild('area_mask') + local mask = _area_mask.text + + self._mask_data = json.decode(mask) + self._area_handcard_list = view:GetChild('area_handcard_list') + self._area_fz_list = view:GetChild('area_fz_list') + self._area_outcard_list = view:GetChild('area_outcard_list') + self._src_fz_list = + Vector4(self._area_fz_list.x, self._area_fz_list.y, self._area_fz_list.width, self._area_fz_list.height) + local c3d = self._view:GetController('3d') + if c3d ~= nil then + c3d.selectedIndex = 1 + end + self._src_fz_list_3d = + Vector4(self._area_fz_list.x, self._area_fz_list.y, self._area_fz_list.width, self._area_fz_list.height) + local c3d = self._view:GetController('3d') + if c3d ~= nil then + c3d.selectedIndex = 0 + end + + self._mask_liangpai = view:GetChild('mask_liangpai') +end + +function M:SetPlayer(p) + self._player = p +end + +function M:FillData(begin) + if (begin) then + for i = 1, #self._player.fz_list do + self:UpdateFzList(self._player.fz_list[i], -1) + end + self:UpdateOutCardList() + else + self._current_card_type = DataManager.CurrenRoom.card_type + + if self._current_card_type == 2 then + local c3d = self._view:GetController('3d') + if c3d ~= nil then + c3d.selectedIndex = 1 + end + else + local c3d = self._view:GetController('3d') + if c3d ~= nil then + c3d.selectedIndex = 0 + end + end + end +end + +function M:Clear() + --self._ctr_state.selectedIndex = 0 + self._area_fz_list.x = self._src_fz_list.x + self._area_fz_list.y = self._src_fz_list.y + self._area_fz_list.width = self._src_fz_list.z + self._area_fz_list.height = self._src_fz_list.w + + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_outcard_list:RemoveChildren(0, -1, true) + self._mask_liangpai:RemoveChildren(0, -1, true) +end + +-- 获取麻将资源前缀 +function M:GetPrefix() + -- local card_type = DataManager.CurrenRoom.card_type + -- local prefix = card_type == 1 and "a" or "" + -- return prefix + return get_majiang_prefix(DataManager.CurrenRoom.game_id) +end + +function M:fillCard(obj, pos_str, card, use3d) + --printlog("=============",card) + if self._current_card_type == 2 and (use3d == nil or use3d == true) then + obj.icon = 'ui://MajiangCard3d/' .. 'b' .. pos_str .. card + else + obj.icon = 'ui://Main_PokeMaJiang/' .. self:GetPrefix() .. pos_str .. card + end + --printlog(obj.icon) +end + +function M:getBackCard(card) + return 'ui://Main_PokeMaJiang/' .. card +end + +function M:GetCard(btn) + local pic_name = split(btn.icon, '/')[4] + local lst = string.split(pic_name, '_') + return tonumber(lst[2] or 0) +end + +function M:UpdateHandCard(getcard, mp) + getcard = getcard or false + mp = mp or false + local handcard_list = self._mask_data['handcard_list'] + local oder = handcard_list['oder'] + local _player = self._player + -- print(vardump(self._player)) + + self._area_handcard_list:RemoveChildren(0, -1, true) + -- print(vardump(_player.card_list)) + if (not mp) then + local comp_back = handcard_list['comp_back'] + if self._current_card_type == 2 then + comp_back = comp_back .. '_3d' + end + + for i = 0, _player.hand_left_count - 1 do + local obj = UIPackage.CreateObjectFromURL(self:getBackCard(comp_back)) + local _room = DataManager.CurrenRoom + local people_num = _room.room_config.people_num + local pos = ViewUtil.GetPos(_room.self_player.seat, _player.seat, people_num) + local gap = (pos == 3 and people_num == 4 or pos == 2 and people_num == 2) and 15 or 45 + local offset = getcard and (i == _player.hand_left_count - 1 and gap or 0) + -- local offset = getcard and (i == _player.hand_left_count - 1 and 15 or 0) + ViewUtil.CardPos(obj, self._area_handcard_list, oder, i, offset) + + --改变左右两边的手牌的x值 + if self._current_card_type == 2 and (oder == AreaOderType.down_up or oder == AreaOderType.up_down) then + obj.x = i * -7.0 + end + + if (oder == AreaOderType.down_up) then + self._area_handcard_list:AddChildAt(obj, 0) + else + self._area_handcard_list:AddChild(obj) + end + end + else + local outcard_list = self._mask_data['outcard_list'] + local comp = handcard_list['comp'] + local card = outcard_list['card'] + --print("comp"..comp) + -- print(vardump(_player.card_list)) + + if self._current_card_type == 2 then + comp = comp .. '_3d' + end + + for i = 0, #_player.card_list - 1 do + local obj = UIPackage.CreateObject('Main_PokeMaJiang', comp) + + self:fillCard(obj, card, _player.card_list[i + 1]) + -- obj.icon = UIPackage.GetItemURL("Main_Majiang", card .. _player.card_list[i+1]) + local offset = getcard and (i == _player.hand_left_count - 1 and 15 or 0) + ViewUtil.CardPos(obj, self._area_handcard_list, oder, i, offset) + + --改变左右两边的手牌的x值 + if self._current_card_type == 2 and (oder == AreaOderType.down_up or oder == AreaOderType.up_down) then + obj.x = i * -7 + end + + if (oder == AreaOderType.down_up) then + self._area_handcard_list:AddChildAt(obj, 0) + else + self._area_handcard_list:AddChild(obj) + end + end + end +end + +-- 获取麻将图片资源位置,可以在扩展中复写 +function M:GetCardPicPack() + -- if DataManager.CurrenRoom.card_type == 2 then + -- return "MajiangCard3d" + -- else + return 'Main_PokeMaJiang' + -- end +end + +function M:adjust3dOutPut(obj, area, oder, num, index) + if index >= num then + local row = 1 + math.floor(((index - num) / (num + 2))) + local col = ((index - num) % (num + 2)) + + if oder == AreaOderType.left_right then + obj.x = obj.x + math.floor((area.width - obj.width * (num + 2)) / 2) + elseif oder == AreaOderType.right_left then + obj.x = obj.x - math.floor((area.width - obj.width * (num + 2)) / 2) + elseif oder == AreaOderType.up_down then + obj.y = obj.y + math.floor((area.height - obj.height * (num + 2)) / 2) + obj.x = obj.x - col * 7 + 7 * (row + 1) + elseif oder == AreaOderType.down_up then + obj.y = obj.y - math.floor((area.height - obj.height * (num + 2)) / 2) + obj.x = obj.x - col * 7 - 7 * (row - 1) + end + else + if oder == AreaOderType.left_right then + obj.x = obj.x + math.floor((area.width - obj.width * num) / 2) + elseif oder == AreaOderType.right_left then + obj.x = obj.x - math.floor((area.width - obj.width * num) / 2) + elseif oder == AreaOderType.up_down then + obj.y = obj.y + math.floor((area.height - obj.height * num) / 2) + obj.x = obj.x - index * 7 + elseif oder == AreaOderType.down_up then + obj.y = obj.y - math.floor((area.height - obj.height * num) / 2) + obj.x = obj.x - index * 7 + end + end +end + +function M:UpdateOutCardList(outcard, card_item, cursor) + outcard = outcard or nil + card_item = card_item or 0 + cursor = cursor or nil + + local outlist = self._player.outcard_list + if (outcard) then + outcard:SetPivot(0.5, 0.5, true) + outcard.touchable = false + -- outcard.icon = "ui://Main_Majiang/" .. self:GetPrefix() .. "202_" .. card_item + outcard.icon = string.format('ui://%s/%s202_%s', self:GetCardPicPack(), self:GetPrefix(), card_item) + self._mask_liangpai:AddChild(outcard) + end + + local outcard_list = self._mask_data['outcard_list'] + local oder = outcard_list['oder'] + local comp = outcard_list['comp'] + local card = outcard_list['card'] + local multi_oder = outcard_list['multi_oder'] + local num = outcard_list['num'] + local multi_draw_oder = 0 + local sortStart = 0 + local sortType = 0 + local sortStep = 0 + if (outcard_list['multi_draw_oder']) then + multi_draw_oder = outcard_list['multi_draw_oder'] + end + + if self._current_card_type == 2 then + comp = comp .. '_3d' + num = outcard_list['num3d'] + multi_oder = outcard_list['multi_oder3d'] + sortType = outcard_list['sorting_order3d'] + card = outcard_list['card3d'] + if sortType == 1 then + sortStart = 1 + sortStep = 1 + elseif sortType == -1 then + sortStart = #outlist + sortStep = -1 + end + else + sortType = outcard_list['sorting_order3d'] + if sortType == 1 then + sortStart = 1 + sortStep = 1 + elseif sortType == -1 then + sortStart = #outlist + sortStep = -1 + end + end + + local obj = nil + self._area_outcard_list:RemoveChildren(0, -1, true) + for i = 0, #outlist - 1 do + obj = UIPackage.CreateObjectFromURL('ui://Main_PokeMaJiang/' .. comp) + local row = math.floor(i / num) + local col = math.floor(i % num) + + if self._current_card_type == 2 then + if i >= num then + row = 1 + math.floor(((i - num) / (num + 2))) + col = ((i - num) % (num + 2)) + end + end + + ViewUtil.CardPos(obj, self._area_outcard_list, oder, col,0,true) + ViewUtil.CardPos(obj, self._area_outcard_list, multi_oder, row,0,true) + + if self._current_card_type == 2 then + self:adjust3dOutPut(obj, self._area_outcard_list, oder, num, i) + end + --printlog(cursor) + --printlog("设置出牌======>>>") + --printlog(obj) + --printlog(card) + --printlog(outlist[i + 1]) + + self:fillCard(obj, card, outlist[i + 1]) + -- 添加角标 + self:AddFlag(i + 1, outlist[i], obj) + -- obj.icon = "ui://Main_Majiang/"..card .. outlist[i+1] + sortStart = sortStart + sortStep + obj.sortingOrder = sortStart + obj.data = outlist[i + 1] + + if (oder == AreaOderType.down_up or (multi_draw_oder == 1)) then + self._area_outcard_list:AddChildAt(obj, 0) + else + self._area_outcard_list:AddChild(obj) + end + end + if (obj and cursor) then + cursor.xy = Vector2(obj.width / 2, obj.height / 2) + obj:AddChild(cursor) + obj:GetController('color').selectedIndex = 1 + end +end + +-- 设置添加角标的方法 +function M:SetAddFlag(cb) + self.__addFlag = cb +end + +-- 给麻将牌添加flag +function M:AddFlag(index, card, btn) + if not self.__addFlag then + return + end + local str_flag = self.__addFlag(index, card, btn) + btn:GetController('hun').selectedIndex = str_flag == '' and 0 or 1 + btn:GetChild('flag').icon = str_flag +end + +local function getPos(my_seat, other_seat, total) + local pos = 0 + pos = other_seat - my_seat + 1 + if pos <= 0 then + pos = pos + total + end + if total ~= 4 and pos == total then + pos = total + 1 + end + return pos +end + +function M:UpdateFzList(fz, index, show_card) + printlog("UpdateFzList=====》》》") + printlog("index===",index) + printlog("show_card===",show_card) + local gn = 3 + if fz.type == FZType.Gang or fz.type == FZType.Gang_An or fz.type == FZType.Gang_Peng then + gn = 4 + end + + local fz_list = self._mask_data['fz_list'] + local oder = fz_list['oder'] + local comp = fz_list['comp'] .. gn + local card = fz_list['card'] + local card3d = '' + local adjust3d = 0 + if self._current_card_type == 2 then + comp = comp .. '_3d' + oder = fz_list['oder3d'] + adjust3d = fz_list['adjust3d'] + card = fz_list['card3d'] + card3d = 'b' + end + + local obj = UIPackage.CreateObjectFromURL('ui://Main_PokeMaJiang/' .. comp) + + local _area_fz_list = self._area_fz_list + local _area_outcard_list = self._area_outcard_list + + if (index == -1) then + local num = _area_fz_list.numChildren + + if (oder == AreaOderType.down_up or oder == AreaOderType.up_down) then + _area_fz_list.height = _area_fz_list.height + obj.height + if (oder == AreaOderType.down_up) then + local tem1 = obj.height + for i = 1, num do + local tem = _area_fz_list:GetChildAt(num - i) + tem.y = tem.y + tem1 + end + _area_fz_list.y = _area_fz_list.y - obj.height + else + ViewUtil.CardPos(obj, _area_outcard_list, oder, num) + end + elseif (oder == AreaOderType.left_right or oder == AreaOderType.right_left) then + _area_fz_list.width = _area_fz_list.width + obj.width + if (oder == AreaOderType.right_left) then + local tem1 = obj.width + for i = 1, num do + local tem = _area_fz_list:GetChildAt(num - i) + tem.x = tem.x + tem1 + end + _area_fz_list.x = _area_fz_list.x - obj.width + else + ViewUtil.CardPos(obj, _area_outcard_list, oder, num) + end + end + _area_fz_list:AddChild(obj) + + if self._current_card_type == 2 and (oder == AreaOderType.down_up or oder == AreaOderType.up_down) then + num = _area_fz_list.numChildren + for i = 1, num do + local tem = _area_fz_list:GetChildAt(i - 1) + tem.x = adjust3d * (i - 1) + end + end + else + local obj1 = _area_fz_list:RemoveChildAt(index) + obj1:Dispose() + obj.xy = obj1.xy + _area_fz_list:AddChildAt(obj, index) + end + + -- 显示fz的牌 + local obj_show + if show_card then + obj_show = UIPackage.CreateObjectFromURL('ui://Main_PokeMaJiang/Fz_0_' .. gn) + end + + for i = 1, gn do + local _oc = obj:GetChild('card_' .. i) + local _oc2 = nil + + if show_card then + _oc2 = obj_show:GetChild('card_' .. i) + end + + --if (fz.type == FZType.Gang_An and i == gn) then + -- if self._current_card_type == 2 then + -- _oc.icon = UIPackage.GetItemURL('MajiangCard3d', card3d .. card .. '00') + -- else + -- _oc.icon = UIPackage.GetItemURL(self:GetCardPicPack(), card3d .. card .. '00') + -- end + + -- if show_card then + -- _oc2.icon = UIPackage.GetItemURL('Main_PokeMaJiang', '202_00') + -- end + -- else + if (fz.type == FZType.Chi) then + local index = i + if oder == AreaOderType.right_left or oder == AreaOderType.down_up then + index = gn - i + 1 + end + + self:fillCard(_oc, card, fz.allCard[index]) + + if show_card then + self:fillCard(_oc2, '201_', fz.allCard[index], false) + end + else + self:fillCard(_oc, card, fz.allCard[i]) + + if show_card then + self:fillCard(_oc2, '201_', fz.card, false) + end + end + -- end + end + + obj.touchable = false + + if show_card then + obj_show.touchable = false + obj_show:SetPivot(0.5, 0.5, true) + obj_show:SetScale(0.8, 0.8) + self._mask_liangpai:AddChildAt(obj_show, 0) + coroutine.start( + function() + coroutine.wait(2) + obj_show:Dispose() + end + ) + end + + -- -- 标记碰牌对象 + -- local num = self._area_fz_list.numChildren + -- if num == 0 then return end + -- if index == -1 then + -- -- local obj = self._area_fz_list:GetChildAt(num - 1) + -- local pic_arrow = UIPackage.CreateObjectFromURL("ui://Main_Majiang/com_arrow") + -- obj:AddChild(pic_arrow) + -- pic_arrow:Center() + -- local my_seat = self._player.seat + -- if fz.from_seat ~= my_seat then + -- pic_arrow:GetController("show").selectedIndex = 1 + -- pic_arrow:GetController("pos").selectedIndex = getPos(DataManager.CurrenRoom.self_player.seat, fz.from_seat, #DataManager.CurrenRoom.player_list) + -- pic_arrow:SetPivot(0.5, 0.5) + -- if DataManager.CurrenRoom.self_player.seat ~= self._player.seat then + -- pic_arrow.scaleX = 0.5 + -- pic_arrow.scaleY = 0.5 + -- end + -- end + -- end +end + +function M:GetOutCardByIndex(index) + local outcard_list = self._mask_data['outcard_list'] + local oder = outcard_list['oder'] + local multi_draw_oder = 0 + if (outcard_list['multi_draw_oder']) then + multi_draw_oder = outcard_list['multi_draw_oder'] + end + + if (oder == AreaOderType.down_up or (multi_draw_oder == 1)) then + return self._area_outcard_list:GetChildAt(self._area_outcard_list.numChildren - index) + else + return self._area_outcard_list:GetChildAt(index - 1) + end +end + +function M:ResetFzList() + for i = 1, #self._player.fz_list do + local fz = self._player.fz_list[i] + -- if fz.type ~= FZType.Gang_Peng then + self:UpdateFzList(fz, -1) + -- else + -- self:UpdateFzList(fz, i) + -- end + end +end + +local function replace_card(obj, prefix) + local url = obj.icon + if url then + local len = string.len(url) + local pos = string.len('ui://Main_PokeMaJiang/') + 1 + local head_char = string.sub(url, pos, pos) + local card = string.sub(url, pos, len) + if head_char >= 'a' then + card = string.sub(card, 2, len) + end + obj.icon = 'ui://Main_PokeMaJiang/' .. prefix .. card + end +end + +function M:ResetCardType() + local old_card_type = self._current_card_type + self._current_card_type = DataManager.CurrenRoom.card_type + + --设置3d标志 + if self._current_card_type == 2 then + local c3d = self._view:GetController('3d') + if c3d ~= nil then + c3d.selectedIndex = 1 + + self._area_fz_list.x = self._src_fz_list_3d.x + self._area_fz_list.y = self._src_fz_list_3d.y + self._area_fz_list.width = self._src_fz_list_3d.z + self._area_fz_list.height = self._src_fz_list_3d.w + end + else + local c3d = self._view:GetController('3d') + if c3d ~= nil then + c3d.selectedIndex = 0 + self._area_fz_list.x = self._src_fz_list.x + self._area_fz_list.y = self._src_fz_list.y + self._area_fz_list.width = self._src_fz_list.z + self._area_fz_list.height = self._src_fz_list.w + end + end + + local change2d = false + if old_card_type == 2 and self._current_card_type ~= 2 then + change2d = true + end + + local change3d = false + if old_card_type ~= 2 and self._current_card_type == 2 then + change3d = true + end + + if change2d == false and change3d == false and self._current_card_type ~= 2 then + local prefix = self:GetPrefix() + + --更新已出牌 + for i = 1, self._area_outcard_list.numChildren do + local obj = self._area_outcard_list:GetChildAt(i - 1) + replace_card(obj, prefix) + end + + --更新手牌 + for i = 1, self._area_handcard_list.numChildren do + local obj = self._area_handcard_list:GetChildAt(i - 1) + replace_card(obj, prefix) + end + + --更新放子牌 + for i = 1, self._area_fz_list.numChildren do + local com = self._area_fz_list:GetChildAt(i - 1) + for j = 1, 4 do + local obj = com:GetChild('card_' .. j) + if obj then + replace_card(obj, prefix) + end + end + end + end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/main/MJPlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJPlayerSelfCardInfoView.lua new file mode 100644 index 00000000..e09922b5 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJPlayerSelfCardInfoView.lua @@ -0,0 +1,196 @@ +local MJPlayerCardInfoView = import(".MJPlayerCardInfoView") + +local CardView = { + card = nil, + -- 牌序号 + card_item =0, + -- 索引 + index = 0, + -- 原始位置 + old_postion = Vector2.zero +} + +local function NewCardView(card,cardItem) + local self = {} + setmetatable(self,{__index = CardView}) + self.card = card + self.card_item = cardItem + return self +end + +local PlayerSelfView = { + _dragCom=nil, + _carViewList = {} +} + +local M = PlayerSelfView + +function PlayerSelfView.new(view,mainView) + setmetatable(M,{__index = MJPlayerCardInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:init() + MJPlayerCardInfoView.init(self) +end + +function M:setHandCardPos(btn_card, i, getcard) + btn_card.x = i * btn_card.width * 1.05 + (getcard and 80 or 0) +end + +function M:UpdateHandCard(getcard,mp) + if self.outcard_button then + self.outcard_button:Dispose() + self.outcard_button = nil + end + getcard = getcard or false + mp = mp or false + local pv = self + local _carViewList = self._carViewList + + local _lit = pv._area_handcard_list + for i=1,#_carViewList do + _carViewList[i].card:Dispose() + end + _carViewList = {} + local _dragCom = self._dragCom + if (_dragCom == nil) then + _dragCom = UIPackage.CreateObject("Common","UIPanel") + _dragCom.size = Vector2(1,1) + pv._view:AddChild(_dragCom) + end + _dragCom.xy = pv._area_handcard_list.xy + self._dragCom = _dragCom + self._carViewList = _carViewList + + local b3d = "" + if self._current_card_type == 2 then + b3d = "_3d" + end + + local cards = DataManager.CurrenRoom.self_player.card_list + if (not mp) then + for i=0,(#cards)-1 do + local tem_card = cards[i+1] + + + local btn_card = UIPackage.CreateObject(self:GetCardObjPack(), "Btn_Card"..b3d) + btn_card:SetScale(0.9,0.9)--(1.05,1.05) + -- btn_card.icon = UIPackage.GetItemURL("Main_Majiang", "201_" .. tem_card) + self:fillCard(btn_card,"201_",tem_card) + self:setHandCardPos(btn_card, i, i == #cards - 1 and getcard) + local c_v = NewCardView(btn_card, tem_card) + c_v.index = i + c_v.old_postion = btn_card.xy + _carViewList[#_carViewList+1] = c_v + + _lit:AddChild(btn_card) + + if (not self._player.auto_out_card) then + btn_card.data = c_v + -- btn_card.draggable = true; + -- btn_card.onDragStart:Set(function(evt) + -- local _agent = evt.sender + -- _agent:RemoveFromParent() + -- _dragCom:AddChild(_agent) + -- if self.__OnDragStart then + -- self:__OnDragStart(evt) + -- end + -- _agent.onDragEnd:Set(self.__OnDragEnd,self) + -- end) + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + btn_card.onClick:Set(self.__OnClickHandCard,self) + else + btn_card:GetChild("icon").color = Color(0.5,0.5,0.5) + btn_card.touchable = false + end + end + else + for i=0,(#cards)-1 do + + local mp_card = UIPackage.CreateObject("Main_PokeMaJiang", "Mp_self_card"..b3d) + -- mp_card.icon = UIPackage.GetItemURL("Main_Majiang", "202_" .. cards[i+1]) + self:fillCard(mp_card,"201_",cards[i+1]) + mp_card:SetScale(0.9,0.9)--(1.05,1.05) + -- mp_card.x = i * mp_card.width + (i == #cards - 1 and getcard and 20 or 0) + self:setHandCardPos(mp_card, i, i == #cards - 1 and getcard) + _lit:AddChild(mp_card) + end + end +end + +function M:onTouchBegin(context) + local button = context.sender + local card = button.data + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + card.touch_pos = xy - button.xy + if self.__OnDragStart then + self:__OnDragStart(card.card_item) + end +end + +function M:onTouchMove(context) + local button = context.sender + local card = button.data + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + button.xy = xy - card.touch_pos +end + +function M:__OnDragEnd(context) + if self.outcard_button then + self.outcard_button:Dispose() + self.outcard_button = nil + end + local button = context.sender + -- button.onDragEnd:Set(nil) + --button:RemoveFromParent() + local card = button.data + local _room = DataManager.CurrenRoom + if not _room or _room:GetReloadStatus() then return end + + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + if (button.y < -150 and _room.curren_outcard_seat == _room.self_player.seat) then + self._mainView:OutCard(card.card_item) + button.touchable = false + self.outcard_button = buttond + else + self._area_handcard_list:AddChildAt(button, card.index) + button:TweenMove(card.old_postion, 0.2) + end +end + +function M:__OnClickHandCard(context) + local button = context.sender + local _carViewList = self._carViewList + for i=1,#_carViewList do + if (_carViewList[i].card ~= button) then + _carViewList[i].card.selected = false + end + end + local _room = DataManager.CurrenRoom + if (Utils.IsDoubleClick(context) and _room.curren_outcard_seat == _room.self_player.seat) then + local card = button.data + self._mainView:OutCard(card.card_item) + end +end + +-- 获取手牌资源位置,可以在扩展中复写 +function M:GetCardObjPack() + return "Main_PokeMaJiang" +end + +function M:Clear() + MJPlayerCardInfoView.Clear(self) + for i=1,#self._carViewList do + self._carViewList[i].card:Dispose() + end + self._carViewList = {} +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/main/MJRoom.lua b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJRoom.lua new file mode 100644 index 00000000..97f5c3e0 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJRoom.lua @@ -0,0 +1,30 @@ +local MJPlayer = import(".MJPlayer") + +local MJRoom = { + -- 记录此游戏使用的牌型 + card_type = 0, + + curren_outcard_seat = -1, + left_count = 0, + last_outcard_seat = 0 +} + +local M = MJRoom + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Room}) + local self = setmetatable({}, {__index = M}) + self.left_count = 0 + self.last_outcard_seat = 0 + self:init() + return self +end + + + +function M:NewPlayer() + return MJPlayer.new() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/main/MJSettingView.lua b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJSettingView.lua new file mode 100644 index 00000000..252348db --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJSettingView.lua @@ -0,0 +1,76 @@ +local SettingView = require("Game.View.SettingView") +local TableBG = import(".MJTableBG") + +local M = {} + +function M.new(blur_view) + setmetatable(M, {__index = SettingView}) + local self = setmetatable({}, {__index = M}) + self.class = "MJSettingView" + self._blur_view = blur_view + self.onCallback = event("onCallback",true) + self.onChangeCardCallback = event("onCallback",true) + self._btn_dismiss_room_enable = true + self._close_destroy = true + self:init("ui://Main_PokeMaJiang/SettingWindow1") + return self +end + +function M:init(url) + SettingView.init(self,url) + local ctr_card = self._view:GetController("card") + ctr_card.onChanged:Set(function () + if self.onChangeCardCallback then + DataManager.CurrenRoom.card_type = ctr_card.selectedIndex + self.onChangeCardCallback() + + local cardtype = ctr_card.selectedIndex + local list_cardtype = DataManager.CardTypeList + if DataManager.CurrenRoom then + local game_id = tostring(DataManager.CurrenRoom.game_id) + if not list_cardtype[game_id] or list_cardtype[game_id] ~= cardtype then + list_cardtype[game_id] = cardtype + Utils.SaveLocalFile("CardTypeData",json.encode(list_cardtype)) + end + end + end + end) +end + +--赋值bg_config +function M:GetBGConfig() + return TableBG.GetBGConfig() +end +--获得背景方法 +function M:GetBgByGameId(game_id) + return TableBG.GetTableBG(game_id) +end + +function M:Show() + self:UpdateIndex() + SettingView.Show(self) +end + +function M:Close() +-- local cardtype = self._view:GetController("card").selectedIndex +-- local list_cardtype = DataManager.CardTypeList +-- if DataManager.CurrenRoom then +-- local game_id = tostring(DataManager.CurrenRoom.game_id) +-- if not list_cardtype[game_id] or list_cardtype[game_id] ~= cardtype then +-- list_cardtype[game_id] = cardtype +-- Utils.SaveLocalFile("CardTypeData",json.encode(list_cardtype)) +-- end +-- end + BaseWindow.Close(self) +end + +function M:Destroy(remove_map) + BaseWindow.Destroy(self,remove_map) +end + +function M:UpdateIndex() + local room = DataManager.CurrenRoom + local ctr_card = self._view:GetController("card") + ctr_card.selectedIndex = room.card_type +end +return M diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/main/MJSettingViewNew.lua b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJSettingViewNew.lua new file mode 100644 index 00000000..a0ac3c66 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJSettingViewNew.lua @@ -0,0 +1,189 @@ +local SettingView = require("Game.View.SettingView") +local TableBG = require("Game.Data.TableBG") +local MJSettingViewNew = { + -- 修改牌 + onUpdataCardCallback = nil +} +local M = MJSettingViewNew + +-- show_dialect是否显示'切换方言'选项 +function MJSettingViewNew.new(blur_view, show_dialect) + setmetatable(SettingView, {__index = BaseWindow}) + setmetatable(M, {__index = SettingView}) + local self = setmetatable({}, {__index = M}) + self.class = "MJSettingViewNew" + self._currenIndex = 0 + self._blur_view = blur_view + self.onCallback = event("onCallback", true) + self.onChangeCardCallback = event("onCallback",true) + self.onChangeLanguageCallback = event("onCallback", true) + self.stateIndex = 0 + self.cd_time = 0 + self._btn_dismiss_room_enable = true + self._full = true + self._anim_pop = 2 + self._close_zone = true + self._show_dialect = show_dialect + self:init("ui://Main_PokeMaJiang/SettingWindow2") + + return self +end +function M:init(url) + + SettingView.init(self, url) + + self._view:GetChild("btn_close22").onClick:Set(function( ... ) + local bg_id = self._view:GetController("bg").selectedIndex + 1 + if self._bg ~= bg_id then + self._bg = bg_id + TableBG.SaveTableBG(self._game_id, self._bg) + end + self:Destroy() + end) + + self._view:GetChild("btn_close").onClick:Set(function( ... ) + local bg_id = self._view:GetController("bg").selectedIndex + 1 + if self._bg ~= bg_id then + self._bg = bg_id + TableBG.SaveTableBG(self._game_id, self._bg) + end + self:Destroy() + end) + + if self._show_dialect == true then + self._view:GetController("show_dialect").selectedIndex = 1 + local ctr_language = self._view:GetController("language") + ctr_language.selectedIndex = self:GetLanguage() + ctr_language.onChanged:Set(function() + self:SaveLanguage(ctr_language.selectedIndex) + if self.onChangeLanguageCallback then + self:onChangeLanguageCallback(ctr_language.selectedIndex) + end + end) + end +end + +--赋值bg_config +function M:GetBGConfig() + return TableBG.GetBGConfig() +end + +function M:Change3d(mode,oldCardType) + + local lst_bg = self._view:GetChild("lst_bg") + + if mode == 2 then + + local bg_id = self._view:GetController("bg").selectedIndex + 1 + if self._bg ~= bg_id then + self._bg = bg_id + TableBG.SaveTableBG(self._game_id, self._bg) + end + + for i = 1, lst_bg.numChildren do + local item = lst_bg:GetChildAt(i - 1) + if item.data.id == 4 then + item.onClick:Call(); + break + end + end + + else + + if oldCardType == 2 and DataManager.CurrenRoom.card_type ~= 2 then + for i = 1, lst_bg.numChildren do + local item = lst_bg:GetChildAt(i - 1) + if item.data.id == self._default_bg then + item.onClick:Call(); + break + end + end + end + + local bg_id = self._view:GetController("bg").selectedIndex + 1 + if self._bg ~= bg_id and bg_id ~= 4 then + self._bg = bg_id + TableBG.SaveTableBG(self._game_id, self._bg) + end + + bg_id = TableBG.GetTableBG(self._game_id) + if bg_id > 0 then + for i = 1, lst_bg.numChildren do + local item = lst_bg:GetChildAt(i - 1) + if item.data.id == bg_id then + item.onClick:Call(); + break + end + end + end + end +end + +--赋值bg_config +function M:GetBGConfig() + return TableBG.GetBGConfig() +end +--获得背景方法 +function M:GetBgByGameId(game_id) + return TableBG.GetTableBG(game_id) +end +--获得当前语言 +function M:GetLanguage() + return PlayerPrefs.GetInt("Languauge" .. DataManager.CurrenRoom.game_id) +end +--保存选择的语言 +function M:SaveLanguage(languauge) + PlayerPrefs.SetInt("Languauge" .. DataManager.CurrenRoom.game_id, languauge) +end + +function M:Show() + self:UpdateIndex() + SettingView.Show(self) + + local ctr_card = self._view:GetController("card") + ctr_card.onChanged:Set(function () + + if self.onChangeCardCallback then + local oldCardType = DataManager.CurrenRoom.card_type + DataManager.CurrenRoom.card_type = ctr_card.selectedIndex + self.onChangeCardCallback() + + local cardtype = ctr_card.selectedIndex + local list_cardtype = DataManager.CardTypeList + if DataManager.CurrenRoom then + local game_id = tostring(DataManager.CurrenRoom.game_id) + if not list_cardtype[game_id] or list_cardtype[game_id] ~= cardtype then + list_cardtype[game_id] = cardtype + Utils.SaveLocalFile("CardTypeData",json.encode(list_cardtype)) + end + end + + self:Change3d(ctr_card.selectedIndex,oldCardType) + end + end) +end + +function M:Change3DMode() + + DataManager.CurrenRoom.card_type = 2 + + local list_cardtype = DataManager.CardTypeList + if DataManager.CurrenRoom then + local game_id = tostring(DataManager.CurrenRoom.game_id) + if not list_cardtype[game_id] or list_cardtype[game_id] ~= cardtype then + list_cardtype[game_id] = cardtype + Utils.SaveLocalFile("CardTypeData",json.encode(list_cardtype)) + end + end + + TableBG.SaveTableBG(DataManager.CurrenRoom.game_id, 4) +end + + +function M:UpdateIndex() + local room = DataManager.CurrenRoom + local ctr_card = self._view:GetController("card") + ctr_card.selectedIndex = room.card_type +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/qizhiba/main/MJTableBG.lua b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJTableBG.lua new file mode 100644 index 00000000..95a120fa --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/qizhiba/main/MJTableBG.lua @@ -0,0 +1,87 @@ +-- Edit By ChenGY +-- 记录各游戏的桌面背景 + +local MJTableBG = {} + +local M = MJTableBG +local mj_bg_config = { + {id = 1, url = "base/tablebg/bg/bg1", thumb = "ui://Common/b04"}, + {id = 2, url = "base/tablebg/bg/bg2", thumb = "ui://Common/b05"}, + {id = 3, url = "base/tablebg/bg/bg3", thumb = "ui://Common/b06"}, + {id = 4, url = "base/main_pokemajiang/bg/bg6", thumb = "ui://Main_PokeMaJiang/b01"}, + {id = 5, url = "base/tablebg/bg/bg5", thumb = "ui://Common/b02"}, + {id = 6, url = "base/tablebg/bg/bg4", thumb = "ui://Common/b03"}, +} + +local function GetBG(data, game_id) + local bg_id = 0 + for i = 1, #data do + if data[i].game_id == game_id then + if data[i].bg_id ~= nil then + bg_id = data[i].bg_id + end + break + end + end + return bg_id +end +local function SetBG(data, game_id, bg_id) + local contain_key = false + for i = 1, #data do + if data[i].game_id == game_id then + contain_key = true + if data[i].bg_id ~= bg_id then + data[i].bg_id = bg_id + break + end + end + end + if not contain_key then + local _data = {} + _data.game_id = game_id + _data.bg_id = bg_id + table.insert(data, _data) + end +end + +function MJTableBG.GetBGConfig() + return mj_bg_config +end + +function MJTableBG.GetTableBG(game_id) + local id = -1 + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + + -- print(DataManager.SelfUser.invite_code, DataManager.SelfUser.account_id) + if json_data ~= nil then + local config_data = json.decode(json_data) + id = GetBG(config_data, game_id) + end + return id +end + +function MJTableBG.LoadTableBG(id, game_id, main_view) + local bg_id = M.GetTableBG(game_id) + local index + if bg_id > 0 then + index = bg_id + else + index = id + end + local url = mj_bg_config[index].url + LoadGameBg(url, main_view) +end + +function MJTableBG.SaveTableBG(game_id, bg_id) + local config_data + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + config_data = json.decode(json_data) + else + config_data = {} + end + SetBG(config_data, game_id, bg_id) + Utils.SaveLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code, json.encode(config_data)) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/tuidaohu/CS_Win_Type.lua b/lua_probject/extend_project/extend/majiang/tuidaohu/CS_Win_Type.lua new file mode 100644 index 00000000..39ea8560 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/tuidaohu/CS_Win_Type.lua @@ -0,0 +1,37 @@ +local CS_Win_Type = { + "鸡胡", + "平胡", + "七小对", + "豪华七小对", + "双豪华七小对", + "三豪华七小对", + "清一色", + "碰碰胡", + "杠上开花", + "杠上炮", + "抢杠胡", + "混一色", + "十三幺", + "天胡", + "地胡", + "人胡", + "十八罗汉", + "小三元", + "大三元", + "小四喜", + "大四喜", + "幺九", + "四鬼胡牌", + "全风", + "全求人", + "清幺九", + "字一色", + "无鬼翻倍", + "流局翻倍", + "海底捞月", + "门清", + "大胡", + +} +return CS_Win_Type + diff --git a/lua_probject/extend_project/extend/majiang/tuidaohu/CardCheck.lua b/lua_probject/extend_project/extend/majiang/tuidaohu/CardCheck.lua new file mode 100644 index 00000000..71dd7f8e --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/tuidaohu/CardCheck.lua @@ -0,0 +1,378 @@ +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + num = num == nil and 1 or num + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if(result ==num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local zhongid = 0 + + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + zhong_count = 0, + qidui = false, + hongzhong_count = 0, + qidui_pari_count = 0 +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + if (card == zhongid) then + self.zhong_count = self.zhong_count +1 + else + self.cardList[#self.cardList + 1] = card + end + end + table.sort(self.cardList) +end + +function M:tryShunzi(card) + if (card < 400 and card % 100 > 7) then + return false + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryKezi(card) + if (checkCardAndRomve(card, self.cardList, 3)) then + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (checkCardAndRomve(card, self.cardList, 2)) then + local cardGroup = {card,card} + self:push(cardGroup) + self.pair_count = 1 + return true + end + return false +end + + +function M:tryKezi1Zhong(card) + if (self.zhong_count >= 1 and checkCardAndRomve(card, self.cardList,2)) then + local cardGroup = {card,card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + return true + end + return false +end + +function M:tryKezi2Zhong(card) + if (self.zhong_count >= 2 and checkCardAndRomve(card, self.cardList,1)) then + local cardGroup = {card,zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + return true + end + return false +end + +function M:tryShunzi1Zhong(card) + if (card % 100 > 8) then + return false + end + + if (self.zhong_count < 1) then + return false + end + + if (checkCard(card + 1, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,card+1,zhongid} + self:push(cardGroup) + return true + end + + if (checkCard(card + 2, self.cardList) and ((card + 1) % 100 ~= 0)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 2, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,zhongid,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair1Zhong(card) + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 1) then + return false + end + removeCard(self.cardList, card, 1) + local cardGroup = {card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + self.pair_count = 1 + return true +end + +function M:tryPair2Zhong() + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 2) then + return false + end + local cardGroup = {zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + self.pair_count = 1 + return true +end + +function M:tryWin() + if (self.zhong_count == 4 and not self.eight_laizi) or (self.zhong_count == 8 and self.eight_laizi) then + return true + end + if (#self.cardList == 0 and self.pair_count == 1) then + return true + end + if (#self.cardList == 0 and self.pair_count == 0) then + return self:tryPair2Zhong() + end + + if (#self.cardList == 0) then + return false + end + + local activeCard = self.cardList[1] + if (self:tryPair(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + + if (self:tryKezi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi2Zhong(activeCard)) then + + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryPair1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + return false +end + +function M:checkQidui() + if (not self.qidui) then + return false + end + if ((#self.cardList + self.zhong_count) ~= 14) then + return false + end + local cardList = membe_clone(self.cardList) + self.qidui_pari_count = 0 + self.hongzhong_count = self.zhong_count + return self:isQdPari(cardList) +end + +function M:isQdPari(cardList) + if(self.qidui_pari_count == 7) then + return true + end + if (#cardList== 0) then + return true + end + local card = cardList[1] + if (cardNum(card, cardList) >= 2) then + removeCard(cardList, card, 2) + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + + if (self.hongzhong_count > 0) then + removeCard(cardList, card, 1) + self.hongzhong_count = self.hongzhong_count - 1 + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + return false +end + +local function init(self,cardInhand,addCard,isZhong,qidui,eightLaizi) + self.stack = {} + self.pair_count = 0 + self.cardList = membe_clone(cardInhand) + self.qidui = qidui + self.eight_laizi = eightLaizi + self.cardList[#self.cardList+1] = addCard + if (isZhong) then + self.zhong_count = cardNum(zhongid, self.cardList) + removeCard(self.cardList, zhongid, self.zhong_count) + end + table.sort(self.cardList) + --printlog("添加排序====>>>") + --pt(self.cardList) + return self:checkQidui() or self:tryWin() +end + +local specialCardList={400,403,406,409,412,415,418} +function M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + --printlog("isZhong",isZhong) + --printlog("qidui",qidui) + --printlog("eightLaizi",eightLaizi) + --pt(cardInhand) + local self = setmetatable({}, {__index = M}) + local tingList = {} + if not cardInhand or #cardInhand == 0 then + return tingList + end + for k=100,300,100 do + for i=1,9 do + local tem = k + i + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + --printlog("返回结果为===>>>",result) + if(result) then + tingList[#tingList + 1] = tem + end + end + end + + for j=1,#specialCardList do + local tem = specialCardList[j] + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + if(result) then + tingList[#tingList + 1] = tem + end + end + + return tingList +end + +function M.MuiltiplteCaculateTingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + zhongid=DataManager.CurrenRoom.laiziInfo[1] + local tempTingList2={} + local tempTingList1=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + if DataManager.CurrenRoom.laiziInfo[2] then + zhongid=DataManager.CurrenRoom.laiziInfo[2] + tempTingList2=M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + zhongid=DataManager.CurrenRoom.laiziInfo[1] + end + local currentTingList={} + if #tempTingList1>0 and #tempTingList2>0 then + currentTingList=CombineDictionaryAndRemoveSomeItem(tempTingList1,tempTingList2) + elseif #tempTingList1>0 then + currentTingList=tempTingList1 + elseif #tempTingList2>0 then + currentTingList=tempTingList2 + end + + return currentTingList + + else + zhongid=0 + return M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + end + +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/tuidaohu/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/tuidaohu/EXClearingView.lua new file mode 100644 index 00000000..11ed6d81 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/tuidaohu/EXClearingView.lua @@ -0,0 +1,625 @@ +require("Game.View.ResultView") +local Hu_Type_Name = import(".CS_Win_Type") + +local EXClearingView = {} + +local M = EXClearingView + +function EXClearingView.new(blur_view) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self._full = true + ResultView.init(self, "ui://Main_Majiang/clearing") + + self._currenIndex = 0 + self._blur_view = blur_view + self._close_zone = false + self:InitMaPai() + + return self +end + +function M:InitMaPai() + self.maPaiCtr=self._view:GetController("mapai") + self.maPaiCtr.selectedIndex=0 + + self.maPaiList={} + + for i=1,8 do + local tempMP=self._view:GetChild("niao"..i) + table.insert(self.maPaiList,tempMP) + end + +end + + +function M:IsMapaiShow(niao,isShow) + if niao then + niao.visible=isShow + end +end + + +function M:SetMaPaiValue(niao,value) + if niao then + niao.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..value + end +end + +function M:SetMaPaiColor(niao,num) + niao:GetController("color").selectedIndex=num +end + +function M:HideAllMapai() + for i=1,#self.maPaiList do + self:IsMapaiShow(self.maPaiList[i],false) + self:SetMaPaiColor(self.maPaiList[i],0) + end +end + + + +function M:ShowSelectMaPai(niaoList) + if niaoList and #niaoList>0 then + self.maPaiCtr.selectedIndex=1 + self:HideAllMapai() + for i=1,#niaoList do + self:IsMapaiShow(self.maPaiList[i],true) + self:SetMaPaiValue(self.maPaiList[i],niaoList[i].card) + if niaoList[i].score>0 then + self:SetMaPaiColor(self.maPaiList[i],2) + end + end + else + self.maPaiCtr.selectedIndex=0 + end +end + + + +function M:CalculatePaixingInfo(result) + self.WinList={} + if result.info_list and #result.info_list>0 then + for i=1,#result.info_list do + if result.info_list[i].win_list and #result.info_list[i].win_list>0 then + table.insert(self.WinList,result.info_list[i].win_list) + end + end + end + + printlog("牌型列表====>>>") + pt(self.WinList) +end + + +function M:SetPaixingxiangqing(num) + for i=1,#self.PaiXingXiangQingCtrList do + if self.PaiXingXiangQingCtrList[i] then + self.PaiXingXiangQingCtrList[i].selectedIndex=num + end + end +end + + + +function M:InitData(over, room, result, total_result, callback) + self._callback = callback + local _overCtr = self._view:GetController("over") + local btn_confirm = self._view:GetChild("btn_confirm") + local btn_result = self._view:GetChild("btn_showResult") + local btn_close = self._view:GetChild("big_result"):GetChild("btn_close") + local _btnCtr = self._view:GetController("button") + local _sdkCtr = self._view:GetController("sdk") + local ctr_type = self._view:GetController("type") + self._view:GetChild("tex_roominfo").text = string.format("房号%s 局%s/%s %s", room.room_id, room.curren_round, room.room_config.round, os.date("%Y-%m-%d %H:%M:%S", os.time())) + self._view:GetChild("tex_gameinfo").text = string.gsub(room.room_config:GetDes2(), "\r", "") + + if result then + self:ShowSelectMaPai(result.niao) + self:CalculatePaixingInfo(result) + end + + + self.PaiXingXiangQingCtrList={} + + local paixingxiangqing=self._view:GetChild("btn_detal") + local fanhuipaixing=self._view:GetChild("btn_fanhuipaixing") + fanhuipaixing.visible=false + paixingxiangqing.visible=true + paixingxiangqing.onClick:Add(function() + paixingxiangqing.visible=false + fanhuipaixing.visible=true + self:SetPaixingxiangqing(1) + end) + fanhuipaixing.onClick:Add(function() + paixingxiangqing.visible=true + fanhuipaixing.visible=false + self:SetPaixingxiangqing(0) + end) + + + if over ~= 2 then + if result.liuju then + ctr_type.selectedIndex = 3 + else + local info_list = result.info_list + for i = 1, #info_list do + local is_win = info_list[i].is_win + if is_win then + if info_list[i].seat == room.self_player.seat then + ctr_type.selectedIndex = 1 + else + ctr_type.selectedIndex = 2 + end + end + end + end + if over == 0 then + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + btn_confirm.onClick:Add(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:DestroyWithCallback() + end) + self:AddClearItem(room, result.info_list, nil, over, result.niao, result.active_player) + elseif over == 1 then + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add(function() + self.maPaiCtr.selectedIndex=0 + _overCtr.selectedIndex = 1 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + if self._qsinfo_view then + self._qsinfo_view:Dispose() + end + end) + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + self:AddClearItem(room, result.info_list, total_result.info_list, over, result.niao, result.active_player) + end + else + _overCtr.selectedIndex = 1 + self.maPaiCtr.selectedIndex=0 + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + self:AddClearItem(room, nil, total_result.info_list, over) + end +end + +function M:AddClearItem(room, data, total_data,over, niao, active_player) + local n = over + 1 + local list_view1 = self._view:GetChild("player_list_1") + local list_view2 = self._view:GetChild("player_list_2") + if 0 == over or 1 == over then + table.sort(data, function(a,b) return a.seat < b.seat end) + list_view1:RemoveChildrenToPool() + for i=1,#data do + local item = list_view1:AddItemFromPool() + self:FillItemData(room, data[i], item, active_player, niao) + end + if #data == 3 then + list_view1.lineGap = 54 + elseif #data == 2 then + list_view1.lineGap = 108 + end + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end +end + +function M:FillItemData(room, data, item, active_player, niao) + local _gamectr = ControllerManager.GetController(GameController) + local p = room:GetPlayerBySeat(data["seat"]) + item:GetChild("playerName").text = p.self_user.nick_name + item:GetChild("lab_hp").text="抓马" + local user = room:GetPlayerBySeat(data["seat"]).self_user + local head = item:GetChild('head'):GetChild('n4') + ImageLoad.Load(user.head_url, head) + + -- 手牌 + local hand_cards = data["hand_card"] + table.sort( hand_cards, ViewUtil.HandCardSort) + local hand_list_view = item:GetChild("hand_card_list") + hand_list_view:RemoveChildrenToPool() + for i=1,#hand_cards do + local card = hand_list_view:AddItemFromPool() + card.icon = "ui://Main_Majiang/202_"..hand_cards[i] + end + hand_list_view.width = 52 * #hand_cards + + local fz_card = p.fz_list + local fz_card_list = item:GetChild("fz_card_list") + fz_card_list.width = 157 * #fz_card * 0.8 + fz_card_list:RemoveChildrenToPool() + for i=1,#fz_card do + if fz_card[i].type == FZType.Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j=1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + elseif fz_card[i].type == FZType.Gang or fz_card[i].type == FZType.Gang_An or fz_card[i].type == FZType.Gang_Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_4") + for j=1,4 do + local card = item:GetChild("card_" .. j) + if fz_card[i].type == FZType.Gang_An and j == 4 then + card.icon = "ui://Main_Majiang/202_00" + else + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + end + end + end + + local huadd = data["hu_score"] + local gangadd = data["gang_score"] + local birdadd = data["niao_score"] + local total = data["round_score"] + local geng_zhuan=data["geng_zhuan"] + local sp = " " + local str = "胡:"..huadd.."分" + str = str..sp.."杠:"..gangadd.."分" + str = str..sp.."中马:"..birdadd.."分" + + if data["mai_niao_score"] and data["mai_niao_score"]~=0 then + str = str..sp.."买马:"..data["mai_niao_score"].."分" + end + + if data["ma_geng_gong"] and data["ma_geng_gong"]~=0 then + str = str..sp.."马跟杠:"..data["ma_geng_gong"].."分" + end + + if geng_zhuan and geng_zhuan~=0 then + str = str..sp.."跟庄:"..geng_zhuan.."分" + end + + if data["repeat_win"] and data["repeat_win"]~=0 then + str = str..sp.."连庄x"..data["repeat_win"] + end + + + + + + item:GetChild("score1").text = str + -- local total_score = data["total_score"] + if total >= 0 then + item:GetChild("score2").text = "+"..total + item:GetChild("score2").grayed = false + else + item:GetChild("score2").text = total + item:GetChild("score2").grayed = true + end + + + --计算牌型 + local totalPeson=DataManager.CurrenRoom.room_config.people_num-1 + local win_list = data["win_list"] + local is_win = data["is_win"] or false + local str1="" + sp="、" + if is_win then + if win_list then + if DataManager.CurrenRoom.isZiMoHu then + str1="自摸" + else + str1="接炮" + end + for i=1,#win_list do + local huName=Hu_Type_Name[win_list[i].type] + if huName then + str1=str1..sp..huName.."x"..win_list[i].score + end + + end + str1=str1.." +"..huadd.."分" + end + + else + printlog("输家============") + if DataManager.CurrenRoom.isZiMoHu then + printlog("自摸处理============") + --str1="" + if #self.WinList==1 then + for i=1,#self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + if j==1 then + str1=str1..huName.."x"..self.WinList[i][j].score + else + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + + end + end + + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + else + printlog("非自摸处理====>>>") + --点炮 一炮多响 + local yipaoduoxiang=false + if #self.WinList>1 then + yipaoduoxiang=true + end + + if yipaoduoxiang then + printlog("一炮多响====>>>") + str="点炮" + local allTypeList={} + local isHas=false + for i=1,#self.WinList do + for j=1,#self.WinList[i] do + isHas=IsHasDictionary(self.WinList[i][j].type,allTypeList) + if isHas==false then + table.insert(allTypeList,self.WinList[i][j].type) + end + end + + end + + if #allTypeList>0 then + for i=1,#allTypeList do + local huName=Hu_Type_Name[allTypeList[i]] + if huName then + str1=str1..huName.."、" + end + end + str1=str1.." "..huadd.."分" + end + + else + + if p.self_user.account_id == active_player and is_win == false and not data["liuju"] then + str1="点炮" + if #self.WinList==1 then + for i=1,# self.WinList do + + for j=1,#self.WinList[i] do + local huName=Hu_Type_Name[self.WinList[i][j].type] + if huName then + str1=str1..sp..huName.."x"..self.WinList[i][j].score + end + end + + end + str1=str1.." "..huadd.."分" + else + printlog("服务端自摸计算异常===>>>") + end + + end + + end + + + end + end + + -- + printlog("牌型计算==>>>",str1) + + if data["ming_gang_num"]>0 then + str1=str1.." 明杠x"..data["ming_gang_num"] + end + + if data["an_gang_num"]>0 then + str1=str1.." 暗杠x"..data["an_gang_num"] + end + + if data["dian_gang_num"]>0 then + str1=str1.." 点杠x"..data["dian_gang_num"] + end + + if gangadd~=0 then + if gangadd>0 then + str1=str1.." +"..gangadd.."分" + else + str1=str1.." "..gangadd.."分" + end + + end + + if birdadd~=0 then + if birdadd>0 then + str1=str1.." 中马分数+"..birdadd.."分" + else + str1=str1.." 中马分数"..birdadd.."分" + end + + end + + + if data["mai_niao_score"] and data["mai_niao_score"]~=0 then + if data["mai_niao_score"]>0 then + str = str..sp.."买马/罚马分数:+"..data["mai_niao_score"].."分" + else + str = str..sp.."买马/罚马分数:"..data["mai_niao_score"].."分" + end + + end + + + if data["ma_geng_gong"] and data["ma_geng_gong"]~=0 then + if data["ma_geng_gong"]>0 then + str1 = str1.." 马跟杠:+"..data["ma_geng_gong"].."分" + else + str1 = str1.." 马跟杠:"..data["ma_geng_gong"].."分" + end + + end + + if geng_zhuan and geng_zhuan~=0 then + if geng_zhuan>0 then + str1 = str1.." 跟庄:+"..geng_zhuan.."分" + else + str1 = str1.." 跟庄:"..geng_zhuan.."分" + end + + end + + + + + + item:GetChild("score3").text=str1 + local paixingCtr=item:GetController("detail") + table.insert(self.PaiXingXiangQingCtrList,paixingCtr) + ------------------------- + + local hp_nonnegative = room:checkHpNonnegative() + item:GetController("nonnegative").selectedIndex = hp_nonnegative and 1 or 0 + if hp_nonnegative then + local hp_info = data.hp_info + local ctr_hp_limit = item:GetController("hp_limit") + local hp = d2ad(hp_info.round_actual_hp) + if hp >= 0 then hp = "+" .. tostring(hp) end + item:GetChild("tex_hp").text = hp + ctr_hp_limit.selectedIndex = hp_info.upper_limit and 1 or 0 + end + + + item:GetController("win").selectedIndex = is_win and 0 or 1 + if p.self_user.account_id == active_player and is_win == false and total < 0 then + item:GetController("win").selectedIndex = 2 + end + + if is_win then + item:GetController("bg").selectedIndex=1 + else + item:GetController("bg").selectedIndex=0 + end + local win_card = item:GetChild("win_card") + win_card.icon = "ui://Main_Majiang/202_"..data["win_card"] + + if niao and #niao>0 then + local currentNiaoList=self:CalculateNiao(niao ,data["seat"]) + if currentNiaoList and #currentNiaoList>0 then + local lst_niao = item:GetChild("list_niao") + lst_niao:RemoveChildrenToPool() + for i = 1, #currentNiaoList do + if currentNiaoList[i].score > 0 then + local card_niao = lst_niao:AddItemFromPool() + card_niao.icon = "ui://Main_Majiang/202_" .. currentNiaoList[i].card + end + end + end + end + + + if p.seat == room.banker_seat then + item:GetController("bank").selectedIndex = 1 + end +end + +function M:CalculateNiao(niaoList,seat) + local tempNiao={} + for i=1,#niaoList do + if niaoList[i].seat==seat then + table.insert(tempNiao,niaoList[i]) + end + end + return tempNiao +end + + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + player_list[i].id = user.account_id + player_list[i].hp_info = data[i].hp_info + player_list[i].score = data[i].total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + + local settle_log = data[i].settle_log + player_list[i].param = {} + player_list[i].param[1]={} + player_list[i].param[1].key = "自摸次数:" + player_list[i].param[1].value = tostring(data[i].settle_log.zimo) + player_list[i].param[2]={} + player_list[i].param[2].key = "接炮次数:" + player_list[i].param[2].value = tostring(data[i].settle_log.jie_pao) + player_list[i].param[3]={} + player_list[i].param[3].key = "点炮次数:" + player_list[i].param[3].value = tostring(data[i].settle_log.dian_pao) + player_list[i].param[4]={} + player_list[i].param[4].key = "暗杠次数:" + player_list[i].param[4].value = tostring(data[i].settle_log.an_kong) + player_list[i].param[5]={} + player_list[i].param[5].key = "明杠次数:" + player_list[i].param[5].value = tostring(data[i].settle_log.ming_kong) + end + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + local big_result = self._view:GetChild("big_result") + big_result:GetChild("txt_room_info").text = string.format("%s 房号%s 局%s/%s", os.date("%Y/%m/%d", os.time()), room.room_id, room.curren_round, room.room_config.round) + local lst_p = big_result:GetChild("player_list") + if #player_list == 3 then + lst_p.columnGap = 108 + elseif #player_list == 2 then + lst_p.columnGap = 208 + end + self:InitBigResult(room, 30) + local show_detail = room.hpOnOff == 1 + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + com_p:GetController("jsicon").selectedIndex=i-1 + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + if show_detail then + local score = 0 + if com_p:GetController("pn").selectedIndex == 0 then + score = com_p:GetChild("txt_navigate").text + else + score = com_p:GetChild("txt_positive").text + end + score = score / room.score_times + com_p:GetChild("tex_detail_score").text = string.format("%s × %s倍", score, room.score_times) + end + end + if room.group_id ~= 0 then + big_result:GetController("group").selectedIndex = 1 + end + DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild("btn_head") + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= "" then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end + +function M:DestroyWithCallback() + if self._callback then + self._callback() + end + self:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/tuidaohu/EXGameController.lua b/lua_probject/extend_project/extend/majiang/tuidaohu/EXGameController.lua new file mode 100644 index 00000000..07126dc3 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/tuidaohu/EXGameController.lua @@ -0,0 +1,364 @@ +local TX_Protocol = import(".Protocol") +local FZTipList = require("main.majiang.FZData") +local TX_GameEvent = import(".GameEvent") + +local M = {} + +--- Create a new GameController +function M.new() + setmetatable(M,{__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("测试麻将") + self.class = "TX_GameController" + return self +end + +function M:init(name) + GameController.init(self,name) + + self._eventmap[TX_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[TX_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[TX_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[TX_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[TX_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[TX_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + self._eventmap[TX_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[TX_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[TX_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[TX_Protocol.GAME_EVT_RESULT2] = self.OnEventResult2 + self._eventmap[TX_Protocol.GAME_EVT_NIAO] = self.OnEventNiao + self._eventmap[TX_Protocol.GAME_EVT_PIAOTIP] = self.OnEventPiaoTip + self._eventmap[TX_Protocol.GAME_EVT_PIAO] = self.OnEventPiao +end + +local __pre_delete_card = false +-- 发送出牌指令到服务器 +function M:SendOutCard(card, callback) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_DIS_CARD, _data) + + -- 进行预删牌处理 + local p = _room.self_player + _room.curren_outcard_seat = -1 + list_remove(p.card_list,card) + table.sort(p.card_list, ViewUtil.HandCardSort) + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + __pre_delete_card = true + callback() +end + + +-- 发送放子选择到服务器 +function M:SendAction(id) + local _data = {} + _data["id"] = id + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_ACTION, _data) +end + +function M:OnEventSendCards(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + if not _room.room_config.piao_niao or _room.self_player.entrust then + _room.curren_round = _room.curren_round + 1 + end + if _room.curren_round > 0 then _room.playing = true end + + --printlog("开始发牌===========>>>") + --pt(evt_data) + + local room = DataManager.CurrenRoom + --printlog(evt_data.laiziCard) + --printlog(evt_data.laiziCard2) + --printlog(evt_data.laiziCardBefore) + --printlog(evt_data.laiziCard2Before) + + room.laiziInfo={} + if evt_data.laiziCardBefore>0 then + table.insert(room.laiziInfo,evt_data.laiziCard) + if evt_data.laiziCard2>0 then + table.insert(room.laiziInfo,evt_data.laiziCard2) + end + else + room.laiziInfo=nil + end + + if evt_data.laiziCardBefore>0 then + DispatchEvent(self._dispatcher,TX_GameEvent.SendLaiZi,evt_data.laiziCardBefore,evt_data.laiziCard,evt_data.laiziCard2,true ) + end + + + + + -- _room.SelfPlayer.AutoOutCard = false + local handcards = evt_data["card_list"] + local p = _room.self_player + local seat = evt_data["bank_seat"] + self._cacheEvent:Enqueue(function() + _room.banker_seat = seat + for i=1,#_room.player_list do + _room.player_list[i].hand_left_count = 13 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + end + p.card_list = handcards + self._room.self_player.hand_left_count = #handcards + table.sort( handcards, ViewUtil.HandCardSort ) + DispatchEvent(self._dispatcher,TX_GameEvent.SendCards, p) + end) +end + +function M:OnEventOutCard(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local ting_list = nil + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + _room.last_outcard_seat = seat + if seat == _room.self_player.seat and __pre_delete_card then + __pre_delete_card = false + else + if seat == _room.self_player.seat then + list_remove(p.card_list, card) + table.sort(p.card_list, ViewUtil.HandCardSort) + end + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + DispatchEvent(self._dispatcher,TX_GameEvent.OutCard, p, card) + end + end) +end + + +function M:OnEventTakeCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + p.hand_left_count = p.hand_left_count +1 + if (seat == _room.self_player.seat) then + _room.self_player.card_list[#_room.self_player.card_list+1] = card + -- table.sort( _room.self_player.card_list, ViewUtil.HandCardSort ) + end + DispatchEvent(self._dispatcher,TX_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnEventOutHint(evt_data) + self._cacheEvent:Enqueue(function() + self._room.curren_outcard_seat = self._room.self_player.seat + DispatchEvent(self._dispatcher,TX_GameEvent.OutHint) + end) +end + +function M:OnEventTurn(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + -- self._room.curren_outcard_seat = seat + DispatchEvent(self._dispatcher,TX_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + local weight = evt_data["weight"] + for i=1,#list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + -- if (dtip["opcard"]) then + -- local opcard = dtip["opcard"] + -- tip.OpCard = opcard + -- tip.OpCard[3] = tip.Card + -- table.sort(tip.OpCard) + -- end + tiplist:AddTip(tip) + end + DispatchEvent(self._dispatcher,TX_GameEvent.FZTips, tiplist, weight) + end) +end + +function M:OnEventFzAction(evt_data) + local _room = self._room + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local type = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + -- local openkong = evt_data["openkong"] + + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local fz = nil + local index = -1 + local ftype = type + if (ftype == FZType.Gang_Peng) then + for i=1,#p.fz_list do + if (p.fz_list[i].card == card) then + p.fz_list[i].card = card + fz = p.fz_list[i] + fz.type = type + index = i -1 + break + end + end + end + if (index == -1) then + fz = {} + fz.card = card + fz.type = type + fz.active_card = actice_card + p.fz_list[#p.fz_list+1] = fz + end + fz.from_seat = from_seat + local remove_num = #opcard + + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(p.card_list,opcard[i]) + end + end + + p.hand_left_count = p.hand_left_count - remove_num + if from_seat ~= p.seat then + -- if (fz.Type == FZType.Chi) then card = actice_card end + local fp = _room:GetPlayerBySeat(from_seat) + table.remove(fp.outcard_list,#fp.outcard_list) + end + + DispatchEvent(self._dispatcher,TX_GameEvent.FangziAction, fz, p, index) + end) +end + +function M:OnEventHu(evt_data) + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local win_card = evt_data["win_card"] + local win_list = evt_data["win_list"] + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + table.sort( win_p.card_list, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher,TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], win_card, cards, win_list) + end) +end + +function M:OneventResult1(evt_data) + local over = evt_data.type + --0:小结算 1:小大结算 2:大结算 + self._room._reload_flag = false + self._room.playing = false + if 0 == over then + local result = evt_data.result + self._cacheEvent:Enqueue(function() + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil,true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +-- function M:OnEventResult2(evt_data) +-- DataManager.CurrenRoom.Over = true +-- ControllerManager.SetGameNetClient(nil,true) + -- local info_list = evt_data["info_list"] + -- if self._result ~= nil then + -- self._cacheEvent:Enqueue(function() + -- self:OneventResult1(self._result) + -- self._result = nil + -- end) + -- end +-- self._cacheEvent:Enqueue(function() +-- DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, info_list) +-- ControllerManager.ChangeController(LoddyController) +-- end) +-- end + +function M:OnEventNiao(evt_data) + local list = evt_data["niao"] + local start_seat = evt_data["start_seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EventNiao, list, start_seat) + end) +end + +function M:OnEventPiaoTip() + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + self._cacheEvent:Enqueue(function() + if not self._room._reload_flag then + self._room.curren_round = self._room.curren_round + 1 + end + self._room.playing = true + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiaoTip, evt_data) + end) +end + +function M:OnEventPiao(evt_data) + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiao, evt_data.seat, evt_data.num) + end) +end + +function M:GetPosString( seat ) + if DataManager.CurrenRoom.room_config.people_num ~= 4 then return"" end + if seat == 1 then + return "北" + elseif seat == 2 then + return "西" + elseif seat == 3 then + return "南" + elseif seat == 4 then + return "东" + end +end + +function M:Discard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + -- list_remove(_room.SelfPlayer.Cards,card) + -- table.sort(_room.SelfPlayer.Cards) + _client:send(Protocol.Game_Da, _data) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/tuidaohu/EXGameInfo.lua b/lua_probject/extend_project/extend/majiang/tuidaohu/EXGameInfo.lua new file mode 100644 index 00000000..f5d9c2cb --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/tuidaohu/EXGameInfo.lua @@ -0,0 +1,173 @@ +local EXGameInfo = {} + +local M = EXGameInfo + + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/majiang/tuidaohu/ui/Info_MJ_TuiDaoHu") + return self +end + +function M:FillData() + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 3 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_TuiDaoHu/Cgm_create_room") +end + +local _help_url= "ui://Info_MJ_TuiDaoHu/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_MJ_TuiDaoHu/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_MJ_TuiDaoHu/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list ={} --{"四人推倒胡","三人推倒胡","二人推倒胡"} +function M:GetPlayList() + return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + 1 + local people = _config:GetController("play_list").selectedIndex+2 + + local qidui=_config:GetChild("btn_qidui").selected and true or false + local isQiduifanbei=false + if qidui then + isQiduifanbei=_config:GetChild("btn_qiduijiabei").selected and true or false + end + local qiangganghu=_config:GetChild("btn_qiangkanghu").selected and true or false + local budaifeng=_config:GetChild("btn_budaifeng").selected and true or false + local laizi=_config:GetController("GuiType").selectedIndex + local zhama=_config:GetController("zhama").selectedIndex + local niao=0 + local niao_opt=0 + local magengdifen=false + local magenggang=false + if zhama>0 and zhama<5 then + niao=1 + niao_opt=zhama + magengdifen=_config:GetChild("btn_magengdifen").selected + magenggang=_config:GetChild("btn_magenggang").selected + elseif zhama==5 then + niao=2 + local baozhama=_config:GetController("baozhama").selectedIndex + niao_opt=baozhama + end + + local jiangma = _config:GetController("jiangma").selectedIndex + local minggangkeqiang=false + local qianggangquanbao=false + if qiangganghu then + minggangkeqiang=_config:GetChild("btn_minggangqiang").selected and true or false + qianggangquanbao=_config:GetChild("btn_qianggangqb").selected and true or false + else + _config:GetChild("btn_minggangqiang").selected=false + _config:GetChild("btn_qianggangqb").selected=false + end + + local gangbaoquanbao=_config:GetChild("btn_gangbaoqb").selected and true or false + + local geng_zhuan=_config:GetChild("btn_gengzhuang").selected and true or false + local jiejiegao=_config:GetChild("btn_jiejiegao").selected and true or false + local wuguijiabei=_config:GetChild("btn_wuguijiabei").selected and true or false + local no_wan=_config:GetChild("btn_wudaiwan").selected and true or false + local jiejiegao_first=_config:GetChild("btn_shoujubuleijia").selected and true or false + if jiejiegao==false then + jiejiegao_first=false + end + ------ + local _data = {} + _data["opt"] = round + _data["maxPlayers"] = people + _data["qidui"] = qidui + _data["qiangkong"] = qiangganghu + _data["qiangkong_niao"] = false + _data["niao"] = niao + _data["niao_opt"] = niao_opt + _data["AA"] = 0 + _data["piao_niao"] = false + _data["jiangma"] = jiangma + _data["laizi"] = laizi + _data["wu_feng"] = budaifeng + _data["qiangkong_ming"] = minggangkeqiang + _data["qianggang_type"] = qianggangquanbao + _data["gangbao_type"] = gangbaoquanbao + _data["geng_zhuan"] = geng_zhuan + _data["jiejiegao"] = jiejiegao + _data["wuguijiabei"] = wuguijiabei + _data["no_wan"] = no_wan + _data["jiejiegao_first"] = jiejiegao_first + _data["ma_gen_di_fen"] = magengdifen + _data["ma_gen_gong"] = magenggang + _data["qidui_jiafan"] =isQiduifanbei + + --printlog("上传房间配置==========>>>") + --pt(_data) + + return _data +end + +function M:LoadConfigData(data) + --printlog("加载房间配置=========>>>") + --pt(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt -1 + _config:GetController("play_list").selectedIndex = data.maxPlayers-2 + _config:GetChild("btn_qidui").selected = data.qidui + + _config:GetChild("btn_budaifeng").selected = data.wu_feng + _config:GetController("GuiType").selectedIndex = data.laizi + + + _config:GetChild("btn_magengdifen").selected = false + _config:GetChild("btn_magenggang").selected = false + + local GuiTypeValue=0 + if data.niao ==0 then + GuiTypeValue=0 + elseif data.niao ==1 then + GuiTypeValue=data.niao_opt + _config:GetChild("btn_magengdifen").selected = data.ma_gen_di_fen + _config:GetChild("btn_magenggang").selected = data.ma_gen_gong + elseif data.niao ==2 then + GuiTypeValue=5 + _config:GetController("baozhama").selectedIndex = data.niao_opt + end + + + _config:GetController("zhama").selectedIndex = GuiTypeValue + + _config:GetChild("btn_qiangkanghu").selected = data.qiangkong + + _config:GetChild("btn_minggangqiang").selected = data.qiangkong_ming + _config:GetChild("btn_qianggangqb").selected = data.qianggang_type + + _config:GetChild("btn_gangbaoqb").selected = data.gangbao_type + _config:GetChild("btn_gengzhuang").selected = data.geng_zhuan + _config:GetChild("btn_jiejiegao").selected = data.jiejiegao + _config:GetChild("btn_shoujubuleijia").selected = data.jiejiegao_first + _config:GetChild("btn_wuguijiabei").selected = data.wuguijiabei + _config:GetChild("btn_wudaiwan").selected = data.no_wan + _config:GetChild("btn_qiduijiabei").selected = data.qidui_jiafan + + + end + + + + + +return M + \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/tuidaohu/EXMainView.lua b/lua_probject/extend_project/extend/majiang/tuidaohu/EXMainView.lua new file mode 100644 index 00000000..1fd27dbe --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/tuidaohu/EXMainView.lua @@ -0,0 +1,776 @@ +local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local MJMainView = require("main.majiang.MJMainView") +local EXClearingView = import(".EXClearingView") +local TX_GameEvent = import(".GameEvent") +local HuTipView = import("main.majiang.HuTipView") +local SettingView = import("main.majiang.MJSettingViewNew") +local PlayerInfoView = import(".EXPlayerInfoView") +local M = {} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M,{__index = MJMainView}) + local self = setmetatable({}, {__index = M}) + self.class = "MainView" + self.asset_group = "TuiDaoHu_MJ" + self:init() + ViewUtil.PlayMuisc(self.asset_group, "extend/majiang/tuidaohu/sound/bg.mp3") + return self +end + +function M:InitView(url) + local room = self._room + self._style = 1 + self._gps_style = 1 + self._full = true + UIPackage.AddPackage("extend/majiang/tuidaohu/ui/Extend_MJ_TuiDaoHu") + MJMainView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num .. "_s2") + self._hu_tip = HuTipView.new(self) + + self._view:GetChild('wanfa_text').text =room.room_config.people_num .. '人推倒胡 ' .. room.score_times .. '倍' + + self.LaiziBG=self._view:GetChild('n103') + self.LaiziBG.text="鬼牌" + self.LaiziBG.visible=false + self.selectLaiziBtn=self._view:GetChild('selectlaizi') + self.Laizi1Btn=self._view:GetChild('selectlaizi1') + self.Laizi2Btn=self._view:GetChild('selectlaizi2') + self.Laizi1Btn.visible=false + self.Laizi2Btn.visible=false + self.selectLaiziBtn.visible=false + self:SetReconnentLaiziTips() + + self:PlayerChangeLineState() + + if room.playing or room.curren_round > 0 then + self:ReloadRoom() + end +end + + + +function M:SetReconnentLaiziTips() + local room=DataManager.CurrenRoom + if room.beforelaiziCardId and room.beforelaiziCardId>0 then + self:SetShowLaiZiProcess(room.beforelaiziCardId,room.laiziInfo[1],room.laiziInfo[2],false) + end +end + + +function M:SetLaiZiCard(btn,cardId) + btn.icon='ui://Main_Majiang/' ..get_majiang_prefix(DataManager.CurrenRoom.game_id).."201_"..cardId +end + + +function M:IsShowLaiZi(btn,isShow) + btn.visible=isShow +end + + +function M:HideAllLaiZiCard() + self.Laizi1Btn.visible=false + self.Laizi2Btn.visible=false + self.selectLaiziBtn.visible=false + self.LaiziBG.visible=false +end + +function M:SetShowLaiZiProcess(beforeLaiziID,currentLaizi1ID,currentLaizi2ID,isShowAnim) + --zhongid=currentLaizi1ID + if isShowAnim==nil then isShowAnim=false end + + printlog("当前赋值结果为====>>>") + print(beforeLaiziID) + print(currentLaizi1ID) + print(currentLaizi2ID) + self:HideAllLaiZiCard() + self:SetLaiZiCard(self.selectLaiziBtn,beforeLaiziID) + self:SetLaiZiCard(self.Laizi1Btn,currentLaizi1ID) + if currentLaizi2ID then + self:SetLaiZiCard(self.Laizi2Btn,currentLaizi2ID) + end + + + if isShowAnim==true then + self:IsShowLaiZi(self.selectLaiziBtn,true) + coroutine.start( + function() + coroutine.wait(1) + self:HideAllLaiZiCard() + self.LaiziBG.visible=true + self:IsShowLaiZi(self.Laizi1Btn,true) + if currentLaizi2ID then + self:IsShowLaiZi(self.Laizi2Btn,true) + end + + end + ) + else + self.LaiziBG.visible=true + self:IsShowLaiZi(self.Laizi1Btn,true) + if currentLaizi2ID then + self:IsShowLaiZi(self.Laizi2Btn,true) + end + end + self.LaiziBG.visible=true +end + + +function M:UpdateRound() + self._view:GetChild("tex_round1").text = self._room.curren_round + self._view:GetChild("tex_round2").text = self._room.room_config.round +end + +function M:InitPlayerInfoView() + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem,self) + tem.visible = false + end +end + +function M:NewMJPlayerCardInfoView(view,index) + if index == 1 then + return MJPlayerSelfCardInfoView.new(view,self) + end + return MJPlayerCardInfoView.new(view,self) +end + +function M:EventInit() + -- UIPackage.AddPackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong") + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _gcm_outcard_url = UIPackage.GetItemURL("Main_Majiang", "Gcm_OutCard") + local _player_info = self._player_info + local _gamectr = self._gamectr + + + + _gamectr:AddEventListener(TX_GameEvent.SendLaiZi, function(...) + local arg = {...} + self:SetShowLaiZiProcess(arg[1],arg[2],arg[3],arg[4]) + end) + + + + + _gamectr:AddEventListener(TX_GameEvent.SendCards,function( ... ) + -- self:ShowHuTip() + self:UpdateRound() + self._state.selectedIndex = 1 + local list = _room.player_list + for i=1,#list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateHandCard() + end + end) + _gamectr:AddEventListener(TX_GameEvent.EventTurn, function(...) + local arg = {...} + self._left_time = 15 + local seat = arg[1] + self:UpdateCardBox(self:GetPos(seat)) + -- if seat == self._room.self_player.seat then + -- self:ShowHuTip() + -- end + end) + + _gamectr:AddEventListener(TX_GameEvent.OutHint, function(...) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:UpdateHandCard(true) + end) + + local _gcm_outcard_url ="ui://Main_Majiang/Gcm_OutCard" + _gamectr:AddEventListener(TX_GameEvent.OutCard, function(...) + self:__CloseTip() + self._left_time = 0 + local arg = {...} + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:RemoveCursor() + info:UpdateHandCard() + local outcard = UIPackage.CreateObjectFromURL(_gcm_outcard_url) + info:UpdateOutCardList(outcard, card, self._cursor) + self:PlaySound("TuiDaoHu_MJ", p.self_user.sex, tostring(card)) + self:PlayMJSound("chupai.mp3") + if seat == _room.self_player.seat then + _room.curren_outcard_seat = -1 + end + end) + _gamectr:AddEventListener(TX_GameEvent.GetCard, function(...) + self:__CloseTip() + local arg = {...} + local seat = arg[1] + local card = arg[2] + -- self._tex_leftTime.text = arg[3] + self._tex_LeftCard.text = arg[3] + -- self:UpdateRoomInfo() + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateHandCard(true) + end) + + _gamectr:AddEventListener(TX_GameEvent.FZTips, function(...) + local arg = {...} + local _tip = arg[1] + local weight = arg[2] + self:__FangziTip(_tip, weight) + end) + + _gamectr:AddEventListener(TX_GameEvent.FangziAction, handler(self,self.OnFangziAction)) + + _gamectr:AddEventListener(TX_GameEvent.ZPHuCard, function(...) + self._left_time = 0 + self:UpdateCardBox(0) + self:__CloseTip() + self._popEvent = false + local arg = {...} + local win_seat = arg[1] + local lose_seat = arg[2] + local win_card = arg[3] + local cards = arg[4] + local win_list = arg[5] + local index = self:GetPos(win_seat) + local info = self._player_card_info[index] + self:RemoveCursor() + info:UpdateHandCard(true, true) + + local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card") + obj_win_card.icon = "ui://Main_Majiang/202_" .. win_card + obj_win_card:GetController("bg").selectedIndex = 1 + info._view:AddChild(obj_win_card) + obj_win_card:Center() + + local url, pNode + local player = _room:GetPlayerBySeat(win_seat) + if win_seat ~= _room.self_player.seat then + url = "ui://Main_Majiang/别人胡" + pNode = info._mask_liangpai + elseif win_seat == _room.self_player.seat then + url = "ui://Main_Majiang/自己胡牌" + pNode = self._view + end + if win_seat == lose_seat then + url = "ui://Main_Majiang/eff_zimo" + end + + local he = UIPackage.CreateObjectFromURL(url) + pNode:AddChild(he) + he:GetTransition("t2"):Play() + he:Center() + if _room.room_config.people_num==2 then + if win_seat ~= _room.self_player.seat then + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + end + + if win_seat == _room.self_player.seat then + printlog("自己位置=====") + he:Center() + elseif url == "ui://Main_Majiang/eff_zimo" then + printlog("自摸地址==========") + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + + + + --- + local isZiMo=win_seat==lose_seat + DataManager.CurrenRoom.isZiMoHu=isZiMo + local hu_sound = isZiMo and ("zimo"..math.random(1, 3)) or ("hu"..math.random(1, 2)) + printlog("声音====>>>",hu_sound) + self:PlaySound("TuiDaoHu_MJ",player.self_user.sex, hu_sound) + + local pNode = info._view + local url = "eff_list1" + local he_list = UIPackage.CreateObjectFromURL("ui://Extend_MJ_TuiDaoHu/" .. url) + he_list.touchable = false + pNode:AddChild(he_list) + he_list:Center() + + coroutine.start(function() + for i = 1 ,#win_list do + local tem = win_list[i] + if tem.type>0 and tem.type<32 then + local com_name = "he" .. tem.type + local item = he_list:GetChild("list"):AddItemFromPool("ui://Extend_MJ_TuiDaoHu/" .. com_name) + coroutine.wait(0.3) + end + + end + + coroutine.wait(2) + obj_win_card:Dispose() + he:Dispose() + he_list:Dispose() + self._popEvent = true + end) + end) + + _gamectr:AddEventListener(TX_GameEvent.EventNiao, function(...) + local arg = {...} + self._popEvent = false + local list = arg[1] + local start_seat = arg[2] + -- ViewUtil.PlaySound("TuiDaoHu_MJ", "extend/majiang/chaozhou/sound/zhuaniao.mp3") + coroutine.start(self.RunNiao,self,list, start_seat) + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult1, function(...) + self._popEvent = false + self:__CloseTip() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = {...} + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local niao = result.niao + if liuju then + local le = UIPackage.CreateObjectFromURL("ui://Main_Majiang/LiuJu") + self._view:AddChild(le) + le:Center() + le:GetTransition("t0"):Play() + coroutine.start(function() + coroutine.wait(1) + le:Dispose() + end) + end + self:RemoveCursor() + if self._clearingView == nil then + self._clearingView = EXClearingView.new(self._root_view) + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + self._popEvent = true + end) + end + + if _room.curren_round ~= _room.room_config.round then + -- if #niao == 0 then self._view:GetChild("n13").visible = false end + self._clearingView:InitData(0, _room, result, nil, function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:ResetCardType() + if _room:checkHpNonnegative() then + p.cur_hp = data[i].hp_info.cur_hp + end + info:UpdateScore() + info._view:GetChild("zhanji").visible = true + local num = data[i].hp_info.total_hp + if num > 0 then + info._view:GetController("text_color").selectedIndex = 0 + info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + else + info._view:GetController("text_color").selectedIndex = 1 + info._view:GetChild("text_jifen").text = d2ad(num) + end + + info._view:GetChild("mask_piao").title = "" + info._view:GetController("piao_niao").selectedIndex = 0 + p.fz_list = {} + end + DataManager.CurrenRoom.self_player.card_list = {} + self._state.selectedIndex = 2 + self._clearingView = nil + end) + end + self._player_card_info[1]:ShowHuTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult2, function(...) + self:UnmarkSelfTuoguan() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = {...} + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + self._clearingView = EXClearingView.new() + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + end) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiaoTip, function() + self:UpdateRound() + self._tex_LeftCard.text = "0" + self._state.selectedIndex = 1 + self:__PiaoNiaoTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiao, function(...) + local arg = {...} + local seat = arg[1] + local num = arg[2] + if num > 0 then + local head_info = self._player_info[self:GetPos(seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. num + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + if seat == _room.self_player.seat then + if self._com_piao and _room.self_player.entrust then + self._com_piao:Dispose() + self._com_piao = nil + _room.curren_round = _room.curren_round - 1 + end + end + end) +end + +function M:OutCard(card) + if card ~= 0 then + printlog("当前出牌为===>>>"..card) + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card, function() + local info = self._player_card_info[1] + self:RemoveCursor() + info:UpdateHandCard() + + info:UpdateOutCardList(nil, card, self._cursor) + self:PlaySound("TuiDaoHu_MJ", self._room.self_player.self_user.sex,tostring(card)) + self:PlayMJSound("chupai.mp3") + -- self:ShowHuTip() + end) + else + printlog("鬼牌不能出===>>>"..card) + end +end + +function M:__FangziTip(tip, weight) + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject("Main_Majiang", "Gcm_action_tips") + _chipeng_tip:GetController("hide_bg").selectedIndex = 1 + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + -- self._player_card_info[self:GetPos(p.seat)] + + local _lit_fanzi = _chipeng_tip:GetChild("lit_fanzi") + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + + local tip_hu = false + local count = #_tlist + for k=1,#_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + local url = "ui://Main_Majiang/Btn_fztip" + local td_weight = td.weight + if td_weight == 16 then td_weight = 8 end + if td_weight == 8 then url = "ui://Main_Majiang/Btn_hu" end + local btn_t = _lit_fanzi:AddItemFromPool(url) + btn_t.icon = "ui://Main_Majiang/fztip_"..td_weight + btn_t.data = { tip, td } + btn_t.onClick:Add(self.__TipAction,self) + end + + -- if not (tonumber(weight) >= 16) then + local _btn_pass = _lit_fanzi:AddItemFromPool("ui://Main_Majiang/Btn_pass") + -- local _btn_pass = _chipeng_tip:GetChild("btn_pass") + _btn_pass.onClick:Set(function() + if tonumber(weight) >= 8 then + local guo_msg = MsgWindow.new(self._root_view, "确定要点过吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end) + guo_msg:Show() + else + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end) + -- end + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() +end + +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local list = tip.tip_map_type[td.weight] + if (#list > 1) then + self:_ChiView(list, function(id) + _gamectr:SendAction(id) + self:__CloseTip() + end) + self._chipeng_tip.visible = false + return + end + + _gamectr:SendAction(td.id) + if (self._chipeng_tip == nil) then return end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil +end + +function M:_ChiView(tiplist, callback) + self._chipeng_tip.visible = false + local _pop_tip_choice = UIPackage.CreateObject("Main_Majiang", "Pop_tip_choice") + local list_choose = _pop_tip_choice:GetChild("Lst_choose") + local crossCtr = _pop_tip_choice:GetController("state") + crossCtr.selectedIndex = #tiplist == 3 and 0 or 1 + _pop_tip_choice:GetChild("Btn_cross").onClick:Add(function() + _pop_tip_choice:Dispose() + self._chipeng_tip.visible = true + end) + list_choose:RemoveChildrenToPool() + for i = 1, #tiplist do + local item_choose = list_choose:AddItemFromPool() + item_choose:GetController("type").selectedIndex = 0 + for j = 1, 4 do + item_choose:GetChild("card"..j).icon = UIPackage.GetItemURL("Main_Majiang", "202_"..tiplist[i].card) + end + item_choose.onClick:Add(function() + callback(tiplist[i].id) + end) + end + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width)/2, (self._view.height - _pop_tip_choice.height)/2) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:OnFangziAction(...) + self:__CloseTip() + local arg = {...} + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local index = arg[3] + + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject("Extend_MJ_TuiDaoHu", "FzEffect") + if fz.type == FZType.Peng then + self:PlaySound("TuiDaoHu_MJ", player.self_user.sex,"peng"..math.random(1, 3)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "碰框") + else + self:PlaySound("TuiDaoHu_MJ", player.self_user.sex,"gang"..math.random(1, 2)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "杠框") + end + effect.touchable = false + effect:GetTransition("t2"):Play() + pNode:AddChild(effect) + coroutine.start(function() + coroutine.wait(2) + effect:Dispose() + end) + + self:RemoveCursor() + if (player.seat ~= fz.from_seat) then + local fs_info = _player_card_info[self:GetPos(fz.from_seat)] + fs_info:UpdateOutCardList() + end + info:UpdateFzList(fz, index, true) + local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi + info:UpdateHandCard(getcard) + self:__CloseTip() +end + +function M:RunNiao(list, start_seat) + local _room = self._room + --local _niao_View = self._niao_View + self._niao_View = UIPackage.CreateObject("Extend_MJ_TuiDaoHu","Panel_Birds") + self._view:AddChild(self._niao_View) + self._niao_View:Center() + local _niao_View = self._niao_View + local list_niao_card = self._niao_View:GetChild("Lst_birds") + list_niao_card:RemoveChildrenToPool() + for i = 1, #list do + --添加背面的麻將 + local item = list_niao_card:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "202_00") + item:GetChild("tex_score").text = "+" .. list[i].score + end + for i = 1, #list do + --顯示正面 + local item = list_niao_card:GetChildAt(i - 1) + local card = list[i].card + coroutine.wait(0.3) + item:GetTransition("appear"):Play() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_"..card) + if list[i].score > 0 then item:GetController("bg").selectedIndex = 1 end + end + coroutine.start(function() + coroutine.wait(1) + _niao_View:Dispose() + self._popEvent = true + end) +end + +-- function M:markOutCards(showTip, data) +-- for i = 1, #self._room.player_list do +-- local p = self._room.player_list[i] +-- local info = self._player_card_info[self:GetPos(p.seat)] +-- for j = 1, #p.outcard_list do +-- local card = p.outcard_list[j] +-- if card == data then +-- local obj = info:GetOutCardByIndex(j) +-- obj:GetController("gray").selectedIndex = showTip and 1 or 0 +-- end +-- end +-- end +-- end + +function M:__PiaoNiaoTip() + local obj_piao = UIPackage.CreateObject("Main_Majiang", "panel_piao_niao") + self._view:AddChild(obj_piao) + obj_piao.x = (self._view.width - obj_piao.width) * 0.5 + obj_piao.y = self._view.height * 0.6 + for i = 1, 4 do + obj_piao:GetChild("btn_" .. i).onClick:Add(function() + self._gamectr:SendAction(i - 1) + obj_piao:Dispose() + end) + end + self._com_piao = obj_piao +end + +function M:ReloadRoom(bskip) + local room = self._room + -- if not room.playing then + -- self._state.selectedIndex = 2 + -- else + -- self._state.selectedIndex = 1 + -- self._room._reload_flag = true + -- end + + if bskip == nil or bskip == false then + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + self._room._reload_flag = true + end + end + + for i = 1, #room.player_list do + local p = room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + for i = 1, #p.fz_list do + info:UpdateFzList(p.fz_list[i], -1) + end + info:UpdateHandCard() + local head_info = self._player_info[self:GetPos(p.seat)] + head_info:UpdateScore() + head_info._view:GetChild('zhanji').visible = true + local num = p.total_hp or 0 + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(num) + end + + if p.seat == room.last_outcard_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil,card, self._cursor) + elseif p.seat == room.curren_outcard_seat then + info:UpdateHandCard(true) + info:UpdateOutCardList() + else + info:UpdateOutCardList() + end + if p.seat == room.banker_seat then + head_info:MarkBank(true) + end + -- if p.ready then + -- self._player_info[self:GetPos(p.seat)]:Ready(true) + -- end + if bskip == nil or bskip == false then + if p.ready and room.playing == false then + self._player_info[self:GetPos(p.seat)]:Ready(true) + end + end + if p.piao_niao~=nil and p.piao_niao > 0 then + local head_info = self._player_info[self:GetPos(p.seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + end + -- self:ShowHuTip() + + if bskip == nil or bskip == false then + self:UpdateCardBox(self:GetPos(room.curren_outcard_seat)) + self._tex_LeftCard.text = room.left_count + self:UpdateRound() + end +end + +function M:PlayerChangeLineState() + -- local isOutCard = true + -- local str = "玩家 " + -- for _ , player in ipairs(self._room.player_list) do + -- if player.line_state == 0 then + -- isOutCard = false + -- end + -- end + -- self._player_card_info[1]._area_handcard_list.touchable = isOutCard +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:__CloseTip() + if self._chipeng_tip then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if self._pop_tip_choice then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +function M:closeTipOnTuoguan() + self:__CloseTip() +end + +function M:Destroy() + MJMainView.Destroy(self) + UIPackage.RemovePackage("extend/majiang/tuidaohu/ui/Extend_MJ_TuiDaoHu") +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/tuidaohu/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/tuidaohu/EXPlayBackView.lua new file mode 100644 index 00000000..bb3bf1d0 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/tuidaohu/EXPlayBackView.lua @@ -0,0 +1,298 @@ +local MJPlayBackView = require("main.majiang.MJPlayBackView") +local EXRoomConfig = import(".EXRoomConfig") +local EXClearingView = import(".EXClearingView") + +local Record_Event = import(".RecordEvent") + + +local M = {} + +--- Create a new +function M.new() + setmetatable(M,{__index = MJPlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = "PlayBackView" + self:init() + + return self +end + + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/majiang/tuidaohu/ui/Extend_MJ_TuiDaoHu") + MJPlayBackView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num) + local _cardbox = self._view:GetChild("cardbox") + --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false + self._ctr_cardbox = _cardbox:GetController("c1") + self._tex_round = self._view:GetChild("tex_round") + self._tex_LeftCard = self._view:GetChild("remaining_card") + self._anchor = self._view:GetChild("mask_tips") + self._eventmap = {} + + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao + self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao + self._cmdmap[Record_Event.Evt_Result] = self.CmdResult +end + +function M:FillRoomData(data) + MJPlayBackView.FillRoomData(self) + if self._win_pic then self._win_pic:Dispose() end + if self._niao then self._niao:Dispose() end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local left_count = data.info.left_card + self:UpdateLeftCard(left_count) + local round = data.info.round + self:UpdateRound(round) + + local roominfo_panel = self._view:GetChild("roominfo_panel1") + roominfo_panel:GetChild("tex_roomid").text = room.room_id + roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + table.sort(p.card_list, ViewUtil.HandCardSort) + card_info:UpdateHandCard(false, true) + self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0 + end + + self:GenerateAllStepData(data) + self:UpdateStep(1) + -- self:ShowStep(0) +end + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateLeftCard(step.left_card) + -- self._ctr_cardbox.selectedIndex = step.current_out_seat + self:UpdateCardBox(self:GetPos(step.current_out_seat)) + self:UpdateStep(index + 1) + if step.cmd ~= Record_Event.Evt_OutCard then + self:RemoveCursor() + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hand_left_count = #p.card_list + info:Clear() + info:ResetFzList() + p.piao_niao = step.player_card_data[i].piao_niao + local head_info = self._player_info[self:GetPos(i)] + if p.piao_niao and p.piao_niao > 0 then + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + else + head_info._view:GetController("piao_niao").selectedIndex = 0 + end + if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil, nil, self._cursor) + else + info:UpdateOutCardList() + end + if step.cmd == Record_Event.Evt_GetCard and p.seat == step.current_out_seat then + info:UpdateHandCard(true, true) + else + info:UpdateHandCard(false, true) + end + end + if step.cmd == Record_Event.Evt_Win then + self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡") + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + else + if self._win_pic then + self._win_pic:Dispose() + end + end + if step.cmd == Record_Event.Evt_Niao then + local niao_list = step.niao + self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_TuiDaoHu/Panel_Birds") + local list = self._niao:GetChild("Lst_birds") + list:RemoveChildrenToPool() + for i = 1, #niao_list do + local item = list:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_"..niao_list[i].card) + if niao_list[i].score > 0 then + item:GetController("bg").selectedIndex = 2 + end + end + self._view:AddChild(self._niao) + self._view:AddChild(self._view:GetChild("panel_record")) + self._niao:Center() + else + if self._niao then + self._niao:Dispose() + end + end + if step.cmd == Record_Event.Evt_Result then + if not self.result then + self.result = EXClearingView.new(self._root_view, true) + self.result:InitData(0, self._room, step.result_data) + self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5 + self.result._view.width = GRoot.inst.width + self.result._view.height = GRoot.inst.height + self.result._view:GetChild("btn_confirm").visible = false + self._anchor:AddChild(self.result._view) + self.result._view.x = self._anchor.x * -1 + self.result._view.y = self._anchor.y * -1 + else + self.result._view.visible = true + end + -- self.result._view:Center() + else + if self.result then + self.result._view.visible = false + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = "" + step.left_card = info.left_card + step.last_out_seat = 0 + step.current_out_seat = 1 + step.win = 0 + step.niao = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.piao_niao = p.piao_niao + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + table.sort(u.card_list, ViewUtil.HandCardSort) + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = 0 + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + for i = 1, #cmd.data.opcard do + list_remove(u.card_list, cmd.data.opcard[i]) + end + local fz = {} + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.opcard = cmd.data.opcard + local uf = data.player_card_data[cmd.data.from_seat] + if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then + table.remove(uf.outcard_list, #uf.outcard_list) + end + if fz.type ~= FZType.Gang_Peng then + u.fz_list[#u.fz_list + 1] = fz + else + for i = 1, #u.fz_list do + if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then + u.fz_list[i].type = FZType.Gang_Peng + end + end + end +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:CmdNiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.niao = cmd.data.niao +end + +function M:CmdPiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.player_card_data[cmd.seat].piao_niao = cmd.data.num +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result_data = cmd.data +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_deep_clone(last_step) + self._step[#self._step + 1] = step + step.result_data = nil + return step +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = "剩余 "..num.." 张牌" +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:UpdateRound(round) + self._tex_round.text = "第 "..round.."/"..self._room.room_config.round.." 局" +end + +function M:UpdateStep(step) + self._record:GetChild("tex_step").text = "第 " .. step .. " / " .. #self._step .. "步" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/tuidaohu/EXPlayer.lua b/lua_probject/extend_project/extend/majiang/tuidaohu/EXPlayer.lua new file mode 100644 index 00000000..fd26822b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/tuidaohu/EXPlayer.lua @@ -0,0 +1,36 @@ + + +local EXPlayer = { + auto, + -- 手牌列表 + hand_cards = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/tuidaohu/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/majiang/tuidaohu/EXPlayerInfoView.lua new file mode 100644 index 00000000..f8a5fd69 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/tuidaohu/EXPlayerInfoView.lua @@ -0,0 +1,76 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + +function M:init() + PlayerInfoView.init(self) + self._tex_score = self._view:GetChild("info"):GetChild("tex_score1") + self._tex_score2 = self._view:GetChild("info"):GetChild("tex_score2") + self._ct_score = self._view:GetChild("info"):GetController("score") +end + +function M:ShowInteraction(type,str) + if type == 3 then + Voice.DownLoad(str, function(clip) + if (clip ) then + self:ShowMaskVoice(clip.length) + GameApplication.Instance:PlayVoice(clip) + end + end) + elseif type == 4 then + self:SetChat(str) + elseif type == 2 then + local chat_index = tonumber(str) + self._main_view:PlayChatSound(self._player.self_user.sex,chat_index) + local language, index = self._main_view:GetChatMsgLanguage(chat_index) + self:SetChat(self._main_view.Fix_Msg_Chat[index]) + elseif type == 1 then + self:SetBiaoqing("ui://Chat/"..str) + end +end + +function M:UpdateRemainCard(card_num, hide) + if hide then + self._view:GetController("show_remain").selectedIndex = 0 + else + self._view:GetController("show_remain").selectedIndex = 1 + end + self._view:GetChild("com_remain"):GetChild("tex_remain").text = card_num +end + +function M:FillData(player) + PlayerInfoView.FillData(self, player) + self:UpdateScore(player.total_score) +end + +function M:UpdateScore() + local score = self._player.total_score + local room = DataManager.CurrenRoom + if room:checkHpNonnegative() then + score = d2ad(self._player.cur_hp) + end + if not score then + score = 0 + end + if score < 0 then + self._ct_score.selectedIndex = 1 + self._tex_score2.text = score + else + self._ct_score.selectedIndex = 0 + if not room:checkHpNonnegative() then + score = "+" .. score + end + self._tex_score.text = score + end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/tuidaohu/EXRoomConfig.lua b/lua_probject/extend_project/extend/majiang/tuidaohu/EXRoomConfig.lua new file mode 100644 index 00000000..69618737 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/tuidaohu/EXRoomConfig.lua @@ -0,0 +1,544 @@ + + + +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.class = "RoomConfig" + self.round = config["times"] + self.Qidui = config["qidui"] + self.QiangGang = config["qiangkong"] + self.QiangGangNiao = config["qiangkong_niao"] + self.Zhama = config["niao_opt"] + local isOpenLaizi8=false + if config["laizi"]==3 then + isOpenLaizi8=true + end + self.Laizi = isOpenLaizi8 --是否是8个赖子 + self.LaiziType=config["laizi"] + self.NiaoType = config["niao"] + --self.Zhamatype= config["niao_opt"] + self.piao_niao = config["piao_niao"] + self.Jiangma = config["jiangma"] + self.isHidden = config.isHidden + + self.Qanggangquanbao=config["qianggang_type"] + self.Gangbaoquanbao=config["gangbao_type"] + self.Minggangkeqiang=config["qiangkong_ming"] + self.geng_zhuan=config["geng_zhuan"] + self.jiejiegao=config["jiejiegao"] + self.jiejiegao_first=config["jiejiegao_first"] + self.wuguijiabei=config["wuguijiabei"] + self.no_wan=config["no_wan"] + self.ma_gen_di_fen=config["ma_gen_di_fen"] + self.ma_gen_gong=config["ma_gen_gong"] + self.qidui_jiafan=config["qidui_jiafan"] + + return self +end + +function M:GetDes(sp) + sp = sp or " " + local count=0 + local str = self.round and self.round .. "局" .. " " or "" + str = str .. RoomConfig.GetDes(self, sp).."\n" + + + if (self.QiangGang) then + str = str .. "可抢杠胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if (self.Qidui) then + local strL=2 + str = str .."可胡七对" + if self.qidui_jiafan then + str = str .."翻倍" + strL=0 + end + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.Qanggangquanbao then + str = str .."抢杠全包" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.Gangbaoquanbao then + str = str .."杠爆全包" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.Minggangkeqiang then + str = str .."明杠可抢" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.geng_zhuan then + str = str .."跟庄" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.jiejiegao then + str = str .."节节高" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.jiejiegao_first then + str = str .."首局不累加" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.wuguijiabei then + str = str .."无鬼加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.no_wan then + str = str .."不带万字牌" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if (self.LaiziType==3) then + str = str .. "翻双鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.LaiziType==1 then + str = str .. "白板做鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.LaiziType==2 then + str = str .. "翻鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str .. "无鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.NiaoType==0 then + str = str .. "无马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.NiaoType==1 then + if self.Zhama==1 then + str = str .. "买二马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.Zhama==2 then + str = str .. "买四马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.Zhama==3 then + str = str .. "买六马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.Zhama==4 then + str = str .. "买八马" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + elseif self.NiaoType==2 then + local strMB="爆炸马加分" + if self.Zhama==1 then + strMB="爆炸马加倍" + end + str = str .. strMB + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.ma_gen_di_fen then + str = str .."马跟底分" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.ma_gen_gong then + str = str .."马跟杠" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + + +function M:GetDes2(sp) + sp = sp or " " + local str = RoomConfig.GetDes(self, sp) + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + + + if (self.QiangGang) then + str = str .. "可抢杠胡" + str = str .. sp + --if (self.QiangGangNiao) then + --str = str .. "抢杠胡奖码" + --str = str .. sp + --end + end + + if (self.Qidui) then + str = str .."可胡七对" + if self.qidui_jiafan then + str = str .."-翻倍" + end + str = str .. sp + end + + if self.Qanggangquanbao then + str = str .."抢杠全包" + str = str .. sp + end + + if self.Gangbaoquanbao then + str = str .."杠爆全包" + str = str .. sp + end + + if self.Minggangkeqiang then + str = str .."明杠可抢" + str = str .. sp + end + + if self.geng_zhuan then + str = str .."跟庄" + str = str .. sp + end + + if self.jiejiegao then + str = str .."节节高" + str = str .. sp + end + + if self.jiejiegao_first then + str = str .."首局不累加" + str = str .. sp + end + + if self.wuguijiabei then + str = str .."无鬼加倍" + str = str .. sp + end + + if self.no_wan then + str = str .."不带万字牌" + str = str .. sp + end + + + if (self.LaiziType==3) then + str = str .. "翻双鬼" + str = str .. sp + elseif self.LaiziType==1 then + str = str .. "白板做鬼" + str = str .. sp + elseif self.LaiziType==2 then + str = str .. "翻鬼" + str = str .. sp + else + str = str .. "无鬼" + str = str .. sp + end + + if self.NiaoType==0 then + str = str .. "无马" + str = str .. sp + elseif self.NiaoType==1 then + if self.Zhama==1 then + str = str .. "买2马" + str = str .. sp + elseif self.Zhama==2 then + str = str .. "买4马" + str = str .. sp + elseif self.Zhama==3 then + str = str .. "买6马" + str = str .. sp + elseif self.Zhama==4 then + str = str .. "买8马" + str = str .. sp + end + elseif self.NiaoType==2 then + local strMB="爆炸马加分" + if self.Zhama==1 then + strMB="爆炸马加倍" + end + str = str .. strMB + str = str .. sp + end + + if self.ma_gen_di_fen then + str = str .."马跟底分" + str = str .. sp + end + + if self.ma_gen_gong then + str = str .."马跟杠" + str = str .. sp + end + + + + --if (self.piao_niao) then + -- str = str .. "飘鸟" .. sp + --end + + --[[if (self.NiaoType) then + if self.NiaoType == 1 then + str = str .. string.format("扎%d码", self.Zhama * 2) + elseif self.NiaoType == 2 then + str = str .. "一码全中" + elseif self.NiaoType == 3 then + str = str .. "窝窝鸟" .. sp .. (self.Zhama == 1 and "1鸟2分" or "1鸟1分") + end + str = str .. sp + + -- if self.NiaoType ~= 2 and self.Jiangma > 0 then + -- str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp + -- end + if self.Jiangma > 0 then + str = str .. "没有红中奖" .. self.Jiangma .. "码" .. sp + end + end--]] + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_MJ_TuiDaoHu/gamerule") + return gamerulepanel +end + + +function M:GetGameSMSize() + return 467,500 +end + + +function M:GetGameName() + return "推倒胡" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/tuidaohu/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/tuidaohu/ExtendConfig.lua new file mode 100644 index 00000000..47525ce9 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/tuidaohu/ExtendConfig.lua @@ -0,0 +1,189 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import(".EXGameInfo") +local EXMainView = import(".EXMainView") +local EXGameController = import(".EXGameController") +local EXRoomConfig = import(".EXRoomConfig") +local EXPlayBackView =import(".EXPlayBackView") +local MJRoom = require("main.majiang.MJRoom") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = "ExtendConfig" + self.extend_id = 22 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/majiang/tuidaohu/ui/Info_MJ_TuiDaoHu") + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage("extend/majiang/tuidaohu/ui/Extend_MJ_TuiDaoHu") + ResourcesManager.UnLoadGroup("TuiDaoHu_MJ") +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return MJRoom.new() +end + +function M:FillRoomConfig(room,_config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + + + local reload = s2croom["reload"] + local _tableInfo = s2croom["tableInfo"] + printlog("初始化房间数据====>>>") + pt(_tableInfo) + printlog(_tableInfo.laiziCard) + printlog(_tableInfo.laiziCard2) + printlog(_tableInfo.laiziCardBefore) + printlog(_tableInfo.laiziCard2Before) + + room.laiziInfo={} + if _tableInfo.laiziCardBefore>0 then + table.insert(room.laiziInfo,_tableInfo.laiziCard) + if _tableInfo.laiziCard2>0 then + table.insert(room.laiziInfo,_tableInfo.laiziCard2) + end + room.beforelaiziCardId=_tableInfo.laiziCardBefore + else + room.laiziInfo=nil + end + + local _config = _tableInfo["config"] + pt(_config) + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo["playerData"] + room.curren_round = _tableInfo["round"] + self:FillPlayerData(playerList) + + if (reload) then + local _reloadInfo = s2croom["reloadInfo"] + local _hand_card = _reloadInfo["hand_card"] + room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + + local active_seat = _reloadInfo["active_seat"] + local bank_seat = _reloadInfo["banker_seat"] + local playing = _reloadInfo["playing"] + local _info_list = _reloadInfo["info_list"] + local last_outcard_seat = _reloadInfo["last_outcard_seat"] + room.left_count = _reloadInfo["left_card"] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo["curren_outcard_seat"] + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i=1,#_info_list do + local tem = _info_list[i] + local playerid = tem["playerid"] + local p = room:GetPlayerById(playerid) + local outcard_list = tem["outcard_list"] + p.outcard_list = outcard_list + p.total_score = tem["score"] + p.hand_left_count = tem["card_count"] + p.piao_niao = tem["piao_niao"] or 0 + local opcard = tem["opcard"] + for k=1,#opcard do + local op = opcard[k] + local fz = {} + fz.type = op["type"] + fz.card = op["card"] + p.fz_list[#p.fz_list+1] = fz + end + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.left_count = _tableInfo["left_card"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + + local _info_list = _tableInfo["playerData"] + for i = 1,#_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + p.piao_niao = _jp["piao_niao"] + -- print(DataManager.SelfUser.account_id,pid) + -- if (278 == pid) then + -- room.self_player = p + -- p.self_user = DataManager.SelfUser + -- else + if p.seat == 1 then room.self_player = p end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.card_list = _hand_card + --room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + p.total_score = _jp["score"] + p.hand_left_count = #_hand_card + if _jp.hp_info then + room.room_config.isNonnegative = 1 + p.cur_hp = _jp.hp_info.cur_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/tuidaohu/GameEvent.lua b/lua_probject/extend_project/extend/majiang/tuidaohu/GameEvent.lua new file mode 100644 index 00000000..ee0f2d34 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/tuidaohu/GameEvent.lua @@ -0,0 +1,34 @@ + +local TX_GameEvent = { + -- 发牌 + SendCards = "SendCards", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + EventNiao = "EventNiao", + + EvnetPiaoTip = "EvnetPiaoTip", + + EvnetPiao = "EvnetPiao", + + + --- + SendLaiZi="SendLaiZi" +} +return TX_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/tuidaohu/MJPlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/majiang/tuidaohu/MJPlayerSelfCardInfoView.lua new file mode 100644 index 00000000..51ef5dd2 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/tuidaohu/MJPlayerSelfCardInfoView.lua @@ -0,0 +1,212 @@ +local MJPlayerSelfCardInfoView = require("main.majiang.MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local CardCheck = import(".CardCheck") + +local M = {} +-- +function M.new(view,mainView) + setmetatable(MJPlayerSelfCardInfoView, {__index = MJPlayerCardInfoView}) + setmetatable(M, {__index = MJPlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:ShowHuTip(card_list) + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + if DataManager.CurrenRoom.laiziInfo and #DataManager.CurrenRoom.laiziInfo>0 then + for i=1,#DataManager.CurrenRoom.laiziInfo do + if IsHasDictionary(DataManager.CurrenRoom.laiziInfo[i],tingList)==false then + table.insert(tingList,DataManager.CurrenRoom.laiziInfo[i] ) + end + end + end + + end + self._mainView._hu_tip:FillData(tingList) +end + +function M:UpdateHandCard(getcard, mp) + MJPlayerSelfCardInfoView.UpdateHandCard(self, getcard, mp) + local _carViewList = self._carViewList + + if DataManager.CurrenRoom.laiziInfo and #self._carViewList>0 then + for i=1,#self._carViewList do + local obj=self._carViewList[i] + if obj and obj.card then + if IsHasDictionary(obj.card_item,DataManager.CurrenRoom.laiziInfo) then + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=1 + end + + end + else + if obj.card.GetController then + if obj.card:GetController("laizi") then + obj.card:GetController("laizi").selectedIndex=0 + end + end + end + + end + end + + + end + + + local card_list = DataManager.CurrenRoom.self_player.card_list + self:ShowHuTip(card_list) + if getcard then + self._out_card = true + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + -- 记录需要标记听牌提示的牌 + local lst_mark = {} + local total_num = 0 + for i = 1, #_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + list_remove(card_list, card) + local tingList = CardCheck.MuiltiplteCaculateTingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + local count = 0 + for j = 1, #tingList do + count = count + self._mainView:CountCardLeftNum(tingList[j]) + end + local tem = {} + tem.item = btn + tem.count = count + total_num = total_num + count + table.insert(lst_mark, tem) + end + table.insert(card_list, card) + end + table.sort(lst_mark, function(a, b) + return a.count > b.count + end) + -- 如果几张牌的可胡牌数一致,也只显示'三角',可胡牌数不一致才显示'多' + local all_same = #lst_mark ~= 0 and lst_mark[1].count == total_num / #lst_mark or false + for i = 1, #lst_mark do + local tem = lst_mark[i] + if all_same or tem.count < lst_mark[1].count then + tem.item:GetController("mark_ting").selectedIndex = 1 + else + tem.item:GetController("mark_ting").selectedIndex = 2 + end + end + else + for i = 1, #_carViewList do + local btn = _carViewList[i].card + if btn:GetController("mark_ting").selectedIndex ~= 0 then + btn:GetController("mark_ting").selectedIndex = 0 + end + end + self._out_card = false + end + +end + +function M:__OnClickHandCard(context) + local button = context.sender + local _carViewList = self._carViewList + local refresh = true + local card_list = {} + for i=1,#_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + if btn ~= button and btn.selected == true then + if button.data.card_item == card then + refresh = false + else + self._mainView:markOutCards(false, card) + end + btn.selected = false + end + if not btn.selected then + table.insert(card_list, card) + end + end + + if self._out_card then + self:ShowHuTip(card_list) + end + + -- 标记出牌 + if refresh then + if button.selected then + self._mainView:markOutCards(true, button.data.card_item) + else + self._mainView:markOutCards(false, button.data.card_item) + end + end + + local _room = DataManager.CurrenRoom + if not button.selected and _room.curren_outcard_seat == _room.self_player.seat then + local card = button.data + self._mainView:OutCard(card.card_item) + end +end + +function M:__OnDragStart(card) + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + list_remove(card_list, card) + self:ShowHuTip(card_list) +end + +function M:__OnDragEnd(context) + if self.outcard_button then + self.outcard_button:Dispose() + self.outcard_button = nil + end + local button = context.sender + + --button:RemoveFromParent() + local card = button.data + local _room = DataManager.CurrenRoom + + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + if (button.y - card.old_postion.y < -50 and _room.curren_outcard_seat == _room.self_player.seat and card.card_item ~= 0) then + self._mainView:OutCard(card.card_item) + button.touchable = false + self.outcard_button = button + else + self._area_handcard_list:AddChildAt(button, card.index) + button:TweenMove(card.old_postion, 0.2) + end +end + +function M:CheckPlayerOnlineState() + local room = DataManager.CurrenRoom + for i = 1, #room.player_list do + if room.player_list[i].line_state == 0 then + return false + end + end + return true +end +function M:Clear(bskip) + --self._ctr_state.selectedIndex = 0 + self._area_fz_list.x = self._src_fz_list.x + self._area_fz_list.y = self._src_fz_list.y + self._area_fz_list.width = self._src_fz_list.z + self._area_fz_list.height = self._src_fz_list.w + + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_outcard_list:RemoveChildren(0, -1, true) + if bskip == nil or bskip == false then + self._mask_liangpai:RemoveChildren(0, -1, true) + end + + for i=1,#self._carViewList do + self._carViewList[i].card:Dispose() + end + self._carViewList = {} + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/tuidaohu/Protocol.lua b/lua_probject/extend_project/extend/majiang/tuidaohu/Protocol.lua new file mode 100644 index 00000000..4c9b875b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/tuidaohu/Protocol.lua @@ -0,0 +1,48 @@ +local Protocol = { + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌 + GAME_DIS_CARD = "611", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- 提示选择行为 + GAME_ACTION = "612", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 小结算 + GAME_EVT_RESULT1 = "817", + + -- 大结算 + GAME_EVT_RESULT2 = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + + -- 抓鸟事件 + GAME_EVT_NIAO = "821", + + -- 飘鸟提示 + GAME_EVT_PIAOTIP = "833", + + -- 飘鸟事件 + GAME_EVT_PIAO = "834", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/tuidaohu/RecordEvent.lua b/lua_probject/extend_project/extend/majiang/tuidaohu/RecordEvent.lua new file mode 100644 index 00000000..09748550 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/tuidaohu/RecordEvent.lua @@ -0,0 +1,11 @@ +local Record_Event = { + Evt_GetCard = "GetCard", + Evt_OutCard = "OutCard", + Evt_Action = "Action", + Evt_Win = "Win", + Evt_Niao = "Niao", + Evt_Piao = "PiaoNiao", + Evt_Result = "Result", +} + +return Record_Event \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/zhuanzhuan/CardCheck.lua b/lua_probject/extend_project/extend/majiang/zhuanzhuan/CardCheck.lua new file mode 100644 index 00000000..c22ab3a8 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/zhuanzhuan/CardCheck.lua @@ -0,0 +1,333 @@ +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + num = num == nil and 1 or num + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if(result ==num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local zhongid = 412 + + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + zhong_count = 0, + qidui = false, + hongzhong_count = 0, + qidui_pari_count = 0 +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + if (card == zhongid) then + self.zhong_count = self.zhong_count +1 + else + self.cardList[#self.cardList + 1] = card + end + end + table.sort(self.cardList) +end + +function M:tryShunzi(card) + if (card < 400 and card % 100 > 7) then + return false + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryKezi(card) + if (checkCardAndRomve(card, self.cardList, 3)) then + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (checkCardAndRomve(card, self.cardList, 2)) then + local cardGroup = {card,card} + self:push(cardGroup) + self.pair_count = 1 + return true + end + return false +end + + +function M:tryKezi1Zhong(card) + if (self.zhong_count >= 1 and checkCardAndRomve(card, self.cardList,2)) then + local cardGroup = {card,card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + return true + end + return false +end + +function M:tryKezi2Zhong(card) + if (self.zhong_count >= 2 and checkCardAndRomve(card, self.cardList,1)) then + local cardGroup = {card,zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + return true + end + return false +end + +function M:tryShunzi1Zhong(card) + if (card % 100 > 8) then + return false + end + + if (self.zhong_count < 1) then + return false + end + + if (checkCard(card + 1, self.cardList)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 1, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,card+1,zhongid} + self:push(cardGroup) + return true + end + + if (checkCard(card + 2, self.cardList) and ((card + 1) % 100 ~= 0)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 2, 1) + self.zhong_count = self.zhong_count -1 + local cardGroup = {card,zhongid,card+2} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair1Zhong(card) + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 1) then + return false + end + removeCard(self.cardList, card, 1) + local cardGroup = {card,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -1 + self.pair_count = 1 + return true +end + +function M:tryPair2Zhong() + if (self.pair_count > 0) then + return false + end + if (self.zhong_count < 2) then + return false + end + local cardGroup = {zhongid,zhongid} + self:push(cardGroup) + self.zhong_count = self.zhong_count -2 + self.pair_count = 1 + return true +end + +function M:tryWin() + if (self.zhong_count == 4 and not self.eight_laizi) or (self.zhong_count == 8 and self.eight_laizi) then + return true + end + if (#self.cardList == 0 and self.pair_count == 1) then + return true + end + if (#self.cardList == 0 and self.pair_count == 0) then + return self:tryPair2Zhong() + end + + if (#self.cardList == 0) then + return false + end + + local activeCard = self.cardList[1] + if (self:tryPair(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + + if (self:tryKezi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryKezi2Zhong(activeCard)) then + + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryShunzi1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self:rollBack() + end + + if (self:tryPair1Zhong(activeCard)) then + if (self:tryWin()) then + return true + end + self.pair_count = 0 + self:rollBack() + end + return false +end + +function M:checkQidui() + if (not self.qidui) then + return false + end + if ((#self.cardList + self.zhong_count) ~= 14) then + return false + end + local cardList = membe_clone(self.cardList) + self.qidui_pari_count = 0 + self.hongzhong_count = self.zhong_count + return self:isQdPari(cardList) +end + +function M:isQdPari(cardList) + if(self.qidui_pari_count == 7) then + return true + end + if (#cardList== 0) then + return true + end + local card = cardList[1] + if (cardNum(card, cardList) >= 2) then + removeCard(cardList, card, 2) + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + + if (self.hongzhong_count > 0) then + removeCard(cardList, card, 1) + self.hongzhong_count = self.hongzhong_count - 1 + self.qidui_pari_count = self.qidui_pari_count +1 + if (self:isQdPari(cardList)) then + return true + end + end + return false +end + +local function init(self,cardInhand,addCard,isZhong,qidui,eightLaizi) + self.stack = {} + self.pair_count = 0 + self.cardList = membe_clone(cardInhand) + self.qidui = qidui + self.eight_laizi = eightLaizi + self.cardList[#self.cardList+1] = addCard + if (isZhong) then + self.zhong_count = cardNum(zhongid, self.cardList) + removeCard(self.cardList, zhongid, self.zhong_count) + end + table.sort(self.cardList) + return self:checkQidui() or self:tryWin() +end + +function M.tingPai(cardInhand,isZhong,qidui,eightLaizi) + local self = setmetatable({}, {__index = M}) + local tingList = {} + if not cardInhand or #cardInhand == 0 then + return tingList + end + for k=100,300,100 do + for i=1,9 do + local tem = k + i + local result = init(self,cardInhand,tem,isZhong,qidui,eightLaizi) + if(result) then + tingList[#tingList + 1] = tem + end + end + end + return tingList +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXClearingView.lua b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXClearingView.lua new file mode 100644 index 00000000..11b25aa3 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXClearingView.lua @@ -0,0 +1,316 @@ +require("Game.View.ResultView") + +local EXClearingView = {} + +local M = EXClearingView + +function EXClearingView.new(blur_view) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self._full = true + ResultView.init(self, "ui://Main_Majiang/clearing") + + self._currenIndex = 0 + self._blur_view = blur_view + self._close_zone = false + self.xiPaiCtr=self._view:GetController("xipai") + + + return self +end + +function M:InitData(over, room, result, total_result, callback) + self._callback = callback + local _overCtr = self._view:GetController("over") + local btn_confirm = self._view:GetChild("btn_confirm") + local btn_result = self._view:GetChild("btn_showResult") + local btn_close = self._view:GetChild("big_result"):GetChild("btn_close") + local _btnCtr = self._view:GetController("button") + local _sdkCtr = self._view:GetController("sdk") + local ctr_type = self._view:GetController("type") + self._view:GetChild("tex_roominfo").text = string.format("房号%s 局%s/%s %s", room.room_id, room.curren_round, room.room_config.round, os.date("%Y-%m-%d %H:%M:%S", os.time())) + self._view:GetChild("tex_gameinfo").text = string.gsub(room.room_config:GetDes(), "\r", "") + + local paixingxiangqing=self._view:GetChild("btn_detal") + paixingxiangqing.visible=false + + local fanhuipaixing=self._view:GetChild("btn_fanhuipaixing") + fanhuipaixing.visible=false + + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig then + self.xiPaiCtr.selectedIndex=1 + else + self.xiPaiCtr.selectedIndex=0 + end + + if over ~= 2 then + local xipai=self._view:GetChild("btn_xipai") + xipai.touchable=true + xipai.onClick:Add(function() + local xiPaiCallBack=function () + xipai.touchable=false + self.xiPaiCtr.selectedIndex=0 + ViewUtil.ErrorTip(1000000,"申请洗牌成功") + end + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendXiPaiAction(xiPaiCallBack) + end) + if result and result.xipai_score then + xipai.text="洗牌 积分x"..result.xipai_score + end + + if result.liuju then + ctr_type.selectedIndex = 3 + else + local info_list = result.info_list + for i = 1, #info_list do + local is_win = info_list[i].is_win + if is_win then + if info_list[i].seat == room.self_player.seat then + ctr_type.selectedIndex = 1 + else + ctr_type.selectedIndex = 2 + end + end + end + end + if over == 0 then + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + btn_confirm.onClick:Add(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:DestroyWithCallback() + end) + self:AddClearItem(room, result.info_list, nil, over, result.niao, result.active_player) + elseif over == 1 then + self.xiPaiCtr.selectedIndex=0 + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add(function() + _overCtr.selectedIndex = 1 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + if self._qsinfo_view then + self._qsinfo_view:Dispose() + end + end) + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + self:AddClearItem(room, result.info_list, total_result.info_list, over, result.niao, result.active_player) + end + else + _overCtr.selectedIndex = 1 + self.xiPaiCtr.selectedIndex=0 + btn_close.onClick:Add(function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + self:AddClearItem(room, nil, total_result.info_list, over) + end +end + +function M:AddClearItem(room, data, total_data,over, niao, active_player) + local n = over + 1 + local list_view1 = self._view:GetChild("player_list_1") + local list_view2 = self._view:GetChild("player_list_2") + if 0 == over or 1 == over then + table.sort(data, function(a,b) return a.seat > b.seat end) + list_view1:RemoveChildrenToPool() + for i=1,#data do + local item = list_view1:AddItemFromPool() + self:FillItemData(room, data[i], item, active_player, niao) + end + if #data == 3 then + list_view1.lineGap = 54 + elseif #data == 2 then + list_view1.lineGap = 108 + end + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end +end + +function M:FillItemData(room, data, item, active_player, niao) + local _gamectr = ControllerManager.GetController(GameController) + local p = room:GetPlayerBySeat(data["seat"]) + item:GetChild("playerName").text = p.self_user.nick_name + + -- 手牌 + local hand_cards = data["hand_card"] + table.sort( hand_cards, ViewUtil.HandCardSort) + local hand_list_view = item:GetChild("hand_card_list") + hand_list_view:RemoveChildrenToPool() + for i=1,#hand_cards do + local card = hand_list_view:AddItemFromPool() + card.icon = "ui://Main_Majiang/202_"..hand_cards[i] + end + hand_list_view.width = 52 * #hand_cards + + local fz_card = p.fz_list + local fz_card_list = item:GetChild("fz_card_list") + fz_card_list.width = 157 * #fz_card * 0.8 + fz_card_list:RemoveChildrenToPool() + for i=1,#fz_card do + if fz_card[i].type == FZType.Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_3") + for j=1,3 do + local card = item:GetChild("card_" .. j) + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + elseif fz_card[i].type == FZType.Gang or fz_card[i].type == FZType.Gang_An or fz_card[i].type == FZType.Gang_Peng then + local item = fz_card_list:AddItemFromPool("ui://Main_Majiang/clearing_fz_4") + for j=1,4 do + local card = item:GetChild("card_" .. j) + if fz_card[i].type == FZType.Gang_An and j == 4 then + card.icon = "ui://Main_Majiang/202_00" + else + card.icon = "ui://Main_Majiang/202_"..fz_card[i].card + end + end + end + end + + local huadd = data["hu_score"] + local gangadd = data["gang_score"] + local birdadd = data["niao_score"] + local total = data["round_score"] + local sp = " " + local str = "胡:"..huadd.."分" + str = str..sp.."杠:"..gangadd.."分" + str = str..sp.."扎鸟:"..birdadd.."分" + if data["piao_niao_score"] then + str = str..sp.."飘鸟:"..data["piao_niao_score"].."分" + end + item:GetChild("score1").text = str + -- local total_score = data["total_score"] + if total >= 0 then + item:GetChild("score2").text = "+"..total + item:GetChild("score2").grayed = false + else + item:GetChild("score2").text = total + item:GetChild("score2").grayed = true + end + + local hp_nonnegative = room:checkHpNonnegative() + item:GetController("nonnegative").selectedIndex = hp_nonnegative and 1 or 0 + if hp_nonnegative then + local hp_info = data.hp_info + local ctr_hp_limit = item:GetController("hp_limit") + local hp = d2ad(hp_info.round_actual_hp) + if hp >= 0 then hp = "+" .. tostring(hp) end + item:GetChild("tex_hp").text = hp + ctr_hp_limit.selectedIndex = hp_info.upper_limit and 1 or 0 + end + + local is_win = data["is_win"] or false + item:GetController("win").selectedIndex = is_win and 0 or 1 + if p.self_user.account_id == active_player and is_win == false and total < 0 then + item:GetController("win").selectedIndex = 2 + end + local win_card = item:GetChild("win_card") + if is_win then + win_card.icon = "ui://Main_Majiang/202_"..data["win_card"] + local lst_niao = item:GetChild("list_niao") + lst_niao:RemoveChildrenToPool() + for i = 1, #niao do + if niao[i].score > 0 then + local card_niao = lst_niao:AddItemFromPool() + card_niao.icon = "ui://Main_Majiang/202_" .. niao[i].card + end + end + end + if p.seat == room.banker_seat then + item:GetController("bank").selectedIndex = 1 + end +end + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + player_list[i].id = user.account_id + player_list[i].hp_info = data[i].hp_info + player_list[i].score = data[i].total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + + local settle_log = data[i].settle_log + player_list[i].param = {} + player_list[i].param[1]={} + player_list[i].param[1].key = "自摸次数:" + player_list[i].param[1].value = tostring(data[i].settle_log.zimo) + player_list[i].param[2]={} + player_list[i].param[2].key = "接炮次数:" + player_list[i].param[2].value = tostring(data[i].settle_log.jie_pao) + player_list[i].param[3]={} + player_list[i].param[3].key = "点炮次数:" + player_list[i].param[3].value = tostring(data[i].settle_log.dian_pao) + player_list[i].param[4]={} + player_list[i].param[4].key = "暗杠次数:" + player_list[i].param[4].value = tostring(data[i].settle_log.an_kong) + player_list[i].param[5]={} + player_list[i].param[5].key = "明杠次数:" + player_list[i].param[5].value = tostring(data[i].settle_log.ming_kong) + end + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + local big_result = self._view:GetChild("big_result") + big_result:GetChild("txt_room_info").text = string.format("%s 房号%s 局%s/%s", os.date("%Y/%m/%d", os.time()), room.room_id, room.curren_round, room.room_config.round) + local lst_p = big_result:GetChild("player_list") + if #player_list == 3 then + lst_p.columnGap = 108 + elseif #player_list == 2 then + lst_p.columnGap = 208 + end + self:InitBigResult(room, 30) + local show_detail = room.hpOnOff == 1 + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + if show_detail then + local score = 0 + if com_p:GetController("pn").selectedIndex == 0 then + score = com_p:GetChild("txt_navigate").text + else + score = com_p:GetChild("txt_positive").text + end + score = score / room.score_times + com_p:GetChild("tex_detail_score").text = string.format("%s × %s倍", score, room.score_times) + end + end + if room.group_id ~= 0 then + big_result:GetController("group").selectedIndex = 1 + end + DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild("btn_head") + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= "" then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end + +function M:DestroyWithCallback() + if self._callback then + self._callback() + end + self:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXGameController.lua b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXGameController.lua new file mode 100644 index 00000000..a2de4c84 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXGameController.lua @@ -0,0 +1,391 @@ +local TX_Protocol = import(".Protocol") +local FZTipList = require("main.majiang.FZData") +local TX_GameEvent = import(".GameEvent") + +local M = {} + +--- Create a new GameController +function M.new() + setmetatable(M,{__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("测试麻将") + self.class = "TX_GameController" + return self +end + +function M:init(name) + GameController.init(self,name) + + self._eventmap[TX_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[TX_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[TX_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[TX_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[TX_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[TX_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + self._eventmap[TX_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[TX_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[TX_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[TX_Protocol.GAME_EVT_RESULT2] = self.OnEventResult2 + self._eventmap[TX_Protocol.GAME_EVT_NIAO] = self.OnEventNiao + self._eventmap[TX_Protocol.GAME_EVT_PIAOTIP] = self.OnEventPiaoTip + self._eventmap[TX_Protocol.GAME_EVT_PIAO] = self.OnEventPiao + self._eventmap[TX_Protocol.GAME_EVENT_XIPAI] = self.OnEventXiPai + self._eventmap[TX_Protocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim + +end + + +function M:SendXiPaiAction(callBack) + local _data = {} + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_XIPAI, _data) + self.XiPaiCallBack=callBack +end + +function M:OnEventXiPai(evt_data) + printlog("jefe OnEventXiPai ") + if evt_data["result"]==0 then + if self.XiPaiCallBack then + self.XiPaiCallBack() + end + else + ViewUtil.ErrorTip(1000000,"申请洗牌失败") + end + +end + +function M:OnEventXiPaiAnim(evt_data) + printlog("洗牌动画===》》》》") + pt(evt_data) + local playeridList = evt_data["list"] + local my_isXiPai=false + local other_isXiPai=false + if playeridList and #playeridList>0 then + for i=1,#playeridList do + local p = self._room:GetPlayerById(playeridList[i]) + if p== self._room.self_player then + my_isXiPai=true + else + other_isXiPai=true + end + end + end + + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EventXiPai,my_isXiPai,other_isXiPai) + end) +end + + +local __pre_delete_card = false +-- 发送出牌指令到服务器 +function M:SendOutCard(card, callback) + local _room = self._room + local p = _room.self_player + + local _data = {} + _data["card"] = card + _data["card_list"] = p.card_list + if p.outcard_list and #p.outcard_list>0 then + _data["outcard_list"] = p.outcard_list + end + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_DIS_CARD, _data) + + -- 进行预删牌处理 + --local p = _room.self_player + _room.curren_outcard_seat = -1 + list_remove(p.card_list,card) + table.sort(p.card_list, ViewUtil.HandCardSort) + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + __pre_delete_card = true + callback() +end + + +-- 发送放子选择到服务器 +function M:SendAction(id) + local _data = {} + _data["id"] = id + local _client = ControllerManager.GameNetClinet + _client:send(TX_Protocol.GAME_ACTION, _data) +end + +function M:OnEventSendCards(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + if not _room.room_config.piao_niao or _room.self_player.entrust then + _room.curren_round = _room.curren_round + 1 + end + if _room.curren_round > 0 then _room.playing = true end + + -- _room.SelfPlayer.AutoOutCard = false + local handcards = evt_data["card_list"] + local p = _room.self_player + local seat = evt_data["bank_seat"] + self._cacheEvent:Enqueue(function() + _room.banker_seat = seat + for i=1,#_room.player_list do + _room.player_list[i].hand_left_count = 13 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + end + p.card_list = handcards + self._room.self_player.hand_left_count = #handcards + table.sort( handcards, ViewUtil.HandCardSort ) + DispatchEvent(self._dispatcher,TX_GameEvent.SendCards, p) + end) +end + +function M:OnEventOutCard(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local ting_list = nil + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + _room.last_outcard_seat = seat + if seat == _room.self_player.seat and __pre_delete_card then + __pre_delete_card = false + else + if seat == _room.self_player.seat then + list_remove(p.card_list, card) + table.sort(p.card_list, ViewUtil.HandCardSort) + end + p.hand_left_count = p.hand_left_count - 1 + if not p.outcard_list then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + DispatchEvent(self._dispatcher,TX_GameEvent.OutCard, p, card) + end + end) +end + + +function M:OnEventTakeCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + p.hand_left_count = p.hand_left_count +1 + if (seat == _room.self_player.seat) then + _room.self_player.card_list[#_room.self_player.card_list+1] = card + -- table.sort( _room.self_player.card_list, ViewUtil.HandCardSort ) + end + DispatchEvent(self._dispatcher,TX_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnEventOutHint(evt_data) + self._cacheEvent:Enqueue(function() + self._room.curren_outcard_seat = self._room.self_player.seat + DispatchEvent(self._dispatcher,TX_GameEvent.OutHint) + end) +end + +function M:OnEventTurn(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + -- self._room.curren_outcard_seat = seat + DispatchEvent(self._dispatcher,TX_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + local weight = evt_data["weight"] + for i=1,#list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + -- if (dtip["opcard"]) then + -- local opcard = dtip["opcard"] + -- tip.OpCard = opcard + -- tip.OpCard[3] = tip.Card + -- table.sort(tip.OpCard) + -- end + tiplist:AddTip(tip) + end + DispatchEvent(self._dispatcher,TX_GameEvent.FZTips, tiplist, weight) + end) +end + +function M:OnEventFzAction(evt_data) + local _room = self._room + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local type = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + -- local openkong = evt_data["openkong"] + + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local fz = nil + local index = -1 + local ftype = type + if (ftype == FZType.Gang_Peng) then + for i=1,#p.fz_list do + if (p.fz_list[i].card == card) then + p.fz_list[i].card = card + fz = p.fz_list[i] + fz.type = type + index = i -1 + break + end + end + end + if (index == -1) then + fz = {} + fz.card = card + fz.type = type + fz.active_card = actice_card + p.fz_list[#p.fz_list+1] = fz + end + fz.from_seat = from_seat + local remove_num = #opcard + + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(p.card_list,opcard[i]) + end + end + + p.hand_left_count = p.hand_left_count - remove_num + if from_seat ~= p.seat then + -- if (fz.Type == FZType.Chi) then card = actice_card end + local fp = _room:GetPlayerBySeat(from_seat) + table.remove(fp.outcard_list,#fp.outcard_list) + end + + DispatchEvent(self._dispatcher,TX_GameEvent.FangziAction, fz, p, index) + end) +end + +function M:OnEventHu(evt_data) + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + local hu_card = evt_data["win_card"] + table.sort(cards, ViewUtil.HandCardSort) + cards[#cards +1] = hu_card + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + DispatchEvent(self._dispatcher,TX_GameEvent.ZPHuCard, evt_data["seat"], evt_data["from_seat"], cards, hu_card) + end) +end + +function M:OneventResult1(evt_data) + local over = evt_data.type + --0:小结算 1:小大结算 2:大结算 + self._room._reload_flag = false + self._room.playing = false + if 0 == over then + local result = evt_data.result + self._cacheEvent:Enqueue(function() + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil,true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +-- function M:OnEventResult2(evt_data) +-- DataManager.CurrenRoom.Over = true +-- ControllerManager.SetGameNetClient(nil,true) + -- local info_list = evt_data["info_list"] + -- if self._result ~= nil then + -- self._cacheEvent:Enqueue(function() + -- self:OneventResult1(self._result) + -- self._result = nil + -- end) + -- end +-- self._cacheEvent:Enqueue(function() +-- DispatchEvent(self._dispatcher,TX_GameEvent.ZPResult2, info_list) +-- ControllerManager.ChangeController(LoddyController) +-- end) +-- end + +function M:OnEventNiao(evt_data) + local list = evt_data["niao"] + local start_seat = evt_data["start_seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EventNiao, list, start_seat) + end) +end + +function M:OnEventPiaoTip() + printlog("OnEventPiaoTip=====》》》") + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + self._cacheEvent:Enqueue(function() + if not self._room._reload_flag then + self._room.curren_round = self._room.curren_round + 1 + end + self._room.playing = true + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiaoTip, evt_data) + end) +end + +function M:OnEventPiao(evt_data) + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,TX_GameEvent.EvnetPiao, evt_data.seat, evt_data.num) + end) +end + +function M:GetPosString( seat ) + if DataManager.CurrenRoom.room_config.people_num ~= 4 then return"" end + if seat == 1 then + return "北" + elseif seat == 2 then + return "西" + elseif seat == 3 then + return "南" + elseif seat == 4 then + return "东" + end +end + +function M:Discard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + -- list_remove(_room.SelfPlayer.Cards,card) + -- table.sort(_room.SelfPlayer.Cards) + _client:send(Protocol.Game_Da, _data) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXGameInfo.lua b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXGameInfo.lua new file mode 100644 index 00000000..b487f7ad --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXGameInfo.lua @@ -0,0 +1,291 @@ +local EXGameInfo = {} + +local M = EXGameInfo + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/majiang/zhuanzhuan/ui/Info_MJ_ZhuanZhuan") + return self +end + +function M:FillData() + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 4 -- 回合选项数 + + if oldGameVersion==1 then + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_ZhuanZhuan/Cgm_create_room") + else + self._config = UIPackage.CreateObjectFromURL("ui://Info_MJ_ZhuanZhuan/Cgm_create_room") + end + + if oldGameVersion==2 then + self._config:GetController("xipai").selectedIndex=0 + + self.xipaiValueText=self._config:GetChild('xipaifen') + self.xipaiValueText.text=1 + self.xipaiValue=1 + + self.anchouValueText=self._config:GetChild('anchoufen') + self.anchouValueText.text=1 + self.anchouValue=1 + + local btn_cr = self._config:GetChild('sdsrbtn') + btn_cr.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.xipaiValueText.text=value/1000 + self.xipaiValue=value/1000 + + end, 3, nil) + gniv:Show() + + + end + ) + + + local btn_cr2 = self._config:GetChild('anchoubtn') + btn_cr2.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.anchouValueText.text=value/1000 + self.anchouValue=value/1000 + + end, 3, nil) + gniv:Show() + + + end + ) + + + end + +end + +local _help_url= "ui://Info_MJ_ZhuanZhuan/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_MJ_ZhuanZhuan/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_MJ_ZhuanZhuan/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list = {}--{"红中麻将","三人红中","二人红中"} +function M:GetPlayList() + return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + 1 + local people = _config:GetController("play_list").selectedIndex+2 + + local niao_type = _config:GetController("NiaoType").selectedIndex + 1 + local zha_ma = _config:GetController("zha").selectedIndex + 1 + local wo_niao = _config:GetController("wowoniao").selectedIndex + 1 + local aa = _config:GetController("Cost").selectedIndex + + local piao_niao = _config:GetChild("btn_piao_niao").selected + + ---------- + -- local piao_niao1=0 + -- if _config:GetController('piao') then + -- piao_niao1=_config:GetController('piao').selectedIndex + -- end + -- local piao1=false + -- local piao2=false + -- local piao3=false + -- local piao_niao_opt=0 + -- if piao_niao1==2 then + -- piao_niao_opt=_config:GetController("piaofen").selectedIndex + -- end + + + local xi_pai=false + local xi_paifen=0 + if _config:GetChild("xipai") then + xi_pai=_config:GetChild("xipai").selected + end + + -- local fengding_score=0 + -- if _config:GetController("fengding") then + -- fengding_score=_config:GetController("fengding").selectedIndex + -- end + + + local dianpao = _config:GetChild("btn_dianpaohu").selected + local seven_pair = _config:GetChild("btn_qidui").selected + local laizi = _config:GetChild("btn_hongzhong").selected + local bi_hu = _config:GetChild("btn_bihu").selected + local hz_hu = _config:GetChild("btn_wuzhong").selected + local buzhong = _config:GetChild("btn_buzhongsuanquanzhong").selected + local zhuangxian = _config:GetChild("btn_zhuangxiansuanfen").selected + + local qgdp =_config:GetController("qianggang").selectedIndex + local qianggang_dianpao=false + if qgdp==1 then + qianggang_dianpao=true + end + ---------- + + local _data = {} + _data["opt"] = round + _data["maxPlayers"] = people + + _data["niao"] = niao_type + if oldGameVersion==1 then + _data["niao_opt"] = niao_type == 2 and 1 or (niao_type == 3 and wo_niao or zha_ma) + else + _data["niao_opt"] = niao_type == 2 and 1 or (niao_type == 3 and wo_niao or zha_ma) + end + + _data["niao_opt_score"] = wo_niao + + + _data["zhuangxian"] = zhuangxian + _data["qidui"] = seven_pair + _data["hz_hu"] = hz_hu + _data["dianpao"] = dianpao + _data["bi_hu"] = bi_hu + _data["laizi"] = laizi + _data["qianggang_dianpao"] = qianggang_dianpao + + _data["AA"] = aa + + _data["piao_niao"] = piao_niao + + + -- _data['piao1'] = piao1 + -- _data['piao2'] = piao2 + -- _data['piao3'] = piao3 + + _data['xi_pai'] = xi_pai + + -- auto_piao=false + -- if piao_niao==2 then + -- if piao1 or piao2 or piao3 then + -- auto_piao=true + -- end + -- end + -- _data['auto_piao'] = auto_piao + -- _data['piao_niao_opt'] = piao_niao_opt + + local xi_pai_score=0 + local an_chou_score=0 + if oldGameVersion==2 then + xi_pai_score=self.xipaiValue + an_chou_score=self.anchouValue + end + + _data['xi_pai_score'] = xi_pai_score*1000 + _data['an_chou_score'] = an_chou_score*1000 + --_data["fengding_score"] = fengding_score + + return _data +end + +function M:LoadConfigData(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt -1 -- == 1 and 0 or 1 + _config:GetController("play_list").selectedIndex = data.maxPlayers-2 + + _config:GetChild("btn_qidui").selected = data.qidui + _config:GetChild("btn_zhuangxiansuanfen").selected = data.zhuangxian + _config:GetChild("btn_hongzhong").selected = data.laizi + _config:GetChild("btn_wuzhong").selected=data.hz_hu + _config:GetChild("btn_dianpaohu").selected=data.dianpao + _config:GetChild("btn_bihu").selected=data.bi_hu + --_config:GetChild("btn_buzhongsuanquanzhong").selected=data.buzhong + + if data.qianggang_dianpao==true then + _config:GetController("qianggang").selectedIndex=1 + else + _config:GetController("qianggang").selectedIndex=0 + end + + _config:GetController("NiaoType").selectedIndex = data.niao - 1 + if data.niao == 1 then + _config:GetController("zha").selectedIndex = data.niao_opt - 1 + elseif data.niao == 3 then + _config:GetController("wowoniao").selectedIndex = data.niao_opt - 1 + end + + _config:GetController("wowoniao").selectedIndex=data.niao_opt_score-1 + + _config:GetController("Cost").selectedIndex = data.AA or 0 + + _config:GetChild("btn_piao_niao").selected=data.piao_niao + + -- if _config:GetController("piao") then + -- _config:GetController("piao").selectedIndex=data.piao_niao + -- _config:GetChild('pf1').selected=data.piao1 + -- _config:GetChild('pf2').selected=data.piao2 + -- _config:GetChild('pf3').selected=data.piao3 + -- end + + + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected=data.xi_pai + end + + -- if _config:GetController("piaofen") then + -- _config:GetController("piaofen").selectedIndex=data.piao_niao_opt + -- end + + if oldGameVersion==2 then + self.xipaiValueText.text=data.xi_pai_score/1000 + self.xipaiValue=data.xi_pai_score/1000 + + self.anchouValueText.text=data.an_chou_score/1000 + self.anchouValue=data.an_chou_score/1000 + end + + -- if _config:GetController("fengding") then + -- _config:GetController("fengding").selectedIndex=data.fengding_score + -- end + + end + +return M + \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXMainView.lua b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXMainView.lua new file mode 100644 index 00000000..013d7d11 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXMainView.lua @@ -0,0 +1,729 @@ +local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local MJMainView = require("main.majiang.MJMainView") +local EXClearingView = import(".EXClearingView") +local TX_GameEvent = import(".GameEvent") +local HuTipView = import("main.majiang.HuTipView") +local SettingView = import("main.majiang.MJSettingViewNew") +local PlayerInfoView = import(".EXPlayerInfoView") +local M = {} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M,{__index = MJMainView}) + local self = setmetatable({}, {__index = M}) + self.class = "MainView" + self.asset_group = "ZhuanZhuan_MJ" + self:init() + ViewUtil.PlayMuisc(self.asset_group, "extend/majiang/zhuanzhuan/sound/bg.mp3") + return self +end + +function M:InitView(url) + local room = self._room + self._style = 1 + self._gps_style = 1 + self._full = true + UIPackage.AddPackage("extend/majiang/zhuanzhuan/ui/Extend_MJ_ZhuanZhuan") + MJMainView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num .. "_s2") + self._hu_tip = HuTipView.new(self) + + self._view:GetChild('wanfa_text').text =room.room_config.people_num .. '人转转麻将 ' .. room.score_times .. '倍' + + self.LaiziBG=self._view:GetChild('n103') + self.LaiziBG.text="鬼牌" + self.LaiziBG.visible=false + self.selectLaiziBtn=self._view:GetChild('selectlaizi') + self.Laizi1Btn=self._view:GetChild('selectlaizi1') + self.Laizi2Btn=self._view:GetChild('selectlaizi2') + self.Laizi1Btn.visible=false + self.Laizi2Btn.visible=false + self.selectLaiziBtn.visible=false + + self:PlayerChangeLineState() + + if room.playing or room.curren_round > 0 then + self:ReloadRoom() + end +end + +function M:UpdateRound() + self._view:GetChild("tex_round1").text = self._room.curren_round + self._view:GetChild("tex_round2").text = self._room.room_config.round +end + +function M:InitPlayerInfoView() + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem,self) + tem.visible = false + end +end + +function M:NewMJPlayerCardInfoView(view,index) + if index == 1 then + return MJPlayerSelfCardInfoView.new(view,self) + end + return MJPlayerCardInfoView.new(view,self) +end + +function M:EventInit() + -- UIPackage.AddPackage("extend/majiang/hongzhong/ui/Extend_MJ_HongZhong") + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _gcm_outcard_url = UIPackage.GetItemURL("Main_Majiang", "Gcm_OutCard") + local _player_info = self._player_info + local _gamectr = self._gamectr + + _gamectr:AddEventListener(TX_GameEvent.EventXiPai,function( ... ) + local arg = {...} + local currentPlayer=arg[1] + local currentPlayer2=arg[2] + self._popEvent = false + if ( currentPlayer1 ) then + + local xipaiCB=function () + self._popEvent = true + end + self:PlayXiPai(xipaiCB) + + end + + + if ( currentPlayer2 ) then + --self._popEvent = false + local xipaiCB2=function () + self._popEvent = true + end + self:PlayXiPai1(xipaiCB2) + end + + + end) + + _gamectr:AddEventListener(TX_GameEvent.SendCards,function( ... ) + -- self:ShowHuTip() + self:UpdateRound() + self._state.selectedIndex = 1 + local list = _room.player_list + for i=1,#list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateHandCard() + end + end) + _gamectr:AddEventListener(TX_GameEvent.EventTurn, function(...) + local arg = {...} + self._left_time = 15 + local seat = arg[1] + self:UpdateCardBox(self:GetPos(seat)) + -- if seat == self._room.self_player.seat then + -- self:ShowHuTip() + -- end + end) + + _gamectr:AddEventListener(TX_GameEvent.OutHint, function(...) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:UpdateHandCard(true) + end) + + local _gcm_outcard_url ="ui://Main_Majiang/Gcm_OutCard" + _gamectr:AddEventListener(TX_GameEvent.OutCard, function(...) + self:__CloseTip() + self._left_time = 0 + local arg = {...} + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:RemoveCursor() + info:UpdateHandCard() + local outcard = UIPackage.CreateObjectFromURL(_gcm_outcard_url) + info:UpdateOutCardList(outcard, card, self._cursor) + self:PlaySound("ZhuanZhuan_MJ", p.self_user.sex, tostring(card)) + self:PlayMJSound("chupai.mp3") + if seat == _room.self_player.seat then + _room.curren_outcard_seat = -1 + end + end) + _gamectr:AddEventListener(TX_GameEvent.GetCard, function(...) + self:__CloseTip() + local arg = {...} + local seat = arg[1] + local card = arg[2] + -- self._tex_leftTime.text = arg[3] + self._tex_LeftCard.text = arg[3] + -- self:UpdateRoomInfo() + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateHandCard(true) + end) + + _gamectr:AddEventListener(TX_GameEvent.FZTips, function(...) + local arg = {...} + local _tip = arg[1] + local weight = arg[2] + self:__FangziTip(_tip, weight) + end) + + _gamectr:AddEventListener(TX_GameEvent.FangziAction, handler(self,self.OnFangziAction)) + + _gamectr:AddEventListener(TX_GameEvent.ZPHuCard, function(...) + self._left_time = 0 + self:UpdateCardBox(0) + self:__CloseTip() + self._popEvent = false + local arg = {...} + local win_seat = arg[1] + local lose_seat = arg[2] + local cards = arg[3] + local win_card = arg[4] + local info = self._player_card_info[self:GetPos(win_seat)] + self:RemoveCursor() + info:UpdateHandCard(true, true) + + local obj_win_card = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Btn_Card") + obj_win_card.icon = "ui://Main_Majiang/202_" .. win_card + obj_win_card:GetController("bg").selectedIndex = 1 + info._view:AddChild(obj_win_card) + obj_win_card:Center() + + local url, pNode + local player = _room:GetPlayerBySeat(win_seat) + if win_seat ~= _room.self_player.seat then + url = "ui://Main_Majiang/别人胡" + pNode = info._mask_liangpai + elseif win_seat == _room.self_player.seat then + url = "ui://Main_Majiang/自己胡牌" + pNode = self._view + end + if win_seat == lose_seat then + url = "ui://Main_Majiang/eff_zimo" + end + local hu_sound = win_seat == lose_seat and "zimo" or "hu" + self:PlaySound("ZhuanZhuan_MJ", player.self_user.sex, hu_sound .. math.random(1, 2)) + local he = UIPackage.CreateObjectFromURL(url) + pNode:AddChild(he) + he:GetTransition("t2"):Play() + if win_seat == _room.self_player.seat then + he:Center() + elseif url == "ui://Main_Majiang/eff_zimo" then + he.scaleY = 0.4 + he.scaleX = 0.4 + he.x = he.width * 0.4 * 0.5 * -1 + he.y = he.height * 0.4 * 0.5 * -1 + end + coroutine.start(function() + coroutine.wait(2) + obj_win_card:Dispose() + he:Dispose() + self._popEvent = true + end) + end) + + _gamectr:AddEventListener(TX_GameEvent.EventNiao, function(...) + local arg = {...} + self._popEvent = false + local list = arg[1] + local start_seat = arg[2] + ViewUtil.PlaySound("ZhuanZhuan_MJ", "extend/majiang/zhuanzhuan/sound/zhuaniao.mp3") + coroutine.start(self.RunNiao,self,list, start_seat) + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult1, function(...) + self._popEvent = false + self:__CloseTip() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = {...} + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local niao = result.niao + if liuju then + local le = UIPackage.CreateObjectFromURL("ui://Main_Majiang/LiuJu") + self._view:AddChild(le) + le:Center() + le:GetTransition("t0"):Play() + coroutine.start(function() + coroutine.wait(1) + le:Dispose() + end) + end + self:RemoveCursor() + if self._clearingView == nil then + self._clearingView = EXClearingView.new(self._root_view) + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + self._popEvent = true + end) + end + + if _room.curren_round ~= _room.room_config.round then + -- if #niao == 0 then self._view:GetChild("n13").visible = false end + self._clearingView:InitData(0, _room, result, nil, function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:ResetCardType() + if _room:checkHpNonnegative() then + p.cur_hp = data[i].hp_info.cur_hp + end + info:UpdateScore() + info._view:GetChild("zhanji").visible = true + local num = data[i].hp_info.total_hp + if num > 0 then + info._view:GetController("text_color").selectedIndex = 0 + info._view:GetChild("text_jifen").text = "+" .. d2ad(num) + else + info._view:GetController("text_color").selectedIndex = 1 + info._view:GetChild("text_jifen").text = d2ad(num) + end + + info._view:GetChild("mask_piao").title = "" + info._view:GetController("piao_niao").selectedIndex = 0 + p.fz_list = {} + end + DataManager.CurrenRoom.self_player.card_list = {} + self._state.selectedIndex = 2 + self._clearingView = nil + end) + end + self._player_card_info[1]:ShowHuTip() + end) + + _gamectr:AddEventListener(TX_GameEvent.ZPResult2, function(...) + self:UnmarkSelfTuoguan() + self._left_time = 0 + self:UpdateCardBox(0) + self._ctr_cardbox.selectedIndex = 0 + local arg = {...} + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + self._clearingView = EXClearingView.new() + coroutine.start(function() + coroutine.wait(0.5) + self._clearingView:Show() + end) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiaoTip, function() + self:UpdateRound() + self._tex_LeftCard.text = "0" + self._state.selectedIndex = 1 + self:__PiaoNiaoTip() + -- if oldGameVersion==1 then + -- self:__PiaoNiaoTip() + -- else + -- self:__PiaoNiaoTip1() + -- end + end) + + _gamectr:AddEventListener(TX_GameEvent.EvnetPiao, function(...) + local arg = {...} + local seat = arg[1] + local num = arg[2] + if num > 0 then + local head_info = self._player_info[self:GetPos(seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. num + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + if seat == _room.self_player.seat then + if self._com_piao and _room.self_player.entrust then + self._com_piao:Dispose() + self._com_piao = nil + _room.curren_round = _room.curren_round - 1 + end + end + end) +end + +function M:OutCard(card) + if card ~= 412 then + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card, function() + local info = self._player_card_info[1] + self:RemoveCursor() + info:UpdateHandCard() + + info:UpdateOutCardList(nil, card, self._cursor) + self:PlaySound("ZhuanZhuan_MJ", self._room.self_player.self_user.sex,tostring(card)) + self:PlayMJSound("chupai.mp3") + -- self:ShowHuTip() + end) + end +end + +function M:__FangziTip(tip, weight) + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject("Main_Majiang", "Gcm_action_tips") + _chipeng_tip:GetController("hide_bg").selectedIndex = 1 + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + -- self._player_card_info[self:GetPos(p.seat)] + + local _lit_fanzi = _chipeng_tip:GetChild("lit_fanzi") + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + + local tip_hu = false + local count = #_tlist + for k=1,#_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + local url = "ui://Main_Majiang/Btn_fztip" + local td_weight = td.weight + if td_weight == 16 then td_weight = 8 end + if td_weight == 8 then url = "ui://Main_Majiang/Btn_hu" end + local btn_t = _lit_fanzi:AddItemFromPool(url) + btn_t.icon = "ui://Main_Majiang/fztip_"..td_weight + btn_t.data = { tip, td } + btn_t.onClick:Add(self.__TipAction,self) + end + + -- if not (tonumber(weight) >= 16) then + local _btn_pass = _lit_fanzi:AddItemFromPool("ui://Main_Majiang/Btn_pass") + -- local _btn_pass = _chipeng_tip:GetChild("btn_pass") + _btn_pass.onClick:Set(function() + if tonumber(weight) >= 8 then + local guo_msg = MsgWindow.new(self._root_view, "确定要点过吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end) + guo_msg:Show() + else + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end) + -- end + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() +end + +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local list = tip.tip_map_type[td.weight] + if (#list > 1) then + self:_ChiView(list, function(id) + _gamectr:SendAction(id) + self:__CloseTip() + end) + self._chipeng_tip.visible = false + return + end + + _gamectr:SendAction(td.id) + if (self._chipeng_tip == nil) then return end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil +end + +function M:_ChiView(tiplist, callback) + self._chipeng_tip.visible = false + local _pop_tip_choice = UIPackage.CreateObject("Main_Majiang", "Pop_tip_choice") + local list_choose = _pop_tip_choice:GetChild("Lst_choose") + local crossCtr = _pop_tip_choice:GetController("state") + crossCtr.selectedIndex = #tiplist == 3 and 0 or 1 + _pop_tip_choice:GetChild("Btn_cross").onClick:Add(function() + _pop_tip_choice:Dispose() + self._chipeng_tip.visible = true + end) + list_choose:RemoveChildrenToPool() + for i = 1, #tiplist do + local item_choose = list_choose:AddItemFromPool() + item_choose:GetController("type").selectedIndex = 0 + for j = 1, 4 do + item_choose:GetChild("card"..j).icon = UIPackage.GetItemURL("Main_Majiang", "202_"..tiplist[i].card) + end + item_choose.onClick:Add(function() + callback(tiplist[i].id) + end) + end + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width)/2, (self._view.height - _pop_tip_choice.height)/2) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:OnFangziAction(...) + self:__CloseTip() + local arg = {...} + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local index = arg[3] + + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject("Extend_MJ_ZhuanZhuan", "FzEffect") + if fz.type == FZType.Peng then + self:PlaySound("ZhuanZhuan_MJ", player.self_user.sex,"peng"..math.random(1, 3)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "碰") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "碰框") + else + self:PlaySound("ZhuanZhuan_MJ", player.self_user.sex,"gang"..math.random(1, 2)) + effect:GetChild("word1").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + effect:GetChild("word2").icon = UIPackage.GetItemURL("Main_Majiang", "杠") + -- effect:GetChild("kuang").icon = UIPackage.GetItemURL("Main_Majiang", "杠框") + end + effect.touchable = false + effect:GetTransition("t2"):Play() + pNode:AddChild(effect) + coroutine.start(function() + coroutine.wait(2) + effect:Dispose() + end) + + self:RemoveCursor() + if (player.seat ~= fz.from_seat) then + local fs_info = _player_card_info[self:GetPos(fz.from_seat)] + fs_info:UpdateOutCardList() + end + info:UpdateFzList(fz, index, true) + local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi + info:UpdateHandCard(getcard) + self:__CloseTip() +end + +function M:RunNiao(list, start_seat) + local _room = self._room + --local _niao_View = self._niao_View + self._niao_View = UIPackage.CreateObject("Extend_MJ_ZhuanZhuan","Panel_Birds") + self._view:AddChild(self._niao_View) + self._niao_View:Center() + local _niao_View = self._niao_View + local list_niao_card = self._niao_View:GetChild("Lst_birds") + list_niao_card:RemoveChildrenToPool() + for i = 1, #list do + --添加背面的麻將 + local item = list_niao_card:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "202_00") + item:GetChild("tex_score").text = "+" .. list[i].score + end + for i = 1, #list do + --顯示正面 + local item = list_niao_card:GetChildAt(i - 1) + local card = list[i].card + coroutine.wait(0.3) + item:GetTransition("appear"):Play() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_"..card) + if list[i].score > 0 then item:GetController("bg").selectedIndex = 1 end + end + coroutine.start(function() + coroutine.wait(1) + _niao_View:Dispose() + self._popEvent = true + end) +end + +-- function M:markOutCards(showTip, data) +-- for i = 1, #self._room.player_list do +-- local p = self._room.player_list[i] +-- local info = self._player_card_info[self:GetPos(p.seat)] +-- for j = 1, #p.outcard_list do +-- local card = p.outcard_list[j] +-- if card == data then +-- local obj = info:GetOutCardByIndex(j) +-- obj:GetController("gray").selectedIndex = showTip and 1 or 0 +-- end +-- end +-- end +-- end + + +function M:__PiaoNiaoTip() + local obj_piao = UIPackage.CreateObject("Main_Majiang", "panel_piao_niao") + self._view:AddChild(obj_piao) + obj_piao.x = (self._view.width - obj_piao.width) * 0.5 + obj_piao.y = self._view.height * 0.6 + local piaoState=obj_piao:GetController('piao') + piaoState.selectedIndex=1 + for i = 1, 4 do + obj_piao:GetChild("btn_" .. i).onClick:Add(function() + self._gamectr:SendAction(i - 1) + obj_piao:Dispose() + end) + end + self._com_piao = obj_piao +end + + +function M:__PiaoNiaoTip1() + local obj_piao = UIPackage.CreateObject("Main_Majiang", "panel_piao_niao") + self._view:AddChild(obj_piao) + obj_piao.x = (self._view.width - obj_piao.width) * 0.5 + obj_piao.y = self._view.height * 0.6 + local piaoState=obj_piao:GetController('piao') + + local tconfig=DataManager.CurrenRoom.room_config.config + + + + local piaoList={} + + for i = 1, 4 do + local piaoT=obj_piao:GetChild("btn_" .. i) + table.insert(piaoList,piaoT) + piaoT.onClick:Add(function() + self._gamectr:SendAction(i - 1) + obj_piao:Dispose() + end) + + end + self._com_piao = obj_piao + + + + if tconfig.piao_niao<2 then + for i=1,#piaoList do + piaoList[i].visible=true + end + piaoState.selectedIndex=1 + else + piaoList[1].visible=false + for i=2,#piaoList do + piaoList[i].visible=tconfig["piao"..(i-1)] + end + piaoState.selectedIndex=2 + end + +end + +function M:ReloadRoom(bskip) + local room = self._room + -- if not room.playing then + -- self._state.selectedIndex = 2 + -- else + -- self._state.selectedIndex = 1 + -- self._room._reload_flag = true + -- end + + if bskip == nil or bskip == false then + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + self._room._reload_flag = true + end + end + + for i = 1, #room.player_list do + local p = room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + for i = 1, #p.fz_list do + info:UpdateFzList(p.fz_list[i], -1) + end + info:UpdateHandCard() + local head_info = self._player_info[self:GetPos(p.seat)] + head_info:UpdateScore() + head_info._view:GetChild('zhanji').visible = true + local num = p.total_hp or 0 + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(num) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(num) + end + + if p.seat == room.last_outcard_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil,card, self._cursor) + elseif p.seat == room.curren_outcard_seat then + info:UpdateHandCard(true) + info:UpdateOutCardList() + else + info:UpdateOutCardList() + end + if p.seat == room.banker_seat then + head_info:MarkBank(true) + end + -- if p.ready then + -- self._player_info[self:GetPos(p.seat)]:Ready(true) + -- end + if bskip == nil or bskip == false then + if p.ready and room.playing == false then + self._player_info[self:GetPos(p.seat)]:Ready(true) + end + end + if p.piao_niao~=nil and p.piao_niao > 0 then + local head_info = self._player_info[self:GetPos(p.seat)] + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + end + end + -- self:ShowHuTip() + + if bskip == nil or bskip == false then + self:UpdateCardBox(self:GetPos(room.curren_outcard_seat)) + self._tex_LeftCard.text = room.left_count + self:UpdateRound() + end +end + +function M:PlayerChangeLineState() + -- local isOutCard = true + -- local str = "玩家 " + -- for _ , player in ipairs(self._room.player_list) do + -- if player.line_state == 0 then + -- isOutCard = false + -- end + -- end + -- self._player_card_info[1]._area_handcard_list.touchable = isOutCard +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:__CloseTip() + if self._chipeng_tip then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if self._pop_tip_choice then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +function M:closeTipOnTuoguan() + self:__CloseTip() +end + +function M:Destroy() + MJMainView.Destroy(self) + UIPackage.RemovePackage("extend/majiang/zhuanzhuan/ui/Extend_MJ_ZhuanZhuan") +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXPlayBackView.lua b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXPlayBackView.lua new file mode 100644 index 00000000..3f4f9420 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXPlayBackView.lua @@ -0,0 +1,298 @@ +local MJPlayBackView = require("main.majiang.MJPlayBackView") +local EXRoomConfig = import(".EXRoomConfig") +local EXClearingView = import(".EXClearingView") + +local Record_Event = import(".RecordEvent") + + +local M = {} + +--- Create a new +function M.new() + setmetatable(M,{__index = MJPlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = "PlayBackView" + self:init() + + return self +end + + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/majiang/zhuanzhuan/ui/Extend_MJ_ZhuanZhuan") + MJPlayBackView.InitView(self,"ui://Main_Majiang/Main_"..room.room_config.people_num) + local _cardbox = self._view:GetChild("cardbox") + --self._view:GetChild("panel_record"):GetChild("btn_LastStep").enabled = false + self._ctr_cardbox = _cardbox:GetController("c1") + self._tex_round = self._view:GetChild("tex_round") + self._tex_LeftCard = self._view:GetChild("remaining_card") + self._anchor = self._view:GetChild("mask_tips") + self._eventmap = {} + + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_Niao] = self.CmdNiao + self._cmdmap[Record_Event.Evt_Piao] = self.CmdPiao + self._cmdmap[Record_Event.Evt_Result] = self.CmdResult +end + +function M:FillRoomData(data) + MJPlayBackView.FillRoomData(self) + if self._win_pic then self._win_pic:Dispose() end + if self._niao then self._niao:Dispose() end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local left_count = data.info.left_card + self:UpdateLeftCard(left_count) + local round = data.info.round + self:UpdateRound(round) + + local roominfo_panel = self._view:GetChild("roominfo_panel1") + roominfo_panel:GetChild("tex_roomid").text = room.room_id + roominfo_panel:GetChild("tex_gametype").text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + table.sort(p.card_list, ViewUtil.HandCardSort) + card_info:UpdateHandCard(false, true) + self._player_info[i]._view:GetController("piao_niao").selectedIndex = 0 + end + + self:GenerateAllStepData(data) + self:UpdateStep(1) + -- self:ShowStep(0) +end + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateLeftCard(step.left_card) + -- self._ctr_cardbox.selectedIndex = step.current_out_seat + self:UpdateCardBox(self:GetPos(step.current_out_seat)) + self:UpdateStep(index + 1) + if step.cmd ~= Record_Event.Evt_OutCard then + self:RemoveCursor() + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hand_left_count = #p.card_list + info:Clear() + info:ResetFzList() + p.piao_niao = step.player_card_data[i].piao_niao + local head_info = self._player_info[self:GetPos(i)] + if p.piao_niao and p.piao_niao > 0 then + head_info._view:GetChild("mask_piao").title = "飘分 " .. p.piao_niao + head_info._view:GetController("piao_niao").selectedIndex = 1 + else + head_info._view:GetController("piao_niao").selectedIndex = 0 + end + if step.cmd == Record_Event.Evt_OutCard and i == step.last_out_seat then + local card = p.outcard_list[#p.outcard_list] + info:UpdateOutCardList(nil, nil, self._cursor) + else + info:UpdateOutCardList() + end + if step.cmd == Record_Event.Evt_GetCard and p.seat == step.current_out_seat then + info:UpdateHandCard(true, true) + else + info:UpdateHandCard(false, true) + end + end + if step.cmd == Record_Event.Evt_Win then + self._win_pic = UIPackage.CreateObjectFromURL("ui://Main_Majiang/胡") + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + else + if self._win_pic then + self._win_pic:Dispose() + end + end + if step.cmd == Record_Event.Evt_Niao then + local niao_list = step.niao + self._niao = UIPackage.CreateObjectFromURL("ui://Extend_MJ_ZhuanZhuan/Panel_Birds") + local list = self._niao:GetChild("Lst_birds") + list:RemoveChildrenToPool() + for i = 1, #niao_list do + local item = list:AddItemFromPool() + item.icon = UIPackage.GetItemURL("Main_Majiang", "201_"..niao_list[i].card) + if niao_list[i].score > 0 then + item:GetController("bg").selectedIndex = 2 + end + end + self._view:AddChild(self._niao) + self._view:AddChild(self._view:GetChild("panel_record")) + self._niao:Center() + else + if self._niao then + self._niao:Dispose() + end + end + if step.cmd == Record_Event.Evt_Result then + if not self.result then + self.result = EXClearingView.new(self._root_view, true) + self.result:InitData(0, self._room, step.result_data) + self.result._view.x = (GRoot.inst.width - self.result._view.width) * -0.5 + self.result._view.width = GRoot.inst.width + self.result._view.height = GRoot.inst.height + self.result._view:GetChild("btn_confirm").visible = false + self._anchor:AddChild(self.result._view) + self.result._view.x = self._anchor.x * -1 + self.result._view.y = self._anchor.y * -1 + else + self.result._view.visible = true + end + -- self.result._view:Center() + else + if self.result then + self.result._view.visible = false + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = "" + step.left_card = info.left_card + step.last_out_seat = 0 + step.current_out_seat = 1 + step.win = 0 + step.niao = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.piao_niao = p.piao_niao + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + table.sort(u.card_list, ViewUtil.HandCardSort) + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.last_out_seat = 0 + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + for i = 1, #cmd.data.opcard do + list_remove(u.card_list, cmd.data.opcard[i]) + end + local fz = {} + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.opcard = cmd.data.opcard + local uf = data.player_card_data[cmd.data.from_seat] + if fz.type ~= FZType.Gang_An and fz.type ~= FZType.Gang_Peng then + table.remove(uf.outcard_list, #uf.outcard_list) + end + if fz.type ~= FZType.Gang_Peng then + u.fz_list[#u.fz_list + 1] = fz + else + for i = 1, #u.fz_list do + if u.fz_list[i].type == FZType.Peng and u.fz_list[i].card == fz.card then + u.fz_list[i].type = FZType.Gang_Peng + end + end + end +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:CmdNiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.niao = cmd.data.niao +end + +function M:CmdPiao(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.player_card_data[cmd.seat].piao_niao = cmd.data.num +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result_data = cmd.data +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_deep_clone(last_step) + self._step[#self._step + 1] = step + step.result_data = nil + return step +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = "剩余 "..num.." 张牌" +end + +function M:UpdateCardBox(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + self._ctr_cardbox.selectedIndex = index +end + +function M:UpdateRound(round) + self._tex_round.text = "第 "..round.."/"..self._room.room_config.round.." 局" +end + +function M:UpdateStep(step) + self._record:GetChild("tex_step").text = "第 " .. step .. " / " .. #self._step .. "步" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXPlayer.lua b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXPlayer.lua new file mode 100644 index 00000000..fd26822b --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXPlayer.lua @@ -0,0 +1,36 @@ + + +local EXPlayer = { + auto, + -- 手牌列表 + hand_cards = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_cards = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXPlayerInfoView.lua new file mode 100644 index 00000000..f8a5fd69 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXPlayerInfoView.lua @@ -0,0 +1,76 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + +function M:init() + PlayerInfoView.init(self) + self._tex_score = self._view:GetChild("info"):GetChild("tex_score1") + self._tex_score2 = self._view:GetChild("info"):GetChild("tex_score2") + self._ct_score = self._view:GetChild("info"):GetController("score") +end + +function M:ShowInteraction(type,str) + if type == 3 then + Voice.DownLoad(str, function(clip) + if (clip ) then + self:ShowMaskVoice(clip.length) + GameApplication.Instance:PlayVoice(clip) + end + end) + elseif type == 4 then + self:SetChat(str) + elseif type == 2 then + local chat_index = tonumber(str) + self._main_view:PlayChatSound(self._player.self_user.sex,chat_index) + local language, index = self._main_view:GetChatMsgLanguage(chat_index) + self:SetChat(self._main_view.Fix_Msg_Chat[index]) + elseif type == 1 then + self:SetBiaoqing("ui://Chat/"..str) + end +end + +function M:UpdateRemainCard(card_num, hide) + if hide then + self._view:GetController("show_remain").selectedIndex = 0 + else + self._view:GetController("show_remain").selectedIndex = 1 + end + self._view:GetChild("com_remain"):GetChild("tex_remain").text = card_num +end + +function M:FillData(player) + PlayerInfoView.FillData(self, player) + self:UpdateScore(player.total_score) +end + +function M:UpdateScore() + local score = self._player.total_score + local room = DataManager.CurrenRoom + if room:checkHpNonnegative() then + score = d2ad(self._player.cur_hp) + end + if not score then + score = 0 + end + if score < 0 then + self._ct_score.selectedIndex = 1 + self._tex_score2.text = score + else + self._ct_score.selectedIndex = 0 + if not room:checkHpNonnegative() then + score = "+" .. score + end + self._tex_score.text = score + end +end + +return M diff --git a/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXRoomConfig.lua b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXRoomConfig.lua new file mode 100644 index 00000000..d53596a3 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/zhuanzhuan/EXRoomConfig.lua @@ -0,0 +1,111 @@ + + + +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.config=config + self.class = "RoomConfig" + self.round = config["times"] + self.Qidui = config["qidui"] + self.QiangGang = config["qiangkong"] + self.QiangGangNiao = config["qiangkong_niao"] + self.Zhama = config["niao_opt"] + --self.Laizi = config["laizi8"] + self.NiaoType = config["niao"] + self.piao_niao = config["piao_niao"] + self.Jiangma = config["jiangma"] + self.isHidden = config.isHidden + + return self +end + +function M:GetDes(sp) + sp = sp or " " + local str = RoomConfig.GetDes(self, sp) + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + + + + if (self.Qidui) then + str = str .."可胡七对" + str = str .. sp + end + + if (self.config.Laizi) then + str = str .. "有红中" + str = str .. sp + end + + + if (self.config.dianpao) then + str = str .. "点炮胡" + str = str .. sp + end + + if (self.config.zhuangxian) then + str = str .. "庄闲算分" + str = str .. sp + end + if (self.config.qidui) then + str = str .. "可胡七对" + str = str .. sp + end + if (self.config.hz_hu) then + str = str .. "无红中可接炮" + str = str .. sp + end + + if (self.config.bi_hu) then + str = str .. "必胡" + str = str .. sp + end + + if (self.config.qianggang_dianpao) then + str = str .. "抢杠算点" + str = str .. sp + else + str = str .. "抢杠算自" + str = str .. sp + end + + + + if (self.piao_niao) then + str = str .. "飘鸟" .. sp + end + + if (self.NiaoType) then + if self.NiaoType == 1 then + str = str .. string.format("扎%d码", self.Zhama * 2) + elseif self.NiaoType == 2 then + str = str .. "一码全中" + elseif self.NiaoType == 3 then + str = str .. "窝窝鸟" .. sp .. (self.Zhama == 1 and "1鸟2分" or "1鸟1分") + end + str = str .. sp + + + end + + str = str.sub(str, 1, string.len(str) - string.len(sp)) + return str +end + +function M:GetGameName() + return "转转麻将" +end + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_MJ_ZhuanZhuan/gamerule") + return gamerulepanel +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/zhuanzhuan/ExtendConfig.lua b/lua_probject/extend_project/extend/majiang/zhuanzhuan/ExtendConfig.lua new file mode 100644 index 00000000..fff5651f --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/zhuanzhuan/ExtendConfig.lua @@ -0,0 +1,170 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import(".EXGameInfo") +local EXMainView = import(".EXMainView") +local EXGameController = import(".EXGameController") +local EXRoomConfig = import(".EXRoomConfig") +local EXPlayBackView =import(".EXPlayBackView") +local MJRoom = require("main.majiang.MJRoom") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = "ExtendConfig" + self.extend_id = 22 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/majiang/zhuanzhuan/ui/Info_MJ_ZhuanZhuan") + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage("extend/majiang/zhuanzhuan/ui/Extend_MJ_ZhuanZhuan") + ResourcesManager.UnLoadGroup("ZhuanZhuan_MJ") +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return MJRoom.new() +end + +function M:FillRoomConfig(room,_config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + + local reload = s2croom["reload"] + local _tableInfo = s2croom["tableInfo"] + + local _config = _tableInfo["config"] + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo["playerData"] + room.curren_round = _tableInfo["round"] + self:FillPlayerData(playerList) + + if (reload) then + local _reloadInfo = s2croom["reloadInfo"] + local _hand_card = _reloadInfo["hand_card"] + room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + + local active_seat = _reloadInfo["active_seat"] + local bank_seat = _reloadInfo["banker_seat"] + local playing = _reloadInfo["playing"] + local _info_list = _reloadInfo["info_list"] + local last_outcard_seat = _reloadInfo["last_outcard_seat"] + room.left_count = _reloadInfo["left_card"] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo["curren_outcard_seat"] + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i=1,#_info_list do + local tem = _info_list[i] + local playerid = tem["playerid"] + local p = room:GetPlayerById(playerid) + local outcard_list = tem["outcard_list"] + p.outcard_list = outcard_list + p.total_score = tem["score"] + p.hand_left_count = tem["card_count"] + p.piao_niao = tem["piao_niao"] or 0 + local opcard = tem["opcard"] + for k=1,#opcard do + local op = opcard[k] + local fz = {} + fz.type = op["type"] + fz.card = op["card"] + p.fz_list[#p.fz_list+1] = fz + end + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.left_count = _tableInfo["left_card"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + + local _info_list = _tableInfo["playerData"] + for i = 1,#_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + p.piao_niao = _jp["piao_niao"] + -- print(DataManager.SelfUser.account_id,pid) + -- if (278 == pid) then + -- room.self_player = p + -- p.self_user = DataManager.SelfUser + -- else + if p.seat == 1 then room.self_player = p end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.card_list = _hand_card + --room.self_player.card_list = _hand_card + table.sort(_hand_card, ViewUtil.HandCardSort) + p.total_score = _jp["score"] + p.hand_left_count = #_hand_card + if _jp.hp_info then + room.room_config.isNonnegative = 1 + p.cur_hp = _jp.hp_info.cur_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/zhuanzhuan/GameEvent.lua b/lua_probject/extend_project/extend/majiang/zhuanzhuan/GameEvent.lua new file mode 100644 index 00000000..0550da46 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/zhuanzhuan/GameEvent.lua @@ -0,0 +1,32 @@ + +local TX_GameEvent = { + -- 发牌 + SendCards = "SendCards", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + EventNiao = "EventNiao", + + EvnetPiaoTip = "EvnetPiaoTip", + + EvnetPiao = "EvnetPiao", + + EventXiPai="EventXiPai", +} +return TX_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/zhuanzhuan/MJPlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/majiang/zhuanzhuan/MJPlayerSelfCardInfoView.lua new file mode 100644 index 00000000..086d2f23 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/zhuanzhuan/MJPlayerSelfCardInfoView.lua @@ -0,0 +1,177 @@ +local MJPlayerSelfCardInfoView = require("main.majiang.MJPlayerSelfCardInfoView") +local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView") +local CardCheck = import(".CardCheck") + +local M = {} +-- +function M.new(view,mainView) + setmetatable(MJPlayerSelfCardInfoView, {__index = MJPlayerCardInfoView}) + setmetatable(M, {__index = MJPlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:ShowHuTip(card_list) + local tingList = CardCheck.tingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + --if #tingList > 0 then + -- table.insert(tingList, 412) + --end + self._mainView._hu_tip:FillData(tingList) +end + +function M:UpdateHandCard(getcard, mp) + MJPlayerSelfCardInfoView.UpdateHandCard(self, getcard, mp) + local _carViewList = self._carViewList + local card_list = DataManager.CurrenRoom.self_player.card_list + self:ShowHuTip(card_list) + if getcard then + self._out_card = true + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + -- 记录需要标记听牌提示的牌 + local lst_mark = {} + local total_num = 0 + for i = 1, #_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + list_remove(card_list, card) + local tingList = CardCheck.tingPai(card_list, true, DataManager.CurrenRoom.room_config.Qidui, DataManager.CurrenRoom.room_config.Laizi) + if #tingList > 0 then + local count = 0 + for j = 1, #tingList do + count = count + self._mainView:CountCardLeftNum(tingList[j]) + end + local tem = {} + tem.item = btn + tem.count = count + total_num = total_num + count + table.insert(lst_mark, tem) + end + table.insert(card_list, card) + end + table.sort(lst_mark, function(a, b) + return a.count > b.count + end) + -- 如果几张牌的可胡牌数一致,也只显示'三角',可胡牌数不一致才显示'多' + local all_same = #lst_mark ~= 0 and lst_mark[1].count == total_num / #lst_mark or false + for i = 1, #lst_mark do + local tem = lst_mark[i] + if all_same or tem.count < lst_mark[1].count then + tem.item:GetController("mark_ting").selectedIndex = 1 + else + tem.item:GetController("mark_ting").selectedIndex = 2 + end + end + else + for i = 1, #_carViewList do + local btn = _carViewList[i].card + if btn:GetController("mark_ting").selectedIndex ~= 0 then + btn:GetController("mark_ting").selectedIndex = 0 + end + end + self._out_card = false + end +end + +function M:__OnClickHandCard(context) + local button = context.sender + local _carViewList = self._carViewList + local refresh = true + local card_list = {} + for i=1,#_carViewList do + local btn = _carViewList[i].card + local card = self:GetCard(btn) + if btn ~= button and btn.selected == true then + if button.data.card_item == card then + refresh = false + else + self._mainView:markOutCards(false, card) + end + btn.selected = false + end + if not btn.selected then + table.insert(card_list, card) + end + end + + if self._out_card then + self:ShowHuTip(card_list) + end + + -- 标记出牌 + if refresh then + if button.selected then + self._mainView:markOutCards(true, button.data.card_item) + else + self._mainView:markOutCards(false, button.data.card_item) + end + end + + local _room = DataManager.CurrenRoom + if not button.selected and _room.curren_outcard_seat == _room.self_player.seat then + local card = button.data + self._mainView:OutCard(card.card_item) + end +end + +function M:__OnDragStart(card) + local card_list = membe_clone(DataManager.CurrenRoom.self_player.card_list) + list_remove(card_list, card) + self:ShowHuTip(card_list) +end + +function M:__OnDragEnd(context) + if self.outcard_button then + self.outcard_button:Dispose() + self.outcard_button = nil + end + local button = context.sender + + --button:RemoveFromParent() + local card = button.data + local _room = DataManager.CurrenRoom + + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + if (button.y - card.old_postion.y < -50 and _room.curren_outcard_seat == _room.self_player.seat and card.card_item ~= 412) then + self._mainView:OutCard(card.card_item) + button.touchable = false + self.outcard_button = button + else + self._area_handcard_list:AddChildAt(button, card.index) + button:TweenMove(card.old_postion, 0.2) + end +end + +function M:CheckPlayerOnlineState() + local room = DataManager.CurrenRoom + for i = 1, #room.player_list do + if room.player_list[i].line_state == 0 then + return false + end + end + return true +end +function M:Clear(bskip) + --self._ctr_state.selectedIndex = 0 + self._area_fz_list.x = self._src_fz_list.x + self._area_fz_list.y = self._src_fz_list.y + self._area_fz_list.width = self._src_fz_list.z + self._area_fz_list.height = self._src_fz_list.w + + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_outcard_list:RemoveChildren(0, -1, true) + if bskip == nil or bskip == false then + self._mask_liangpai:RemoveChildren(0, -1, true) + end + + for i=1,#self._carViewList do + self._carViewList[i].card:Dispose() + end + self._carViewList = {} + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/zhuanzhuan/Protocol.lua b/lua_probject/extend_project/extend/majiang/zhuanzhuan/Protocol.lua new file mode 100644 index 00000000..e0efab7e --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/zhuanzhuan/Protocol.lua @@ -0,0 +1,52 @@ +local Protocol = { + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌 + GAME_DIS_CARD = "611", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- 提示选择行为 + GAME_ACTION = "612", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 小结算 + GAME_EVT_RESULT1 = "817", + + -- 大结算 + GAME_EVT_RESULT2 = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + + -- 抓鸟事件 + GAME_EVT_NIAO = "821", + + -- 飘鸟提示 + GAME_EVT_PIAOTIP = "833", + + -- 飘鸟事件 + GAME_EVT_PIAO = "834", + + GAME_XIPAI = "20836", + GAME_EVENT_XIPAI = "20837", + GAME_EVENT_NOTIFY_XIPAI = "20838", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/majiang/zhuanzhuan/RecordEvent.lua b/lua_probject/extend_project/extend/majiang/zhuanzhuan/RecordEvent.lua new file mode 100644 index 00000000..09748550 --- /dev/null +++ b/lua_probject/extend_project/extend/majiang/zhuanzhuan/RecordEvent.lua @@ -0,0 +1,11 @@ +local Record_Event = { + Evt_GetCard = "GetCard", + Evt_OutCard = "OutCard", + Evt_Action = "Action", + Evt_Win = "Win", + Evt_Niao = "Niao", + Evt_Piao = "PiaoNiao", + Evt_Result = "Result", +} + +return Record_Event \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/chuntian/ChunTian_CardType.lua b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_CardType.lua new file mode 100644 index 00000000..8eaca2e2 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_CardType.lua @@ -0,0 +1,24 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 11:30 +--- + +local ChunTian_CardType = { + None = 0, + OneCard = 1,--一张 + OnePair = 2,--一对 + Straight = 3, --顺子 + Pairs = 4,--连对 + ThreeAndTwo = 5,--三带二 + ThreeAndOne = 7,--三带一 + Plane = 6,--飞机 + PlaneAndTwo = 8,--飞机带二 + PlaneAndOne = 9,--飞机带一 + Three = 10,--三张 + Bomb = 8,--炸 + TuiTuJI = 11, -- 推土机 + FourAndtThree=12,--四代三 + +} + +return ChunTian_CardType \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/chuntian/ChunTian_GameController.lua b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_GameController.lua new file mode 100644 index 00000000..5bc4e040 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_GameController.lua @@ -0,0 +1,782 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 11:28 +--- + +local ChunTian_Protocol = import(".ChunTian_Protocol") +local ChunTian_GameEvent = import(".ChunTian_GameEvent") +local ChunTian_CardType = import(".ChunTian_CardType") +local ChunTian_PutError = { + "必须先出最小的牌", + "出牌不符合规定牌型 ", + "下家报单,请出最大的牌 ", + "炸弹不能拆" +} + +local ChunTian_GameController = {} + +local M = ChunTian_GameController + +function M.new() + setmetatable(M, {__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("春天扑克") + self.class = "ChunTian_GameController" + return self +end + +function M:init(name) + GameController.init(self, name) + self:RegisterEvt() +end + +-- 事件注册 +function M:RegisterEvt() + self._eventmap[ChunTian_Protocol.ChunTian_Ming_Card] = self.OnMingCard + self._eventmap[ChunTian_Protocol.ChunTian_Init_Card] = self.OnInitCard + self._eventmap[ChunTian_Protocol.ChunTian_Options] = self.OnOptions + self._eventmap[ChunTian_Protocol.ChunTian_Index_Move] = self.OnIndexMove + self._eventmap[ChunTian_Protocol.ChunTian_Play_Succ] = self.OnPlaySucc + self._eventmap[ChunTian_Protocol.ChunTian_Put_Error] = self.OnPutError + self._eventmap[ChunTian_Protocol.ChunTian_Pass_Succ] = self.OnPassSucc + self._eventmap[ChunTian_Protocol.ChunTian_Result] = self.OnResult + self._eventmap[ChunTian_Protocol.ChunTian_Bomb_Score] = self.OnBombScore + self._eventmap[ChunTian_Protocol.ChunTian_Piao_Tip] = self.OnPiaoTip + self._eventmap[ChunTian_Protocol.ChunTian_Piao_Action] = self.OnPiaoAction + self._eventmap[ChunTian_Protocol.ChunTian_ConfirmToNextGameSucc] = self.OnConfrimToNextGameSucc + --self._eventmap[ChunTian_Protocol.ChunTian_Oener] = self.Oener + -- self._eventmap[Protocol.GAME_EVT_PLAYER_JOIN] = self.OnEventPlayerEnter + self._eventmap[ChunTian_Protocol.PT_GAMETUOGUAN] = self.Game_TuoGuan + + self._eventmap[ChunTian_Protocol.GAME_EVENT_XIPAI] = self.OnEventXiPai + self._eventmap[ChunTian_Protocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim + + self._eventmap[ChunTian_Protocol.GAME_EVT_CARDINHAND] = self.OnPlaySuccCheckHandCard + + --GAME_EVT_ALERT_BAO_CHUN = "22033", --通知报春 + --GAME_EVT_USER_BAO_CHUN_REQ = "22042", --玩家报春 报春/不报 + --GAME_EVT_USER_BAO_CHUN_RSP = "22043", --玩家报春广播 "seat": 座位 "jiao": 0-不叫 1-叫 "count": 抢/叫次数 + --GAME_EVT_USER_ALERT_QIANG_BAOCHUN = "22044", --通知玩家抢春 + --GAME_EVT_USER_QIANG_BAOCHUN_REQ = "22045", --玩家报春 "qiang": 0-不抢 1-抢 + + self._eventmap[ChunTian_Protocol.GAME_EVT_ALERT_BAO_CHUN] = self.OnAlertBaoChun + self._eventmap[ChunTian_Protocol.GAME_EVT_ALERT_TongYi_BAO_CHUN] = self.OnAlertTongYiBaoChun + + + +end + + +function M:SendXiPaiAction(callBack) + local _data = {} + local _client = ControllerManager.GameNetClinet + _client:send(ChunTian_Protocol.GAME_XIPAI, _data) + self.XiPaiCallBack=callBack +end + +function M:OnEventXiPai(evt_data) + if evt_data["result"]==0 then + if self.XiPaiCallBack then + self.XiPaiCallBack() + end + else + ViewUtil.ErrorTip(1000000,"申请洗牌失败") + end + +end + +function M:OnAlertBaoChun(evt_data) + printlog("通知报春================================") + local seat = evt_data["seat"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, ChunTian_GameEvent.OnAlertBaoChun,seat) + end + ) +end + +function M:OnAlertTongYiBaoChun(evt_data) + printlog("通知同意报春================================") + local seat = evt_data["seat"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, ChunTian_GameEvent.OnAlertTongYiBaoChun,seat) + end + ) +end + +function M:OnEventXiPaiAnim(evt_data) + printlog("洗牌动画===》》》》") + pt(evt_data) + local playeridList = evt_data["list"] + local my_isXiPai=false + local other_isXiPai=false + if playeridList and #playeridList>0 then + for i=1,#playeridList do + local p = self._room:GetPlayerById(playeridList[i]) + if p== self._room.self_player then + my_isXiPai=true + else + other_isXiPai=true + end + end + end + + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,ChunTian_GameEvent.EventXiPai,my_isXiPai,other_isXiPai) + end) +end + + +function M:SendCard(cards,currentCard) + local _data = {} + _data["card"] = cards + _data["all_card"] = currentCard + local _client = ControllerManager.GameNetClinet + _client:send(ChunTian_Protocol.ChunTian_Send_Card, _data) +end + +function M:SendPiao(piao) + local _data = {} + _data["id"] = piao + local _client = ControllerManager.GameNetClinet + _client:send(ChunTian_Protocol.ChunTian_Send_Piao, _data) +end + +function M:SendBaoChun(bc) + local _data = {} + _data["baochun"] = bc + local _client = ControllerManager.GameNetClinet + _client:send(ChunTian_Protocol.GAME_EVT_USER_BAO_CHUN_REQ, _data) +end + +function M:SendTongYiBaoChun(bcs) + local _data = {} + _data["tongyi"] = bcs + printlog("jefe bc:",bcs) + local _client = ControllerManager.GameNetClinet + _client:send(ChunTian_Protocol.GAME_EVT_USER_BAO_CHUN_RSP, _data) +end + +function M:SendPass() + local _client = ControllerManager.GameNetClinet + _client:send(ChunTian_Protocol.ChunTian_Send_Guo) +end + +function M:SendInitCardEnd() + local _client = ControllerManager.GameNetClinet + _client:send(ChunTian_Protocol.ChunTian_Init_Card_End) +end + +function M:ConformToNextGame() + local _client = ControllerManager.GameNetClinet + _client:send(ChunTian_Protocol.ChunTian_ConfirmToNextGame) +end + +function M:OnMingCard(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local card = evt_data["mingpai"] + self._cacheEvent:Enqueue( + function() + self._room.ming_card = card + DispatchEvent(self._dispatcher, ChunTian_GameEvent.OnMingCard, card) + end + ) +end + +function M:OnInitCard(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local cardlist = evt_data["cards"] + local round = evt_data["round"] + self._cacheEvent:Enqueue( + function() + for _, player in ipairs(self._room.player_list) do + player:Clear() + player.hand_count = #cardlist + end + + self._room.curren_round = round + DispatchEvent(self._dispatcher, ChunTian_GameEvent.OnInitCard, round, cardlist) + end + ) +end + +function M:OnBombScore(evt_data) + local scoreList = evt_data["gold_list"] + self._cacheEvent:Enqueue( + function() + for i = 1, #scoreList do + local score = scoreList[i].bom_score + local player = self._room:GetPlayerById(scoreList[i].aid) + player.total_score = player.total_score + score + end + DispatchEvent(self._dispatcher, ChunTian_GameEvent.OnBombScore, scoreList) + end + ) +end + +function M:OnPlaySucc(evt_data) + if pcall( + self.OnPlaySuccCheck,self,evt_data + ) then + + else + printlog("数据异常OnPlaySucc==>>>") + end +end + +function M:OnPlaySuccCheck(evt_data) + local seat = evt_data["player"] + local card_obj = evt_data["card_obj"] + local cards = card_obj["card_list"] + local remain = evt_data["remain"] -- 报单 + self._cacheEvent:Enqueue( + function() + local otherList = self:GetOtherSeatList(seat) + local player = self._room:GetPlayerBySeat(seat) + local out_card_list = self:ChangeCodeByFrom(cards, true) + player.hand_count = remain + local card_type, number, length, plan_three_count = self:GetCardListInfo(out_card_list) + player.out_card_list = self:GetSortOutCardList(out_card_list, card_type, number, plan_three_count) + DispatchEvent(self._dispatcher, ChunTian_GameEvent.OnPlaySucc, player, remain, card_type, number, otherList,length) + end + ) +end + +function M:OnPlaySuccCheckHandCard(evt_data) + local seat = evt_data["player"] + local cards = evt_data["handCards"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, ChunTian_GameEvent.OnPassSuccCheckCard,seat,cards) + end + ) + +end + + + + +function M:OnPassSucc(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue( + function() + local p = self._room:GetPlayerBySeat(seat) + p.out_card_list = {0} + DispatchEvent(self._dispatcher, ChunTian_GameEvent.OnPassSucc, p) + end + ) +end + +function M:OnPutError(evt_data) + local code = evt_data["error"] + self._cacheEvent:Enqueue( + function() + local error_str = self:GetErrorStr(code) + DispatchEvent(self._dispatcher, ChunTian_GameEvent.OnErrorTip, error_str) + end + ) +end +function M:TuoGuan(isTuo) + local _data = {} + _data["tuoguan"] = isTuo + local _client = ControllerManager.GameNetClinet + _client:send(ChunTian_Protocol.SEND_TUOGUAN, _data) +end + +function M:Game_TuoGuan(evt_data) + local tuoguan = evt_data["tuoguan"] + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher, ChunTian_GameEvent.Game_TuoGuan, tuoguan, seat) + end) +end +function M:OnIndexMove(evt_data) + local seat = evt_data["index"] + self._cacheEvent:Enqueue( + function() + self._room.curren_turn_seat = seat + self._room.is_new_bout = self:GetIsNewBout(seat) + DispatchEvent(self._dispatcher, ChunTian_GameEvent.OnIndexMove, seat) + end + ) +end + +function M:OnOptions(evt_data) + local play = evt_data["play"] + local pass = evt_data["pass"] + + self._cacheEvent:Enqueue( + function() + local lastCardList = self:GetLastCardList(self._room.self_player.seat) + local cardType, cardNum, cardLength = self:GetCardListInfo(lastCardList) + + DispatchEvent(self._dispatcher, ChunTian_GameEvent.OnOptions, play, cardType, cardNum, cardLength, pass) + end + ) +end + +function M:OnPiaoTip(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local piao = evt_data["piao"] + local reload = evt_data["reload"] + self._cacheEvent:Enqueue( + function() + + DispatchEvent(self._dispatcher, ChunTian_GameEvent.OnPiaoTips, piao,reload) + end + ) +end + +function M:OnPiaoAction(evt_data) + local seat = evt_data["seat"] + local piao = evt_data["piao"] + + self._cacheEvent:Enqueue( + function() + + DispatchEvent(self._dispatcher, ChunTian_GameEvent.OnPiaoAction, seat,piao) + end + ) +end + +function M:OnResult(evt_data) + local result_type = evt_data["type"] + + local info = evt_data["info"] + local winseat = evt_data["winseat"] + local chuntianstatus = evt_data['chuntianstatus'] + local remaincards = evt_data["remaincards"] + DataManager.CurrenRoom.xipaiScore=evt_data["xipai_score"] + printlog("wwwwwwwwwwwwwwwwwwwww1111111 ",result_type) + pt(chuntianstatus) + pt(evt_data) + if result_type == 1 then + local over = 1 + ControllerManager.SetGameNetClient(nil, true) + self._cacheEvent:Enqueue( + function() + for i = 1, #info do + local p = self._room:GetPlayerBySeat(info[i]["seat"]) + p.total_score = info[i]["score"] + info[i]["self_user"] = p.self_user + end + + DispatchEvent(self._dispatcher, ChunTian_GameEvent.OnResult, over, info, winseat,chuntianstatus, remaincards) + end + ) + elseif result_type == 0 then + local over = 0 + self._cacheEvent:Enqueue( + function() + for i = 1, #info do + local p = self._room:GetPlayerBySeat(info[i]["seat"]) + p.total_score = info[i]["score"] + info[i]["self_user"] = p.self_user + end + DispatchEvent(self._dispatcher, ChunTian_GameEvent.OnResult, over, info, winseat,chuntianstatus, remaincards) + end + ) + else + local dissolve = 1 + ControllerManager.SetGameNetClient(nil, true) + for i = 1, #info do + local p = self._room:GetPlayerBySeat(info[i]["seat"]) + p.total_score = info[i]["score"] + info[i]["self_user"] = p.self_user + end + -- ControllerManager.ChangeController(LoddyController) + DispatchEvent(self._dispatcher, ChunTian_GameEvent.OnResultByDissolve, over, info, winseat, dissolve) + end +end + +function M:OnConfrimToNextGameSucc(evt_data) + local aid = evt_data["aid"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, ChunTian_GameEvent.OnConfrimToNextGameSucc, aid) + end + ) +end +function M:Game_TuoGuan(evt_data) + local tuoguan = evt_data["tuoguan"] + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher, ChunTian_GameEvent.Game_TuoGuan, tuoguan, seat) + end) +end +function M:ChangeCodeByFrom(cardList, isSort) + isSort = isSort or false + local new_card_list = {} + for i = 1, #cardList do + local flower = math.floor(cardList[i] / 100) + local number = cardList[i] % 100 + if number == 2 then + number = 15 + end + local card = number * 10 + flower + new_card_list[#new_card_list + 1] = card + end + return isSort == true and table.sort(new_card_list) or new_card_list +end + +function M:GetOtherSeatList(seat) + local list = {} + for i = 1, self._room.room_config.people_num do + if seat ~= i then + list[#list + 1] = i + end + end + return list +end + +-- +function M:GetIsNewBout(seat) + local passCount = 0 + for i = 1, #self._room.player_list do + local player = self._room.player_list[i] + if seat ~= player.seat then + local isPass = self:GetIsPass(player.out_card_list) + if isPass then + passCount = passCount + 1 + end + end + end + if passCount == self._room.room_config.people_num - 1 then + return true + else + return false + end +end + +function M:GetLastSeat(seat) + local last_seat = seat - 1 + if last_seat < 1 then + last_seat = last_seat + self._room.room_config.people_num + end + return last_seat +end + +function M:GetLastCardList(seat) + local last_seat = self:GetLastSeat(seat) + local player = self._room:GetPlayerBySeat(last_seat) + local isPass = self:GetIsPass(player.out_card_list) + if isPass then + if self._room.room_config.people_num == 2 then + return {} + end + local last_seat_2 = self:GetLastSeat(last_seat) + local player_2 = self._room:GetPlayerBySeat(last_seat_2) + local isPass_2 = self:GetIsPass(player_2.out_card_list) + if isPass_2 then + return {} + else + return player_2.out_card_list + end + else + return player.out_card_list + end +end + +function M:GetErrorStr(code) + return ChunTian_PutError[code + 1] +end + +function M:GetSortOutCardList(outCardList, cardType, cardNumber, plan_three_count) + if cardType == 3 or cardType == 5 or cardType == 6 then + local removeList = {} + for i = #outCardList, 1, -1 do + local card = outCardList[i] + if math.floor(card / 10) == cardNumber then + removeList[#removeList + 1] = card + table.remove(outCardList, i) + end + end + for i = 1, #removeList do + table.insert(outCardList, 1, removeList[i]) + end + elseif cardType >= 7 and cardType <= 9 then + local removeList = {} + for i = #outCardList, 1, -1 do + local card = outCardList[i] + if math.floor(card / 10) <= cardNumber and math.floor(card / 10) > cardNumber - plan_three_count then + removeList[#removeList + 1] = card + table.remove(outCardList, i) + end + end + for i = 1, #removeList do + table.insert(outCardList, 1, removeList[i]) + end + end + return outCardList +end + +--None = 0, +--OneCard = 1, +--OnePair = 2, +--Three = 3, +--Pairs = 4, +--ThreeAndTwo = 5, +--ThreeAndOne = 6, +--Plane = 7, +--PlaneAndTwo = 8, +--PlaneAndOne = 9, +--Straight = 10, +--Bomb = 11 +--TuiTuJI =13 +-- 牌型,大小, 长度 +function M:GetCardListInfo(cardlist) + + if #cardlist == 0 then + return 0, 0, 0, 0 + end + -- 检测牌型 + + local card_type, card_num, card_length, plan_three_count = ChunTian_CardType.None, 0, #cardlist, 0 + local card_map = self:GetCardMapByList(cardlist) + if #cardlist == 1 then + card_type = ChunTian_CardType.OneCard + card_num = math.floor(cardlist[1] / 10) + + elseif #cardlist == 2 then + card_type = ChunTian_CardType.OnePair + card_num = math.floor(cardlist[1] / 10) + elseif #cardlist == 3 then + card_num = math.floor(cardlist[1] / 10) + if card_num==14 and DataManager.CurrenRoom.room_config.threeA==1 then + -- body + card_type = ChunTian_CardType.Bomb + else + card_type = ChunTian_CardType.Three + end + local count, max_key = 0, 0 + for k, v in pairs(card_map) do + if #v == 1 then + count = count + 1 + if k > max_key then + max_key = k + end + if count == 3 then + card_type = ChunTian_CardType.Straight + card_num = max_key + end + end + end + + elseif #cardlist == 4 then + local count, max_key = 0,0 + for k, v in pairs(card_map) do + if #v == 4 then + card_type = ChunTian_CardType.Bomb + card_num = k + elseif #v == 3 then + card_type = ChunTian_CardType.ThreeAndOne + card_num = k + elseif #v == 2 then + if k > max_key then + max_key = k + end + card_type = ChunTian_CardType.Pairs + card_num = max_key + elseif #v == 1 then + count = count + 1 + if k > max_key then + max_key = k + end + if count == 4 then + card_type = ChunTian_CardType.Straight + card_num = max_key + end + end + end + elseif #cardlist == 5 then + local count, max_key = 0, 0 + for k, v in pairs(card_map) do + if #v >= 3 then + card_type = ChunTian_CardType.ThreeAndTwo + card_num = k + elseif #v == 1 then + count = count + 1 + if k > max_key then + max_key = k + end + if count == 5 then + card_type = ChunTian_CardType.Straight + card_num = max_key + end + end + end + elseif #cardlist == 6 then + local max_key,count = 0,0 + for k, v in pairs(card_map) do + if #v == 2 then + if k > max_key then + max_key = k + end + card_type = ChunTian_CardType.TuiTuJI + card_num = max_key + elseif #v == 1 then + count = count + 1 + if k > max_key then + max_key = k + end + if count == 6 then + card_type = ChunTian_CardType.Straight + card_num = max_key + end + end + end + elseif #cardlist == 7 then + local count, max_key = 0, 0 + for k, v in pairs(card_map) do + if #v >= 4 then + card_type = ChunTian_CardType.FourAndtThree + card_num = k + elseif #v == 1 then + count = count + 1 + if k > max_key then + max_key = k + end + if count == 7 then + card_type = ChunTian_CardType.Straight + card_num = max_key + end + end + end + else + local one_count, two_count, three_count = 0, 0, 0 + local max_one_key, max_two_key, max_three_key = 0, 0, 0 + + for k, v in pairs(card_map) do + + if #v == 2 then + + if k > max_two_key then + max_two_key = k + end + two_count = two_count + 1 + if two_count == #cardlist / 2 then + card_type = ChunTian_CardType.TuiTuJI + card_num = max_two_key + end + elseif #v == 1 then + + if k > max_one_key then + max_one_key = k + end + one_count = one_count + 1 + if one_count == #cardlist then + card_type = ChunTian_CardType.Straight + card_num = max_one_key + end + elseif #v == 3 then + + if max_three_key == 0 then + max_three_key = k + three_count = three_count + 1 + elseif k > max_three_key and k == max_three_key + 1 then + max_three_key = k + three_count = three_count + 1 + elseif k < max_three_key and k == max_three_key - 1 then + max_three_key = k + three_count = three_count + 1 + -- else + -- max_three_key = k + end + + --three_count = three_count + 1 + end + end + -- plan_three_count = three_count + -- if three_count * 5 >= #cardlist then + -- card_type = ChunTian_CardType.PlaneAndTwo + -- card_num = max_three_key + -- elseif three_count * 4 >= #cardlist then + -- card_type = ChunTian_CardType.PlaneAndOne + -- card_num = max_three_key + -- elseif three_count * 3 >= #cardlist then + -- card_type = ChunTian_CardType.Plane + -- card_num = max_three_key + -- end + plan_three_count = three_count + + if three_count * 3 == #cardlist then + card_type = ChunTian_CardType.Plane + card_num = max_three_key + + elseif three_count * 4 >= #cardlist and #cardlist%4==0 then + card_type = ChunTian_CardType.PlaneAndOne + card_num = max_three_key + + + elseif three_count * 5 >= #cardlist and #cardlist%5==0 then + card_type = ChunTian_CardType.PlaneAndTwo + card_num = max_three_key + + + end + + + + end + + return card_type, card_num, card_length, plan_three_count +end + +function M:GetCardMapByList(cardlist) + local card_map = {} + for i = 1, #cardlist do + local card = cardlist[i] + local card_num = math.floor(cardlist[i] / 10) + if card_map[card_num] == nil then + card_map[card_num] = {card} + else + card_map[card_num][#card_map[card_num] + 1] = card + end + end + return card_map +end + +function M:GetIsPass(cardlist) + if #cardlist == 0 then + return true + end + if cardlist[1] ~= nil and cardlist[1] == 0 then + return true + end + return false +end + +--请求离开房间 +function M:LevelRoom(callBack) + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + _client:send( + Protocol.GAME_EXIT_ROOM, + nil, + function(res) + if res.ReturnCode == 0 then + ControllerManager.ChangeController(LoddyController) + elseif res.ReturnCode == 27 then + ViewUtil.ErrorTip(res.ReturnCode, "退出房间失败!") + end + callBack(res) + end + ) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/chuntian/ChunTian_GameEvent.lua b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_GameEvent.lua new file mode 100644 index 00000000..ebcc2f46 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_GameEvent.lua @@ -0,0 +1,25 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:55 +--- +local ChunTian_GameEvent = { + OnMingCard = "OnMingCard", + OnInitCard = "OnInitCard", + OnOptions = "OnOptions", + OnPiaoTips = "OnPiaoTips", + OnPiaoAction = "OnPiaoAction", + OnBombScore = "OnBombScore", + OnIndexMove = "OnIndexMove", + OnPlaySucc = "OnPlaySucc", + OnErrorTip = "OnErrorTip", + OnPassSucc = "OnPassSucc", + OnResult = "OnResult", + OnResultByDissolve = "OnResultByDissolve", + OnConfrimToNextGameSucc = "OnConfrimToNextGameSucc", + Game_TuoGuan="Game_TuoGuan", + EventXiPai="EventXiPai", + OnPassSuccCheckCard="OnPassSuccCheckCard", + OnAlertBaoChun="OnAlertBaoChun", + OnAlertTongYiBaoChun="OnAlertTongYiBaoChun", +} +return ChunTian_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/chuntian/ChunTian_MainView.lua b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_MainView.lua new file mode 100644 index 00000000..5ef2ec3b --- /dev/null +++ b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_MainView.lua @@ -0,0 +1,1518 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 9:41 +--- +local PKMainView = import("main.poker.PKMainView") +local ChunTian_PlayerPokerInfoView = import(".ChunTian_PlayerPokerInfoView") +local ChunTian_PlayerSelfPokerInfoView = import(".ChunTian_PlayerSelfPokerInfoView") +local ChunTian_GameEvent = import(".ChunTian_GameEvent") +local ChunTian_ResultView = import(".ChunTian_ResultView") +local ChunTian_RightPanelView = import(".ChunTian_RightPanelView") +local PlayerInfoView = import(".EXPlayerInfoView") +local TableBG = import('Game.Data.TableBG') +local M = {} +function M.new() + setmetatable(M, {__index = PKMainView}) + local self = setmetatable({}, {__index = M}) + self.class = "ChunTian_MainView" + self:init() + self._gamectr = ControllerManager.GetController(GameController) + return self +end + +local default_bg = 1 +local bg_config = { + {id = 1, url = 'extend/poker/chuntian/bg/bg1', thumb = 'ui://Extend_Poker_ChunTian/table_bg1'}, + {id = 2, url = 'extend/poker/chuntian/bg/bg2', thumb = 'ui://Extend_Poker_ChunTian/table_bg2'}, + {id = 3, url = 'extend/poker/chuntian/bg/bg3', thumb = 'ui://Extend_Poker_ChunTian/table_bg3'} +} + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/poker/chuntian/ui/Extend_Poker_ChunTian") + printlog(room.room_config.people_num) + PKMainView.InitView(self, "ui://Extend_Poker_ChunTian/ChunTian_Main_" .. room.room_config.people_num,nil,1,default_bg,bg_config,nil,"ui://Extend_Poker_ChunTian/SettingWindow1") + local _room = DataManager.CurrenRoom + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id.._room.game_id.."pai") + if json_data == nil then + local _gamectr = self._gamectr + self._room.pai = 0 + else + local _data = json.decode(json_data) + local pai = _data["pai"] + self._room.pai = pai + end + + json_data = Utils.LoadLocalFile(user_id.._room.game_id.."cardsize") + if json_data == nil then + local _gamectr = self._gamectr + self._room.cardsize = 1 + else + local _data = json.decode(json_data) + local cardsize = _data["cardsize"] + self._room.cardsize = cardsize + end + + + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem, self) + tem.visible = false + end + local list = self._room.player_list + for i=1,#list do + local p = list[i] + local info = _player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + end + + + local rightpanel = self._view:GetChild("right_panel") + if self._rightPanelView ~= nil then + self._rightPanelView:Destroy() + end + + self._rightPanelView = ChunTian_RightPanelView.new(self, rightpanel) + for i=1,#self._room.player_list do + + if self._room.self_player.seat==self._room.player_list[i].seat and self._room.self_player.self_user.account_id ~= self._room.player_list[i].self_user.account_id then + -- body + local ErrorMsgTip = UIPackage.CreateObject("Common", "Win_ConnectTip") + local _action = self._view:AddChild(ErrorMsgTip) + _action.xy = Vector2((self._view.width - _action.width) / 4, self._view.height / 4) + local text = _action:GetChild("tex_message") + local btn1 = _action:GetChild("btn_connect") + local btn2 = _action:GetChild("btn_back") + text.text = "您来晚了,座位有人,请重新进牌桌" + btn1.visible=false + btn2:Center() + btn2.y=btn2.y+50 + btn2.onClick:Set(function() + -- body + ErrorMsgTip:Destroy() + ErrorMsgTip = nil + self._gamectr:LevelRoom(function(res) + ViewUtil.CloseModalWait() + NetResetConnectWindow.CloseNetReset() + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + end) + end + end + + if self._room.hpOnOff == 1 and self._room.score_times ~= 1 then + -- body + self._view:GetChild("roominfo_panel1"):GetChild("tex_beishu").text=self._room.score_times .."倍" + else + self._view:GetChild("roominfo_panel1"):GetChild("tex_beishu").text="" + end + + self.ctr_state = self._view:GetController("state") + self._ctr_action = self._view:GetController("action") + self._tex_leftTime = self._view:GetChild("time"):GetChild("title") + self.ctr_time = self._view:GetController("time") + self._text_round = self._view:GetChild("round") + self.ctr_card_eff = self._view:GetController("card_eff") + self._player_card_info = {} + + local _player_card_info = self._player_card_info + for i = 1, room.room_config.people_num do + local tem = self._view:GetChild("player_card_info_" .. i) + _player_card_info[i] = self:NewPlayerCardInfoView(tem, i) + end + + local list = room.player_list + if not room.self_player.ready then + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig then + if round>1 then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 2 + end + + else + self._ctr_action.selectedIndex = 1 + end + else + self._ctr_action.selectedIndex = 0 + end + self._left_time = 0 + self.bgm_index = 1 + local state = self._room.CurnrenState + + if room.CurnrenState ~= StateType.PalyingWait then + self._state.selectedIndex = state + if room.CurnrenState == StateType.Palying then + self:ReConnectForStart() + end + else + + self._state.selectedIndex = StateType.Palying + self:ReconnectForClearing() + + end + + self._view:GetChild("btn_back_jiesan").onClick:Set(function () + if self.dismiss_room_cd_time > 0 then + ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!") + else + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:AskDismissRoom() + end + + end) + --local tempdsaf=self._view:GetChild("btn_back_jiesan") + --tempdsaf:GetChild("n3").displayObject.gameObject:SetActive(false) + --self._view:GetChild("btn_back_jiesan").displayObject.gameObject:SetActive(false) + + self:ChangeBgmMusic() + self:EventInit() + + self._view:GetChild("mask").onClick:Set(function() + self:ResetPoker() + end) + local btn_rule = self._view:GetChild("right_panel"):GetChild("btn_log") + self._view:GetChild('info_text'):GetChild('text').text = room.room_config:GetDes() + + if room.room_config.people_num == 2 then + self._view:GetChild('wanfa_text').text = '二人春天' .. room.score_times .. '倍' + else + if room.room_config.people_num==3 then + self._view:GetChild('wanfa_text').text = '三人春天' .. room.score_times .. '倍' + else + self._view:GetChild('wanfa_text').text = '四人春天' .. room.score_times .. '倍' + end + + end + +end +function M:UpdateCard( index ) + self._room.pai=index + local card_info = self._player_card_info[1] + -- for i=1,#self._room.player_list do + -- print(i) + -- end + card_info:updatePoker() + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + + if self._room.curren_turn_seat ~= player.seat then + if player.out_card_list[1] == 0 then + player_card_info:SetOutCardInfo(nil, true) + else + player_card_info:SetOutCardInfo(player.out_card_list, false) + end + end + end + if self.caozuo==1 then + local ctr_number = self.pass == nil and 2 or 1 + local lastCardList = self._gamectr:GetLastCardList(self._room.self_player.seat) + local cardType, cardNum, cardLength = self._gamectr:GetCardListInfo(lastCardList) + printlog("caozuo",cardType) + local m = false + local next_seat = self._room.self_player.seat + 1 + if next_seat > self._room.room_config.people_num then + next_seat = next_seat - self._room.room_config.people_num + end + if self._room:GetPlayerBySeat(next_seat).hand_count == 1 and self._room.room_config.WillBeOut == 1 then + m = true + end + local zdts = self._view:GetController("zidongtishi").selectedIndex + self._player_card_info[1]:ShowOutCardOption(ctr_number, cardType, cardNum, cardLength,m) + end +end + +function M:UpdateCardSize(index) + self._room.cardsize=index + local card_info = self._player_card_info[1] + card_info:updatePoker() +end + +function M:NewPlayerCardInfoView(tem, index) + if index == 1 then + return ChunTian_PlayerSelfPokerInfoView.new(tem, self) + end + return ChunTian_PlayerPokerInfoView.new(tem, self) +end + +function M:OnPlayerEnter(...) + MainView.OnPlayerEnter(self, ...) + local arg = {...} + local p = arg[1] + local index = self:GetPos(p.seat) + local info = self._player_info[index] + local selecet_seat = self._view:GetChild("seat_" .. index) + if selecet_seat ~= nil then + selecet_seat.visible = true + end + info:FillData(p) + if self._room.banker_seat == self._room.self_player.seat and self._room.self_player.ready then + self._ctr_action.selectedIndex = 0 + end +end + +function M:OnPlayerReady(...) + local arg = {...} + local p = arg[1] + local _room = self._room + local _player_info = self._player_info + if p.seat == _room.self_player.seat then + self._ctr_action.selectedIndex = 0 + end + local info = _player_info[self:GetPos(p.seat)] + info:Ready(true) +end + +function M:OnPlayerLeave(...) + MainView.OnPlayerLeave(self, ...) + local _room = self._room + if not _room.self_player.ready then + --self._ctr_action.selectedIndex = 1 + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig then + if round>1 then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 2 + end + + else + self._ctr_action.selectedIndex = 1 + end + else + self._ctr_action.selectedIndex = 0 + end +end + + +function M:EventInit() + local _gamectr = ControllerManager.GetController(GameController) + MainView.EventInit(self) + local _player_info = self._player_info + local _player_card_info = self._player_card_info + local _room = self._room + + + _gamectr:AddEventListener(ChunTian_GameEvent.EventXiPai,function( ... ) + + if self.result_view ~= nil then + self.result_view:Destroy() + self.result_view = nil + end + + self._player_card_info[1]:HidePiao() + + if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + self.MypokerList = cardlist + end + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 0 + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local head_info = self._player_info[self:GetPos(p.seat)] + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + -- body + + if self._room.room_config.showlength==1 then + -- body + head_info._view:GetController("shengyu").selectedIndex=1 + else + head_info._view:GetController("shengyu").selectedIndex=0 + end + + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..p.hand_count.."张" + + + + end + p:Clear() + head_info:FillData(p) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:Clear() + head_info:Ready(false) + + end + + + --[[if ( currentPlayer ) then + self._popEvent = false + local xipaiCB=function () + self._popEvent = true + end + self:PlayXiPai(xipaiCB) + else + ViewUtil.ShowModalWait(self._root_view,"等待其它玩家洗牌...") + coroutine.start(function() + coroutine.wait(3) + ViewUtil.CloseModalWait() + end) + + + end--]] + + + local arg = {...} + local currentPlayer1=arg[1] + local currentPlayer2=arg[2] + self._popEvent = false + if ( currentPlayer1 ) then + + local xipaiCB=function () + self._popEvent = true + end + self:PlayXiPai(xipaiCB) + + end + + + if ( currentPlayer2 ) then + --self._popEvent = false + local xipaiCB2=function () + self._popEvent = true + end + self:PlayXiPai1(xipaiCB2) + end + + + + end) + + _gamectr:AddEventListener(ChunTian_GameEvent.OnMingCard, function(...) + local arg = {...} + local card = arg[1] + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 1 + self:PlayCardEff(card) + end) + + _gamectr:AddEventListener(ChunTian_GameEvent.OnInitCard, function(...) + local arg = {...} + local round = arg[1] + local cardlist = arg[2] + + + if self.result_view ~= nil then + self.result_view:Destroy() + self.result_view = nil + end + + self._player_card_info[1]:HidePiao() + + if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + self.MypokerList = cardlist + end + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 0 + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + self:UpdateRound(round) + ViewUtil.PlaySound("ChunTian_PK", "extend/poker/chuntian/sound/fapai.mp3") + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local head_info = self._player_info[self:GetPos(p.seat)] + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + -- body + + if self._room.room_config.showlength==1 then + -- body + head_info._view:GetController("shengyu").selectedIndex=1 + else + head_info._view:GetController("shengyu").selectedIndex=0 + end + + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..p.hand_count.."张" + + + + end + p:Clear() + head_info:FillData(p) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:Clear() + head_info:Ready(false) + + if p.seat == self._room.self_player.seat then + if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + card_info:InitPoker(cardlist,true,1) + else + card_info:InitPoker(cardlist,true) + end + + else + --card_info:UpdateHandPoker(#cardlist,true,false) --todo + --card_info:UpdateRemainCard(#cardlist,true) + end + end + end) + + + -- _gamectr:AddEventListener(ChunTian_GameEvent.Oener,function ( ... ) + -- local arg = {...} + -- local seat = arg[1] + -- local head_info = self._player_info[self:GetPos(seat)] + -- head_info._view:GetController("Oener").selectedIndex=1 + -- end) + _gamectr:AddEventListener(ChunTian_GameEvent.OnIndexMove, function(...) + local arg = {...} + local seat = arg[1] + local isNewBout = arg[2] + local index = self:GetPos(seat) + + self.ctr_time.selectedIndex = index + -- for i=1,#self._player_info do + -- if index==i then + -- -- body + -- local head_info = self._player_info[index] + -- head_info:MarkBank(true) + -- else + -- local head_info = self._player_info[i] + -- head_info:MarkBank(false) + -- end + -- end + + if index == 1 then + local card_info = self._player_card_info[index] + card_info:SetOutCardInfo(nil, false) + -- if self.MypokerList ~= nil then + -- -- body + -- card_info:Clear() + -- card_info:InitPoker(self.MypokerList, false) + -- self.MypokerList = nil + -- end + end + self._left_time = 20 + if self._room.ming_card ~= nil then + self._view:GetTransition("t" .. index):Play() + self._room.ming_card = nil + if self.tween ~= nil then + TweenUtils.Kill(self.tween) + self.tween = nil + end + end + end) + + _gamectr:AddEventListener(ChunTian_GameEvent.OnBombScore, function(...) + local arg = {...} + local scoreList = arg[1] + -- for i = 1, #scoreList do + -- local player = self._room:GetPlayerBySeat(i) + -- local card_info = self._player_card_info[self:GetPos(i)] + -- local head_info = self._player_info[self:GetPos(i)] + -- card_info:PlayScore(scoreList[i], true) + -- head_info:UpdateScore(player.total_score) + -- end + end) + + _gamectr:AddEventListener(ChunTian_GameEvent.OnPlaySucc, function(...) + local arg = {...} + local p = arg[1] + local card_number = arg[2] + local cardstype = arg[3] + local num = arg[4] + local otherList = arg[5] + local length = arg[6] + self.ctr_time.selectedIndex = 0 + + local index = self:GetPos(p.seat) + if index==1 then + self.caozuo=0 + end + local head_info = self._player_info[index] + if head_info._view:GetChild("shengyu")~=nil then + -- body + -- body + if card_number~=nil then + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..card_number.."张" + end + + + end + local card_info = self._player_card_info[index] + card_info:SetOutCardInfo(p.out_card_list, false, true) + for i = 1, #otherList do + local other_seat = otherList[i] + local other_card_info = self._player_card_info[self:GetPos(other_seat)] + other_card_info:SetOutCardBlack() + end + + if index == 1 then + card_info:DeleteHandCards(p.out_card_list) + else + card_info:SetRemainCardNumber(card_number == 1) + --card_info:UpdateHandPoker(card_number,false,false) -- todo + end + if self._room.is_new_bout == true then + for i = 1, #self._room.player_list do + local player = self._room.player_list[i] + local card_info_i = self._player_card_info[self:GetPos(player.seat)] + if p.seat ~= player.seat then + card_info_i:SetOutCardInfo(nil, false) + end + end + -- card_info:PlayCardTypeEff(cardstype) + -- if cardstype~=12 then + -- -- body + + + -- if cardstype==10 and length>=6 then + -- -- card_info_i + -- local chuan = UIPackage.CreateObject("Extend_Poker_ChunTian", "chuan1") + -- local card_info_i = self._player_card_info[self:GetPos(p.seat)] + + -- card_info_i._mask_liangpai:AddChild(chuan) + -- chuan:GetChild("n0").asMovieClip.playing = true + -- ViewUtil.PlaySound("ChunTianNew_PK", "extend/poker/paodekuai/sound/sunzi.mp3") + -- coroutine.start(function() + -- coroutine.wait(1.5) + -- if chuan~=nil then + -- -- body + -- chuan:Dispose() + -- end + + -- end) + + -- else + -- self:_Effect(cardstype, p) + -- end + -- end + self:_Effect(cardstype, p) + + else + if cardstype == 11 and cardstype~=12 then + self:_Effect(cardstype, p) + end + end + self:PlaySound(p.self_user.sex, self:GetSoundFileName(cardstype, num, self._room.is_new_bout)) + if card_number == 1 then + --self:ChangeBgmMusic(2) + self:ChangeBgmMusic(1) + if self._cor_sound ~= nil then + coroutine.stop(self._cor_sound) + end + self._cor_sound = nil + self._cor_sound = coroutine.start(function() + coroutine.wait(1) + self:PlaySound(p.self_user.sex, "card_1") + end) + end + + end) + + + _gamectr:AddEventListener(ChunTian_GameEvent.OnPassSuccCheckCard, function(...) + self._popEvent = false + local arg = {...} + local seat = arg[1] + local cards = arg[2] + --self.MypokerList=cards + self.ctr_time.selectedIndex = 0 + local card_info = self._player_card_info[self:GetPos(seat)] + if seat == self._room.self_player.seat then + card_info:ClearCheck() + card_info:InitPoker(cards, false) + + --local player=self._room:GetPlayerBySeat(seat) + --if player.out_card_list[1] == 0 then + -- player_card_info:SetOutCardInfo(nil, true) + --else + --player:SetOutCardInfo({207}, false) + -- end + end + + self._popEvent = true + + end) + + _gamectr:AddEventListener(ChunTian_GameEvent.OnPassSucc, function(...) + local arg = {...} + local p = arg[1] + + self.ctr_time.selectedIndex = 0 + local card_info = self._player_card_info[self:GetPos(p.seat)] + + --card_info:SetOutCardInfo(nil, false) + if p.seat == self._room.self_player.seat and self.MypokerList ~= nil then + -- body + card_info:Clear() + card_info:InitPoker(self.MypokerList, false) + self.MypokerList = nil + end + card_info:SetOutCardInfo(nil, true) + self:PlaySound(p.self_user.sex, "pass_" .. math.random(1, 4)) + end) + + _gamectr:AddEventListener(ChunTian_GameEvent.OnErrorTip, function(...) + local arg = {...} + local error_str = arg[1] + self._player_card_info[1]:ErrorTip(error_str) + -- self._player_card_info[1]:ResetPoker() + end) + + _gamectr:AddEventListener(ChunTian_GameEvent.OnPiaoTips, function(...) + local arg = {...} + local piao = arg[1] + local reload = arg[2] + if reload == 0 then + + if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + self.MypokerList = cardlist + end + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 0 + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + self:UpdateRound(self._room.curren_round) + + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local head_info = self._player_info[self:GetPos(p.seat)] + + p:Clear() + head_info:FillData(p) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:Clear() + head_info:Ready(false) + head_info:UpdatePiao(-1) + end + end + + self._player_card_info[1]:ShowPiao(piao) + end) + + _gamectr:AddEventListener(ChunTian_GameEvent.OnPiaoAction, function(...) + local arg = {...} + local seat = arg[1] + local piao = arg[2] + local head_info = self._player_info[self:GetPos(seat)] + head_info:UpdatePiao(piao) + end) + + _gamectr:AddEventListener(ChunTian_GameEvent.OnOptions, function(...) + local arg = {...} + local play = arg[1] + local pass = arg[5] + local card_type = arg[2] + local card_number = arg[3] + local card_length = arg[4] + local ctr_number = pass == nil and 2 or 1 + self.caozuo=1 --记录是否是自己出牌的阶段 + self.pass=pass + local m = false + local next_seat = self._room.self_player.seat + 1 + local card_info = self._player_card_info[1] + --card_info:SetOutCardInfo(nil, false) + + if self.MypokerList ~= nil then + -- body + card_info:Clear() + card_info:InitPoker(self.MypokerList, false) + self.MypokerList = nil + end + if next_seat > self._room.room_config.people_num then + next_seat = next_seat - self._room.room_config.people_num + end + if self._room:GetPlayerBySeat(next_seat).hand_count == 1 and self._room.room_config.WillBeOut == 1 then + m = true + end + local zdts = self._view:GetController("zidongtishi").selectedIndex + self._player_card_info[1]:ShowOutCardOption(ctr_number, card_type, card_number, card_length,m,play,zdts) + end) + -- 托管 + _gamectr:AddEventListener(ChunTian_GameEvent.Game_TuoGuan, function(...) + local arg = {...} + local tuoguan = arg[1] + local seat = arg[2] + + local tuoguanzhong = self._view:GetChild("tuoguanzhong") + local zhezhao = self._view:GetChild("n109") + local head_info = self._player_info[self:GetPos(seat)] + if (tuoguan == 1) then + if (seat == self._room.self_player.seat ) then + tuoguanzhong.visible = true + -- tuoguanzhong.sortingOrder = 2 + zhezhao.visible = true + zhezhao.onClick:Set(function() + _gamectr:TuoGuan(0) + end) + else + head_info._view:GetController("tuoguan").selectedIndex = 1 + end + -- if self.ispanguangzhe == true then + -- -- body + -- zhezhao.visible = false + -- end + else + if (seat == self._room.self_player.seat) then + tuoguanzhong.visible = false + zhezhao.visible = false + -- local btn_tuoguan = self._view:GetChild("n107") + -- btn_tuoguan.onClick:Set(function() + -- _gamectr:TuoGuan(1) + -- -- self:ZhiNengtuoguan() + -- end) + else + head_info._view:GetController("tuoguan").selectedIndex = 0 + end + end + end) + _gamectr:AddEventListener(ChunTian_GameEvent.OnResult, function(...) + local arg = {...} + local over = arg[1] + local info = arg[2] + local win_seat = arg[3] + local chuntianstatus = arg[4] + local remaincards = arg[5] + -- local energyTab = arg[5] + printlog("OnResult...") + + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if self.MypokerList ~= nil then + -- body + local card_info = self._player_card_info[self:GetPos(self._room.self_player.seat)] + card_info:Clear() + card_info:InitPoker(self.MypokerList, false) + self.MypokerList = nil + end + if otherpoker_list ~= nil then + -- body + otherpoker_list:RemoveChildrenToPool() + otherpoker_list.visible=true + end + + if remaincards then + -- body + local newremaincards = _gamectr:ChangeCodeByFrom(remaincards,true) + table.sort(remaincards) + for i = #newremaincards, 1, -1 do + coroutine.start(function() + coroutine.wait(0.01) + + local flow = newremaincards[i] % 10 + local num = (newremaincards[i] - (newremaincards[i] % 10)) / 10 + local card_n = flow * 100 + num + local poker_item = UIPackage.CreateObject("Extend_Poker_ChunTian", "poker6") + + --local code = self:ChangeCodeByTo(card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/" .. card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + local card_code_obj = nil + if DataManager.CurrenRoom.pai==0 then + if card_n==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..card_n.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..card_n) + end + + else + if card_n==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..card_n.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + end + + end + if card_code_obj ~= nil then + card_code_obj:SetScale(0.6, 0.6) + if poker_item ~= nil then + poker_item:AddChild(card_code_obj) + otherpoker_list:AddChild(poker_item) + end + + end + + end) + + + end + + end + + + if self._cor_sound ~= nil then + coroutine.stop(self._cor_sound) + self._cor_sound = nil + end + + if self.destory_win ~= nil then + coroutine.stop(self.destory_win) + end + + self.destory_win = nil + self.destory_win = coroutine.start(function() + if chuntianstatus == 1 then + printlog("OnResult...des666") + local url = "ui://Extend_Poker_ChunTian/Spring" + self.WinItem_view = UIPackage.CreateObjectFromURL(url) + self._view:AddChild(self.WinItem_view) + self.WinItem_view:Center() + self.WinItem_view:GetTransition("t0"):Play() + ViewUtil.PlaySound("ChunTian_PK", "base/common/sound/win new.mp3") + coroutine.wait(1.5) + end + if chuntianstatus == 2 then + printlog("OnResult...des777") + local url = "ui://Extend_Poker_ChunTian/Spring1" + self.WinItem_view = UIPackage.CreateObjectFromURL(url) + self._view:AddChild(self.WinItem_view) + self.WinItem_view:Center() + self.WinItem_view:GetTransition("t0"):Play() + ViewUtil.PlaySound("ChunTian_PK", "base/common/sound/win new.mp3") + coroutine.wait(1.5) + end + if chuntianstatus == 3 then + local url = "ui://Extend_Poker_ChunTian/Spring3" + self.WinItem_view = UIPackage.CreateObjectFromURL(url) + self._view:AddChild(self.WinItem_view) + self.WinItem_view:Center() + self.WinItem_view:GetTransition("t0"):Play() + ViewUtil.PlaySound("ChunTian_PK", "base/common/sound/win new.mp3") + coroutine.wait(1.5) + end + + + + printlog("OnResult...eff") + for i = 1, #info do + local player = info[i] + local p = self._room:GetPlayerBySeat(player.seat) + local head_info = self._player_info[self:GetPos(player.seat)] + local card_info = self._player_card_info[self:GetPos(player.seat)] + if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then + p.hp_info = player.hp_info + head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) + head_info._view:GetChild('zhanji').visible = true + local num = player.hp_info.total_hp + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(player.hp_info.total_hp) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + end + card_info:PlayScore(d2ad(player.hp_info.round_actual_hp), false, win_seat == player.seat) + else + local rt = 1 + if self._room.hpOnOff == 1 then + rt = self._room.score_times + end + if over == 1 and self._room.hpOnOff == 1 then + head_info:UpdateScore(player.score / 10) --不可负分 + else + head_info:UpdateScore(player.score * rt) + end + card_info:PlayScore(player.winscore * rt, false, win_seat == player.seat) + end + + + if player.seat ~= self._room.self_player.seat then + card_info:UpdateHandPoker(player.cards, false, true) + card_info:SetRemainCardNumber(false) + end + end + self:ChangeBgmMusic(1) + + + self.result_view = ChunTian_ResultView.new(self._root_view, info, self._room.room_id, over, win_seat, 0, remaincards) + self.result_view:Show() + if self.WinItem_view ~= nil then + self.WinItem_view:Dispose() + self.WinItem_view = nil + end + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + + if self._room.self_player.entrust == true then + local btn_confirm = self.result_view._view:GetChild("btn_confirm") + btn_confirm.onClick:Call() + end + end) + + if over==1 then + -- body + self:UnmarkSelfTuoguan() + ControllerManager.ChangeController(LoddyController) + + end + + + + end) + + _gamectr:AddEventListener(ChunTian_GameEvent.OnResultByDissolve, function(...) + + local arg = {...} + local over = arg[1] + local info = arg[2] + local winseat = arg[3] + local dissolve = arg[4] + + self.result_view = ChunTian_ResultView.new(self._root_view, info, self._room.room_id, over, winseat, dissolve,nil) + self.result_view:Show() + ControllerManager.ChangeController(LoddyController) + self:UnmarkSelfTuoguan() + end) + + -- 确定开始下一局 成功 + _gamectr:AddEventListener(ChunTian_GameEvent.OnConfrimToNextGameSucc, function(...) + local arg = {...} + local aid = arg[1] + local p = self._room:GetPlayerById(aid) + if p.seat == self._room.self_player.seat then + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + if self.destory_win ~= nil then + coroutine.stop(self.destory_win) + self.destory_win = nil + end + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + local player_head = self._player_info[self:GetPos(player.seat)] + player_card_info:Clear() + local otherpoker_list = self._view:GetChild("otherpoker_list") + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + --player_head._view:GetController("Oener").selectedIndex=0 + end + end + local player_info = self._player_info[self:GetPos(p.seat)] + player_info:Ready(true) + end) + + -------------------报春提示---------------------------- + _gamectr:AddEventListener(ChunTian_GameEvent.OnAlertBaoChun, function(...) + local arg = {...} + local seat = arg[1] + printlog("报春自己座位号+++++++++++++++++") + self._player_card_info[1]:ShowBaoChun(1) + end) + + _gamectr:AddEventListener(ChunTian_GameEvent.OnAlertTongYiBaoChun, function(...) + local arg = {...} + local seat = arg[1] + printlog("同意报春座位号+++++++++++++++++") + self._player_card_info[1]:ShowTongYiBaoChun(2) + end) + +end + +function M:ReConnectForStart() + + local _gamectr = ControllerManager.GetController(GameController) + self._room.is_new_bout = _gamectr:GetIsNewBout(self._room.curren_turn_seat) + self._state.selectedIndex = 1 + self._view:GetController("time").selectedIndex = self:GetPos(self._room.curren_turn_seat) + + self:UpdateRound(self._room.curren_round) + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + local head_info = self._player_info[self:GetPos(player.seat)] + head_info:Ready(false) + + --如果是体力值不可负分模式 则显示当前的hp值 + if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then + head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) + head_info._view:GetChild('zhanji').visible = true + local num = player.hp_info.total_hp + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = '+' .. d2ad(player.hp_info.total_hp) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + end + else + local rt = 1 + if self._room.hpOnOff == 1 then + rt = self._room.score_times + end + head_info:UpdateScore(player.total_score * rt) + end + + head_info:UpdateLineState(player.line_state) + head_info:UpdatePiao(player.piao) + + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + -- body + + + if self._room.room_config.showlength==1 then + -- body + head_info._view:GetController("shengyu").selectedIndex=1 + else + head_info._view:GetController("shengyu").selectedIndex=0 + end + + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..player.hand_count.."张" + + + + end + if player.seat == self._room.self_player.seat then + if player.open ~= nil and player.open == 0 and self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + self.MypokerList = player.hand_list + player_card_info:InitPoker(player.hand_list, false, 1) + + else + + player_card_info:InitPoker(player.hand_list, false) + end + + else + + player_card_info:SetRemainCardNumber(player.hand_count == 1) + if player.hand_count == 1 then + self.bgm_index = 2 + end + end + if self._room.curren_turn_seat ~= player.seat then + -- head_info:MarkBank(false) + if player.out_card_list[1] == 0 then + player_card_info:SetOutCardInfo(nil, false) + else + player_card_info:SetOutCardInfo(player.out_card_list, false) + end + else + -- head_info:MarkBank(true) + end + end +end + +function M:ReconnectForClearing() + self:UpdateRound(self._room.curren_round) + local win_seat = 0 + --self.rank_view = self:CreateRankEff(self._room.winseat) + for _, player in ipairs(self._room.player_list) do + local head_info = self._player_info[self:GetPos(player.seat)] + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + + --如果是体力值不可负分模式 则显示当前的hp值 + if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then + head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) + head_info._view:GetChild('zhanji').visible = true + local num = player.hp_info.total_hp + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = '+' .. d2ad(player.hp_info.total_hp) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + end + -- player_card_info:PlayScore(d2ad(player.hp_info.round_actual_hp)) + else + local rt = 1 + if self._room.hpOnOff == 1 then + rt = self._room.score_times + end + head_info:UpdateScore(player.total_score * rt) + -- player_card_info:PlayScore(player.winscore * rt, false, self._room.winseat) + end + + head_info:UpdateLineState(player.line_state) + --head_info._view:GetController("Oener").selectedIndex=0 + head_info:UpdatePiao(player.piao) + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + -- body + + if self._room.room_config.showlength==1 then + -- body + head_info._view:GetController("shengyu").selectedIndex=1 + else + head_info._view:GetController("shengyu").selectedIndex=0 + end + + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..player.hand_count.."张" + + end + + + if player.seat == self._room.self_player.seat then + + player_card_info:InitPoker(player.hand_list, false) + else + player_card_info:UpdateHandPoker(player.hand_list, false, true) + end + if player.out_card_list[1] == 0 then + + player_card_info:SetOutCardInfo(nil, false) + else + player_card_info:SetOutCardInfo(player.out_card_list, false) + end + end + win_seat=self._room.winseat + self._room.winseat = nil + + local remaincards = self._room.remaincards + if self._room.game_status==1 then + + + -- body + coroutine.start(function() + coroutine.wait(0.3) + + self.result_view = ChunTian_ResultView.new(self._root_view, self._room.player_list, self._room.room_id, 0, win_seat,0,remaincards) + self.result_view:Show() + local card_info = self._player_card_info[1] + card_info._view:GetChild("out_card_list").visible=true + end) + if remaincards then + + local newremaincards = self._gamectr:ChangeCodeByFrom(remaincards,true) + + -- body + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list:RemoveChildrenToPool() + otherpoker_list.visible=true + end + + for i = #newremaincards, 1, -1 do + coroutine.start(function() + coroutine.wait(0.1 * (15 - i)) + + + local flow = newremaincards[i] % 10 + local num = (newremaincards[i] - (newremaincards[i] % 10)) / 10 + local card_n = flow * 100 + num + local poker_item = UIPackage.CreateObject("Extend_Poker_ChunTian", "poker6") + + --local code = self:ChangeCodeByTo(card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/" .. card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + local card_code_obj + if DataManager.CurrenRoom.pai==0 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..card_n) + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + end + if card_n==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..card_n.."_1") + end + card_code_obj:SetScale(0.6, 0.6) + poker_item:AddChild(card_code_obj) + otherpoker_list:AddChild(poker_item) + end) + end + end + end +end + +function M:CreateRankEff() + self.rank_view = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/rank_eff") + self._view:AddChild(self.rank_view) + self.rank_view:Center() + self.rank_view:GetTransition("t0"):Play() +end + +function M:_Effect( type1 ,player) + -- body + + if type1 > 11 or type1 < 3 then + return + end + printlog("effect ",type1) + local eff_code = 0 + if type1 == 3 then + eff_code = 2 + elseif type1 == 4 then + eff_code = 4 + elseif type1 == 5 then + eff_code = 5 + elseif type1 == 6 then + eff_code=1 + elseif type1 == 7 then + return + elseif type1 == 8 then + return + elseif type1 == 9 then + return + elseif type1 == 10 then + eff_code = 6 + elseif type1 == 11 then + eff_code = 6 + else + eff_code = 1 + end + local info = self._player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/eff_"..eff_code) + + effect.touchable = false + effect:GetTransition("t0"):Play() + -- effect:SetXY((self._view.width - effect.width) / 2,(self._view.hight - effect.hight) / 2) + if eff_code==3 then + self._view:AddChild(effect) + else + pNode:AddChild(effect) + end + + + if eff_code==1 then + self.eff_feiji = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/eff_feiji") + self._view:AddChild(self.eff_feiji) + self.eff_feiji:Center() + self.eff_feiji:GetTransition("t0"):Play() + end + if eff_code==3 then + effect:Center() + else + if self:GetPos(player.seat)== 1 then + effect.x,effect.y = 0,24 + else + effect.x,effect.y = 24,67 + end + end + + + -- effect:Center() + -- if eff_code ==3 then + -- coroutine.start(function() + -- coroutine.wait(1) + -- effect:Dispose() + -- end) + -- else + coroutine.start(function() + coroutine.wait(1) + if self.eff_feiji~=nil then + self.eff_feiji:Dispose() + end + effect:Dispose() + end) + -- end +end + + + +function M:UpdateRound(round) + local total_round = self._room.room_config.Times + printlog("jefe total_round:",total_round) + self._text_round.text = string.format("%d / %d 局", round, total_round) +end + +function M:GetSoundFileName(type, num, isNewBout) + local fileName + if isNewBout then + if type > 6 or type == 4 then + if type == 8 or type == 9 then + type = 7 + end + fileName = tostring(type) + elseif type > 2 then + fileName = string.format("3_%d", num) + else + fileName = string.format("%d_%d", type, num) + end + else + math.randomseed(os.time()) + if type > 2 and type ~= 11 then + local r = math.random(1, 3) + fileName = "dani_" .. r + elseif type == 11 then + fileName = tostring(type) + else + fileName = string.format("%d_%d", type, num) + end + end + return fileName +end + +function M:GetSpringSeats(player_info) + local seat_list = {} + printlog("OnResult...des888") + local card_max_length = 10 + printlog("OnResult...des999") + for i = 1, #player_info do + local player = player_info[i] + if #player.cards == card_max_length then + seat_list[#seat_list + 1] = player.seat + end + end + return seat_list +end + +function M:PlayCardEff(card) + if self.cor_card_eff ~= nil then + coroutine.stop(self.cor_card_eff) + end + self.cor_card_eff = nil + local cor_time = 0.1 + self.cor_card_eff = coroutine.start(function() + self._popEvent = false + local eff = self._view:GetChild("poker_eff") + local poker_obj = eff:GetChild("poker") + local poker_back = eff:GetChild("di") + poker_back.visible = false + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/" .. card) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card .. "_2") + local card_code_obj + if DataManager.CurrenRoom.pai==0 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..card) + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card .. "_2") + end + if card_code_obj then + card_code_obj:SetScale(1, 1) + poker_obj:AddChild(card_code_obj) + card_code_obj.visible = true + end + + self.tween = TweenUtils.TweenFloat(0, 2340, cor_time, function(x) + poker_back.rotationY = x + poker_obj.rotationY = -180 + x + local x_1 = x % 360 + if (x_1 > 90 and x_1 < 270) then + poker_obj.visible = true + poker_back.visible = false + else + poker_obj.visible = false + poker_back.visible = true + end + end) + coroutine.wait(1) + self._popEvent = true + end) + +end + +function M:ResetPoker() + -- if self._room.curren_turn_seat == self._room.self_player.seat then + -- self._player_card_info[1]:ResetPoker() + -- end + self._player_card_info[1]:ResetPoker() +end + +function M:PlaySound(sex, path) + + local sex_path = ViewUtil.Sex_Chat[sex]-- 1 男 2 女 + local sound_path = string.format("extend/poker/chuntian/sound/%s/%s.mp3", sex_path, path) + ViewUtil.PlaySound("ChunTianNew_PK", sound_path) +end + +function M:ChangeBgmMusic(bgm_index) + if bgm_index == nil then + bgm_index = self.bgm_index + else + self.bgm_index = bgm_index + end + ViewUtil.PlayMuisc("ChunTianNew_PK", string.format("extend/poker/chuntian/sound/bgm%d.mp3", 1)) +end +function M:OnPlayerEnter( ... ) + local arg = {...} + local p = arg[1] + for i=1,#self._room.player_list do + if self._room.self_player.seat==self._room.player_list[i].seat and self._room.self_player.self_user.account_id ~= self._room.player_list[i].self_user.account_id then + -- body + local ErrorMsgTip = UIPackage.CreateObject("Common", "Win_ConnectTip") + local _action = self._view:AddChild(ErrorMsgTip) + _action.xy = Vector2((self._view.width - _action.width) / 4, self._view.height / 4) + local text = _action:GetChild("tex_message") + local btn1 = _action:GetChild("btn_connect") + local btn2 = _action:GetChild("btn_back") + text.text = "您来晚了,座位有人,请重新进牌桌" + btn1.visible=false + btn2:Center() + btn2.y=btn2.y+50 + btn2.onClick:Set(function() + -- body + ErrorMsgTip:Destroy() + ErrorMsgTip = nil + self._gamectr:LevelRoom(function(res) + ViewUtil.CloseModalWait() + NetResetConnectWindow.CloseNetReset() + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + end) + end + end + -- if p ~= self._room.self_player and self._room.room_config.people_num <= 4 and self._room.room_config.people_num >= 3 and self._gamectr:CheckGPS() then + -- if self.distance_view then + -- self.distance_view:Destroy() + -- end + -- self.distance_view = PlayerDistanceView.new(true) + -- self.distance_view:Show() + -- end + -- local info = self._player_info[self:GetPos(p.seat)] + -- info:FillData(p) + -- info._view.visible = true + MainView.OnPlayerEnter(self, ...) +end + +function M:Destroy() + for i = 1, #self._room.player_list do + local player = self._room.player_list[i] + local card_info_i = self._player_card_info[self:GetPos(player.seat)] + + card_info_i:Destroy() + if card_info_i ~= nil and card_info_i.cor_init_poker ~= nil then + coroutine.stop(card_info_i.cor_init_poker) + end + end + PKMainView.Destroy(self) + UIPackage.RemovePackage("extend/poker/chuntian/ui/Extend_Poker_ChunTian") +end + +return M diff --git a/lua_probject/extend_project/extend/poker/chuntian/ChunTian_Player.lua b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_Player.lua new file mode 100644 index 00000000..28c71db0 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_Player.lua @@ -0,0 +1,35 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:42 +--- +local ChunTian_Player = { + -- 手牌列表 + hand_count = 0, + out_card_list = {}, + hand_list = {}, + isOneCard= false, -- 报单 +} + +local M = ChunTian_Player + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_count = 0 + self.out_card_list = {} + self.hand_list = {} + self.isOneCard = false + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_count = 0 + self.out_card_list = {} + self.hand_list = {} + self.isOneCard = false +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/chuntian/ChunTian_PlayerBackView.lua b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_PlayerBackView.lua new file mode 100644 index 00000000..1834b4f5 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_PlayerBackView.lua @@ -0,0 +1,439 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/25 13:52 +--- +local PKPlayBackView = require('main.poker.PKPlayBackView') +local ChunTian_PlayerCardInfoView = import('.ChunTian_PlayerPokerInfoView') +local ChunTian_PlayerSelfCardInfoView = import('.ChunTian_PlayerSelfPokerInfoView') +local PlayerInfoView = import('.EXPlayerInfoView') +local ChunTian_RightPanelView = import(".ChunTian_RightPanelView") +local ChunTian_ResultView = import(".ChunTian_ResultView") +local M = {} + +local ChunTian_Record_Event = { + Evt_OutCard = 'OutCard', + Evt_Pass = 'pass', + Evt_NewRound = 'newindex', + Evt_result = 'result', + Evt_Result = 'Result' +} + +local default_bg = 1 +local bg_config = { + {id = 1, url = 'extend/poker/chuntian/bg/bg1', thumb = 'ui://Extend_Poker_ChunTian/table_bg1'}, + {id = 2, url = 'extend/poker/chuntian/bg/bg2', thumb = 'ui://Extend_Poker_ChunTian/table_bg2'}, + {id = 3, url = 'extend/poker/chuntian/bg/bg3', thumb = 'ui://Extend_Poker_ChunTian/table_bg3'} +} + +--- Create a new +function M.new() + setmetatable(M, {__index = PKPlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = 'ChunTian_PlayBackView' + self:init() + + return self +end + +function M:InitView(url) + local room = self._room + if not room.self_player then + room.self_player = room:GetPlayerBySeat(1) + end + self._gamectr = ControllerManager.GetController(GameController) + UIPackage.AddPackage('extend/poker/chuntian/ui/Extend_Poker_ChunTian') + PKPlayBackView.InitView(self, 'ui://Extend_Poker_ChunTian/ChunTian_Main_' .. self._room.room_config.people_num, default_bg, bg_config) + self._tex_round = self._view:GetChild('round') + self._player_card_info = {} + local _player_card_info = self._player_card_info + for i = 1, room.room_config.people_num do + local tem = self._view:GetChild('player_card_info_' .. i) + self._player_card_info[i] = self:NewPlayerPokerInfoView(tem, i) + end + local rightpanel = self._view:GetChild("right_panel") + if self._rightPanelView ~= nil then + self._rightPanelView:Destroy() + end + + self._rightPanelView = ChunTian_RightPanelView.new(self, rightpanel) + rightpanel:GetChild("btn_setting").onClick:Clear() + + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild('player_info' .. i) + _player_info[i] = PlayerInfoView.new(tem, self) + end + local list = self._room.player_list + for i=1,#list do + local p = list[i] + local info = _player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + end + if self._room.hpOnOff == 1 and self._room.score_times ~= 1 then + -- body + self._view:GetChild('roominfo_panel1'):GetChild('tex_beishu').text = self._room.score_times .. '倍' + else + self._view:GetChild('roominfo_panel1'):GetChild('tex_beishu').text = '' + end + self._eventmap = {} + self._cmdmap = {} + self._cmdmap[ChunTian_Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[ChunTian_Record_Event.Evt_Pass] = self.CmdPass + self._cmdmap[ChunTian_Record_Event.Evt_NewRound] = self.CmdNewRound + self._cmdmap[ChunTian_Record_Event.Evt_result] = self.Cmdresult + self._cmdmap[ChunTian_Record_Event.Evt_Result] = self.CmdResult +end + +function M:NewPlayerPokerInfoView(view, index) + if index == 1 then + return ChunTian_PlayerSelfCardInfoView.new(view, self) + end + return ChunTian_PlayerCardInfoView.new(view, self) +end + +function M:FillRoomData(data) + print("hidezhanji 1111") + self._currentStep = 1 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local roominfo_panel = self._view:GetChild('roominfo_panel1') + + roominfo_panel:GetChild('tex_roomid').text = data.info.roomid + roominfo_panel:GetChild('tex_gametype').text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + local head_info = self._player_info[self:GetPos(p.seat)] + + if p.total_hp then + print("hidezhanji 2222") + + head_info._view:GetChild('zhanji').visible=false + + if room.hpOnOff == 1 or room:checkHpNonnegative() then + head_info._view:GetChild('zhanji').visible=true + head_info._view:GetChild('text_jifen').text = d2ad(p.total_hp) + end + end + head_info:FillData(p) + head_info:UnmarkTuoguan() + head_info:UpdateScore() + if p.seat ~= room.self_player.seat then + card_info:UpdateHandPoker(p.hand_list, false, true) + end + head_info:UpdatePiao(p.piao) + + end + + self:UpdateRound() + + self:GenerateAllStepData(data) + self:ShowStep(1) +end + +function M:ShowStep(index) + local step = self._step[index] + if step==nil then + return + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + + local info = self._player_card_info[self:GetPos(i)] + p.hand_list = step.player_card_data[i].hand_list + p.out_card_list = step.player_card_data[i].out_card_list + p.hand_left_count = #p.hand_list + + if p.seat ~= self._room.self_player.seat then + info:UpdateHandPoker(p.hand_list, false, true) + else + info:InitPoker(p.hand_list, false) + end + + end + + if step.cmd == ChunTian_Record_Event.Evt_OutCard then + local seat = step.current_out_seat + local p = self._room:GetPlayerBySeat(seat) + local info = self._player_card_info[self:GetPos(seat)] + local card = step.out_card_list + local card_list = self._gamectr:ChangeCodeByFrom(card, true) + info:SetOutCardInfo(card_list, false) + self:ClearNextSeatOutCard(seat) + end + + if step.cmd == ChunTian_Record_Event.Evt_Pass then + local seat = step.current_out_seat + local p = self._room:GetPlayerBySeat(seat) + local info = self._player_card_info[self:GetPos(seat)] + info:SetOutCardInfo(nil, true) + self:ClearNextSeatOutCard(seat) + end + if step.cmd == ChunTian_Record_Event.Evt_NewRound then + for i = 1, #self._room.player_list do + local p = self._room:GetPlayerBySeat(i) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:SetOutCardInfo(nil, false) + end + end + if step.cmd == ChunTian_Record_Event.Evt_result then + local result = step.result + for i = 1, #result do + local card_info = self._player_card_info[self:GetPos(result[i].seat)] + + if result[i].entrust ~= nil and result[i].entrust == true then + local head_info = self._player_info[self:GetPos(result[i].seat)] + head_info:MarkTuoguan() + end + -- head_info:UpdateScore(result[i].score) + card_info:PlayScore(result[i].score, false, step.win_seat == result[i].seat) + end + end + if step.cmd == ChunTian_Record_Event.Evt_Result then + local Result = step.Result + self.result_view = ChunTian_ResultView.new(self._root_view, Result.info, self._room.room_id, Result.type, Result.winseat, 0, Result.remaincards) + local num = self._view:GetChildIndex(self._view:GetChild("panel_record")) + self._view:AddChildAt(self.result_view._view, num) + else + if self.result_view then + self.result_view:Dispose() + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = '' + + step.win = 0 + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.hand_list = p.hand_card + u.hand_count = #u.hand_list + u.out_card_list = {} + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + u.card_list = cmd.data.card + data.out_card_list = cmd.data.card_list + for i = 1, #data.out_card_list do + local out_card = data.out_card_list[i] + for j = 1, #u.hand_list do + if u.hand_list[j] == out_card then + list_remove(u.hand_list, out_card) + break + end + end + end +end + +function M:CmdNewRound(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd +end + +function M:CmdPass(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat +end +function M:Cmdresult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result = cmd.data.result + data.win_seat = cmd.seat +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.Result = cmd.data + for i = 1, #data.Result.info do + local p = data.Result.info[i] + p.nick = self._room:GetPlayerBySeat(p.seat).self_user.nick_name + end +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_clone(last_step) + step.player_card_data = {} + local card_data = step.player_card_data + for i = 1, #last_step.player_card_data do + card_data[i] = {} + card_data[i].hand_list = membe_clone(last_step.player_card_data[i].hand_list) + card_data[i].out_card_list = membe_clone(last_step.player_card_data[i].out_card_list) + end + step.Result = nil + self._step[#self._step + 1] = step + return step +end + +function M:ClearNextSeatOutCard(currenOutCardSeat) + local people_num = self._room.room_config.people_num + local next_seat = currenOutCardSeat + 1 + if next_seat > people_num then + next_seat = next_seat - people_num + end + local p = self._room:GetPlayerBySeat(next_seat) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:SetOutCardInfo(nil, false) +end + +function M:UpdateRound() + local round = self._room.curren_round + self._tex_round.text = string.format('第 %d 局', round) +end + +function M:NextRecordPlay() + self._totalRound = tonumber(self._totalRound) + local result = PlayBackView.NextRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + if self.result_view then + self.result_view:Dispose() + self.result_view = nil + end +end + +function M:LastRecordPlay() + local result = PlayBackView.LastRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + if self.result_view then + self.result_view:Dispose() + self.result_view = nil + end +end + +function M:Play() + self:ChangeAlpha() + self:ChangePlayState(not self._play) + if not self._play then + return + end + if (self._currentStep == #self.cmdList and self._playFoward) or (self._currentStep == 0 and not self._playFoward) then + self._currentStep = 0 + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:ChangePlayState(state) + self._play = state + self:ChangeTextSpeed() + local btn_play = self._view:GetChild('panel_record'):GetChild('btn_play') + if self._play then + btn_play:GetController('state').selectedIndex = 1 + else + btn_play:GetController('state').selectedIndex = 0 + end +end + +function M:ChangeTextSpeed() + local str1 = self._play and self._speed or '' + self._view:GetChild('panel_record'):GetChild('tex_speed').text = str1 + local str2 = + not self._play and (self._playFoward and '播放暂停' or '回退暂停') or + self._playFoward and (self._speed == 1 and '播放' or '快进') or + (self._speed == 1 and '回退' or '快退') + self._view:GetChild('panel_record'):GetChild('tex_2').text = str2 + local str3 = self._play and '倍速度' or '' + self._view:GetChild('panel_record'):GetChild('tex_1').text = str3 +end + +function M:CmdLeftArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if not self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = false + self:ChangeTextSpeed() + end +end + +function M:CmdRightArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:OnUpdate() + if self._play then + if (self._currentStep == #self.cmdList + 1 and self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像结尾了,再次点击播放按钮可重新播放') + return + elseif (self._currentStep == 0 and not self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像开头了,再次点击播放按钮可重新播放') + return + end + self._timer = self._timer + Time.deltaTime + if self._timer >= 1 / self._speed then + self._timer = 0 + local step = self._playFoward and 1 or -1 + self._currentStep = self._currentStep + step + if self._currentStep > 0 then + self:ShowStep(self._currentStep) + end + end + end +end + +function M:Destroy() + UpdateBeat:Remove(self.OnUpdate, self) + PlayBackView.Destroy(self) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/chuntian/ChunTian_PlayerPokerInfoView.lua b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_PlayerPokerInfoView.lua new file mode 100644 index 00000000..a15c4a97 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_PlayerPokerInfoView.lua @@ -0,0 +1,386 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 16:35 +--- +local ChunTian_PlayerPokerInfoView = { + _view = nil, + _mainView = nil, + _mask_liangpai = nil, +} + +local M = ChunTian_PlayerPokerInfoView + +function M.new( view,mainView ) + local self = {} + setmetatable(self, {__index = M}) + self._view = view + self._mainView = mainView + self:init() + return self +end + + + +function M:init() + local view = self._view + self._gameCtr = ControllerManager.GetController(GameController) + + self.item_data = json.decode(self._view:GetChild("area_mask").text) + self.out_card_data = self.item_data["outcard_list"] + self._mask_liangpai = view:GetChild("mask_liangpai") + self.ctr_outpoker = view:GetController("output") + self.outpoker_list = view:GetChild(self.out_card_data["parent"]) + + self.hand_card_list = view:GetChild("hand_card_list") + + self.ctr_one_card = view:GetController("one_card") + self.eff_one_card = view:GetChild("one_card_eff"):GetTransition("t0") + + self.text_bomb_score = view:GetChild("Score") + self.ani_bomb_score = view:GetTransition("score") + self.ani_result_score = view:GetTransition("score_1") +end + +function M:SetOutCardInfo(cardlist,isPass,isAnim) + self.outpoker_list:RemoveChildren(0,-1,true) + if cardlist == nil then + if isPass == true then + self.ctr_outpoker.selectedIndex = 2 + else + self.ctr_outpoker.selectedIndex = 0 + end + else + if isAnim then + if self.move_cor then + coroutine.stop(self.move_cor) + self.move_cor = nil + end + local time = 0.1 + for i = 1, #cardlist do + local poker_item = UIPackage.CreateObject("Extend_Poker_ChunTian", "poker7") + local code = self:ChangeCodeByTo(cardlist[i]) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..code) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + local card_code_obj + -- if DataManager.CurrenRoom.pai==0 then + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..code) + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + -- end + -- if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..code.."_1") + -- end + if DataManager.CurrenRoom.pai==0 then + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..code.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..code) + end + + else + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..code.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + end + + end + if card_code_obj == nil then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + --card_code_obj:SetScale(1,1) + poker_item:AddChild(card_code_obj) + --local poker = self:CreatPoker(cardlist[i],0.7) + self.outpoker_list:AddChild(poker_item) + poker_item.xy = Vector2.New(self.out_card_data["start_x"],self.out_card_data["start_y"]) + poker_item:TweenMove(self:GetOutCardEndPokerPos(i,#cardlist,self.outpoker_list,poker_item,self.out_card_data["maxcount_x"],1),time) + --card_code_obj + -- self.tween = TweenUtils.TweenFloat(1,0.7,time,function(x) + -- card_code_obj:SetScale(x,x) + -- end) + card_code_obj:SetScale(0.7,0.7) + end + self.move_cor = coroutine.start(function() + coroutine.wait(0.1) + ViewUtil.PlaySound("ChunTian_PK", "extend/poker/runfast/sound/chupai.mp3") + end) + else + for i = 1, #cardlist do + local poker_item = UIPackage.CreateObject("Extend_Poker_ChunTian", "poker7") + local code = self:ChangeCodeByTo(cardlist[i]) + local card_code_obj + if DataManager.CurrenRoom.pai==0 then + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..code.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..code) + end + + else + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..code.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + end + + end + if card_code_obj == nil then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + card_code_obj:SetScale(0.7,0.7) + poker_item:AddChild(card_code_obj) + --local poker = self:CreatPoker(cardlist[i],0.7) + self.outpoker_list:AddChild(poker_item) + poker_item.xy = self:GetOutCardEndPokerPos(i,#cardlist,self.outpoker_list,poker_item,self.out_card_data["maxcount_x"],1) + end + end + --self.ctr_outpoker.selectedIndex = 1 + end +end + +function M:SetOutCardBlack() + for i = 0, self.outpoker_list.numChildren - 1 do + self.outpoker_list:GetChildAt(i):GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(0.7,0.7,0.7) + end +end + +-- 12 -61 --11 58 --10 55 --46 +function M:GetOffSet(cardLength) -- 15 -70 + if cardLength > 8 then + return 52--40 + else + return - cardLength * 5 + 80 + end +end +function M:GetOutCardEndFirstPokerPos(count,parent_com,poker_obj,max_count,scale) + local parent_width,parent_height = parent_com.width,parent_com.height + local poker_width,poker_height = poker_obj.width * scale,poker_obj.height * scale + local offset = self:GetOffSet(count) + local x,y = 0,0 + --local length = (count - 1) * (poker_width + offset) + poker_width + --if length <= parent_width then + -- x = (parent_width - length) / 2 + -- y = (parent_height - poker_height) / 2 + --end + if count <= max_count then + local length = (count - 1) * offset + poker_width + x = (parent_width - length) / 2 + y = ((parent_height - poker_height) / 2) + + end + return Vector2.New(x,y) +end + +function M:GetOutCardEndPokerPos(index,count,parent_com,poker_obj,max_count,scale) + local offset_x,offset_y = self:GetOffSet(count),-50 + local start_pos = self:GetOutCardEndFirstPokerPos(count,parent_com,poker_obj,max_count,scale) + local poker_width,poker_height = poker_obj.width * scale,poker_obj.height * scale + local parent_width,parent_height = parent_com.width,parent_com.height + local pos_x,pos_y = start_pos.x + (index - 1) * offset_x,start_pos.y + if index > max_count then + pos_x = (index - max_count - 1) * offset_x + pos_y = pos_y + poker_height + offset_y + end + return Vector2.New(pos_x,pos_y) +end + +-- function M:PlayCardTypeEff(type1) +-- if type1 < 7 and type1 ~= 4 then return end +-- local eff_code = 0 +-- if type1 == 10 then +-- eff_code = 2 +-- elseif type1 == 11 then +-- eff_code = 3 +-- elseif type1 == 4 then +-- eff_code = 4 +-- else +-- eff_code = 1 +-- end +-- if self.cro_type_eff ~= nil then +-- coroutine.stop(self.cro_type_eff) +-- end +-- self.cro_type_eff = nil +-- self.cro_type_eff = coroutine.start(function() +-- self.type_eff_view = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/eff_"..eff_code) +-- if self.type_eff_view == nil then return end +-- self._view:AddChild(self.type_eff_view) +-- self.type_eff_view:SetXY((self._view.width - self.type_eff_view.width) / 2,self.outpoker_list.y) +-- self.type_eff_view:GetTransition("t0"):Play() +-- coroutine.wait(1.5) +-- if self.type_eff_view ~= nil then +-- self.type_eff_view:Dispose() +-- self.type_eff_view = nil +-- end +-- end) +-- end + +function M:PlayScore(score,isBomb,isWin) + if score == nil then + self.text_bomb_score.alpha = 0 + return + end + if isBomb then + self.text_bomb_score.text = score >= 0 and "+"..score or tostring(score) + self.text_bomb_score.grayed = score < 0 + self.ani_bomb_score:Play() + else + if score < 0 then + self.text_bomb_score.text = tostring(score) + self.text_bomb_score.grayed = true + elseif score > 0 then + self.text_bomb_score.text = "+"..score + self.text_bomb_score.grayed = false + else + local str = isWin and "+" or "-" + self.text_bomb_score.text = str..score + self.text_bomb_score.grayed = not isWin + end + self.ani_result_score:Play() + end +end + + + + +function M:UpdateHandPoker(cardList,isPlayAni,isMing) + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + self.cor_init_poker = nil + self.card_list = {} + self.hand_card_list:RemoveChildren(0,-1,true) + local card_length + local new_card_list + if isMing == true then + new_card_list = self._gameCtr:ChangeCodeByFrom(cardList,true) + card_length = #cardList + else + card_length = cardList + end + if isPlayAni == true then + self.cor_init_poker = coroutine.start(function() + for i = card_length, 1,-1 do + local code = isMing == true and new_card_list[i] or 0 + coroutine.wait(0.01) + local poker = self:CreatPoker1(code,0.4) + self.hand_card_list:AddChild(poker) + end + end) + else + for i = card_length, 1,-1 do + local code = isMing == true and new_card_list[i] or 0 + local poker = self:CreatPoker1(code,0.4) + self.hand_card_list:AddChild(poker) + end + end +end + +function M:SetRemainCardNumber(isPlay) + if isPlay then + self.ctr_one_card.selectedIndex = 1 + self.eff_one_card:Play(-1,0,nil) + else + self.ctr_one_card.selectedIndex = 0 + end + --if self.card_number then + -- self.card_number.visible = show + -- self.card_number.text = string.format("剩余:%d",number) + --end +end + +function M:CreatPoker1(poker,scale,bank) + + local poker_item = UIPackage.CreateObject("Extend_Poker_ChunTian", "poker"..scale * 10) + local code = self:ChangeCodeByTo(poker) + local card_code_obj + + if DataManager.CurrenRoom.pai==0 then + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..code.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..code) + end + + else + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..code.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + end + + end + if card_code_obj == nil or bank==1 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + + card_code_obj:SetScale(scale,scale) + poker_item:AddChild(card_code_obj) + + return poker_item +end + +function M:CreatPoker(poker,scale,bank) + + local poker_item = UIPackage.CreateObject("Extend_Poker_ChunTian", "poker"..12.5) + local code = self:ChangeCodeByTo(poker) + local card_code_obj + + if DataManager.CurrenRoom.pai==0 then + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..code.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..code) + end + + else + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..code.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + end + + end + if card_code_obj == nil or bank==1 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + + card_code_obj:SetScale(scale,scale) + poker_item:AddChild(card_code_obj) + + return poker_item +end + +function M:ChangeCodeByTo( card ) + local flower = card % 10 + local number = math.floor(card / 10) + if number == 15 then + number = 2 + end + if number == 14 then + number = 1 + end + return flower * 100 + number +end + + +function M:Clear() + self:PlayScore(nil) + self:SetRemainCardNumber(false) + self:SetOutCardInfo(nil,false) + self.hand_card_list:RemoveChildren(0,-1,true) + self._mask_liangpai:RemoveChildren(0,-1,true) +end + +function M:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/chuntian/ChunTian_PlayerSelfPokerInfoView.lua b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_PlayerSelfPokerInfoView.lua new file mode 100644 index 00000000..1b213409 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_PlayerSelfPokerInfoView.lua @@ -0,0 +1,1468 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 17:04 +--- +local ChunTian_PlayerPokerInfoView = import('.ChunTian_PlayerPokerInfoView') +local ChunTian_CardType = import('.ChunTian_CardType') + +local CardView = { + btn_card = nil, + -- 牌号码 (大小) + card_code_number = 0, + -- 牌号码 (花色) + card_code_flower = 0, + -- 索引 + index = 0 +} + +local function NewCardView(card, cardcodenum, cardcodeflower) + local self = {} + setmetatable(self, {__index = CardView}) + self.btn_card = card + self.card_code_number = cardcodenum + self.card_code_flower = cardcodeflower + self.card_isTouchable = 0 + return self +end + +local function tableSortNumber(a, b) + return a.card_code_number > b.card_code_number +end + +local ChunTian_PlayerSelfPokerInfoView = { + _view = nil, + _mainView = nil, + _mask_liangpai = nil +} + +local M = ChunTian_PlayerSelfPokerInfoView + +function M.new(view, mainView) + setmetatable(M, {__index = ChunTian_PlayerPokerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._mainView = mainView + self.gameCtr = ControllerManager.GetController(GameController) + self:init() + return self +end + +function M:init() + self.Reset = false + self.ctr_outpoker = self._view:GetController('output') + self.outpoker_list = self._view:GetChild('out_card_list') + self.item_data = json.decode(self._view:GetChild('area_mask').text) + self.out_card_data = self.item_data['outcard_list'] + self.hand_card_list = self._view:GetChild('hand_card_list') + self.ctr_hand_card_pos = self._view:GetChild('hand_card_list') + self._mask_liangpai = self._view:GetChild('mask_liangpai') + self.card_width = 129 + self.cards_view = self._view:GetChild('hand_poker_c') + self.card_list = {} + self.out_card_list = {} + self.touchMoveFun = handler(self, self.TouchMoving) + self.ctr_put_card_option = self._view:GetController('out_card_option') + self.ctr_piao = self._view:GetController('piao') + self.ctr_piao_value = self._view:GetController('piao_value') + self.ctr_put_error = self._view:GetController('put_error') + self.put_error_text = self._view:GetChild('put_error') + + self.ctr_select_card_type = self._view:GetController('select_card_type') + self.select_card_type_view = self._view:GetChild('choose_type') + + self.text_bomb_score = self._view:GetChild('Score') + self.ani_bomb_score = self._view:GetTransition('score') + self.ani_result_score = self._view:GetTransition('score_1') + + ---------报春------------- + self.ctr_baochun = self._view:GetController('baochun') + + self.send_card = {} + self.tips_click_count = 0 + self:BtnEvent() +end + +function M:InitPoker(pokerList, isPlayAni, open) + -- self.zhizhanctr_select=0 + -- self.zhizhantype=0 + -- self.zhizhannumber=0 + -- self.zhizhanlength=0 + -- self.zhizhanmustPutMaxCard=0 + -- self.zhizhanplay=0 + -- self.zhizhanzdts=0 + local cs = 1.25 + if DataManager.CurrenRoom.cardsize==0 then + cs = 1.35 + elseif DataManager.CurrenRoom.cardsize == 1 then + cs = 1.25 + elseif DataManager.CurrenRoom.cardsize == 2 then + cs = 1.15 + end + + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + -- print(vardump(self.card_list)) + self.cor_init_poker = nil + self.card_list = {} + + self.cards_view:RemoveChildren(0, -1, true) + if isPlayAni == true then + self.cor_init_poker = + coroutine.start( + function() + self._mainView._popEvent = false + if self._mainView._rightPanelView._settingView ~= nil then + self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(false) + end + table.sort(pokerList) + + for i = 1, #pokerList do + local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) + local card_flower_code = pokerList[i] + local btn_card = self:CreatPoker(card_number_code, cs, open) + local x, y = self._view.width / 2 + 100, -200 + btn_card:SetXY(x, y) + btn_card.alpha = 0 + btn_card.touchable = false + -- coroutine.wait(0.05) + self.cards_view:AddChild(btn_card) + local card_view = NewCardView(btn_card, card_number_code, card_flower_code) + self.card_list[#self.card_list + 1] = card_view + + table.sort(self.card_list, tableSortNumber) + + if i == #pokerList then + for j = 1, #self.card_list do + local card = self.card_list[j] + card.btn_card.touchable = true + if open ~= 1 then + -- body + self:AddCardMoveEvent(card) + end + end + end + end + for j = #self.card_list, 1, -1 do + -- ViewUtil.PlaySound('ChunTianNew_PK', 'extend/poker/runfast/sound/mopai.mp3') + local card_view = self.card_list[j] + card_view.index = j + self.cards_view:SetChildIndex(card_view.btn_card, card_view.index - 1) + + card_view.btn_card:TweenMove(self:GetHandCardPos(j, #self.card_list), 0.10) + DSTween.To( + 0.7, + 1, + 0.1, + function(value) + card_view.btn_card:SetScale(value, value) + end + ) + DSTween.To( + 0.7, + 1, + 0.1, + function(value) + card_view.btn_card.alpha = value + end + ) + card_view.btn_card.alpha = 1 + end + + self._mainView._popEvent = true + if self._mainView._rightPanelView._settingView ~= nil then + self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(true) + end + end + ) + else + + for i = 1, #pokerList do + local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) + local card_flower_code = pokerList[i] + local btn_card = self:CreatPoker(card_number_code, cs, open) + self.cards_view:AddChild(btn_card) + local card_view = NewCardView(btn_card, card_number_code, card_flower_code) + self.card_list[#self.card_list + 1] = card_view + end + table.sort(self.card_list, tableSortNumber) + for i = 1, #self.card_list do + local card = self.card_list[i] + card.index = i + self.cards_view:SetChildIndex(card.btn_card, card.index - 1) + card.btn_card.xy = self:GetHandCardPos(i, #self.card_list) + if open ~= 1 then + -- body + self:AddCardMoveEvent(card) + end + end + end +end + +function M:updatePoker() + + local templist = {} + for i = 1, #self.card_list do + templist[#templist + 1] = self.card_list[i].card_code_flower + end + self:InitPoker(templist, false, 0) +end + +function M:AddCardMoveEvent(card) + local send_card = {} + + card.btn_card.onTouchBegin:Set( + function(context) + self.send_card = {} + if card.btn_card.touchable == false then + return + end + local xy = self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + if xy.y > -21 and xy.y < 221 then + self.touchBegin = xy + Stage.inst.onTouchMove:Add(self.touchMoveFun) + --Stage.inst.onClick:Add(self.touchMoveFun) + card.btn_card.onTouchEnd:Set( + function(context) + local xy = + self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + Stage.inst.onTouchMove:Remove(self.touchMoveFun) + --Stage.inst.onClick:onTouchMove(self.touchMoveFun) + if xy.y > -21 and xy.y < 221 then + if xy.x - self.touchBegin.x > 0 then + local max_x = xy.x + local min_x = self.touchBegin.x + for k = 1, #self.card_list do + local card = self.card_list[k] + + -- for i = 1, #self.card_list do + -- local card = self.card_list[i] + -- if card.btn_card.selected then + -- send_card[#send_card + 1] = card.card_code_flower + -- self.send_card[#self.send_card + 1] = card + -- end + -- end + if card.btn_card.touchable == true then + send_card[#send_card + 1] = card + + self:SetBtnCardColor(card, 1) + if k == #self.card_list then + if + card.btn_card.x + self.card_width > min_x and card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("ChunTianNew_PK", "extend/poker/paodekuai/sound/click.mp3") + end + else + if + card.btn_card.x + + (self.card_width + self:GetHandCardOffset(#self.card_list)) > + min_x and + card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("ChunTianNew_PK", "extend/poker/paodekuai/sound/click.mp3") + end + end + end + end + else + local max_x = self.touchBegin.x + local min_x = xy.x + -- self.send_card = {} + for k = 1, #self.card_list do + local card = self.card_list[k] + + -- for i = 1, #self.card_list do + -- local card = self.card_list[i] + -- if card.btn_card.selected then + -- send_card[#send_card + 1] = card.card_code_flower + -- self.send_card[#self.send_card + 1] = card + -- end + -- end + if card.btn_card.touchable == true then + send_card[#send_card + 1] = card + self:SetBtnCardColor(card, 1) + --print(vardump(card)) + if k == #self.card_list then + if + card.btn_card.x + self.card_width > min_x and card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("ChunTianNew_PK", "extend/poker/paodekuai/sound/click.mp3") + end + else + if + card.btn_card.x + + (self.card_width + self:GetHandCardOffset(#self.card_list)) > + min_x and + card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("ChunTianNew_PK", "extend/poker/paodekuai/sound/click.mp3") + end + end + end + end + end + + ViewUtil.PlaySound('ChunTian_PK', 'extend/poker/runfast/sound/click.mp3') + else + self.touchBegin = Vector2.New(0, 0) + for k = 1, #self.card_list do + local card = self.card_list[k] + if card.btn_card.touchable == true then + self:SetBtnCardColor(card, 1) + end + end + end + + Stage.inst:ResetInputState() + card.btn_card.onTouchEnd:Set(nil) + + self:zhizhanxuanpai() + end + ) + else + local button = card.btn_card + button.onChanged:Add( + function() + -- body + if card.btn_card.selected == true then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + else + self:UpdateCardMove(card.btn_card, card.btn_card.selected, false) + end + end + ) + end + end + ) +end +function M:zhizhanxuanpai() --智障选牌 + printlog("zhizhanxuanpai") + -- body + local temp_send_card = {} + for i = 1, #self.send_card do + if self.send_card[i] ~= self.send_card[i - 1] then + -- body + temp_send_card[#temp_send_card + 1] = self.send_card[i] + end + end + + local card_map, max_key = self:GetCardMapAndMaxKey(temp_send_card) + + list_type1, touch_type1 = self:CheckPairs(card_map, 0, 8) + + list_type2, touch_type2 = self:CheckPlane(card_map, 0, 6, 0) + list_bomb, touch_bomb = self:CheckBomb(card_map, 0, 4) + + list_tuituji, touch_tuituji = self:CheckTuiTuJi(card_map, 0, 6) + + local list_type, touch_type = self:CheckOnes(card_map, 0, 11) + for i = 5, 11 do + local list_temp, touch_temp = self:CheckOnes(card_map, 0, i) + if list_temp[1] ~= nil then + -- body + list_type = list_temp + end + end + local temp_list = list_type[1] + local temp_list1 = list_type1[1] + local temp_list2 = list_type2[1] + local temp_bomb = list_bomb[1] + local temp_tuolaji = list_tuituji[1] + if self.xunpai == nil then + -- body + self.xunpai = {} + end + + if temp_list ~= nil and temp_list1 == nil and temp_list2 == nil and temp_bomb == nil and temp_tuolaji == nil and #temp_list > #self.xunpai then + for i = 1, #self.send_card do + self:UpdateCardMove(self.send_card[i].btn_card, false, false) + end + for i = 1, #self.send_card do + for j = 1, #temp_list do + if self.send_card[i] == temp_list[j] then + -- body + self:UpdateCardMove(self.send_card[i].btn_card, true, false) + end + end + end + self.xunpai = temp_list + pt(temp_list) + else + self.xunpai = {} + end +end + +function M:TouchMoving(context) + if self.cards_view == nil then + return + end + local send_card1 = {} + local xy = self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + self.isTouching = true + if xy.x - self.touchBegin.x > 0 then -- 往右边滑 + --printlog("cccccccccccccc1111111111111111111111111") + local max_x = xy.x + local min_x = self.touchBegin.x + for i = 1, #self.card_list do + local card = self.card_list[i] + if card.btn_card.touchable == false or card.card_isTouchable == 1 then + else + if + card.btn_card.x + (self.card_width + self:GetHandCardOffset(#self.card_list)) > min_x and + card.btn_card.x < max_x + then + + self:SetBtnCardColor(card, 0.8) + if #send_card1 == 0 then + -- body + send_card1[1] = card + end + for i = 1, #send_card1 do + if send_card1[i] ~= card then + -- body + send_card1[#send_card1 + 1] = card + end + end + else + -- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + -- card.card_isTouchable = 1 + -- ViewUtil.PlaySound("ChunTianNew_PK", "extend/poker/paodekuai/sound/click.mp3") + self:SetBtnCardColor(card, 1) + end + end + end + elseif xy.x - self.touchBegin.x < 0 then -- 左边滑 + local max_x = self.touchBegin.x + local min_x = xy.x + for i = 1, #self.card_list do + local card = self.card_list[i] + if card.btn_card.touchable == false or card.card_isTouchable == 1 then + else + if + card.btn_card.x + (self.card_width + self:GetHandCardOffset(#self.card_list)) > min_x and + card.btn_card.x < max_x + then + -- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + -- card.card_isTouchable = 1 + -- ViewUtil.PlaySound("ChunTianNew_PK", "extend/poker/paodekuai/sound/click.mp3") + self:SetBtnCardColor(card, 0.8) + if #send_card1 == 0 then + -- body + send_card1[1] = card + end + for i = 1, #send_card1 do + if send_card1[i] ~= card then + -- body + send_card1[#send_card1 + 1] = card + end + end + else + self:SetBtnCardColor(card, 1) + end + end + end + end + --print(vardump(send_card1)) + -- local send_card = {} + -- self.send_card = {} + -- for i = 1, #self.card_list do + -- local card = self.card_list[i] + -- if card.btn_card.selected then + -- send_card[#send_card + 1] = card.card_code_flower + -- self.send_card[#self.send_card + 1] = card + -- end + -- end + self.send_card = send_card1 +end + +function M:SetBtnCardColor(card, num) + if + card.btn_card:GetChildAt(0) ~= nil and card.btn_card:GetChildAt(0):GetChildAt(0) ~= nil and + card.btn_card:GetChildAt(0):GetChildAt(0):GetChildAt(0) ~= nil + then + -- body + card.btn_card:GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(num, num, num) + end + + --if card.card_code_flower < 500 then + -- card.btn_card:GetChildAt(0):GetChildAt(2).color = Color(num,num,num) + -- card.btn_card:GetChildAt(0):GetChildAt(3).color = Color(num,num,num) + --end +end + +function M:ShowTongYiBaoChun(tystep) + self.ctr_baochun.selectedIndex = tystep +end + +function M:HideTongYiBaoChun() + self.ctr_baochun.selectedIndex = 0 +end + +function M:ShowBaoChun(bcstep) + self.ctr_baochun.selectedIndex = bcstep +end + +function M:HideBaoChun() + self.ctr_baochun.selectedIndex = 0 +end + +function M:ShowPiao(piao) + self.ctr_piao.selectedIndex = piao +end + +function M:HidePiao() + self.ctr_piao.selectedIndex = 0 +end + +function M:ShowOutCardOption(ctr_select, type, number, length, mustPutMaxCard, play, zdts) + --for i = 1, #self.out_card_list do + -- local card = self.out_card_list[i] + -- self.cards_view:RemoveChild(card.btn_card,true) + --end + --self.out_card_list = {} + + -- self.zhizhanctr_select=ctr_select + -- self.zhizhantype=type + -- self.zhizhannumber=number + -- self.zhizhanlength=length + -- self.zhizhanmustPutMaxCard=mustPutMaxCard + -- self.zhizhanplay=play + -- self.zhizhanzdts=zdts + + self.tips_click_count = 0 + self.send_card = {} + + self.tips_card_list = self:GetCardTips(type, number, length, mustPutMaxCard) + + if #self.tips_card_list >= 1 then + -- body + self:UpdateHandCardsColor() + end + -- + -- 自动提示 + -- if #self.tips_card_list ~= 0 and play~=0 and mustPutMaxCard==false and zdts==1 then + -- local index = self.tips_click_count % #self.tips_card_list + 1 + -- self:ShowTipsCard(index) + -- self.tips_click_count = self.tips_click_count + 1 + -- end + if #self.tips_card_list == 2 and self.tips_card_list[2][1].index == self.tips_card_list[1][1].index then + if #self.tips_card_list[2] == #self.tips_card_list[1] then + for i = 1, #self.tips_card_list[2] do + if self.tips_card_list[2][i].index == self.tips_card_list[1][i].index then + self:ShowTipsCard(1) + end + end + end + elseif #self.tips_card_list == 1 then + self:ShowTipsCard(1) + end + if mustPutMaxCard and play ~= 0 and zdts == 1 then + -- body + self:ShowTipsCard(#self.tips_card_list) + end + self.ctr_put_card_option.selectedIndex = ctr_select +end + +function M:SetOutCardInfo(cardlist, isPass, isAnim) + self.ctr_put_card_option.selectedIndex = 0 + for i = 1, #self.out_card_list do + local card = self.out_card_list[i] + self.cards_view:RemoveChild(card, true) + end + self.out_card_list = {} + if cardlist ~= nil then + -- todo + self:SetOutCardList(cardlist, isAnim) + else + if isPass == true then + self.ctr_outpoker.selectedIndex = 2 + for i = 1, #self.card_list do + local card_view = self.card_list[i] + card_view.btn_card.touchable = true + self:UpdateCardMove(card_view.btn_card, false, false) + self:SetBtnCardColor(card_view, 1) + end + else + self.ctr_outpoker.selectedIndex = 0 + end + end +end + +function M:SetOutCardBlack() + for i = 1, #self.out_card_list do + local card = self.out_card_list[i] + if card and card:GetChildAt(0) and card:GetChildAt(0):GetChildAt(0) and card:GetChildAt(0):GetChildAt(0):GetChildAt(0) then + card:GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(0.7, 0.7, 0.7) + end + + end +end + +function M:SetOutCardList(cardlist, isAnim) + local pos_y = -200 + if isAnim then + -- self.zhizhanctr_select=0 + -- self.zhizhantype=0 + -- self.zhizhannumber=0 + -- self.zhizhanlength=0 + -- self.zhizhanmustPutMaxCard=0 + -- self.zhizhanplay=0 + -- self.zhizhanzdts=0 + if self.move_cor then + coroutine.stop(self.move_cor) + self.move_cor = nil + end + local time = 0.1 + for i = 1, #cardlist do + local card_code_number = cardlist[i] + for j = 1, #self.card_list do + local card = self.card_list[j] + if card_code_number == card.card_code_number then + card.btn_card.onTouchBegin:Set(nil) + self.out_card_list[#self.out_card_list + 1] = card.btn_card + list_remove(self.card_list, card) + -- todo 出牌动画 + local pos = + self:GetOutCardEndPokerPos( + i, + #cardlist, + self.cards_view, + card.btn_card, + self.out_card_data['maxcount_x'], + 0.7 + ) + card.btn_card:TweenMove(Vector2.New(pos.x, pos_y), time) + -- self.tween = TweenUtils.TweenFloat(1, 0.7, time, function(x) + -- card.btn_card:GetChildAt(0):SetScale(x, x) + -- end) + card.btn_card:GetChildAt(0):SetScale(0.7, 0.7) + break + end + end + end + self.move_cor = + coroutine.start( + function() + coroutine.wait(0.05) + for i = 1, #self.out_card_list do + local card = self.out_card_list[i] + self.cards_view:SetChildIndex(card, i - 1) + end + coroutine.wait(0.1) + ViewUtil.PlaySound('ChunTian_PK', 'extend/poker/runfast/sound/chupai.mp3') + end + ) + else + for i = 1, #cardlist do + local poker_item = UIPackage.CreateObject('Extend_Poker_ChunTian', 'poker7') + local code = self:ChangeCodeByTo(cardlist[i]) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/" .. code) + local card_code_obj + -- if DataManager.CurrenRoom.pai==0 then + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..code) + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + -- end + -- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/" .. code .. "_1") + -- end + if DataManager.CurrenRoom.pai == 0 then + if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_ChunTian/' .. code .. '_1') + else + card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_ChunTian/' .. code) + end + else + if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_ChunTian/' .. code .. '_2') + else + card_code_obj = UIPackage.CreateObjectFromURL('ui://Main_Poker/' .. code .. '_2') + end + end + if card_code_obj == nil then + card_code_obj = UIPackage.CreateObjectFromURL('ui://Main_Poker/00') + end + card_code_obj:SetScale(0.7, 0.7) + poker_item:AddChild(card_code_obj) + --local poker = self:CreatPoker(cardlist[i],0.7) + self.cards_view:AddChild(poker_item) + local pos = + self:GetOutCardEndPokerPos( + i, + #cardlist, + self.cards_view, + poker_item, + self.out_card_data['maxcount_x'], + 1 + ) + poker_item.xy = Vector2.New(pos.x, pos_y) + self.out_card_list[#self.out_card_list + 1] = poker_item + end + end +end + +function M:DeleteHandCards(cardlist) + for i = 1, #cardlist do + local card_code_number = cardlist[i] + for j = 1, #self.card_list do + local card = self.card_list[j] + if card_code_number == card.card_code_number then + --self.out_card_list[#self.out_card_list + 1] = card + list_remove(self.card_list, card) + -- todo 出牌动画 + self.cards_view:RemoveChild(card.btn_card, true) + break + end + end + end + self:UpdateHandCardsPos() +end + +function M:UpdateHandCardsPos() + for i = 1, #self.card_list do + local card_view = self.card_list[i] + card_view.index = i + card_view.btn_card.touchable = true + self.cards_view:SetChildIndex(card_view.btn_card, card_view.index - 1) + --card_view.btn_card.xy = self:GetHandCardPos(i, #self.card_list) + card_view.btn_card:TweenMove(self:GetHandCardPos(i, #self.card_list), 0.1) + self:UpdateCardMove(card_view.btn_card, false, false) + self:SetBtnCardColor(card_view, 1) + end +end + +function M:ResetPoker() + self.Reset = true + for i = 1, #self.card_list do + local card_view = self.card_list[i] + self:UpdateCardMove(card_view.btn_card, false, false) + end + self.send_card = {} + self.Reset = false +end + +function M:UpdateCardMove(btn_card, isSelected, isPlay) + btn_card.selected = isSelected + local card_Move = btn_card:GetChildAt(0) + local xy = isSelected == true and Vector2.New(0, -30) or Vector2.New(0, 0) + if isPlay then + -- body + card_Move:TweenMove(xy, 0) + else + card_Move:TweenMove(xy, 0) + end +end + +-- +function M:UpdateHandCardsColor() + for i = 1, #self.card_list do + local card_view = self.card_list[i] + local num = card_view.btn_card.touchable == true and 1 or 0.6 + self:SetBtnCardColor(card_view, num) + end +end + +function M:BtnEvent() + self.btn_not_put = self._view:GetChild('btn_not_put') + self.btn_tips = self._view:GetChild('btn_tips') + self.btn_put = self._view:GetChild('btn_put') + + self.btn_put.onClick:Set( + function() + if self.Reset then + return + end + local send_card = {} + self.send_card = {} + local currentCard={} + for i = 1, #self.card_list do + local card = self.card_list[i] + table.insert(currentCard,card.card_code_flower) + if card.btn_card.selected then + send_card[#send_card + 1] = card.card_code_flower + self.send_card[#self.send_card + 1] = card + end + end + + if #send_card == 0 then + self:ErrorTip('请选择要出的牌 ') + else + self.gameCtr:SendCard(send_card,currentCard) + end + end + ) + self.btn_tips.onClick:Set( + function() + printlog("wwwwwwwwwww111111111111111111111111") + pt(self.tips_card_list) + if self.tips_card_list ~= nil and #self.tips_card_list ~= 0 then + local index = self.tips_click_count % #self.tips_card_list + 1 + self:ShowTipsCard(index) + self.tips_click_count = self.tips_click_count + 1 + end + end + ) + -- 过 + self.btn_not_put.onClick:Set( + function() + self.gameCtr:SendPass() + end + ) + + local function click_piao() + self.ctr_piao.selectedIndex = 0 + self.gameCtr:SendPiao(tonumber(self.ctr_piao_value.selectedPage)) + end + + local btn_piao0 = self._view:GetChild('piao0') + btn_piao0.onClick:Set(click_piao) + + local btn_piao1 = self._view:GetChild('piao1') + btn_piao1.onClick:Set(click_piao) + + local btn_piao2 = self._view:GetChild('piao2') + btn_piao2.onClick:Set(click_piao) + + local btn_piao3 = self._view:GetChild('piao3') + btn_piao3.onClick:Set(click_piao) + + local btn_piao5 = self._view:GetChild('piao5') + btn_piao5.onClick:Set(click_piao) + + local btn_piao8 = self._view:GetChild('piao8') + btn_piao8.onClick:Set(click_piao) + + ---------报春 ------------- + local function click_baochun(sindex) + self.ctr_baochun.selectedIndex = 0 + self.gameCtr:SendBaoChun(sindex) + end + + local function click_tongyibaochun(sindex) + self.ctr_baochun.selectedIndex = 0 + printlog("jefe:",sindex) + self.gameCtr:SendTongYiBaoChun(sindex) + end + + + local btn_bubao = self._view:GetChild('btnbubao') + btn_bubao.onClick:Set(function() + click_baochun(0) + end) + + local btn_baochun = self._view:GetChild('btnbaochun') + btn_baochun.onClick:Set(function() + click_baochun(1) + end) + + local btn_butongyi = self._view:GetChild('btnbutongyi') + btn_butongyi.onClick:Set(function() + click_tongyibaochun(0) + end) + + local btn_tongyi = self._view:GetChild('btntongyi') + btn_tongyi.onClick:Set(function() + click_tongyibaochun(1) + end) + + +end + +function M:ShowTipsCard(index) + local item = self.tips_card_list[index] + for i = 1, #self.card_list do + local card = self.card_list[i] + local isExsit = false + for j = 1, #item do + if item[j] == self.card_list[i] then + self:UpdateCardMove(card.btn_card, true, false) + isExsit = true + end + end + if isExsit == false then + self:UpdateCardMove(card.btn_card, false, false) + end + end +end + +function M:GetHandCardOffset(count) + local start = -70---54 + + local offset = 0 + if count > 10 then + offset = start - count + 18 + else + offset = -50 + end + return offset +end + +function M:GetHandCardPos(index, card_count) + local x, y = 0, -18 + local offset = self:GetHandCardOffset(card_count) + local middle_x = self.cards_view.width / 2 + local start_x = middle_x - (card_count / 2 * (self.card_width + offset)) + (offset / 2) + x = start_x + (self.card_width + offset) * (index - 1) + return Vector2.New(x, y) +end +function M:GetHandCardPos1(index, card_count) + local x, y = 0, -18 + local offset = self:GetHandCardOffset(card_count) + local middle_x = self.cards_view.width / 2 + local start_x = middle_x - (card_count / 2 * (self.card_width + offset)) + (offset / 2) + x = start_x + (self.card_width + offset) * (index - 1) + return x, y +end +function M:ChangeOneCodeByFrom(card) + local flower = math.floor(card / 100) + local number = card % 100 + if number == 2 then + number = 15 + end + if number == 1 then + number = 14 + end + return number * 10 + flower +end + +function M:ErrorTip(error_text) + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + self.cor_init_poker = nil + self.cor_init_poker = + coroutine.start( + function() + self.put_error_text.text = error_text + self.ctr_put_error.selectedIndex = 1 + coroutine.wait(2) + self.ctr_put_error.selectedIndex = 0 + end + ) +end + +--ChunTian_CardType +--None = 0, +--OneCard = 1, +--OnePair = 2, +--Three = 3, +--Pairs = 4, +--ThreeAndTwo = 5, +--ThreeAndOne = 6, +--Plane = 7, +--PlaneAndTwo = 8, +--PlaneAndOne = 9, +--Straight = 10, +--Bomb = 11 +--TuiTuJi = 13 +function M:GetCardTips(type, number, length, mustPutMaxCard, tip_templist) + local tip_list = {} + local sidaisan = false + local touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + --printlog("aaaaaaaaaaaaacccccccccccccccccccc11111111111111111111111111111") + --pt(self.card_list) + local card_map, max_key = self:GetCardMapAndMaxKey(self.card_list) + --printlog("aaaaaaaaaaaaaaaaaa222222222222222222222222222222222222222 ",max_key) + --pt(card_map) + printlog("TIP type:",type) + if type == ChunTian_CardType.None then + if DataManager.CurrenRoom.is_new_bout then + tip_list = self:NewBoutTips(card_map) + end + return tip_list, touch_key_list + elseif type == ChunTian_CardType.Bomb then + tip_list, touch_key_list = self:CheckBomb(card_map, number, length) + else + local list_type, list_bomb, list_tuituji = {}, {}, {} + local touch_type, touch_bomb, touch_tuituji + list_bomb, touch_bomb = self:CheckBomb(card_map, 0, 4) + local card_templist = membe_clone(self.card_list) + + if list_bomb ~= nil and tip_templist == nil then + -- body + for i = 1, #list_bomb do + local templist_bomb = list_bomb[i] + for j = 1, #templist_bomb do + for k = 1, #card_templist do + if templist_bomb[j] == card_templist[k] then + -- body + list_remove(card_templist, card_templist[k]) + end + end + end + end + card_map, max_key = self:GetCardMapAndMaxKey(card_templist) + end + pt(card_map) + --推土机 + list_tuituji, touch_tuituji = self:CheckTuiTuJi(card_map, 0, 6) + + local card_templist = membe_clone(self.card_list) + + if list_tuituji ~= nil and tip_templist == nil then + -- body + for i = 1, #list_tuituji do + local templist_tuituji = list_tuituji[i] + for j = 1, #templist_tuituji do + for k = 1, #card_templist do + if templist_tuituji[j] == card_templist[k] then + -- body + list_remove(card_templist, card_templist[k]) + end + end + end + end + card_map, max_key = self:GetCardMapAndMaxKey(card_templist) + end + + + if type == ChunTian_CardType.OneCard then + -- if mustPutMaxCard then + -- number = max_key - 1 + -- self:ErrorTip("下家报单,请出最大的牌 ") + -- end + list_type, touch_type = self:CheckOneCard(card_map, number, length) + elseif type == ChunTian_CardType.OnePair then + list_type, touch_type = self:CheckOnePair(card_map, number, length) + elseif type == ChunTian_CardType.Three then + list_type, touch_type = self:CheckThree(card_map, number, length) + elseif type == ChunTian_CardType.Pairs then + list_type, touch_type = self:CheckPairs(card_map, number, length) + elseif type == ChunTian_CardType.ThreeAndTwo then + list_type, touch_type = self:CheckThreeAndTwo(card_map, number, length) + elseif type == ChunTian_CardType.ThreeAndOne then + list_type, touch_type = self:CheckThreeAndOne(card_map, number, length) + elseif type == ChunTian_CardType.Plane then + list_type, touch_type = self:CheckPlane(card_map, number, length, 0) + elseif type == ChunTian_CardType.PlaneAndTwo then + list_type, touch_type = self:CheckPlane(card_map, number, length, 2) + elseif type == ChunTian_CardType.PlaneAndOne then + list_type, touch_type = self:CheckPlane(card_map, number, length, 1) + elseif type == ChunTian_CardType.Straight then + list_type, touch_type = self:CheckStraight(card_map, number, length) + elseif type == ChunTian_CardType.FourAndtThree then + list_type, touch_type = self:CheckBomb(card_map, 0, 4) + if #list_type > 0 then + -- body + sidaisan = true + end + + elseif type == ChunTian_CardType.TuiTuJI then + list_type, touch_type = self:CheckTuiTuJi(card_map, 0, 4) + + if #list_type > 0 then + -- body + sidaisan = true + end + end + + card_map, max_key = self:GetCardMapAndMaxKey(self.card_list) + tip_list = self:GetMergeAllList(list_type, list_bomb) + --list_bomb, touch_bomb = self:CheckBomb(card_map, 0, 4) + touch_key_list = self:GetMergeAllList(touch_type, touch_bomb) + + local tip_templist3 = {} + tip_templist3 = self:GetMergeAllList(list_type, list_tuituji) + touch_key_list = self:GetMergeAllList(touch_key_list, touch_tuituji) + + local tip_templist2 = {} + if tip_templist == nil then + -- body + tip_templist2 = self:GetCardTips(type, number, length, mustPutMaxCard, tip_list) + end + if #tip_templist2 > 0 then + -- body + tip_list = self:GetMergeAllList(tip_list, tip_templist2) + end + + + end + + if (tip_templist ~= nil and sidaisan == false and #tip_templist >= 1) then + -- body + self:SetNotTouchCard(touch_key_list, card_map) + end + + return tip_list +end + +-- 合并多个list +function M:GetMergeAllList(...) + local lists = {...} + local merge_list = {} + for i = 1, #lists do + local list_item = lists[i] + for j = 1, #list_item do + merge_list[#merge_list + 1] = list_item[j] + end + end + + return merge_list +end + +function M:NewBoutTips(pokerMap) + local new_bout_list = {} + for k, v in pairs(pokerMap) do + new_bout_list[#new_bout_list + 1] = v + end + return new_bout_list +end + +function M:CheckOneCard(pokerMap, num, length) + local one_card_list = {} + local touch_key_list = {} + if #self.card_list < length then + return one_card_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if k > num and #v == 1 then + one_card_list[#one_card_list + 1] = {v[1]} + touch_key_list[#touch_key_list + 1] = k + end + end + for k, v in pairs(pokerMap) do + if k > num and #v ~= 1 then + one_card_list[#one_card_list + 1] = {v[1]} + touch_key_list[#touch_key_list + 1] = k + end + end + return one_card_list, touch_key_list +end + +function M:CheckOnePair(pokerMap, num, length) + local one_pair_list = {} + local touch_key_list = {} + if #self.card_list < length then + return one_pair_list, touch_key_list + end + for k, v in pairs(pokerMap) do -- 从三条和对子里面提取 + if #v > 1 and k > num then + one_pair_list[#one_pair_list + 1] = {v[1], v[2]} + touch_key_list[#touch_key_list + 1] = k + end + end + return one_pair_list, touch_key_list +end + +function M:CheckThree(pokerMap, num, length) + local three_list = {} + local touch_key_list = {} + if #self.card_list < length then + return three_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if #v > 2 and k > num then + three_list[#three_list + 1] = {v[1], v[2], v[3]} + touch_key_list[#touch_key_list + 1] = k + end + end + return three_list, touch_key_list +end + +function M:CheckPairs(pokerMap, num, length) + local pairs_list = {} + local touch_key_list = {} + if #self.card_list < length then + return pairs_list, touch_key_list + end + local pair_length = length / 2 + local number_start = num - pair_length + 2 + local number_end = 15 - pair_length + for i = number_start, number_end do + local item_all_list = {} + for j = i, i + pair_length - 1 do + local item_list = pokerMap[j] + if item_list == nil then + break + elseif #item_list < 2 then + break + else + item_all_list[#item_all_list + 1] = item_list[1] + item_all_list[#item_all_list + 1] = item_list[2] + end + if j == i + pair_length - 1 then + pairs_list[#pairs_list + 1] = item_all_list + for k = i, i + pair_length - 1 do + touch_key_list[#touch_key_list + 1] = k + end + end + end + end + return pairs_list, touch_key_list +end + +function M:CheckThreeAndOne(pokerMap, num, length) + local three_and_one_list = {} + local touch_key_list = {} + if #self.card_list < length then + return three_and_one_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if #v >= 3 and k > num then + three_and_one_list[#three_and_one_list + 1] = {v[1], v[2], v[3]} + touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + end + end + return three_and_one_list, touch_key_list +end + +function M:CheckThreeAndTwo(pokerMap, num, length) + local three_and_two_list = {} + local touch_key_list = {} + if #self.card_list < length then + return three_and_two_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if #v >= 3 and k > num then + three_and_two_list[#three_and_two_list + 1] = {v[1], v[2], v[3]} + touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + end + end + return three_and_two_list, touch_key_list +end + +function M:CheckStraight(pokerMap, num, length) + local straight_list = {} + local touch_key_list = {} + if #self.card_list < length then + return straight_list, touch_key_list + end + local number_start = num - length + 2 + local number_end = 15 - length + for i = number_start, number_end do + local item_all_list = {} + for j = i, i + length - 1 do + local item_list = pokerMap[j] + if item_list == nil then + break + else + item_all_list[#item_all_list + 1] = item_list[1] + end + if j == i + length - 1 then + straight_list[#straight_list + 1] = item_all_list + for k = i, i + length - 1 do + touch_key_list[#touch_key_list + 1] = k + end + end + end + end + return straight_list, touch_key_list +end + +function M:CheckBomb(pokerMap, num, length) + local bomb_list = {} + local touch_key_list = {} + local threeA = DataManager.CurrenRoom.room_config.threeA + if threeA == 0 then + -- body + if #self.card_list < length then + return bomb_list, touch_key_list + end + else + if #self.card_list < 3 then + return bomb_list, touch_key_list + end + end + + for k, v in pairs(pokerMap) do + if #v == 4 and k > num then + bomb_list[#bomb_list + 1] = v + touch_key_list[#touch_key_list + 1] = k + end + if threeA == 1 and #v == 3 and k == 14 then + bomb_list[#bomb_list + 1] = v + touch_key_list[#touch_key_list + 1] = k + end + end + + return bomb_list, touch_key_list +end + +function M:CheckTuiTuJi(pokerMap, num, length) + local pairs_list = {} + local touch_key_list = {} + if #self.card_list < length then + return pairs_list, touch_key_list + end + local pair_length = length / 2 + local number_start = num - pair_length + 2 + local number_end = 10 - pair_length + for i = number_start, number_end do + local item_all_list = {} + for j = i, i + pair_length - 1 do + local item_list = pokerMap[j] + if item_list == nil then + break + elseif #item_list < 2 then + break + else + item_all_list[#item_all_list + 1] = item_list[1] + item_all_list[#item_all_list + 1] = item_list[2] + end + if j == i + pair_length - 1 then + pairs_list[#pairs_list + 1] = item_all_list + for k = i, i + pair_length - 1 do + touch_key_list[#touch_key_list + 1] = k + end + end + end + end + return pairs_list, touch_key_list +end + +function M:CheckPlane(pokerMap, num, length, and_num) + local plane_list = {} + local touch_key_list = {} + local l = and_num + 3 + local pair_length = length / l + local number_start = num - pair_length + 2 + local number_end = 15 - pair_length + for i = number_start, number_end do + local item_all_list = {} + for j = i, i + pair_length - 1 do + local item_list = pokerMap[j] + if item_list == nil then + break + elseif #item_list < 3 then + break + else + item_all_list[#item_all_list + 1] = item_list[1] + item_all_list[#item_all_list + 1] = item_list[2] + item_all_list[#item_all_list + 1] = item_list[3] + end + if j == i + pair_length - 1 then + plane_list[#plane_list + 1] = item_all_list + touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + end + end + end + return plane_list, touch_key_list +end + +function M:SetNotTouchCard(touch_key_list, card_map) + local all_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + for i = 1, #all_key_list do + local key = all_key_list[i] + local isExsit = self:IsExistByList(touch_key_list, key) + if isExsit == false then + local key_card_item = card_map[key] + if key_card_item ~= nil then + for j = 1, #key_card_item do + local card = key_card_item[j] + card.btn_card.touchable = false + self:UpdateCardMove(card.btn_card, false, false) + end + end + end + end +end + +function M:IsExistByList(list, item) + for i = 1, #list do + if list[i] == item then + return true + end + end + return false +end + +function M:GetCardByNumber(list, number) + for i = 1, #list do + if list[i].card_code_number == number then + return list[i] + end + end + return nil +end + +function M:GetCardMapAndMaxKey(pokerList) + local map, max_key = {}, 0 + for i = 1, #pokerList do + local number = math.floor(pokerList[i].card_code_number / 10) + if number > max_key then + max_key = number + end + if map[number] == nil then + map[number] = {pokerList[i]} + else + map[number][#map[number] + 1] = pokerList[i] + end + end + return map, max_key +end +function M:CheckOnes(pokerMap, num, length) + local one_card_list = {} + local touch_key_list = {} + local text = {} + local text2 = {} + local x = 0 + if #self.card_list < length then + return one_card_list, touch_key_list + end + for k, v in pairs(pokerMap) do + text = {} + text2 = {} + if k > num then + for l, p in pairs(pokerMap) do + for i = 0, length - 1 do + if l == k + i and l ~= 15 and l ~= 16 then + -- body + text[#text + 1] = {p[1]} + text2[#text2 + 1] = l + if #text >= length then + -- body + local x = #one_card_list + local y = #touch_key_list + for i = 1, #text - 1 do + one_card_list[x + 1] = text[1] + touch_key_list[y + 1] = text2[2] + -- for i, v in pairs(text2[i + 1]) do + -- if v ~= nil then + -- table.insert(touch_key_list[x + 1], v) + -- end + -- end + for i, v in pairs(text[i + 1]) do + if v ~= nil then + table.insert(one_card_list[x + 1], v) + end + end + end + end + end + end + end + end + end + return one_card_list, touch_key_list, length +end +function M:Clear() + self:PlayScore(nil) + self:SetOutCardInfo(nil, false) + self.card_list = {} + self.out_card_list = {} + self.cards_view:RemoveChildren(0, -1, true) + -- self.mask_liangpai:RemoveChildren(0,-1,true) +end + +function M:ClearCheck() + self.card_list = {} + self.out_card_list = {} + self.cards_view:RemoveChildren(0, -1, true) +end + +function M:Destroy() + Stage.inst.onTouchMove:Remove(self.touchMoveFun) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/chuntian/ChunTian_Protocol.lua b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_Protocol.lua new file mode 100644 index 00000000..7cbdd7b2 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_Protocol.lua @@ -0,0 +1,55 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:51 +--- +local ChunTian_Protocol = { + ChunTian_ConfirmToNextGame = "1003", + + ChunTian_Send_Card = "1013", + + ChunTian_Send_Guo = "1014", + + ChunTian_Send_Piao = "1015", + + ChunTian_Ming_Card = "2117", + + ChunTian_Init_Card = "2011", + + ChunTian_Options = "2004", + + ChunTian_Index_Move = "2016", + + ChunTian_Play_Succ = "2021", + + ChunTian_Pass_Succ = "2030", + + ChunTian_Put_Error = "2111", + + ChunTian_Bomb_Score = "2118", + + ChunTian_Result = "2007", + ChunTian_Piao_Tip = "2031", + ChunTian_Piao_Action = "2032", + + ChunTian_ConfirmToNextGameSucc = "2010", + PT_GAMETUOGUAN = "2029",--托管 + SEND_TUOGUAN = "1018",--托管 + GAME_XIPAI = "20836", + GAME_EVENT_XIPAI = "20837", + GAME_EVENT_NOTIFY_XIPAI = "20838", + GAME_EVT_CARDINHAND = "202022", + + GAME_EVT_ALERT_BAO_CHUN = "22033", --通知报春 + GAME_EVT_USER_BAO_CHUN_REQ = "22034", --玩家报春 报春/不报 + + GAME_EVT_ALERT_TongYi_BAO_CHUN = "22035", --通知同意报春 + GAME_EVT_USER_BAO_CHUN_RSP = "22036", --玩家报春广播 "seat": 座位 "jiao": 0-不叫 1-叫 "count": 抢/叫次数 + + + GAME_EVT_USER_ALERT_QIANG_BAOCHUN = "22044", --通知玩家抢春 + GAME_EVT_USER_QIANG_BAOCHUN_REQ = "22045", --玩家报春 "qiang": 0-不抢 1-抢 + GAME_EVT_USER_QIANG_BAOCHUN_RSP = "22046", --玩家报春广播 “seat”:座位号 "qiang": 0-不抢 1-抢 "count": 抢/叫次数 + +} + +return ChunTian_Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/chuntian/ChunTian_ResultView.lua b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_ResultView.lua new file mode 100644 index 00000000..46cf94d6 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_ResultView.lua @@ -0,0 +1,326 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 11:05 +--- +require("Game.View.ResultView") + +local ChunTian_ResultView = {} + +local M = ChunTian_ResultView + +function ChunTian_ResultView.new(blur_view, data, roomid, over, win_seat, dissolve, remaincards) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + + self.class = "ChunTian_ResultView" + self._currenIndex = 0 + self._close_zone = false + --self._blur_view = blur_view + self._gamectr = ControllerManager.GetController(GameController) + self:init("ui://Extend_Poker_ChunTian/clearing", data, roomid, over, win_seat, dissolve, remaincards) + + return self +end + +function M:init(url, data, roomid, over, win_seat, dissolve, remaincards) + + ResultView.init(self, url,true) + self.xiPaiCtr=self._view:GetController("xipai") + + + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig and round>1 then + self.xiPaiCtr.selectedIndex=1 + else + self.xiPaiCtr.selectedIndex=0 + end + + + --self:InitData(data,roomid) + --self:InitData(data,roomid) + printlog("aaaaaaaaaaaaaaaa1111111111111111111111111222222222222222 ",dissolve) + pt(data) + if dissolve == 1 then + -- body + self.xiPaiCtr.selectedIndex=0 + self:InitData(data, win_seat, roomid) + else + local xipai=self._view:GetChild("btn_xipai") + xipai.touchable=true + xipai.onClick:Add(function() + local xiPaiCallBack=function () + xipai.touchable=false + self.xiPaiCtr.selectedIndex=0 + ViewUtil.ErrorTip(1000000,"申请洗牌成功") + end + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendXiPaiAction(xiPaiCallBack) + end) + if DataManager.CurrenRoom.xipaiScore then + xipai.text="洗牌 积分x"..DataManager.CurrenRoom.xipaiScore + else + xipai.text="洗牌 积分x0" + end + + self:InitData_One(data, win_seat, over, roomid, remaincards) + end + +end + +function M:ChangeCodeByTo( card ) + local flower = card % 10 + local number = math.floor(card / 10) + if number == 15 then + number = 2 + end + return flower * 100 + number +end + +-- 小结算 +function M:InitData_One(data, winseat, over, roomid, remaincards) + + local room = DataManager.CurrenRoom + self._view:GetController("sdk").selectedIndex = 1 + local _gamectr = ControllerManager.GetController(GameController) + local list_view = self._view:GetChild("player_list_1") + list_view:RemoveChildrenToPool() + + local leftCardAll = self._view:GetChild("leftCardHand") + leftCardAll:RemoveChildrenToPool() + printlog("InitData_One") + if remaincards and #remaincards>0 then + table.sort(remaincards,function (a,b) + return a % 100 < b % 100 + + end) + for i=1,#remaincards do + local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..remaincards[i]) + leftCardAll:AddChild(card_code_obj) + end + end + + printlog("InitData_One222") + for i = 1, #data do + local player = data[i] + local item = list_view:AddItemFromPool("ui://Extend_Poker_ChunTian/clearing_item_1") + + printlog("data ...hh") + local leftCard = item:GetChild("leftCard") + leftCard:RemoveChildrenToPool() + -- table.sort(data[i].handCards,function (a,b) + + -- return a % 100 < b % 100 + -- end) + printlog("data ...2") + for j=1,#data[i].handCards do + local code = data[i].handCards[j] + local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..code) + leftCard:AddChild(card_code_obj) + end + + -- table.sort(data[i].outCards,function (a,b) + -- return a % 100 < b % 100 + -- end) + + + printlog("data ...12") + for k=1,#data[i].outCards do + local code = data[i].outCards[k] + local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/"..code) + leftCard:AddChild(card_code_obj) + card_code_obj:GetChildAt(0):GetChildAt(0).color = Color(0.7,0.7,0.7) + end + + + printlog("data ...") + local boom = item:GetChild("boom") + boom.text = player.thisboomnum + + + local nichen = item:GetChild("nichen") + + if player.nick ~= nil then + -- body + nichen.text = tostring(player.nick) + else + + nichen.text = tostring(player.self_user.nick_name) + end + + + local shengpai = item:GetChild("shengpai") + if player.cards ~= nil then + -- body + shengpai.text = tostring(#player.cards) + else + shengpai.text = tostring(#player.hand_list) + end + + local rt = 1 + if room.hpOnOff == 1 then + rt = room.score_times + end + printlog("data ...4444") + local hp_nonnegative = room:checkHpNonnegative() + local roundScore = player.winscore + if hp_nonnegative then + + local jifen = "" + if roundScore > 0 then + jifen = "+" .. roundScore + else + jifen = "" .. roundScore + end + + local tili = "" + local limit = "" + if player.hp_info.round_actual_hp > 0 then + tili = "(+" .. d2ad(player.hp_info.round_actual_hp) .. ")" + if player.hp_info.upper_limit then + limit = "达到上限" + end + else + tili = "(" .. d2ad(player.hp_info.round_actual_hp) .. ")" + if player.hp_info.upper_limit then + limit = "达到下限" + end + end + + item:GetChild("score").text = jifen .. tili .. limit + else + + local jifen = "" + if roundScore >= 0 then + jifen = "+" .. roundScore + else + jifen = "" .. roundScore + end + jifen = jifen .. " " + + local tili = "" + if room.hpOnOff > 0 then + + local need = roundScore * rt + tili = "(" + if roundScore > 0 then + tili = tili .. "+" .. tostring(need) + else + tili = tili .. tostring(need) + end + + tili = tili .. ")" + end + + + item:GetChild("score").text = jifen .. tili + end + + if roundScore >= 0 then + + if room.self_player.seat == player.seat then + -- body + self._view:GetController("result").selectedIndex = 1 + end + else + + if room.self_player.seat == player.seat then + self._view:GetController("result").selectedIndex = 0 + end + end + + end + + + if over == 0 then + -- body + local btn_confirm = self._view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + self:Destroy() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:ConformToNextGame() + + end) + else + self.xiPaiCtr.selectedIndex=0 + local btn_confirm = self._view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + --self:Destroy() + self:InitData(data, winseat, roomid) + -- ViewManager.ChangeView(ViewManager.View_Lobby) + end) + + end +end + +-- 大结算 +function M:InitData(data, winseat, roomid) + self.xiPaiCtr.selectedIndex=0 + self._view:GetController("sdk").selectedIndex = 0 + + local room = DataManager.CurrenRoom + + local rt = 1 + if room.hpOnOff == 1 and room.score_times ~= 1 then + rt = room.score_times + end + + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + + local user = room:GetPlayerBySeat(data[i].seat).self_user + + player_list[i].id = user.account_id + + player_list[i].score = data[i].score + player_list[i].hp_info = data[i].hp_info + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].seat = data[i].seat + player_list[i].head_url = data[i].self_user.head_url + + if data[i].entrust ~= nil then + player_list[i].entrust = data[i].entrust > 0 + else + player_list[i].entrust = false + end + + player_list[i].param = {} + + player_list[i].param[1] = {} + player_list[i].param[1].key = "赢局数:" + player_list[i].param[1].value = tostring(data[i].settle_log.winnum) + + player_list[i].param[2] = {} + player_list[i].param[2].key = "打出炸弹数:" + player_list[i].param[2].value = tostring(data[i].settle_log.boomnum) + + player_list[i].param[3] = {} + player_list[i].param[3].key = "春天次数:" + player_list[i].param[3].value = tostring(data[i].settle_log.springnum) + + player_list[i].param[4] = {} + player_list[i].param[4].key = "当局最高分:" + player_list[i].param[4].value = tostring(data[i].settle_log.maxscore * rt) + + end + + self:GenerateRoomResultInfo(room.room_config.Times, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + self:InitBigResult(room) + local big_result = self._view:GetChild("big_result") + local lst_p = big_result:GetChild("player_list") + -- local list_param = com_p:GetChild("list_param") + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + end + +end + +return M diff --git a/lua_probject/extend_project/extend/poker/chuntian/ChunTian_RightPanelView.lua b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_RightPanelView.lua new file mode 100644 index 00000000..f478a884 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_RightPanelView.lua @@ -0,0 +1,88 @@ +local MainRightPanelView = require("Game.View.MainRightPanelView") +local ChunTian_RightPanelView = {} +local M = ChunTian_RightPanelView +local function __init(self,mainView,view) + local right_panel = view + + local btn_setting = right_panel:GetChild("btn_setting") + btn_setting.onClick:Set(function() + local _settingView = mainView:NewSettingView() + _settingView.stateIndex = (mainView._room.curren_round >= 1 and mainView._allow_dissmiss) and 2 or 1 + _settingView.cd_time = mainView.dismiss_room_cd_time + _settingView:Show() + + local room = DataManager.CurrenRoom + _settingView.onCallback:Add(function(context) + local _gamectr = ControllerManager.GetController(GameController) + if (room.CurnrenState == StateType.Ready) then + _gamectr:LevelRoom(function(response) + if (response.ReturnCode == 0) then + ViewManager.ChangeView(ViewManager.View_Lobby) + GameApplication.Instance:ShowTips("房间已解散!") + end + end) + else + print("mainView.dismiss_room_cd_time"..mainView.dismiss_room_cd_time) + if mainView.dismiss_room_cd_time > 0 then + GameApplication.Instance:ShowTips("您还处于解散冷却时间当中,请稍后重试!") + else + _gamectr:AskDismissRoom() + end + end + end) + end) + + self._tex_data = right_panel:GetChild("tex_data") + self._tex_time = right_panel:GetChild("tex_time") + self._pb_batteryLevel = right_panel:GetChild("pb_batteryLevel") + self._xinhao = right_panel:GetController("xinhao") + self.ctr_xh = right_panel:GetChild("gcm_xinhao"):GetController("c1") + self.ctr_wifi = right_panel:GetChild("gcm_wifi"):GetController("c1") + self._tex_ping = right_panel:GetChild("gcm_xinhao"):GetChild("n7") + + self.ctr_log = right_panel:GetController("log") + local btn_log = right_panel:GetChild("btn_log") + btn_log.onClick:Set(function() + if self.onLogCallback then + self.onLogCallback() + end + end) + + self._total_time = 0 + self:__UpdateTime() + + -- self._timer = Timer.New(handler(self,self.__UpdateTime),10,-1,true) + -- self._timer:Start() +end +function ChunTian_RightPanelView.new(mainView,view) + setmetatable(M, {__index = MainRightPanelView}) + local self = setmetatable({}, {__index = M}) + self.class = "ChunTian_RightPanelView" + __init(self,mainView,view) + return self +end +function M:__UpdateTime() + self._tex_data.text = os.date("%Y-%m-%d") + self._tex_time.text = os.date("%H:%M") + if Application.platform == RuntimePlatform.IPhonePlayer or Application.platform == RuntimePlatform.Android then + self._pb_batteryLevel.value = GameApplication.Instance:GetBatteryLevel() + end + + local NetworkReachability = UnityEngine.NetworkReachability + local _client = ControllerManager.GameNetClinet + if not _client then return end + local ping = _client:getAveragePingTime() + if not ping then return end + ping = math.floor(ping / 2) + if ping > 300 then ping =300 end + if ping <= 100 then + self.ctr_xh.selectedIndex = 0 + elseif ping <= 300 then + self.ctr_xh.selectedIndex = 1 + else + self.ctr_xh.selectedIndex = 2 + end + self._tex_ping.text = ping .. "ms" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/chuntian/ChunTian_Room.lua b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_Room.lua new file mode 100644 index 00000000..f8d39a1c --- /dev/null +++ b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_Room.lua @@ -0,0 +1,26 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 14:36 +--- +local ChunTian_Player = import(".ChunTian_Player") + +local ChunTian_Room = { +} + +local M = ChunTian_Room + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Room}) + local self = setmetatable({}, {__index = M}) + self:init() + return self +end + + + +function M:NewPlayer() + return ChunTian_Player.new() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/chuntian/ChunTian_RoomConfig.lua b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_RoomConfig.lua new file mode 100644 index 00000000..c1da0234 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/chuntian/ChunTian_RoomConfig.lua @@ -0,0 +1,93 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 10:54 +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.class = "ChunTian_RoomConfig" + self.config=config + self.AA = config.aa + self.Times = config.times + self.PlayerNum = config.maxPlayers + + self.selectDiqu = config.selectDiqu + self.youdabida = config.youdabida + self.baodanbida = config.baodanbida + self.sandaier = config.sandaier + self.sidaiyi = config.sidaiyi + self.fanchun = config.fanchun + self.shachunfanbei = config.shachunfanbei + self.ziranchunfanbei = config.ziranchunfanbei + self.sigeAziranchun = config.sigeAziranchun + return self +end + + +function M:GetDes(sp) + sp = sp or " " + local str = "" + -- str = str.. self.Times.."局"..sp + str = str .. RoomConfig.GetDes(self, sp) + if self.selectDiqu == 1 then + str = str.. "去掉234"..sp + else + str = str.. "单QKA2"..sp + end + + + if self.youdabida == 1 then + str = str.. "有大必大"..sp + end + if self.baodanbida == 1 then + str = str.. "报单必大"..sp + end + if self.sandaier == 1 then + str = str.. "三带二"..sp + end + + if self.sidaiyi == 1 then + str = str.. "四带一"..sp + end + if self.fanchun == 1 then + str = str.. "反春"..sp + end + + if self.shachunfanbei == 1 then + str = str.. "反春翻倍"..sp + end + if self.ziranchunfanbei == 1 then + str = str.. "自然春翻倍"..sp + end + if self.sigeAziranchun == 1 then + str = str.. "4个A自然春"..sp + end + + return str +end + + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChunTian/gamerule") + return gamerulepanel +end + + +function M:GetGameSMSize() + return 467,500 +end + +function M:GetGameName() + return "春天扑克" +end + +--function M:GetIsShowCardNumber() +-- return self.ShowNumber == 1 +--end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/chuntian/EXGameInfo.lua b/lua_probject/extend_project/extend/poker/chuntian/EXGameInfo.lua new file mode 100644 index 00000000..aecc0c4e --- /dev/null +++ b/lua_probject/extend_project/extend/poker/chuntian/EXGameInfo.lua @@ -0,0 +1,213 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 15:19 +--- +local EXGameInfo = {} + +local M = EXGameInfo + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/poker/chuntian/ui/Info_Poker_ChunTian") + return self +end + +function M:FillData(view, index) + self._maxPlayer = 4 -- 默认玩家人数 + self._roundChoice = 5 -- 回合选项数 + + + self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_ChunTian/Cgm_create_room") + + + + if oldGameVersion==2 then + self._config:GetController("xipai").selectedIndex=0 + self.xipaiValueText=self._config:GetChild('xipaifen') + self.xipaiValueText.text=1 + self.xipaiValue=1 + + + self.anchouValueText=self._config:GetChild('anchoufen') + self.anchouValueText.text=1 + self.anchouValue=1 + + local btn_cr = self._config:GetChild('sdsrbtn') + btn_cr.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.xipaiValueText.text=value/1000 + self.xipaiValue=value/1000 + + end, 0, nil) + gniv:Show() + + + end + ) + local btn_cr2 = self._config:GetChild('anchoubtn') + btn_cr2.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.anchouValueText.text=value/1000 + self.anchouValue=value/1000 + + end, 3, nil) + gniv:Show() + + + end + ) + + end + + +end + +local _help_url = "ui://Info_Poker_ChunTian/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_Poker_ChunTian/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_Poker_ChunTian/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list = {"单QKA2","去掉234"} +function M:GetPlayList() + return _play_list +end + +function M:LoadConfigData(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt - 1 + _config:GetController("Cost").selectedIndex = data.AA == 0 and 0 or 1 + _config:GetController("player_num").selectedIndex = data.maxPlayers - 2 + + _config:GetController("selectDiqu").selectedIndex = data.selectDiqu + _config:GetController("youdabida").selectedIndex = data.youdabida + _config:GetController("baodanbida").selectedIndex = data.baodanbida + _config:GetController("sandaier").selectedIndex = data.sandaier + + _config:GetController("sidaiyi").selectedIndex = data.sidaiyi + _config:GetController("fanchun").selectedIndex = data.fanchun + _config:GetController("shachunfanbei").selectedIndex = data.shachunfanbei + _config:GetController("ziranchunfanbei").selectedIndex = data.ziranchunfanbei + _config:GetController("sigeAziranchun").selectedIndex = data.sigeAziranchun + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected=data.xi_pai + end + + + if oldGameVersion==2 then + self.xipaiValueText.text=data.xi_pai_score/1000 + self.xipaiValue=data.xi_pai_score/1000 + + self.anchouValueText.text=data.an_chou_score/1000 + self.anchouValue=data.an_chou_score/1000 + end + +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + local player_num = _config:GetController("player_num").selectedIndex + local AA = _config:GetController("Cost").selectedIndex + local selectDiqu = _config:GetController("selectDiqu").selectedIndex + local youdabida = _config:GetController("youdabida").selectedIndex + local baodanbida = _config:GetController("baodanbida").selectedIndex + local sandaier = _config:GetController("sandaier").selectedIndex + local sidaiyi = _config:GetController("sidaiyi").selectedIndex + local fanchun = _config:GetController("fanchun").selectedIndex + local shachunfanbei = _config:GetController("shachunfanbei").selectedIndex + local ziranchunfanbei = _config:GetController("ziranchunfanbei").selectedIndex + local sigeAziranchun = _config:GetController("sigeAziranchun").selectedIndex + + -----洗牌 + + local xi_pai=false + if _config:GetChild("xipai") then + xi_pai = _config:GetChild("xipai").selected + end + + ---- + local _data = {} + _data["account_id"] = DataManager.SelfUser.Id + _data["opt"] = round + 1 + _data["AA"] = AA + _data["maxPlayers"] = player_num + 2 + _data["selectDiqu"] = selectDiqu + _data["youdabida"] = youdabida + _data["baodanbida"] = baodanbida + _data["sandaier"] = sandaier + _data["sidaiyi"] = sidaiyi + _data["fanchun"] = fanchun + _data["shachunfanbei"] = shachunfanbei + _data["ziranchunfanbei"] = ziranchunfanbei + _data["sigeAziranchun"] = sigeAziranchun + + _data['xi_pai'] = xi_pai + + local xi_pai_score=0 + local an_chou_score=0 + if oldGameVersion==2 then + xi_pai_score=self.xipaiValue + an_chou_score=self.anchouValue + end + + _data['xi_pai_score'] = xi_pai_score*1000 + _data['an_chou_score'] = an_chou_score*1000 + + return _data +end + +function M:OnChangeOption(ctype, pay_obj) + IGameInfo.OnChangeOption(self, ctype, pay_obj) + local people = self._config:GetController("player_num") + people.onChanged:Set(function() + self._maxPlayer = people.selectedIndex + 2 + self:ShowVariablePrice(ctype, pay_obj) + end) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/chuntian/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/poker/chuntian/EXPlayerInfoView.lua new file mode 100644 index 00000000..9c5a1233 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/chuntian/EXPlayerInfoView.lua @@ -0,0 +1,56 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + + +function M:FillData(player) + + + PlayerInfoView.FillData(self, player) + if player.cur_hp ~= nil then + self:UpdateScore(d2ad(player.cur_hp)) + else + local rt = 1 + if self._main_view._room.hpOnOff == 1 then + rt = self._main_view._room.score_times + end + self:UpdateScore(player.total_score * rt) + end + + +end + +function M:UpdatePiao(piao) + + if piao == nil or piao == -1 then + self._view:GetChild("piao").text = "" + elseif piao == 0 then + self._view:GetChild("piao").text = "不飘" + elseif piao == 1 then + self._view:GetChild("piao").text = "飘1分" + elseif piao == 2 then + self._view:GetChild("piao").text = "飘2分" + elseif piao == 3 then + self._view:GetChild("piao").text = "飘3分" + elseif piao == 5 then + self._view:GetChild("piao").text = "飘5分" + elseif piao == 8 then + self._view:GetChild("piao").text = "飘8分" + end +end + +function M:BaoChun() + +end + + +return M diff --git a/lua_probject/extend_project/extend/poker/chuntian/ExtendConfig.lua b/lua_probject/extend_project/extend/poker/chuntian/ExtendConfig.lua new file mode 100644 index 00000000..5b31c57d --- /dev/null +++ b/lua_probject/extend_project/extend/poker/chuntian/ExtendConfig.lua @@ -0,0 +1,259 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:57 +--- + +local EXTEND_MODEL_NAME = ... +local EXGameInfo = import(".EXGameInfo") +local ChunTian_MainView = import(".ChunTian_MainView") +local ChunTian_GameController = import(".ChunTian_GameController") +local ChunTian_RoomConfig = import(".ChunTian_RoomConfig") +local ChunTian_Player = import(".ChunTian_Player") +local ChunTian_Room = import(".ChunTian_Room") +local ChunTian_PlayerBackView = import(".ChunTian_PlayerBackView") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = "ExtendConfig" + self.extend_id = 14 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = ChunTian_MainView + self._viewMap[ViewManager.View_PlayBack] = ChunTian_PlayerBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/poker/chuntian/ui/Info_Poker_ChunTian") + self:UnAssets() +end + +function M:UnAssets() + UIPackage.RemovePackage("extend/poker/chuntian/ui/Extend_Poker_ChunTian") + ResourcesManager.UnLoadGroup("RunFase_PK") +end + +local _gameInfo = nil +function M:GetGameInfo() +if not _gameInfo then + _gameInfo = EXGameInfo.new() +end +return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = ChunTian_GameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return ChunTian_Room.new() +end + + +function M:GetIconUrl() + return "ui://Extend_Poker_ChunTian/icon" + -- +end + +function M:FillRoomConfig(room,_config) + room.room_config = ChunTian_RoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + if _ctr_game == nil then + self:GetGameController() + end + + local reload = s2croom["reload"] + + local _tableInfo = s2croom["tableInfo"] + + room.xipaiScore=_tableInfo["xipai_score"] + + local _config = _tableInfo["config"] + room.room_config = ChunTian_RoomConfig.new(_config) + + room.curren_round = _tableInfo["round"] + + if room.curren_round == 0 and reload then + room.curren_round = 1 + end + + local playerList = _tableInfo["playerData"] + for i = 1,#playerList do + local _jp = playerList[i] + + local p = ChunTian_Player.new() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + if (DataManager.SelfUser.account_id == pid) then + room.self_player = p + p.self_user = DataManager.SelfUser + else + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + end + p.self_user.location = Location.new(_jp["pos"] or "") + p.self_user.host_ip = _jp["ip"] + p.total_score = _jp["score"] or 0 + if _jp.hp_info then + p.cur_hp = _jp.hp_info.cur_hp + end + p.hp_info = _jp["hp_info"] + + if _jp["entrust"] then + p.entrust = _jp.entrust + end + room:AddPlayer(p) + end + + + + local owner = s2croom["owner"] + room.owner_id = owner + room.game_status = 0 + if reload then + + local reloadInfo = s2croom["reloadInfo"] + + + + local playing = reloadInfo["playing"] + + room.curren_turn_seat = reloadInfo["active_seat"] + local info_list = reloadInfo["info_list"] + if playing == true then + + + room.CurnrenState = StateType.Palying + room.game_status=1 + + + for i = 1, #info_list do + local p = room:GetPlayerById(info_list[i]["playerid"]) + + if p == room.self_player then + p.hand_list = reloadInfo["hand_card"] + p.open= reloadInfo["open"] + end + + p.hand_count = info_list[i]["card_size"] + p.handCards = info_list[i]["handCards"] + p.outCards = info_list[i]["outCards"] + local last_outcard = info_list[i]["last_outcard"] + if last_outcard ~= nil and last_outcard[1] ~= 0 then + local out_card_list = _ctr_game:ChangeCodeByFrom(last_outcard.card_list,true) + local card_type,number,length,plan_three_count = _ctr_game:GetCardListInfo(out_card_list) + p.out_card_list = _ctr_game:GetSortOutCardList(out_card_list,card_type,number,plan_three_count) + else + p.out_card_list = {0} + end + end + else + -- print("aaaaaaaaaaaaaaaa1111111111111111111111111") + --pt(s2croom) + room.game_status=1 + + room.CurnrenState = StateType.PalyingWait + + room.winseat = reloadInfo["winseat"] + room.remaincards = reloadInfo["remaincards"] + + for i = 1, #info_list do + local playerData = info_list[i] + local p = room:GetPlayerById(playerData["playerid"]) + + p.ready = playerData["certainseat"] == 1 and true or false + + local last_outcard = info_list[i]["last_outcard"] + if last_outcard ~= nil and last_outcard[1] ~= 0 then + + local out_card_list = _ctr_game:ChangeCodeByFrom(last_outcard.card_list,true) + local card_type,number,length,plan_three_count = _ctr_game:GetCardListInfo(out_card_list) + p.out_card_list = _ctr_game:GetSortOutCardList(out_card_list,card_type,number,plan_three_count) + else + p.out_card_list = {0} + end + + p.hand_list = info_list[i]["cards"] + p.winscore = info_list[i]["winscore"] + p.hand_count = info_list[i]["card_size"] + p.thisboomnum=info_list[i]["thisboomnum"] + p.open= info_list[i]["open"] + + p.handCards = info_list[i]["handCards"] + p.outCards = info_list[i]["outCards"] + end + end + else + room.CurnrenState = StateType.Ready + end +end + + + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.room_id + room.room_config = ChunTian_RoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + local _info_list = _tableInfo["playerData"] + for i = 1,#_info_list do + local _jp = _info_list[i] + local p = ChunTian_Player.new() + p.seat = _jp["seat"] + p.aid = _jp["aid"] + local pid = _jp["aid"] + if p.aid == DataManager.SelfUser.account_id then + room.self_player = p + end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.hand_list = _hand_card + p.hand_count = #_hand_card + p.total_score = _jp["score"] + p.open= _jp["open"] + p.hp_info = _jp["hp_info"] + if _jp['hp_info'] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/mushi/EXGameInfo.lua b/lua_probject/extend_project/extend/poker/mushi/EXGameInfo.lua new file mode 100644 index 00000000..1cb36e2c --- /dev/null +++ b/lua_probject/extend_project/extend/poker/mushi/EXGameInfo.lua @@ -0,0 +1,241 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 15:19 +--- +local EXGameInfo = {} + +local M = EXGameInfo + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/poker/mushi/ui/Info_Poker_MuShi") + return self +end + +function M:FillData(view, index) + + self._maxPlayer = 3 -- 默认玩家人数 + self._roundChoice = 3 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_MuShi/Cgm_create_room") + + self._config:GetChild("people_2").onClick:Set(function() + self._config:GetController("rule").selectedIndex = 0 + end) + + local piao = self._config:GetController("piao") + local daniao = self._config:GetController("daniao") + + piao.onChanged:Add(function() + if piao.selectedIndex ~= 0 then + daniao.selectedIndex = 0 + end + end) + + daniao.onChanged:Add(function() + if daniao.selectedIndex ~= 0 then + piao.selectedIndex = 0 + end + end) + +end + +local _help_url = "ui://Info_Poker_MuShi/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_Poker_MuShi/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_Poker_MuShi/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list = {"木虱鱼"} +function M:GetPlayList() + return _play_list +end + +function M:LoadConfigData(data) + --printlog("eeeeeeeewwwwwwwwwww111111111111111") + --printlog(debug.traceback()) + --pt(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt - 1 + _config:GetController("rule").selectedIndex = data.rule == 2 and 0 or 1 + _config:GetController("play_list").selectedIndex = data.leaf - 1 + _config:GetController("willBeOut").selectedIndex = data.willBeOut - 1 + _config:GetController("heart10").selectedIndex = data.heartten - 1 + _config:GetController("bombSpring").selectedIndex = data.minboom - 1 + _config:GetController("player_num").selectedIndex = data.maxPlayers == 5 and 0 or 1 + _config:GetController("Cost").selectedIndex = data.AA == 0 and 0 or 1 + _config:GetController("showlength").selectedIndex = data.showlength + _config:GetController("fourBeltThree").selectedIndex = data.fourBeltThree + _config:GetController("demolition").selectedIndex = data.demolition + _config:GetController("fangzuobi").selectedIndex = data.fangzuobi + + _config:GetController("selectDiqu").selectedIndex = data.area + _config:GetController("wanfa").selectedIndex = data.playType + + local beiMul = _config:GetChild("n158") + if (data.mushiMul == 1) then + _config:GetController("beilv").selectedIndex = 0 + elseif (data.mushiMul == 2) then + _config:GetController("beilv").selectedIndex = 1 + elseif (data.mushiMul == 5) then + _config:GetController("beilv").selectedIndex = 2 + else + _config:GetController("beilv").selectedIndex = 3 + beiMul.text = data.mushiMul + end + --_config:GetController("beilv").selectedIndex= data.mushiMul + _config:GetController("laizi").selectedIndex= data.laizi + _config:GetController("fanbei").selectedIndex= data.tiangong + + + + local sandaidan = data.sandaidan + if sandaidan ~= nil and sandaidan == 1 then + _config:GetChild("sandaidan").selected = true + + _config:GetChild("planelack").selected = false + _config:GetChild("Threelack").selected = false + + else + _config:GetChild("sandaidan").selected = false + + _config:GetChild("planelack").selected = data.planelack == 1 and true or false + _config:GetChild("Threelack").selected = data.threelack == 1 and true or false + end + + local fs = data.fs + if fs ~= nil and fs == 1 then + _config:GetChild("fan_sprint").selected = true + else + _config:GetChild("fan_sprint").selected = false + end + + local ba = data.ba + if ba ~= nil and ba == 1 then + _config:GetChild("boom_add").selected = true + else + _config:GetChild("boom_add").selected = false + end + + _config:GetChild("ThreeA").selected = data.threeA == 1 and true or false + + if data.piao ~= nil then + _config:GetController("piao").selectedIndex = data.piao + end + + if data.daniao ~= nil then + _config:GetController("daniao").selectedIndex = data.daniao + end + +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + local player_num = _config:GetController("player_num").selectedIndex + local selectDiqu = _config:GetController("selectDiqu").selectedIndex + local wanfa = _config:GetController("wanfa").selectedIndex + local beilvIndex = _config:GetController("beilv").selectedIndex + local beilv = 1 + local beiMul = _config:GetChild("n158") + if (beilvIndex == 0) then + beilv = 1 + elseif (beilvIndex == 1) then + beilv = 2 + elseif (beilvIndex == 2) then + beilv = 5 + elseif (beilvIndex == 3) then + beilv = tonumber(beiMul.text) + end + + local laizi = _config:GetController("laizi").selectedIndex + local fanbei = _config:GetController("fanbei").selectedIndex + + -- local rule = _config:GetController("rule").selectedIndex + -- local leaf = _config:GetController("play_list").selectedIndex + -- local willBeOut = _config:GetController("willBeOut").selectedIndex + -- local bombSpring = _config:GetController("bombSpring").selectedIndex + -- local heart10 = _config:GetController("heart10").selectedIndex + + -- local AA = _config:GetController("Cost").selectedIndex + -- local showlength = _config:GetController("showlength").selectedIndex + -- local fourBeltThree = _config:GetController("fourBeltThree").selectedIndex + -- local demolition = _config:GetController("demolition").selectedIndex + -- local fangzuobi = _config:GetController("fangzuobi").selectedIndex + -- local planelack = _config:GetChild("planelack").selected and 1 or 0 + -- local threelack = _config:GetChild("Threelack").selected and 1 or 0 + -- local ThreeA = _config:GetChild("ThreeA").selected and 1 or 0 + -- local piao = _config:GetController("piao").selectedIndex + -- local daniao = _config:GetController("daniao").selectedIndex + -- local sandaidan = _config:GetController("sandaidan").selectedIndex + -- local ba = _config:GetChild("boom_add").selected and 1 or 0 + -- local fs = _config:GetChild("fan_sprint").selected and 1 or 0 + + local _data = {} + _data["account_id"] = DataManager.SelfUser.Id + _data["opt"] = round + 1 + _data["maxPlayers"] = player_num ==0 and 5 or 9 + _data["area"] = selectDiqu + _data["playType"] = wanfa + _data["mushiMul"] = beilv + _data["laizi"] = laizi + _data["tiangong"] = fanbei + + _data["rule"] = 1--rule == 0 and 2 or 1 + _data["leaf"] = 1--leaf + 1 + _data["AA"] = 1--AA + _data["willBeOut"] = 1--willBeOut + 1 + _data["showlength"] = 1--showlength + _data["heartten"] = 2--willBeOut == 0 and heart10 + 1 or 2 + _data["minboom"] = 1--(willBeOut == 0 and leaf == 1 and player_num == 1) and bombSpring + 1 or 2 + --_data["maxPlayers"] = 0--player_num + 2 + _data["fourBeltThree"] = 1--fourBeltThree + _data["demolition"] = 1--demolition + _data["fangzuobi"] = 1--fangzuobi + _data["threeA"] = 1--ThreeA + _data["piao"] = 1--piao + _data["daniao"] = 1--daniao + _data["sandaidan"] = 1--sandaidan + _data["ba"] = 1--ba + _data["fs"] = 1--fs + + _data["planelack"] = 0 + _data["threelack"] = 0 + + -- if willBeOut == 1 then + -- -- body + -- _data["planelack"] = 0 + -- _data["threelack"] = 0 + -- else + + -- if sandaidan == 1 then + -- _data["planelack"] = 0 + -- _data["threelack"] = 0 + -- else + -- _data["planelack"] = planelack + -- _data["threelack"] = threelack + -- end + -- end + return _data +end + +function M:OnChangeOption(ctype, pay_obj) + IGameInfo.OnChangeOption(self, ctype, pay_obj) + local people = self._config:GetController("player_num") + people.onChanged:Set(function() + self._maxPlayer = people.selectedIndex + 2 + self:ShowVariablePrice(ctype, pay_obj) + end) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/mushi/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/poker/mushi/EXPlayerInfoView.lua new file mode 100644 index 00000000..d48d7be3 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/mushi/EXPlayerInfoView.lua @@ -0,0 +1,146 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + DataManager.CurrenRoom.IsShowTG=false + self:init() + self.qiang = self._view:GetChild("qiang") + self.qiang.visible = false + self.qiangIcon = self.qiang:GetChild("n0") + self.qiangAni = self.qiang:GetTransition("t0") + self.ctr_zhuang = self._view:GetController("zhuang") + self.point = self._view:GetChild("point") + self.clock = self._view:GetChild("clock") + self.time = self.clock:GetChild("title") + self.kuang = self._view:GetChild("kuang") + self.kuang.visible = false + self.clock.visible = false + self._tex_score.visible=true + if self._tex_n4 then + self._tex_n4.visible=true + end + if self._tex_n5 then + self._tex_n5.visible=true + end + self.colKuang = false + self.colTime = 0 + return self +end + +function M:SetKuang(bol) + self.kuang.visible = bol +end + +function M:SetShowTGTips(isShow,time) + printlog("isShowisShowisShow==== ",isShow," time ",time) + self.currentTime=0 + if self.clock then + self.clock.visible=isShow + end + +end + +function M:UpdateKuang() + -- if self.colKuang then + -- self.colTime=self.colTime+Time.deltaTime + -- self.kuang.fillAmount = self.colTime / 20.0 + -- self.kuang.visible = true + -- if self.colTime >= 20 then + -- self.kuang.visible = false + -- self.kuang.fillAmount = 1 + -- self.colTime = 0 + -- self.colKuang = false + -- end + -- else + -- self.kuang.visible = false + -- self.kuang.fillAmount = 1 + -- self.colTime = 0 + -- self.colKuang = false + -- end +end + +function M:muShiPlayerUpdate() + --printlog("rrrrrrrrrrr111111111111111") + if self.clock then + self.time.text=self.totalTime + if self.totalTime<=0 then + if self.clock.visible == true then + self.clock.visible =false + end + end + end + +end + +function M:FillData(player) + PlayerInfoView.FillData(self, player) + if player.cur_hp ~= nil then + self:UpdateScore(d2ad(player.cur_hp)) + else + local rt = 1 + if self._main_view._room.hpOnOff == 1 then + rt = self._main_view._room.score_times + end + self:UpdateScore(player.total_score * rt) + end + + +end + +function M:UpdateFen(iType,index) + --printlog("aaaaaaaaaaaaaaaaaaaaaaaaaa ",index) + if (iType == 0) then + self.qiangIcon.icon = "ui://Extend_Poker_MuShi/ms_icon_qiang_"..index + self.qiang.visible = true + self.qiangAni:Play() + elseif (iType == 1) then + self.qiangIcon.icon = "ui://Extend_Poker_MuShi/ms_icon_point_1_"..index + self.qiang.visible = true + self.ctr_zhuang.selectedIndex = 1 + self.qiangAni:Play() + elseif (iType == 2) then + self.qiangIcon.icon = "ui://Extend_Poker_MuShi/ms_icon_point_2_"..index + self.qiang.visible = true + self.ctr_zhuang.selectedIndex = 2 + self.qiangAni:Play() + else + self.qiang.visible = false + self.ctr_zhuang.selectedIndex = 0 + end + +end + +function M:UpdatePiao(piao) + + if piao == nil or piao == -1 then + self._view:GetChild("piao").text = "" + elseif piao == 0 then + self._view:GetChild("piao").text = "不飘" + elseif piao == 1 then + self._view:GetChild("piao").text = "飘1分" + elseif piao == 2 then + self._view:GetChild("piao").text = "飘2分" + elseif piao == 3 then + self._view:GetChild("piao").text = "飘3分" + elseif piao == 5 then + self._view:GetChild("piao").text = "飘5分" + elseif piao == 8 then + self._view:GetChild("piao").text = "飘8分" + end +end + +function M:Destroy1() + --printlog("2222222222222222222222222222222222222") + self.muShiPlayerUpdate = nil + self.clock=nil + self.colKuang = false + self.colTime = 0 +end + + +return M diff --git a/lua_probject/extend_project/extend/poker/mushi/ExtendConfig.lua b/lua_probject/extend_project/extend/poker/mushi/ExtendConfig.lua new file mode 100644 index 00000000..2f8d1551 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/mushi/ExtendConfig.lua @@ -0,0 +1,279 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:57 +--- + +local EXTEND_MODEL_NAME = ... +local EXGameInfo = import(".EXGameInfo") +local MuShi_MainView = import(".MuShi_MainView") +local MuShi_GameController = import(".MuShi_GameController") +local MuShi_RoomConfig = import(".MuShi_RoomConfig") +local MuShi_Player = import(".MuShi_Player") +local MuShi_Room = import(".MuShi_Room") +local MuShi_PlayerBackView = import(".MuShi_PlayerBackView") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = "ExtendConfig" + self.extend_id = 14 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = MuShi_MainView + self._viewMap[ViewManager.View_PlayBack] = MuShi_PlayerBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/poker/mushi/ui/Info_Poker_MuShi") + self:UnAssets() +end + +function M:UnAssets() + UIPackage.RemovePackage("extend/poker/mushi/ui/Extend_Poker_MuShi") + ResourcesManager.UnLoadGroup("MuShi_PK") +end + +local _gameInfo = nil +function M:GetGameInfo() +if not _gameInfo then + _gameInfo = EXGameInfo.new() +end +return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = MuShi_GameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return MuShi_Room.new() +end + +function M:GetGameRule() + return MuShi_RuleView.new() +end + +function M:GetIconUrl() + return "ui://Extend_Poker_MuShi/icon" + -- +end + +function M:FillRoomConfig(room,_config) + room.room_config = MuShi_RoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + printlog("填充房间信息=================================") + pt(s2croom) + local room = DataManager.CurrenRoom + if _ctr_game == nil then + self:GetGameController() + end + + local reload = s2croom["reload"] + + local _tableInfo = s2croom["tableInfo"] + + local _config = _tableInfo["config"] + room.room_config = MuShi_RoomConfig.new(_config) + + room.curren_round = _tableInfo["round"] + if room.curren_round == 0 and reload then + room.curren_round = 1 + end + + local playerList = _tableInfo["playerData"] + for i = 1,#playerList do + local _jp = playerList[i] + + local p = MuShi_Player.new() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + if (DataManager.SelfUser.account_id == pid) then + room.self_player = p + p.self_user = DataManager.SelfUser + else + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + end + p.self_user.location = Location.new(_jp["pos"] or "") + p.self_user.host_ip = _jp["ip"] + p.total_score = _jp["score"] or 0 + if _jp.hp_info then + p.cur_hp = _jp.hp_info.cur_hp + end + p.hp_info = _jp["hp_info"] + + if _jp["entrust"] then + p.entrust = _jp.entrust + end + room:AddPlayer(p) + end + + + + local owner = s2croom["owner"] + room.owner_id = owner + room.game_status = 0 + if reload then + + local reloadInfo = s2croom["reloadInfo"] + + local playing = reloadInfo["playing"] + room.roomStatus = reloadInfo["roomStatus"] + room.zhuangSeat = reloadInfo["zhuangSeat"] + room.guiCard = reloadInfo["guiCard"] + + room.curren_turn_seat = reloadInfo["active_seat"] + local info_list = reloadInfo["info_list"] + if playing == true then + room.CurnrenState = StateType.Palying + room.game_status=1 + for i = 1, #info_list do + local p = room:GetPlayerById(info_list[i]["playerid"]) + + if p == room.self_player then + p.hand_list = reloadInfo["hand_card"] + p.open= reloadInfo["open"] + end + + p.hand_count = info_list[i]["card_size"] + p.piao = info_list[i]["piao"] + local last_outcard = info_list[i]["last_outcard"] + if last_outcard ~= nil and last_outcard[1] ~= 0 then + local out_card_list = _ctr_game:ChangeCodeByFrom(last_outcard.card_list,true) + local card_type,number,length,plan_three_count = _ctr_game:GetCardListInfo(out_card_list) + p.out_card_list = _ctr_game:GetSortOutCardList(out_card_list,card_type,number,plan_three_count) + else + p.out_card_list = {0} + end + end + else + + room.game_status=1 + + room.CurnrenState = StateType.PalyingWait + + room.winseat = reloadInfo["winseat"] + room.remaincards = reloadInfo["remaincards"] + + for i = 1, #info_list do + local playerData = info_list[i] + local p = room:GetPlayerById(playerData["playerid"]) + + p.ready = playerData["certainseat"] == 1 and true or false + + local last_outcard = info_list[i]["last_outcard"] + if last_outcard ~= nil and last_outcard[1] ~= 0 then + + local out_card_list = _ctr_game:ChangeCodeByFrom(last_outcard.card_list,true) + local card_type,number,length,plan_three_count = _ctr_game:GetCardListInfo(out_card_list) + p.out_card_list = _ctr_game:GetSortOutCardList(out_card_list,card_type,number,plan_three_count) + else + p.out_card_list = {0} + end + + p.hand_list = info_list[i]["cards"] + p.winscore = info_list[i]["winscore"] + p.piao = info_list[i]["piao"] + p.hand_count = info_list[i]["card_size"] + p.thisboomnum=info_list[i]["thisboomnum"] + p.open= info_list[i]["open"] + end + end + else + room.CurnrenState = StateType.Ready + end + if reload then + self:FillGame(s2croom["reloadInfo"]["info_list"]) + end +end + + +function M:FillGame(info_list) + local room = DataManager.CurrenRoom + for i = 1, #info_list do + local p = room:GetPlayerById(info_list[i]["exInfo"]["playerid"]) + p.hand_list = info_list[i]["exInfo"]["cards"] + p.isZhuang = info_list[i]["exInfo"]["isZhuang"] + p.xiaZhuMul =info_list[i]["exInfo"]["xiaZhuMul"] + p.winscore = info_list[i]["exInfo"]["winscore"] + p.status = info_list[i]["exInfo"]["status"] + p.qiangZhuangIndex =info_list[i]["exInfo"]["qiangZhuangIndex"] + p.qiangZhuangScore = info_list[i]["exInfo"]["qiangZhuangScore"] + p.isXiaZhu = info_list[i]["exInfo"]["isXiaZhu"] + p.xiaZhuIndex = info_list[i]["exInfo"]["xiaZhuIndex"] + p.isQiangZhuang = info_list[i]["exInfo"]["isQiangZhuang"] + p.isBuPai = info_list[i]["exInfo"]["isBuPai"] + p.cardType = info_list[i]["exInfo"]["cardType"] + p.cardPoint = info_list[i]["exInfo"]["cardPoint"] + p.isPlaying = info_list[i]["exInfo"]["isPlaying"] + end +end + + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.room_id + room.room_config = MuShi_RoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + local _info_list = _tableInfo["playerData"] + for i = 1,#_info_list do + local _jp = _info_list[i] + local p = MuShi_Player.new() + p.seat = _jp["seat"] + p.aid = _jp["aid"] + local pid = _jp["aid"] + if p.aid == DataManager.SelfUser.account_id then + room.self_player = p + end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.hand_list = _hand_card + p.hand_count = #_hand_card + p.total_score = _jp["score"] + p.piao = _jp["piao"] + p.open= _jp["open"] + p.hp_info = _jp["hp_info"] + if _jp['hp_info'] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/mushi/FlyCoin.lua b/lua_probject/extend_project/extend/poker/mushi/FlyCoin.lua new file mode 100644 index 00000000..4c8bd4a9 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/mushi/FlyCoin.lua @@ -0,0 +1,75 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 15:19 +--- +local FlyCoin = {} + +local M = FlyCoin + +function FlyCoin.new(startPos,endPos,view,coinPre) + local self = setmetatable({}, {__index = M}) + self.class = "FlyCoin" + --self.flyObj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_MuShi/coin") + self.flyObj= UnityEngine.GameObject.Instantiate(coinPre) + --view:AddChild(self.flyObj) + self.flyObj.gameObject.transform.parent = view.displayObject.gameObject.transform + self.flyObj.gameObject.transform.position = startPos--Vector3(50,-50,0) + self.flyObj.gameObject.transform.localScale = Vector3(50,50,50) + self.isFly = false + self.g = -5 + self.hideTime = 1 + self.flySpeed = Vector3.New(5,5,0) + self.currentTime = 0 + self.gravity = Vector3.New(0,0,0) + self.SpeedRatio=3 + self:SetParabola(startPos,endPos) + UpdateBeat:Add(self.OnFlyCoinUpdate,self) + return self +end + +function M:SetParabola(startPos,endPos) + self.startPos=startPos + self.endPos=endPos + self.distance=Vector3.Distance(endPos,startPos) + self.totalTime=self.distance/self.SpeedRatio + if self.totalTime>0.6 then + self.totalTime=0.6 + end + self.flySpeed=Vector3((self.endPos.x-self.startPos.x)/self.totalTime,(self.endPos.y-self.startPos.y)/self.totalTime-0.5*self.g*self.totalTime,(self.endPos.z-self.startPos.z)/self.totalTime ) + self.currentTime=0 + self.flyObj.gameObject.transform.position=startPos + self.isFly=true +end + +function M:OnFlyCoinUpdate() + if self.isFly then + self.currentTime=self.currentTime+Time.deltaTime + self.gravity.y=self.currentTime*self.g + + if self.currentTime>self.totalTime and self.currentTimeself.hideTime then + self.isFly=false + self.currentTime=0 + self:OnDestroy() + else + self.flyObj.gameObject.transform.position =self.flyObj.gameObject.transform.position + (self.flySpeed+self.gravity)*Time.deltaTime + end + end +end + +function M:OnDestroy() + if self.flyObj~=nil then + UnityEngine.GameObject.Destroy(self.flyObj.gameObject) + end + UpdateBeat:Remove(self.OnFlyCoinUpdate,self) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/mushi/MuShi_CardType.lua b/lua_probject/extend_project/extend/poker/mushi/MuShi_CardType.lua new file mode 100644 index 00000000..b24d680b --- /dev/null +++ b/lua_probject/extend_project/extend/poker/mushi/MuShi_CardType.lua @@ -0,0 +1,19 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 11:30 +--- + +local MuShi_CardType = { + None = 0, + TYPE_SHUANGGUI = 1,--双鬼 + TYPE_SANGUI = 2,--三鬼 + TYPE_TIANGONG = 3,--天公8 + TYPE_DOUBLE_TIANGONG = 4,--天公9 + TYPE_NORMAL = 5,--普通牌型 + TYPE_MUSHI = 6,--木虱 + TYPE_TONGHUASHUN = 7,--同花顺 + TYPE_SANTIAO = 8,--三条 + TYPE_SHUNZI = 9,--顺子 +} + +return MuShi_CardType \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/mushi/MuShi_GameController.lua b/lua_probject/extend_project/extend/poker/mushi/MuShi_GameController.lua new file mode 100644 index 00000000..e5ae0d3b --- /dev/null +++ b/lua_probject/extend_project/extend/poker/mushi/MuShi_GameController.lua @@ -0,0 +1,797 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 11:28 +--- + +local MuShi_Protocol = import(".MuShi_Protocol") +local MuShi_GameEvent = import(".MuShi_GameEvent") +local MuShi_CardType = import(".MuShi_CardType") +local MuShi_PutError = { + "必须先出最小的牌", + "出牌不符合规定牌型 ", + "下家报单,请出最大的牌 ", + "炸弹不能拆", + "单鬼必须补牌" +} + +local MuShi_GameController = {} + +local M = MuShi_GameController + +function M.new() + setmetatable(M, {__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("木虱") + self.class = "MuShi_GameController" + return self +end + +function M:init(name) + GameController.init(self, name) + self.guiCard = nil + self:RegisterEvt() +end + +-- 事件注册 +function M:RegisterEvt() + self._eventmap[MuShi_Protocol.MuShi_Ming_Card] = self.OnMingCard + self._eventmap[MuShi_Protocol.MuShi_Init_Card] = self.OnInitCard + -- self._eventmap[MuShi_Protocol.MuShi_Options] = self.OnOptions + -- self._eventmap[MuShi_Protocol.MuShi_Index_Move] = self.OnIndexMove + --self._eventmap[MuShi_Protocol.MuShi_Play_Succ] = self.OnPlaySucc + self._eventmap[MuShi_Protocol.MuShi_Put_Error] = self.OnPutError + self._eventmap[MuShi_Protocol.MuShi_Pass_Succ] = self.OnPassSucc + self._eventmap[MuShi_Protocol.MuShi_Result] = self.OnResult + self._eventmap[MuShi_Protocol.MuShi_Bomb_Score] = self.OnBombScore + self._eventmap[MuShi_Protocol.MuShi_Piao_Tip] = self.OnPiaoTip + self._eventmap[MuShi_Protocol.MuShi_Piao_Action] = self.OnPiaoAction + self._eventmap[MuShi_Protocol.MuShi_ConfirmToNextGameSucc] = self.OnConfrimToNextGameSucc + --self._eventmap[MuShi_Protocol.MuShi_Oener] = self.Oener + -- self._eventmap[Protocol.GAME_EVT_PLAYER_JOIN] = self.OnEventPlayerEnter + self._eventmap[MuShi_Protocol.PT_GAMETUOGUAN] = self.Game_TuoGuan + self._eventmap[MuShi_Protocol.MuShi_Gui] = self.GuiPai + self._eventmap[MuShi_Protocol.GAME_EVT_USER_START_GAME_RSP] = self.TiQianStar + + self._eventmap[MuShi_Protocol.GAME_EVT_START_QIANGZHUANG] = self.StarQiangZhuang + self._eventmap[MuShi_Protocol.GAME_EVT_QIANGZHUANG_RSP] = self.OtherQiangZhuang + self._eventmap[MuShi_Protocol.GAME_EVT_ZHUANGJIA_INFO] = self.DingZhuang + self._eventmap[MuShi_Protocol.GAME_EVT_START_XIAZHU] = self.StarBet + self._eventmap[MuShi_Protocol.GAME_EVT_XIAZHU_RSP] = self.OtherBet + + self._eventmap[MuShi_Protocol.GAME_EVT_CUOPAI_FINISH_RSP] = self.FinishCuoPai + + + -- self._eventmap[Protocol.GAME_EVT_READY] = self.OnExTendPlayerReady + +end + +function M:OnExTendPlayerReady(evt_data) + self._cacheEvent:Enqueue( + function() + local pid = evt_data['aid'] + local p = self._room:GetPlayerById(pid) + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnReady, p.seat) + end + ) +end + +function M:SendQiangZhuang(index) + local _data = {} + _data["index"] = index + --printlog("发送抢庄消息==========",index) + local _client = ControllerManager.GameNetClinet + _client:send(MuShi_Protocol.GAME_EVT_QIANGZHUANG_REQ, _data) +end + +function M:SendBet(index) + local _data = {} + _data["index"] = index + --printlog("发送下注消息==========",index) + local _client = ControllerManager.GameNetClinet + _client:send(MuShi_Protocol.GAME_EVT_XIAZHU_REQ, _data) +end + +function M:SendStar() + local _client = ControllerManager.GameNetClinet + _client:send(MuShi_Protocol.GAME_EVT_USER_START_GAME_REQ) +end + +function M:AgreeStar(isAgree) + local _data = {} + _data["agree"] = isAgree + local _client = ControllerManager.GameNetClinet + _client:send(MuShi_Protocol.GAME_EVT_USER_AGREE_START_GAME_REQ, _data) +end + +function M:SendBuPai(bupai) + local _data = {} + _data["bupai"] = bupai + local _client = ControllerManager.GameNetClinet + _client:send(MuShi_Protocol.MuShi_Send_Piao, _data) +end + +function M:SendCard(cards,currentCard) + local _data = {} + _data["card"] = cards + _data["all_card"] = currentCard + local _client = ControllerManager.GameNetClinet + _client:send(MuShi_Protocol.MuShi_Send_Card, _data) +end + +function M:SendPiao(piao) + local _data = {} + _data["id"] = piao + local _client = ControllerManager.GameNetClinet + _client:send(MuShi_Protocol.MuShi_Send_Piao, _data) +end + +function M:SendPass() + local _client = ControllerManager.GameNetClinet + _client:send(MuShi_Protocol.MuShi_Send_Guo) +end + +function M:SendInitCardEnd() + local _client = ControllerManager.GameNetClinet + _client:send(MuShi_Protocol.MuShi_Init_Card_End) +end + +function M:ConformToNextGame() + local _client = ControllerManager.GameNetClinet + _client:send(MuShi_Protocol.MuShi_ConfirmToNextGame) +end + +function M:StarQiangZhuang() + printlog("开始抢庄====================================") + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnQiangZhuang) + end + ) +end + +function M:FinishCuoPai(evt_data) + print("上报搓牌返回==================") + local seat = evt_data["seat"] + local card = evt_data["card"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnFinishCuoPai,seat,card) + end + ) +end + +function M:OtherQiangZhuang(evt_data) + printlog("其它玩家抢庄信息====================================") + pt(evt_data) + local seat = evt_data["seat"] + local index = evt_data["index"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnOtherQiangZhuang,seat,index) + end + ) +end + +function M:DingZhuang(evt_data) + printlog("确定庄家信息 ====================================") + local seat = evt_data["seat"] + local index = evt_data["index"] + local score = evt_data["score"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnZhuang, seat,index,score) + end + ) +end + +function M:StarBet(evt_data) + printlog("开始下注 ====================================",evt_data["seat"]) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnStarBet,seat) + end + ) +end + +function M:OtherBet(evt_data) + printlog("其它玩家下注信息 ====================================") + + local seat = evt_data["seat"] + local index = evt_data["index"] + local score = evt_data["mul"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnBet, seat,index,score) + end + ) +end + +function M:TiQianStar(evt_data) + -- printlog("发起提前开始返回1111====================================") + local seat = evt_data["seat"] + local agree = evt_data["agree"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnTiQian, seat,agree) + end + ) +end + +function M:OnAgreeGame(evt_data) + --printlog("同意游戏开始====================================") + local seat = evt_data["seat"] + local agree = evt_data["agree"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnAgree, seat,agree) + end + ) +end + +function M:GuiPai(evt_data) + --printlog("鬼牌====================================") + local card = evt_data["guiCard"] + self.guiCard = card + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnGuiPai, card) + end + ) +end + +function M:OnMingCard(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local card = evt_data["mingpai"] + self._cacheEvent:Enqueue( + function() + self._room.ming_card = card + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnMingCard, card) + end + ) +end + +function M:OnInitCard(evt_data) + printlog("发牌==============================") + pt(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + --local cardlist = evt_data["cards"] + --local round = evt_data["round"] + --local cardtype = evt_data["cardtype"] + --local seat = evt_data["seat"] + --local cardopen = evt_data["cardopen"] + + local playerAry = evt_data["playerAry"] + -- printlog(#playerAry) + -- pt(playerAry[1]) + local round = playerAry[1].round + self._cacheEvent:Enqueue( + function() + for _, player in ipairs(self._room.player_list) do + player:Clear() + --player.hand_count = #cardlist + end + self._room.curren_round = round + --self._room.curren_round = round + --DispatchEvent(self._dispatcher, MuShi_GameEvent.OnInitCard, round, cardlist,cardtype,seat,cardopen) + DispatchEvent(self._dispatcher,MuShi_GameEvent.OnInitCard,round,playerAry) + end + ) +end + +function M:OnBombScore(evt_data) + local scoreList = evt_data["gold_list"] + self._cacheEvent:Enqueue( + function() + for i = 1, #scoreList do + local score = scoreList[i].bom_score + local player = self._room:GetPlayerById(scoreList[i].aid) + player.total_score = player.total_score + score + end + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnBombScore, scoreList) + end + ) +end + +function M:OnPlaySucc(evt_data) + local seat = evt_data["player"] + local card_obj = evt_data["card_obj"] + local cards = card_obj["card_list"] + local remain = evt_data["remain"] -- 报单 + self._cacheEvent:Enqueue( + function() + local otherList = self:GetOtherSeatList(seat) + local player = self._room:GetPlayerBySeat(seat) + local out_card_list = self:ChangeCodeByFrom(cards, true) + player.hand_count = remain + local card_type, number, length, plan_three_count = self:GetCardListInfo(out_card_list) + player.out_card_list = self:GetSortOutCardList(out_card_list, card_type, number, plan_three_count) + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnPlaySucc, player, remain, card_type, number, otherList,length) + end + ) +end + +function M:OnPassSucc(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue( + function() + local p = self._room:GetPlayerBySeat(seat) + p.out_card_list = {0} + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnPassSucc, p) + end + ) +end + +function M:OnPutError(evt_data) + local code = evt_data["error"] + self._cacheEvent:Enqueue( + function() + local error_str = self:GetErrorStr(code) + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnErrorTip, error_str) + end + ) +end +function M:TuoGuan(isTuo) + local _data = {} + _data["tuoguan"] = isTuo + local _client = ControllerManager.GameNetClinet + _client:send(MuShi_Protocol.SEND_TUOGUAN, _data) +end + +function M:Game_TuoGuan(evt_data) + local tuoguan = evt_data["tuoguan"] + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher, MuShi_GameEvent.Game_TuoGuan, tuoguan, seat) + end) +end +function M:OnIndexMove(evt_data) + local seat = evt_data["index"] + self._cacheEvent:Enqueue( + function() + self._room.curren_turn_seat = seat + self._room.is_new_bout = self:GetIsNewBout(seat) + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnIndexMove, seat) + end + ) +end + +function M:OnOptions(evt_data) + local play = evt_data["play"] + local pass = evt_data["pass"] + + self._cacheEvent:Enqueue( + function() + local lastCardList = self:GetLastCardList(self._room.self_player.seat) + local cardType, cardNum, cardLength = self:GetCardListInfo(lastCardList) + + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnOptions, play, cardType, cardNum, cardLength, pass) + end + ) +end + +function M:OnPiaoTip(evt_data) + --printlog("提示补牌==============================") + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + --local piao = evt_data["piao"] + --local reload = evt_data["reload"] + self._cacheEvent:Enqueue( + function() + + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnPiaoTips) + end + ) +end + +function M:SendCuo() + local _client = ControllerManager.GameNetClinet + _client:send(MuShi_Protocol.GAME_EVT_CUOPAI_REQ) +end + +function M:OnPiaoAction(evt_data) + local seat = evt_data["seat"] + local piao = evt_data["bupai"] + local card = evt_data["card"] + + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnPiaoAction, seat,piao,card) + end + ) +end + +function M:OnResult(evt_data) + -- printlog("结算消息==========================》") + --pt(evt_data) + local result_type = evt_data["type"] --0小结算 1 大结算 2 解散房间 + + local info = evt_data["info"] + local winseat = evt_data["winseat"] + local remaincards = evt_data["remaincards"] + + if result_type == 1 then + local over = 1 + ControllerManager.SetGameNetClient(nil, true) + self._cacheEvent:Enqueue( + function() + for i = 1, #info do + local p = self._room:GetPlayerBySeat(info[i]["seat"]) + p.total_score = info[i]["score"] + info[i]["self_user"] = p.self_user + end + + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnResult, over, info, winseat, remaincards) + end + ) + elseif result_type == 0 then + local over = 0 + self._cacheEvent:Enqueue( + function() + for i = 1, #info do + local p = self._room:GetPlayerBySeat(info[i]["seat"]) + p.total_score = info[i]["score"] + info[i]["self_user"] = p.self_user + end + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnResult, over, info, winseat, remaincards) + end + ) + else + local dissolve = 1 + ControllerManager.SetGameNetClient(nil, true) + for i = 1, #info do + local p = self._room:GetPlayerBySeat(info[i]["seat"]) + p.total_score = info[i]["score"] + info[i]["self_user"] = p.self_user + end + -- ControllerManager.ChangeController(LoddyController) + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnResultByDissolve, over, info, winseat, dissolve) + end +end + +function M:OnConfrimToNextGameSucc(evt_data) + local aid = evt_data["aid"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, MuShi_GameEvent.OnConfrimToNextGameSucc, aid) + end + ) +end +function M:Game_TuoGuan(evt_data) + local tuoguan = evt_data["tuoguan"] + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher, MuShi_GameEvent.Game_TuoGuan, tuoguan, seat) + end) +end +function M:ChangeCodeByFrom(cardList, isSort) + isSort = isSort or false + local new_card_list = {} + for i = 1, #cardList do + local flower = math.floor(cardList[i] / 100) + local number = cardList[i] % 100 + if number == 2 then + number = 15 + end + local card = number * 10 + flower + new_card_list[#new_card_list + 1] = card + end + return isSort == true and table.sort(new_card_list) or new_card_list +end + +function M:GetOtherSeatList(seat) + local list = {} + for i = 1, self._room.room_config.people_num do + if seat ~= i then + list[#list + 1] = i + end + end + return list +end + +-- +function M:GetIsNewBout(seat) + local passCount = 0 + for i = 1, #self._room.player_list do + local player = self._room.player_list[i] + if seat ~= player.seat then + local isPass = self:GetIsPass(player.out_card_list) + if isPass then + passCount = passCount + 1 + end + end + end + if passCount == self._room.room_config.people_num - 1 then + return true + else + return false + end +end + +function M:GetLastSeat(seat) + local last_seat = seat - 1 + if last_seat < 1 then + last_seat = last_seat + self._room.room_config.people_num + end + return last_seat +end + +function M:GetLastCardList(seat) + local last_seat = self:GetLastSeat(seat) + local player = self._room:GetPlayerBySeat(last_seat) + local isPass = self:GetIsPass(player.out_card_list) + if isPass then + if self._room.room_config.people_num == 2 then + return {} + end + local last_seat_2 = self:GetLastSeat(last_seat) + local player_2 = self._room:GetPlayerBySeat(last_seat_2) + local isPass_2 = self:GetIsPass(player_2.out_card_list) + if isPass_2 then + return {} + else + return player_2.out_card_list + end + else + return player.out_card_list + end +end + +function M:GetErrorStr(code) + return MuShi_PutError[code + 1] +end + +function M:GetSortOutCardList(outCardList, cardType, cardNumber, plan_three_count) + -- if cardType == 3 or cardType == 5 or cardType == 6 then + -- local removeList = {} + -- for i = #outCardList, 1, -1 do + -- local card = outCardList[i] + -- if math.floor(card / 10) == cardNumber then + -- removeList[#removeList + 1] = card + -- table.remove(outCardList, i) + -- end + -- end + -- for i = 1, #removeList do + -- table.insert(outCardList, 1, removeList[i]) + -- end + -- elseif cardType >= 7 and cardType <= 9 then + -- local removeList = {} + -- for i = #outCardList, 1, -1 do + -- local card = outCardList[i] + -- if math.floor(card / 10) <= cardNumber and math.floor(card / 10) > cardNumber - plan_three_count then + -- removeList[#removeList + 1] = card + -- table.remove(outCardList, i) + -- end + -- end + -- for i = 1, #removeList do + -- table.insert(outCardList, 1, removeList[i]) + -- end + -- end + return outCardList +end + +--None = 0, +--OneCard = 1, +--OnePair = 2, +--Three = 3, +--Pairs = 4, +--ThreeAndTwo = 5, +--ThreeAndOne = 6, +--Plane = 7, +--PlaneAndTwo = 8, +--PlaneAndOne = 9, +--Straight = 10, +--Bomb = 11 +-- 牌型,大小, 长度 +function M:GetCardListInfo(cardlist) + + if #cardlist == 0 then + return 0, 0, 0, 0 + end + -- 检测牌型 + local card_type, card_num, card_length, plan_three_count = MuShi_CardType.None, 0, #cardlist, 0 + local card_map = self:GetCardMapByList(cardlist) + + if #cardlist == 1 then + card_type = MuShi_CardType.OneCard + card_num = math.floor(cardlist[1] / 10) + elseif #cardlist == 2 then + card_type = MuShi_CardType.OnePair + card_num = math.floor(cardlist[1] / 10) + elseif #cardlist == 3 then + card_num = math.floor(cardlist[1] / 10) + if card_num==14 and DataManager.CurrenRoom.room_config.threeA==1 then + -- body + card_type = MuShi_CardType.Bomb + else + card_type = MuShi_CardType.Three + + end + + elseif #cardlist == 4 then + local max_key = 0 + for k, v in pairs(card_map) do + if #v == 4 then + card_type = MuShi_CardType.Bomb + card_num = k + elseif #v == 3 then + card_type = MuShi_CardType.ThreeAndOne + card_num = k + elseif #v == 2 then + if k > max_key then + max_key = k + end + card_type = MuShi_CardType.Pairs + card_num = max_key + end + end + elseif #cardlist == 5 then + local count, max_key = 0, 0 + for k, v in pairs(card_map) do + if #v >= 3 then + card_type = MuShi_CardType.ThreeAndTwo + card_num = k + elseif #v == 1 then + count = count + 1 + if k > max_key then + max_key = k + end + if count == 5 then + card_type = MuShi_CardType.Straight + card_num = max_key + end + end + end + elseif #cardlist == 7 then + local count, max_key = 0, 0 + for k, v in pairs(card_map) do + if #v >= 4 then + card_type = MuShi_CardType.FourAndtThree + card_num = k + elseif #v == 1 then + count = count + 1 + if k > max_key then + max_key = k + end + if count == 7 then + card_type = MuShi_CardType.Straight + card_num = max_key + end + end + end + else + local one_count, two_count, three_count = 0, 0, 0 + local max_one_key, max_two_key, max_three_key = 0, 0, 0 + + for k, v in pairs(card_map) do + + if #v == 2 then + + if k > max_two_key then + max_two_key = k + end + two_count = two_count + 1 + if two_count == #cardlist / 2 then + card_type = MuShi_CardType.Pairs + card_num = max_two_key + end + elseif #v == 1 then + + if k > max_one_key then + max_one_key = k + end + one_count = one_count + 1 + if one_count == #cardlist then + card_type = MuShi_CardType.Straight + card_num = max_one_key + end + elseif #v == 3 then + + if max_three_key == 0 then + max_three_key = k + three_count = three_count + 1 + elseif k > max_three_key and k == max_three_key + 1 then + max_three_key = k + three_count = three_count + 1 + elseif k < max_three_key and k == max_three_key - 1 then + max_three_key = k + three_count = three_count + 1 + -- else + -- max_three_key = k + end + + --three_count = three_count + 1 + end + end + -- plan_three_count = three_count + -- if three_count * 5 >= #cardlist then + -- card_type = MuShi_CardType.PlaneAndTwo + -- card_num = max_three_key + -- elseif three_count * 4 >= #cardlist then + -- card_type = MuShi_CardType.PlaneAndOne + -- card_num = max_three_key + -- elseif three_count * 3 >= #cardlist then + -- card_type = MuShi_CardType.Plane + -- card_num = max_three_key + -- end + plan_three_count = three_count + + if three_count * 3 == #cardlist then + card_type = MuShi_CardType.Plane + card_num = max_three_key + + elseif three_count * 4 >= #cardlist and #cardlist%4==0 then + card_type = MuShi_CardType.PlaneAndOne + card_num = max_three_key + + + elseif three_count * 5 >= #cardlist and #cardlist%5==0 then + card_type = MuShi_CardType.PlaneAndTwo + card_num = max_three_key + + + end + + + + end + + return card_type, card_num, card_length, plan_three_count +end + +function M:GetCardMapByList(cardlist) + local card_map = {} + for i = 1, #cardlist do + local card = cardlist[i] + local card_num = math.floor(cardlist[i] / 10) + if card_map[card_num] == nil then + card_map[card_num] = {card} + else + card_map[card_num][#card_map[card_num] + 1] = card + end + end + return card_map +end + +function M:GetIsPass(cardlist) + if #cardlist == 0 then + return true + end + if cardlist[1] ~= nil and cardlist[1] == 0 then + return true + end + return false +end + +--请求离开房间 +function M:LevelRoom(callBack) + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + _client:send( + Protocol.GAME_EXIT_ROOM, + nil, + function(res) + if res.ReturnCode == 0 then + ControllerManager.ChangeController(LoddyController) + elseif res.ReturnCode == 27 then + ViewUtil.ErrorTip(res.ReturnCode, "退出房间失败!") + end + callBack(res) + end + ) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/mushi/MuShi_GameEvent.lua b/lua_probject/extend_project/extend/poker/mushi/MuShi_GameEvent.lua new file mode 100644 index 00000000..e4ce9b94 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/mushi/MuShi_GameEvent.lua @@ -0,0 +1,32 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:55 +--- +local MuShi_GameEvent = { + OnMingCard = "OnMingCard", + OnInitCard = "OnInitCard", + OnOptions = "OnOptions", + OnPiaoTips = "OnPiaoTips", + OnPiaoAction = "OnPiaoAction", + OnBombScore = "OnBombScore", + OnIndexMove = "OnIndexMove", + OnPlaySucc = "OnPlaySucc", + OnErrorTip = "OnErrorTip", + OnPassSucc = "OnPassSucc", + OnResult = "OnResult", + OnResultByDissolve = "OnResultByDissolve", + OnConfrimToNextGameSucc = "OnConfrimToNextGameSucc", + Game_TuoGuan="Game_TuoGuan", + OnGuiPai = "OnGuiPai", + OnTiQian = "OnTiQian", + OnAgree = "OnAgree", + OnQiangZhuang = "OnQiangZhuang", + OnOtherQiangZhuang = "OnOtherQiangZhuang", + OnZhuang = "OnZhuang", + OnStarBet = "OnStarBet", + OnBet = "OnBet", + OnFinishCuoPai = "OnFinishCuoPai", + + OnReady = "OnReady", +} +return MuShi_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/mushi/MuShi_MainView.lua b/lua_probject/extend_project/extend/poker/mushi/MuShi_MainView.lua new file mode 100644 index 00000000..676a4a9c --- /dev/null +++ b/lua_probject/extend_project/extend/poker/mushi/MuShi_MainView.lua @@ -0,0 +1,1549 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 9:41 +--- +local MSMainView = import("main.poker.MSMainView") +local MuShi_PlayerPokerInfoView = import(".MuShi_PlayerPokerInfoView") +local MuShi_PlayerSelfPokerInfoView = import(".MuShi_PlayerSelfPokerInfoView") +local MuShi_GameEvent = import(".MuShi_GameEvent") +local MuShi_ResultView = import(".MuShi_ResultView") +local MuShi_RightPanelView = import(".MuShi_RightPanelView") +local PlayerInfoView = import(".EXPlayerInfoView") +local TableBG = import('Game.Data.TableBG') +local MuShi_CardType = import(".MuShi_CardType") +local FlyCoin = import(".FlyCoin") +local M = {} +function M.new() + setmetatable(M, {__index = MSMainView}) + local self = setmetatable({}, {__index = M}) + self.class = "MuShi_MainView" + self:init() + self._gamectr = ControllerManager.GetController(GameController) + return self +end + +local default_bg = 1 +local bg_config = { + {id = 1, url = 'extend/poker/mushi/bg/bg1', thumb = 'ui://Extend_Poker_MuShi/table_bg1'}, + {id = 2, url = 'extend/poker/mushi/bg/bg1', thumb = 'ui://Extend_Poker_MuShi/table_bg1'}, + {id = 3, url = 'extend/poker/mushi/bg/bg1', thumb = 'ui://Extend_Poker_MuShi/table_bg1'} +} + +local gameState = { + None = 0, + ROOM_STATUS_INIT = 1,--初始化 + ROOM_STATUS_START = 2,--开始 + ROOM_STATUS_QIANGZHUANG = 3,--抢庄 + ROOM_STATUS_XIAZHU = 4,--下注 + ROOM_STATUS_BUPAI = 5,--补牌 + ROOM_STATUS_FINISH = 6,--完成 +} + +function M:InitView(url) + --printlog("进入木虱=============================>>>") + --printlog(debug.traceback()) + local room = self._room + UIPackage.AddPackage("extend/poker/mushi/ui/Extend_Poker_MuShi") + --pt(room) + self._curren_msg = nil + --room.room_config.people_num = 5 + self.currenBank = -1 + MSMainView.InitView(self, "ui://Extend_Poker_MuShi/MuShi_Main_"..room.room_config.people_num,nil,1,default_bg,bg_config,nil,"ui://Extend_Poker_MuShi/SettingWindow1") + local _room = DataManager.CurrenRoom + local user_id = DataManager.SelfUser.account_id + + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem, self) + tem.visible = false + end + local list = self._room.player_list + for i=1,#list do + local p = list[i] + local info = _player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + end + + + local rightpanel = self._view:GetChild("right_panel") + if self._rightPanelView ~= nil then + self._rightPanelView:Destroy() + end + + self._rightPanelView = MuShi_RightPanelView.new(self, rightpanel) + for i=1,#self._room.player_list do + + if self._room.self_player.seat==self._room.player_list[i].seat and self._room.self_player.self_user.account_id ~= self._room.player_list[i].self_user.account_id then + -- body + local ErrorMsgTip = UIPackage.CreateObject("Common", "Win_ConnectTip") + local _action = self._view:AddChild(ErrorMsgTip) + _action.xy = Vector2((self._view.width - _action.width) / 4, self._view.height / 4) + local text = _action:GetChild("tex_message") + local btn1 = _action:GetChild("btn_connect") + local btn2 = _action:GetChild("btn_back") + text.text = "您来晚了,座位有人,请重新进牌桌" + btn1.visible=false + btn2:Center() + btn2.y=btn2.y+50 + btn2.onClick:Set(function() + -- body + ErrorMsgTip:Destroy() + ErrorMsgTip = nil + self._gamectr:LevelRoom(function(res) + ViewUtil.CloseModalWait() + NetResetConnectWindow.CloseNetReset() + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + end) + end + end + + + self.ctr_state = self._view:GetController("state") + + self._ctr_action = self._view:GetController("action") + self._tex_leftTime = self._view:GetChild("time"):GetChild("title") + self.ctr_time = self._view:GetController("time") + self._text_round = self._view:GetChild("round") + self.ctr_card_eff = self._view:GetController("card_eff") + self._player_card_info = {} + + self.btn_ready1 = self._view:GetChild("btn_ready1") + self.btn_ready1.visible = false + + local _player_card_info = self._player_card_info + for i = 1, room.room_config.people_num do + local tem = self._view:GetChild("player_card_info_" .. i) + _player_card_info[i] = self:NewPlayerCardInfoView(tem, i) + end + + local list = room.player_list + printlog("#list#list ",#list) + if not room.self_player.ready and room.room_config.people_num ==#list then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 0 + end + self._left_time = 0 + self.bgm_index = 1 + local state = self._room.CurnrenState + -- printlog("aaaaaaaaaaaaaaaaawwwwwwwwwwwwwwww ",state) + self.btnstar = self._view:GetChild("btnstar") + self.btnstar.onClick:Set(function() + --printlog("提前开始=================================") + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendStar() + end) + --print("11111111111111111111111122222222222222222222222222222222 ",room.CurnrenState) + if room.CurnrenState ~= StateType.PalyingWait then + self._state.selectedIndex = state + -- if room.CurnrenState == StateType.Palying then + -- self:ReConnectForStart() + -- end + self:ReConnectForStart() + else + self._state.selectedIndex = StateType.Palying + self:ReConnectForStart() + --self:ReconnectForClearing() + end + + if room.CurnrenState ~= StateType.Ready then + --print("cccccccccccccccccc111111111111111111111111") + self._ctr_action.selectedIndex = 1 + self.btnstar.visible = fasle + else + --print("cccccccccccccccccc222222222222222222222222") + self.btnstar.visible = true + end + + print("cccccccccccccccccc222222222222222222222222") + local jsBtn=self._view:GetChild("btn_back_jiesan") + printlog(jsBtn.visible) + printlog(jsBtn.touchable) + jsBtn.onClick:Set(function () + printlog("进入解散按钮=====》》》") + if self.dismiss_room_cd_time > 0 then + ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!") + else + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:AskDismissRoom() + end + + end) + + self.InitCardList = {} + self:ChangeBgmMusic() + self:EventInit() + + local btn_rule = self._view:GetChild("right_panel"):GetChild("btn_log") + self._view:GetChild('info_text'):GetChild('text').text = room.room_config:GetDes() + self._view:GetChild('wanfa_text').text = '木虱' + + + self:CuoPai() + self:ResetCuoPai() + self.isUpcuo = false + + self.coin = ResourcesManager.LoadObjectByGroup("extend/poker/mushi/effect/flycoin/flyCoinEffect.prefab",typeof(UnityEngine.GameObject),"extend/poker/mushi/effect/flycoin/flyCoinEffect") + printlog("创建金币示例===》》》》") + printlog(self.coin) + + + printlog("self.ctr_state.selectedIndex ",self.ctr_state.selectedIndex," ") + -- self.testcard = self._view:GetChild("testcard") + -- self.test = self._view:GetChild("test") + -- self.endCard = self._view:GetChild("n119") + -- self.test.onClick:Set(function() + -- self:Test() + -- end) + -- printlog("11111111111111111 ",self.endCard.displayObject.gameObject.transform:InverseTransformPoint(self._view.displayObject.gameObject.transform.position)) + -- pt(self.endCard.displayObject.gameObject.transform:InverseTransformPoint(self._view.displayObject.gameObject.transform.position)) + + + +end + + +-- function M:OnMuShiUpdate() +-- -- for i = 1, #self._room.player_list do +-- -- local player = self._room.player_list[i] +-- -- local head_info = self._player_info[self:GetPos(player.seat)] +-- -- head_info:UpdateKuang() +-- -- end +-- end + +function M:Test() + --local endCard = self._player_card_info[1].endcard.displayObject.gameObject.transform.position + --local temp = self._view.displayObject.gameObject.transform:InverseTransformPoint(endCard) + -- self.testcard:TweenMove(Vector2(temp.x,temp.y * -1), 0.10) +-- printlog("是否存在==》》》》》",self.testcard:TweenMove(self.endCard.xy,1).OnComplete) +-- self.testcard:TweenMove(self.endCard.xy,1):OnComplete(function () +-- printlog("rrrrrrrrrrrrrrrrrrrrrrrrrrrrrr") +-- end) +-- printlog("2222222222222222222222 ",self.endCard.xy.x," ",self.endCard.xy.y) +end + +function M:PlayFaPai(seat,cardlist,cardtype) + local card_info = self._player_card_info[self:GetPos(seat)] + local endPos = Vector3(0,0,0) + coroutine.start(function() + --coroutine.wait(0.2) + for i=1,#cardlist do + --printlog("ttttttttttttttt1111111111111111111111111111111") + endPos = card_info.cards_view:GetChildAt(i-1).displayObject.gameObject.transform.position + local obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_MuShi/00") + self._view:AddChild(obj) + obj:Center() + obj:SetScale(0.8,0.8) + endPos = self._view.displayObject.gameObject.transform:InverseTransformPoint(endPos) + obj:TweenMove(Vector2(endPos.x,-1*endPos.y),0.2):OnComplete(function () + obj:Dispose() + -- card_info.cards_view:GetChildAt(i-1).visible = true + card_info:ShowCard(i-1) + end) + ViewUtil.PlaySound("MuShi_PK", "extend/poker/mushi/sound/ms_sound_fapai.mp3") + coroutine.wait(0.1) + end + end) +end + +function M:CuoPai() + self.cuoCorout = nil + self.cuopai = self._view:GetChild("cuopai") + self.n4 = self.cuopai:GetChild("n4") + self.iconCuo = self.cuopai:GetChild("n7") + self.btnCuoPai = self.n4:GetChild("n3") + self.btnCuoPai.onTouchMove:Set(handler(self, self.onTouchMove)) + self.btnCuoPai.onTouchBegin:Set(handler(self, self.onTouchBegin)) + self.btnCuoPai.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + self.beginX = self.n4.x + self.beginY = self.n4.y + self.btnX=self.n4.x + self.btnY = self.n4.y + + self.lastX = self.n4.x + self.lastY = self.n4.y + + self.initBtnX = self.n4.x + self.initBtnY = self.n4.y + self.cuopai.visible = false + -- print("self.btnY ",self.btnY) +end + +function M:ResetCuoPai() + self.n4.x = self.beginX + self.n4.y = self.beginY + self.btnX=self.beginX + self.btnY = self.beginY + self.cuopai.visible = false + if self.cuoCorout ~= nil then + coroutine.stop(self.cuoCorout) + self.cuoCorout = nil + end +end + +function M:SetCuoPai(poker) + self.iconCuo.icon = "ui://Extend_Poker_MuShi/ms_poker_cuo_"..poker + self:ResetCuoPai() + self.cuopai.visible = true +end + +function M:onTouchBegin(context) + self.lastX = self.cuopai:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)).x + self.lastY = self.cuopai:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)).y +end + +function M:onTouchMove(context) + local xy = self.cuopai:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + local tempx = xy.x-self.lastX + local tempy = xy.y-self.lastY + + + if self.n4.y == self.initBtnY then + + if tempx >= 0 then + local tempCardX = self.btnX+(xy.x-self.lastX) + --print("cccccccccccc1111111111111111 ;",tempCardX," ",self.btnX) + if tempCardX <= 510 then + self.n4.x = tempCardX + self.btnX = self.n4.x + else + if (not self.isUpcuo) then + self.isUpcuo = true + local _gamectr = ControllerManager.GetController(GameController) + print("===========================上报搓牌=====================") + _gamectr:SendCuo() + self:ResetCuoPai() + + end + self.n4.x = 510 + self.btnX = self.n4.x + end + else + local tempCardX = self.btnX+(xy.x-self.lastX) + if tempCardX > self.initBtnX then + self.n4.x = tempCardX + self.btnX = self.n4.x + else + self.n4.x = self.initBtnX + self.btnX = self.n4.x + end + end + + end + + if self.n4.x == self.initBtnX then + if tempy >=0 then + local tempCardY =self.btnY+(xy.y-self.lastY) + --print("11111111111111111111 ;",tempCardY," ",self.btnY) + if tempCardY < 276 then + self.n4.y = tempCardY + self.btnY = self.n4.y + else + self.n4.y = 276 + self.btnY = self.n4.y + end + else + local tempCardY =self.btnY+(xy.y-self.lastY) + --print("22222222222222222222 ;",tempCardY," ",self.btnY) + if tempCardY > self.initBtnY then + self.n4.y = tempCardY + self.btnY = self.n4.y + else + self.n4.y = self.initBtnY + self.btnY = self.n4.y + end + end + end + + self.lastX = xy.x + self.lastY = xy.y +end + +function M:__OnDragEnd(context) + local xy = self.cuopai:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + if ((xy.x-self.lastX) < 150 and self.n4.y == self.initBtnY) then + self.n4.x = self.beginX + self.n4.y = self.beginY + self.btnX=self.beginX + self.btnY = self.beginY + end + -- printlog("ttttttttt222222222222222222 ",xy.x- self.beginX," ",xy.y-self.beginY) +end + +function M:NewPlayerCardInfoView(tem, index) + if index == 1 then + return MuShi_PlayerSelfPokerInfoView.new(tem, self) + end + return MuShi_PlayerPokerInfoView.new(tem, self) + +end + +function M:PlayCardEff(card) + if self.cor_card_eff ~= nil then + coroutine.stop(self.cor_card_eff) + end + self.cor_card_eff = nil + local cor_time = 0.1 + self.cor_card_eff = coroutine.start(function() + self._popEvent = false + local eff = self._view:GetChild("poker_eff") + local poker_obj = eff:GetChild("poker") + local poker_back = eff:GetChild("di") + poker_back.visible = false + -- selfcard_code_obj + + if DataManager.CurrenRoom.room_config.config.laizi == 1 then + local card = 500+card%100 + --printlog("鬼牌=++++++++++++++++++++++++++++",card," ",math.floor(card / 100)," ",card%15) + self.guiCard = UIPackage.CreateObjectFromURL("ui://Extend_Poker_MuShi/"..card) + else + end + if self.guiCard then + self.ctr_card_eff.selectedIndex = 1 + self.guiCard:SetScale(1, 1) + poker_obj:AddChild(self.guiCard) + self.guiCard.visible = true + self.tween = TweenUtils.TweenFloat(0, 2340, cor_time, function(x) + poker_back.rotationY = x + poker_obj.rotationY = -180 + x + local x_1 = x % 360 + if (x_1 > 90 and x_1 < 270) then + poker_obj.visible = true + poker_back.visible = false + else + poker_obj.visible = false + poker_back.visible = true + end + end) + end + coroutine.wait(1) + self._popEvent = true + end) + +end + + +function M:OnPlayerReady(...) + --printlog("玩家准备6++++++++++++++++++++") + local arg = {...} + local p = arg[1] + local _room = self._room + local _player_info = self._player_info + if p.seat == _room.self_player.seat then + self._ctr_action.selectedIndex = 0 + self.btnstar.visible = false + end + local info = _player_info[self:GetPos(p.seat)] + info:Ready(true) +end + +function M:OnPlayerLeave(...) + MainView.OnPlayerLeave(self, ...) + local _room = self._room + if not _room.self_player.ready then + --self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 0 + end +end + +function M:Clear() + if self.result_view ~= nil then + self.result_view:Destroy() + self.result_view = nil + end + self.btnstar.visible = false + local list = self._room.player_list + for i = 1, #list do + local p = list[i] + local head_info = self._player_info[self:GetPos(p.seat)] + p:Clear() + head_info:FillData(p) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:Clear() + head_info:Ready(false) + end +end + +function M:PlayZhuangEffect() + if self.currenBank == -1 then return end + self.zhuangEffect = nil + local playerList = {} + for _, player in ipairs(self._room.player_list) do + local player_head = self._player_info[self:GetPos(player.seat)] + table.insert(playerList,player_head) + end + local kIndex = 0 + local round = 4 + if #playerList > 4 then + round = 2 + end + local bCurren = #playerList*round + self.currenBank + self.zhuangEffect = coroutine.start(function() + while true do + coroutine.wait(0.14) + ViewUtil.PlaySound("MuShi_PK", "extend/poker/mushi/sound/ms_sound_randbanker.mp3") + kIndex = kIndex + 1 + local k = kIndex % #playerList + if k == 0 then k =#playerList end + for i=1,#playerList do + playerList[i]:SetKuang(false) + end + playerList[k]:SetKuang(true) + if kIndex >= bCurren then + for i=1,#playerList do + playerList[i]:SetKuang(false) + end + local player_head = self._player_info[self:GetPos(self.currenBank)] + -- player_head:SetKuang(true) + -- local head_info = self._player_info[self:GetPos(self.currenBank)] + -- head_info:MarkBank(true) + if self.zhuangEffect then + coroutine.stop(self.zhuangEffect) + self.zhuangEffect = nil + player_head:MarkBank(true) + return + end + end + end + + end) +end + +function M:EventInit() + local _gamectr = ControllerManager.GetController(GameController) + MainView.EventInit(self) + local _player_info = self._player_info + local _player_card_info = self._player_card_info + local _room = self._room + _gamectr:AddEventListener(MuShi_GameEvent.OnMingCard, function(...) + local arg = {...} + local card = arg[1] + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 1 + self:PlayCardEff(card) + self.btn_ready1.visible = false + end) + + _gamectr:AddEventListener(MuShi_GameEvent.OnGuiPai,function (...) + local arg = {...} + local card = arg[1] + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 1 + self:PlayCardEff(card) + self.btn_ready1.visible = false + end) + + _gamectr:AddEventListener(MuShi_GameEvent.OnAgree,function (...) + local arg = {...} + local seat = arg[1] + local agree = arg[2] + end) + + _gamectr:AddEventListener(MuShi_GameEvent.OnReady,function (...) + local arg = {...} + local seat = arg[1] + if seat == self._room.self_player.seat then + printlog("aaaaaaaaaaaaaaaaaaaaaaaa1111111111111") + self.btn_ready1.visible = false + end + end) + + _gamectr:AddEventListener(MuShi_GameEvent.OnTiQian,function (...) + --printlog("发起提前开始返回2222====================================") + local arg = {...} + local seat = arg[1] + local agree = arg[2] + + local _gamectr = ControllerManager.GetController(GameController) + if (seat ~= self._room.self_player.seat and self._curren_msg ==nil) then + self._curren_msg = UIPackage.CreateObjectFromURL('ui://Common/MessageBox') + self._view:AddChild(self._curren_msg) + self._curren_msg:Center() + self._curren_msg:GetChild('tex_message').text = '确定要提前开始吗?' + self._curren_msg:GetChild('btn_ok').onClick:Set( + function() + _gamectr:AgreeStar(1) + self._curren_msg:Dispose() + self._curren_msg = nil + + end + ) + self._curren_msg:GetChild('btn_close').onClick:Set( + function() + _gamectr:AgreeStar(0) + self._curren_msg:Dispose() + self._curren_msg = nil + end + ) + end + end) + + + _gamectr:AddEventListener(MuShi_GameEvent.OnInitCard, function(...) + self.btn_ready1.visible = false + local arg = {...} + local round = arg[1] + -- local cardlist = arg[2] + -- local cardtype = arg[3] + -- local seat = arg[4] + -- local cardopen = arg[5] + local info = arg[2] + --self.currenBank = -1 + if self.result_view ~= nil then + self.result_view:Destroy() + self.result_view = nil + end + + --self._player_card_info[1]:HidePiao() + self.btnstar.visible = false + -- if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- -- body + -- self.MypokerList = cardlist + -- end + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + self.ctr_state.selectedIndex = 1 + --self.ctr_card_eff.selectedIndex = 0 + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + self:UpdateRound(round) + ViewUtil.PlaySound("MuShi_PK", "extend/poker/mushi/sound/fapai.mp3") + + for i=1,#info do + local seat = info[i]["seat"] + local cardlist = info[i]["cards"] + local cardtype = info[i]["cardtype"] + local cardopen = info[i]["cardopen"] + local head_info = self._player_info[self:GetPos(seat)] + head_info:Ready(false) + local card_info = self._player_card_info[self:GetPos(seat)] + card_info:Clear() + card_info:InitPoker(cardlist,cardtype,cardopen) + -- if seat == self._room.self_player.seat then + -- self:PlayFaPai(seat,cardlist,cardtype) + -- end + end + + coroutine.start(function() + coroutine.wait(0.2) + for i=1,#info do + local seat = info[i]["seat"] + local cardlist = info[i]["cards"] + local cardtype = info[i]["cardtype"] + local cardopen = info[i]["cardopen"] + local head_info = self._player_info[self:GetPos(seat)] + self:PlayFaPai(seat,cardlist,cardtype) + coroutine.wait(0.2) + end + end) + -- local list = _room.player_list + -- local head_info = self._player_info[self:GetPos(seat)] + -- --head_info:FillData(seat) + -- head_info:Ready(false) + -- local card_info = self._player_card_info[self:GetPos(seat)] + -- card_info:Clear() + -- card_info:InitPoker(cardlist,cardtype,cardopen) + -- if seat == self._room.self_player.seat then + -- self:PlayFaPai(seat,cardlist,cardtype) + -- end + end) + + _gamectr:AddEventListener(MuShi_GameEvent.OnErrorTip, function(...) + local arg = {...} + local error_str = arg[1] + self._player_card_info[1]:ErrorTip(error_str) + -- self._player_card_info[1]:ResetPoker() + end) + + _gamectr:AddEventListener(MuShi_GameEvent.OnPiaoTips, function(...) + self.btn_ready1.visible = false + local player_card_info = self._player_card_info[1] + if (self.currenBank == self._room.self_player.seat) then + player_card_info:ChangeCtrBuPai(2) + else + player_card_info:ChangeCtrBuPai(1) + end + end) + + _gamectr:AddEventListener(MuShi_GameEvent.OnPiaoAction, function(...) + self.btn_ready1.visible = false + local arg = {...} + local seat = arg[1] + local piao = arg[3] + self.isUpcuo = false + --printlog("广播补牌============================") + --pt(arg) + if (arg[2] == 1) then + local card_info = self._player_card_info[self:GetPos(seat)] + card_info:AddPoker(piao) + end + + if (arg[2] == 3) and self._room.self_player.seat == seat then + + self:SetCuoPai(piao) + -- self.cuoCorout = coroutine.start(function() + -- coroutine.wait(5) + -- local _gamectr = ControllerManager.GetController(GameController) + -- _gamectr:SendCuo() + -- end) + end + if self._room.self_player.seat == seat then + local player_card_info = self._player_card_info[1] + player_card_info:ChangeCtrBuPai(0) + end + + local player1 = self._room:GetPlayerBySeat(seat) + if (arg[2] == 1) and seat == self._room.self_player.seat then + self:PlaySound(player1.self_user.sex,"ms_sound_bupai") + elseif (arg[2] == 2) and seat == self._room.self_player.seat then + self:PlaySound(player1.self_user.sex,"ms_sound_kaipai") + end + end) + + _gamectr:AddEventListener(MuShi_GameEvent.OnFinishCuoPai, function(...) + local arg = {...} + local seat = arg[1] + local card = arg[2] + + local card_info = self._player_card_info[self:GetPos(seat)] + card_info:AddPoker(card) + self:ResetCuoPai() + end) + + -- 托管 + _gamectr:AddEventListener(MuShi_GameEvent.Game_TuoGuan, function(...) + local arg = {...} + local tuoguan = arg[1] + local seat = arg[2] + + local tuoguanzhong = self._view:GetChild("tuoguanzhong") + local zhezhao = self._view:GetChild("n109") + local head_info = self._player_info[self:GetPos(seat)] + if (tuoguan == 1) then + if (seat == self._room.self_player.seat ) then + tuoguanzhong.visible = true + + zhezhao.visible = true + zhezhao.onClick:Set(function() + _gamectr:TuoGuan(0) + end) + else + head_info._view:GetController("tuoguan").selectedIndex = 1 + end + else + if (seat == self._room.self_player.seat) then + tuoguanzhong.visible = false + zhezhao.visible = false + else + head_info._view:GetController("tuoguan").selectedIndex = 0 + end + end + end) + _gamectr:AddEventListener(MuShi_GameEvent.OnResult, function(...) + + local arg = {...} + local over = arg[1] + local info = arg[2] + local win_seat = arg[3] + local remaincards = arg[4] + + local player_card_info = self._player_card_info[1] + player_card_info:ChangeCtrBuPai(0) + if remaincards then + -- body + end + if self._cor_sound ~= nil then + coroutine.stop(self._cor_sound) + self._cor_sound = nil + end + + if self.destory_win ~= nil then + coroutine.stop(self.destory_win) + end + if self.WinItem_view1 ~= nil then + self.WinItem_view1:Dispose() + self.WinItem_view1 = nil + end + + + self.destory_win = nil + self.destory_win = coroutine.start(function() + -- print("11111111111111") + -- coroutine.wait(1) + if self._room.self_player.seat == win_seat then + local sprint_seat_list = self:GetSpringSeats(info) + if #sprint_seat_list > 0 then + local url = "ui://Extend_Poker_MuShiNew/Spring" + self.WinItem_view = UIPackage.CreateObjectFromURL(url) + self._view:AddChild(self.WinItem_view) + self.WinItem_view:Center() + self.WinItem_view:GetTransition("t0"):Play() + ViewUtil.PlaySound("MuShi_PK", "base/common/sound/win new.mp3") + end + -- local url = #sprint_seat_list > 0 and "ui://Extend_Poker_MuShiNew/Spring" or "ui://Extend_Poker_MuShiNew/Win_Mine" + + + else + local beigang = false + if #self:GetSpringSeats(info)>0 then + for i=1,#self:GetSpringSeats(info) do + if self:GetSpringSeats(info)[i]==self._room.self_player.seat then + local url = "ui://Extend_Poker_MuShiNew/spring2" + self.WinItem_view = UIPackage.CreateObjectFromURL(url) + self._view:AddChild(self.WinItem_view) + self.WinItem_view:Center() + self.WinItem_view:GetTransition("t0"):Play() + beigang=true + end + end + + end + + end + for i = 1, #info do + -- coroutine.wait(0.3) + --print("player.cardMul===============",player.cardMul) + local player = info[i] + local p = self._room:GetPlayerBySeat(player.seat) + local head_info = self._player_info[self:GetPos(player.seat)] + local card_info = self._player_card_info[self:GetPos(player.seat)] + card_info:SetCarType(player.cardType,player.cardPoint,player.cardMul) + local player1 = self._room:GetPlayerBySeat(player.seat) + if self._room.self_player.seat == player.seat then + self:PlayCardTypeVoice(player1.self_user.sex,player.cardType,player.cardPoint) + end + end + self:FlyCoinByInfo(info) + coroutine.wait(0.1*#info) + for i = 1, #info do + local player = info[i] + local p = self._room:GetPlayerBySeat(player.seat) + local head_info = self._player_info[self:GetPos(player.seat)] + local card_info = self._player_card_info[self:GetPos(player.seat)] + + if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then + p.hp_info = player.hp_info + head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) + head_info._view:GetChild('zhanji').visible = true + local num = player.hp_info.total_hp + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(player.hp_info.total_hp) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + end + card_info:PlayScore(d2ad(player.hp_info.round_actual_hp), false, win_seat == player.seat) + else + local rt = 1 + if self._room.hpOnOff == 1 then + rt = self._room.score_times + end + if over == 1 and self._room.hpOnOff == 1 then + head_info:UpdateScore(player.score / 10) --不可负分 + else + head_info:UpdateScore(player.score * rt) + end + card_info:PlayScore(player.winscore * rt, false, win_seat == player.seat) + end + + + if player.seat ~= self._room.self_player.seat then + card_info:UpdateHandPoker(player.cards, false, true) + card_info:SetRemainCardNumber(false) + else + + end + + end + coroutine.wait(0.5) + for i = 1, #info do + local player = info[i] + local p = self._room:GetPlayerBySeat(player.seat) + local head_info = self._player_info[self:GetPos(player.seat)] + local card_info = self._player_card_info[self:GetPos(player.seat)] + if player.seat == self._room.self_player.seat then + if (player.winscore>0) then + printlog("cccccccccccc22222222222222222222222") + local url = "ui://Extend_Poker_MuShi/FzEffect" + self.WinItem_view1 = UIPackage.CreateObjectFromURL(url) + self._view:AddChild(self.WinItem_view1) + self.WinItem_view1:Center() + self.WinItem_view1:GetTransition("t2"):Play() + ViewUtil.PlaySound("MuShi_PK", "extend/poker/mushi/sound/ms_sound_win.mp3") + end + end + end + self:ChangeBgmMusic(1) + -- if over == 0 then + if #self:GetSpringSeats(info) > 0 then + -- print("222222222222222222") + --coroutine.wait(1) + else + -- print("333333333333333333") + -- coroutine.wait(2) + end + coroutine.wait(1) + if (over == 0) then-- + -- if self._room.self_player.entrust and self._room.self_player.entrust == false then + -- self.btn_ready1.visible = true + -- end + self.btn_ready1.visible = true + if self.WinItem_view1 ~= nil then + self.WinItem_view1:Dispose() + self.WinItem_view1 = nil + end + self.btn_ready1.onClick:Set(function() + self.btn_ready1.visible = false + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:ConformToNextGame() + end) + else + self.result_view = MuShi_ResultView.new(self._root_view, info, self._room.room_id, over, win_seat, 1,nil) + self.result_view:Show() + end + --self.result_view = MuShi_ResultView.new(self._root_view, info, self._room.room_id, over, win_seat, 0, remaincards) + --self.result_view:Show() + if self.WinItem_view ~= nil then + self.WinItem_view:Dispose() + self.WinItem_view = nil + end + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + + if self._room.self_player.entrust == true and self.result_view then + local btn_confirm = self.result_view._view:GetChild("btn_confirm") + btn_confirm.onClick:Call() + end + + + end) + if over==1 then + -- body + self:UnmarkSelfTuoguan() + ControllerManager.ChangeController(LoddyController) + end + + if self.guiCard ~=nil then + self.guiCard:Dispose() + end + end) + + _gamectr:AddEventListener(MuShi_GameEvent.OnResultByDissolve, function(...) + + local arg = {...} + local over = arg[1] + local info = arg[2] + local winseat = arg[3] + local dissolve = arg[4] + + self.result_view = MuShi_ResultView.new(self._root_view, info, self._room.room_id, over, winseat, dissolve,nil) + self.result_view:Show() + ControllerManager.ChangeController(LoddyController) + self:UnmarkSelfTuoguan() + end) + + -- 确定开始下一局 成功 + _gamectr:AddEventListener(MuShi_GameEvent.OnConfrimToNextGameSucc, function(...) + local arg = {...} + local aid = arg[1] + local p = self._room:GetPlayerById(aid) + if p.seat == self._room.self_player.seat then + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + if self.destory_win ~= nil then + coroutine.stop(self.destory_win) + self.destory_win = nil + end + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + local player_head = self._player_info[self:GetPos(player.seat)] + player_card_info:Clear() + end + end + local player_info = self._player_info[self:GetPos(p.seat)] + player_info:Ready(true) + end) + + _gamectr:AddEventListener(MuShi_GameEvent.OnQiangZhuang, function(...) + self:Clear() + self.ctr_state.selectedIndex = 1 + for _, player in ipairs(self._room.player_list) do + local player_head = self._player_info[self:GetPos(player.seat)] + player_head:MarkBank(false) + player_head:UpdateFen(-1,0) + end + self._player_card_info[1]:StarQiangZhuang(1) + self.btnstar.visible = fasle + self.btn_ready1.visible = false + end) + + _gamectr:AddEventListener(MuShi_GameEvent.OnOtherQiangZhuang, function(...) + local arg = {...} + local seat = arg[1] + local index = arg[2] + if (seat == self._room.self_player.seat) then + self._player_card_info[1]:StarQiangZhuang(0) + end + --printlog("iiiiiiiiiiiiiiiiiiii ",seat," ",self:GetPos(seat)) + local head_info = self._player_info[self:GetPos(seat)] + head_info:UpdateFen(0,index) + + if seat == self._room.self_player.seat then + local player1 = self._room:GetPlayerBySeat(seat) + self:PlaySound(player1.self_user.sex,"jiaofen_"..index) + end + printlog("iiiiiiiiiiiiiiiiiiiiii ",index) + self.btn_ready1.visible = false + end) + + _gamectr:AddEventListener(MuShi_GameEvent.OnZhuang, function(...) + local arg = {...} + local seat = arg[1] + local index = arg[2] + local score = arg[3] + local head_info = self._player_info[self:GetPos(seat)] + self.currenBank = -1 + self.currenBank = seat + self.btn_ready1.visible = false + printlog("庄家 客户端相对座位号================",seat," ",self._room.self_player.seat) + for _, player in ipairs(self._room.player_list) do + local player_head = self._player_info[self:GetPos(player.seat)] + player_head:MarkBank(false) + end + head_info:UpdateFen(1,score) + -- head_info:MarkBank(true) + self:PlayZhuangEffect() + end) + + _gamectr:AddEventListener(MuShi_GameEvent.OnStarBet, function(...) + local arg = {...} + local seat = arg[1] + -- printlog("自己座位号===============",self._room.self_player.seat) + if (seat == self._room.self_player.seat) then + self._player_card_info[1]:StarBet(1) + local head_info = self._player_info[self:GetPos(seat)] + head_info.colKuang = true + self.btn_ready1.visible = false + end + + end) + + _gamectr:AddEventListener(MuShi_GameEvent.OnBet, function(...) + local arg = {...} + local seat = arg[1] + local index = arg[2] + local score = arg[3] + local head_info = self._player_info[self:GetPos(seat)] + head_info:UpdateFen(2,index) + + if (seat == self._room.self_player.seat) then + self._player_card_info[1]:StarBet(0) + local head_info = self._player_info[self:GetPos(seat)] + head_info.colKuang = false + self.btn_ready1.visible = false + end + end) +end + +function M:PlayCardTypeVoice(sex,card_type,point) + if card_type == MuShi_CardType.TYPE_SHUANGGUI then + self:PlaySound(sex,"ms_sound_type_10") + elseif card_type == MuShi_CardType.TYPE_SANGUI then + self:PlaySound(sex,"ms_sound_type_20") + elseif card_type == MuShi_CardType.TYPE_TIANGONG then + self:PlaySound(sex,"ms_sound_tian_8") + elseif card_type == MuShi_CardType.TYPE_DOUBLE_TIANGONG then + self:PlaySound(sex,"ms_sound_tian_9") + elseif card_type == MuShi_CardType.TYPE_NORMAL then + self:PlaySound(sex,"ms_sound_point_"..point) + elseif card_type == MuShi_CardType.TYPE_MUSHI then + self:PlaySound(sex,"ms_sound_point_03") + elseif card_type == MuShi_CardType.TYPE_TONGHUASHUN then + self:PlaySound(sex,"ms_sound_type_8") + elseif card_type == MuShi_CardType.TYPE_SANTIAO then + self:PlaySound(sex,"ms_sound_man_type_5") + elseif card_type == MuShi_CardType.TYPE_SHUNZI then + self:PlaySound(sex,"ms_sound_man_type_4") + end +end + +function M:FlyCoinByInfo(info) + self.coinNum = 8 + printlog("庄家信息=======================",self.currenBank," ",self._room.self_player.seat) + if (self.currenBank ~= -1) then + local bankHeadInfo = self._player_info[self:GetPos(self.currenBank)] + coroutine.start(function () + for i=1,#info do + local player = info[i] + local head_info = self._player_info[self:GetPos(player.seat)] + if (player.winscore > 0) and player.seat ~=self.currenBank then + -- for i=1,self.coinNum do + -- FlyCoin.new(bankHeadInfo._btn_head.displayObject.gameObject.transform.position,head_info._btn_head.displayObject.gameObject.transform.position,self._view) + -- coroutine.wait(0.2) + -- end + + FlyCoin.new(bankHeadInfo.point.displayObject.gameObject.transform.position,head_info.point.displayObject.gameObject.transform.position,self._view,self.coin) + printlog("playerseatplayerseatplayerseatplayerseatplayerseat111 ",player.seat," ",self._room.self_player.seat) + if self.currenBank == self._room.self_player.seat then + ViewUtil.PlaySound("MuShi_PK","extend/poker/mushi/sound/ms_sound_flychips.mp3") + end + coroutine.wait(0.2) + elseif(player.winscore < 0 and player.seat ~=self.currenBank) then + -- for i=1,self.coinNum do + -- FlyCoin.new(head_info._btn_head.displayObject.gameObject.transform.position,bankHeadInfo._btn_head.displayObject.gameObject.transform.position,self._view) + -- coroutine.wait(0.2) + -- end + printlog("playerseatplayerseatplayerseatplayerseatplayerseat22222 ",player.seat," ",self._room.self_player.seat) + FlyCoin.new(head_info.point.displayObject.gameObject.transform.position,bankHeadInfo.point.displayObject.gameObject.transform.position,self._view,self.coin) + if self.currenBank == self._room.self_player.seat then + ViewUtil.PlaySound("MuShi_PK","extend/poker/mushi/sound/ms_sound_flychips.mp3") + end + coroutine.wait(0.2) + end + end + end) + else + for i=1,#info do + local player = info[i] + local head_info = self._player_info[self:GetPos(player.seat)] + coroutine.start(function () + if (player.winscore > 0) then + -- for i=1,self.coinNum do + -- FlyCoin.new(self.btn_ready1.displayObject.gameObject.transform.position,head_info._btn_head.displayObject.gameObject.transform.position,self._view) + -- coroutine.wait(0.02) + -- end + printlog("playerseatplayerseatplayerseatplayerseatplayerseat333333333333333333333333") + FlyCoin.new(self.btn_ready1.displayObject.gameObject.transform.position,head_info.point.displayObject.gameObject.transform.position,self._view,self.coin) + if player.seat == self._room.self_player.seat then + --printlog("aaaaaaaaaaaaaa33333333333333333333333") + ViewUtil.PlaySound("MuShi_PK", "extend/poker/mushi/sound/ms_sound_flychips.mp3") + end + coroutine.wait(0.1) + elseif (player.winscore < 0) then + -- for i=1,self.coinNum do + -- FlyCoin.new(head_info._btn_head.displayObject.gameObject.transform.position,self.btn_ready1.displayObject.gameObject.transform.position,self._view) + -- coroutine.wait(0.02) + -- end + printlog("playerseatplayerseatplayerseatplayerseatplayerseat4444444444444444444444444444") + FlyCoin.new(head_info.point.displayObject.gameObject.transform.position,self.btn_ready1.displayObject.gameObject.transform.position,self._view,self.coin) + if player.seat == self._room.self_player.seat then + --printlog("aaaaaaaaaaaaaa444444444444444444444444444444444") + ViewUtil.PlaySound("MuShi_PK", "extend/poker/mushi/sound/ms_sound_flychips.mp3") + end + coroutine.wait(0.1) + end + end) + end + end + +end + +function M:ReConnectForStart() + if self.cor_card_eff ~= nil then + coroutine.stop(self.cor_card_eff) + end + local _gamectr = ControllerManager.GetController(GameController) + --self._room.is_new_bout = _gamectr:GetIsNewBout(self._room.curren_turn_seat) + --self._state.selectedIndex = 1 + --self._view:GetController("time").selectedIndex = self:GetPos(self._room.curren_turn_seat) + + self:UpdateRound(self._room.curren_round) + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + local head_info = self._player_info[self:GetPos(player.seat)] + head_info:Ready(false) + + --如果是体力值不可负分模式 则显示当前的hp值 + -- if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then + -- head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) + -- head_info._view:GetChild('zhanji').visible = true + -- local num = player.hp_info.total_hp + -- if num > 0 then + -- head_info._view:GetController('text_color').selectedIndex = 0 + -- head_info._view:GetChild('text_jifen').text = '+' .. d2ad(player.hp_info.total_hp) + -- else + -- head_info._view:GetController('text_color').selectedIndex = 1 + -- head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + -- end + -- else + -- local rt = 1 + -- if self._room.hpOnOff == 1 then + -- rt = self._room.score_times + -- end + -- head_info:UpdateScore(player.total_score * rt) + -- end + + -- head_info:UpdateLineState(player.line_state) + -- head_info:UpdatePiao(player.piao) + + -- if player.seat == self._room.self_player.seat then + -- player_card_info:InitPoker(player.hand_list) + -- else + + -- end + end + -- gameState = { + -- None = 0, + -- ROOM_STATUS_INIT = 1,--初始化 + -- ROOM_STATUS_START = 2,--开始 + -- ROOM_STATUS_QIANGZHUANG = 3,--抢庄 + -- ROOM_STATUS_XIAZHU = 4,--下注 + -- ROOM_STATUS_BUPAI = 5,--补牌 + -- ROOM_STATUS_FINISH = 6,--完成 + -- } + if (self._room.roomStatus == gameState.ROOM_STATUS_INIT) then + + elseif (self._room.roomStatus == gameState.ROOM_STATUS_START) then + elseif (self._room.roomStatus == gameState.ROOM_STATUS_QIANGZHUANG) then + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + local head_info = self._player_info[self:GetPos(player.seat)] + if(player.seat == self._room.self_player.seat) and player.isPlaying==true then + if(not player.isQiangZhuang)then + player_card_info:StarQiangZhuang(1) + else + head_info:UpdateFen(0,player.qiangZhuangIndex) + end + else + if(player.isQiangZhuang)then + head_info:UpdateFen(0,player.qiangZhuangIndex) + end + end + end + elseif (self._room.roomStatus == gameState.ROOM_STATUS_XIAZHU) then + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + local head_info = self._player_info[self:GetPos(player.seat)] + if(player.seat == self._room.self_player.seat) and player.isPlaying==true then + if(player.isZhuang) then + head_info:MarkBank(true) + else + if (not player.isXiaZhu) then + player_card_info:StarBet(1) + else + head_info:UpdateFen(2,player.xiaZhuIndex) + end + end + else + if(player.isZhuang) then + head_info:MarkBank(true) + else + if (player.isXiaZhu) then + head_info:UpdateFen(2,player.xiaZhuIndex) + end + end + end + end + elseif (self._room.roomStatus == gameState.ROOM_STATUS_BUPAI) then + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + local head_info = self._player_info[self:GetPos(player.seat)] + if(player.seat == self._room.self_player.seat) and player.isPlaying==true then + if (not player.isBuPai) then + player_card_info:ChangeCtrBuPai(1) + end + player_card_info:InitPoker2(player.hand_list) + elseif(player.seat == self._room.self_player.seat) and player.isPlaying==false then + + end + if (player.seat ~= self._room.self_player.seat and player.isPlaying==true) then + player_card_info:InitPoker2({0,0}) + end + end + elseif (self._room.roomStatus == gameState.ROOM_STATUS_FINISH) then + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + local head_info = self._player_info[self:GetPos(player.seat)] + player_card_info:InitPoker2(player.hand_list) + local num = player.hp_info.total_hp + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = '+' .. d2ad(player.hp_info.total_hp) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + end + player_card_info:SetCarType(player.cardType,player.cardPoint) + end + self.btn_ready1.visible = true + self.btn_ready1.onClick:Set(function() + self.btn_ready1.visible = fasle + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:ConformToNextGame() + end) + end + + if self._room.zhuangSeat ~= -1 then + self.currenBank = self._room.zhuangSeat + + -- local player_head = self._player_info[self:GetPos(self.currenBank)] + + -- player_head:MarkBank(true) + end + + if self._room.guiCard then + self:PlayCardEff(self._room.guiCard) + end +end + +function M:ReconnectForClearing() + self:UpdateRound(self._room.curren_round) + local win_seat = 0 + --self.rank_view = self:CreateRankEff(self._room.winseat) + for _, player in ipairs(self._room.player_list) do + local head_info = self._player_info[self:GetPos(player.seat)] + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + + --如果是体力值不可负分模式 则显示当前的hp值 + if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then + head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) + head_info._view:GetChild('zhanji').visible = true + local num = player.hp_info.total_hp + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = '+' .. d2ad(player.hp_info.total_hp) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + end + -- player_card_info:PlayScore(d2ad(player.hp_info.round_actual_hp)) + else + local rt = 1 + if self._room.hpOnOff == 1 then + rt = self._room.score_times + end + head_info:UpdateScore(player.total_score * rt) + -- player_card_info:PlayScore(player.winscore * rt, false, self._room.winseat) + end + + head_info:UpdateLineState(player.line_state) + --head_info._view:GetController("Oener").selectedIndex=0 + head_info:UpdatePiao(player.piao) + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + + end + + + if player.seat == self._room.self_player.seat then + + player_card_info:InitPoker(player.hand_list, false) + else + player_card_info:UpdateHandPoker(player.hand_list, false, true) + end + if player.out_card_list[1] == 0 then + + --player_card_info:SetOutCardInfo(nil, false) + else + --player_card_info:SetOutCardInfo(player.out_card_list, false) + end + end + win_seat=self._room.winseat + self._room.winseat = nil + + local remaincards = self._room.remaincards + if self._room.game_status==1 then + + + -- body + coroutine.start(function() + coroutine.wait(0.3) + + --self.result_view = MuShi_ResultView.new(self._root_view, self._room.player_list, self._room.room_id, 0, win_seat,0,nil) + --self.result_view:Show() + local card_info = self._player_card_info[1] + card_info._view:GetChild("out_card_list").visible=true + end) + if remaincards then + + local newremaincards = self._gamectr:ChangeCodeByFrom(remaincards,true) + + -- body + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list:RemoveChildrenToPool() + otherpoker_list.visible=true + end + + for i = #newremaincards, 1, -1 do + coroutine.start(function() + coroutine.wait(0.1 * (15 - i)) + + + local flow = newremaincards[i] % 10 + local num = (newremaincards[i] - (newremaincards[i] % 10)) / 10 + local card_n = flow * 100 + num + local poker_item = UIPackage.CreateObject("Extend_Poker_MuShi", "poker6") + + --local code = self:ChangeCodeByTo(card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_MuShi/" .. card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + local card_code_obj + if DataManager.CurrenRoom.pai==0 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_MuShi/"..card_n) + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + end + if card_n==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_MuShi/"..card_n.."_1") + end + card_code_obj:SetScale(0.6, 0.6) + poker_item:AddChild(card_code_obj) + -- otherpoker_list:AddChild(poker_item) + end) + end + end + end +end + +function M:CreateRankEff() + self.rank_view = UIPackage.CreateObjectFromURL("ui://Extend_Poker_MuShi/rank_eff") + self._view:AddChild(self.rank_view) + self.rank_view:Center() + self.rank_view:GetTransition("t0"):Play() +end + + +function M:UpdateRound(round) + local total_round = self._room.room_config.Times + self._text_round.text = string.format("%d / %d 局", round, total_round) +end + +function M:GetSoundFileName(type, num, isNewBout) + local fileName + if isNewBout then + if type > 6 or type == 4 then + if type == 8 or type == 9 then + type = 7 + end + fileName = tostring(type) + elseif type > 2 then + fileName = string.format("3_%d", num) + else + fileName = string.format("%d_%d", type, num) + end + else + math.randomseed(os.time()) + if type > 2 and type ~= 11 then + local r = math.random(1, 3) + fileName = "dani_" .. r + elseif type == 11 then + fileName = tostring(type) + else + fileName = string.format("%d_%d", type, num) + end + end + return fileName +end + +function M:GetSpringSeats(player_info) + local seat_list = {} + local card_max_length = self._room.room_config.Leaf + 14 + for i = 1, #player_info do + local player = player_info[i] + if #player.cards == card_max_length then + seat_list[#seat_list + 1] = player.seat + end + end + return seat_list +end + + + +function M:PlaySound(sex, path) + + local sex_path = ViewUtil.Sex_Chat[sex]-- 1 男 2 女 + local sound_path = string.format("extend/poker/mushi/sound/%s/%s.mp3", sex_path, path) + ViewUtil.PlaySound("MuShi_PK", sound_path) +end + +function M:ChangeBgmMusic(bgm_index) + if bgm_index == nil then + bgm_index = self.bgm_index + else + self.bgm_index = bgm_index + end + ViewUtil.PlayMuisc("MuShi_PK", string.format("extend/poker/mushi/sound/bgm%d.mp3", 1)) +end +function M:OnPlayerEnter( ... ) + --DataManager.CurrenRoom.RoomConfig.people_num + --pt(DataManager.CurrenRoom.room_config) + --printlog("玩家进入游戏11111111111111111111111111111111111 ") + local arg = {...} + local p = arg[1] + for i=1,#self._room.player_list do + if self._room.self_player.seat==self._room.player_list[i].seat and self._room.self_player.self_user.account_id ~= self._room.player_list[i].self_user.account_id then + -- body + local ErrorMsgTip = UIPackage.CreateObject("Common", "Win_ConnectTip") + local _action = self._view:AddChild(ErrorMsgTip) + _action.xy = Vector2((self._view.width - _action.width) / 4, self._view.height / 4) + local text = _action:GetChild("tex_message") + local btn1 = _action:GetChild("btn_connect") + local btn2 = _action:GetChild("btn_back") + text.text = "您来晚了,座位有人,请重新进牌桌" + btn1.visible=false + btn2:Center() + btn2.y=btn2.y+50 + btn2.onClick:Set(function() + -- body + ErrorMsgTip:Destroy() + ErrorMsgTip = nil + self._gamectr:LevelRoom(function(res) + ViewUtil.CloseModalWait() + NetResetConnectWindow.CloseNetReset() + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + end) + end + end + if not self._room.self_player.ready and self._room.room_config.people_num ==#self._room.player_list then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 0 + end + + MainView.OnPlayerEnter(self, ...) +end + +function M:Destroy() + UpdateBeat:Remove(self.OnUpdate,self) + for i = 1, #self._room.player_list do + local player = self._room.player_list[i] + local card_info_i = self._player_card_info[self:GetPos(player.seat)] + --player:Destroy() + card_info_i:Destroy() + if card_info_i ~= nil and card_info_i.cor_init_poker ~= nil then + coroutine.stop(card_info_i.cor_init_poker) + end + local head_info = self._player_info[self:GetPos(player.seat)] + head_info:Destroy1() + head_info:Destroy() + end + MSMainView.Destroy(self) + UIPackage.RemovePackage("extend/poker/mushi/ui/Extend_Poker_MuShi") + self.InitCardList = {} + --self.OnMuShiUpdate = nil +end + +return M diff --git a/lua_probject/extend_project/extend/poker/mushi/MuShi_Player.lua b/lua_probject/extend_project/extend/poker/mushi/MuShi_Player.lua new file mode 100644 index 00000000..8899d829 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/mushi/MuShi_Player.lua @@ -0,0 +1,50 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:42 +--- +local MuShi_Player = { + -- 手牌列表 + hand_count = 0, + out_card_list = {}, + hand_list = {}, + isOneCard= false, -- 报单 + +} + +local M = MuShi_Player + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_count = 0 + self.out_card_list = {} + self.hand_list = {} + self.isOneCard = false + + self.isZhuang = false + self.xiaZhuMul = 0 + self.winscore = 0 + self.status = -1 + self.qiangZhuangIndex = -1 + self.qiangZhuangScore = -1 + self.isXiaZhu = false + self.xiaZhuIndex = -1 + self.isQiangZhuang = false + self.isBuPai = false + self.cardType = 0 + self.cardPoint = 0 + self.isPlaying = false + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_count = 0 + self.out_card_list = {} + self.hand_list = {} + self.isOneCard = false +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/mushi/MuShi_PlayerBackView.lua b/lua_probject/extend_project/extend/poker/mushi/MuShi_PlayerBackView.lua new file mode 100644 index 00000000..5d106d97 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/mushi/MuShi_PlayerBackView.lua @@ -0,0 +1,543 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/25 13:52 +--- +local PKPlayBackView = require('main.poker.PKPlayBackView') +local MuShi_PlayerCardInfoView = import('.MuShi_PlayerPokerInfoView') +local MuShi_PlayerSelfCardInfoView = import('.MuShi_PlayerSelfPokerInfoView') +local PlayerInfoView = import('.EXPlayerInfoView') +local MuShi_RightPanelView = import(".MuShi_RightPanelView") +local MuShi_ResultView = import(".MuShi_ResultView") +local M = {} + +local MuShi_Record_Event = { + Evt_alertQiangZhuang = 'alertQiangZhuang', + Evt_userQiangZhuang = 'userQiangZhuang', + Evt_zhuangInfo = 'zhuangInfo', + Evt_alertXiaZhu = 'alertXiaZhu', + Evt_userXiaZhu = 'userXiaZhu', + Evt_alertBuPai = 'alertBuPai', + Evt_playerBuPai = 'playerBuPai', + Evt_playerSendCards = 'playerSendCards', + Evt_result = 'result', + + Evt_OutCard = 'OutCard', + Evt_Pass = 'pass', + Evt_NewRound = 'newindex', + Evt_Result = 'Result' +} + +local default_bg = 1 +local bg_config = { + {id = 1, url = 'extend/poker/mushi/bg/bg1', thumb = 'ui://Extend_Poker_MuShi/table_bg1'}, + {id = 2, url = 'extend/poker/mushi/bg/bg1', thumb = 'ui://Extend_Poker_MuShi/table_bg1'}, + {id = 3, url = 'extend/poker/mushi/bg/bg1', thumb = 'ui://Extend_Poker_MuShi/table_bg1'} +} + +--- Create a new +function M.new() + setmetatable(M, {__index = PKPlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = 'MuShi_PlayBackView' + self:init() + + return self +end + +function M:InitView(url) + local room = self._room + if not room.self_player then + room.self_player = room:GetPlayerBySeat(1) + end + self._gamectr = ControllerManager.GetController(GameController) + UIPackage.AddPackage('extend/poker/mushi/ui/Extend_Poker_MuShi') + PKPlayBackView.InitView(self, 'ui://Extend_Poker_MuShi/MuShi_Main_' .. self._room.room_config.people_num, default_bg, bg_config) + self._tex_round = self._view:GetChild('round') + self._player_card_info = {} + local _player_card_info = self._player_card_info + for i = 1, room.room_config.people_num do + local tem = self._view:GetChild('player_card_info_' .. i) + self._player_card_info[i] = self:NewPlayerPokerInfoView(tem, i) + end + local rightpanel = self._view:GetChild("right_panel") + if self._rightPanelView ~= nil then + self._rightPanelView:Destroy() + end + + self._rightPanelView = MuShi_RightPanelView.new(self, rightpanel) + rightpanel:GetChild("btn_setting").onClick:Clear() + + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild('player_info' .. i) + _player_info[i] = PlayerInfoView.new(tem, self) + end + local list = self._room.player_list + for i=1,#list do + local p = list[i] + local info = _player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + end + + self.btnstar = self._view:GetChild("btnstar") + self.btn_ready1 = self._view:GetChild("btn_ready1") + self.btn_ready1.visible = false + self.btnstar.visible = false + -- if self._room.hpOnOff == 1 and self._room.score_times ~= 1 then + -- -- body + -- self._view:GetChild('roominfo_panel1'):GetChild('tex_beishu').text = self._room.score_times .. '倍' + -- else + -- self._view:GetChild('roominfo_panel1'):GetChild('tex_beishu').text = '' + -- end + self._eventmap = {} + self._cmdmap = {} + + + self._cmdmap[MuShi_Record_Event.Evt_alertQiangZhuang] = self.CmdAlertQiangZhuang + self._cmdmap[MuShi_Record_Event.Evt_userQiangZhuang] = self.CmdUserQiangZhuang + self._cmdmap[MuShi_Record_Event.Evt_zhuangInfo] = self.CmdZhuangInfo + self._cmdmap[MuShi_Record_Event.Evt_alertXiaZhu] = self.CmdAlertXiaZhu + self._cmdmap[MuShi_Record_Event.Evt_userXiaZhu] = self.CmdUserXiaZhu + self._cmdmap[MuShi_Record_Event.Evt_alertBuPai] = self.CmdAlertBuPai + self._cmdmap[MuShi_Record_Event.Evt_playerBuPai] = self.CmdPlayerBuPai + self._cmdmap[MuShi_Record_Event.Evt_playerSendCards] = self.CmdPlayerSendCards + self._cmdmap[MuShi_Record_Event.Evt_result] = self.CmdResult + + self._cmdmap[MuShi_Record_Event.Evt_OutCard] = self.Wuyong + self._cmdmap[MuShi_Record_Event.Evt_Pass] = self.Wuyong + self._cmdmap[MuShi_Record_Event.Evt_NewRound] = self.Wuyong + self._cmdmap[MuShi_Record_Event.Evt_Result] = self.Wuyong + + self:CuoPai() + +end + +function M:CuoPai() + self.cuopai = self._view:GetChild("cuopai") + self.cuopai.visible = false + -- print("self.btnY ",self.btnY) +end + +function M:Wuyong() + +end + +function M:NewPlayerPokerInfoView(view, index) + if index == 1 then + return MuShi_PlayerSelfCardInfoView.new(view, self) + end + return MuShi_PlayerCardInfoView.new(view, self) +end + +function M:FillRoomData(data) + --print("hidezhanji 1111") + self._currentStep = 1 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local roominfo_panel = self._view:GetChild('roominfo_panel1') + + roominfo_panel:GetChild('tex_roomid').text = data.info.roomid + roominfo_panel:GetChild('tex_gametype').text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + local head_info = self._player_info[self:GetPos(p.seat)] + + if p.total_hp then + -- print("hidezhanji 2222") + head_info._view:GetChild('zhanji').visible=false + + if room.hpOnOff == 1 or room:checkHpNonnegative() then + head_info._view:GetChild('zhanji').visible=true + head_info._view:GetChild('text_jifen').text = d2ad(p.total_hp) + end + end + head_info:FillData(p) + head_info:UnmarkTuoguan() + head_info:UpdateScore() + -- if p.seat ~= room.self_player.seat then + -- card_info:UpdateHandPoker(p.hand_list, false, true) + -- end + head_info:UpdatePiao(p.piao) + end + + self:UpdateRound() + + self:GenerateAllStepData(data) + self:ShowStep(1) +end + +function M:ShowStep(index) + local step = self._step[index] + if step==nil then + return + end + -- for i = 1, #step.player_card_data do + -- local p = self._room:GetPlayerBySeat(i) + -- local info = self._player_card_info[self:GetPos(i)] + -- p.hand_list = step.player_card_data[i].hand_list + -- info:InitPoker(p.hand_list, false) + -- end + + -- Evt_alertQiangZhuang = 'alertQiangZhuang', +-- Evt_userQiangZhuang = 'userQiangZhuang', +-- Evt_zhuangInfo = 'zhuangInfo', +-- Evt_alertXiaZhu = 'alertXiaZhu', +-- Evt_userXiaZhu = 'userXiaZhu', +-- Evt_alertBuPai = 'alertBuPai', +-- Evt_playerBuPai = 'playerBuPai' + + if step.cmd == MuShi_Record_Event.Evt_alertQiangZhuang then + for _, player in ipairs(self._room.player_list) do + local player_head = self._player_info[self:GetPos(player.seat)] + player_head:MarkBank(false) + player_head:UpdateFen(-1,0) + end + self._player_card_info[1]:StarQiangZhuang(1) + end + + if step.cmd == MuShi_Record_Event.Evt_userQiangZhuang then + local seat = step.seat + local index = step.index + if (seat == self._room.self_player.seat) then + self._player_card_info[1]:StarQiangZhuang(0) + end + local head_info = self._player_info[self:GetPos(seat)] + head_info:UpdateFen(0,index) + end + + if step.cmd == MuShi_Record_Event.Evt_zhuangInfo then + local seat = step.seat + local score = step.score + local head_info = self._player_info[self:GetPos(seat)] + for _, player in ipairs(self._room.player_list) do + local player_head = self._player_info[self:GetPos(player.seat)] + player_head:MarkBank(false) + end + head_info:UpdateFen(1,score) + head_info:MarkBank(true) + end + + if step.cmd == MuShi_Record_Event.Evt_alertXiaZhu then + local seat = step.seat + if (seat ~= self._room.self_player.seat) then + self._player_card_info[1]:StarBet(1) + end + end + + if step.cmd == MuShi_Record_Event.Evt_userXiaZhu then + local seat = step.seat + local index = step.index + local head_info = self._player_info[self:GetPos(seat)] + head_info:UpdateFen(2,index) + + if (seat == self._room.self_player.seat) then + self._player_card_info[1]:StarBet(0) + end + end + + if step.cmd == MuShi_Record_Event.Evt_alertBuPai then + local seat = step.seat + if(seat == self._room.self_player.seat) then + self._player_card_info[1]:ChangeCtrBuPai(1) + end + end + + if step.cmd == MuShi_Record_Event.Evt_playerBuPai then + local seat = step.seat + local bupai = step.bupai + local card = step.card + --printlog("补牌================",bupai,card) + if (bupai == 1) then + local card_info = self._player_card_info[self:GetPos(seat)] + card_info:AddPoker(card,1) + end + if self._room.self_player.seat == seat then + local player_card_info = self._player_card_info[1] + player_card_info:ChangeCtrBuPai(0) + end + end + + if step.cmd == MuShi_Record_Event.Evt_alertBuPai then + local seat = step.seat + if(seat == self._room.self_player.seat) then + self._player_card_info[1]:ChangeCtrBuPai(1) + end + end + + if step.cmd == MuShi_Record_Event.Evt_playerSendCards then + local seat = step.seat + local cards = step.cards + local info = self._player_card_info[self:GetPos(seat)] + info:InitPoker1(cards) + end + + if step.cmd == MuShi_Record_Event.Evt_result then + local result = step.result + for i = 1,#result do + local seat = result[i].seat + local cardType = result[i].cardType + local cardPoint = result[i].cardPoint + + local card_info = self._player_card_info[self:GetPos(seat)] + card_info:SetCarType(cardType,cardPoint) + end + end + +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = '' + + step.win = 0 + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.hand_list = p.hand_card + --u.hand_count = #u.hand_list + --u.out_card_list = {} + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + + + +function M:CmdAlertQiangZhuang(cmd,index) --通知抢庄 + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd +end + +function M:CmdUserQiangZhuang(cmd,index) --玩家抢庄 + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.data.seat + data.index = cmd.data.index + data.score = cmd.data.score +end + +function M:CmdZhuangInfo(cmd,index) --定庄 + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.data.seat + data.index = cmd.data.index + data.score = cmd.data.score +end + +function M:CmdAlertXiaZhu(cmd,index) --通知下注 + local data = self:CopyLastStep(index) + data.cmd = cmd.data.cmd + data.seat = cmd.data.seat +end + +function M:CmdUserXiaZhu(cmd,index) --玩家下注 + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.data.seat + data.index = cmd.data.index +end + +function M:CmdAlertBuPai(cmd,index) --通知补牌 + local data = self:CopyLastStep(index) + data.cmd = cmd.data.cmd + data.seat = cmd.data.seat +end + +function M:CmdPlayerBuPai(cmd,index) --玩家补牌 + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.bupai = cmd.data.bupai + data.card = cmd.data.card +end + +function M:CmdPlayerSendCards(cmd,index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.data.seat + data.cards = cmd.data.cards +end + +function M:CmdResult(cmd,index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result = cmd.data.result + +end + + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_clone(last_step) + -- step.player_card_data = {} + -- local card_data = step.player_card_data + -- for i = 1, #last_step.player_card_data do + -- card_data[i] = {} + -- card_data[i].hand_list = membe_clone(last_step.player_card_data[i].hand_list) + -- --card_data[i].out_card_list = membe_clone(last_step.player_card_data[i].out_card_list) + -- end + step.Result = nil + self._step[#self._step + 1] = step + return step +end + +function M:ClearNextSeatOutCard(currenOutCardSeat) + local people_num = self._room.room_config.people_num + local next_seat = currenOutCardSeat + 1 + if next_seat > people_num then + next_seat = next_seat - people_num + end + local p = self._room:GetPlayerBySeat(next_seat) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:SetOutCardInfo(nil, false) +end + +function M:UpdateRound() + local round = self._room.curren_round + self._tex_round.text = string.format('第 %d 局', round) +end + +function M:NextRecordPlay() + self._totalRound = tonumber(self._totalRound) + local result = PlayBackView.NextRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + if self.result_view then + self.result_view:Dispose() + self.result_view = nil + end +end + +function M:LastRecordPlay() + local result = PlayBackView.LastRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + if self.result_view then + self.result_view:Dispose() + self.result_view = nil + end +end + +function M:Play() + self:ChangeAlpha() + self:ChangePlayState(not self._play) + if not self._play then + return + end + if (self._currentStep == #self.cmdList and self._playFoward) or (self._currentStep == 0 and not self._playFoward) then + self._currentStep = 0 + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:ChangePlayState(state) + self._play = state + self:ChangeTextSpeed() + local btn_play = self._view:GetChild('panel_record'):GetChild('btn_play') + if self._play then + btn_play:GetController('state').selectedIndex = 1 + else + btn_play:GetController('state').selectedIndex = 0 + end +end + +function M:ChangeTextSpeed() + local str1 = self._play and self._speed or '' + self._view:GetChild('panel_record'):GetChild('tex_speed').text = str1 + local str2 = + not self._play and (self._playFoward and '播放暂停' or '回退暂停') or + self._playFoward and (self._speed == 1 and '播放' or '快进') or + (self._speed == 1 and '回退' or '快退') + self._view:GetChild('panel_record'):GetChild('tex_2').text = str2 + local str3 = self._play and '倍速度' or '' + self._view:GetChild('panel_record'):GetChild('tex_1').text = str3 +end + +function M:CmdLeftArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if not self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = false + self:ChangeTextSpeed() + end +end + +function M:CmdRightArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:OnUpdate() + if self._play then + if (self._currentStep == #self.cmdList + 1 and self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像结尾了,再次点击播放按钮可重新播放') + return + elseif (self._currentStep == 0 and not self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像开头了,再次点击播放按钮可重新播放') + return + end + self._timer = self._timer + Time.deltaTime + if self._timer >= 1 / self._speed then + self._timer = 0 + local step = self._playFoward and 1 or -1 + self._currentStep = self._currentStep + step + if self._currentStep > 0 then + self:ShowStep(self._currentStep) + end + end + end +end + +function M:Destroy() + UpdateBeat:Remove(self.OnUpdate, self) + PlayBackView.Destroy(self) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/mushi/MuShi_PlayerPokerInfoView.lua b/lua_probject/extend_project/extend/poker/mushi/MuShi_PlayerPokerInfoView.lua new file mode 100644 index 00000000..186f81c3 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/mushi/MuShi_PlayerPokerInfoView.lua @@ -0,0 +1,305 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 16:35 +--- +local MuShi_CardType = import(".MuShi_CardType") +local MuShi_PlayerPokerInfoView = { + _view = nil, + _mainView = nil, + _mask_liangpai = nil, +} + +local M = MuShi_PlayerPokerInfoView + +function M.new( view,mainView ) + local self = {} + setmetatable(self, {__index = M}) + self._view = view + self._mainView = mainView + self:init() + return self +end + + + +function M:init() + local view = self._view + self._gameCtr = ControllerManager.GetController(GameController) + + self.item_data = json.decode(self._view:GetChild("area_mask").text) + self.out_card_data = self.item_data["outcard_list"] + self._mask_liangpai = view:GetChild("mask_liangpai") + self.ctr_outpoker = view:GetController("output") + self.outpoker_list = view:GetChild(self.out_card_data["parent"]) + + self.hand_card_list = view:GetChild("hand_card_list") + self.cards_view = self._view:GetChild('hand_poker_c') + self.ctr_one_card = view:GetController("one_card") + self.eff_one_card = view:GetChild("one_card_eff"):GetTransition("t0") + + self.text_bomb_score = view:GetChild("Score") + self.ani_bomb_score = view:GetTransition("score") + self.ani_result_score = view:GetTransition("score_1") + self.carType = self._view:GetChild("iconType") + self.carIcon = self.carType:GetChild("n0") + self.carType.visible = false + self.carText = self.carType:GetChild("n1") + self.carText.text = "" + self.tianGong = false + + self.cardopen = false +end + +function M:InitPoker(pokerList,cardtype,cardopen) + self.cardopen = cardopen + if cardtype == MuShi_CardType.TYPE_TIANGONG and cardopen then + self.carIcon.icon = "ui://Extend_Poker_MuShi/ms_tian_8" + self.carType.visible = false + self:OpenCard(pokerList) + self.tianGong = true + elseif cardtype == MuShi_CardType.TYPE_DOUBLE_TIANGONG and cardopen then + self.carIcon.icon = "ui://Extend_Poker_MuShi/ms_tian_9" + self.carType.visible = false + self:OpenCard(pokerList) + self.tianGong = true + else + self:OpenCard({0,0}) + self.tianGong = false + end +end + +function M:InitPoker2(pokerList) + self.cards_view:RemoveChildren(0, -1, true) + for i = 1, #pokerList do + local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) + local card_flower_code = pokerList[i] + local btn_card = self:CreatPoker(pokerList[i], 1, 0) + --btn_card.xy = self:GetHandCardPos(i) + self.cards_view:AddChild(btn_card) + end + self._view.visible = true +end + +function M:OpenCard(pokerList) + for i = 1, #pokerList do + local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) + local card_flower_code = pokerList[i] + local btn_card = self:CreatPoker(pokerList[i], 1, 0) + --btn_card.xy = self:GetHandCardPos(i) + self.cards_view:AddChild(btn_card) + btn_card.visible = false + end + self._view.visible = true +end + +function M:InitPoker1(pokerList) + self.cards_view:RemoveChildren(0,-1,true) + for i = 1, #pokerList do + local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) + local card_flower_code = pokerList[i] + local btn_card = self:CreatPoker(pokerList[i], 1, 0) + -- btn_card.xy = self:GetHandCardPos(i) + self.cards_view:AddChild(btn_card) + end + self._view.visible = true +end + +-- function M:InitPokerReconect(pokerList,cardtype,cardopen) +-- self.cardopen = cardopen +-- if cardtype == MuShi_CardType.TYPE_TIANGONG and cardopen then +-- self.carIcon.icon = "ui://Extend_Poker_MuShi/ms_tian_8" +-- self.carType.visible = false +-- self:OpenCard(pokerList) +-- self.tianGong = true +-- elseif cardtype == MuShi_CardType.TYPE_DOUBLE_TIANGONG and cardopen then +-- self.carIcon.icon = "ui://Extend_Poker_MuShi/ms_tian_9" +-- self.carType.visible = false +-- self:OpenCard(pokerList) +-- self.tianGong = true +-- else +-- self:OpenCard({0,0}) +-- self.tianGong = false +-- end +-- end + +function M:AddPoker(pokerList,back) + + if not self.tianGong and back==nil then + pokerList = 0 + end + local btn_card = self:CreatPoker(pokerList,1, 0) + self.cards_view:AddChild(btn_card) + -- btn_card.xy = self:GetHandCardPos(3) + +end + +function M:ShowCard(index) + self.cards_view:GetChildAt(index).visible = true + if self.cardopen == true then + self.carType.visible = true + end +end + +function M:SetCarType(card_type,point,bei) + if card_type == MuShi_CardType.TYPE_SHUANGGUI then + self.carIcon.icon = "ui://Extend_Poker_MuShi/ms_type_10" + elseif card_type == MuShi_CardType.TYPE_SANGUI then + self.carIcon.icon = "ui://Extend_Poker_MuShi/ms_type_20" + elseif card_type == MuShi_CardType.TYPE_TIANGONG then + self.carIcon.icon = "ui://Extend_Poker_MuShi/ms_tian_8" + elseif card_type == MuShi_CardType.TYPE_DOUBLE_TIANGONG then + self.carIcon.icon = "ui://Extend_Poker_MuShi/ms_tian_9" + elseif card_type == MuShi_CardType.TYPE_NORMAL then + self.carIcon.icon = "ui://Extend_Poker_MuShi/ms_point_"..point--"普通牌型" + elseif card_type == MuShi_CardType.TYPE_MUSHI then + self.carIcon.icon = "ui://Extend_Poker_MuShi/ms_point_0" + elseif card_type == MuShi_CardType.TYPE_TONGHUASHUN then + self.carIcon.icon = "ui://Extend_Poker_MuShi/ms_type_8" + elseif card_type == MuShi_CardType.TYPE_SANTIAO then + self.carIcon.icon = "ui://Extend_Poker_MuShi/ms_type_5" + elseif card_type == MuShi_CardType.TYPE_SHUNZI then + self.carIcon.icon = "ui://Extend_Poker_MuShi/ms_type_4" + elseif card_type == MuShi_CardType.None then + + end + + if bei~=nil and tonumber(bei) > 1 then + self.carText.text = bei.."倍" + else + self.carText.text = "" + end + if card_type ~= MuShi_CardType.None then + self.carType.visible = true + else + self.carType.visible = false + end + +end + +function M:ChangeOneCodeByFrom(card) + if(card > 500) then + return card + end + local flower = math.floor(card / 100) + local number = card % 100 + if number == 2 then + number = 15 + end + return number * 10 + flower +end + + +function M:GetHandCardPos(index) + local x, y = 0, -18 + local offset = 40 + x = offset*index + return Vector2.New(x, y) +end + +function M:SetOutCardBlack() + for i = 0, self.outpoker_list.numChildren - 1 do + self.outpoker_list:GetChildAt(i):GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(0.7,0.7,0.7) + end +end + +-- 12 -61 --11 58 --10 55 --46 +function M:GetOffSet(cardLength) -- 15 -70 + if cardLength > 8 then + return 40 + else + return - cardLength * 5 + 80 + end +end + + +function M:PlayScore(score,isBomb,isWin) + if score == nil then + self.text_bomb_score.alpha = 0 + return + end + if isBomb then + self.text_bomb_score.text = score >= 0 and "+"..score or tostring(score) + self.text_bomb_score.grayed = score < 0 + self.ani_bomb_score:Play() + else + if score < 0 then + self.text_bomb_score.text = tostring(score) + self.text_bomb_score.grayed = true + elseif score > 0 then + self.text_bomb_score.text = "+"..score + self.text_bomb_score.grayed = false + else + local str = isWin and "+" or "-" + self.text_bomb_score.text = str..score + self.text_bomb_score.grayed = not isWin + end + self.ani_result_score:Play() + end +end + +function M:UpdateHandPoker(cardList,isPlayAni,isMing) + self.cards_view:RemoveChildren(0,-1,true) + for i = 1, #cardList do + local card_number_code = self:ChangeOneCodeByFrom(cardList[i]) + local card_flower_code = cardList[i] + local btn_card = self:CreatPoker(cardList[i], 1, 0) + --btn_card.xy = self:GetHandCardPos(i) + self.cards_view:AddChild(btn_card) + end + self._view.visible = true +end + +function M:SetRemainCardNumber(isPlay) + if isPlay then + self.ctr_one_card.selectedIndex = 1 + self.eff_one_card:Play(-1,0,nil) + else + self.ctr_one_card.selectedIndex = 0 + end +end + +function M:CreatPoker(poker,scale,bank) + local card_code_obj + --printlog("cccccccccccccwwwwwwwwwwwwwwwwwwwwwwww ",ControllerManager.GetController(GameController)==nil) + if (DataManager.CurrenRoom.room_config.config.laizi == 1 and ControllerManager.GetController(GameController)~=nil and ControllerManager.GetController(GameController).guiCard ~=nil and ControllerManager.GetController(GameController).guiCard %100==poker%100) then + poker = 500+poker%100 + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_MuShi/"..poker) + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_MuShi/"..poker) + end + if card_code_obj == nil or bank==1 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_MuShi/00") + end + card_code_obj:SetScale(scale,scale) + return card_code_obj +end + +function M:ChangeCodeByTo( card ) + if(card > 500) then + return card + end + local flower = card % 10 + local number = math.floor(card / 10) + if number == 15 then + number = 2 + end + return flower * 100 + number +end + + +function M:Clear() + self:PlayScore(nil) + self:SetRemainCardNumber(false) + --self:SetOutCardInfo(nil,false) + self.hand_card_list:RemoveChildren(0,-1,true) + self._mask_liangpai:RemoveChildren(0,-1,true) + self.cards_view:RemoveChildren(0,-1,true) + self.carType.visible = false + self.carText.text = "" + self.tianGong = false +end + +function M:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/mushi/MuShi_PlayerSelfPokerInfoView.lua b/lua_probject/extend_project/extend/poker/mushi/MuShi_PlayerSelfPokerInfoView.lua new file mode 100644 index 00000000..90a6d5b4 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/mushi/MuShi_PlayerSelfPokerInfoView.lua @@ -0,0 +1,309 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 17:04 +--- +local MuShi_PlayerPokerInfoView = import('.MuShi_PlayerPokerInfoView') +local MuShi_CardType = import('.MuShi_CardType') + +local CardView = { + btn_card = nil, + -- 牌号码 (大小) + card_code_number = 0, + -- 牌号码 (花色) + card_code_flower = 0, + -- 索引 + index = 0 +} + +local function NewCardView(card, cardcodenum, cardcodeflower) + local self = {} + setmetatable(self, {__index = CardView}) + self.btn_card = card + self.card_code_number = cardcodenum + self.card_code_flower = cardcodeflower + self.card_isTouchable = 0 + return self +end + +local function tableSortNumber(a, b) + return a.card_code_number > b.card_code_number +end + +local MuShi_PlayerSelfPokerInfoView = { + _view = nil, + _mainView = nil, + _mask_liangpai = nil +} + +local M = MuShi_PlayerSelfPokerInfoView + +function M.new(view, mainView) + setmetatable(M, {__index = MuShi_PlayerPokerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._mainView = mainView + self.gameCtr = ControllerManager.GetController(GameController) + self:init() + return self +end + +function M:init() + self.Reset = false + self.ctr_outpoker = self._view:GetController('output') + self.outpoker_list = self._view:GetChild('out_card_list') + self.item_data = json.decode(self._view:GetChild('area_mask').text) + self.out_card_data = self.item_data['outcard_list'] + self.hand_card_list = self._view:GetChild('hand_card_list') + self.ctr_hand_card_pos = self._view:GetChild('hand_card_list') + self._mask_liangpai = self._view:GetChild('mask_liangpai') + self.card_width = 129 + self.cards_view = self._view:GetChild('hand_poker_c') + self.card_list = {} + self.out_card_list = {} + self.touchMoveFun = handler(self, self.TouchMoving) + self.ctr_put_card_option = self._view:GetController('out_card_option') + self.ctr_piao = self._view:GetController('piao') + self.ctr_piao_value = self._view:GetController('piao_value') + self.ctr_put_error = self._view:GetController('put_error') + self.put_error_text = self._view:GetChild('put_error') + + self.ctr_select_card_type = self._view:GetController('select_card_type') + self.select_card_type_view = self._view:GetChild('choose_type') + + self.text_bomb_score = self._view:GetChild('Score') + self.ani_bomb_score = self._view:GetTransition('score') + self.ani_result_score = self._view:GetTransition('score_1') + -- self.carType = self._view:GetChild("cardType") + -- self.carType.visible = false + + self.carType = self._view:GetChild("iconType") + self.carIcon = self.carType:GetChild("n0") + self.carType.visible = false + self.carText = self.carType:GetChild("n1") + self.carText.text = "" + -- self.carIcon.icon = "ui://Extend_Poker_MuShi/ms_type_10" + --card_niao.icon = "ui://Main_Majiang/202_" .. currentNiaoList[i].card + + self.btnBuPai = self._view:GetChild("bupai") + self.btnBu = self._view:GetChild("bubu") + self.btnKaiPai = self._view:GetChild("kaipai") + self.btnCuoPai = self._view:GetChild("cuopai") + self.ctr_bupai = self._view:GetController("bupai") + self.ctr_bupai.selectedIndex = 0 + self.ctr_zhuang = self._view:GetController("zhuang") + self.ctr_bei = self._view:GetController("bei") + self.ctr_zhuang.selectedIndex = 0 + self.ctr_bei.selectedIndex = 0 + self.send_card = {} + self.tips_click_count = 0 + + self.btnBank1 = self._view:GetChild("buzhuang") + self.btnBank2 = self._view:GetChild("zhuang1") + self.btnBank3 = self._view:GetChild("zhuang2") + self.btnBank4 = self._view:GetChild("zhuang3") + + self.btnBei1 = self._view:GetChild("bei1") + self.btnBei2 = self._view:GetChild("bei2") + self.btnBei3 = self._view:GetChild("bei3") + self.btnBei4 = self._view:GetChild("bei4") + self.btnBei5 = self._view:GetChild("bei5") + + self.endcard = self._view:GetChild("endcard") + self.cardopen = false + self:BtnEvent() +end + + + +function M:BtnEvent() + self.btnBuPai.onClick:Set(function() + --printlog("点击补牌=================================") + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendBuPai(1) + end) + + self.btnBu.onClick:Set(function() + --printlog("点击不补牌=================================") + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendBuPai(0) + end) + + self.btnKaiPai.onClick:Set(function() + --printlog("点击开牌=================================") + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendBuPai(2) + end) + + self.btnCuoPai.onClick:Set(function() + --printlog("点击搓牌=================================") + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendBuPai(3) + end) + + self.btnBank1.onClick:Set(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendQiangZhuang(0) + end) + + self.btnBank2.onClick:Set(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendQiangZhuang(1) + end) + + self.btnBank3.onClick:Set(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendQiangZhuang(2) + end) + + self.btnBank4.onClick:Set(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendQiangZhuang(3) + end) + + self.btnBei1.onClick:Set(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendBet(1) + end) + + self.btnBei2.onClick:Set(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendBet(2) + end) + + self.btnBei3.onClick:Set(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendBet(3) + end) + + self.btnBei4.onClick:Set(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendBet(4) + end) + + self.btnBei5.onClick:Set(function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendBet(5) + end) +end + +function M:StarQiangZhuang(b) + self.ctr_zhuang.selectedIndex = b +end + +function M:StarBet(b) + self.ctr_bei.selectedIndex = b +end + +function M:ChangeCtrBuPai(b) + self.ctr_bupai.selectedIndex = b +end + +function M:InitPoker(pokerList,cardtype,cardopen) + self.cardopen = cardopen + for i = 1, #pokerList do + local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) + local card_flower_code = pokerList[i] + local btn_card = self:CreatPoker(pokerList[i], 1, 0) + self.cards_view:AddChild(btn_card) + local card_view = NewCardView(btn_card, card_number_code, card_flower_code) + self.card_list[#self.card_list + 1] = card_view + self.card_list[i].btn_card.visible = false + end + --table.sort(self.card_list, tableSortNumber) + for i = 1, #self.card_list do + local card = self.card_list[i] + card.index = i + -- self.cards_view:SetChildIndex(card.btn_card, card.index - 1) + --card.btn_card.xy = self:GetHandCardPos(i, #self.card_list) + end + + if cardtype == MuShi_CardType.TYPE_TIANGONG or cardtype == MuShi_CardType.TYPE_DOUBLE_TIANGONG then + self:SetCarType(cardtype) + end + + self._view.visible = true +end + +function M:InitPoker2(pokerList) + self.cards_view:RemoveChildren(0, -1, true) + for i = 1, #pokerList do + local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) + local card_flower_code = pokerList[i] + local btn_card = self:CreatPoker(pokerList[i], 1, 0) + self.cards_view:AddChild(btn_card) + local card_view = NewCardView(btn_card, card_number_code, card_flower_code) + self.card_list[#self.card_list + 1] = card_view + end +end + + + +function M:AddPoker(poker) + --print("玩家自己加牌===========================================") + local card_number_code = self:ChangeOneCodeByFrom(poker) + local card_flower_code = poker + local btn_card = self:CreatPoker(poker, 1, 0) + self.cards_view:AddChild(btn_card) + local card_view = NewCardView(btn_card, card_number_code, card_flower_code) + self.card_list[#self.card_list + 1] = card_view + --card_view.btn_card.xy = self:GetHandCardPos(3, #self.card_list) +end + +function M:ShowCard(index) + self.cards_view:GetChildAt(index).visible = true + if self.cardopen == true then + self.carType.visible = true + end +end + +function M:GetHandCardPos(index, card_count) + local x, y = 0, -18 + local offset = 40 + + x = offset*index + return Vector2.New(x, y) +end + +function M:ChangeOneCodeByFrom(card) + if(card > 500) then + return card + end + local flower = math.floor(card / 100) + local number = card % 100 + if number == 2 then + number = 15 + end + return number * 10 + flower +end + +function M:ErrorTip(error_text) + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + self.cor_init_poker = nil + self.cor_init_poker = + coroutine.start( + function() + self.put_error_text.text = error_text + self.ctr_put_error.selectedIndex = 1 + coroutine.wait(2) + self.ctr_put_error.selectedIndex = 0 + end + ) +end + +function M:Clear() + self:PlayScore(nil) + --self:SetOutCardInfo(nil, false) + self.card_list = {} + self.out_card_list = {} + self.cards_view:RemoveChildren(0, -1, true) + self.carType.visible = false + --self.mask_liangpai:RemoveChildren(0,-1,true) +end + +function M:Destroy() + Stage.inst.onTouchMove:Remove(self.touchMoveFun) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/mushi/MuShi_Protocol.lua b/lua_probject/extend_project/extend/poker/mushi/MuShi_Protocol.lua new file mode 100644 index 00000000..23c46ddf --- /dev/null +++ b/lua_probject/extend_project/extend/poker/mushi/MuShi_Protocol.lua @@ -0,0 +1,64 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:51 +--- +local MuShi_Protocol = { + MuShi_ConfirmToNextGame = "1003", + + MuShi_Send_Card = "1013", + + MuShi_Send_Guo = "1014", + + MuShi_Send_Piao = "1015", --- 补牌上报 + + MuShi_Ming_Card = "2117", + + MuShi_Init_Card = "2011", + + MuShi_Options = "2004", + + MuShi_Index_Move = "2016", + + MuShi_Play_Succ = "2021", + + MuShi_Pass_Succ = "2030", + + MuShi_Put_Error = "2111", + + MuShi_Bomb_Score = "2118", + + MuShi_Result = "2007", + MuShi_Piao_Tip = "2041", ----/提示补牌 + MuShi_Piao_Action = "2042", ---补牌广播 + + MuShi_Gui = "2043", --------鬼牌 + + MuShi_ConfirmToNextGameSucc = "2010", + PT_GAMETUOGUAN = "2029",--托管 + SEND_TUOGUAN = "1018",--托管 + + GAME_EVT_USER_START_GAME_REQ = "2051", ---用户请求提前开始游戏 + + GAME_EVT_USER_START_GAME_RSP = "2052", --用户请求提前开始游戏广播 + + GAME_EVT_USER_AGREE_START_GAME_REQ = "2053", --用户同意/拒绝提前开始游戏 + + GAME_EVT_START_QIANGZHUANG = "2055", --开始抢庄 + + GAME_EVT_QIANGZHUANG_REQ = "2056", --玩家抢庄请求 "index"(-1:不抢 其它:抢庄序号) + + GAME_EVT_QIANGZHUANG_RSP = "2057", --抢庄广播, 其它玩家抢庄信息 "seat" "index" + + GAME_EVT_ZHUANGJIA_INFO = "2058", --确定庄家信息 "seat" "index" "score" (庄家座位/序号/分数) + + GAME_EVT_START_XIAZHU = "2061", --开始下注 + + GAME_EVT_XIAZHU_REQ = "2062", --玩家下注请求 "index" (下注序号) + + GAME_EVT_XIAZHU_RSP = "2063", --玩家下注广播, 其它玩家下注信息 "seat" "index" "mul" (座位/序号/倍数) + GAME_EVT_CUOPAI_REQ = "2064", --//搓牌完成请求 + + GAME_EVT_CUOPAI_FINISH_RSP = "2065", --//搓牌完成回复 +} + +return MuShi_Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/mushi/MuShi_ResultView.lua b/lua_probject/extend_project/extend/poker/mushi/MuShi_ResultView.lua new file mode 100644 index 00000000..ad4adc61 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/mushi/MuShi_ResultView.lua @@ -0,0 +1,255 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 11:05 +--- +require("Game.View.ResultView") + +local MuShi_ResultView = {} + +local M = MuShi_ResultView + +function MuShi_ResultView.new(blur_view, data, roomid, over, win_seat, dissolve, remaincards) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + + self.class = "MuShi_ResultView" + self._currenIndex = 0 + self._close_zone = false + --self._blur_view = blur_view + self._gamectr = ControllerManager.GetController(GameController) + + self:init("ui://Extend_Poker_MuShi/clearing", data, roomid, over, win_seat, dissolve, remaincards) + return self +end + +function M:init(url, data, roomid, over, win_seat, dissolve, remaincards) + + ResultView.init(self, url) + + --self:InitData(data,roomid) + --self:InitData(data,roomid) + if dissolve == 1 then + -- body + self:InitData(data, win_seat, roomid) + else + self:InitData_One(data, win_seat, over, roomid, remaincards) + end + +end + + +-- 小结算 +function M:InitData_One(data, winseat, over, roomid, remaincards) + --printlog("结算++++++++++++++++++++++ ",winseat," ",over," ",roomid) + --pt(data) + -- printlog(debug.traceback()) + -- local room = DataManager.CurrenRoom + -- self._view:GetController("sdk").selectedIndex = 1 + -- local _gamectr = ControllerManager.GetController(GameController) + -- local list_view = self._view:GetChild("player_list_1") + -- list_view:RemoveChildrenToPool() + + -- for i = 1, #data do + -- local player = data[i] + -- local item = list_view:AddItemFromPool("ui://Extend_Poker_MuShi/clearing_item_1") + + -- local boom = item:GetChild("boom") + -- boom.text = player.thisboomnum + + -- local piao = item:GetChild("piao") + -- if player.piao <= 0 then + -- piao.text = "0" + -- else + -- piao.text = "" .. player.piao + -- end + + -- local nichen = item:GetChild("nichen") + + -- if player.nick ~= nil then + -- body + -- nichen.text = tostring(player.nick) + -- else + + -- nichen.text = tostring(player.self_user.nick_name) + -- end + + + -- local shengpai = item:GetChild("shengpai") + -- if player.cards ~= nil then + -- body + -- shengpai.text = tostring(#player.cards) + -- else + -- shengpai.text = tostring(#player.hand_list) + -- end + + -- local rt = 1 + -- if room.hpOnOff == 1 then + -- rt = room.score_times + -- end + + -- local hp_nonnegative = room:checkHpNonnegative() + -- local roundScore = player.winscore + -- if hp_nonnegative then + + -- local jifen = "" + -- if roundScore > 0 then + -- jifen = "+" .. roundScore + -- else + -- jifen = "" .. roundScore + -- end + + -- local tili = "" + -- local limit = "" + -- if player.hp_info.round_actual_hp > 0 then + -- tili = "(+" .. d2ad(player.hp_info.round_actual_hp) .. ")" + -- if player.hp_info.upper_limit then + -- limit = "达到上限" + -- end + -- else + -- tili = "(" .. d2ad(player.hp_info.round_actual_hp) .. ")" + -- if player.hp_info.upper_limit then + -- limit = "达到下限" + -- end + -- end + + -- item:GetChild("score").text = jifen .. tili .. limit + -- else + + -- local jifen = "" + -- if roundScore >= 0 then + -- jifen = "+" .. roundScore + -- else + -- jifen = "" .. roundScore + -- end + -- jifen = jifen .. " " + + -- local tili = "" + -- if room.hpOnOff > 0 then + + -- local need = roundScore * rt + -- tili = "(" + -- if roundScore > 0 then + -- tili = tili .. "+" .. tostring(need) + -- else + -- tili = tili .. tostring(need) + -- end + + -- tili = tili .. ")" + -- end + + + -- item:GetChild("score").text = jifen .. tili + -- end + + -- if roundScore >= 0 then + + -- if room.self_player.seat == player.seat then + -- body + -- self._view:GetController("result").selectedIndex = 1 + -- end + -- else + + -- if room.self_player.seat == player.seat then + -- self._view:GetController("result").selectedIndex = 0 + -- end + -- end + + -- end + + + if over == 0 then + -- body + local btn_confirm = self._view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + self:Destroy() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:ConformToNextGame() + + end) + else + local btn_confirm = self._view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + --self:Destroy() + self:InitData(data, winseat, roomid) + -- ViewManager.ChangeView(ViewManager.View_Lobby) + end) + + end +end + +-- 大结算 +function M:InitData(data, winseat, roomid) + + --printlog("大结算=============================") + --pt(data) + self._view:GetController("sdk").selectedIndex = 0 + + local room = DataManager.CurrenRoom + + local rt = 1 + if room.hpOnOff == 1 and room.score_times ~= 1 then + rt = room.score_times + end + + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + + local user = room:GetPlayerBySeat(data[i].seat).self_user + + player_list[i].id = user.account_id + + player_list[i].score = data[i].score + player_list[i].hp_info = data[i].hp_info + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].seat = data[i].seat + player_list[i].head_url = data[i].self_user.head_url + + if data[i].entrust ~= nil then + player_list[i].entrust = data[i].entrust > 0 + else + player_list[i].entrust = false + end + + -- player_list[i].param = {} + + -- player_list[i].param[1] = {} + -- player_list[i].param[1].key = "赢局数:" + -- player_list[i].param[1].value = tostring(data[i].settle_log.winnum) + + -- player_list[i].param[2] = {} + -- player_list[i].param[2].key = "打出炸弹数:" + -- player_list[i].param[2].value = tostring(data[i].settle_log.boomnum) + + -- player_list[i].param[3] = {} + -- player_list[i].param[3].key = "春天次数:" + -- player_list[i].param[3].value = tostring(data[i].settle_log.springnum) + + -- player_list[i].param[4] = {} + -- player_list[i].param[4].key = "当局最高分:" + -- player_list[i].param[4].value = tostring(data[i].settle_log.maxscore * rt) + + -- if data[i].daniao > 0 then + -- player_list[i].flag = {"打鸟"} + -- end + end + + self:GenerateRoomResultInfo(room.room_config.Times, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + self:InitBigResult(room) + local big_result = self._view:GetChild("big_result") + local lst_p = big_result:GetChild("player_list") + -- local list_param = com_p:GetChild("list_param") + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + end + +end + +return M diff --git a/lua_probject/extend_project/extend/poker/mushi/MuShi_RightPanelView.lua b/lua_probject/extend_project/extend/poker/mushi/MuShi_RightPanelView.lua new file mode 100644 index 00000000..f1981db7 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/mushi/MuShi_RightPanelView.lua @@ -0,0 +1,67 @@ +local MainRightPanelView = require("Game.View.MainRightPanelView") +local MuShi_RightPanelView = {} +local MuShi_SettingView = import('extend.poker.mushi.MuShi_SettingView') +local M = MuShi_RightPanelView +local function __init(self,mainView,view) + local right_panel = view + + local btn_setting = right_panel:GetChild("btn_setting") + btn_setting.onClick:Set(function() + local _settingView = MuShi_SettingView.new(self._blur_view) + _settingView:Show() + end) + + self._tex_data = right_panel:GetChild("tex_data") + self._tex_time = right_panel:GetChild("tex_time") + self._pb_batteryLevel = right_panel:GetChild("pb_batteryLevel") + self._xinhao = right_panel:GetController("xinhao") + self.ctr_xh = right_panel:GetChild("gcm_xinhao"):GetController("c1") + self.ctr_wifi = right_panel:GetChild("gcm_wifi"):GetController("c1") + self._tex_ping = right_panel:GetChild("gcm_xinhao"):GetChild("n7") + + self.ctr_log = right_panel:GetController("log") + local btn_log = right_panel:GetChild("btn_log") + btn_log.onClick:Set(function() + if self.onLogCallback then + self.onLogCallback() + end + end) + + self._total_time = 0 + self:__UpdateTime() + + -- self._timer = Timer.New(handler(self,self.__UpdateTime),10,-1,true) + -- self._timer:Start() +end +function MuShi_RightPanelView.new(mainView,view) + setmetatable(M, {__index = MainRightPanelView}) + local self = setmetatable({}, {__index = M}) + self.class = "MuShi_RightPanelView" + __init(self,mainView,view) + return self +end +function M:__UpdateTime() + self._tex_data.text = os.date("%Y-%m-%d") + self._tex_time.text = os.date("%H:%M") + if Application.platform == RuntimePlatform.IPhonePlayer or Application.platform == RuntimePlatform.Android then + self._pb_batteryLevel.value = GameApplication.Instance:GetBatteryLevel() + end + + local NetworkReachability = UnityEngine.NetworkReachability + local _client = ControllerManager.GameNetClinet + if not _client then return end + local ping = _client:getAveragePingTime() + if not ping then return end + ping = math.floor(ping / 2) + if ping > 300 then ping =300 end + if ping <= 100 then + self.ctr_xh.selectedIndex = 0 + elseif ping <= 300 then + self.ctr_xh.selectedIndex = 1 + else + self.ctr_xh.selectedIndex = 2 + end + self._tex_ping.text = ping .. "ms" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/mushi/MuShi_Room.lua b/lua_probject/extend_project/extend/poker/mushi/MuShi_Room.lua new file mode 100644 index 00000000..634fb706 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/mushi/MuShi_Room.lua @@ -0,0 +1,26 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 14:36 +--- +local MuShi_Player = import(".MuShi_Player") + +local MuShi_Room = { +} + +local M = MuShi_Room + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Room}) + local self = setmetatable({}, {__index = M}) + self:init() + return self +end + + + +function M:NewPlayer() + return MuShi_Player.new() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/mushi/MuShi_RoomConfig.lua b/lua_probject/extend_project/extend/poker/mushi/MuShi_RoomConfig.lua new file mode 100644 index 00000000..96e8b7f9 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/mushi/MuShi_RoomConfig.lua @@ -0,0 +1,444 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 10:54 +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.class = "MuShi_RoomConfig" + self.config=config + self.Leaf = config.leaf + self.Rule = config.rule + self.Times = config.times + self.WillBeOut = config.willBeOut + self.Heart10 = config.heartten + self.BombSpring = config.minboom + self.AA = config.aa + self.PlayerNum = config.maxPlayers + self.showlength = config.showlength + self.fourBeltThree=config.fourBeltThree + self.demolition=config.demolition + self.fangzuobi=config.fangzuobi + self.planelack=config.planelack + self.threelack=config.threelack + self.threeA=config.threeA + self.tuoguan_active_time=config.tuoguan_active_time + self.tuoguan=config.tuoguan + self.tuoguan_result_type=config.tuoguan_result_type + self.isNonnegative=config.isNonnegative + self.sandaidan = config.sandaidan + self.isHidden = config.isHidden + self.ba = config.ba + self.fs = config.fs + + self.area = config.area + self.playType = config.playType + self.mushiMul = config.mushiMul + self.laizi = config.laizi + self.tiangong = config.tiangong + self.opt = config.opt + + + if config.piao ~= nil then + self.piao = config.piao + else + self.piao = 0 + end + + if config.daniao ~= nil then + self.daniao = config.daniao + else + self.daniao = 0 + end + + if self.isNonnegative == nil then + self.isNonnegative = 0 + end + self.energyTab=config.energyTab + + if self.energyTab==nil then + self.energyTab=0 + end + + return self +end + +function M:GetDes(sp) + sp = sp or " " + local str = "" + -- str = str.. self.Times.."局"..sp + str = str .. RoomConfig.GetDes(self, sp).." " + local count=1 + if self.playType == 0 then + str = str.. "潮州" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str.. "汕头" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.mushiMul == 0 then + str = str.."抢庄" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.mushiMul ==1 then + str = str.."木虱鱼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.mushiMul ==2 then + str = str.."房主坐庄" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.mushiMul ==3 then + str = str.."轮庄" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + -- if (self.opt == 1) then + -- str = str.."10局" + -- count=count+1 + -- if count%2==0 then + -- str = str .."\n" + -- else + -- sp1="" + -- local strL=4 + -- for i=1,strL do + -- sp1=sp1.." " + -- end + -- str = str .. sp1..sp + -- end + -- elseif (self.opt == 2) then + -- str = str.."15局" + -- count=count+1 + -- if count%2==0 then + -- str = str .."\n" + -- else + -- sp1="" + -- local strL=4 + -- for i=1,strL do + -- sp1=sp1.." " + -- end + -- str = str .. sp1..sp + -- end + -- else + -- str = str.."20局" + -- count=count+1 + -- if count%2==0 then + -- str = str .."\n" + -- else + -- sp1="" + -- local strL=4 + -- for i=1,strL do + -- sp1=sp1.." " + -- end + -- str = str .. sp1..sp + -- end + -- end + + if self.playType == 0 then + str = str.. "潮汕玩法" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str.. "汕头玩法" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.mushiMul == 0 then + str = str.."抢庄" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.mushiMul ==1 then + str = str.."木虱鱼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.mushiMul ==2 then + str = str.."房主坐庄" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.mushiMul ==3 then + str = str.."轮庄" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.laizi == 0 then + str = str.."大小王鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.laizi ==1 then + str = str.."翻鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str.."无鬼" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.tiangong == 0 then + str = str.."翻倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str.."不翻倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + str = str.."\n" + + + + return str +end + +function M:GetDes2(sp) + sp = sp or " " + local str = "房间规则:" + -- str = str.. self.Times.."局"..sp + str = str .. RoomConfig.GetDes(self, sp) + + if self.playType == 0 then + str = str.. "潮汕" + else + str = str.. "汕头" + end + + if self.mushiMul == 0 then + str = str.."抢庄"..sp + elseif self.mushiMul ==1 then + str = str.."木虱鱼"..sp + elseif self.mushiMul ==2 then + str = str.."房主坐庄"..sp + elseif self.mushiMul ==3 then + str = str.."轮庄"..sp + end + + if (self.opt == 1) then + str = str.."10局"..sp + elseif (self.opt == 2) then + str = str.."15局"..sp + else + str = str.."20局"..sp + end + + if self.playType == 0 then + str = str.. "潮汕玩法"..sp + else + str = str.. "汕头玩法"..sp + end + + if self.mushiMul == 0 then + str = str.."抢庄"..sp + elseif self.mushiMul ==1 then + str = str.."木虱鱼"..sp + elseif self.mushiMul ==2 then + str = str.."房主坐庄"..sp + elseif self.mushiMul ==3 then + str = str.."轮庄"..sp + end + + if self.laizi == 0 then + str = str.."2鬼(大小鬼)"..sp + elseif self.laizi ==1 then + str = str.."翻鬼"..sp + else + str = str.."无鬼"..sp + end + + if self.tiangong == 0 then + str = str.."翻倍"..sp + else + str = str.."不翻倍"..sp + end + + str = str.."\n" + + + + return str +end + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_Poker_MuShi/gamerule") + return gamerulepanel +end + + +function M:GetGameSMSize() + return 467,500 +end + + +function M:GetGameName() + return "木虱" +end + +--function M:GetIsShowCardNumber() +-- return self.ShowNumber == 1 +--end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/mushi/MuShi_SettingView.lua b/lua_probject/extend_project/extend/poker/mushi/MuShi_SettingView.lua new file mode 100644 index 00000000..5d10f4db --- /dev/null +++ b/lua_probject/extend_project/extend/poker/mushi/MuShi_SettingView.lua @@ -0,0 +1,56 @@ +--设置窗口对象 +--author:-- + + +local MuShi_SettingView = {} + +local M = MuShi_SettingView +setmetatable(M, {__index = BaseWindow}) + +function MuShi_SettingView.new(blur_view) + local self = setmetatable({}, {__index = M}) + self.class = 'MuShi_SettingView' + self._blur_view = blur_view + self:init('ui://Extend_Poker_MuShi/MSSettingWindow') + return self +end + +function M:init(url) + BaseWindow.init(self, url) + printlog("aaaaaaaaaaaaattttttttttttttttttttttttttttt") + local view = self._view + local slider_sound = view:GetChild('slider_sound') + local slider_music = view:GetChild('slider_music') + -- local btn_music = view:GetChild('btn_music') + -- local btn_sound = view:GetChild('btn_sound') + + -- btn_music.selected = (GameApplication.Instance.MusicValue < 5 and false or true) + slider_sound.value = GameApplication.Instance.SoundValue + slider_music.value = GameApplication.Instance.MusicValue + -- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true + + slider_music.onChanged:Add( + function() + GameApplication.Instance.MusicValue = slider_music.value + -- btn_music.selected = GameApplication.Instance.MusicValue < 5 and false or true + end + ) + + slider_sound.onChanged:Add( + function() + GameApplication.Instance.SoundValue = slider_sound.value + -- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true + end + ) + + + +end + + + +function M:Destroy() + BaseWindow.Destroy(self) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua b/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua new file mode 100644 index 00000000..7e133f25 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/EXGameInfo.lua @@ -0,0 +1,326 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 15:19 +--- +local EXGameInfo = {} + +local M = EXGameInfo + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/poker/runfast/ui/Info_Poker_RunFastNew") + return self +end + +function M:FillData(view, index) + self._maxPlayer = 2 -- 默认玩家人数 + self._roundChoice = 5 -- 回合选项数 + + if oldGameVersion==1 then + self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_RunFastNew/Creat_RunFast") + else + self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_RunFastNew/Creat_RunFast_yueyang") + end + + + if oldGameVersion==2 then + self._config:GetController("xipai").selectedIndex=0 + + self.xipaiValueText=self._config:GetChild('xipaifen') + self.xipaiValueText.text = 1 + self.xipaiValue=1 + + self.anchouValueText=self._config:GetChild('anchoufen') + self.anchouValueText.text=1 + self.anchouValue=1 + + local btn_cr = self._config:GetChild('sdsrbtn') + btn_cr.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.xipaiValueText.text=value/1000 + self.xipaiValue=value/1000 + + end, 0, nil) + gniv:Show() + + + end + ) + + + local btn_cr2 = self._config:GetChild('anchoubtn') + btn_cr2.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.anchouValueText.text=value/1000 + self.anchouValue=value/1000 + + end, 3, nil) + gniv:Show() + + + end + ) + + + end + + + + self._config:GetChild("people_2").onClick:Set(function() + self._config:GetController("rule").selectedIndex = 0 + end) + + local piao = self._config:GetController("piao") + local daniao = self._config:GetController("daniao") + + piao.onChanged:Add(function() + if piao.selectedIndex ~= 0 then + daniao.selectedIndex = 0 + end + end) + + daniao.onChanged:Add(function() + if daniao.selectedIndex ~= 0 then + piao.selectedIndex = 0 + end + end) + +end + +local _help_url = "ui://Info_Poker_RunFastNew/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_Poker_RunFastNew/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_Poker_RunFastNew/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list = {"15张玩法","16张玩法"} +function M:GetPlayList() + return _play_list +end + +function M:LoadConfigData(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt - 1 + _config:GetController("rule").selectedIndex = data.rule == 2 and 0 or 1 + _config:GetController("play_list").selectedIndex = data.leaf - 1 + _config:GetController("willBeOut").selectedIndex = data.willBeOut - 1 + _config:GetController("heart10").selectedIndex = data.heartten - 1 + _config:GetController("bombSpring").selectedIndex = data.minboom - 1 + _config:GetController("player_num").selectedIndex = data.maxPlayers == 2 and 0 or 1 + _config:GetController("Cost").selectedIndex = data.AA == 0 and 0 or 1 + _config:GetController("showlength").selectedIndex = data.showlength + _config:GetController("fourBeltThree").selectedIndex = data.fourBeltThree + _config:GetController("demolition").selectedIndex = data.demolition + _config:GetController("fangzuobi").selectedIndex = data.fangzuobi + + local sandaidan = data.sandaidan + if sandaidan ~= nil and sandaidan == 1 then + _config:GetChild("sandaidan").selected = true + + _config:GetChild("planelack").selected = false + _config:GetChild("Threelack").selected = false + + else + _config:GetChild("sandaidan").selected = false + + _config:GetChild("planelack").selected = data.planelack == 1 and true or false + _config:GetChild("Threelack").selected = data.threelack == 1 and true or false + end + + local fs = data.fs + if fs ~= nil and fs == 1 then + _config:GetChild("fan_sprint").selected = true + else + _config:GetChild("fan_sprint").selected = false + end + + local ba = data.ba + if ba ~= nil and ba == 1 then + _config:GetChild("boom_add").selected = true + else + _config:GetChild("boom_add").selected = false + end + + _config:GetChild("ThreeA").selected = data.threeA == 1 and true or false + + if data.piao ~= nil then + _config:GetController("piao").selectedIndex = data.piao + end + + if data.daniao ~= nil then + _config:GetController("daniao").selectedIndex = data.daniao + end + + if _config:GetChild("fourBeltThree") then + _config:GetChild("fourBeltThree").selected=data.fourDaiTwo + end + + if _config:GetChild("fourBeltTwo") then + _config:GetChild("fourBeltTwo").selected=data.fourDaiThree + end + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected=data.xi_pai + end + + + if oldGameVersion==2 then + self.xipaiValueText.text=data.xi_pai_score/1000 + self.xipaiValue=data.xi_pai_score/1000 + + self.anchouValueText.text=data.an_chou_score/1000 + self.anchouValue=data.an_chou_score/1000 + + end + +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + local rule = _config:GetController("rule").selectedIndex + local leaf = _config:GetController("play_list").selectedIndex + local willBeOut = _config:GetController("willBeOut").selectedIndex + local bombSpring = _config:GetController("bombSpring").selectedIndex + local heart10 = _config:GetController("heart10").selectedIndex + local player_num = _config:GetController("player_num").selectedIndex + local AA = _config:GetController("Cost").selectedIndex + local showlength = _config:GetController("showlength").selectedIndex + local fourBeltThree = _config:GetController("fourBeltThree").selectedIndex + local demolition = _config:GetController("demolition").selectedIndex + local fangzuobi = _config:GetController("fangzuobi").selectedIndex + local planelack = _config:GetChild("planelack").selected and 1 or 0 + local threelack = _config:GetChild("Threelack").selected and 1 or 0 + local ThreeA = _config:GetChild("ThreeA").selected and 1 or 0 + local piao = _config:GetController("piao").selectedIndex + local daniao = _config:GetController("daniao").selectedIndex + local sandaidan = _config:GetController("sandaidan").selectedIndex + local ba = _config:GetChild("boom_add").selected and 1 or 0 + local fs = _config:GetChild("fan_sprint").selected and 1 or 0 + + ----- + local fourDaiTwo=false + if _config:GetChild("fourBeltThree") then + fourDaiTwo = _config:GetChild("fourBeltThree").selected + end + + local fourDaiThree=false + if _config:GetChild("fourBeltTwo") then + fourDaiThree = _config:GetChild("fourBeltTwo").selected + end + + local xi_pai=false + if _config:GetChild("xipai") then + xi_pai = _config:GetChild("xipai").selected + end + + ---- + local _data = {} + _data["account_id"] = DataManager.SelfUser.Id + _data["opt"] = round + 1 + _data["rule"] = rule == 0 and 2 or 1 + _data["leaf"] = leaf + 1 + _data["AA"] = AA + _data["willBeOut"] = willBeOut + 1 + _data["showlength"] = showlength + _data["heartten"] = willBeOut == 0 and heart10 + 1 or 2 + _data["minboom"] = (willBeOut == 0 and leaf == 1 and player_num == 1) and bombSpring + 1 or 2 + _data["maxPlayers"] = player_num + 2 + _data["fourBeltThree"] = fourBeltThree + _data["demolition"] = demolition + _data["fangzuobi"] = fangzuobi + _data["threeA"] = ThreeA + _data["piao"] = piao + _data["daniao"] = daniao + _data["sandaidan"] = sandaidan + _data["ba"] = ba + _data["fs"] = fs + + _data["fourDaiTwo"] = fourDaiTwo + _data["fourDaiThree"] = fourDaiThree + + + if willBeOut == 1 then + -- body + _data["planelack"] = 0 + _data["threelack"] = 0 + else + + if sandaidan == 1 then + _data["planelack"] = 0 + _data["threelack"] = 0 + else + _data["planelack"] = planelack + _data["threelack"] = threelack + end + end + + _data['xi_pai'] = xi_pai + + local xi_pai_score=0 + local an_chou_score=0 + + if oldGameVersion==2 then + xi_pai_score=self.xipaiValue + an_chou_score=self.anchouValue + end + + _data['xi_pai_score'] = xi_pai_score*1000 + _data['an_chou_score'] = an_chou_score*1000 + + return _data +end + +function M:OnChangeOption(ctype, pay_obj) + IGameInfo.OnChangeOption(self, ctype, pay_obj) + local people = self._config:GetController("player_num") + people.onChanged:Set(function() + self._maxPlayer = people.selectedIndex + 2 + self:ShowVariablePrice(ctype, pay_obj) + end) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/runfast/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/poker/runfast/EXPlayerInfoView.lua new file mode 100644 index 00000000..8289df0f --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/EXPlayerInfoView.lua @@ -0,0 +1,52 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + + +function M:FillData(player) + + + PlayerInfoView.FillData(self, player) + if player.cur_hp ~= nil then + self:UpdateScore(d2ad(player.cur_hp)) + else + local rt = 1 + if self._main_view._room.hpOnOff == 1 then + rt = self._main_view._room.score_times + end + self:UpdateScore(player.total_score * rt) + end + + +end + +function M:UpdatePiao(piao) + + if piao == nil or piao == -1 then + self._view:GetChild("piao").text = "" + elseif piao == 0 then + self._view:GetChild("piao").text = "不飘" + elseif piao == 1 then + self._view:GetChild("piao").text = "飘1分" + elseif piao == 2 then + self._view:GetChild("piao").text = "飘2分" + elseif piao == 3 then + self._view:GetChild("piao").text = "飘3分" + elseif piao == 5 then + self._view:GetChild("piao").text = "飘5分" + elseif piao == 8 then + self._view:GetChild("piao").text = "飘8分" + end +end + + +return M diff --git a/lua_probject/extend_project/extend/poker/runfast/ExtendConfig.lua b/lua_probject/extend_project/extend/poker/runfast/ExtendConfig.lua new file mode 100644 index 00000000..2bf347d3 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/ExtendConfig.lua @@ -0,0 +1,264 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:57 +--- + +local EXTEND_MODEL_NAME = ... +local EXGameInfo = import(".EXGameInfo") +local RunFast_MainView = import(".RunFast_MainView") +local RunFast_GameController = import(".RunFast_GameController") +local RunFast_RoomConfig = import(".RunFast_RoomConfig") +local RunFast_Player = import(".RunFast_Player") +local RunFast_Room = import(".RunFast_Room") +local RunFast_PlayerBackView = import(".RunFast_PlayerBackView") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = "ExtendConfig" + self.extend_id = 14 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = RunFast_MainView + self._viewMap[ViewManager.View_PlayBack] = RunFast_PlayerBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/poker/runfast/ui/Info_Poker_RunFastNew") + self:UnAssets() +end + +function M:UnAssets() + UIPackage.RemovePackage("extend/poker/runfast/ui/Extend_Poker_RunFastNew") + ResourcesManager.UnLoadGroup("RunFase_PK") +end + +local _gameInfo = nil +function M:GetGameInfo() +if not _gameInfo then + _gameInfo = EXGameInfo.new() +end +return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = RunFast_GameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return RunFast_Room.new() +end + +function M:GetGameRule() + return RunFast_RuleView.new() +end + +function M:GetIconUrl() + return "ui://Extend_Poker_RunFastNew/icon" + -- +end + +function M:FillRoomConfig(room,_config) + room.room_config = RunFast_RoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + if _ctr_game == nil then + self:GetGameController() + end + + local reload = s2croom["reload"] + + local _tableInfo = s2croom["tableInfo"] + + room.xipaiScore=_tableInfo["xipai_score"] + + local _config = _tableInfo["config"] + room.room_config = RunFast_RoomConfig.new(_config) + + room.curren_round = _tableInfo["round"] + if room.curren_round == 0 and reload then + room.curren_round = 1 + end + + local playerList = _tableInfo["playerData"] + for i = 1,#playerList do + local _jp = playerList[i] + + local p = RunFast_Player.new() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + if (DataManager.SelfUser.account_id == pid) then + room.self_player = p + p.self_user = DataManager.SelfUser + else + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + end + p.self_user.location = Location.new(_jp["pos"] or "") + p.self_user.host_ip = _jp["ip"] + p.total_score = _jp["score"] or 0 + if _jp.hp_info then + p.cur_hp = _jp.hp_info.cur_hp + end + p.hp_info = _jp["hp_info"] + + if _jp["entrust"] then + p.entrust = _jp.entrust + end + room:AddPlayer(p) + end + + + + local owner = s2croom["owner"] + room.owner_id = owner + room.game_status = 0 + if reload then + + local reloadInfo = s2croom["reloadInfo"] + + + + local playing = reloadInfo["playing"] + + room.curren_turn_seat = reloadInfo["active_seat"] + local info_list = reloadInfo["info_list"] + if playing == true then + + + room.CurnrenState = StateType.Palying + room.game_status=1 + + + for i = 1, #info_list do + local p = room:GetPlayerById(info_list[i]["playerid"]) + + if p == room.self_player then + p.hand_list = reloadInfo["hand_card"] + p.open= reloadInfo["open"] + end + + p.hand_count = info_list[i]["card_size"] + p.piao = info_list[i]["piao"] + p.handCards = info_list[i]["handCards"] + p.outCards = info_list[i]["outCards"] + local last_outcard = info_list[i]["last_outcard"] + if last_outcard ~= nil and last_outcard[1] ~= 0 then + local out_card_list = _ctr_game:ChangeCodeByFrom(last_outcard.card_list,true) + local card_type,number,length,plan_three_count = _ctr_game:GetCardListInfo(out_card_list) + p.out_card_list = _ctr_game:GetSortOutCardList(out_card_list,card_type,number,plan_three_count) + else + p.out_card_list = {0} + end + end + else + -- print("aaaaaaaaaaaaaaaa1111111111111111111111111") + --pt(s2croom) + room.game_status=1 + + room.CurnrenState = StateType.PalyingWait + + room.winseat = reloadInfo["winseat"] + room.remaincards = reloadInfo["remaincards"] + + for i = 1, #info_list do + local playerData = info_list[i] + local p = room:GetPlayerById(playerData["playerid"]) + + p.ready = playerData["certainseat"] == 1 and true or false + + local last_outcard = info_list[i]["last_outcard"] + if last_outcard ~= nil and last_outcard[1] ~= 0 then + + local out_card_list = _ctr_game:ChangeCodeByFrom(last_outcard.card_list,true) + local card_type,number,length,plan_three_count = _ctr_game:GetCardListInfo(out_card_list) + p.out_card_list = _ctr_game:GetSortOutCardList(out_card_list,card_type,number,plan_three_count) + else + p.out_card_list = {0} + end + + p.hand_list = info_list[i]["cards"] + p.winscore = info_list[i]["winscore"] + p.piao = info_list[i]["piao"] + p.hand_count = info_list[i]["card_size"] + p.thisboomnum=info_list[i]["thisboomnum"] + p.open= info_list[i]["open"] + + p.handCards = info_list[i]["handCards"] + p.outCards = info_list[i]["outCards"] + end + end + else + room.CurnrenState = StateType.Ready + end +end + + + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.room_id + room.room_config = RunFast_RoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + local _info_list = _tableInfo["playerData"] + for i = 1,#_info_list do + local _jp = _info_list[i] + local p = RunFast_Player.new() + p.seat = _jp["seat"] + p.aid = _jp["aid"] + local pid = _jp["aid"] + if p.aid == DataManager.SelfUser.account_id then + room.self_player = p + end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.hand_list = _hand_card + p.hand_count = #_hand_card + p.total_score = _jp["score"] + p.piao = _jp["piao"] + p.open= _jp["open"] + p.hp_info = _jp["hp_info"] + if _jp['hp_info'] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_CardType.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_CardType.lua new file mode 100644 index 00000000..526b504b --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_CardType.lua @@ -0,0 +1,24 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 11:30 +--- + +local RunFast_CardType = { + None = 0, + OneCard = 1,--一张 + OnePair = 2,--一对 + Three = 3,--三张 + Pairs = 4,--连对 + ThreeAndTwo = 5,--三带二 + ThreeAndOne = 6,--三带一 + Plane = 7,--飞机 + PlaneAndTwo = 8,--飞机带二 + PlaneAndOne = 9,--飞机带一 + Straight = 10, --顺子 + + Bomb = 11,--炸 + FourAndtThree=12,--四代三 + +} + +return RunFast_CardType \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_GameController.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_GameController.lua new file mode 100644 index 00000000..a22b323f --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_GameController.lua @@ -0,0 +1,722 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 11:28 +--- + +local RunFast_Protocol = import(".RunFast_Protocol") +local RunFast_GameEvent = import(".RunFast_GameEvent") +local RunFast_CardType = import(".RunFast_CardType") +local RunFast_PutError = { + "必须先出最小的牌", + "出牌不符合规定牌型 ", + "下家报单,请出最大的牌 ", + "炸弹不能拆" +} + +local RunFast_GameController = {} + +local M = RunFast_GameController + +function M.new() + setmetatable(M, {__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("跑得快") + self.class = "RunFast_GameController" + return self +end + +function M:init(name) + GameController.init(self, name) + self:RegisterEvt() +end + +-- 事件注册 +function M:RegisterEvt() + self._eventmap[RunFast_Protocol.RunFast_Ming_Card] = self.OnMingCard + self._eventmap[RunFast_Protocol.RunFast_Init_Card] = self.OnInitCard + self._eventmap[RunFast_Protocol.RunFast_Options] = self.OnOptions + self._eventmap[RunFast_Protocol.RunFast_Index_Move] = self.OnIndexMove + self._eventmap[RunFast_Protocol.RunFast_Play_Succ] = self.OnPlaySucc + self._eventmap[RunFast_Protocol.RunFast_Put_Error] = self.OnPutError + self._eventmap[RunFast_Protocol.RunFast_Pass_Succ] = self.OnPassSucc + self._eventmap[RunFast_Protocol.RunFast_Result] = self.OnResult + self._eventmap[RunFast_Protocol.RunFast_Bomb_Score] = self.OnBombScore + self._eventmap[RunFast_Protocol.RunFast_Piao_Tip] = self.OnPiaoTip + self._eventmap[RunFast_Protocol.RunFast_Piao_Action] = self.OnPiaoAction + self._eventmap[RunFast_Protocol.RunFast_ConfirmToNextGameSucc] = self.OnConfrimToNextGameSucc + --self._eventmap[RunFast_Protocol.RunFast_Oener] = self.Oener + -- self._eventmap[Protocol.GAME_EVT_PLAYER_JOIN] = self.OnEventPlayerEnter + self._eventmap[RunFast_Protocol.PT_GAMETUOGUAN] = self.Game_TuoGuan + + self._eventmap[RunFast_Protocol.GAME_EVENT_XIPAI] = self.OnEventXiPai + self._eventmap[RunFast_Protocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim + + self._eventmap[RunFast_Protocol.GAME_EVT_CARDINHAND] = self.OnPlaySuccCheckHandCard + +end +-- function M:Oener(evt_data) +-- local seat = evt_data["owner"] +-- self._cacheEvent:Enqueue(function() + +-- DispatchEvent(self._dispatcher,RunFast_GameEvent.Oener,seat) +-- end) +-- end +-- function M:OnEventPlayerEnter(evt_data) +-- local p = self._room:NewPlayer() +-- local _user + +-- _user = User.new() +-- _user.account_id = evt_data["aid"] +-- _user.host_ip = evt_data["ip"] +-- _user.nick_name = evt_data["nick"] +-- _user.head_url = evt_data["portrait"] +-- _user.sex = evt_data["sex"] +-- _user.location = Location.new(evt_data["pos"] or "") +-- p.seat = evt_data["seat"] +-- p.ready = evt_data["ready"] == 1 and true or false +-- p.self_user = _user +-- p.line_state = 1 +-- p.total_score=evt_data["score"] +-- p.hp_info = evt_data["hp_info"] +-- -- p.total_score=self._room.room_config.energyTab==0 and evt_data["score"] or evt_data["score"]/10 + +-- DataManager.CurrenRoom:AddPlayer(p) +-- DispatchEvent(self._dispatcher,GameEvent.PlayerEnter, p) +-- end + + +function M:SendXiPaiAction(callBack) + local _data = {} + local _client = ControllerManager.GameNetClinet + _client:send(RunFast_Protocol.GAME_XIPAI, _data) + self.XiPaiCallBack=callBack +end + +function M:OnEventXiPai(evt_data) + if evt_data["result"]==0 then + if self.XiPaiCallBack then + self.XiPaiCallBack() + end + else + ViewUtil.ErrorTip(1000000,"申请洗牌失败") + end + +end + + + +function M:OnEventXiPaiAnim(evt_data) + printlog("洗牌动画===》》》》") + pt(evt_data) + local playeridList = evt_data["list"] + local my_isXiPai=false + local other_isXiPai=false + if playeridList and #playeridList>0 then + for i=1,#playeridList do + local p = self._room:GetPlayerById(playeridList[i]) + if p== self._room.self_player then + my_isXiPai=true + else + other_isXiPai=true + end + end + end + + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RunFast_GameEvent.EventXiPai,my_isXiPai,other_isXiPai) + end) +end + + +function M:SendCard(cards,currentCard) + local _data = {} + _data["card"] = cards + _data["all_card"] = currentCard + local _client = ControllerManager.GameNetClinet + _client:send(RunFast_Protocol.RunFast_Send_Card, _data) +end + +function M:SendPiao(piao) + local _data = {} + _data["id"] = piao + local _client = ControllerManager.GameNetClinet + _client:send(RunFast_Protocol.RunFast_Send_Piao, _data) +end + +function M:SendPass() + local _client = ControllerManager.GameNetClinet + _client:send(RunFast_Protocol.RunFast_Send_Guo) +end + +function M:SendInitCardEnd() + local _client = ControllerManager.GameNetClinet + _client:send(RunFast_Protocol.RunFast_Init_Card_End) +end + +function M:ConformToNextGame() + local _client = ControllerManager.GameNetClinet + _client:send(RunFast_Protocol.RunFast_ConfirmToNextGame) +end + +function M:OnMingCard(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local card = evt_data["mingpai"] + self._cacheEvent:Enqueue( + function() + self._room.ming_card = card + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnMingCard, card) + end + ) +end + +function M:OnInitCard(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local cardlist = evt_data["cards"] + local round = evt_data["round"] + self._cacheEvent:Enqueue( + function() + for _, player in ipairs(self._room.player_list) do + player:Clear() + player.hand_count = #cardlist + end + + self._room.curren_round = round + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnInitCard, round, cardlist) + end + ) +end + +function M:OnBombScore(evt_data) + local scoreList = evt_data["gold_list"] + self._cacheEvent:Enqueue( + function() + for i = 1, #scoreList do + local score = scoreList[i].bom_score + local player = self._room:GetPlayerById(scoreList[i].aid) + player.total_score = player.total_score + score + end + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnBombScore, scoreList) + end + ) +end + +function M:OnPlaySucc(evt_data) + if pcall( + self.OnPlaySuccCheck,self,evt_data + ) then + + else + printlog("数据异常OnPlaySucc==>>>") + end +end + +function M:OnPlaySuccCheck(evt_data) + local seat = evt_data["player"] + local card_obj = evt_data["card_obj"] + local cards = card_obj["card_list"] + local remain = evt_data["remain"] -- 报单 + self._cacheEvent:Enqueue( + function() + local otherList = self:GetOtherSeatList(seat) + local player = self._room:GetPlayerBySeat(seat) + local out_card_list = self:ChangeCodeByFrom(cards, true) + player.hand_count = remain + local card_type, number, length, plan_three_count = self:GetCardListInfo(out_card_list) + player.out_card_list = self:GetSortOutCardList(out_card_list, card_type, number, plan_three_count) + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnPlaySucc, player, remain, card_type, number, otherList,length) + end + ) +end + +function M:OnPlaySuccCheckHandCard(evt_data) + local seat = evt_data["player"] + local cards = evt_data["handCards"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnPassSuccCheckCard,seat,cards) + end + ) + +end + + + + +function M:OnPassSucc(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue( + function() + local p = self._room:GetPlayerBySeat(seat) + p.out_card_list = {0} + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnPassSucc, p) + end + ) +end + +function M:OnPutError(evt_data) + local code = evt_data["error"] + self._cacheEvent:Enqueue( + function() + local error_str = self:GetErrorStr(code) + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnErrorTip, error_str) + end + ) +end +function M:TuoGuan(isTuo) + local _data = {} + _data["tuoguan"] = isTuo + local _client = ControllerManager.GameNetClinet + _client:send(RunFast_Protocol.SEND_TUOGUAN, _data) +end + +function M:Game_TuoGuan(evt_data) + local tuoguan = evt_data["tuoguan"] + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher, RunFast_GameEvent.Game_TuoGuan, tuoguan, seat) + end) +end +function M:OnIndexMove(evt_data) + local seat = evt_data["index"] + self._cacheEvent:Enqueue( + function() + self._room.curren_turn_seat = seat + self._room.is_new_bout = self:GetIsNewBout(seat) + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnIndexMove, seat) + end + ) +end + +function M:OnOptions(evt_data) + local play = evt_data["play"] + local pass = evt_data["pass"] + + self._cacheEvent:Enqueue( + function() + local lastCardList = self:GetLastCardList(self._room.self_player.seat) + local cardType, cardNum, cardLength = self:GetCardListInfo(lastCardList) + + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnOptions, play, cardType, cardNum, cardLength, pass) + end + ) +end + +function M:OnPiaoTip(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local piao = evt_data["piao"] + local reload = evt_data["reload"] + self._cacheEvent:Enqueue( + function() + + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnPiaoTips, piao,reload) + end + ) +end + +function M:OnPiaoAction(evt_data) + local seat = evt_data["seat"] + local piao = evt_data["piao"] + + self._cacheEvent:Enqueue( + function() + + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnPiaoAction, seat,piao) + end + ) +end + +function M:OnResult(evt_data) + local result_type = evt_data["type"] + + local info = evt_data["info"] + local winseat = evt_data["winseat"] + local remaincards = evt_data["remaincards"] + DataManager.CurrenRoom.xipaiScore=evt_data["xipai_score"] + --printlog("wwwwwwwwwwwwwwwwwwwww1111111 ",result_type) + --pt(evt_data) + if result_type == 1 then + local over = 1 + ControllerManager.SetGameNetClient(nil, true) + self._cacheEvent:Enqueue( + function() + for i = 1, #info do + local p = self._room:GetPlayerBySeat(info[i]["seat"]) + p.total_score = info[i]["score"] + info[i]["self_user"] = p.self_user + end + + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnResult, over, info, winseat, remaincards) + end + ) + elseif result_type == 0 then + local over = 0 + self._cacheEvent:Enqueue( + function() + for i = 1, #info do + local p = self._room:GetPlayerBySeat(info[i]["seat"]) + p.total_score = info[i]["score"] + info[i]["self_user"] = p.self_user + end + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnResult, over, info, winseat, remaincards) + end + ) + else + local dissolve = 1 + ControllerManager.SetGameNetClient(nil, true) + for i = 1, #info do + local p = self._room:GetPlayerBySeat(info[i]["seat"]) + p.total_score = info[i]["score"] + info[i]["self_user"] = p.self_user + end + -- ControllerManager.ChangeController(LoddyController) + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnResultByDissolve, over, info, winseat, dissolve) + end +end + +function M:OnConfrimToNextGameSucc(evt_data) + local aid = evt_data["aid"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnConfrimToNextGameSucc, aid) + end + ) +end +function M:Game_TuoGuan(evt_data) + local tuoguan = evt_data["tuoguan"] + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher, RunFast_GameEvent.Game_TuoGuan, tuoguan, seat) + end) +end +function M:ChangeCodeByFrom(cardList, isSort) + isSort = isSort or false + local new_card_list = {} + for i = 1, #cardList do + local flower = math.floor(cardList[i] / 100) + local number = cardList[i] % 100 + if number == 2 then + number = 15 + end + local card = number * 10 + flower + new_card_list[#new_card_list + 1] = card + end + return isSort == true and table.sort(new_card_list) or new_card_list +end + +function M:GetOtherSeatList(seat) + local list = {} + for i = 1, self._room.room_config.people_num do + if seat ~= i then + list[#list + 1] = i + end + end + return list +end + +-- +function M:GetIsNewBout(seat) + local passCount = 0 + for i = 1, #self._room.player_list do + local player = self._room.player_list[i] + if seat ~= player.seat then + local isPass = self:GetIsPass(player.out_card_list) + if isPass then + passCount = passCount + 1 + end + end + end + if passCount == self._room.room_config.people_num - 1 then + return true + else + return false + end +end + +function M:GetLastSeat(seat) + local last_seat = seat - 1 + if last_seat < 1 then + last_seat = last_seat + self._room.room_config.people_num + end + return last_seat +end + +function M:GetLastCardList(seat) + local last_seat = self:GetLastSeat(seat) + local player = self._room:GetPlayerBySeat(last_seat) + local isPass = self:GetIsPass(player.out_card_list) + if isPass then + if self._room.room_config.people_num == 2 then + return {} + end + local last_seat_2 = self:GetLastSeat(last_seat) + local player_2 = self._room:GetPlayerBySeat(last_seat_2) + local isPass_2 = self:GetIsPass(player_2.out_card_list) + if isPass_2 then + return {} + else + return player_2.out_card_list + end + else + return player.out_card_list + end +end + +function M:GetErrorStr(code) + return RunFast_PutError[code + 1] +end + +function M:GetSortOutCardList(outCardList, cardType, cardNumber, plan_three_count) + if cardType == 3 or cardType == 5 or cardType == 6 then + local removeList = {} + for i = #outCardList, 1, -1 do + local card = outCardList[i] + if math.floor(card / 10) == cardNumber then + removeList[#removeList + 1] = card + table.remove(outCardList, i) + end + end + for i = 1, #removeList do + table.insert(outCardList, 1, removeList[i]) + end + elseif cardType >= 7 and cardType <= 9 then + local removeList = {} + for i = #outCardList, 1, -1 do + local card = outCardList[i] + if math.floor(card / 10) <= cardNumber and math.floor(card / 10) > cardNumber - plan_three_count then + removeList[#removeList + 1] = card + table.remove(outCardList, i) + end + end + for i = 1, #removeList do + table.insert(outCardList, 1, removeList[i]) + end + end + return outCardList +end + +--None = 0, +--OneCard = 1, +--OnePair = 2, +--Three = 3, +--Pairs = 4, +--ThreeAndTwo = 5, +--ThreeAndOne = 6, +--Plane = 7, +--PlaneAndTwo = 8, +--PlaneAndOne = 9, +--Straight = 10, +--Bomb = 11 +-- 牌型,大小, 长度 +function M:GetCardListInfo(cardlist) + + if #cardlist == 0 then + return 0, 0, 0, 0 + end + -- 检测牌型 + local card_type, card_num, card_length, plan_three_count = RunFast_CardType.None, 0, #cardlist, 0 + local card_map = self:GetCardMapByList(cardlist) + + if #cardlist == 1 then + card_type = RunFast_CardType.OneCard + card_num = math.floor(cardlist[1] / 10) + elseif #cardlist == 2 then + card_type = RunFast_CardType.OnePair + card_num = math.floor(cardlist[1] / 10) + elseif #cardlist == 3 then + card_num = math.floor(cardlist[1] / 10) + if card_num==14 and DataManager.CurrenRoom.room_config.threeA==1 then + -- body + card_type = RunFast_CardType.Bomb + else + card_type = RunFast_CardType.Three + + end + + elseif #cardlist == 4 then + local max_key = 0 + for k, v in pairs(card_map) do + if #v == 4 then + card_type = RunFast_CardType.Bomb + card_num = k + elseif #v == 3 then + card_type = RunFast_CardType.ThreeAndOne + card_num = k + elseif #v == 2 then + if k > max_key then + max_key = k + end + card_type = RunFast_CardType.Pairs + card_num = max_key + end + end + elseif #cardlist == 5 then + local count, max_key = 0, 0 + for k, v in pairs(card_map) do + if #v >= 3 then + card_type = RunFast_CardType.ThreeAndTwo + card_num = k + elseif #v == 1 then + count = count + 1 + if k > max_key then + max_key = k + end + if count == 5 then + card_type = RunFast_CardType.Straight + card_num = max_key + end + end + end + elseif #cardlist == 7 then + local count, max_key = 0, 0 + for k, v in pairs(card_map) do + if #v >= 4 then + card_type = RunFast_CardType.FourAndtThree + card_num = k + elseif #v == 1 then + count = count + 1 + if k > max_key then + max_key = k + end + if count == 7 then + card_type = RunFast_CardType.Straight + card_num = max_key + end + end + end + else + local one_count, two_count, three_count = 0, 0, 0 + local max_one_key, max_two_key, max_three_key = 0, 0, 0 + + for k, v in pairs(card_map) do + + if #v == 2 then + + if k > max_two_key then + max_two_key = k + end + two_count = two_count + 1 + if two_count == #cardlist / 2 then + card_type = RunFast_CardType.Pairs + card_num = max_two_key + end + elseif #v == 1 then + + if k > max_one_key then + max_one_key = k + end + one_count = one_count + 1 + if one_count == #cardlist then + card_type = RunFast_CardType.Straight + card_num = max_one_key + end + elseif #v == 3 then + + if max_three_key == 0 then + max_three_key = k + three_count = three_count + 1 + elseif k > max_three_key and k == max_three_key + 1 then + max_three_key = k + three_count = three_count + 1 + elseif k < max_three_key and k == max_three_key - 1 then + max_three_key = k + three_count = three_count + 1 + -- else + -- max_three_key = k + end + + --three_count = three_count + 1 + end + end + -- plan_three_count = three_count + -- if three_count * 5 >= #cardlist then + -- card_type = RunFast_CardType.PlaneAndTwo + -- card_num = max_three_key + -- elseif three_count * 4 >= #cardlist then + -- card_type = RunFast_CardType.PlaneAndOne + -- card_num = max_three_key + -- elseif three_count * 3 >= #cardlist then + -- card_type = RunFast_CardType.Plane + -- card_num = max_three_key + -- end + plan_three_count = three_count + + if three_count * 3 == #cardlist then + card_type = RunFast_CardType.Plane + card_num = max_three_key + + elseif three_count * 4 >= #cardlist and #cardlist%4==0 then + card_type = RunFast_CardType.PlaneAndOne + card_num = max_three_key + + + elseif three_count * 5 >= #cardlist and #cardlist%5==0 then + card_type = RunFast_CardType.PlaneAndTwo + card_num = max_three_key + + + end + + + + end + + return card_type, card_num, card_length, plan_three_count +end + +function M:GetCardMapByList(cardlist) + local card_map = {} + for i = 1, #cardlist do + local card = cardlist[i] + local card_num = math.floor(cardlist[i] / 10) + if card_map[card_num] == nil then + card_map[card_num] = {card} + else + card_map[card_num][#card_map[card_num] + 1] = card + end + end + return card_map +end + +function M:GetIsPass(cardlist) + if #cardlist == 0 then + return true + end + if cardlist[1] ~= nil and cardlist[1] == 0 then + return true + end + return false +end + +--请求离开房间 +function M:LevelRoom(callBack) + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + _client:send( + Protocol.GAME_EXIT_ROOM, + nil, + function(res) + if res.ReturnCode == 0 then + ControllerManager.ChangeController(LoddyController) + elseif res.ReturnCode == 27 then + ViewUtil.ErrorTip(res.ReturnCode, "退出房间失败!") + end + callBack(res) + end + ) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_GameEvent.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_GameEvent.lua new file mode 100644 index 00000000..dcb139a5 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_GameEvent.lua @@ -0,0 +1,23 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:55 +--- +local RunFast_GameEvent = { + OnMingCard = "OnMingCard", + OnInitCard = "OnInitCard", + OnOptions = "OnOptions", + OnPiaoTips = "OnPiaoTips", + OnPiaoAction = "OnPiaoAction", + OnBombScore = "OnBombScore", + OnIndexMove = "OnIndexMove", + OnPlaySucc = "OnPlaySucc", + OnErrorTip = "OnErrorTip", + OnPassSucc = "OnPassSucc", + OnResult = "OnResult", + OnResultByDissolve = "OnResultByDissolve", + OnConfrimToNextGameSucc = "OnConfrimToNextGameSucc", + Game_TuoGuan="Game_TuoGuan", + EventXiPai="EventXiPai", + OnPassSuccCheckCard="OnPassSuccCheckCard", +} +return RunFast_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua new file mode 100644 index 00000000..0a87a0c1 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_MainView.lua @@ -0,0 +1,1577 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 9:41 +--- +local PKMainView = import("main.poker.PKMainView") +local RunFast_PlayerPokerInfoView = import(".RunFast_PlayerPokerInfoView") +local RunFast_PlayerSelfPokerInfoView = import(".RunFast_PlayerSelfPokerInfoView") +local RunFast_GameEvent = import(".RunFast_GameEvent") +local RunFast_ResultView = import(".RunFast_ResultView") +local RunFast_RightPanelView = import(".RunFast_RightPanelView") +local PlayerInfoView = import(".EXPlayerInfoView") +local TableBG = import('Game.Data.TableBG') +local M = {} +function M.new() + setmetatable(M, {__index = PKMainView}) + local self = setmetatable({}, {__index = M}) + self.class = "RunFast_MainView" + self:init() + self._gamectr = ControllerManager.GetController(GameController) + return self +end + +local default_bg = 1 +local bg_config = { + {id = 1, url = 'extend/poker/runfast/bg/bg1', thumb = 'ui://Extend_Poker_RunFastNew/table_bg1'}, + {id = 2, url = 'extend/poker/runfast/bg/bg2', thumb = 'ui://Extend_Poker_RunFastNew/table_bg2'}, + {id = 3, url = 'extend/poker/runfast/bg/bg3', thumb = 'ui://Extend_Poker_RunFastNew/table_bg3'} +} + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/poker/runfast/ui/Extend_Poker_RunFastNew") + PKMainView.InitView(self, "ui://Extend_Poker_RunFastNew/RunFast_Main_" .. room.room_config.people_num,nil,1,default_bg,bg_config,nil,"ui://Extend_Poker_RunFastNew/SettingWindow1") + local _room = DataManager.CurrenRoom + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id.._room.game_id.."pai") + if json_data == nil then + local _gamectr = self._gamectr + self._room.pai = 0 + else + local _data = json.decode(json_data) + local pai = _data["pai"] + self._room.pai = pai + end + + json_data = Utils.LoadLocalFile(user_id.._room.game_id.."cardsize") + if json_data == nil then + local _gamectr = self._gamectr + self._room.cardsize = 1 + else + local _data = json.decode(json_data) + local cardsize = _data["cardsize"] + self._room.cardsize = cardsize + end + + + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem, self) + tem.visible = false + end + local list = self._room.player_list + for i=1,#list do + local p = list[i] + local info = _player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + end + + + local rightpanel = self._view:GetChild("right_panel") + if self._rightPanelView ~= nil then + self._rightPanelView:Destroy() + end + + self._rightPanelView = RunFast_RightPanelView.new(self, rightpanel) + for i=1,#self._room.player_list do + + if self._room.self_player.seat==self._room.player_list[i].seat and self._room.self_player.self_user.account_id ~= self._room.player_list[i].self_user.account_id then + -- body + local ErrorMsgTip = UIPackage.CreateObject("Common", "Win_ConnectTip") + local _action = self._view:AddChild(ErrorMsgTip) + _action.xy = Vector2((self._view.width - _action.width) / 4, self._view.height / 4) + local text = _action:GetChild("tex_message") + local btn1 = _action:GetChild("btn_connect") + local btn2 = _action:GetChild("btn_back") + text.text = "您来晚了,座位有人,请重新进牌桌" + btn1.visible=false + btn2:Center() + btn2.y=btn2.y+50 + btn2.onClick:Set(function() + -- body + ErrorMsgTip:Destroy() + ErrorMsgTip = nil + self._gamectr:LevelRoom(function(res) + ViewUtil.CloseModalWait() + NetResetConnectWindow.CloseNetReset() + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + end) + end + end + + if self._room.hpOnOff == 1 and self._room.score_times ~= 1 then + -- body + self._view:GetChild("roominfo_panel1"):GetChild("tex_beishu").text=self._room.score_times .."倍" + else + self._view:GetChild("roominfo_panel1"):GetChild("tex_beishu").text="" + end + + self.ctr_state = self._view:GetController("state") + self._ctr_action = self._view:GetController("action") + self._tex_leftTime = self._view:GetChild("time"):GetChild("title") + self.ctr_time = self._view:GetController("time") + self._text_round = self._view:GetChild("round") + self.ctr_card_eff = self._view:GetController("card_eff") + self._player_card_info = {} + + local _player_card_info = self._player_card_info + for i = 1, room.room_config.people_num do + local tem = self._view:GetChild("player_card_info_" .. i) + _player_card_info[i] = self:NewPlayerCardInfoView(tem, i) + end + + local list = room.player_list + if not room.self_player.ready then + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig then + if round>1 then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 2 + end + + else + self._ctr_action.selectedIndex = 1 + end + else + self._ctr_action.selectedIndex = 0 + end + self._left_time = 0 + self.bgm_index = 1 + local state = self._room.CurnrenState + + if room.CurnrenState ~= StateType.PalyingWait then + self._state.selectedIndex = state + if room.CurnrenState == StateType.Palying then + self:ReConnectForStart() + end + else + + self._state.selectedIndex = StateType.Palying + self:ReconnectForClearing() + + end + + self._view:GetChild("btn_back_jiesan").onClick:Set(function () + if self.dismiss_room_cd_time > 0 then + ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!") + else + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:AskDismissRoom() + end + + end) + --local tempdsaf=self._view:GetChild("btn_back_jiesan") + --tempdsaf:GetChild("n3").displayObject.gameObject:SetActive(false) + --self._view:GetChild("btn_back_jiesan").displayObject.gameObject:SetActive(false) + + self:ChangeBgmMusic() + self:EventInit() + + self._view:GetChild("mask").onClick:Set(function() + self:ResetPoker() + end) + local btn_rule = self._view:GetChild("right_panel"):GetChild("btn_log") + self._view:GetChild('info_text'):GetChild('text').text = room.room_config:GetDes() + if room.room_config.Leaf == 1 then + if room.room_config.people_num ==2 then + self._view:GetChild('wanfa_text').text = '十五张' .. '二人跑得快' .. room.score_times .. '倍' + else + self._view:GetChild('wanfa_text').text = '十五张' .. '三人跑得快' .. room.score_times .. '倍' + end + else + if room.room_config.people_num == 2 then + self._view:GetChild('wanfa_text').text = '十六张' .. '二人跑得快' .. room.score_times .. '倍' + else + self._view:GetChild('wanfa_text').text = '十六张' .. '三人跑得快' .. room.score_times .. '倍' + end + end + + if self._view:GetChild("shengyu")~=nil then + -- body + + if room.room_config.Leaf==1 then + -- body + self._view:GetChild("shengyu"):GetChild("shengyu").text="剩余15张" + else + self._view:GetChild("shengyu"):GetChild("shengyu").text="剩余16张" + end + end +end +function M:UpdateCard( index ) + self._room.pai=index + local card_info = self._player_card_info[1] + -- for i=1,#self._room.player_list do + -- print(i) + -- end + card_info:updatePoker() + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + + if self._room.curren_turn_seat ~= player.seat then + if player.out_card_list[1] == 0 then + player_card_info:SetOutCardInfo(nil, true) + else + player_card_info:SetOutCardInfo(player.out_card_list, false) + end + end + end + if self.caozuo==1 then + local ctr_number = self.pass == nil and 2 or 1 + local lastCardList = self._gamectr:GetLastCardList(self._room.self_player.seat) + local cardType, cardNum, cardLength = self._gamectr:GetCardListInfo(lastCardList) + local m = false + local next_seat = self._room.self_player.seat + 1 + if next_seat > self._room.room_config.people_num then + next_seat = next_seat - self._room.room_config.people_num + end + if self._room:GetPlayerBySeat(next_seat).hand_count == 1 and self._room.room_config.WillBeOut == 1 then + m = true + end + local zdts = self._view:GetController("zidongtishi").selectedIndex + self._player_card_info[1]:ShowOutCardOption(ctr_number, cardType, cardNum, cardLength,m) + end +end + +function M:UpdateCardSize(index) + self._room.cardsize=index + local card_info = self._player_card_info[1] + card_info:updatePoker() +end + +function M:NewPlayerCardInfoView(tem, index) + if index == 1 then + return RunFast_PlayerSelfPokerInfoView.new(tem, self) + end + return RunFast_PlayerPokerInfoView.new(tem, self) +end + +function M:OnPlayerEnter(...) + MainView.OnPlayerEnter(self, ...) + local arg = {...} + local p = arg[1] + local index = self:GetPos(p.seat) + local info = self._player_info[index] + local selecet_seat = self._view:GetChild("seat_" .. index) + if selecet_seat ~= nil then + selecet_seat.visible = true + end + info:FillData(p) + if self._room.banker_seat == self._room.self_player.seat and self._room.self_player.ready then + self._ctr_action.selectedIndex = 0 + end +end + +function M:OnPlayerReady(...) + local arg = {...} + local p = arg[1] + local _room = self._room + local _player_info = self._player_info + if p.seat == _room.self_player.seat then + self._ctr_action.selectedIndex = 0 + end + local info = _player_info[self:GetPos(p.seat)] + info:Ready(true) +--local readyNum = 0 +--for i = 1, #_room.player_list do +-- local player = _room.player_list[i] +-- if player.ready then readyNum = readyNum + 1 end +--end +--if _room.banker_seat == _room.self_player.seat and readyNum > 1 and readyNum == _room.room_config.people_num then +-- if self._state.selectedIndex == 2 then +-- local _gamectr = ControllerManager.GetController(GameController) +-- _gamectr:StartGame() +-- end +-- --self._ctr_action.selectedIndex = 2 +--end +end + +function M:OnPlayerLeave(...) + MainView.OnPlayerLeave(self, ...) + local _room = self._room + if not _room.self_player.ready then + --self._ctr_action.selectedIndex = 1 + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig then + if round>1 then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 2 + end + + else + self._ctr_action.selectedIndex = 1 + end + else + self._ctr_action.selectedIndex = 0 + end +end + + +function M:EventInit() + local _gamectr = ControllerManager.GetController(GameController) + MainView.EventInit(self) + local _player_info = self._player_info + local _player_card_info = self._player_card_info + local _room = self._room + + + _gamectr:AddEventListener(RunFast_GameEvent.EventXiPai,function( ... ) + + if self.result_view ~= nil then + self.result_view:Destroy() + self.result_view = nil + end + + self._player_card_info[1]:HidePiao() + + if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + self.MypokerList = cardlist + end + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 0 + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local head_info = self._player_info[self:GetPos(p.seat)] + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + -- body + + if self._room.room_config.showlength==1 then + -- body + head_info._view:GetController("shengyu").selectedIndex=1 + else + head_info._view:GetController("shengyu").selectedIndex=0 + end + + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..p.hand_count.."张" + + + + end + p:Clear() + head_info:FillData(p) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:Clear() + head_info:Ready(false) + + end + + + --[[if ( currentPlayer ) then + self._popEvent = false + local xipaiCB=function () + self._popEvent = true + end + self:PlayXiPai(xipaiCB) + else + ViewUtil.ShowModalWait(self._root_view,"等待其它玩家洗牌...") + coroutine.start(function() + coroutine.wait(3) + ViewUtil.CloseModalWait() + end) + + + end--]] + + + local arg = {...} + local currentPlayer1=arg[1] + local currentPlayer2=arg[2] + self._popEvent = false + if ( currentPlayer1 ) then + + local xipaiCB=function () + self._popEvent = true + end + self:PlayXiPai(xipaiCB) + + end + + + if ( currentPlayer2 ) then + --self._popEvent = false + local xipaiCB2=function () + self._popEvent = true + end + self:PlayXiPai1(xipaiCB2) + end + + + + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnMingCard, function(...) + local arg = {...} + local card = arg[1] + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 1 + self:PlayCardEff(card) + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnInitCard, function(...) + local arg = {...} + local round = arg[1] + local cardlist = arg[2] + + + if self.result_view ~= nil then + self.result_view:Destroy() + self.result_view = nil + end + + self._player_card_info[1]:HidePiao() + + if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + self.MypokerList = cardlist + end + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 0 + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + self:UpdateRound(round) + ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/fapai.mp3") + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local head_info = self._player_info[self:GetPos(p.seat)] + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + -- body + + if self._room.room_config.showlength==1 then + -- body + head_info._view:GetController("shengyu").selectedIndex=1 + else + head_info._view:GetController("shengyu").selectedIndex=0 + end + + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..p.hand_count.."张" + + + + end + p:Clear() + head_info:FillData(p) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:Clear() + head_info:Ready(false) + + if p.seat == self._room.self_player.seat then + if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + card_info:InitPoker(cardlist,true,1) + else + card_info:InitPoker(cardlist,true) + end + + else + --card_info:UpdateHandPoker(#cardlist,true,false) --todo + --card_info:UpdateRemainCard(#cardlist,true) + end + end + end) + + + -- _gamectr:AddEventListener(RunFast_GameEvent.Oener,function ( ... ) + -- local arg = {...} + -- local seat = arg[1] + -- local head_info = self._player_info[self:GetPos(seat)] + -- head_info._view:GetController("Oener").selectedIndex=1 + -- end) + _gamectr:AddEventListener(RunFast_GameEvent.OnIndexMove, function(...) + local arg = {...} + local seat = arg[1] + local isNewBout = arg[2] + local index = self:GetPos(seat) + + self.ctr_time.selectedIndex = index + -- for i=1,#self._player_info do + -- if index==i then + -- -- body + -- local head_info = self._player_info[index] + -- head_info:MarkBank(true) + -- else + -- local head_info = self._player_info[i] + -- head_info:MarkBank(false) + -- end + -- end + + if index == 1 then + local card_info = self._player_card_info[index] + card_info:SetOutCardInfo(nil, false) + -- if self.MypokerList ~= nil then + -- -- body + -- card_info:Clear() + -- card_info:InitPoker(self.MypokerList, false) + -- self.MypokerList = nil + -- end + end + self._left_time = 20 + if self._room.ming_card ~= nil then + self._view:GetTransition("t" .. index):Play() + self._room.ming_card = nil + if self.tween ~= nil then + TweenUtils.Kill(self.tween) + self.tween = nil + end + end + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnBombScore, function(...) + local arg = {...} + local scoreList = arg[1] + -- for i = 1, #scoreList do + -- local player = self._room:GetPlayerBySeat(i) + -- local card_info = self._player_card_info[self:GetPos(i)] + -- local head_info = self._player_info[self:GetPos(i)] + -- card_info:PlayScore(scoreList[i], true) + -- head_info:UpdateScore(player.total_score) + -- end + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnPlaySucc, function(...) + local arg = {...} + local p = arg[1] + local card_number = arg[2] + local cardstype = arg[3] + local num = arg[4] + local otherList = arg[5] + local length = arg[6] + self.ctr_time.selectedIndex = 0 + + local index = self:GetPos(p.seat) + if index==1 then + self.caozuo=0 + end + local head_info = self._player_info[index] + if head_info._view:GetChild("shengyu")~=nil then + -- body + -- body + if card_number~=nil then + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..card_number.."张" + end + + + end + local card_info = self._player_card_info[index] + card_info:SetOutCardInfo(p.out_card_list, false, true) + for i = 1, #otherList do + local other_seat = otherList[i] + local other_card_info = self._player_card_info[self:GetPos(other_seat)] + other_card_info:SetOutCardBlack() + end + + if index == 1 then + card_info:DeleteHandCards(p.out_card_list) + else + card_info:SetRemainCardNumber(card_number == 1) + --card_info:UpdateHandPoker(card_number,false,false) -- todo + end + if self._room.is_new_bout == true then + for i = 1, #self._room.player_list do + local player = self._room.player_list[i] + local card_info_i = self._player_card_info[self:GetPos(player.seat)] + if p.seat ~= player.seat then + card_info_i:SetOutCardInfo(nil, false) + end + end + -- card_info:PlayCardTypeEff(cardstype) + -- if cardstype~=12 then + -- -- body + + + -- if cardstype==10 and length>=6 then + -- -- card_info_i + -- local chuan = UIPackage.CreateObject("Extend_Poker_RunFast", "chuan1") + -- local card_info_i = self._player_card_info[self:GetPos(p.seat)] + + -- card_info_i._mask_liangpai:AddChild(chuan) + -- chuan:GetChild("n0").asMovieClip.playing = true + -- ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/sunzi.mp3") + -- coroutine.start(function() + -- coroutine.wait(1.5) + -- if chuan~=nil then + -- -- body + -- chuan:Dispose() + -- end + + -- end) + + -- else + -- self:_Effect(cardstype, p) + -- end + -- end + self:_Effect(cardstype, p) + + else + if cardstype == 11 and cardstype~=12 then + self:_Effect(cardstype, p) + end + end + self:PlaySound(p.self_user.sex, self:GetSoundFileName(cardstype, num, self._room.is_new_bout)) + if card_number == 1 then + --self:ChangeBgmMusic(2) + self:ChangeBgmMusic(1) + if self._cor_sound ~= nil then + coroutine.stop(self._cor_sound) + end + self._cor_sound = nil + self._cor_sound = coroutine.start(function() + coroutine.wait(1) + self:PlaySound(p.self_user.sex, "card_1") + end) + end + + end) + + + _gamectr:AddEventListener(RunFast_GameEvent.OnPassSuccCheckCard, function(...) + self._popEvent = false + local arg = {...} + local seat = arg[1] + local cards = arg[2] + --self.MypokerList=cards + self.ctr_time.selectedIndex = 0 + local card_info = self._player_card_info[self:GetPos(seat)] + if seat == self._room.self_player.seat then + card_info:ClearCheck() + card_info:InitPoker(cards, false) + + --local player=self._room:GetPlayerBySeat(seat) + --if player.out_card_list[1] == 0 then + -- player_card_info:SetOutCardInfo(nil, true) + --else + --player:SetOutCardInfo({207}, false) + -- end + end + + self._popEvent = true + + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnPassSucc, function(...) + local arg = {...} + local p = arg[1] + + self.ctr_time.selectedIndex = 0 + local card_info = self._player_card_info[self:GetPos(p.seat)] + + --card_info:SetOutCardInfo(nil, false) + if p.seat == self._room.self_player.seat and self.MypokerList ~= nil then + -- body + card_info:Clear() + card_info:InitPoker(self.MypokerList, false) + self.MypokerList = nil + end + card_info:SetOutCardInfo(nil, true) + self:PlaySound(p.self_user.sex, "pass_" .. math.random(1, 4)) + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnErrorTip, function(...) + local arg = {...} + local error_str = arg[1] + self._player_card_info[1]:ErrorTip(error_str) + -- self._player_card_info[1]:ResetPoker() + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnPiaoTips, function(...) + local arg = {...} + local piao = arg[1] + local reload = arg[2] + if reload == 0 then + + if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + self.MypokerList = cardlist + end + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 0 + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + self:UpdateRound(self._room.curren_round) + + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local head_info = self._player_info[self:GetPos(p.seat)] + + p:Clear() + head_info:FillData(p) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:Clear() + head_info:Ready(false) + head_info:UpdatePiao(-1) + end + end + + self._player_card_info[1]:ShowPiao(piao) + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnPiaoAction, function(...) + local arg = {...} + local seat = arg[1] + local piao = arg[2] + local head_info = self._player_info[self:GetPos(seat)] + head_info:UpdatePiao(piao) + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnOptions, function(...) + local arg = {...} + local play = arg[1] + local pass = arg[5] + local card_type = arg[2] + local card_number = arg[3] + local card_length = arg[4] + local ctr_number = pass == nil and 2 or 1 + self.caozuo=1 --记录是否是自己出牌的阶段 + self.pass=pass + local m = false + local next_seat = self._room.self_player.seat + 1 + local card_info = self._player_card_info[1] + --card_info:SetOutCardInfo(nil, false) + if self.MypokerList ~= nil then + -- body + card_info:Clear() + card_info:InitPoker(self.MypokerList, false) + self.MypokerList = nil + end + if next_seat > self._room.room_config.people_num then + next_seat = next_seat - self._room.room_config.people_num + end + if self._room:GetPlayerBySeat(next_seat).hand_count == 1 and self._room.room_config.WillBeOut == 1 then + m = true + end + local zdts = self._view:GetController("zidongtishi").selectedIndex + self._player_card_info[1]:ShowOutCardOption(ctr_number, card_type, card_number, card_length,m,play,zdts) + end) + -- 托管 + _gamectr:AddEventListener(RunFast_GameEvent.Game_TuoGuan, function(...) + local arg = {...} + local tuoguan = arg[1] + local seat = arg[2] + + local tuoguanzhong = self._view:GetChild("tuoguanzhong") + local zhezhao = self._view:GetChild("n109") + local head_info = self._player_info[self:GetPos(seat)] + if (tuoguan == 1) then + if (seat == self._room.self_player.seat ) then + tuoguanzhong.visible = true + -- tuoguanzhong.sortingOrder = 2 + zhezhao.visible = true + zhezhao.onClick:Set(function() + _gamectr:TuoGuan(0) + end) + else + head_info._view:GetController("tuoguan").selectedIndex = 1 + end + -- if self.ispanguangzhe == true then + -- -- body + -- zhezhao.visible = false + -- end + else + if (seat == self._room.self_player.seat) then + tuoguanzhong.visible = false + zhezhao.visible = false + -- local btn_tuoguan = self._view:GetChild("n107") + -- btn_tuoguan.onClick:Set(function() + -- _gamectr:TuoGuan(1) + -- -- self:ZhiNengtuoguan() + -- end) + else + head_info._view:GetController("tuoguan").selectedIndex = 0 + end + end + end) + _gamectr:AddEventListener(RunFast_GameEvent.OnResult, function(...) + local arg = {...} + local over = arg[1] + local info = arg[2] + local win_seat = arg[3] + local remaincards = arg[4] + -- local energyTab = arg[5] + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if self.MypokerList ~= nil then + -- body + local card_info = self._player_card_info[self:GetPos(self._room.self_player.seat)] + card_info:Clear() + card_info:InitPoker(self.MypokerList, false) + self.MypokerList = nil + end + if otherpoker_list ~= nil then + -- body + otherpoker_list:RemoveChildrenToPool() + otherpoker_list.visible=true + end + + if remaincards then + -- body + local newremaincards = _gamectr:ChangeCodeByFrom(remaincards,true) + table.sort(remaincards) + for i = #newremaincards, 1, -1 do + coroutine.start(function() + coroutine.wait(0.01) + + local flow = newremaincards[i] % 10 + local num = (newremaincards[i] - (newremaincards[i] % 10)) / 10 + local card_n = flow * 100 + num + local poker_item = UIPackage.CreateObject("Extend_Poker_RunFastNew", "poker6") + + --local code = self:ChangeCodeByTo(card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/" .. card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + local card_code_obj = nil + if DataManager.CurrenRoom.pai==0 then + if card_n==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..card_n.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..card_n) + end + + else + if card_n==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..card_n.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + end + + end + if card_code_obj ~= nil then + card_code_obj:SetScale(0.6, 0.6) + if poker_item ~= nil then + poker_item:AddChild(card_code_obj) + otherpoker_list:AddChild(poker_item) + end + + end + + end) + + + end + + end + if self._cor_sound ~= nil then + coroutine.stop(self._cor_sound) + self._cor_sound = nil + end + + if self.destory_win ~= nil then + coroutine.stop(self.destory_win) + end + + self.destory_win = nil + self.destory_win = coroutine.start(function() + -- print("11111111111111") + -- coroutine.wait(1) + if self._room.self_player.seat == win_seat then + local sprint_seat_list = self:GetSpringSeats(info) + if #sprint_seat_list > 0 then + local url = "ui://Extend_Poker_RunFastNew/Spring" + self.WinItem_view = UIPackage.CreateObjectFromURL(url) + self._view:AddChild(self.WinItem_view) + self.WinItem_view:Center() + self.WinItem_view:GetTransition("t0"):Play() + ViewUtil.PlaySound("RunFastNew_PK", "base/common/sound/win new.mp3") + end + -- local url = #sprint_seat_list > 0 and "ui://Extend_Poker_RunFastNew/Spring" or "ui://Extend_Poker_RunFastNew/Win_Mine" + + + else + local beigang = false + if #self:GetSpringSeats(info)>0 then + for i=1,#self:GetSpringSeats(info) do + if self:GetSpringSeats(info)[i]==self._room.self_player.seat then + local url = "ui://Extend_Poker_RunFastNew/spring2" + self.WinItem_view = UIPackage.CreateObjectFromURL(url) + self._view:AddChild(self.WinItem_view) + self.WinItem_view:Center() + self.WinItem_view:GetTransition("t0"):Play() + beigang=true + end + end + + end + -- if beigang == false then + -- self:CreateRankEff() + -- end + + end + for i = 1, #info do + local player = info[i] + local p = self._room:GetPlayerBySeat(player.seat) + local head_info = self._player_info[self:GetPos(player.seat)] + local card_info = self._player_card_info[self:GetPos(player.seat)] + if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then + p.hp_info = player.hp_info + head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) + head_info._view:GetChild('zhanji').visible = true + local num = player.hp_info.total_hp + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(player.hp_info.total_hp) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + end + card_info:PlayScore(d2ad(player.hp_info.round_actual_hp), false, win_seat == player.seat) + else + local rt = 1 + if self._room.hpOnOff == 1 then + rt = self._room.score_times + end + if over == 1 and self._room.hpOnOff == 1 then + head_info:UpdateScore(player.score / 10) --不可负分 + else + head_info:UpdateScore(player.score * rt) + end + card_info:PlayScore(player.winscore * rt, false, win_seat == player.seat) + end + + + if player.seat ~= self._room.self_player.seat then + card_info:UpdateHandPoker(player.cards, false, true) + card_info:SetRemainCardNumber(false) + end + end + self:ChangeBgmMusic(1) + -- if over == 0 then + if #self:GetSpringSeats(info) > 0 then + -- print("222222222222222222") + coroutine.wait(1) + else + -- print("333333333333333333") + -- coroutine.wait(2) + end + + self.result_view = RunFast_ResultView.new(self._root_view, info, self._room.room_id, over, win_seat, 0, remaincards) + self.result_view:Show() + if self.WinItem_view ~= nil then + self.WinItem_view:Dispose() + self.WinItem_view = nil + end + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + + if self._room.self_player.entrust == true then + local btn_confirm = self.result_view._view:GetChild("btn_confirm") + btn_confirm.onClick:Call() + end + + -- local _actionView = UIPackage.CreateObject("Common", "Btn_Yellow") + -- _actionView.icon = "ui://Common/btn_comfirm" + -- _actionView.onClick:Set(function () + -- --local _gamectr = ControllerManager.GetController(GameController) + -- _gamectr:ConformToNextGame() + -- _actionView:Dispose() + -- end) + -- _actionView.xy = Vector2(900, 625) + -- self._view:AddChild(_actionView) + -- else + -- coroutine.wait(4) + -- self.result_view = RunFast_ResultView.new(self._root_view,info,self._room.room_id) + -- self.result_view:Show() + -- end + end) + if over==1 then + -- body + self:UnmarkSelfTuoguan() + ControllerManager.ChangeController(LoddyController) + + end + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnResultByDissolve, function(...) + + local arg = {...} + local over = arg[1] + local info = arg[2] + local winseat = arg[3] + local dissolve = arg[4] + + self.result_view = RunFast_ResultView.new(self._root_view, info, self._room.room_id, over, winseat, dissolve,nil) + self.result_view:Show() + ControllerManager.ChangeController(LoddyController) + self:UnmarkSelfTuoguan() + end) + + -- 确定开始下一局 成功 + _gamectr:AddEventListener(RunFast_GameEvent.OnConfrimToNextGameSucc, function(...) + local arg = {...} + local aid = arg[1] + local p = self._room:GetPlayerById(aid) + if p.seat == self._room.self_player.seat then + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + if self.destory_win ~= nil then + coroutine.stop(self.destory_win) + self.destory_win = nil + end + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + local player_head = self._player_info[self:GetPos(player.seat)] + player_card_info:Clear() + local otherpoker_list = self._view:GetChild("otherpoker_list") + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + --player_head._view:GetController("Oener").selectedIndex=0 + end + end + local player_info = self._player_info[self:GetPos(p.seat)] + player_info:Ready(true) + end) +end + +function M:ReConnectForStart() + + local _gamectr = ControllerManager.GetController(GameController) + self._room.is_new_bout = _gamectr:GetIsNewBout(self._room.curren_turn_seat) + self._state.selectedIndex = 1 + self._view:GetController("time").selectedIndex = self:GetPos(self._room.curren_turn_seat) + + self:UpdateRound(self._room.curren_round) + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + local head_info = self._player_info[self:GetPos(player.seat)] + head_info:Ready(false) + + --如果是体力值不可负分模式 则显示当前的hp值 + if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then + head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) + head_info._view:GetChild('zhanji').visible = true + local num = player.hp_info.total_hp + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = '+' .. d2ad(player.hp_info.total_hp) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + end + else + local rt = 1 + if self._room.hpOnOff == 1 then + rt = self._room.score_times + end + head_info:UpdateScore(player.total_score * rt) + end + + head_info:UpdateLineState(player.line_state) + head_info:UpdatePiao(player.piao) + + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + -- body + + + if self._room.room_config.showlength==1 then + -- body + head_info._view:GetController("shengyu").selectedIndex=1 + else + head_info._view:GetController("shengyu").selectedIndex=0 + end + + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..player.hand_count.."张" + + + + end + if player.seat == self._room.self_player.seat then + if player.open ~= nil and player.open == 0 and self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + self.MypokerList = player.hand_list + player_card_info:InitPoker(player.hand_list, false, 1) + + else + + player_card_info:InitPoker(player.hand_list, false) + end + + else + + player_card_info:SetRemainCardNumber(player.hand_count == 1) + if player.hand_count == 1 then + self.bgm_index = 2 + end + end + if self._room.curren_turn_seat ~= player.seat then + -- head_info:MarkBank(false) + if player.out_card_list[1] == 0 then + player_card_info:SetOutCardInfo(nil, false) + else + player_card_info:SetOutCardInfo(player.out_card_list, false) + end + else + -- head_info:MarkBank(true) + end + end +end + +function M:ReconnectForClearing() + self:UpdateRound(self._room.curren_round) + local win_seat = 0 + --self.rank_view = self:CreateRankEff(self._room.winseat) + for _, player in ipairs(self._room.player_list) do + local head_info = self._player_info[self:GetPos(player.seat)] + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + + --如果是体力值不可负分模式 则显示当前的hp值 + if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then + head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) + head_info._view:GetChild('zhanji').visible = true + local num = player.hp_info.total_hp + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = '+' .. d2ad(player.hp_info.total_hp) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + end + -- player_card_info:PlayScore(d2ad(player.hp_info.round_actual_hp)) + else + local rt = 1 + if self._room.hpOnOff == 1 then + rt = self._room.score_times + end + head_info:UpdateScore(player.total_score * rt) + -- player_card_info:PlayScore(player.winscore * rt, false, self._room.winseat) + end + + head_info:UpdateLineState(player.line_state) + --head_info._view:GetController("Oener").selectedIndex=0 + head_info:UpdatePiao(player.piao) + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + -- body + + if self._room.room_config.showlength==1 then + -- body + head_info._view:GetController("shengyu").selectedIndex=1 + else + head_info._view:GetController("shengyu").selectedIndex=0 + end + + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..player.hand_count.."张" + + end + + + if player.seat == self._room.self_player.seat then + + player_card_info:InitPoker(player.hand_list, false) + else + player_card_info:UpdateHandPoker(player.hand_list, false, true) + end + if player.out_card_list[1] == 0 then + + player_card_info:SetOutCardInfo(nil, false) + else + player_card_info:SetOutCardInfo(player.out_card_list, false) + end + end + win_seat=self._room.winseat + self._room.winseat = nil + + local remaincards = self._room.remaincards + if self._room.game_status==1 then + + + -- body + coroutine.start(function() + coroutine.wait(0.3) + + self.result_view = RunFast_ResultView.new(self._root_view, self._room.player_list, self._room.room_id, 0, win_seat,0,remaincards) + self.result_view:Show() + local card_info = self._player_card_info[1] + card_info._view:GetChild("out_card_list").visible=true + end) + if remaincards then + + local newremaincards = self._gamectr:ChangeCodeByFrom(remaincards,true) + + -- body + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list:RemoveChildrenToPool() + otherpoker_list.visible=true + end + + for i = #newremaincards, 1, -1 do + coroutine.start(function() + coroutine.wait(0.1 * (15 - i)) + + + local flow = newremaincards[i] % 10 + local num = (newremaincards[i] - (newremaincards[i] % 10)) / 10 + local card_n = flow * 100 + num + local poker_item = UIPackage.CreateObject("Extend_Poker_RunFastNew", "poker6") + + --local code = self:ChangeCodeByTo(card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/" .. card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + local card_code_obj + if DataManager.CurrenRoom.pai==0 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..card_n) + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + end + if card_n==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..card_n.."_1") + end + card_code_obj:SetScale(0.6, 0.6) + poker_item:AddChild(card_code_obj) + otherpoker_list:AddChild(poker_item) + end) + end + end + end +end + +function M:CreateRankEff() + self.rank_view = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/rank_eff") + self._view:AddChild(self.rank_view) + self.rank_view:Center() + self.rank_view:GetTransition("t0"):Play() +end + +function M:_Effect( type1 ,player) + -- body + + if type1 < 7 and type1 ~= 4 and type1 ~= 5 then + return + end + local eff_code = 0 + if type1 == 10 then + eff_code = 2 + elseif type1 == 11 then + eff_code = 3 + elseif type1 == 4 then + eff_code = 4 + elseif type1 == 12 then + return + elseif type1 == 5 then + eff_code = 5 + else + eff_code = 1 + end + local info = self._player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/eff_"..eff_code) + -- local effect = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/eff2_1") + effect.touchable = false + effect:GetTransition("t0"):Play() + -- effect:SetXY((self._view.width - effect.width) / 2,(self._view.hight - effect.hight) / 2) + if eff_code==3 then + self._view:AddChild(effect) + else + pNode:AddChild(effect) + end + + + if eff_code==1 then + self.eff_feiji = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/eff_feiji") + self._view:AddChild(self.eff_feiji) + self.eff_feiji:Center() + self.eff_feiji:GetTransition("t0"):Play() + end + if eff_code==3 then + effect:Center() + else + if self:GetPos(player.seat)== 1 then + effect.x,effect.y = 0,24 + else + effect.x,effect.y = 24,67 + end + end + + + -- effect:Center() + -- if eff_code ==3 then + -- coroutine.start(function() + -- coroutine.wait(1) + -- effect:Dispose() + -- end) + -- else + coroutine.start(function() + coroutine.wait(1) + if self.eff_feiji~=nil then + self.eff_feiji:Dispose() + end + effect:Dispose() + end) + -- end +end +-- function M:_Effect(type1, player) + -- if type1 < 7 and type1 ~= 4 then return end + -- local eff_code = 0 + -- if type1 == 10 then --顺子 + -- eff_code = 2 + -- elseif type1 == 11 then --炸 + -- eff_code = 3 + -- elseif type1 == 4 then --连对 + -- eff_code = 4 + -- else + -- eff_code = 6 + -- end + -- local info = self._player_card_info[self:GetPos(player.seat)] + -- local pNode = info._mask_liangpai + -- local effect = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/MovieClip" .. eff_code) + + -- effect.touchable = false + + -- --effect:SetXY((self._view.width - effect.width) / 2,(self._view.hight - effect.hight) / 2) + -- pNode:AddChild(effect) + -- if type1 == 10 then --顺子 + -- effect.x, effect.y = -400, -200 + -- elseif type1 == 11 then --炸 + -- effect.x, effect.y = -80, -225 + -- elseif type1 == 4 then --连对 + -- effect.x, effect.y = -400, -200 + -- else + -- effect.x, effect.y = -157, -140 + -- end + -- coroutine.start(function() + -- if type1== 10 or type1== 11 or type1== 4 then + -- -- body + -- coroutine.wait(2) + -- effect:Dispose() + -- else + -- coroutine.wait(1.2) + -- effect:Dispose() + -- end + + -- end) +-- if eff_code ==3 then +-- coroutine.start(function() +-- coroutine.wait(1) +-- effect:Dispose() +-- end) +-- else +-- coroutine.start(function() +-- coroutine.wait(2) +-- effect:Dispose() +-- end) +-- end +-- end + + +function M:UpdateRound(round) + local total_round = self._room.room_config.Times + self._text_round.text = string.format("%d / %d 局", round, total_round) +end + +function M:GetSoundFileName(type, num, isNewBout) + local fileName + if isNewBout then + if type > 6 or type == 4 then + if type == 8 or type == 9 then + type = 7 + end + fileName = tostring(type) + elseif type > 2 then + fileName = string.format("3_%d", num) + else + fileName = string.format("%d_%d", type, num) + end + else + math.randomseed(os.time()) + if type > 2 and type ~= 11 then + local r = math.random(1, 3) + fileName = "dani_" .. r + elseif type == 11 then + fileName = tostring(type) + else + fileName = string.format("%d_%d", type, num) + end + end + return fileName +end + +function M:GetSpringSeats(player_info) + local seat_list = {} + local card_max_length = self._room.room_config.Leaf + 14 + for i = 1, #player_info do + local player = player_info[i] + if #player.cards == card_max_length then + seat_list[#seat_list + 1] = player.seat + end + end + return seat_list +end + +function M:PlayCardEff(card) + if self.cor_card_eff ~= nil then + coroutine.stop(self.cor_card_eff) + end + self.cor_card_eff = nil + local cor_time = 0.1 + self.cor_card_eff = coroutine.start(function() + self._popEvent = false + local eff = self._view:GetChild("poker_eff") + local poker_obj = eff:GetChild("poker") + local poker_back = eff:GetChild("di") + poker_back.visible = false + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/" .. card) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card .. "_2") + local card_code_obj + if DataManager.CurrenRoom.pai==0 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..card) + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card .. "_2") + end + if card_code_obj then + card_code_obj:SetScale(1, 1) + poker_obj:AddChild(card_code_obj) + card_code_obj.visible = true + end + + self.tween = TweenUtils.TweenFloat(0, 2340, cor_time, function(x) + poker_back.rotationY = x + poker_obj.rotationY = -180 + x + local x_1 = x % 360 + if (x_1 > 90 and x_1 < 270) then + poker_obj.visible = true + poker_back.visible = false + else + poker_obj.visible = false + poker_back.visible = true + end + end) + coroutine.wait(1) + self._popEvent = true + end) + +end + +function M:ResetPoker() + -- if self._room.curren_turn_seat == self._room.self_player.seat then + -- self._player_card_info[1]:ResetPoker() + -- end + self._player_card_info[1]:ResetPoker() +end + +function M:PlaySound(sex, path) + + local sex_path = ViewUtil.Sex_Chat[sex]-- 1 男 2 女 + local sound_path = string.format("extend/poker/runfast/sound/%s/%s.mp3", sex_path, path) + ViewUtil.PlaySound("RunFastNew_PK", sound_path) +end + +function M:ChangeBgmMusic(bgm_index) + if bgm_index == nil then + bgm_index = self.bgm_index + else + self.bgm_index = bgm_index + end + ViewUtil.PlayMuisc("RunFastNew_PK", string.format("extend/poker/runfast/sound/bgm%d.mp3", 1)) +end +function M:OnPlayerEnter( ... ) + local arg = {...} + local p = arg[1] + for i=1,#self._room.player_list do + if self._room.self_player.seat==self._room.player_list[i].seat and self._room.self_player.self_user.account_id ~= self._room.player_list[i].self_user.account_id then + -- body + local ErrorMsgTip = UIPackage.CreateObject("Common", "Win_ConnectTip") + local _action = self._view:AddChild(ErrorMsgTip) + _action.xy = Vector2((self._view.width - _action.width) / 4, self._view.height / 4) + local text = _action:GetChild("tex_message") + local btn1 = _action:GetChild("btn_connect") + local btn2 = _action:GetChild("btn_back") + text.text = "您来晚了,座位有人,请重新进牌桌" + btn1.visible=false + btn2:Center() + btn2.y=btn2.y+50 + btn2.onClick:Set(function() + -- body + ErrorMsgTip:Destroy() + ErrorMsgTip = nil + self._gamectr:LevelRoom(function(res) + ViewUtil.CloseModalWait() + NetResetConnectWindow.CloseNetReset() + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + end) + end + end + -- if p ~= self._room.self_player and self._room.room_config.people_num <= 4 and self._room.room_config.people_num >= 3 and self._gamectr:CheckGPS() then + -- if self.distance_view then + -- self.distance_view:Destroy() + -- end + -- self.distance_view = PlayerDistanceView.new(true) + -- self.distance_view:Show() + -- end + -- local info = self._player_info[self:GetPos(p.seat)] + -- info:FillData(p) + -- info._view.visible = true + MainView.OnPlayerEnter(self, ...) +end + +function M:Destroy() + for i = 1, #self._room.player_list do + local player = self._room.player_list[i] + local card_info_i = self._player_card_info[self:GetPos(player.seat)] + + card_info_i:Destroy() + if card_info_i ~= nil and card_info_i.cor_init_poker ~= nil then + coroutine.stop(card_info_i.cor_init_poker) + end + end + PKMainView.Destroy(self) + UIPackage.RemovePackage("extend/poker/runfast/ui/Extend_Poker_RunFastNew") +end + +return M diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_Player.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_Player.lua new file mode 100644 index 00000000..02cf92f3 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_Player.lua @@ -0,0 +1,35 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:42 +--- +local RunFast_Player = { + -- 手牌列表 + hand_count = 0, + out_card_list = {}, + hand_list = {}, + isOneCard= false, -- 报单 +} + +local M = RunFast_Player + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_count = 0 + self.out_card_list = {} + self.hand_list = {} + self.isOneCard = false + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_count = 0 + self.out_card_list = {} + self.hand_list = {} + self.isOneCard = false +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerBackView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerBackView.lua new file mode 100644 index 00000000..0ca91630 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerBackView.lua @@ -0,0 +1,439 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/25 13:52 +--- +local PKPlayBackView = require('main.poker.PKPlayBackView') +local RunFast_PlayerCardInfoView = import('.RunFast_PlayerPokerInfoView') +local RunFast_PlayerSelfCardInfoView = import('.RunFast_PlayerSelfPokerInfoView') +local PlayerInfoView = import('.EXPlayerInfoView') +local RunFast_RightPanelView = import(".RunFast_RightPanelView") +local RunFast_ResultView = import(".RunFast_ResultView") +local M = {} + +local RunFast_Record_Event = { + Evt_OutCard = 'OutCard', + Evt_Pass = 'pass', + Evt_NewRound = 'newindex', + Evt_result = 'result', + Evt_Result = 'Result' +} + +local default_bg = 1 +local bg_config = { + {id = 1, url = 'extend/poker/runfast/bg/bg1', thumb = 'ui://Extend_Poker_RunFastNew/table_bg1'}, + {id = 2, url = 'extend/poker/runfast/bg/bg2', thumb = 'ui://Extend_Poker_RunFastNew/table_bg2'}, + {id = 3, url = 'extend/poker/runfast/bg/bg3', thumb = 'ui://Extend_Poker_RunFastNew/table_bg3'} +} + +--- Create a new +function M.new() + setmetatable(M, {__index = PKPlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = 'RunFast_PlayBackView' + self:init() + + return self +end + +function M:InitView(url) + local room = self._room + if not room.self_player then + room.self_player = room:GetPlayerBySeat(1) + end + self._gamectr = ControllerManager.GetController(GameController) + UIPackage.AddPackage('extend/poker/runfast/ui/Extend_Poker_RunFastNew') + PKPlayBackView.InitView(self, 'ui://Extend_Poker_RunFastNew/RunFast_Main_' .. self._room.room_config.people_num, default_bg, bg_config) + self._tex_round = self._view:GetChild('round') + self._player_card_info = {} + local _player_card_info = self._player_card_info + for i = 1, room.room_config.people_num do + local tem = self._view:GetChild('player_card_info_' .. i) + self._player_card_info[i] = self:NewPlayerPokerInfoView(tem, i) + end + local rightpanel = self._view:GetChild("right_panel") + if self._rightPanelView ~= nil then + self._rightPanelView:Destroy() + end + + self._rightPanelView = RunFast_RightPanelView.new(self, rightpanel) + rightpanel:GetChild("btn_setting").onClick:Clear() + + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild('player_info' .. i) + _player_info[i] = PlayerInfoView.new(tem, self) + end + local list = self._room.player_list + for i=1,#list do + local p = list[i] + local info = _player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + end + if self._room.hpOnOff == 1 and self._room.score_times ~= 1 then + -- body + self._view:GetChild('roominfo_panel1'):GetChild('tex_beishu').text = self._room.score_times .. '倍' + else + self._view:GetChild('roominfo_panel1'):GetChild('tex_beishu').text = '' + end + self._eventmap = {} + self._cmdmap = {} + self._cmdmap[RunFast_Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[RunFast_Record_Event.Evt_Pass] = self.CmdPass + self._cmdmap[RunFast_Record_Event.Evt_NewRound] = self.CmdNewRound + self._cmdmap[RunFast_Record_Event.Evt_result] = self.Cmdresult + self._cmdmap[RunFast_Record_Event.Evt_Result] = self.CmdResult +end + +function M:NewPlayerPokerInfoView(view, index) + if index == 1 then + return RunFast_PlayerSelfCardInfoView.new(view, self) + end + return RunFast_PlayerCardInfoView.new(view, self) +end + +function M:FillRoomData(data) + print("hidezhanji 1111") + self._currentStep = 1 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local roominfo_panel = self._view:GetChild('roominfo_panel1') + + roominfo_panel:GetChild('tex_roomid').text = data.info.roomid + roominfo_panel:GetChild('tex_gametype').text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + local head_info = self._player_info[self:GetPos(p.seat)] + + if p.total_hp then + print("hidezhanji 2222") + + head_info._view:GetChild('zhanji').visible=false + + if room.hpOnOff == 1 or room:checkHpNonnegative() then + head_info._view:GetChild('zhanji').visible=true + head_info._view:GetChild('text_jifen').text = d2ad(p.total_hp) + end + end + head_info:FillData(p) + head_info:UnmarkTuoguan() + head_info:UpdateScore() + if p.seat ~= room.self_player.seat then + card_info:UpdateHandPoker(p.hand_list, false, true) + end + head_info:UpdatePiao(p.piao) + + end + + self:UpdateRound() + + self:GenerateAllStepData(data) + self:ShowStep(1) +end + +function M:ShowStep(index) + local step = self._step[index] + if step==nil then + return + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + + local info = self._player_card_info[self:GetPos(i)] + p.hand_list = step.player_card_data[i].hand_list + p.out_card_list = step.player_card_data[i].out_card_list + p.hand_left_count = #p.hand_list + + if p.seat ~= self._room.self_player.seat then + info:UpdateHandPoker(p.hand_list, false, true) + else + info:InitPoker(p.hand_list, false) + end + + end + + if step.cmd == RunFast_Record_Event.Evt_OutCard then + local seat = step.current_out_seat + local p = self._room:GetPlayerBySeat(seat) + local info = self._player_card_info[self:GetPos(seat)] + local card = step.out_card_list + local card_list = self._gamectr:ChangeCodeByFrom(card, true) + info:SetOutCardInfo(card_list, false) + self:ClearNextSeatOutCard(seat) + end + + if step.cmd == RunFast_Record_Event.Evt_Pass then + local seat = step.current_out_seat + local p = self._room:GetPlayerBySeat(seat) + local info = self._player_card_info[self:GetPos(seat)] + info:SetOutCardInfo(nil, true) + self:ClearNextSeatOutCard(seat) + end + if step.cmd == RunFast_Record_Event.Evt_NewRound then + for i = 1, #self._room.player_list do + local p = self._room:GetPlayerBySeat(i) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:SetOutCardInfo(nil, false) + end + end + if step.cmd == RunFast_Record_Event.Evt_result then + local result = step.result + for i = 1, #result do + local card_info = self._player_card_info[self:GetPos(result[i].seat)] + + if result[i].entrust ~= nil and result[i].entrust == true then + local head_info = self._player_info[self:GetPos(result[i].seat)] + head_info:MarkTuoguan() + end + -- head_info:UpdateScore(result[i].score) + card_info:PlayScore(result[i].score, false, step.win_seat == result[i].seat) + end + end + if step.cmd == RunFast_Record_Event.Evt_Result then + local Result = step.Result + self.result_view = RunFast_ResultView.new(self._root_view, Result.info, self._room.room_id, Result.type, Result.winseat, 0, Result.remaincards) + local num = self._view:GetChildIndex(self._view:GetChild("panel_record")) + self._view:AddChildAt(self.result_view._view, num) + else + if self.result_view then + self.result_view:Dispose() + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = '' + + step.win = 0 + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.hand_list = p.hand_card + u.hand_count = #u.hand_list + u.out_card_list = {} + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + u.card_list = cmd.data.card + data.out_card_list = cmd.data.card_list + for i = 1, #data.out_card_list do + local out_card = data.out_card_list[i] + for j = 1, #u.hand_list do + if u.hand_list[j] == out_card then + list_remove(u.hand_list, out_card) + break + end + end + end +end + +function M:CmdNewRound(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd +end + +function M:CmdPass(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat +end +function M:Cmdresult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result = cmd.data.result + data.win_seat = cmd.seat +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.Result = cmd.data + for i = 1, #data.Result.info do + local p = data.Result.info[i] + p.nick = self._room:GetPlayerBySeat(p.seat).self_user.nick_name + end +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_clone(last_step) + step.player_card_data = {} + local card_data = step.player_card_data + for i = 1, #last_step.player_card_data do + card_data[i] = {} + card_data[i].hand_list = membe_clone(last_step.player_card_data[i].hand_list) + card_data[i].out_card_list = membe_clone(last_step.player_card_data[i].out_card_list) + end + step.Result = nil + self._step[#self._step + 1] = step + return step +end + +function M:ClearNextSeatOutCard(currenOutCardSeat) + local people_num = self._room.room_config.people_num + local next_seat = currenOutCardSeat + 1 + if next_seat > people_num then + next_seat = next_seat - people_num + end + local p = self._room:GetPlayerBySeat(next_seat) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:SetOutCardInfo(nil, false) +end + +function M:UpdateRound() + local round = self._room.curren_round + self._tex_round.text = string.format('第 %d 局', round) +end + +function M:NextRecordPlay() + self._totalRound = tonumber(self._totalRound) + local result = PlayBackView.NextRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + if self.result_view then + self.result_view:Dispose() + self.result_view = nil + end +end + +function M:LastRecordPlay() + local result = PlayBackView.LastRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + if self.result_view then + self.result_view:Dispose() + self.result_view = nil + end +end + +function M:Play() + self:ChangeAlpha() + self:ChangePlayState(not self._play) + if not self._play then + return + end + if (self._currentStep == #self.cmdList and self._playFoward) or (self._currentStep == 0 and not self._playFoward) then + self._currentStep = 0 + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:ChangePlayState(state) + self._play = state + self:ChangeTextSpeed() + local btn_play = self._view:GetChild('panel_record'):GetChild('btn_play') + if self._play then + btn_play:GetController('state').selectedIndex = 1 + else + btn_play:GetController('state').selectedIndex = 0 + end +end + +function M:ChangeTextSpeed() + local str1 = self._play and self._speed or '' + self._view:GetChild('panel_record'):GetChild('tex_speed').text = str1 + local str2 = + not self._play and (self._playFoward and '播放暂停' or '回退暂停') or + self._playFoward and (self._speed == 1 and '播放' or '快进') or + (self._speed == 1 and '回退' or '快退') + self._view:GetChild('panel_record'):GetChild('tex_2').text = str2 + local str3 = self._play and '倍速度' or '' + self._view:GetChild('panel_record'):GetChild('tex_1').text = str3 +end + +function M:CmdLeftArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if not self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = false + self:ChangeTextSpeed() + end +end + +function M:CmdRightArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:OnUpdate() + if self._play then + if (self._currentStep == #self.cmdList + 1 and self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像结尾了,再次点击播放按钮可重新播放') + return + elseif (self._currentStep == 0 and not self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像开头了,再次点击播放按钮可重新播放') + return + end + self._timer = self._timer + Time.deltaTime + if self._timer >= 1 / self._speed then + self._timer = 0 + local step = self._playFoward and 1 or -1 + self._currentStep = self._currentStep + step + if self._currentStep > 0 then + self:ShowStep(self._currentStep) + end + end + end +end + +function M:Destroy() + UpdateBeat:Remove(self.OnUpdate, self) + PlayBackView.Destroy(self) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerPokerInfoView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerPokerInfoView.lua new file mode 100644 index 00000000..ccf35bb4 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerPokerInfoView.lua @@ -0,0 +1,383 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 16:35 +--- +local RunFast_PlayerPokerInfoView = { + _view = nil, + _mainView = nil, + _mask_liangpai = nil, +} + +local M = RunFast_PlayerPokerInfoView + +function M.new( view,mainView ) + local self = {} + setmetatable(self, {__index = M}) + self._view = view + self._mainView = mainView + self:init() + return self +end + + + +function M:init() + local view = self._view + self._gameCtr = ControllerManager.GetController(GameController) + + self.item_data = json.decode(self._view:GetChild("area_mask").text) + self.out_card_data = self.item_data["outcard_list"] + self._mask_liangpai = view:GetChild("mask_liangpai") + self.ctr_outpoker = view:GetController("output") + self.outpoker_list = view:GetChild(self.out_card_data["parent"]) + + self.hand_card_list = view:GetChild("hand_card_list") + + self.ctr_one_card = view:GetController("one_card") + self.eff_one_card = view:GetChild("one_card_eff"):GetTransition("t0") + + self.text_bomb_score = view:GetChild("Score") + self.ani_bomb_score = view:GetTransition("score") + self.ani_result_score = view:GetTransition("score_1") +end + +function M:SetOutCardInfo(cardlist,isPass,isAnim) + self.outpoker_list:RemoveChildren(0,-1,true) + if cardlist == nil then + if isPass == true then + self.ctr_outpoker.selectedIndex = 2 + else + self.ctr_outpoker.selectedIndex = 0 + end + else + if isAnim then + if self.move_cor then + coroutine.stop(self.move_cor) + self.move_cor = nil + end + local time = 0.1 + for i = 1, #cardlist do + local poker_item = UIPackage.CreateObject("Extend_Poker_RunFastNew", "poker7") + local code = self:ChangeCodeByTo(cardlist[i]) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/"..code) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + local card_code_obj + -- if DataManager.CurrenRoom.pai==0 then + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/"..code) + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + -- end + -- if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/"..code.."_1") + -- end + if DataManager.CurrenRoom.pai==0 then + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..code.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..code) + end + + else + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..code.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + end + + end + if card_code_obj == nil then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + --card_code_obj:SetScale(1,1) + poker_item:AddChild(card_code_obj) + --local poker = self:CreatPoker(cardlist[i],0.7) + self.outpoker_list:AddChild(poker_item) + poker_item.xy = Vector2.New(self.out_card_data["start_x"],self.out_card_data["start_y"]) + poker_item:TweenMove(self:GetOutCardEndPokerPos(i,#cardlist,self.outpoker_list,poker_item,self.out_card_data["maxcount_x"],1),time) + --card_code_obj + -- self.tween = TweenUtils.TweenFloat(1,0.7,time,function(x) + -- card_code_obj:SetScale(x,x) + -- end) + card_code_obj:SetScale(0.7,0.7) + end + self.move_cor = coroutine.start(function() + coroutine.wait(0.1) + ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/runfast/sound/chupai.mp3") + end) + else + for i = 1, #cardlist do + local poker_item = UIPackage.CreateObject("Extend_Poker_RunFastNew", "poker7") + local code = self:ChangeCodeByTo(cardlist[i]) + local card_code_obj + if DataManager.CurrenRoom.pai==0 then + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..code.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..code) + end + + else + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..code.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + end + + end + if card_code_obj == nil then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + card_code_obj:SetScale(0.7,0.7) + poker_item:AddChild(card_code_obj) + --local poker = self:CreatPoker(cardlist[i],0.7) + self.outpoker_list:AddChild(poker_item) + poker_item.xy = self:GetOutCardEndPokerPos(i,#cardlist,self.outpoker_list,poker_item,self.out_card_data["maxcount_x"],1) + end + end + --self.ctr_outpoker.selectedIndex = 1 + end +end + +function M:SetOutCardBlack() + for i = 0, self.outpoker_list.numChildren - 1 do + self.outpoker_list:GetChildAt(i):GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(0.7,0.7,0.7) + end +end + +-- 12 -61 --11 58 --10 55 --46 +function M:GetOffSet(cardLength) -- 15 -70 + if cardLength > 8 then + return 52--40 + else + return - cardLength * 5 + 80 + end +end +function M:GetOutCardEndFirstPokerPos(count,parent_com,poker_obj,max_count,scale) + local parent_width,parent_height = parent_com.width,parent_com.height + local poker_width,poker_height = poker_obj.width * scale,poker_obj.height * scale + local offset = self:GetOffSet(count) + local x,y = 0,0 + --local length = (count - 1) * (poker_width + offset) + poker_width + --if length <= parent_width then + -- x = (parent_width - length) / 2 + -- y = (parent_height - poker_height) / 2 + --end + if count <= max_count then + local length = (count - 1) * offset + poker_width + x = (parent_width - length) / 2 + y = ((parent_height - poker_height) / 2) + + end + return Vector2.New(x,y) +end + +function M:GetOutCardEndPokerPos(index,count,parent_com,poker_obj,max_count,scale) + local offset_x,offset_y = self:GetOffSet(count),-50 + local start_pos = self:GetOutCardEndFirstPokerPos(count,parent_com,poker_obj,max_count,scale) + local poker_width,poker_height = poker_obj.width * scale,poker_obj.height * scale + local parent_width,parent_height = parent_com.width,parent_com.height + local pos_x,pos_y = start_pos.x + (index - 1) * offset_x,start_pos.y + if index > max_count then + pos_x = (index - max_count - 1) * offset_x + pos_y = pos_y + poker_height + offset_y + end + return Vector2.New(pos_x,pos_y) +end + +-- function M:PlayCardTypeEff(type1) +-- if type1 < 7 and type1 ~= 4 then return end +-- local eff_code = 0 +-- if type1 == 10 then +-- eff_code = 2 +-- elseif type1 == 11 then +-- eff_code = 3 +-- elseif type1 == 4 then +-- eff_code = 4 +-- else +-- eff_code = 1 +-- end +-- if self.cro_type_eff ~= nil then +-- coroutine.stop(self.cro_type_eff) +-- end +-- self.cro_type_eff = nil +-- self.cro_type_eff = coroutine.start(function() +-- self.type_eff_view = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/eff_"..eff_code) +-- if self.type_eff_view == nil then return end +-- self._view:AddChild(self.type_eff_view) +-- self.type_eff_view:SetXY((self._view.width - self.type_eff_view.width) / 2,self.outpoker_list.y) +-- self.type_eff_view:GetTransition("t0"):Play() +-- coroutine.wait(1.5) +-- if self.type_eff_view ~= nil then +-- self.type_eff_view:Dispose() +-- self.type_eff_view = nil +-- end +-- end) +-- end + +function M:PlayScore(score,isBomb,isWin) + if score == nil then + self.text_bomb_score.alpha = 0 + return + end + if isBomb then + self.text_bomb_score.text = score >= 0 and "+"..score or tostring(score) + self.text_bomb_score.grayed = score < 0 + self.ani_bomb_score:Play() + else + if score < 0 then + self.text_bomb_score.text = tostring(score) + self.text_bomb_score.grayed = true + elseif score > 0 then + self.text_bomb_score.text = "+"..score + self.text_bomb_score.grayed = false + else + local str = isWin and "+" or "-" + self.text_bomb_score.text = str..score + self.text_bomb_score.grayed = not isWin + end + self.ani_result_score:Play() + end +end + + + + +function M:UpdateHandPoker(cardList,isPlayAni,isMing) + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + self.cor_init_poker = nil + self.card_list = {} + self.hand_card_list:RemoveChildren(0,-1,true) + local card_length + local new_card_list + if isMing == true then + new_card_list = self._gameCtr:ChangeCodeByFrom(cardList,true) + card_length = #cardList + else + card_length = cardList + end + if isPlayAni == true then + self.cor_init_poker = coroutine.start(function() + for i = card_length, 1,-1 do + local code = isMing == true and new_card_list[i] or 0 + coroutine.wait(0.01) + local poker = self:CreatPoker1(code,0.4) + self.hand_card_list:AddChild(poker) + end + end) + else + for i = card_length, 1,-1 do + local code = isMing == true and new_card_list[i] or 0 + local poker = self:CreatPoker1(code,0.4) + self.hand_card_list:AddChild(poker) + end + end +end + +function M:SetRemainCardNumber(isPlay) + if isPlay then + self.ctr_one_card.selectedIndex = 1 + self.eff_one_card:Play(-1,0,nil) + else + self.ctr_one_card.selectedIndex = 0 + end + --if self.card_number then + -- self.card_number.visible = show + -- self.card_number.text = string.format("剩余:%d",number) + --end +end + +function M:CreatPoker1(poker,scale,bank) + + local poker_item = UIPackage.CreateObject("Extend_Poker_RunFastNew", "poker"..scale * 10) + local code = self:ChangeCodeByTo(poker) + local card_code_obj + + if DataManager.CurrenRoom.pai==0 then + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..code.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..code) + end + + else + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..code.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + end + + end + if card_code_obj == nil or bank==1 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + + card_code_obj:SetScale(scale,scale) + poker_item:AddChild(card_code_obj) + + return poker_item +end + +function M:CreatPoker(poker,scale,bank) + + local poker_item = UIPackage.CreateObject("Extend_Poker_RunFastNew", "poker"..12.5) + local code = self:ChangeCodeByTo(poker) + local card_code_obj + + if DataManager.CurrenRoom.pai==0 then + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..code.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..code) + end + + else + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..code.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + end + + end + if card_code_obj == nil or bank==1 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + + card_code_obj:SetScale(scale,scale) + poker_item:AddChild(card_code_obj) + + return poker_item +end + +function M:ChangeCodeByTo( card ) + local flower = card % 10 + local number = math.floor(card / 10) + if number == 15 then + number = 2 + end + return flower * 100 + number +end + + +function M:Clear() + self:PlayScore(nil) + self:SetRemainCardNumber(false) + self:SetOutCardInfo(nil,false) + self.hand_card_list:RemoveChildren(0,-1,true) + self._mask_liangpai:RemoveChildren(0,-1,true) +end + +function M:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerSelfPokerInfoView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerSelfPokerInfoView.lua new file mode 100644 index 00000000..7e5e40be --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerSelfPokerInfoView.lua @@ -0,0 +1,1333 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 17:04 +--- +local RunFast_PlayerPokerInfoView = import('.RunFast_PlayerPokerInfoView') +local RunFast_CardType = import('.RunFast_CardType') + +local CardView = { + btn_card = nil, + -- 牌号码 (大小) + card_code_number = 0, + -- 牌号码 (花色) + card_code_flower = 0, + -- 索引 + index = 0 +} + +local function NewCardView(card, cardcodenum, cardcodeflower) + local self = {} + setmetatable(self, {__index = CardView}) + self.btn_card = card + self.card_code_number = cardcodenum + self.card_code_flower = cardcodeflower + self.card_isTouchable = 0 + return self +end + +local function tableSortNumber(a, b) + return a.card_code_number > b.card_code_number +end + +local RunFast_PlayerSelfPokerInfoView = { + _view = nil, + _mainView = nil, + _mask_liangpai = nil +} + +local M = RunFast_PlayerSelfPokerInfoView + +function M.new(view, mainView) + setmetatable(M, {__index = RunFast_PlayerPokerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._mainView = mainView + self.gameCtr = ControllerManager.GetController(GameController) + self:init() + return self +end + +function M:init() + self.Reset = false + self.ctr_outpoker = self._view:GetController('output') + self.outpoker_list = self._view:GetChild('out_card_list') + self.item_data = json.decode(self._view:GetChild('area_mask').text) + self.out_card_data = self.item_data['outcard_list'] + self.hand_card_list = self._view:GetChild('hand_card_list') + self.ctr_hand_card_pos = self._view:GetChild('hand_card_list') + self._mask_liangpai = self._view:GetChild('mask_liangpai') + self.card_width = 129 + self.cards_view = self._view:GetChild('hand_poker_c') + self.card_list = {} + self.out_card_list = {} + self.touchMoveFun = handler(self, self.TouchMoving) + self.ctr_put_card_option = self._view:GetController('out_card_option') + self.ctr_piao = self._view:GetController('piao') + self.ctr_piao_value = self._view:GetController('piao_value') + self.ctr_put_error = self._view:GetController('put_error') + self.put_error_text = self._view:GetChild('put_error') + + self.ctr_select_card_type = self._view:GetController('select_card_type') + self.select_card_type_view = self._view:GetChild('choose_type') + + self.text_bomb_score = self._view:GetChild('Score') + self.ani_bomb_score = self._view:GetTransition('score') + self.ani_result_score = self._view:GetTransition('score_1') + + self.send_card = {} + self.tips_click_count = 0 + self:BtnEvent() +end + +function M:InitPoker(pokerList, isPlayAni, open) + -- self.zhizhanctr_select=0 + -- self.zhizhantype=0 + -- self.zhizhannumber=0 + -- self.zhizhanlength=0 + -- self.zhizhanmustPutMaxCard=0 + -- self.zhizhanplay=0 + -- self.zhizhanzdts=0 + local cs = 1.25 + if DataManager.CurrenRoom.cardsize==0 then + cs = 1.35 + elseif DataManager.CurrenRoom.cardsize == 1 then + cs = 1.25 + elseif DataManager.CurrenRoom.cardsize == 2 then + cs = 1.15 + end + + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + -- print(vardump(self.card_list)) + self.cor_init_poker = nil + self.card_list = {} + + self.cards_view:RemoveChildren(0, -1, true) + if isPlayAni == true then + self.cor_init_poker = + coroutine.start( + function() + self._mainView._popEvent = false + if self._mainView._rightPanelView._settingView ~= nil then + self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(false) + end + table.sort(pokerList) + + for i = 1, #pokerList do + local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) + local card_flower_code = pokerList[i] + local btn_card = self:CreatPoker(card_number_code, cs, open) + local x, y = self._view.width / 2 + 100, -200 + btn_card:SetXY(x, y) + btn_card.alpha = 0 + btn_card.touchable = false + -- coroutine.wait(0.05) + self.cards_view:AddChild(btn_card) + local card_view = NewCardView(btn_card, card_number_code, card_flower_code) + self.card_list[#self.card_list + 1] = card_view + + table.sort(self.card_list, tableSortNumber) + + if i == #pokerList then + for j = 1, #self.card_list do + local card = self.card_list[j] + card.btn_card.touchable = true + if open ~= 1 then + -- body + self:AddCardMoveEvent(card) + end + end + end + end + for j = #self.card_list, 1, -1 do + -- ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/mopai.mp3') + local card_view = self.card_list[j] + card_view.index = j + self.cards_view:SetChildIndex(card_view.btn_card, card_view.index - 1) + + card_view.btn_card:TweenMove(self:GetHandCardPos(j, #self.card_list), 0.10) + DSTween.To( + 0.7, + 1, + 0.1, + function(value) + card_view.btn_card:SetScale(value, value) + end + ) + DSTween.To( + 0.7, + 1, + 0.1, + function(value) + card_view.btn_card.alpha = value + end + ) + card_view.btn_card.alpha = 1 + end + + self._mainView._popEvent = true + if self._mainView._rightPanelView._settingView ~= nil then + self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(true) + end + end + ) + else + + for i = 1, #pokerList do + local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) + local card_flower_code = pokerList[i] + local btn_card = self:CreatPoker(card_number_code, cs, open) + self.cards_view:AddChild(btn_card) + local card_view = NewCardView(btn_card, card_number_code, card_flower_code) + self.card_list[#self.card_list + 1] = card_view + end + table.sort(self.card_list, tableSortNumber) + for i = 1, #self.card_list do + local card = self.card_list[i] + card.index = i + self.cards_view:SetChildIndex(card.btn_card, card.index - 1) + card.btn_card.xy = self:GetHandCardPos(i, #self.card_list) + if open ~= 1 then + -- body + self:AddCardMoveEvent(card) + end + end + end +end + +function M:updatePoker() + + local templist = {} + for i = 1, #self.card_list do + templist[#templist + 1] = self.card_list[i].card_code_flower + end + self:InitPoker(templist, false, 0) +end + +function M:AddCardMoveEvent(card) + local send_card = {} + + card.btn_card.onTouchBegin:Set( + function(context) + self.send_card = {} + if card.btn_card.touchable == false then + return + end + local xy = self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + if xy.y > -21 and xy.y < 221 then + self.touchBegin = xy + Stage.inst.onTouchMove:Add(self.touchMoveFun) + --Stage.inst.onClick:Add(self.touchMoveFun) + card.btn_card.onTouchEnd:Set( + function(context) + local xy = + self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + Stage.inst.onTouchMove:Remove(self.touchMoveFun) + --Stage.inst.onClick:onTouchMove(self.touchMoveFun) + if xy.y > -21 and xy.y < 221 then + if xy.x - self.touchBegin.x > 0 then + local max_x = xy.x + local min_x = self.touchBegin.x + for k = 1, #self.card_list do + local card = self.card_list[k] + + -- for i = 1, #self.card_list do + -- local card = self.card_list[i] + -- if card.btn_card.selected then + -- send_card[#send_card + 1] = card.card_code_flower + -- self.send_card[#self.send_card + 1] = card + -- end + -- end + if card.btn_card.touchable == true then + send_card[#send_card + 1] = card + + self:SetBtnCardColor(card, 1) + if k == #self.card_list then + if + card.btn_card.x + self.card_width > min_x and card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") + end + else + if + card.btn_card.x + + (self.card_width + self:GetHandCardOffset(#self.card_list)) > + min_x and + card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") + end + end + end + end + else + local max_x = self.touchBegin.x + local min_x = xy.x + -- self.send_card = {} + for k = 1, #self.card_list do + local card = self.card_list[k] + + -- for i = 1, #self.card_list do + -- local card = self.card_list[i] + -- if card.btn_card.selected then + -- send_card[#send_card + 1] = card.card_code_flower + -- self.send_card[#self.send_card + 1] = card + -- end + -- end + if card.btn_card.touchable == true then + send_card[#send_card + 1] = card + self:SetBtnCardColor(card, 1) + --print(vardump(card)) + if k == #self.card_list then + if + card.btn_card.x + self.card_width > min_x and card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") + end + else + if + card.btn_card.x + + (self.card_width + self:GetHandCardOffset(#self.card_list)) > + min_x and + card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") + end + end + end + end + end + + ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/click.mp3') + else + self.touchBegin = Vector2.New(0, 0) + for k = 1, #self.card_list do + local card = self.card_list[k] + if card.btn_card.touchable == true then + self:SetBtnCardColor(card, 1) + end + end + end + + Stage.inst:ResetInputState() + card.btn_card.onTouchEnd:Set(nil) + + self:zhizhanxuanpai() + end + ) + else + local button = card.btn_card + button.onChanged:Add( + function() + -- body + if card.btn_card.selected == true then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + else + self:UpdateCardMove(card.btn_card, card.btn_card.selected, false) + end + end + ) + end + end + ) +end +function M:zhizhanxuanpai() --智障选牌 + -- body + local temp_send_card = {} + for i = 1, #self.send_card do + if self.send_card[i] ~= self.send_card[i - 1] then + -- body + temp_send_card[#temp_send_card + 1] = self.send_card[i] + end + end + + local card_map, max_key = self:GetCardMapAndMaxKey(temp_send_card) + + list_type1, touch_type1 = self:CheckPairs(card_map, 0, 8) + + list_type2, touch_type2 = self:CheckPlane(card_map, 0, 6, 0) + list_bomb, touch_bomb = self:CheckBomb(card_map, 0, 4) + + local list_type, touch_type = self:CheckOnes(card_map, 0, 11) + for i = 5, 11 do + local list_temp, touch_temp = self:CheckOnes(card_map, 0, i) + if list_temp[1] ~= nil then + -- body + list_type = list_temp + end + end + local temp_list = list_type[1] + local temp_list1 = list_type1[1] + local temp_list2 = list_type2[1] + local temp_bomb = list_bomb[1] + if self.xunpai == nil then + -- body + self.xunpai = {} + end + + if temp_list ~= nil and temp_list1 == nil and temp_list2 == nil and temp_bomb == nil and #temp_list > #self.xunpai then + for i = 1, #self.send_card do + self:UpdateCardMove(self.send_card[i].btn_card, false, false) + end + for i = 1, #self.send_card do + for j = 1, #temp_list do + if self.send_card[i] == temp_list[j] then + -- body + self:UpdateCardMove(self.send_card[i].btn_card, true, false) + end + end + end + self.xunpai = temp_list + else + self.xunpai = {} + end +end + +function M:TouchMoving(context) + if self.cards_view == nil then + return + end + local send_card1 = {} + local xy = self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + self.isTouching = true + if xy.x - self.touchBegin.x > 0 then -- 往右边滑 + --printlog("cccccccccccccc1111111111111111111111111") + local max_x = xy.x + local min_x = self.touchBegin.x + for i = 1, #self.card_list do + local card = self.card_list[i] + if card.btn_card.touchable == false or card.card_isTouchable == 1 then + else + if + card.btn_card.x + (self.card_width + self:GetHandCardOffset(#self.card_list)) > min_x and + card.btn_card.x < max_x + then + printlog("cccccccccccccc22222222222222") + self:SetBtnCardColor(card, 0.8) + if #send_card1 == 0 then + -- body + send_card1[1] = card + end + for i = 1, #send_card1 do + if send_card1[i] ~= card then + -- body + send_card1[#send_card1 + 1] = card + end + end + else + -- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + -- card.card_isTouchable = 1 + -- ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") + self:SetBtnCardColor(card, 1) + end + end + end + elseif xy.x - self.touchBegin.x < 0 then -- 左边滑 + local max_x = self.touchBegin.x + local min_x = xy.x + for i = 1, #self.card_list do + local card = self.card_list[i] + if card.btn_card.touchable == false or card.card_isTouchable == 1 then + else + if + card.btn_card.x + (self.card_width + self:GetHandCardOffset(#self.card_list)) > min_x and + card.btn_card.x < max_x + then + -- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + -- card.card_isTouchable = 1 + -- ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") + self:SetBtnCardColor(card, 0.8) + if #send_card1 == 0 then + -- body + send_card1[1] = card + end + for i = 1, #send_card1 do + if send_card1[i] ~= card then + -- body + send_card1[#send_card1 + 1] = card + end + end + else + self:SetBtnCardColor(card, 1) + end + end + end + end + --print(vardump(send_card1)) + -- local send_card = {} + -- self.send_card = {} + -- for i = 1, #self.card_list do + -- local card = self.card_list[i] + -- if card.btn_card.selected then + -- send_card[#send_card + 1] = card.card_code_flower + -- self.send_card[#self.send_card + 1] = card + -- end + -- end + self.send_card = send_card1 +end + +function M:SetBtnCardColor(card, num) + if + card.btn_card:GetChildAt(0) ~= nil and card.btn_card:GetChildAt(0):GetChildAt(0) ~= nil and + card.btn_card:GetChildAt(0):GetChildAt(0):GetChildAt(0) ~= nil + then + -- body + card.btn_card:GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(num, num, num) + end + + --if card.card_code_flower < 500 then + -- card.btn_card:GetChildAt(0):GetChildAt(2).color = Color(num,num,num) + -- card.btn_card:GetChildAt(0):GetChildAt(3).color = Color(num,num,num) + --end +end + +function M:ShowPiao(piao) + self.ctr_piao.selectedIndex = piao +end + +function M:HidePiao() + self.ctr_piao.selectedIndex = 0 +end + +function M:ShowOutCardOption(ctr_select, type, number, length, mustPutMaxCard, play, zdts) + --for i = 1, #self.out_card_list do + -- local card = self.out_card_list[i] + -- self.cards_view:RemoveChild(card.btn_card,true) + --end + --self.out_card_list = {} + + -- self.zhizhanctr_select=ctr_select + -- self.zhizhantype=type + -- self.zhizhannumber=number + -- self.zhizhanlength=length + -- self.zhizhanmustPutMaxCard=mustPutMaxCard + -- self.zhizhanplay=play + -- self.zhizhanzdts=zdts + self.tips_click_count = 0 + self.send_card = {} + self.tips_card_list = self:GetCardTips(type, number, length, mustPutMaxCard) + + if #self.tips_card_list >= 1 then + -- body + self:UpdateHandCardsColor() + end + -- + -- 自动提示 + -- if #self.tips_card_list ~= 0 and play~=0 and mustPutMaxCard==false and zdts==1 then + -- local index = self.tips_click_count % #self.tips_card_list + 1 + -- self:ShowTipsCard(index) + -- self.tips_click_count = self.tips_click_count + 1 + -- end + if #self.tips_card_list == 2 and self.tips_card_list[2][1].index == self.tips_card_list[1][1].index then + if #self.tips_card_list[2] == #self.tips_card_list[1] then + for i = 1, #self.tips_card_list[2] do + if self.tips_card_list[2][i].index == self.tips_card_list[1][i].index then + self:ShowTipsCard(1) + end + end + end + elseif #self.tips_card_list == 1 then + self:ShowTipsCard(1) + end + if mustPutMaxCard and play ~= 0 and zdts == 1 then + -- body + self:ShowTipsCard(#self.tips_card_list) + end + self.ctr_put_card_option.selectedIndex = ctr_select +end + +function M:SetOutCardInfo(cardlist, isPass, isAnim) + self.ctr_put_card_option.selectedIndex = 0 + for i = 1, #self.out_card_list do + local card = self.out_card_list[i] + self.cards_view:RemoveChild(card, true) + end + self.out_card_list = {} + if cardlist ~= nil then + -- todo + self:SetOutCardList(cardlist, isAnim) + else + if isPass == true then + self.ctr_outpoker.selectedIndex = 2 + for i = 1, #self.card_list do + local card_view = self.card_list[i] + card_view.btn_card.touchable = true + self:UpdateCardMove(card_view.btn_card, false, false) + self:SetBtnCardColor(card_view, 1) + end + else + self.ctr_outpoker.selectedIndex = 0 + end + end +end + +function M:SetOutCardBlack() + for i = 1, #self.out_card_list do + local card = self.out_card_list[i] + if card and card:GetChildAt(0) and card:GetChildAt(0):GetChildAt(0) and card:GetChildAt(0):GetChildAt(0):GetChildAt(0) then + card:GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(0.7, 0.7, 0.7) + end + + end +end + +function M:SetOutCardList(cardlist, isAnim) + local pos_y = -200 + if isAnim then + -- self.zhizhanctr_select=0 + -- self.zhizhantype=0 + -- self.zhizhannumber=0 + -- self.zhizhanlength=0 + -- self.zhizhanmustPutMaxCard=0 + -- self.zhizhanplay=0 + -- self.zhizhanzdts=0 + if self.move_cor then + coroutine.stop(self.move_cor) + self.move_cor = nil + end + local time = 0.1 + for i = 1, #cardlist do + local card_code_number = cardlist[i] + for j = 1, #self.card_list do + local card = self.card_list[j] + if card_code_number == card.card_code_number then + card.btn_card.onTouchBegin:Set(nil) + self.out_card_list[#self.out_card_list + 1] = card.btn_card + list_remove(self.card_list, card) + -- todo 出牌动画 + local pos = + self:GetOutCardEndPokerPos( + i, + #cardlist, + self.cards_view, + card.btn_card, + self.out_card_data['maxcount_x'], + 0.7 + ) + card.btn_card:TweenMove(Vector2.New(pos.x, pos_y), time) + -- self.tween = TweenUtils.TweenFloat(1, 0.7, time, function(x) + -- card.btn_card:GetChildAt(0):SetScale(x, x) + -- end) + card.btn_card:GetChildAt(0):SetScale(0.7, 0.7) + break + end + end + end + self.move_cor = + coroutine.start( + function() + coroutine.wait(0.05) + for i = 1, #self.out_card_list do + local card = self.out_card_list[i] + self.cards_view:SetChildIndex(card, i - 1) + end + coroutine.wait(0.1) + ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/chupai.mp3') + end + ) + else + for i = 1, #cardlist do + local poker_item = UIPackage.CreateObject('Extend_Poker_RunFastNew', 'poker7') + local code = self:ChangeCodeByTo(cardlist[i]) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/" .. code) + local card_code_obj + -- if DataManager.CurrenRoom.pai==0 then + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/"..code) + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + -- end + -- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/" .. code .. "_1") + -- end + if DataManager.CurrenRoom.pai == 0 then + if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_RunFastNew/' .. code .. '_1') + else + card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_RunFastNew/' .. code) + end + else + if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_RunFastNew/' .. code .. '_2') + else + card_code_obj = UIPackage.CreateObjectFromURL('ui://Main_Poker/' .. code .. '_2') + end + end + if card_code_obj == nil then + card_code_obj = UIPackage.CreateObjectFromURL('ui://Main_Poker/00') + end + card_code_obj:SetScale(0.7, 0.7) + poker_item:AddChild(card_code_obj) + --local poker = self:CreatPoker(cardlist[i],0.7) + self.cards_view:AddChild(poker_item) + local pos = + self:GetOutCardEndPokerPos( + i, + #cardlist, + self.cards_view, + poker_item, + self.out_card_data['maxcount_x'], + 1 + ) + poker_item.xy = Vector2.New(pos.x, pos_y) + self.out_card_list[#self.out_card_list + 1] = poker_item + end + end +end + +function M:DeleteHandCards(cardlist) + for i = 1, #cardlist do + local card_code_number = cardlist[i] + for j = 1, #self.card_list do + local card = self.card_list[j] + if card_code_number == card.card_code_number then + --self.out_card_list[#self.out_card_list + 1] = card + list_remove(self.card_list, card) + -- todo 出牌动画 + self.cards_view:RemoveChild(card.btn_card, true) + break + end + end + end + self:UpdateHandCardsPos() +end + +function M:UpdateHandCardsPos() + for i = 1, #self.card_list do + local card_view = self.card_list[i] + card_view.index = i + card_view.btn_card.touchable = true + self.cards_view:SetChildIndex(card_view.btn_card, card_view.index - 1) + --card_view.btn_card.xy = self:GetHandCardPos(i, #self.card_list) + card_view.btn_card:TweenMove(self:GetHandCardPos(i, #self.card_list), 0.1) + self:UpdateCardMove(card_view.btn_card, false, false) + self:SetBtnCardColor(card_view, 1) + end +end + +function M:ResetPoker() + self.Reset = true + for i = 1, #self.card_list do + local card_view = self.card_list[i] + self:UpdateCardMove(card_view.btn_card, false, false) + end + self.send_card = {} + self.Reset = false +end + +function M:UpdateCardMove(btn_card, isSelected, isPlay) + btn_card.selected = isSelected + local card_Move = btn_card:GetChildAt(0) + local xy = isSelected == true and Vector2.New(0, -30) or Vector2.New(0, 0) + if isPlay then + -- body + card_Move:TweenMove(xy, 0) + else + card_Move:TweenMove(xy, 0) + end +end + +-- +function M:UpdateHandCardsColor() + for i = 1, #self.card_list do + local card_view = self.card_list[i] + local num = card_view.btn_card.touchable == true and 1 or 0.6 + self:SetBtnCardColor(card_view, num) + end +end + +function M:BtnEvent() + self.btn_not_put = self._view:GetChild('btn_not_put') + self.btn_tips = self._view:GetChild('btn_tips') + self.btn_put = self._view:GetChild('btn_put') + + self.btn_put.onClick:Set( + function() + if self.Reset then + return + end + local send_card = {} + self.send_card = {} + local currentCard={} + for i = 1, #self.card_list do + local card = self.card_list[i] + table.insert(currentCard,card.card_code_flower) + if card.btn_card.selected then + send_card[#send_card + 1] = card.card_code_flower + self.send_card[#self.send_card + 1] = card + end + end + + if #send_card == 0 then + self:ErrorTip('请选择要出的牌 ') + else + self.gameCtr:SendCard(send_card,currentCard) + end + end + ) + self.btn_tips.onClick:Set( + function() + --printlog("wwwwwwwwwww111111111111111111111111") + --pt(self.tips_card_list) + if self.tips_card_list ~= nil and #self.tips_card_list ~= 0 then + local index = self.tips_click_count % #self.tips_card_list + 1 + self:ShowTipsCard(index) + self.tips_click_count = self.tips_click_count + 1 + end + end + ) + -- 过 + self.btn_not_put.onClick:Set( + function() + self.gameCtr:SendPass() + end + ) + + local function click_piao() + self.ctr_piao.selectedIndex = 0 + self.gameCtr:SendPiao(tonumber(self.ctr_piao_value.selectedPage)) + end + + local btn_piao0 = self._view:GetChild('piao0') + btn_piao0.onClick:Set(click_piao) + + local btn_piao1 = self._view:GetChild('piao1') + btn_piao1.onClick:Set(click_piao) + + local btn_piao2 = self._view:GetChild('piao2') + btn_piao2.onClick:Set(click_piao) + + local btn_piao3 = self._view:GetChild('piao3') + btn_piao3.onClick:Set(click_piao) + + local btn_piao5 = self._view:GetChild('piao5') + btn_piao5.onClick:Set(click_piao) + + local btn_piao8 = self._view:GetChild('piao8') + btn_piao8.onClick:Set(click_piao) +end + +function M:ShowTipsCard(index) + local item = self.tips_card_list[index] + for i = 1, #self.card_list do + local card = self.card_list[i] + local isExsit = false + for j = 1, #item do + if item[j] == self.card_list[i] then + self:UpdateCardMove(card.btn_card, true, false) + isExsit = true + end + end + if isExsit == false then + self:UpdateCardMove(card.btn_card, false, false) + end + end +end + +function M:GetHandCardOffset(count) + local start = -70---54 + + local offset = 0 + if count > 10 then + offset = start - count + 18 + else + offset = -50 + end + return offset +end + +function M:GetHandCardPos(index, card_count) + local x, y = 0, -18 + local offset = self:GetHandCardOffset(card_count) + local middle_x = self.cards_view.width / 2 + local start_x = middle_x - (card_count / 2 * (self.card_width + offset)) + (offset / 2) + x = start_x + (self.card_width + offset) * (index - 1) + return Vector2.New(x, y) +end +function M:GetHandCardPos1(index, card_count) + local x, y = 0, -18 + local offset = self:GetHandCardOffset(card_count) + local middle_x = self.cards_view.width / 2 + local start_x = middle_x - (card_count / 2 * (self.card_width + offset)) + (offset / 2) + x = start_x + (self.card_width + offset) * (index - 1) + return x, y +end +function M:ChangeOneCodeByFrom(card) + local flower = math.floor(card / 100) + local number = card % 100 + if number == 2 then + number = 15 + end + return number * 10 + flower +end + +function M:ErrorTip(error_text) + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + self.cor_init_poker = nil + self.cor_init_poker = + coroutine.start( + function() + self.put_error_text.text = error_text + self.ctr_put_error.selectedIndex = 1 + coroutine.wait(2) + self.ctr_put_error.selectedIndex = 0 + end + ) +end + +--RunFast_CardType +--None = 0, +--OneCard = 1, +--OnePair = 2, +--Three = 3, +--Pairs = 4, +--ThreeAndTwo = 5, +--ThreeAndOne = 6, +--Plane = 7, +--PlaneAndTwo = 8, +--PlaneAndOne = 9, +--Straight = 10, +--Bomb = 11 +function M:GetCardTips(type, number, length, mustPutMaxCard, tip_templist) + local tip_list = {} + local sidaisan = false + local touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + --printlog("aaaaaaaaaaaaacccccccccccccccccccc11111111111111111111111111111") + --pt(self.card_list) + local card_map, max_key = self:GetCardMapAndMaxKey(self.card_list) + --printlog("aaaaaaaaaaaaaaaaaa222222222222222222222222222222222222222 ",max_key) + --pt(card_map) + if type == RunFast_CardType.None then + if DataManager.CurrenRoom.is_new_bout then + tip_list = self:NewBoutTips(card_map) + end + return tip_list, touch_key_list + elseif type == RunFast_CardType.Bomb then + tip_list, touch_key_list = self:CheckBomb(card_map, number, length) + else + local list_type, list_bomb = {}, {} + local touch_type, touch_bomb + list_bomb, touch_bomb = self:CheckBomb(card_map, 0, 4) + + local card_templist = membe_clone(self.card_list) + + if list_bomb ~= nil and tip_templist == nil then + -- body + for i = 1, #list_bomb do + local templist_bomb = list_bomb[i] + for j = 1, #templist_bomb do + for k = 1, #card_templist do + if templist_bomb[j] == card_templist[k] then + -- body + list_remove(card_templist, card_templist[k]) + end + end + end + end + card_map, max_key = self:GetCardMapAndMaxKey(card_templist) + end + + if type == RunFast_CardType.OneCard then + -- if mustPutMaxCard then + -- number = max_key - 1 + -- self:ErrorTip("下家报单,请出最大的牌 ") + -- end + list_type, touch_type = self:CheckOneCard(card_map, number, length) + elseif type == RunFast_CardType.OnePair then + list_type, touch_type = self:CheckOnePair(card_map, number, length) + elseif type == RunFast_CardType.Three then + list_type, touch_type = self:CheckThree(card_map, number, length) + elseif type == RunFast_CardType.Pairs then + list_type, touch_type = self:CheckPairs(card_map, number, length) + elseif type == RunFast_CardType.ThreeAndTwo then + list_type, touch_type = self:CheckThreeAndTwo(card_map, number, length) + elseif type == RunFast_CardType.ThreeAndOne then + list_type, touch_type = self:CheckThreeAndOne(card_map, number, length) + elseif type == RunFast_CardType.Plane then + list_type, touch_type = self:CheckPlane(card_map, number, length, 0) + elseif type == RunFast_CardType.PlaneAndTwo then + list_type, touch_type = self:CheckPlane(card_map, number, length, 2) + elseif type == RunFast_CardType.PlaneAndOne then + list_type, touch_type = self:CheckPlane(card_map, number, length, 1) + elseif type == RunFast_CardType.Straight then + list_type, touch_type = self:CheckStraight(card_map, number, length) + elseif type == RunFast_CardType.FourAndtThree then + list_type, touch_type = self:CheckBomb(card_map, 0, 4) + if #list_type > 0 then + -- body + sidaisan = true + end + end + card_map, max_key = self:GetCardMapAndMaxKey(self.card_list) + tip_list = self:GetMergeAllList(list_type, list_bomb) + --list_bomb, touch_bomb = self:CheckBomb(card_map, 0, 4) + touch_key_list = self:GetMergeAllList(touch_type, touch_bomb) + local tip_templist2 = {} + if tip_templist == nil then + -- body + tip_templist2 = self:GetCardTips(type, number, length, mustPutMaxCard, tip_list) + end + if #tip_templist2 > 0 then + -- body + tip_list = self:GetMergeAllList(tip_list, tip_templist2) + end + end + + if (tip_templist ~= nil and sidaisan == false and #tip_templist >= 1) then + -- body + self:SetNotTouchCard(touch_key_list, card_map) + end + + return tip_list +end + +-- 合并多个list +function M:GetMergeAllList(...) + local lists = {...} + local merge_list = {} + for i = 1, #lists do + local list_item = lists[i] + for j = 1, #list_item do + merge_list[#merge_list + 1] = list_item[j] + end + end + + return merge_list +end + +function M:NewBoutTips(pokerMap) + local new_bout_list = {} + for k, v in pairs(pokerMap) do + new_bout_list[#new_bout_list + 1] = v + end + return new_bout_list +end + +function M:CheckOneCard(pokerMap, num, length) + local one_card_list = {} + local touch_key_list = {} + if #self.card_list < length then + return one_card_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if k > num and #v == 1 then + one_card_list[#one_card_list + 1] = {v[1]} + touch_key_list[#touch_key_list + 1] = k + end + end + for k, v in pairs(pokerMap) do + if k > num and #v ~= 1 then + one_card_list[#one_card_list + 1] = {v[1]} + touch_key_list[#touch_key_list + 1] = k + end + end + return one_card_list, touch_key_list +end + +function M:CheckOnePair(pokerMap, num, length) + local one_pair_list = {} + local touch_key_list = {} + if #self.card_list < length then + return one_pair_list, touch_key_list + end + for k, v in pairs(pokerMap) do -- 从三条和对子里面提取 + if #v > 1 and k > num then + one_pair_list[#one_pair_list + 1] = {v[1], v[2]} + touch_key_list[#touch_key_list + 1] = k + end + end + return one_pair_list, touch_key_list +end + +function M:CheckThree(pokerMap, num, length) + local three_list = {} + local touch_key_list = {} + if #self.card_list < length then + return three_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if #v > 2 and k > num then + three_list[#three_list + 1] = {v[1], v[2], v[3]} + touch_key_list[#touch_key_list + 1] = k + end + end + return three_list, touch_key_list +end + +function M:CheckPairs(pokerMap, num, length) + local pairs_list = {} + local touch_key_list = {} + if #self.card_list < length then + return pairs_list, touch_key_list + end + local pair_length = length / 2 + local number_start = num - pair_length + 2 + local number_end = 15 - pair_length + for i = number_start, number_end do + local item_all_list = {} + for j = i, i + pair_length - 1 do + local item_list = pokerMap[j] + if item_list == nil then + break + elseif #item_list < 2 then + break + else + item_all_list[#item_all_list + 1] = item_list[1] + item_all_list[#item_all_list + 1] = item_list[2] + end + if j == i + pair_length - 1 then + pairs_list[#pairs_list + 1] = item_all_list + for k = i, i + pair_length - 1 do + touch_key_list[#touch_key_list + 1] = k + end + end + end + end + return pairs_list, touch_key_list +end + +function M:CheckThreeAndOne(pokerMap, num, length) + local three_and_one_list = {} + local touch_key_list = {} + if #self.card_list < length then + return three_and_one_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if #v >= 3 and k > num then + three_and_one_list[#three_and_one_list + 1] = {v[1], v[2], v[3]} + touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + end + end + return three_and_one_list, touch_key_list +end + +function M:CheckThreeAndTwo(pokerMap, num, length) + local three_and_two_list = {} + local touch_key_list = {} + if #self.card_list < length then + return three_and_two_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if #v >= 3 and k > num then + three_and_two_list[#three_and_two_list + 1] = {v[1], v[2], v[3]} + touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + end + end + return three_and_two_list, touch_key_list +end + +function M:CheckStraight(pokerMap, num, length) + local straight_list = {} + local touch_key_list = {} + if #self.card_list < length then + return straight_list, touch_key_list + end + local number_start = num - length + 2 + local number_end = 15 - length + for i = number_start, number_end do + local item_all_list = {} + for j = i, i + length - 1 do + local item_list = pokerMap[j] + if item_list == nil then + break + else + item_all_list[#item_all_list + 1] = item_list[1] + end + if j == i + length - 1 then + straight_list[#straight_list + 1] = item_all_list + for k = i, i + length - 1 do + touch_key_list[#touch_key_list + 1] = k + end + end + end + end + return straight_list, touch_key_list +end + +function M:CheckBomb(pokerMap, num, length) + local bomb_list = {} + local touch_key_list = {} + local threeA = DataManager.CurrenRoom.room_config.threeA + if threeA == 0 then + -- body + if #self.card_list < length then + return bomb_list, touch_key_list + end + else + if #self.card_list < 3 then + return bomb_list, touch_key_list + end + end + + for k, v in pairs(pokerMap) do + if #v == 4 and k > num then + bomb_list[#bomb_list + 1] = v + touch_key_list[#touch_key_list + 1] = k + end + if threeA == 1 and #v == 3 and k == 14 then + bomb_list[#bomb_list + 1] = v + touch_key_list[#touch_key_list + 1] = k + end + end + + return bomb_list, touch_key_list +end + +function M:CheckPlane(pokerMap, num, length, and_num) + local plane_list = {} + local touch_key_list = {} + local l = and_num + 3 + local pair_length = length / l + local number_start = num - pair_length + 2 + local number_end = 15 - pair_length + for i = number_start, number_end do + local item_all_list = {} + for j = i, i + pair_length - 1 do + local item_list = pokerMap[j] + if item_list == nil then + break + elseif #item_list < 3 then + break + else + item_all_list[#item_all_list + 1] = item_list[1] + item_all_list[#item_all_list + 1] = item_list[2] + item_all_list[#item_all_list + 1] = item_list[3] + end + if j == i + pair_length - 1 then + plane_list[#plane_list + 1] = item_all_list + touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + end + end + end + return plane_list, touch_key_list +end + +function M:SetNotTouchCard(touch_key_list, card_map) + local all_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + for i = 1, #all_key_list do + local key = all_key_list[i] + local isExsit = self:IsExistByList(touch_key_list, key) + if isExsit == false then + local key_card_item = card_map[key] + if key_card_item ~= nil then + for j = 1, #key_card_item do + local card = key_card_item[j] + card.btn_card.touchable = false + self:UpdateCardMove(card.btn_card, false, false) + end + end + end + end +end + +function M:IsExistByList(list, item) + for i = 1, #list do + if list[i] == item then + return true + end + end + return false +end + +function M:GetCardByNumber(list, number) + for i = 1, #list do + if list[i].card_code_number == number then + return list[i] + end + end + return nil +end + +function M:GetCardMapAndMaxKey(pokerList) + local map, max_key = {}, 0 + for i = 1, #pokerList do + local number = math.floor(pokerList[i].card_code_number / 10) + if number > max_key then + max_key = number + end + if map[number] == nil then + map[number] = {pokerList[i]} + else + map[number][#map[number] + 1] = pokerList[i] + end + end + return map, max_key +end +function M:CheckOnes(pokerMap, num, length) + local one_card_list = {} + local touch_key_list = {} + local text = {} + local text2 = {} + local x = 0 + if #self.card_list < length then + return one_card_list, touch_key_list + end + for k, v in pairs(pokerMap) do + text = {} + text2 = {} + if k > num then + for l, p in pairs(pokerMap) do + for i = 0, length - 1 do + if l == k + i and l ~= 15 and l ~= 16 then + -- body + text[#text + 1] = {p[1]} + text2[#text2 + 1] = l + if #text >= length then + -- body + local x = #one_card_list + local y = #touch_key_list + for i = 1, #text - 1 do + one_card_list[x + 1] = text[1] + touch_key_list[y + 1] = text2[2] + -- for i, v in pairs(text2[i + 1]) do + -- if v ~= nil then + -- table.insert(touch_key_list[x + 1], v) + -- end + -- end + for i, v in pairs(text[i + 1]) do + if v ~= nil then + table.insert(one_card_list[x + 1], v) + end + end + end + end + end + end + end + end + end + return one_card_list, touch_key_list, length +end +function M:Clear() + self:PlayScore(nil) + self:SetOutCardInfo(nil, false) + self.card_list = {} + self.out_card_list = {} + self.cards_view:RemoveChildren(0, -1, true) + -- self.mask_liangpai:RemoveChildren(0,-1,true) +end + +function M:ClearCheck() + self.card_list = {} + self.out_card_list = {} + self.cards_view:RemoveChildren(0, -1, true) +end + +function M:Destroy() + Stage.inst.onTouchMove:Remove(self.touchMoveFun) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_Protocol.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_Protocol.lua new file mode 100644 index 00000000..6fcf50a9 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_Protocol.lua @@ -0,0 +1,43 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:51 +--- +local RunFast_Protocol = { + RunFast_ConfirmToNextGame = "1003", + + RunFast_Send_Card = "1013", + + RunFast_Send_Guo = "1014", + + RunFast_Send_Piao = "1015", + + RunFast_Ming_Card = "2117", + + RunFast_Init_Card = "2011", + + RunFast_Options = "2004", + + RunFast_Index_Move = "2016", + + RunFast_Play_Succ = "2021", + + RunFast_Pass_Succ = "2030", + + RunFast_Put_Error = "2111", + + RunFast_Bomb_Score = "2118", + + RunFast_Result = "2007", + RunFast_Piao_Tip = "2031", + RunFast_Piao_Action = "2032", + + RunFast_ConfirmToNextGameSucc = "2010", + PT_GAMETUOGUAN = "2029",--托管 + SEND_TUOGUAN = "1018",--托管 + GAME_XIPAI = "20836", + GAME_EVENT_XIPAI = "20837", + GAME_EVENT_NOTIFY_XIPAI = "20838", + GAME_EVT_CARDINHAND = "202022", +} + +return RunFast_Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_ResultView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_ResultView.lua new file mode 100644 index 00000000..26c3c7f5 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_ResultView.lua @@ -0,0 +1,335 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 11:05 +--- +require("Game.View.ResultView") + +local RunFast_ResultView = {} + +local M = RunFast_ResultView + +function RunFast_ResultView.new(blur_view, data, roomid, over, win_seat, dissolve, remaincards) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + + self.class = "RunFast_ResultView" + self._currenIndex = 0 + self._close_zone = false + --self._blur_view = blur_view + self._gamectr = ControllerManager.GetController(GameController) + self:init("ui://Extend_Poker_RunFastNew/clearing", data, roomid, over, win_seat, dissolve, remaincards) + + return self +end + +function M:init(url, data, roomid, over, win_seat, dissolve, remaincards) + + ResultView.init(self, url,true) + self.xiPaiCtr=self._view:GetController("xipai") + + + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig and round>1 then + self.xiPaiCtr.selectedIndex=1 + else + self.xiPaiCtr.selectedIndex=0 + end + + + --self:InitData(data,roomid) + --self:InitData(data,roomid) + printlog("aaaaaaaaaaaaaaaa1111111111111111111111111222222222222222 ",dissolve) + pt(data) + if dissolve == 1 then + -- body + self.xiPaiCtr.selectedIndex=0 + self:InitData(data, win_seat, roomid) + else + local xipai=self._view:GetChild("btn_xipai") + xipai.touchable=true + xipai.onClick:Add(function() + local xiPaiCallBack=function () + xipai.touchable=false + self.xiPaiCtr.selectedIndex=0 + ViewUtil.ErrorTip(1000000,"申请洗牌成功") + end + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendXiPaiAction(xiPaiCallBack) + end) + if DataManager.CurrenRoom.xipaiScore then + --xipai.text="洗牌 积分x"..DataManager.CurrenRoom.xipaiScore + else + --xipai.text="洗牌 积分x0" + end + + self:InitData_One(data, win_seat, over, roomid, remaincards) + end + +end + +function M:ChangeCodeByTo( card ) + local flower = card % 10 + local number = math.floor(card / 10) + if number == 15 then + number = 2 + end + return flower * 100 + number +end + +-- 小结算 +function M:InitData_One(data, winseat, over, roomid, remaincards) + + local room = DataManager.CurrenRoom + self._view:GetController("sdk").selectedIndex = 1 + local _gamectr = ControllerManager.GetController(GameController) + local list_view = self._view:GetChild("player_list_1") + list_view:RemoveChildrenToPool() + + local leftCardAll = self._view:GetChild("leftCardHand") + leftCardAll:RemoveChildrenToPool() + + if remaincards and #remaincards>0 then + table.sort(remaincards,function (a,b) + return a % 100 < b % 100 + + end) + for i=1,#remaincards do + local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..remaincards[i]) + leftCardAll:AddChild(card_code_obj) + end + end + + + for i = 1, #data do + local player = data[i] + local item = list_view:AddItemFromPool("ui://Extend_Poker_RunFastNew/clearing_item_1") + + + local leftCard = item:GetChild("leftCard") + leftCard:RemoveChildrenToPool() + -- table.sort(data[i].handCards,function (a,b) + + -- return a % 100 < b % 100 + -- end) + + for j=1,#data[i].handCards do + local code = data[i].handCards[j] + local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..code) + leftCard:AddChild(card_code_obj) + end + + -- table.sort(data[i].outCards,function (a,b) + -- return a % 100 < b % 100 + -- end) + + + + for k=1,#data[i].outCards do + local code = data[i].outCards[k] + local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/"..code) + leftCard:AddChild(card_code_obj) + card_code_obj:GetChildAt(0):GetChildAt(0).color = Color(0.7,0.7,0.7) + end + + + + local boom = item:GetChild("boom") + boom.text = player.thisboomnum + + local piao = item:GetChild("piao") + if player.piao <= 0 then + piao.text = "0" + else + piao.text = "" .. player.piao + end + + local nichen = item:GetChild("nichen") + + if player.nick ~= nil then + -- body + nichen.text = tostring(player.nick) + else + + nichen.text = tostring(player.self_user.nick_name) + end + + + local shengpai = item:GetChild("shengpai") + if player.cards ~= nil then + -- body + shengpai.text = tostring(#player.cards) + else + shengpai.text = tostring(#player.hand_list) + end + + local rt = 1 + if room.hpOnOff == 1 then + rt = room.score_times + end + + local hp_nonnegative = room:checkHpNonnegative() + local roundScore = player.winscore + if hp_nonnegative then + + local jifen = "" + if roundScore > 0 then + jifen = "+" .. roundScore + else + jifen = "" .. roundScore + end + + local tili = "" + local limit = "" + if player.hp_info.round_actual_hp > 0 then + tili = "(+" .. d2ad(player.hp_info.round_actual_hp) .. ")" + if player.hp_info.upper_limit then + limit = "达到上限" + end + else + tili = "(" .. d2ad(player.hp_info.round_actual_hp) .. ")" + if player.hp_info.upper_limit then + limit = "达到下限" + end + end + + item:GetChild("score").text = jifen .. tili .. limit + else + + local jifen = "" + if roundScore >= 0 then + jifen = "+" .. roundScore + else + jifen = "" .. roundScore + end + jifen = jifen .. " " + + local tili = "" + if room.hpOnOff > 0 then + + local need = roundScore * rt + tili = "(" + if roundScore > 0 then + tili = tili .. "+" .. tostring(need) + else + tili = tili .. tostring(need) + end + + tili = tili .. ")" + end + + + item:GetChild("score").text = jifen .. tili + end + + if roundScore >= 0 then + + if room.self_player.seat == player.seat then + -- body + self._view:GetController("result").selectedIndex = 1 + end + else + + if room.self_player.seat == player.seat then + self._view:GetController("result").selectedIndex = 0 + end + end + + end + + + if over == 0 then + -- body + local btn_confirm = self._view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + self:Destroy() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:ConformToNextGame() + + end) + else + self.xiPaiCtr.selectedIndex=0 + local btn_confirm = self._view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + --self:Destroy() + self:InitData(data, winseat, roomid) + -- ViewManager.ChangeView(ViewManager.View_Lobby) + end) + + end +end + +-- 大结算 +function M:InitData(data, winseat, roomid) + self.xiPaiCtr.selectedIndex=0 + self._view:GetController("sdk").selectedIndex = 0 + + local room = DataManager.CurrenRoom + + local rt = 1 + if room.hpOnOff == 1 and room.score_times ~= 1 then + rt = room.score_times + end + + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + + local user = room:GetPlayerBySeat(data[i].seat).self_user + + player_list[i].id = user.account_id + + player_list[i].score = data[i].score + player_list[i].hp_info = data[i].hp_info + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].seat = data[i].seat + player_list[i].head_url = data[i].self_user.head_url + + if data[i].entrust ~= nil then + player_list[i].entrust = data[i].entrust > 0 + else + player_list[i].entrust = false + end + + player_list[i].param = {} + + player_list[i].param[1] = {} + player_list[i].param[1].key = "赢局数:" + player_list[i].param[1].value = tostring(data[i].settle_log.winnum) + + player_list[i].param[2] = {} + player_list[i].param[2].key = "打出炸弹数:" + player_list[i].param[2].value = tostring(data[i].settle_log.boomnum) + + player_list[i].param[3] = {} + player_list[i].param[3].key = "春天次数:" + player_list[i].param[3].value = tostring(data[i].settle_log.springnum) + + player_list[i].param[4] = {} + player_list[i].param[4].key = "当局最高分:" + player_list[i].param[4].value = tostring(data[i].settle_log.maxscore * rt) + + if data[i].daniao > 0 then + player_list[i].flag = {"打鸟"} + end + end + + self:GenerateRoomResultInfo(room.room_config.Times, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + self:InitBigResult(room) + local big_result = self._view:GetChild("big_result") + local lst_p = big_result:GetChild("player_list") + -- local list_param = com_p:GetChild("list_param") + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + end + +end + +return M diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_RightPanelView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_RightPanelView.lua new file mode 100644 index 00000000..6a842d42 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_RightPanelView.lua @@ -0,0 +1,88 @@ +local MainRightPanelView = require("Game.View.MainRightPanelView") +local RunFast_RightPanelView = {} +local M = RunFast_RightPanelView +local function __init(self,mainView,view) + local right_panel = view + + local btn_setting = right_panel:GetChild("btn_setting") + btn_setting.onClick:Set(function() + local _settingView = mainView:NewSettingView() + _settingView.stateIndex = (mainView._room.curren_round >= 1 and mainView._allow_dissmiss) and 2 or 1 + _settingView.cd_time = mainView.dismiss_room_cd_time + _settingView:Show() + + local room = DataManager.CurrenRoom + _settingView.onCallback:Add(function(context) + local _gamectr = ControllerManager.GetController(GameController) + if (room.CurnrenState == StateType.Ready) then + _gamectr:LevelRoom(function(response) + if (response.ReturnCode == 0) then + ViewManager.ChangeView(ViewManager.View_Lobby) + GameApplication.Instance:ShowTips("房间已解散!") + end + end) + else + print("mainView.dismiss_room_cd_time"..mainView.dismiss_room_cd_time) + if mainView.dismiss_room_cd_time > 0 then + GameApplication.Instance:ShowTips("您还处于解散冷却时间当中,请稍后重试!") + else + _gamectr:AskDismissRoom() + end + end + end) + end) + + self._tex_data = right_panel:GetChild("tex_data") + self._tex_time = right_panel:GetChild("tex_time") + self._pb_batteryLevel = right_panel:GetChild("pb_batteryLevel") + self._xinhao = right_panel:GetController("xinhao") + self.ctr_xh = right_panel:GetChild("gcm_xinhao"):GetController("c1") + self.ctr_wifi = right_panel:GetChild("gcm_wifi"):GetController("c1") + self._tex_ping = right_panel:GetChild("gcm_xinhao"):GetChild("n7") + + self.ctr_log = right_panel:GetController("log") + local btn_log = right_panel:GetChild("btn_log") + btn_log.onClick:Set(function() + if self.onLogCallback then + self.onLogCallback() + end + end) + + self._total_time = 0 + self:__UpdateTime() + + -- self._timer = Timer.New(handler(self,self.__UpdateTime),10,-1,true) + -- self._timer:Start() +end +function RunFast_RightPanelView.new(mainView,view) + setmetatable(M, {__index = MainRightPanelView}) + local self = setmetatable({}, {__index = M}) + self.class = "RunFast_RightPanelView" + __init(self,mainView,view) + return self +end +function M:__UpdateTime() + self._tex_data.text = os.date("%Y-%m-%d") + self._tex_time.text = os.date("%H:%M") + if Application.platform == RuntimePlatform.IPhonePlayer or Application.platform == RuntimePlatform.Android then + self._pb_batteryLevel.value = GameApplication.Instance:GetBatteryLevel() + end + + local NetworkReachability = UnityEngine.NetworkReachability + local _client = ControllerManager.GameNetClinet + if not _client then return end + local ping = _client:getAveragePingTime() + if not ping then return end + ping = math.floor(ping / 2) + if ping > 300 then ping =300 end + if ping <= 100 then + self.ctr_xh.selectedIndex = 0 + elseif ping <= 300 then + self.ctr_xh.selectedIndex = 1 + else + self.ctr_xh.selectedIndex = 2 + end + self._tex_ping.text = ping .. "ms" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_Room.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_Room.lua new file mode 100644 index 00000000..d5a9a1f7 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_Room.lua @@ -0,0 +1,26 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 14:36 +--- +local RunFast_Player = import(".RunFast_Player") + +local RunFast_Room = { +} + +local M = RunFast_Room + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Room}) + local self = setmetatable({}, {__index = M}) + self:init() + return self +end + + + +function M:NewPlayer() + return RunFast_Player.new() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_RoomConfig.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_RoomConfig.lua new file mode 100644 index 00000000..9d7c2dfb --- /dev/null +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_RoomConfig.lua @@ -0,0 +1,492 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 10:54 +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.class = "RunFast_RoomConfig" + self.config=config + self.Leaf = config.leaf + self.Rule = config.rule + self.Times = config.times + self.WillBeOut = config.willBeOut + self.Heart10 = config.heartten + self.BombSpring = config.minboom + self.AA = config.aa + self.PlayerNum = config.maxPlayers + self.showlength = config.showlength + self.fourBeltThree=config.fourBeltThree + self.demolition=config.demolition + self.fangzuobi=config.fangzuobi + self.planelack=config.planelack + self.threelack=config.threelack + self.threeA=config.threeA + self.tuoguan_active_time=config.tuoguan_active_time + self.tuoguan=config.tuoguan + self.tuoguan_result_type=config.tuoguan_result_type + self.isNonnegative=config.isNonnegative + self.sandaidan = config.sandaidan + self.isHidden = config.isHidden + self.ba = config.ba + self.fs = config.fs + + if config.piao ~= nil then + self.piao = config.piao + else + self.piao = 0 + end + + if config.daniao ~= nil then + self.daniao = config.daniao + else + self.daniao = 0 + end + + if self.isNonnegative == nil then + self.isNonnegative = 0 + end + self.energyTab=config.energyTab + + if self.energyTab==nil then + self.energyTab=0 + end + + return self +end + +--[[function M:GetDes(sp) + sp = sp or " " + local str = "" + -- str = str.. self.Times.."局"..sp + str = str .. RoomConfig.GetDes(self, sp).." " + local count=1 + if self.Leaf == 1 then + str = str.. "15张玩法" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str.. "16张玩法" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.Rule == 1 then + str = str.. "第一局黑桃3先出,随后赢家先出".."\n" + else + str = str.. "第一局系统随机选一张先出,随后赢家先出".."\n" + end + count=0 + + if self.WillBeOut == 1 then + str = str.. "能出必出" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str.. "可不必出" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + if self.showlength == 1 then + str = str.. "显示剩余牌" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + if self.fourBeltThree == 3 then + str = str.. "四带三" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.fourBeltThree == 2 then + str = str.. "四带二" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + if self.Heart10 == 1 then + str = str.. "红桃10分数翻倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.BombSpring == 1 then + str = str.. "\n4个3 或者3个A 1个2 春天\n" + end + if self.demolition == 1 then + str = str.. "炸弹不能拆" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + if self.fangzuobi == 1 and self.PlayerNum==3 then + str = str.. "防作弊" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.sandaidan == 1 then + str = str.. "\n三张飞机带单或者对子\n" + end + + if self.ba == 1 then + str = str.. "炸弹分数算赢家" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.fs == 1 then + str = str.. "反春天" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.planelack == 1 then + str = str.. "飞机少带可接完" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + if self.threelack == 1 then + str = str.. "三张少带可接完" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + if self.threeA ==1 then + str = str.. "三张A算炸弹" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.piao == 0 then + + elseif self.piao == 1 then + str = str.. "飘123" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.piao == 2 then + str = str.. "飘235" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.piao == 3 then + str = str.. "飘258" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.daniao == 1 then + str = str.. "打鸟+10" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.daniao == 2 then + str = str.. "打鸟+20" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.daniao == 3 then + str = str.. "打鸟+50" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + return str +end--]] + + +function M:GetDes(sp) + sp = sp or " " + local str = "" + -- str = str.. self.Times.."局"..sp + str = str .. RoomConfig.GetDes(self, sp) + if self.Leaf == 1 then + str = str.. "15张玩法"..sp + else + str = str.. "16张玩法"..sp + end + + if self.Rule == 1 then + str = str.. "第一局黑桃3先出,随后赢家先出"..sp + else + str = str.. "第一局系统随机选一张先出,随后赢家先出"..sp + end + + if self.WillBeOut == 1 then + str = str.. "能出必出"..sp + else + str = str.. "可不必出"..sp + end + if self.showlength == 1 then + str = str.. "显示剩余牌"..sp + end + if self.fourBeltThree == 3 then + str = str.. "四带三"..sp + elseif self.fourBeltThree == 2 then + str = str.. "四带二"..sp + end + if self.Heart10 == 1 then + str = str.. "红桃10分数翻倍"..sp + end + + if self.BombSpring == 1 then + str = str.. "4个3 或者3个A 1个2 春天"..sp + end + if self.demolition == 1 then + str = str.. "炸弹不能拆"..sp + end + if self.fangzuobi == 1 and self.PlayerNum==3 then + str = str.. "防作弊"..sp + end + + if self.sandaidan == 1 then + str = str.. "三张飞机带单或者对子"..sp + end + + if self.ba == 1 then + str = str.. "炸弹分数算赢家"..sp + end + + if self.fs == 1 then + str = str.. "反春天"..sp + end + + + if self.planelack == 1 then + str = str.. "飞机少带可接完"..sp + end + if self.threelack == 1 then + str = str.. "三张少带可接完"..sp + end + if self.threeA ==1 then + str = str.. "三张A算炸弹"..sp + end + + if self.piao == 0 then + + elseif self.piao == 1 then + str = str.. "飘123"..sp + elseif self.piao == 2 then + str = str.. "飘235"..sp + elseif self.piao == 3 then + str = str.. "飘258"..sp + end + + if self.daniao == 1 then + str = str.. "打鸟+10"..sp + elseif self.daniao == 2 then + str = str.. "打鸟+20"..sp + elseif self.daniao == 3 then + str = str.. "打鸟+50"..sp + end + + return str +end + + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/gamerule") + return gamerulepanel +end + + +function M:GetGameSMSize() + return 467,500 +end + +function M:GetGameName() + return "跑得快" +end + +--function M:GetIsShowCardNumber() +-- return self.ShowNumber == 1 +--end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/sanqianfen/EXGameInfo.lua b/lua_probject/extend_project/extend/poker/sanqianfen/EXGameInfo.lua new file mode 100644 index 00000000..3478f206 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/sanqianfen/EXGameInfo.lua @@ -0,0 +1,293 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 15:19 +--- +local EXGameInfo = {} + +local M = EXGameInfo + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/poker/sanqianfen/ui/Info_Poker_SanQianFen") + return self +end + +function M:FillData(view, index) + self._maxPlayer = 3 -- 默认玩家人数 + self._roundChoice = 5 -- 回合选项数 + + if oldGameVersion==1 then + self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_SanQianFen/Creat_SanQianFen") + else + self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_SanQianFen/Creat_SanQianFen") + end + + + -- if oldGameVersion==2 then + -- self._config:GetController("xipai").selectedIndex=0 + + -- self.xipaiValueText=self._config:GetChild('xipaifen') + -- self.xipaiValue=1 + + -- local btn_cr = self._config:GetChild('sdsrbtn') + -- btn_cr.onClick:Set( + -- function() + + -- local gniv = GroupNumberInputView_Game.new(nil, function(num) + + -- local value = limit + -- if otype == 1 then + -- value = value + ad2d(num) + -- elseif otype == - 1 then + -- value = value - ad2d(num) + -- else + -- value = ad2d(num) + -- end + + -- if value < 0 then + -- ViewUtil.ErrorTip(1,"输入数据异常!") + -- end + + -- self.xipaiValueText.text=value/1000 + -- self.xipaiValue=value/1000 + + -- end, 0, nil) + -- gniv:Show() + + + -- end + -- ) + + -- end + + + + self._config:GetChild("people_2").onClick:Set(function() + self._config:GetController("rule").selectedIndex = 0 + end) + + local piao = self._config:GetController("piao") + local daniao = self._config:GetController("daniao") + + piao.onChanged:Add(function() + if piao.selectedIndex ~= 0 then + daniao.selectedIndex = 0 + end + end) + + daniao.onChanged:Add(function() + if daniao.selectedIndex ~= 0 then + piao.selectedIndex = 0 + end + end) + +end + +local _help_url = "ui://Info_Poker_SanQianFen/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_Poker_SanQianFen/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_Poker_SanQianFen/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list = {"15张玩法","16张玩法"} +function M:GetPlayList() + return _play_list +end + +function M:LoadConfigData(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt - 1 + _config:GetController("rule").selectedIndex = data.rule == 2 and 0 or 1 + _config:GetController("play_list").selectedIndex = data.leaf - 1 + _config:GetController("willBeOut").selectedIndex = data.willBeOut - 1 + _config:GetController("heart10").selectedIndex = data.heartten - 1 + _config:GetController("bombSpring").selectedIndex = data.minboom - 1 + _config:GetController("player_num").selectedIndex = data.maxPlayers == 2 and 0 or 1 + _config:GetController("Cost").selectedIndex = data.AA == 0 and 0 or 1 + _config:GetController("showlength").selectedIndex = data.showlength + _config:GetController("fourBeltThree").selectedIndex = data.fourBeltThree + _config:GetController("demolition").selectedIndex = data.demolition + _config:GetController("fangzuobi").selectedIndex = data.fangzuobi + + _config:GetController("jiang").selectedIndex = data.score_510k + + _config:GetController("pai").selectedIndex = data.score_510k_type + + local sandaidan = data.sandaidan + if sandaidan ~= nil and sandaidan == 1 then + _config:GetChild("sandaidan").selected = true + + _config:GetChild("planelack").selected = false + _config:GetChild("Threelack").selected = false + + else + _config:GetChild("sandaidan").selected = false + + _config:GetChild("planelack").selected = data.planelack == 1 and true or false + _config:GetChild("Threelack").selected = data.threelack == 1 and true or false + end + + local fs = data.fs + if fs ~= nil and fs == 1 then + _config:GetChild("fan_sprint").selected = true + else + _config:GetChild("fan_sprint").selected = false + end + + local ba = data.ba + if ba ~= nil and ba == 1 then + _config:GetChild("boom_add").selected = true + else + _config:GetChild("boom_add").selected = false + end + + _config:GetChild("ThreeA").selected = data.threeA == 1 and true or false + + if data.piao ~= nil then + _config:GetController("piao").selectedIndex = data.piao + end + + if data.daniao ~= nil then + _config:GetController("daniao").selectedIndex = data.daniao + end + + if _config:GetChild("fourBeltThree") then + _config:GetChild("fourBeltThree").selected=data.fourDaiTwo + end + + if _config:GetChild("fourBeltTwo") then + _config:GetChild("fourBeltTwo").selected=data.fourDaiThree + end + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected=data.xi_pai + end + + + -- if oldGameVersion==2 then + -- self.xipaiValueText.text=data.xi_pai_score + -- self.xipaiValue=data.xi_pai_score + -- end + +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + local rule = _config:GetController("rule").selectedIndex + local leaf = _config:GetController("play_list").selectedIndex + local willBeOut = _config:GetController("willBeOut").selectedIndex + local bombSpring = _config:GetController("bombSpring").selectedIndex + local heart10 = _config:GetController("heart10").selectedIndex + local player_num = _config:GetController("player_num").selectedIndex + local AA = _config:GetController("Cost").selectedIndex + local showlength = _config:GetController("showlength").selectedIndex + local fourBeltThree = _config:GetController("fourBeltThree").selectedIndex + local demolition = _config:GetController("demolition").selectedIndex + local fangzuobi = _config:GetController("fangzuobi").selectedIndex + local planelack = _config:GetChild("planelack").selected and 1 or 0 + local threelack = _config:GetChild("Threelack").selected and 1 or 0 + local ThreeA = _config:GetChild("ThreeA").selected and 1 or 0 + local piao = _config:GetController("piao").selectedIndex + local daniao = _config:GetController("daniao").selectedIndex + local sandaidan = _config:GetController("sandaidan").selectedIndex + local ba = _config:GetChild("boom_add").selected and 1 or 0 + local fs = _config:GetChild("fan_sprint").selected and 1 or 0 + + ----- + local fourDaiTwo=false + if _config:GetChild("fourBeltThree") then + fourDaiTwo = _config:GetChild("fourBeltThree").selected + end + + local fourDaiThree=false + if _config:GetChild("fourBeltTwo") then + fourDaiThree = _config:GetChild("fourBeltTwo").selected + end + + local xi_pai=false + if _config:GetChild("xipai") then + xi_pai = _config:GetChild("xipai").selected + end + + local k_score = _config:GetController("jiang").selectedIndex + + local score_type = _config:GetController("pai").selectedIndex + + ---- + local _data = {} + _data["account_id"] = DataManager.SelfUser.Id + _data["opt"] = round + 1 + _data["rule"] = rule == 0 and 2 or 1 + _data["leaf"] = leaf + 1 + _data["AA"] = AA + _data["willBeOut"] = willBeOut + 1 + _data["showlength"] = showlength + _data["heartten"] = willBeOut == 0 and heart10 + 1 or 2 + _data["minboom"] = (willBeOut == 0 and leaf == 1 and player_num == 1) and bombSpring + 1 or 2 + _data["maxPlayers"] = player_num + 2 + _data["fourBeltThree"] = fourBeltThree + _data["demolition"] = demolition + _data["fangzuobi"] = fangzuobi + _data["threeA"] = ThreeA + _data["piao"] = piao + _data["daniao"] = daniao + _data["sandaidan"] = sandaidan + _data["ba"] = ba + _data["fs"] = fs + + _data["fourDaiTwo"] = fourDaiTwo + _data["fourDaiThree"] = fourDaiThree + + _data["score_510k"] = k_score + _data["score_510k_type"] = score_type + + + if willBeOut == 1 then + -- body + _data["planelack"] = 0 + _data["threelack"] = 0 + else + + if sandaidan == 1 then + _data["planelack"] = 0 + _data["threelack"] = 0 + else + _data["planelack"] = planelack + _data["threelack"] = threelack + end + end + + _data['xi_pai'] = xi_pai + + local xi_pai_score=0 + if oldGameVersion==2 then + xi_pai_score=self.xipaiValue + end + + _data['xi_pai_score'] = xi_pai_score + + return _data +end + +function M:OnChangeOption(ctype, pay_obj) + IGameInfo.OnChangeOption(self, ctype, pay_obj) + local people = self._config:GetController("player_num") + people.onChanged:Set(function() + self._maxPlayer = people.selectedIndex + 2 + self:ShowVariablePrice(ctype, pay_obj) + end) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/sanqianfen/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/poker/sanqianfen/EXPlayerInfoView.lua new file mode 100644 index 00000000..a4e5b1fd --- /dev/null +++ b/lua_probject/extend_project/extend/poker/sanqianfen/EXPlayerInfoView.lua @@ -0,0 +1,143 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self.ctr_shangyou = self._view:GetController('shangyou') + + self.shangyouObj = self._view:GetChild("shangyou") + self:init() + + if self._tex_score then + self._tex_score.visible=false + end + + if self._tex_n4 then + self._tex_n4.visible=false + end + + if self._tex_player_name then + self._tex_player_name.visible=false + end + + if self._tex_n5 then + self._tex_n5.visible=false + end + + if self._tex_player_id then + self._tex_player_id .visible=false + end + + + + local zong = self._view:GetChild("zong") + + if self.score_ju then + self.score_ju.text = "0" + end + if self.score_zong then + self.score_zong.text = "0" + end + if self.xi_ju then + self.xi_ju.text = "0" + end + if self.xi_zong then + self.xi_zong.text = "0" + end + return self +end + + +function M:FillData(player) + PlayerInfoView.FillData(self, player) + if player.cur_hp ~= nil then + self:UpdateScore(d2ad(player.cur_hp)) + else + local rt = 1 + if self._main_view._room.hpOnOff == 1 then + rt = self._main_view._room.score_times + end + self:UpdateScore(player.total_score * rt) + end + + self.cur510kFen = self._view:GetChild("510score") + if self.cur510kFen then + self.cur510kFen.visible = false + end + -- if self.cur510kFen and player.cur510kFen then + -- self.cur510kFen.text = player.cur510kFen + -- end + + --self.score_ju = self._view:GetChild("zong"):GetChild("score_ju") + if self.score_ju and player.ju510kFen then + self.score_ju.text = player.ju510kFen + end + + -- printlog("pppppppppppppppppppppppppppppppppp") + -- self.score_zong = self._view:GetChild("zong"):GetChild("score_zong") + if self.score_zong and player.cur510kFen then + self.score_zong.text = player.cur510kFen + end + + -- self.xi_ju = self._view:GetChild("zong"):GetChild("xi_ju") + if self.xi_ju and player.juXiFen then + self.xi_ju.text = player.juXiFen + end + + --self.xi_zong = self._view:GetChild("zong"):GetChild("xi_zong") + if self.xi_zong and player.curXiFen then + self.xi_zong.text = player.curXiFen + end +end + +function M:InitScoreComp(tex_player_name,score_ju,score_zong,xi_ju,xi_zong) + self._tex_player_name = tex_player_name + self.score_ju = score_ju + self.score_zong = score_zong + self.xi_ju = xi_ju + self.xi_zong = xi_zong + self._tex_player_name = tex_player_name + + if self.score_ju then + self.score_ju.text = "0" + end + + if self.score_zong then + self.score_zong.text = "0" + end + + if self.xi_ju then + self.xi_ju.text = "0" + end + + if self.xi_zong then + self.xi_zong.text = "0" + end + +end + +function M:UpdatePiao(piao) + + if piao == nil or piao == -1 then + self._view:GetChild("piao").text = "" + elseif piao == 0 then + self._view:GetChild("piao").text = "不飘" + elseif piao == 1 then + self._view:GetChild("piao").text = "飘1分" + elseif piao == 2 then + self._view:GetChild("piao").text = "飘2分" + elseif piao == 3 then + self._view:GetChild("piao").text = "飘3分" + elseif piao == 5 then + self._view:GetChild("piao").text = "飘5分" + elseif piao == 8 then + self._view:GetChild("piao").text = "飘8分" + end +end + + +return M diff --git a/lua_probject/extend_project/extend/poker/sanqianfen/ExtendConfig.lua b/lua_probject/extend_project/extend/poker/sanqianfen/ExtendConfig.lua new file mode 100644 index 00000000..d8877a32 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/sanqianfen/ExtendConfig.lua @@ -0,0 +1,287 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:57 +--- + +local EXTEND_MODEL_NAME = ... +local EXGameInfo = import(".EXGameInfo") +local SanQianFen_MainView = import(".SanQianFen_MainView") +local SanQianFen_GameController = import(".SanQianFen_GameController") +local SanQianFen_RoomConfig = import(".SanQianFen_RoomConfig") +local SanQianFen_Player = import(".SanQianFen_Player") +local SanQianFen_Room = import(".SanQianFen_Room") +local SanQianFen_PlayerBackView = import(".SanQianFen_PlayerBackView") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = "ExtendConfig" + self.extend_id = 14 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = SanQianFen_MainView + self._viewMap[ViewManager.View_PlayBack] = SanQianFen_PlayerBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/poker/sanqianfen/ui/Info_Poker_SanQianFenNew") + self:UnAssets() +end + +function M:UnAssets() + UIPackage.RemovePackage("extend/poker/sanqianfen/ui/Extend_Poker_SanQianFenNew") + ResourcesManager.UnLoadGroup("RunFase_PK") +end + +local _gameInfo = nil +function M:GetGameInfo() +if not _gameInfo then + _gameInfo = EXGameInfo.new() +end +return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = SanQianFen_GameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return SanQianFen_Room.new() +end + +function M:GetGameRule() + return SanQianFen_RuleView.new() +end + +function M:GetIconUrl() + return "ui://Extend_Poker_SanQianFen/icon" + -- +end + +function M:FillRoomConfig(room,_config) + room.room_config = SanQianFen_RoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + if _ctr_game == nil then + self:GetGameController() + end + + local reload = s2croom["reload"] + + local _tableInfo = s2croom["tableInfo"] + + room.xipaiScore=_tableInfo["xipai_score"] + + local _config = _tableInfo["config"] + room.room_config = SanQianFen_RoomConfig.new(_config) + + room.curren_round = _tableInfo["round"] + if room.curren_round == 0 and reload then + room.curren_round = 1 + end + + local playerList = _tableInfo["playerData"] + for i = 1,#playerList do + local _jp = playerList[i] + + local p = SanQianFen_Player.new() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + if (DataManager.SelfUser.account_id == pid) then + room.self_player = p + p.self_user = DataManager.SelfUser + else + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + + end + p.self_user.location = Location.new(_jp["pos"] or "") + p.self_user.host_ip = _jp["ip"] + p.total_score = _jp["score"] or 0 + if _jp.hp_info then + p.cur_hp = _jp.hp_info.cur_hp + end + p.hp_info = _jp["hp_info"] + + if _jp["entrust"] then + p.entrust = _jp.entrust + end + room:AddPlayer(p) + end + + + + local owner = s2croom["owner"] + room.owner_id = owner + room.game_status = 0 + if reload then + + local reloadInfo = s2croom["reloadInfo"] + + + + local playing = reloadInfo["playing"] + + room.curren_turn_seat = reloadInfo["active_seat"] + room.cur510kFen = reloadInfo["cur510kFen"] + room.cur5Num = reloadInfo["cur5Num"] + room.cur10Num = reloadInfo["cur10Num"] + room.curkNum = reloadInfo["curkNum"] + local info_list = reloadInfo["info_list"] + if playing == true then + + + room.CurnrenState = StateType.Palying + room.game_status=1 + + + for i = 1, #info_list do + local p = room:GetPlayerById(info_list[i]["playerid"]) + + if p == room.self_player then + p.hand_list = reloadInfo["hand_card"] + p.open= reloadInfo["open"] + end + + p.hand_count = info_list[i]["card_size"] + p.piao = info_list[i]["piao"] + p.handCards = info_list[i]["handCards"] + p.outCards = info_list[i]["outCards"] + p.cur510kFen = info_list[i]["cur510kFen"] + p.curXiFen = info_list[i]["curXiFen"] + p.juXiFen = info_list[i]["juXiFen"] + p.ju510kFen = info_list[i]["ju510kFen"] + + local last_outcard = info_list[i]["last_outcard"] + if last_outcard ~= nil and last_outcard[1] ~= 0 then + local out_card_list = _ctr_game:ChangeCodeByFrom(last_outcard.card_list,true) + local card_type,number,length,plan_three_count = _ctr_game:GetCardListInfo(out_card_list) + p.out_card_list = _ctr_game:GetSortOutCardList(out_card_list,card_type,number,plan_three_count) + else + p.out_card_list = {0} + end + end + else + -- print("aaaaaaaaaaaaaaaa1111111111111111111111111") + --pt(s2croom) + room.game_status=1 + + room.CurnrenState = StateType.PalyingWait + + room.winseat = reloadInfo["winseat"] + room.remaincards = reloadInfo["remaincards"] + + for i = 1, #info_list do + local playerData = info_list[i] + local p = room:GetPlayerById(playerData["playerid"]) + + p.ready = playerData["certainseat"] == 1 and true or false + + local last_outcard = info_list[i]["last_outcard"] + if last_outcard ~= nil and last_outcard[1] ~= 0 then + + local out_card_list = _ctr_game:ChangeCodeByFrom(last_outcard.card_list,true) + local card_type,number,length,plan_three_count = _ctr_game:GetCardListInfo(out_card_list) + p.out_card_list = _ctr_game:GetSortOutCardList(out_card_list,card_type,number,plan_three_count) + else + p.out_card_list = {0} + end + + p.hand_list = info_list[i]["cards"] + p.winscore = info_list[i]["winscore"] + p.piao = info_list[i]["piao"] + p.hand_count = info_list[i]["card_size"] + p.thisboomnum=info_list[i]["thisboomnum"] + p.open= info_list[i]["open"] + p.cur510kFen=info_list[i]["cur510kFen"] + p.ju510kFen=info_list[i]["ju510kFen"] + p.juXiFen=info_list[i]["juXiFen"] + p.curXiFen=info_list[i]["curXiFen"] + p.jiangli=info_list[i]["jiangli"] + p.leftCardFen=info_list[i]["leftCardFen"] + + p.handCards = info_list[i]["handCards"] + p.outCards = info_list[i]["outCards"] + end + end + else + room.CurnrenState = StateType.Ready + end +end + + + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.room_id + room.room_config = SanQianFen_RoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + local _info_list = _tableInfo["playerData"] + for i = 1,#_info_list do + local _jp = _info_list[i] + local p = SanQianFen_Player.new() + p.seat = _jp["seat"] + p.aid = _jp["aid"] + local pid = _jp["aid"] + if p.aid == DataManager.SelfUser.account_id then + room.self_player = p + end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + + + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.hand_list = _hand_card + p.hand_count = #_hand_card + p.total_score = _jp["score"] + p.piao = _jp["piao"] + p.open= _jp["open"] + p.hp_info = _jp["hp_info"] + p.cur510kFen = _jp["cur510kFen"] + p.curXiFen = _jp["curXiFen"] + p.juXiFen = _jp["juXiFen"] + p.ju510kFen = _jp["ju510kFen"] + if _jp['hp_info'] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_CardType.lua b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_CardType.lua new file mode 100644 index 00000000..0bfcab23 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_CardType.lua @@ -0,0 +1,24 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 11:30 +--- + +local SanQianFen_CardType = { + None = 0, + OneCard = 1,--一张 + OnePair = 2,--一对 + Three = 3,--三张 + Pairs = 4,--连对 + ThreeAndTwo = 5,--三带二 + ThreeAndOne = 6,--三带一 + Plane = 7,--飞机 + PlaneAndTwo = 8,--飞机带二 + PlaneAndOne = 9,--飞机带一 + Straight = 10, --顺子 + + Bomb = 11,--炸 + FourAndtThree=12,--四代三 + +} + +return SanQianFen_CardType \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_GameController.lua b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_GameController.lua new file mode 100644 index 00000000..702a0d59 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_GameController.lua @@ -0,0 +1,811 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 11:28 +--- + +local SanQianFen_Protocol = import(".SanQianFen_Protocol") +local SanQianFen_GameEvent = import(".SanQianFen_GameEvent") +local SanQianFen_CardType = import(".SanQianFen_CardType") +local SanQianFen_PutError = { + "必须先出最小的牌", + "出牌不符合规定牌型 ", + "下家报单,请出最大的牌 ", + "炸弹不能拆" +} + +local SanQianFen_GameController = {} + +local M = SanQianFen_GameController + +function M.new() + setmetatable(M, {__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("三千分") + self.class = "SanQianFen_GameController" + return self +end + +function M:init(name) + GameController.init(self, name) + self:RegisterEvt() +end + +-- 事件注册 +function M:RegisterEvt() + --self._eventmap[SanQianFen_Protocol.SanQianFen_Ming_Card] = self.OnMingCard + self._eventmap[SanQianFen_Protocol.SanQianFen_Init_Card] = self.OnInitCard + self._eventmap[SanQianFen_Protocol.SanQianFen_Options] = self.OnOptions + self._eventmap[SanQianFen_Protocol.SanQianFen_Index_Move] = self.OnIndexMove + self._eventmap[SanQianFen_Protocol.SanQianFen_Play_Succ] = self.OnPlaySucc + self._eventmap[SanQianFen_Protocol.SanQianFen_Put_Error] = self.OnPutError + self._eventmap[SanQianFen_Protocol.SanQianFen_Pass_Succ] = self.OnPassSucc + self._eventmap[SanQianFen_Protocol.SanQianFen_Result] = self.OnResult + self._eventmap[SanQianFen_Protocol.SanQianFen_Bomb_Score] = self.OnBombScore + self._eventmap[SanQianFen_Protocol.SanQianFen_Piao_Tip] = self.OnPiaoTip + self._eventmap[SanQianFen_Protocol.SanQianFen_Piao_Action] = self.OnPiaoAction + self._eventmap[SanQianFen_Protocol.SanQianFen_ConfirmToNextGameSucc] = self.OnConfrimToNextGameSucc + --self._eventmap[SanQianFen_Protocol.SanQianFen_Oener] = self.Oener + -- self._eventmap[Protocol.GAME_EVT_PLAYER_JOIN] = self.OnEventPlayerEnter + self._eventmap[SanQianFen_Protocol.PT_GAMETUOGUAN] = self.Game_TuoGuan + + self._eventmap[SanQianFen_Protocol.GAME_EVENT_XIPAI] = self.OnEventXiPai + self._eventmap[SanQianFen_Protocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim + + self._eventmap[SanQianFen_Protocol.GAME_EVT_CARDINHAND] = self.OnPlaySuccCheckHandCard + + self._eventmap[SanQianFen_Protocol.GAME_EVT_UPDATE_510K_SCORE] = self.OnUpdate510KScore + + self._eventmap[SanQianFen_Protocol.GAME_EVT_UPDATE_XI_SCORE] = self.OnUpdateXISCORE + + self._eventmap[SanQianFen_Protocol.GAME_EVT_ALL_UPDATE_510K_SCORE] = self.OnUpdateALL510KSCORE + + self._eventmap[SanQianFen_Protocol.GAME_EVT_SHANGYOU] = self.GAMESHANGYOU + + + + +-- local out_card_list = {408,308,208,208,208,108,108} +-- local out_card_list = self:ChangeCodeByFrom(out_card_list, true) +-- local card_type, number, length, plan_three_count = self:GetCardListInfo(out_card_list) +-- local x =self:GetSortOutCardList(out_card_list, card_type, number, plan_three_count) + --local cardType, cardNum, cardLength = self:GetCardListInfo(lastCardList) + +end +-- function M:Oener(evt_data) +-- local seat = evt_data["owner"] +-- self._cacheEvent:Enqueue(function() + +-- DispatchEvent(self._dispatcher,SanQianFen_GameEvent.Oener,seat) +-- end) +-- end +-- function M:OnEventPlayerEnter(evt_data) +-- local p = self._room:NewPlayer() +-- local _user + +-- _user = User.new() +-- _user.account_id = evt_data["aid"] +-- _user.host_ip = evt_data["ip"] +-- _user.nick_name = evt_data["nick"] +-- _user.head_url = evt_data["portrait"] +-- _user.sex = evt_data["sex"] +-- _user.location = Location.new(evt_data["pos"] or "") +-- p.seat = evt_data["seat"] +-- p.ready = evt_data["ready"] == 1 and true or false +-- p.self_user = _user +-- p.line_state = 1 +-- p.total_score=evt_data["score"] +-- p.hp_info = evt_data["hp_info"] +-- -- p.total_score=self._room.room_config.energyTab==0 and evt_data["score"] or evt_data["score"]/10 + +-- DataManager.CurrenRoom:AddPlayer(p) +-- DispatchEvent(self._dispatcher,GameEvent.PlayerEnter, p) +-- end + + +function M:SendXiPaiAction(callBack) + local _data = {} + local _client = ControllerManager.GameNetClinet + _client:send(SanQianFen_Protocol.GAME_XIPAI, _data) + self.XiPaiCallBack=callBack +end + +function M:OnEventXiPai(evt_data) + if evt_data["result"]==0 then + if self.XiPaiCallBack then + self.XiPaiCallBack() + end + else + ViewUtil.ErrorTip(1000000,"申请洗牌失败") + end + +end + +function M:GAMESHANGYOU(evt_data) + local seat = evt_data["player"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,SanQianFen_GameEvent.EventShangYou,seat) + end) +end + +function M:OnEventXiPaiAnim(evt_data) + printlog("洗牌动画===》》》》") + pt(evt_data) + local playeridList = evt_data["list"] + local my_isXiPai=false + local other_isXiPai=false + if playeridList and #playeridList>0 then + for i=1,#playeridList do + local p = self._room:GetPlayerById(playeridList[i]) + if p== self._room.self_player then + my_isXiPai=true + else + other_isXiPai=true + end + end + end + + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,SanQianFen_GameEvent.EventXiPai,my_isXiPai,other_isXiPai) + end) +end + + +function M:SendCard(cards,currentCard) + local _data = {} + _data["card"] = cards + _data["all_card"] = currentCard + local _client = ControllerManager.GameNetClinet + _client:send(SanQianFen_Protocol.SanQianFen_Send_Card, _data) +end + +function M:SendPiao(piao) + local _data = {} + _data["id"] = piao + local _client = ControllerManager.GameNetClinet + _client:send(SanQianFen_Protocol.SanQianFen_Send_Piao, _data) +end + +function M:SendPass() + local _client = ControllerManager.GameNetClinet + _client:send(SanQianFen_Protocol.SanQianFen_Send_Guo) +end + +function M:SendInitCardEnd() + local _client = ControllerManager.GameNetClinet + _client:send(SanQianFen_Protocol.SanQianFen_Init_Card_End) +end + +function M:ConformToNextGame() + local _client = ControllerManager.GameNetClinet + _client:send(SanQianFen_Protocol.SanQianFen_ConfirmToNextGame) +end + +function M:OnMingCard(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local card = evt_data["mingpai"] + self._cacheEvent:Enqueue( + function() + self._room.ming_card = card + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.OnMingCard, card) + end + ) +end + +function M:OnInitCard(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local cardlist = evt_data["cards"] + local round = evt_data["round"] + self._cacheEvent:Enqueue( + function() + for _, player in ipairs(self._room.player_list) do + player:Clear() + player.hand_count = #cardlist + end + + self._room.curren_round = round + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.OnInitCard, round, cardlist) + end + ) +end + +function M:OnBombScore(evt_data) + local scoreList = evt_data["gold_list"] + self._cacheEvent:Enqueue( + function() + for i = 1, #scoreList do + local score = scoreList[i].bom_score + local player = self._room:GetPlayerById(scoreList[i].aid) + player.total_score = player.total_score + score + end + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.OnBombScore, scoreList) + end + ) +end + +function M:OnPlaySucc(evt_data) + if pcall( + self.OnPlaySuccCheck,self,evt_data + ) then + + else + printlog("数据异常OnPlaySucc==>>>") + end +end + +function M:OnPlaySuccCheck(evt_data) + local seat = evt_data["player"] + local card_obj = evt_data["card_obj"] + local cards = card_obj["card_list"] + local remain = evt_data["remain"] -- 报单 + local all510k = evt_data["all510k"] + local add510k = evt_data["add510k"] + local cur5Num = evt_data["cur5Num"] + local cur10Num = evt_data["cur10Num"] + local curkNum = evt_data["curkNum"] + + self._cacheEvent:Enqueue( + function() + local otherList = self:GetOtherSeatList(seat) + local player = self._room:GetPlayerBySeat(seat) + local out_card_list = self:ChangeCodeByFrom(cards, true) + player.hand_count = remain + local card_type, number, length, plan_three_count = self:GetCardListInfo(out_card_list) + player.out_card_list = self:GetSortOutCardList(out_card_list, card_type, number, plan_three_count) + --printlog("cccccccccccccccc ") + --pt(otherList) + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.OnPlaySucc, player, remain, card_type, number, otherList,length,add510k,all510k,cur5Num,cur10Num,curkNum) + end + ) +end + +function M:OnPlaySuccCheckHandCard(evt_data) + local seat = evt_data["player"] + local cards = evt_data["handCards"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.OnPassSuccCheckCard,seat,cards) + end + ) + +end + + + + +function M:OnPassSucc(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue( + function() + local p = self._room:GetPlayerBySeat(seat) + p.out_card_list = {0} + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.OnPassSucc, p) + end + ) +end + +function M:OnPutError(evt_data) + local code = evt_data["error"] + self._cacheEvent:Enqueue( + function() + local error_str = self:GetErrorStr(code) + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.OnErrorTip, error_str) + end + ) +end +function M:TuoGuan(isTuo) + local _data = {} + _data["tuoguan"] = isTuo + local _client = ControllerManager.GameNetClinet + _client:send(SanQianFen_Protocol.SEND_TUOGUAN, _data) +end + +function M:Game_TuoGuan(evt_data) + local tuoguan = evt_data["tuoguan"] + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.Game_TuoGuan, tuoguan, seat) + end) +end +function M:OnIndexMove(evt_data) + local seat = evt_data["index"] + self._cacheEvent:Enqueue( + function() + self._room.curren_turn_seat = seat + self._room.is_new_bout = self:GetIsNewBout(seat) + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.OnIndexMove, seat) + end + ) +end + +function M:OnOptions(evt_data) + local play = evt_data["play"] + local pass = evt_data["pass"] + + self._cacheEvent:Enqueue( + function() + local lastCardList = self:GetLastCardList(self._room.self_player.seat) + -- printlog("lastCardListlastCardListlastCardLis") + -- pt(lastCardList) + local cardType, cardNum, cardLength = self:GetCardListInfo(lastCardList) + + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.OnOptions, play, cardType, cardNum, cardLength, pass) + end + ) +end + +function M:OnPiaoTip(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local piao = evt_data["piao"] + local reload = evt_data["reload"] + self._cacheEvent:Enqueue( + function() + + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.OnPiaoTips, piao,reload) + end + ) +end + +function M:OnPiaoAction(evt_data) + local seat = evt_data["seat"] + local piao = evt_data["piao"] + + self._cacheEvent:Enqueue( + function() + + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.OnPiaoAction, seat,piao) + end + ) +end + +function M:OnResult(evt_data) + local result_type = evt_data["type"] + + local info = evt_data["info"] + local winseat = evt_data["winseat"] + local remaincards = evt_data["remaincards"] + DataManager.CurrenRoom.xipaiScore=evt_data["xipai_score"] + --printlog("wwwwwwwwwwwwwwwwwwwww1111111 ",result_type) + --pt(evt_data) + if result_type == 1 then + local over = 1 + ControllerManager.SetGameNetClient(nil, true) + self._cacheEvent:Enqueue( + function() + for i = 1, #info do + local p = self._room:GetPlayerBySeat(info[i]["seat"]) + p.total_score = info[i]["score"] + info[i]["self_user"] = p.self_user + end + + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.OnResult, over, info, winseat, remaincards) + end + ) + elseif result_type == 0 then + local over = 0 + self._cacheEvent:Enqueue( + function() + for i = 1, #info do + local p = self._room:GetPlayerBySeat(info[i]["seat"]) + p.total_score = info[i]["score"] + info[i]["self_user"] = p.self_user + end + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.OnResult, over, info, winseat, remaincards) + end + ) + else + local dissolve = 1 + ControllerManager.SetGameNetClient(nil, true) + for i = 1, #info do + local p = self._room:GetPlayerBySeat(info[i]["seat"]) + p.total_score = info[i]["score"] + info[i]["self_user"] = p.self_user + end + -- ControllerManager.ChangeController(LoddyController) + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.OnResultByDissolve, over, info, winseat, dissolve) + end +end + +function M:OnConfrimToNextGameSucc(evt_data) + local aid = evt_data["aid"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.OnConfrimToNextGameSucc, aid) + end + ) +end +function M:Game_TuoGuan(evt_data) + local tuoguan = evt_data["tuoguan"] + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.Game_TuoGuan, tuoguan, seat) + end) +end + +function M:OnUpdate510KScore(evt_data) + local data = evt_data["gold_list"] + --local aid = data[1]["aid"] + --local add510kfen = data[1]["add510kfen"] + --local all510kfen = data[1]["all510kfen"] + local cur510kFen = evt_data["cur510kFen"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.OnUpdate510KScore, data,cur510kFen) + end + ) +end + +function M:OnUpdateXISCORE(evt_data) + local data = evt_data["gold_list"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.OnUpdateXISCORE, data) + end + ) +end + +function M:OnUpdateALL510KSCORE(evt_data) + local data = evt_data["gold_list"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, SanQianFen_GameEvent.OnUpdateALL510KSCORE, data) + end + ) +end + + + +function M:ChangeCodeByFrom(cardList, isSort) + isSort = isSort or false + local new_card_list = {} + for i = 1, #cardList do + local flower = math.floor(cardList[i] / 100) + local number = cardList[i] % 100 + if number == 2 then + number = 15 + end + local card = number * 10 + flower + new_card_list[#new_card_list + 1] = card + end + return isSort == true and table.sort(new_card_list) or new_card_list +end + +function M:GetOtherSeatList(seat) + local list = {} + for i = 1, self._room.room_config.people_num do + if seat ~= i then + list[#list + 1] = i + end + end + return list +end + +-- +function M:GetIsNewBout(seat) + local passCount = 0 + for i = 1, #self._room.player_list do + local player = self._room.player_list[i] + if seat ~= player.seat then + local isPass = self:GetIsPass(player.out_card_list) + if isPass then + passCount = passCount + 1 + end + end + end + if passCount == self._room.room_config.people_num - 1 then + return true + else + return false + end +end + +function M:GetLastSeat(seat) + local last_seat = seat - 1 + if last_seat < 1 then + last_seat = last_seat + self._room.room_config.people_num + end + return last_seat +end + +function M:GetLastCardList(seat) + local last_seat = self:GetLastSeat(seat) + local player = self._room:GetPlayerBySeat(last_seat) + local isPass = self:GetIsPass(player.out_card_list) + if isPass then + if self._room.room_config.people_num == 2 then + return {} + end + local last_seat_2 = self:GetLastSeat(last_seat) + local player_2 = self._room:GetPlayerBySeat(last_seat_2) + local isPass_2 = self:GetIsPass(player_2.out_card_list) + if isPass_2 then + return {} + else + return player_2.out_card_list + end + else + return player.out_card_list + end +end + +function M:GetErrorStr(code) + return SanQianFen_PutError[code + 1] +end + +function M:GetSortOutCardList(outCardList, cardType, cardNumber, plan_three_count) + if cardType == 3 or cardType == 5 or cardType == 6 then + local removeList = {} + for i = #outCardList, 1, -1 do + local card = outCardList[i] + if math.floor(card / 10) == cardNumber then + removeList[#removeList + 1] = card + table.remove(outCardList, i) + end + end + for i = 1, #removeList do + table.insert(outCardList, 1, removeList[i]) + end + elseif cardType >= 7 and cardType <= 9 then + local removeList = {} + for i = #outCardList, 1, -1 do + local card = outCardList[i] + if math.floor(card / 10) <= cardNumber and math.floor(card / 10) > cardNumber - plan_three_count then + removeList[#removeList + 1] = card + table.remove(outCardList, i) + end + end + for i = 1, #removeList do + table.insert(outCardList, 1, removeList[i]) + end + end + return outCardList +end + +--None = 0, +--OneCard = 1, +--OnePair = 2, +--Three = 3, +--Pairs = 4, +--ThreeAndTwo = 5, +--ThreeAndOne = 6, +--Plane = 7, +--PlaneAndTwo = 8, +--PlaneAndOne = 9, +--Straight = 10, +--Bomb = 11 +-- 牌型,大小, 长度 +function M:GetCardListInfo(cardlist) + + if #cardlist == 0 then + return 0, 0, 0, 0 + end + -- 检测牌型 + local card_type, card_num, card_length, plan_three_count = SanQianFen_CardType.None, 0, #cardlist, 0 + local card_map = self:GetCardMapByList(cardlist) + local legth = 0 + local c = true + --printlog("ccccccccccccccccccccccccc") + --pt(cardlist) + if cardlist then + local t = math.floor(cardlist[1] / 10) + for i=1,#cardlist do + local t1 = math.floor(cardlist[i] / 10) + if t~= t1 then + c = false + break + end + end + end + if c then + legth = math.floor(cardlist[1] / 10) + end + + if #cardlist == 1 then + card_type = SanQianFen_CardType.OneCard + card_num = math.floor(cardlist[1] / 10) + elseif #cardlist == 2 then + card_type = SanQianFen_CardType.OnePair + card_num = math.floor(cardlist[1] / 10) + elseif #cardlist == 3 then + card_num = math.floor(cardlist[1] / 10) + if card_num==14 and DataManager.CurrenRoom.room_config.threeA==1 then + -- body + card_type = SanQianFen_CardType.Bomb + else + card_type = SanQianFen_CardType.Three + + end + + -- elseif #cardlist == 4 then + -- local max_key = 0 + -- for k, v in pairs(card_map) do + -- if #v == 4 then + -- card_type = SanQianFen_CardType.Bomb + -- card_num = k + -- elseif #v == 3 then + -- card_type = SanQianFen_CardType.ThreeAndOne + -- card_num = k + -- elseif #v == 2 then + -- if k > max_key then + -- max_key = k + -- end + -- card_type = SanQianFen_CardType.Pairs + -- card_num = max_key + -- end + -- end + elseif legth > 0 then + card_type = SanQianFen_CardType.Bomb + card_num = legth + elseif #cardlist > 4 and legth >0 then + for k, v in pairs(card_map) do + card_type = SanQianFen_CardType.Bomb + card_num = legth + end + elseif #cardlist == 5 then + local count, max_key = 0, 0 + for k, v in pairs(card_map) do + if #v >= 3 then + card_type = SanQianFen_CardType.ThreeAndTwo + card_num = k + elseif #v == 1 then + count = count + 1 + if k > max_key then + max_key = k + end + if count == 5 then + card_type = SanQianFen_CardType.Straight + card_num = max_key + end + end + end + elseif #cardlist == 7 then + local count, max_key = 0, 0 + for k, v in pairs(card_map) do + if #v >= 4 then + card_type = SanQianFen_CardType.FourAndtThree + card_num = k + elseif #v == 1 then + count = count + 1 + if k > max_key then + max_key = k + end + if count == 7 then + card_type = SanQianFen_CardType.Straight + card_num = max_key + end + end + end + else + local one_count, two_count, three_count = 0, 0, 0 + local max_one_key, max_two_key, max_three_key = 0, 0, 0 + + for k, v in pairs(card_map) do + + if #v == 2 then + + if k > max_two_key then + max_two_key = k + end + two_count = two_count + 1 + if two_count == #cardlist / 2 then + card_type = SanQianFen_CardType.Pairs + card_num = max_two_key + end + elseif #v == 1 then + + if k > max_one_key then + max_one_key = k + end + one_count = one_count + 1 + if one_count == #cardlist then + card_type = SanQianFen_CardType.Straight + card_num = max_one_key + end + elseif #v == 3 then + + if max_three_key == 0 then + max_three_key = k + three_count = three_count + 1 + elseif k > max_three_key and k == max_three_key + 1 then + max_three_key = k + three_count = three_count + 1 + elseif k < max_three_key and k == max_three_key - 1 then + max_three_key = k + three_count = three_count + 1 + -- else + -- max_three_key = k + end + + --three_count = three_count + 1 + end + end + -- plan_three_count = three_count + -- if three_count * 5 >= #cardlist then + -- card_type = SanQianFen_CardType.PlaneAndTwo + -- card_num = max_three_key + -- elseif three_count * 4 >= #cardlist then + -- card_type = SanQianFen_CardType.PlaneAndOne + -- card_num = max_three_key + -- elseif three_count * 3 >= #cardlist then + -- card_type = SanQianFen_CardType.Plane + -- card_num = max_three_key + -- end + plan_three_count = three_count + + if three_count * 3 == #cardlist then + card_type = SanQianFen_CardType.Plane + card_num = max_three_key + + elseif three_count * 4 >= #cardlist and #cardlist%4==0 then + card_type = SanQianFen_CardType.PlaneAndOne + card_num = max_three_key + + + elseif three_count * 5 >= #cardlist and #cardlist%5==0 then + card_type = SanQianFen_CardType.PlaneAndTwo + card_num = max_three_key + + + end + end + + return card_type, card_num, card_length, plan_three_count +end + +function M:GetCardMapByList(cardlist) + local card_map = {} + for i = 1, #cardlist do + local card = cardlist[i] + local card_num = math.floor(cardlist[i] / 10) + if card_map[card_num] == nil then + card_map[card_num] = {card} + else + card_map[card_num][#card_map[card_num] + 1] = card + end + end + return card_map +end + +function M:GetIsPass(cardlist) + if #cardlist == 0 then + return true + end + if cardlist[1] ~= nil and cardlist[1] == 0 then + return true + end + return false +end + +--请求离开房间 +function M:LevelRoom(callBack) + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + _client:send( + Protocol.GAME_EXIT_ROOM, + nil, + function(res) + if res.ReturnCode == 0 then + printlog("============== 请求离开房间") + ControllerManager.ChangeController(LoddyController) + elseif res.ReturnCode == 27 then + ViewUtil.ErrorTip(res.ReturnCode, "退出房间失败!") + end + callBack(res) + end + ) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_GameEvent.lua b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_GameEvent.lua new file mode 100644 index 00000000..f92df1b3 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_GameEvent.lua @@ -0,0 +1,28 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:55 +--- +local SanQianFen_GameEvent = { + OnMingCard = "OnMingCard", + OnInitCard = "OnInitCard", + OnOptions = "OnOptions", + OnPiaoTips = "OnPiaoTips", + OnPiaoAction = "OnPiaoAction", + OnBombScore = "OnBombScore", + OnIndexMove = "OnIndexMove", + OnPlaySucc = "OnPlaySucc", + OnErrorTip = "OnErrorTip", + OnPassSucc = "OnPassSucc", + OnResult = "OnResult", + OnResultByDissolve = "OnResultByDissolve", + OnConfrimToNextGameSucc = "OnConfrimToNextGameSucc", + Game_TuoGuan="Game_TuoGuan", + EventXiPai="EventXiPai", + OnPassSuccCheckCard="OnPassSuccCheckCard", + OnUpdate510KScore = "OnUpdate510KScore", + OnUpdateXISCORE = "OnUpdateXISCORE", + OnUpdateALL510KSCORE = "OnUpdateALL510KSCORE", + EventShangYou = "EventShangYou" + +} +return SanQianFen_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_MainView.lua b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_MainView.lua new file mode 100644 index 00000000..c68109d0 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_MainView.lua @@ -0,0 +1,1794 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 9:41 +--- +local PKMainView = import("main.poker.PKMainView") +local SanQianFen_PlayerPokerInfoView = import(".SanQianFen_PlayerPokerInfoView") +local SanQianFen_PlayerSelfPokerInfoView = import(".SanQianFen_PlayerSelfPokerInfoView") +local SanQianFen_GameEvent = import(".SanQianFen_GameEvent") +local SanQianFen_ResultView = import(".SanQianFen_ResultView") +local SanQianFen_RightPanelView = import(".SanQianFen_RightPanelView") +local PlayerInfoView = import(".EXPlayerInfoView") +local TableBG = import('Game.Data.TableBG') +local M = {} +function M.new() + setmetatable(M, {__index = PKMainView}) + local self = setmetatable({}, {__index = M}) + self.class = "SanQianFen_MainView" + --self._full = true + self:init() + self._gamectr = ControllerManager.GetController(GameController) + return self +end + +local default_bg = 1 +local bg_config = { + {id = 1, url = 'extend/poker/sanqianfen/bg/bg1', thumb = 'ui://Extend_Poker_SanQianFen/table_bg1'}, + {id = 2, url = 'extend/poker/sanqianfen/bg/bg2', thumb = 'ui://Extend_Poker_SanQianFen/table_bg2'}, + {id = 3, url = 'extend/poker/sanqianfen/bg/bg3', thumb = 'ui://Extend_Poker_SanQianFen/table_bg3'} +} + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/poker/sanqianfen/ui/Extend_Poker_SanQianFen") + PKMainView.InitView(self, "ui://Extend_Poker_SanQianFen/SanQianFen_Main_" .. room.room_config.people_num,nil,1,default_bg,bg_config,nil,"ui://Extend_Poker_SanQianFen/SettingWindow1") + local _room = DataManager.CurrenRoom + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id.._room.game_id.."pai") + if json_data == nil then + local _gamectr = self._gamectr + self._room.pai = 0 + else + local _data = json.decode(json_data) + local pai = _data["pai"] + self._room.pai = pai + end + + json_data = Utils.LoadLocalFile(user_id.._room.game_id.."cardsize") + if json_data == nil then + local _gamectr = self._gamectr + self._room.cardsize = 1 + else + local _data = json.decode(json_data) + local cardsize = _data["cardsize"] + self._room.cardsize = cardsize + end + + local view1_510k = self._view:GetChild("10k5") + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + --printlog("aaaaaaaaaaaaaa111111111111111111111111111") + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem, self) + -- local zong = _player_info[i]._view:GetChild("zong") + -- zong:GetChild('score_ju').text = "0" + -- zong:GetChild('score_zong').text = "0" + -- zong:GetChild('xi_ju').text = "0" + -- zong:GetChild('xi_zong').text = "0" + _player_info[i]._view:GetChild('510score').text = "0" + local c1 = view1_510k:GetChild('play_name'..i) + local c2 = view1_510k:GetChild('play_lishi'..i) + local c3 = view1_510k:GetChild('play_ju'..i) + local c4 = view1_510k:GetChild('play_zong'..i) + _player_info[i]:InitScoreComp(c1,c3,c2,nil,c4) + tem.visible = false + end + + + local list = self._room.player_list + for i=1,#list do + local p = list[i] + local info = _player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + end + + + local rightpanel = self._view:GetChild("right_panel") + if self._rightPanelView ~= nil then + self._rightPanelView:Destroy() + end + + self._rightPanelView = SanQianFen_RightPanelView.new(self, rightpanel) + for i=1,#self._room.player_list do + + if self._room.self_player.seat==self._room.player_list[i].seat and self._room.self_player.self_user.account_id ~= self._room.player_list[i].self_user.account_id then + -- body + local ErrorMsgTip = UIPackage.CreateObject("Common", "Win_ConnectTip") + local _action = self._view:AddChild(ErrorMsgTip) + _action.xy = Vector2((self._view.width - _action.width) / 4, self._view.height / 4) + local text = _action:GetChild("tex_message") + local btn1 = _action:GetChild("btn_connect") + local btn2 = _action:GetChild("btn_back") + text.text = "您来晚了,座位有人,请重新进牌桌" + btn1.visible=false + btn2:Center() + btn2.y=btn2.y+50 + btn2.onClick:Set(function() + -- body + ErrorMsgTip:Destroy() + ErrorMsgTip = nil + self._gamectr:LevelRoom(function(res) + ViewUtil.CloseModalWait() + NetResetConnectWindow.CloseNetReset() + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + end) + end + end + + if self._room.hpOnOff == 1 and self._room.score_times ~= 1 then + -- body + self._view:GetChild("roominfo_panel1"):GetChild("tex_beishu").text=self._room.score_times .."倍" + else + self._view:GetChild("roominfo_panel1"):GetChild("tex_beishu").text="" + end + -- self.AllScore = self._view:GetChild("AllScore") + --self.AllScore.text = "总分:".."0" + local view_510k = self._view:GetChild("10k5") + local ctr_peple = view_510k:GetController("c1") + ctr_peple.selectedIndex = room.room_config.people_num == 3 and 1 or 0 + self.num_5 = view_510k:GetChild("num_5") + self.num_10 = view_510k:GetChild("num_10") + self.num_k = view_510k:GetChild("num_k") + self.num_zong = view_510k:GetChild("num_zong") + self.num_5.text = "0" + self.num_10.text = "0" + self.num_k.text = "0" + self.num_zong.text = "0" + + self.FlyScore = self._view:GetChild("FlyScore") + self.FlyScoreXY = self.FlyScore.xy + self.FlyScore.visible = false + self.ctr_state = self._view:GetController("state") + self._ctr_action = self._view:GetController("action") + self._tex_leftTime = self._view:GetChild("time"):GetChild("title") + self.ctr_time = self._view:GetController("time") + self._text_round = self._view:GetChild("round") + self.ctr_card_eff = self._view:GetController("card_eff") + self._player_card_info = {} + + -- self.test = self._view:GetChild("test") + -- self.test.onClick:Set( + -- function() + -- local head_info = self._player_info[1] + -- head_info.ctr_shangyou.selectedIndex = 1 + -- end + + -- ) + + + + local _player_card_info = self._player_card_info + for i = 1, room.room_config.people_num do + local tem = self._view:GetChild("player_card_info_" .. i) + _player_card_info[i] = self:NewPlayerCardInfoView(tem, i) + end + + local list = room.player_list + if not room.self_player.ready then + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig then + if round>1 then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 2 + end + + else + self._ctr_action.selectedIndex = 1 + end + else + self._ctr_action.selectedIndex = 0 + end + self._left_time = 0 + self.bgm_index = 1 + local state = self._room.CurnrenState + + if room.CurnrenState ~= StateType.PalyingWait then + self._state.selectedIndex = state + if room.CurnrenState == StateType.Palying then + self:ReConnectForStart() + end + else + + self._state.selectedIndex = StateType.Palying + self:ReconnectForClearing() + + end + + self._view:GetChild("btn_back_jiesan").onClick:Set(function () + if self.dismiss_room_cd_time > 0 then + ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!") + else + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:AskDismissRoom() + end + + end) + --local tempdsaf=self._view:GetChild("btn_back_jiesan") + --tempdsaf:GetChild("n3").displayObject.gameObject:SetActive(false) + --self._view:GetChild("btn_back_jiesan").displayObject.gameObject:SetActive(false) + + self:ChangeBgmMusic() + self:EventInit() + + self._view:GetChild("mask").onClick:Set(function() + self:ResetPoker() + end) + local btn_rule = self._view:GetChild("right_panel"):GetChild("btn_log") + --self._view:GetChild('info_text'):GetChild('text').text = room.room_config:GetDes() + if room.room_config.Leaf == 1 then + if room.room_config.people_num ==2 then + self._view:GetChild('wanfa_text').text = '二人三千分' .. room.score_times .. '倍' + else + self._view:GetChild('wanfa_text').text = '三人三千分' .. room.score_times .. '倍' + end + else + if room.room_config.people_num == 2 then + self._view:GetChild('wanfa_text').text = '二人三千分' .. room.score_times .. '倍' + else + self._view:GetChild('wanfa_text').text = '三人三千分' .. room.score_times .. '倍' + end + end + + if self._view:GetChild("shengyu")~=nil then + -- body + + if room.room_config.Leaf==1 then + -- body + self._view:GetChild("shengyu"):GetChild("shengyu").text="剩余15张" + else + self._view:GetChild("shengyu"):GetChild("shengyu").text="剩余16张" + end + end + +end + +function M:RunLeftPoker(list) + -- self._view + self._left_View = UIPackage.CreateObject("Extend_Poker_SanQianFen","Panel_poker") + self._view:AddChild(self._left_View) + self._left_View:Center() + local _left_View = self._left_View + local list_left_card = self._left_View:GetChild("Lst_leftPoker") + list_left_card:RemoveChildrenToPool() + for i = 1, #list do + local item = list_left_card:AddItemFromPool("ui://Extend_Poker_SanQianFen/305") + end + self._left_View:GetTransition("t0"):Play() + + coroutine.start(function() + coroutine.wait(1.5) + _left_View:Dispose() + -- self._popEvent = true + end) +end + +function M:UpdateCard( index ) + self._room.pai=index + local card_info = self._player_card_info[1] + -- for i=1,#self._room.player_list do + -- print(i) + -- end + card_info:updatePoker() + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + + if self._room.curren_turn_seat ~= player.seat then + if player.out_card_list[1] == 0 then + player_card_info:SetOutCardInfo(nil, true) + else + player_card_info:SetOutCardInfo(player.out_card_list, false) + end + end + end + if self.caozuo==1 then + local ctr_number = self.pass == nil and 2 or 1 + local lastCardList = self._gamectr:GetLastCardList(self._room.self_player.seat) + local cardType, cardNum, cardLength = self._gamectr:GetCardListInfo(lastCardList) + local m = false + local next_seat = self._room.self_player.seat + 1 + if next_seat > self._room.room_config.people_num then + next_seat = next_seat - self._room.room_config.people_num + end + if self._room:GetPlayerBySeat(next_seat).hand_count == 1 and self._room.room_config.WillBeOut == 1 then + m = true + end + local zdts = self._view:GetController("zidongtishi").selectedIndex + self._player_card_info[1]:ShowOutCardOption(ctr_number, cardType, cardNum, cardLength,m) + end +end + +function M:UpdateCardSize(index) + self._room.cardsize=index + local card_info = self._player_card_info[1] + card_info:updatePoker() +end + +function M:NewPlayerCardInfoView(tem, index) + if index == 1 then + return SanQianFen_PlayerSelfPokerInfoView.new(tem, self) + end + return SanQianFen_PlayerPokerInfoView.new(tem, self) +end + +function M:OnPlayerEnter(...) + MainView.OnPlayerEnter(self, ...) + local arg = {...} + local p = arg[1] + local index = self:GetPos(p.seat) + local info = self._player_info[index] + local selecet_seat = self._view:GetChild("seat_" .. index) + if selecet_seat ~= nil then + selecet_seat.visible = true + end + info:FillData(p) + if self._room.banker_seat == self._room.self_player.seat and self._room.self_player.ready then + self._ctr_action.selectedIndex = 0 + end +end + +function M:OnPlayerReady(...) + local arg = {...} + local p = arg[1] + local _room = self._room + local _player_info = self._player_info + if p.seat == _room.self_player.seat then + self._ctr_action.selectedIndex = 0 + end + local info = _player_info[self:GetPos(p.seat)] + info:Ready(true) +--local readyNum = 0 +--for i = 1, #_room.player_list do +-- local player = _room.player_list[i] +-- if player.ready then readyNum = readyNum + 1 end +--end +--if _room.banker_seat == _room.self_player.seat and readyNum > 1 and readyNum == _room.room_config.people_num then +-- if self._state.selectedIndex == 2 then +-- local _gamectr = ControllerManager.GetController(GameController) +-- _gamectr:StartGame() +-- end +-- --self._ctr_action.selectedIndex = 2 +--end +end + +function M:OnPlayerLeave(...) + MainView.OnPlayerLeave(self, ...) + local _room = self._room + if not _room.self_player.ready then + --self._ctr_action.selectedIndex = 1 + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig then + if round>1 then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 2 + end + + else + self._ctr_action.selectedIndex = 1 + end + else + self._ctr_action.selectedIndex = 0 + end +end + + +function M:EventInit() + local _gamectr = ControllerManager.GetController(GameController) + MainView.EventInit(self) + local _player_info = self._player_info + local _player_card_info = self._player_card_info + local _room = self._room + + --local head_info = _player_info[1] + --head_info.shangyouObj.visible = true + + _gamectr:AddEventListener(SanQianFen_GameEvent.EventXiPai,function( ... ) + + if self.result_view ~= nil then + self.result_view:Destroy() + self.result_view = nil + end + + self._player_card_info[1]:HidePiao() + + if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + self.MypokerList = cardlist + end + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 0 + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local head_info = self._player_info[self:GetPos(p.seat)] + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + -- body + + if self._room.room_config.showlength==1 then + -- body + head_info._view:GetController("shengyu").selectedIndex=1 + else + head_info._view:GetController("shengyu").selectedIndex=0 + end + + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..p.hand_count.."张" + + + + end + p:Clear() + head_info:FillData(p) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:Clear() + head_info:Ready(false) + + end + + + --[[if ( currentPlayer ) then + self._popEvent = false + local xipaiCB=function () + self._popEvent = true + end + self:PlayXiPai(xipaiCB) + else + ViewUtil.ShowModalWait(self._root_view,"等待其它玩家洗牌...") + coroutine.start(function() + coroutine.wait(3) + ViewUtil.CloseModalWait() + end) + + + end--]] + + + local arg = {...} + local currentPlayer1=arg[1] + local currentPlayer2=arg[2] + self._popEvent = false + if ( currentPlayer1 ) then + + local xipaiCB=function () + self._popEvent = true + end + self:PlayXiPai(xipaiCB) + + end + + + if ( currentPlayer2 ) then + --self._popEvent = false + local xipaiCB2=function () + self._popEvent = true + end + self:PlayXiPai1(xipaiCB2) + end + + + + end) + + _gamectr:AddEventListener(SanQianFen_GameEvent.OnMingCard, function(...) + local arg = {...} + local card = arg[1] + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 1 + self:PlayCardEff(card) + end) + + _gamectr:AddEventListener(SanQianFen_GameEvent.OnUpdateXISCORE, function(...) + local arg = {...} + local scoreList = arg[1] + + for i = 1, #scoreList do + local aid = scoreList[i].aid + local juXiFen = scoreList[i].juXiFen + local allXiFen = scoreList[i].allXiFen + local p = self._room:GetPlayerById(aid) + + local head_info = self._player_info[self:GetPos(p.seat)] + -- head_info._view:GetChild("zong"):GetChild('xi_ju').text = juXiFen + -- head_info._view:GetChild("zong"):GetChild('xi_zong').text = allXiFen + head_info.xi_zong.text = allXiFen + + end + -- printlog("aaaaaaaaaaaaaaaa "," ",cur510kFen) + + --self.AllScore.text = "总分:"..cur510kFen + end) + + _gamectr:AddEventListener(SanQianFen_GameEvent.OnUpdate510KScore, function(...) + + printlog("77777777777777777777777777888888888888888888888") + local arg = {...} + local cur510kFen = arg[2] + local scoreList = arg[1] + for i = 1, #scoreList do + local aid = scoreList[i].aid + local add510kfen = scoreList[i].add510kfen + local all510kfen = scoreList[i].all510kfen + local ju510kfen = scoreList[i].ju510kfen + local p = self._room:GetPlayerById(aid) + + local head_info = self._player_info[self:GetPos(p.seat)] + -- head_info._view:GetChild('510score').text = all510kfen + local zong = head_info._view:GetChild("zong") + head_info.score_ju.text = ju510kfen + head_info.score_zong.text = all510kfen + + end + -- local xy = self.FlyScore.xy + -- if scoreList[1].add510kfen > 0 then + -- self.FlyScore.text = scoreList[1].add510kfen + -- self.FlyScore.visible = true + -- local aid1 = scoreList[1].aid + -- self.num_5.text = "0" + -- self.num_10.text = "0" + -- self.num_k.text = "0" + + -- local p = self._room:GetPlayerById(aid1) + -- local head_info = self._player_info[self:GetPos(p.seat)] + + -- local target_xy = self._view:GlobalToLocal(head_info._view:LocalToGlobal(Vector2(50,189))) + -- local diff_x = target_xy.x - xy.x + -- local diff_y = target_xy.y - xy.y + -- self._tween_shaizi = TweenUtils.TweenFloat(0,1,0.8,function(value) + -- self.FlyScore.x = xy.x + diff_x * value + -- self.FlyScore.y = xy.y + diff_y * value + -- end):OnComplete(function () + + -- self.FlyScore.visible = false + -- self.FlyScore.xy = self.FlyScoreXY + -- end) + -- end + + + + + + end) + + _gamectr:AddEventListener(SanQianFen_GameEvent.OnUpdateALL510KSCORE, function(...) + local arg = {...} + local scoreList = arg[1] + --printlog("更新总分数==========================") + --pt(scoreList) + -- if self.coroutineUpdate510KScore ~= nil then + -- coroutine.stop(self.coroutineUpdate510KScore) + -- end + for i = 1, #scoreList do + + local aid = scoreList[i].aid + local ju510kfen = scoreList[i].ju510kfen + local all510kfen = scoreList[i].all510kfen + local juXiFen = scoreList[i].juXiFen + local curXiFen = scoreList[i].curXiFen + local p = self._room:GetPlayerById(aid) + --printlog("ccccccccc22222222222222222222222222 ",ju510kfen," ",all510kfen," ",juXiFen," ",curXiFen," ",p.seat," ",self:GetPos(p.seat)) + local head_info = nil + head_info = self._player_info[self:GetPos(p.seat)] + head_info.score_ju.text = ju510kfen + head_info.score_zong.text = all510kfen + --head_info.xi_ju.text = juXiFen + head_info.xi_zong.text = curXiFen + p.cur510kFen = all510kfen + p.juXiFen = juXiFen + p.ju510kFen = ju510kfen + p.curXiFen = curXiFen + printlog("wwwwwwwwwwwwwwww ",all510kfen) + + end + end) + + _gamectr:AddEventListener(SanQianFen_GameEvent.OnInitCard, function(...) + local arg = {...} + local round = arg[1] + local cardlist = arg[2] + + + if self.result_view ~= nil then + self.result_view:Destroy() + self.result_view = nil + end + + + + self._player_card_info[1]:HidePiao() + + if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + self.MypokerList = cardlist + end + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 0 + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + self:UpdateRound(round) + ViewUtil.PlaySound("SanQianFen_PK", "extend/poker/sanqianfen/sound/fapai.mp3") + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local head_info = self._player_info[self:GetPos(p.seat)] + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + -- body + + if self._room.room_config.showlength==1 then + -- body + head_info._view:GetController("shengyu").selectedIndex=1 + else + head_info._view:GetController("shengyu").selectedIndex=0 + end + + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..p.hand_count.."张" + + + + end + p:Clear() + head_info:FillData(p) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:Clear() + head_info:Ready(false) + + if p.seat == self._room.self_player.seat then + if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + card_info:InitPoker(cardlist,true,1) + else + card_info:InitPoker(cardlist,true) + end + + else + --card_info:UpdateHandPoker(#cardlist,true,false) --todo + --card_info:UpdateRemainCard(#cardlist,true) + end + + + -- head_info.xi_ju.text = "0" + + head_info.score_ju.text = "0" + + end + end) + + + -- _gamectr:AddEventListener(SanQianFen_GameEvent.Oener,function ( ... ) + -- local arg = {...} + -- local seat = arg[1] + -- local head_info = self._player_info[self:GetPos(seat)] + -- head_info._view:GetController("Oener").selectedIndex=1 + -- end) + _gamectr:AddEventListener(SanQianFen_GameEvent.OnIndexMove, function(...) + local arg = {...} + local seat = arg[1] + local isNewBout = arg[2] + local index = self:GetPos(seat) + + self.ctr_time.selectedIndex = index + -- for i=1,#self._player_info do + -- if index==i then + -- -- body + -- local head_info = self._player_info[index] + -- head_info:MarkBank(true) + -- else + -- local head_info = self._player_info[i] + -- head_info:MarkBank(false) + -- end + -- end + + if index == 1 then + local card_info = self._player_card_info[index] + card_info:SetOutCardInfo(nil, false) + -- if self.MypokerList ~= nil then + -- -- body + -- card_info:Clear() + -- card_info:InitPoker(self.MypokerList, false) + -- self.MypokerList = nil + -- end + end + self._left_time = 20 + if self._room.ming_card ~= nil then + self._view:GetTransition("t" .. index):Play() + self._room.ming_card = nil + if self.tween ~= nil then + TweenUtils.Kill(self.tween) + self.tween = nil + end + end + end) + + _gamectr:AddEventListener(SanQianFen_GameEvent.OnBombScore, function(...) + local arg = {...} + local scoreList = arg[1] + -- for i = 1, #scoreList do + -- local player = self._room:GetPlayerBySeat(i) + -- local card_info = self._player_card_info[self:GetPos(i)] + -- local head_info = self._player_info[self:GetPos(i)] + -- card_info:PlayScore(scoreList[i], true) + -- head_info:UpdateScore(player.total_score) + -- end + end) + + _gamectr:AddEventListener(SanQianFen_GameEvent.EventShangYou, function(...) + local arg = {...} + local seat = arg[1] + + local index = self:GetPos(seat) + local head_info = self._player_info[index] + head_info.ctr_shangyou.selectedIndex = 1 + end) + + + + _gamectr:AddEventListener(SanQianFen_GameEvent.OnPlaySucc, function(...) + local arg = {...} + local p = arg[1] + local card_number = arg[2] + local cardstype = arg[3] + local num = arg[4] + local otherList = arg[5] + local length = arg[6] + local add510k = arg[7] + local all510k = arg[8] + local cur5Num = arg[9] + local cur10Num = arg[10] + local curkNum = arg[11] + self.ctr_time.selectedIndex = 0 + + + if self.num_5 then + self.num_5.text = cur5Num + end + + if self.num_10 then + self.num_10.text = cur10Num + end + + if self.num_k then + self.num_k.text = curkNum + end + + if self.num_zong then + self.num_zong.text = all510k + end + -- if self.AllScore then + -- self.AllScore.text = "总分:"..all510k + -- end + local index = self:GetPos(p.seat) + if index==1 then + self.caozuo=0 + end + local head_info = self._player_info[index] + if head_info._view:GetChild("shengyu")~=nil then + -- body + -- body + if card_number~=nil then + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..card_number.."张" + end + + + end + local card_info = self._player_card_info[index] + card_info:SetOutCardInfo(p.out_card_list, false, true) + for i = 1, #otherList do + local other_seat = otherList[i] + local other_card_info = self._player_card_info[self:GetPos(other_seat)] + other_card_info:SetOutCardBlack() + end + + if index == 1 then + card_info:DeleteHandCards(p.out_card_list) + else + card_info:SetRemainCardNumber(card_number == 1) + --card_info:UpdateHandPoker(card_number,false,false) -- todo + end + if self._room.is_new_bout == true then + for i = 1, #self._room.player_list do + local player = self._room.player_list[i] + local card_info_i = self._player_card_info[self:GetPos(player.seat)] + if p.seat ~= player.seat then + card_info_i:SetOutCardInfo(nil, false) + end + end + + self:_Effect(cardstype, p) + + else + if cardstype == 11 and cardstype~=12 then + self:_Effect(cardstype, p) + end + end + self:PlaySound(p.self_user.sex, self:GetSoundFileName(cardstype, num, self._room.is_new_bout)) + if card_number == 1 then + --self:ChangeBgmMusic(2) + self:ChangeBgmMusic(1) + if self._cor_sound ~= nil then + coroutine.stop(self._cor_sound) + end + self._cor_sound = nil + self._cor_sound = coroutine.start(function() + coroutine.wait(1) + ---self:PlaySound(p.self_user.sex, "card_1") + end) + end + + end) + + + _gamectr:AddEventListener(SanQianFen_GameEvent.OnPassSuccCheckCard, function(...) + self._popEvent = false + local arg = {...} + local seat = arg[1] + local cards = arg[2] + --self.MypokerList=cards + self.ctr_time.selectedIndex = 0 + local card_info = self._player_card_info[self:GetPos(seat)] + if seat == self._room.self_player.seat then + card_info:ClearCheck() + card_info:InitPoker(cards, false) + + --local player=self._room:GetPlayerBySeat(seat) + --if player.out_card_list[1] == 0 then + -- player_card_info:SetOutCardInfo(nil, true) + --else + --player:SetOutCardInfo({207}, false) + -- end + end + + self._popEvent = true + + end) + + _gamectr:AddEventListener(SanQianFen_GameEvent.OnPassSucc, function(...) + local arg = {...} + local p = arg[1] + + self.ctr_time.selectedIndex = 0 + local card_info = self._player_card_info[self:GetPos(p.seat)] + + --card_info:SetOutCardInfo(nil, false) + if p.seat == self._room.self_player.seat and self.MypokerList ~= nil then + -- body + card_info:Clear() + card_info:InitPoker(self.MypokerList, false) + self.MypokerList = nil + end + card_info:SetOutCardInfo(nil, true) + self:PlaySound(p.self_user.sex, "pass_" .. math.random(1, 4)) + end) + + _gamectr:AddEventListener(SanQianFen_GameEvent.OnErrorTip, function(...) + local arg = {...} + local error_str = arg[1] + self._player_card_info[1]:ErrorTip(error_str) + -- self._player_card_info[1]:ResetPoker() + end) + + _gamectr:AddEventListener(SanQianFen_GameEvent.OnPiaoTips, function(...) + local arg = {...} + local piao = arg[1] + local reload = arg[2] + if reload == 0 then + + if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + self.MypokerList = cardlist + end + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 0 + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + self:UpdateRound(self._room.curren_round) + + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local head_info = self._player_info[self:GetPos(p.seat)] + + p:Clear() + head_info:FillData(p) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:Clear() + head_info:Ready(false) + head_info:UpdatePiao(-1) + end + end + + self._player_card_info[1]:ShowPiao(piao) + end) + + _gamectr:AddEventListener(SanQianFen_GameEvent.OnPiaoAction, function(...) + local arg = {...} + local seat = arg[1] + local piao = arg[2] + local head_info = self._player_info[self:GetPos(seat)] + head_info:UpdatePiao(piao) + end) + + _gamectr:AddEventListener(SanQianFen_GameEvent.OnOptions, function(...) + local arg = {...} + local play = arg[1] + local pass = arg[5] + local card_type = arg[2] + local card_number = arg[3] + local card_length = arg[4] + local ctr_number = pass == nil and 2 or 1 + self.caozuo=1 --记录是否是自己出牌的阶段 + self.pass=pass + local m = false + local next_seat = self._room.self_player.seat + 1 + local card_info = self._player_card_info[1] + --card_info:SetOutCardInfo(nil, false) + if self.MypokerList ~= nil then + -- body + card_info:Clear() + card_info:InitPoker(self.MypokerList, false) + self.MypokerList = nil + end + if next_seat > self._room.room_config.people_num then + next_seat = next_seat - self._room.room_config.people_num + end + if self._room:GetPlayerBySeat(next_seat).hand_count == 1 and self._room.room_config.WillBeOut == 1 then + m = true + end + local zdts = self._view:GetController("zidongtishi").selectedIndex + self._player_card_info[1]:ShowOutCardOption(ctr_number, card_type, card_number, card_length,m,play,zdts) + end) + -- 托管 + _gamectr:AddEventListener(SanQianFen_GameEvent.Game_TuoGuan, function(...) + local arg = {...} + local tuoguan = arg[1] + local seat = arg[2] + + local tuoguanzhong = self._view:GetChild("tuoguanzhong") + local zhezhao = self._view:GetChild("n109") + local head_info = self._player_info[self:GetPos(seat)] + if (tuoguan == 1) then + if (seat == self._room.self_player.seat ) then + tuoguanzhong.visible = true + -- tuoguanzhong.sortingOrder = 2 + zhezhao.visible = true + zhezhao.onClick:Set(function() + _gamectr:TuoGuan(0) + end) + else + head_info._view:GetController("tuoguan").selectedIndex = 1 + end + -- if self.ispanguangzhe == true then + -- -- body + -- zhezhao.visible = false + -- end + else + if (seat == self._room.self_player.seat) then + tuoguanzhong.visible = false + zhezhao.visible = false + -- local btn_tuoguan = self._view:GetChild("n107") + -- btn_tuoguan.onClick:Set(function() + -- _gamectr:TuoGuan(1) + -- -- self:ZhiNengtuoguan() + -- end) + else + head_info._view:GetController("tuoguan").selectedIndex = 0 + end + end + end) + _gamectr:AddEventListener(SanQianFen_GameEvent.OnResult, function(...) + local arg = {...} + local over = arg[1] + local info = arg[2] + local win_seat = arg[3] + local remaincards = arg[4] + -- local energyTab = arg[5] + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if self.MypokerList ~= nil then + -- body + local card_info = self._player_card_info[self:GetPos(self._room.self_player.seat)] + card_info:Clear() + card_info:InitPoker(self.MypokerList, false) + self.MypokerList = nil + end + if otherpoker_list ~= nil then + -- body + otherpoker_list:RemoveChildrenToPool() + otherpoker_list.visible=true + end + + if remaincards then + -- body + local newremaincards = _gamectr:ChangeCodeByFrom(remaincards,true) + table.sort(remaincards) + for i = #newremaincards, 1, -1 do + coroutine.start(function() + coroutine.wait(0.01) + + local flow = newremaincards[i] % 10 + local num = (newremaincards[i] - (newremaincards[i] % 10)) / 10 + local card_n = flow * 100 + num + local poker_item = UIPackage.CreateObject("Extend_Poker_SanQianFen", "poker6") + + --local code = self:ChangeCodeByTo(card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/" .. card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + local card_code_obj = nil + if DataManager.CurrenRoom.pai==0 then + if card_n==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..card_n.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..card_n) + end + + else + if card_n==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..card_n.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + end + + end + if card_code_obj ~= nil then + card_code_obj:SetScale(0.6, 0.6) + if poker_item ~= nil then + poker_item:AddChild(card_code_obj) + if otherpoker_list then + otherpoker_list:AddChild(poker_item) + end + end + + end + + end) + + + end + + end + if self._cor_sound ~= nil then + coroutine.stop(self._cor_sound) + self._cor_sound = nil + end + + if self.destory_win ~= nil then + coroutine.stop(self.destory_win) + end + + self.destory_win = nil + self.destory_win = coroutine.start(function() + -- print("11111111111111") + -- coroutine.wait(1) + if self._room.self_player.seat == win_seat then + local sprint_seat_list = self:GetSpringSeats(info) + if #sprint_seat_list > 0 then + local url = "ui://Extend_Poker_SanQianFen/Spring" + self.WinItem_view = UIPackage.CreateObjectFromURL(url) + self._view:AddChild(self.WinItem_view) + self.WinItem_view:Center() + self.WinItem_view:GetTransition("t0"):Play() + ViewUtil.PlaySound("SanQianFen_PK", "base/common/sound/win new.mp3") + end + -- local url = #sprint_seat_list > 0 and "ui://Extend_Poker_SanQianFen/Spring" or "ui://Extend_Poker_SanQianFen/Win_Mine" + + + else + local beigang = false + if #self:GetSpringSeats(info)>0 then + for i=1,#self:GetSpringSeats(info) do + if self:GetSpringSeats(info)[i]==self._room.self_player.seat then + local url = "ui://Extend_Poker_SanQianFen/spring2" + self.WinItem_view = UIPackage.CreateObjectFromURL(url) + self._view:AddChild(self.WinItem_view) + self.WinItem_view:Center() + self.WinItem_view:GetTransition("t0"):Play() + beigang=true + end + end + + end + -- if beigang == false then + -- self:CreateRankEff() + -- end + + end + for i = 1, #info do + local player = info[i] + local p = self._room:GetPlayerBySeat(player.seat) + local head_info = self._player_info[self:GetPos(player.seat)] + + --head_info.ctr_shangyou.selectedIndex = 0 + local card_info = self._player_card_info[self:GetPos(player.seat)] + if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then + p.hp_info = player.hp_info + head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) + --head_info._view:GetChild('zhanji').visible = true + local num = player.hp_info.total_hp + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(player.hp_info.total_hp) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + end + card_info:PlayScore(d2ad(player.hp_info.round_actual_hp), false, win_seat == player.seat) + else + local rt = 1 + if self._room.hpOnOff == 1 then + rt = self._room.score_times + end + if over == 1 and self._room.hpOnOff == 1 then + head_info:UpdateScore(player.score / 10) --不可负分 + else + head_info:UpdateScore(player.score * rt) + end + card_info:PlayScore(player.winscore * rt, false, win_seat == player.seat) + end + + + if player.seat ~= self._room.self_player.seat then + card_info:UpdateHandPoker(player.cards, false, true) + card_info:SetRemainCardNumber(false) + end + end + self:ChangeBgmMusic(1) + -- if over == 0 then + if #self:GetSpringSeats(info) > 0 then + -- print("222222222222222222") + coroutine.wait(1) + else + -- print("333333333333333333") + -- coroutine.wait(2) + end + + self._left_View = UIPackage.CreateObject("Extend_Poker_SanQianFen","Panel_poker") + self._view:AddChild(self._left_View) + self._left_View:Center() + local _left_View = self._left_View + local list_left_card = self._left_View:GetChild("Lst_leftPoker") + list_left_card:RemoveChildrenToPool() + for i = 1, #remaincards do + local x = remaincards[i] % 100 + local t = remaincards[i] + if x == 8 then + t = remaincards[i] - 3 + end + local item = list_left_card:AddItemFromPool("ui://Extend_Poker_SanQianFen/"..t) + end + self._left_View:GetTransition("t0"):Play() + coroutine.wait(2) + + for i = 1, #info do + + local head_info1 = self._player_info[i] + head_info1.ctr_shangyou.selectedIndex = 0 + end + _left_View:Dispose() + + + self.result_view = SanQianFen_ResultView.new(self._root_view, info, self._room.room_id, over, win_seat, 0, remaincards) + self.result_view:Show() + if self.WinItem_view ~= nil then + self.WinItem_view:Dispose() + self.WinItem_view = nil + end + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + + if self._room.self_player.entrust == true then + local btn_confirm = self.result_view._view:GetChild("btn_confirm") + btn_confirm.onClick:Call() + end + + end) + if over==1 then + -- body + self:UnmarkSelfTuoguan() + ControllerManager.ChangeController(LoddyController) + + end + end) + + _gamectr:AddEventListener(SanQianFen_GameEvent.OnResultByDissolve, function(...) + + local arg = {...} + local over = arg[1] + local info = arg[2] + local winseat = arg[3] + local dissolve = arg[4] + + self.result_view = SanQianFen_ResultView.new(self._root_view, info, self._room.room_id, over, winseat, dissolve,nil) + self.result_view:Show() + ControllerManager.ChangeController(LoddyController) + self:UnmarkSelfTuoguan() + end) + + -- 确定开始下一局 成功 + _gamectr:AddEventListener(SanQianFen_GameEvent.OnConfrimToNextGameSucc, function(...) + local arg = {...} + local aid = arg[1] + local p = self._room:GetPlayerById(aid) + if p.seat == self._room.self_player.seat then + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + if self.destory_win ~= nil then + coroutine.stop(self.destory_win) + self.destory_win = nil + end + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + local player_head = self._player_info[self:GetPos(player.seat)] + player_card_info:Clear() + local otherpoker_list = self._view:GetChild("otherpoker_list") + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + --player_head._view:GetController("Oener").selectedIndex=0 + end + end + local player_info = self._player_info[self:GetPos(p.seat)] + player_info:Ready(true) + end) +end + +function M:ReConnectForStart() + + local _gamectr = ControllerManager.GetController(GameController) + self._room.is_new_bout = _gamectr:GetIsNewBout(self._room.curren_turn_seat) + self._state.selectedIndex = 1 + self._view:GetController("time").selectedIndex = self:GetPos(self._room.curren_turn_seat) + + self:UpdateRound(self._room.curren_round) + --self.AllScore.text = "总分:"..self._room.cur510kFen + self.num_5.text = self._room.cur5Num + self.num_10.text = self._room.cur10Num + self.num_k.text = self._room.curkNum + self.num_zong.text =self._room.cur510kFen + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + local head_info = self._player_info[self:GetPos(player.seat)] + head_info:Ready(false) + + --如果是体力值不可负分模式 则显示当前的hp值 + if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then + head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) + --head_info._view:GetChild('zhanji').visible = true + local num = player.hp_info.total_hp + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = '+' .. d2ad(player.hp_info.total_hp) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + end + else + local rt = 1 + if self._room.hpOnOff == 1 then + rt = self._room.score_times + end + head_info:UpdateScore(player.total_score * rt) + end + + head_info:UpdateLineState(player.line_state) + head_info:UpdatePiao(player.piao) + + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + -- body + + + if self._room.room_config.showlength==1 then + -- body + head_info._view:GetController("shengyu").selectedIndex=1 + else + head_info._view:GetController("shengyu").selectedIndex=0 + end + + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..player.hand_count.."张" + + + + end + if player.seat == self._room.self_player.seat then + if player.open ~= nil and player.open == 0 and self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + self.MypokerList = player.hand_list + player_card_info:InitPoker(player.hand_list, false, 1) + + else + + player_card_info:InitPoker(player.hand_list, false) + end + + else + + player_card_info:SetRemainCardNumber(player.hand_count == 1) + if player.hand_count == 1 then + self.bgm_index = 2 + end + end + if self._room.curren_turn_seat ~= player.seat then + -- head_info:MarkBank(false) + if player.out_card_list[1] == 0 then + player_card_info:SetOutCardInfo(nil, false) + else + player_card_info:SetOutCardInfo(player.out_card_list, false) + end + else + -- head_info:MarkBank(true) + end + end +end + +function M:ReconnectForClearing() + self:UpdateRound(self._room.curren_round) + --self.AllScore.text = "总分:"..self._room.cur510kFen + self.num_5.text = self._room.cur5Num + self.num_10.text = self._room.cur10Num + self.num_k.text = self._room.curkNum + self.num_zong.text =self._room.cur510kFen + local win_seat = 0 + --self.rank_view = self:CreateRankEff(self._room.winseat) + for _, player in ipairs(self._room.player_list) do + local head_info = self._player_info[self:GetPos(player.seat)] + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + + --如果是体力值不可负分模式 则显示当前的hp值 + if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then + head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) + --head_info._view:GetChild('zhanji').visible = true + local num = player.hp_info.total_hp + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = '+' .. d2ad(player.hp_info.total_hp) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + end + -- player_card_info:PlayScore(d2ad(player.hp_info.round_actual_hp)) + else + local rt = 1 + if self._room.hpOnOff == 1 then + rt = self._room.score_times + end + head_info:UpdateScore(player.total_score * rt) + -- player_card_info:PlayScore(player.winscore * rt, false, self._room.winseat) + end + + head_info:UpdateLineState(player.line_state) + --head_info._view:GetController("Oener").selectedIndex=0 + head_info:UpdatePiao(player.piao) + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + -- body + + if self._room.room_config.showlength==1 then + -- body + head_info._view:GetController("shengyu").selectedIndex=1 + else + head_info._view:GetController("shengyu").selectedIndex=0 + end + + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..player.hand_count.."张" + + end + + + if player.seat == self._room.self_player.seat then + + player_card_info:InitPoker(player.hand_list, false) + else + player_card_info:UpdateHandPoker(player.hand_list, false, true) + end + if player.out_card_list[1] == 0 then + + player_card_info:SetOutCardInfo(nil, false) + else + player_card_info:SetOutCardInfo(player.out_card_list, false) + end + end + win_seat=self._room.winseat + self._room.winseat = nil + + local remaincards = self._room.remaincards + if self._room.game_status==1 then + + + -- body + coroutine.start(function() + coroutine.wait(0.3) + + self.result_view = SanQianFen_ResultView.new(self._root_view, self._room.player_list, self._room.room_id, 0, win_seat,0,remaincards) + self.result_view:Show() + local card_info = self._player_card_info[1] + card_info._view:GetChild("out_card_list").visible=true + end) + if remaincards then + + local newremaincards = self._gamectr:ChangeCodeByFrom(remaincards,true) + + -- body + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list:RemoveChildrenToPool() + otherpoker_list.visible=true + end + + for i = #newremaincards, 1, -1 do + coroutine.start(function() + coroutine.wait(0.1 * (15 - i)) + + + local flow = newremaincards[i] % 10 + local num = (newremaincards[i] - (newremaincards[i] % 10)) / 10 + local card_n = flow * 100 + num + local poker_item = UIPackage.CreateObject("Extend_Poker_SanQianFen", "poker6") + + --local code = self:ChangeCodeByTo(card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/" .. card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + local card_code_obj + + if DataManager.CurrenRoom.pai==0 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..card_n) + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + end + if card_n==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..card_n.."_1") + end + if card_code_obj then + card_code_obj:SetScale(0.6, 0.6) + poker_item:AddChild(card_code_obj) + otherpoker_list:AddChild(poker_item) + end + end) + end + end + end +end + +function M:CreateRankEff() + self.rank_view = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/rank_eff") + self._view:AddChild(self.rank_view) + self.rank_view:Center() + self.rank_view:GetTransition("t0"):Play() +end + +function M:_Effect( type1 ,player) + -- body + + if type1 < 7 and type1 ~= 4 and type1 ~= 5 then + return + end + local eff_code = 0 + if type1 == 10 then + eff_code = 2 + elseif type1 == 11 then + eff_code = 3 + elseif type1 == 4 then + eff_code = 4 + elseif type1 == 12 then + return + elseif type1 == 5 then + eff_code = 5 + else + eff_code = 1 + end + local info = self._player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/eff_"..eff_code) + -- local effect = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/eff2_1") + effect.touchable = false + effect:GetTransition("t0"):Play() + -- effect:SetXY((self._view.width - effect.width) / 2,(self._view.hight - effect.hight) / 2) + if eff_code==3 then + self._view:AddChild(effect) + else + pNode:AddChild(effect) + end + + + if eff_code==1 then + self.eff_feiji = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/eff_feiji") + self._view:AddChild(self.eff_feiji) + self.eff_feiji:Center() + self.eff_feiji:GetTransition("t0"):Play() + end + if eff_code==3 then + effect:Center() + else + if self:GetPos(player.seat)== 1 then + effect.x,effect.y = 0,24 + else + effect.x,effect.y = 24,67 + end + end + + + -- effect:Center() + -- if eff_code ==3 then + -- coroutine.start(function() + -- coroutine.wait(1) + -- effect:Dispose() + -- end) + -- else + coroutine.start(function() + coroutine.wait(1) + if self.eff_feiji~=nil then + self.eff_feiji:Dispose() + end + effect:Dispose() + end) + -- end +end +-- function M:_Effect(type1, player) + -- if type1 < 7 and type1 ~= 4 then return end + -- local eff_code = 0 + -- if type1 == 10 then --顺子 + -- eff_code = 2 + -- elseif type1 == 11 then --炸 + -- eff_code = 3 + -- elseif type1 == 4 then --连对 + -- eff_code = 4 + -- else + -- eff_code = 6 + -- end + -- local info = self._player_card_info[self:GetPos(player.seat)] + -- local pNode = info._mask_liangpai + -- local effect = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/MovieClip" .. eff_code) + + -- effect.touchable = false + + -- --effect:SetXY((self._view.width - effect.width) / 2,(self._view.hight - effect.hight) / 2) + -- pNode:AddChild(effect) + -- if type1 == 10 then --顺子 + -- effect.x, effect.y = -400, -200 + -- elseif type1 == 11 then --炸 + -- effect.x, effect.y = -80, -225 + -- elseif type1 == 4 then --连对 + -- effect.x, effect.y = -400, -200 + -- else + -- effect.x, effect.y = -157, -140 + -- end + -- coroutine.start(function() + -- if type1== 10 or type1== 11 or type1== 4 then + -- -- body + -- coroutine.wait(2) + -- effect:Dispose() + -- else + -- coroutine.wait(1.2) + -- effect:Dispose() + -- end + + -- end) +-- if eff_code ==3 then +-- coroutine.start(function() +-- coroutine.wait(1) +-- effect:Dispose() +-- end) +-- else +-- coroutine.start(function() +-- coroutine.wait(2) +-- effect:Dispose() +-- end) +-- end +-- end + + +function M:UpdateRound(round) + local total_round = self._room.room_config.Times + self._text_round.text = string.format("%d / %d 局", round, total_round) +end + +function M:GetSoundFileName(type, num, isNewBout) + local fileName + if num == 8 then num =5 end + if isNewBout then + if type > 6 or type == 4 then + if type == 8 or type == 9 then + type = 7 + end + fileName = tostring(type) + elseif type > 2 then + fileName = string.format("3_%d", num) + else + fileName = string.format("%d_%d", type, num) + end + else + math.randomseed(os.time()) + if type > 2 and type ~= 11 then + local r = math.random(1, 3) + fileName = "dani_" .. r + elseif type == 11 then + fileName = tostring(type) + else + fileName = string.format("%d_%d", type, num) + end + end + return fileName +end + +function M:GetSpringSeats(player_info) + local seat_list = {} + local card_max_length = self._room.room_config.Leaf + 14 + for i = 1, #player_info do + local player = player_info[i] + if #player.cards == card_max_length then + seat_list[#seat_list + 1] = player.seat + end + end + return seat_list +end + +function M:PlayCardEff(card) + if self.cor_card_eff ~= nil then + coroutine.stop(self.cor_card_eff) + end + self.cor_card_eff = nil + local cor_time = 0.1 + self.cor_card_eff = coroutine.start(function() + self._popEvent = false + local eff = self._view:GetChild("poker_eff") + local poker_obj = eff:GetChild("poker") + local poker_back = eff:GetChild("di") + poker_back.visible = false + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/" .. card) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card .. "_2") + local card_code_obj + if DataManager.CurrenRoom.pai==0 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..card) + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card .. "_2") + end + if card_code_obj then + card_code_obj:SetScale(1, 1) + poker_obj:AddChild(card_code_obj) + card_code_obj.visible = true + end + + self.tween = TweenUtils.TweenFloat(0, 2340, cor_time, function(x) + poker_back.rotationY = x + poker_obj.rotationY = -180 + x + local x_1 = x % 360 + if (x_1 > 90 and x_1 < 270) then + poker_obj.visible = true + poker_back.visible = false + else + poker_obj.visible = false + poker_back.visible = true + end + end) + coroutine.wait(1) + self._popEvent = true + end) + +end + +function M:ResetPoker() + -- if self._room.curren_turn_seat == self._room.self_player.seat then + -- self._player_card_info[1]:ResetPoker() + -- end + self._player_card_info[1]:ResetPoker() +end + +function M:PlaySound(sex, path) + + local sex_path = ViewUtil.Sex_Chat[sex]-- 1 男 2 女 + local sound_path = string.format("extend/poker/sanqianfen/sound/%s/%s.mp3", sex_path, path) + ViewUtil.PlaySound("SanQianFen_PK", sound_path) +end + +function M:ChangeBgmMusic(bgm_index) + if bgm_index == nil then + bgm_index = self.bgm_index + else + self.bgm_index = bgm_index + end + ViewUtil.PlayMuisc("SanQianFen_PK", string.format("extend/poker/sanqianfen/sound/bgm%d.mp3", 1)) +end +function M:OnPlayerEnter( ... ) + local arg = {...} + local p = arg[1] + for i=1,#self._room.player_list do + if self._room.self_player.seat==self._room.player_list[i].seat and self._room.self_player.self_user.account_id ~= self._room.player_list[i].self_user.account_id then + -- body + local ErrorMsgTip = UIPackage.CreateObject("Common", "Win_ConnectTip") + local _action = self._view:AddChild(ErrorMsgTip) + _action.xy = Vector2((self._view.width - _action.width) / 4, self._view.height / 4) + local text = _action:GetChild("tex_message") + local btn1 = _action:GetChild("btn_connect") + local btn2 = _action:GetChild("btn_back") + text.text = "您来晚了,座位有人,请重新进牌桌" + btn1.visible=false + btn2:Center() + btn2.y=btn2.y+50 + btn2.onClick:Set(function() + -- body + ErrorMsgTip:Destroy() + ErrorMsgTip = nil + self._gamectr:LevelRoom(function(res) + ViewUtil.CloseModalWait() + NetResetConnectWindow.CloseNetReset() + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + end) + end + end + -- if p ~= self._room.self_player and self._room.room_config.people_num <= 4 and self._room.room_config.people_num >= 3 and self._gamectr:CheckGPS() then + -- if self.distance_view then + -- self.distance_view:Destroy() + -- end + -- self.distance_view = PlayerDistanceView.new(true) + -- self.distance_view:Show() + -- end + -- local info = self._player_info[self:GetPos(p.seat)] + -- info:FillData(p) + -- info._view.visible = true + MainView.OnPlayerEnter(self, ...) +end + +function M:Destroy() + for i = 1, #self._room.player_list do + local player = self._room.player_list[i] + local card_info_i = self._player_card_info[self:GetPos(player.seat)] + + card_info_i:Destroy() + if card_info_i ~= nil and card_info_i.cor_init_poker ~= nil then + coroutine.stop(card_info_i.cor_init_poker) + end + end + PKMainView.Destroy(self) + UIPackage.RemovePackage("extend/poker/sanqianfen/ui/Extend_Poker_SanQianFen") +end + +return M diff --git a/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_Player.lua b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_Player.lua new file mode 100644 index 00000000..02cf92f3 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_Player.lua @@ -0,0 +1,35 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:42 +--- +local RunFast_Player = { + -- 手牌列表 + hand_count = 0, + out_card_list = {}, + hand_list = {}, + isOneCard= false, -- 报单 +} + +local M = RunFast_Player + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_count = 0 + self.out_card_list = {} + self.hand_list = {} + self.isOneCard = false + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_count = 0 + self.out_card_list = {} + self.hand_list = {} + self.isOneCard = false +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_PlayerBackView.lua b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_PlayerBackView.lua new file mode 100644 index 00000000..44c60ef1 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_PlayerBackView.lua @@ -0,0 +1,494 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/25 13:52 +--- +local PKPlayBackView = require('main.poker.PKPlayBackView') +local SanQianFen_PlayerCardInfoView = import('.SanQianFen_PlayerPokerInfoView') +local SanQianFen_PlayerSelfCardInfoView = import('.SanQianFen_PlayerSelfPokerInfoView') +local PlayerInfoView = import('.EXPlayerInfoView') +local SanQianFen_RightPanelView = import(".SanQianFen_RightPanelView") +local SanQianFen_ResultView = import(".SanQianFen_ResultView") +local M = {} + +local SanQianFen_Record_Event = { + Evt_OutCard = 'OutCard', + Evt_Pass = 'pass', + Evt_NewRound = 'newindex', + Evt_result = 'result', + Evt_Result = 'Result', + Evt_510kFen = '510kFen' + +} + +local default_bg = 1 +local bg_config = { + {id = 1, url = 'extend/poker/sanqianfen/bg/bg1', thumb = 'ui://Extend_Poker_SanQianFen/table_bg1'}, + {id = 2, url = 'extend/poker/sanqianfen/bg/bg2', thumb = 'ui://Extend_Poker_SanQianFen/table_bg2'}, + {id = 3, url = 'extend/poker/sanqianfen/bg/bg3', thumb = 'ui://Extend_Poker_SanQianFen/table_bg3'} +} + +--- Create a new +function M.new() + setmetatable(M, {__index = PKPlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = 'SanQianFen_PlayBackView' + self:init() + + return self +end + +function M:InitView(url) + local room = self._room + if not room.self_player then + room.self_player = room:GetPlayerBySeat(1) + end + self._gamectr = ControllerManager.GetController(GameController) + UIPackage.AddPackage('extend/poker/sanqianfen/ui/Extend_Poker_SanQianFen') + PKPlayBackView.InitView(self, 'ui://Extend_Poker_SanQianFen/SanQianFen_Main_' .. self._room.room_config.people_num, default_bg, bg_config) + self._tex_round = self._view:GetChild('round') + self._player_card_info = {} + local _player_card_info = self._player_card_info + for i = 1, room.room_config.people_num do + local tem = self._view:GetChild('player_card_info_' .. i) + self._player_card_info[i] = self:NewPlayerPokerInfoView(tem, i) + end + local rightpanel = self._view:GetChild("right_panel") + if self._rightPanelView ~= nil then + self._rightPanelView:Destroy() + end + + self._rightPanelView = SanQianFen_RightPanelView.new(self, rightpanel) + rightpanel:GetChild("btn_setting").onClick:Clear() + + local view1_510k = self._view:GetChild("10k5") + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild('player_info' .. i) + _player_info[i] = PlayerInfoView.new(tem, self) + + local c1 = view1_510k:GetChild('play_name'..i) + local c2 = view1_510k:GetChild('play_lishi'..i) + local c3 = view1_510k:GetChild('play_ju'..i) + local c4 = view1_510k:GetChild('play_zong'..i) + _player_info[i]:InitScoreComp(c1,c3,c2,nil,c4) + end + + local view_510k = self._view:GetChild("10k5") + self.num_5 = view_510k:GetChild("num_5") + self.num_10 = view_510k:GetChild("num_10") + self.num_k = view_510k:GetChild("num_k") + self.num_zong = view_510k:GetChild("num_zong") + self.num_5.text = "0" + self.num_10.text = "0" + self.num_k.text = "0" + self.num_zong.text = "0" + + local list = self._room.player_list + for i=1,#list do + local p = list[i] + local info = _player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + end + if self._room.hpOnOff == 1 and self._room.score_times ~= 1 then + -- body + self._view:GetChild('roominfo_panel1'):GetChild('tex_beishu').text = self._room.score_times .. '倍' + else + self._view:GetChild('roominfo_panel1'):GetChild('tex_beishu').text = '' + end + self._eventmap = {} + self._cmdmap = {} + self._cmdmap[SanQianFen_Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[SanQianFen_Record_Event.Evt_Pass] = self.CmdPass + self._cmdmap[SanQianFen_Record_Event.Evt_NewRound] = self.CmdNewRound + self._cmdmap[SanQianFen_Record_Event.Evt_result] = self.Cmdresult + self._cmdmap[SanQianFen_Record_Event.Evt_Result] = self.CmdResult + self._cmdmap[SanQianFen_Record_Event.Evt_510kFen] = self.CmdCur510kFen + +end + +function M:NewPlayerPokerInfoView(view, index) + if index == 1 then + return SanQianFen_PlayerSelfCardInfoView.new(view, self) + end + return SanQianFen_PlayerCardInfoView.new(view, self) +end + +function M:FillRoomData(data) + print("hidezhanji 1111") + self._currentStep = 1 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local roominfo_panel = self._view:GetChild('roominfo_panel1') + + roominfo_panel:GetChild('tex_roomid').text = data.info.roomid + roominfo_panel:GetChild('tex_gametype').text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + local head_info = self._player_info[self:GetPos(p.seat)] + + if p.total_hp then + print("hidezhanji 2222") + + head_info._view:GetChild('zhanji').visible=false + + if room.hpOnOff == 1 or room:checkHpNonnegative() then + --head_info._view:GetChild('zhanji').visible=true + head_info._view:GetChild('text_jifen').text = d2ad(p.total_hp) + end + end + head_info:FillData(p) + head_info:UnmarkTuoguan() + head_info:UpdateScore() + if p.seat ~= room.self_player.seat then + card_info:UpdateHandPoker(p.hand_list, false, true) + end + head_info:UpdatePiao(p.piao) + + end + + self:UpdateRound() + + self:GenerateAllStepData(data) + self:ShowStep(1) +end + +function M:ShowStep(index) + local step = self._step[index] + if step==nil then + return + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + + local info = self._player_card_info[self:GetPos(i)] + p.hand_list = step.player_card_data[i].hand_list + p.out_card_list = step.player_card_data[i].out_card_list + p.hand_left_count = #p.hand_list + + if p.seat ~= self._room.self_player.seat then + info:UpdateHandPoker(p.hand_list, false, true) + else + info:InitPoker(p.hand_list, false) + end + + end + + if step.cmd == SanQianFen_Record_Event.Evt_OutCard then + local seat = step.current_out_seat + local p = self._room:GetPlayerBySeat(seat) + local info = self._player_card_info[self:GetPos(seat)] + local card = step.out_card_list + local card_list = self._gamectr:ChangeCodeByFrom(card, true) + local head_info = self._player_info[self:GetPos(seat)] + self.num_5.text = step.cur5Num + self.num_10.text = step.cur10Num + self.num_k.text = step.curkNum + self.num_zong.text = step.all510k + -- head_info.score_ju = step.ju510kFen + -- head_info.xi_zong = step.curXiFen + -- head_info.score_zong = step.cur510kFen + info:SetOutCardInfo(card_list, false) + self:ClearNextSeatOutCard(seat) + end + + if step.cmd == SanQianFen_Record_Event.Evt_510kFen then + local seat = step.seat + --printlog("ccccccccccccccccc ",self:GetPos(seat)) + local head_info = self._player_info[self:GetPos(seat)] + head_info.score_ju.text = step.cur510kFen.ju510kFen + head_info.xi_zong.text = step.cur510kFen.curXiFen + head_info.score_zong.text = step.cur510kFen.cur510kFen + end + + if step.cmd == SanQianFen_Record_Event.Evt_Pass then + local seat = step.current_out_seat + local p = self._room:GetPlayerBySeat(seat) + local info = self._player_card_info[self:GetPos(seat)] + info:SetOutCardInfo(nil, true) + self:ClearNextSeatOutCard(seat) + end + if step.cmd == SanQianFen_Record_Event.Evt_NewRound then + for i = 1, #self._room.player_list do + local p = self._room:GetPlayerBySeat(i) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:SetOutCardInfo(nil, false) + end + end + if step.cmd == SanQianFen_Record_Event.Evt_result then + local result = step.result + for i = 1, #result do + local card_info = self._player_card_info[self:GetPos(result[i].seat)] + + if result[i].entrust ~= nil and result[i].entrust == true then + local head_info = self._player_info[self:GetPos(result[i].seat)] + head_info:MarkTuoguan() + end + -- head_info:UpdateScore(result[i].score) + card_info:PlayScore(result[i].score, false, step.win_seat == result[i].seat) + end + end + if step.cmd == SanQianFen_Record_Event.Evt_Result then + local Result = step.Result + self.result_view = SanQianFen_ResultView.new(self._root_view, Result.info, self._room.room_id, Result.type, Result.winseat, 0, Result.remaincards) + local num = self._view:GetChildIndex(self._view:GetChild("panel_record")) + self._view:AddChildAt(self.result_view._view, num) + else + if self.result_view then + self.result_view:Dispose() + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = '' + + step.win = 0 + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.hand_list = p.hand_card + u.hand_count = #u.hand_list + u.out_card_list = {} + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + -- data.cur510kFen = cmd.data.cur510kFen + data.cur5Num = cmd.data.cur5Num + data.cur10Num = cmd.data.cur10Num + data.curkNum = cmd.data.curkNum + data.all510k = cmd.data.all510k +-- data.ju510kFen = cmd.data.ju510kFen +-- data.curXiFen = cmd.data.curXiFen +-- data.juXiFen = cmd.data.juXiFen + + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + u.card_list = cmd.data.card + data.out_card_list = cmd.data.card_list + for i = 1, #data.out_card_list do + local out_card = data.out_card_list[i] + for j = 1, #u.hand_list do + if u.hand_list[j] == out_card then + list_remove(u.hand_list, out_card) + break + end + end + end +end + +function M:CmdNewRound(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd +end + +function M:CmdPass(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat +end +function M:Cmdresult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result = cmd.data.result + data.win_seat = cmd.seat +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.Result = cmd.data + for i = 1, #data.Result.info do + local p = data.Result.info[i] + p.nick = self._room:GetPlayerBySeat(p.seat).self_user.nick_name + end +end + +function M:CmdCur510kFen(cmd,index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + data.cur510kFen = cmd.data +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_clone(last_step) + step.player_card_data = {} + local card_data = step.player_card_data + for i = 1, #last_step.player_card_data do + card_data[i] = {} + card_data[i].hand_list = membe_clone(last_step.player_card_data[i].hand_list) + card_data[i].out_card_list = membe_clone(last_step.player_card_data[i].out_card_list) + end + step.Result = nil + self._step[#self._step + 1] = step + return step +end + +function M:ClearNextSeatOutCard(currenOutCardSeat) + local people_num = self._room.room_config.people_num + local next_seat = currenOutCardSeat + 1 + if next_seat > people_num then + next_seat = next_seat - people_num + end + local p = self._room:GetPlayerBySeat(next_seat) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:SetOutCardInfo(nil, false) +end + +function M:UpdateRound() + local round = self._room.curren_round + self._tex_round.text = string.format('第 %d 局', round) +end + +function M:NextRecordPlay() + self._totalRound = tonumber(self._totalRound) + local result = PlayBackView.NextRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + if self.result_view then + self.result_view:Dispose() + self.result_view = nil + end +end + +function M:LastRecordPlay() + local result = PlayBackView.LastRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + if self.result_view then + self.result_view:Dispose() + self.result_view = nil + end +end + +function M:Play() + self:ChangeAlpha() + self:ChangePlayState(not self._play) + if not self._play then + return + end + if (self._currentStep == #self.cmdList and self._playFoward) or (self._currentStep == 0 and not self._playFoward) then + self._currentStep = 0 + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:ChangePlayState(state) + self._play = state + self:ChangeTextSpeed() + local btn_play = self._view:GetChild('panel_record'):GetChild('btn_play') + if self._play then + btn_play:GetController('state').selectedIndex = 1 + else + btn_play:GetController('state').selectedIndex = 0 + end +end + +function M:ChangeTextSpeed() + local str1 = self._play and self._speed or '' + self._view:GetChild('panel_record'):GetChild('tex_speed').text = str1 + local str2 = + not self._play and (self._playFoward and '播放暂停' or '回退暂停') or + self._playFoward and (self._speed == 1 and '播放' or '快进') or + (self._speed == 1 and '回退' or '快退') + self._view:GetChild('panel_record'):GetChild('tex_2').text = str2 + local str3 = self._play and '倍速度' or '' + self._view:GetChild('panel_record'):GetChild('tex_1').text = str3 +end + +function M:CmdLeftArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if not self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = false + self:ChangeTextSpeed() + end +end + +function M:CmdRightArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:OnUpdate() + if self._play then + if (self._currentStep == #self.cmdList + 1 and self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像结尾了,再次点击播放按钮可重新播放') + return + elseif (self._currentStep == 0 and not self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像开头了,再次点击播放按钮可重新播放') + return + end + self._timer = self._timer + Time.deltaTime + if self._timer >= 1 / self._speed then + self._timer = 0 + local step = self._playFoward and 1 or -1 + self._currentStep = self._currentStep + step + if self._currentStep > 0 then + self:ShowStep(self._currentStep) + end + end + end +end + +function M:Destroy() + UpdateBeat:Remove(self.OnUpdate, self) + PlayBackView.Destroy(self) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_PlayerPokerInfoView.lua b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_PlayerPokerInfoView.lua new file mode 100644 index 00000000..7f48ed10 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_PlayerPokerInfoView.lua @@ -0,0 +1,426 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 16:35 +--- +local SanQianFen_PlayerPokerInfoView = { + _view = nil, + _mainView = nil, + _mask_liangpai = nil, +} + +local M = SanQianFen_PlayerPokerInfoView + +function M.new( view,mainView ) + local self = {} + setmetatable(self, {__index = M}) + self._view = view + self._mainView = mainView + self:init() + return self +end + + + +function M:init() + local view = self._view + self._gameCtr = ControllerManager.GetController(GameController) + + self.item_data = json.decode(self._view:GetChild("area_mask").text) + self.out_card_data = self.item_data["outcard_list"] + self._mask_liangpai = view:GetChild("mask_liangpai") + self.ctr_outpoker = view:GetController("output") + self.outpoker_list = view:GetChild(self.out_card_data["parent"]) + + self.hand_card_list = view:GetChild("hand_card_list") + + self.ctr_one_card = view:GetController("one_card") + self.eff_one_card = view:GetChild("one_card_eff"):GetTransition("t0") + + self.text_bomb_score = view:GetChild("Score") + self.ani_bomb_score = view:GetTransition("score") + self.ani_result_score = view:GetTransition("score_1") +end + +function M:SetOutCardInfo(cardlist,isPass,isAnim) + self.outpoker_list:RemoveChildren(0,-1,true) + if cardlist == nil then + if isPass == true then + self.ctr_outpoker.selectedIndex = 2 + else + self.ctr_outpoker.selectedIndex = 0 + end + else + if isAnim then + if self.move_cor then + coroutine.stop(self.move_cor) + self.move_cor = nil + end + local time = 0.1 + for i = 1, #cardlist do + local poker_item = UIPackage.CreateObject("Extend_Poker_SanQianFen", "poker7") + local code = self:ChangeCodeByTo(cardlist[i]) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..code) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + local card_code_obj + -- if DataManager.CurrenRoom.pai==0 then + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..code) + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + -- end + -- if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..code.."_1") + -- end + if DataManager.CurrenRoom.pai==0 then + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..code.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..code) + end + + else + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..code.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + end + + end + if card_code_obj == nil then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + --card_code_obj:SetScale(1,1) + poker_item:AddChild(card_code_obj) + --local poker = self:CreatPoker(cardlist[i],0.7) + self.outpoker_list:AddChild(poker_item) + poker_item.xy = Vector2.New(self.out_card_data["start_x"],self.out_card_data["start_y"]) + poker_item:TweenMove(self:GetOutCardEndPokerPos(i,#cardlist,self.outpoker_list,poker_item,self.out_card_data["maxcount_x"],1),time) + --card_code_obj + -- self.tween = TweenUtils.TweenFloat(1,0.7,time,function(x) + -- card_code_obj:SetScale(x,x) + -- end) + local card_num_obj = card_code_obj:GetChild("num") + if card_num_obj then + card_num_obj.visible = false + end + card_code_obj:SetScale(0.7,0.7) + + if #cardlist> 3 and i == #cardlist then + if card_num_obj then + card_num_obj.visible = true + card_num_obj.text = #cardlist.."张" + end + end + end + self.move_cor = coroutine.start(function() + coroutine.wait(0.1) + ViewUtil.PlaySound("SanQianFen_PK", "extend/poker/sanqianfen/sound/chupai.mp3") + end) + else + for i = 1, #cardlist do + local poker_item = UIPackage.CreateObject("Extend_Poker_SanQianFen", "poker7") + local code = self:ChangeCodeByTo(cardlist[i]) + local card_code_obj + if DataManager.CurrenRoom.pai==0 then + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..code.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..code) + end + + else + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..code.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + end + + end + if card_code_obj == nil then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + card_code_obj:SetScale(0.7,0.7) + local card_num_obj = card_code_obj:GetChild("num") + if card_num_obj then + card_num_obj.visible = false + end + poker_item:AddChild(card_code_obj) + if #cardlist> 3 and i == #cardlist then + if card_num_obj then + card_num_obj.visible = true + card_num_obj.text = #cardlist.."张" + end + end + --local poker = self:CreatPoker(cardlist[i],0.7) + self.outpoker_list:AddChild(poker_item) + poker_item.xy = self:GetOutCardEndPokerPos(i,#cardlist,self.outpoker_list,poker_item,self.out_card_data["maxcount_x"],1) + end + end + --self.ctr_outpoker.selectedIndex = 1 + end +end + +function M:SetOutCardBlack() + for i = 0, self.outpoker_list.numChildren - 1 do + self.outpoker_list:GetChildAt(i):GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(0.7,0.7,0.7) + end +end + +-- 12 -61 --11 58 --10 55 --46 +function M:GetOffSet(cardLength) -- 15 -70 + if cardLength > 8 then + return 52--40 + else + return - cardLength * 5 + 80 + end +end +function M:GetOutCardEndFirstPokerPos(count,parent_com,poker_obj,max_count,scale) + local parent_width,parent_height = parent_com.width,parent_com.height + local poker_width,poker_height = poker_obj.width * scale,poker_obj.height * scale + local offset = self:GetOffSet(count) + local x,y = 0,0 + --local length = (count - 1) * (poker_width + offset) + poker_width + --if length <= parent_width then + -- x = (parent_width - length) / 2 + -- y = (parent_height - poker_height) / 2 + --end + if count <= max_count then + local length = (count - 1) * offset + poker_width + x = (parent_width - length) / 2 + y = ((parent_height - poker_height) / 2) + + end + return Vector2.New(x,y) +end + +function M:GetOutCardEndPokerPos(index,count,parent_com,poker_obj,max_count,scale) + local offset_x,offset_y = self:GetOffSet(count),-50 + local start_pos = self:GetOutCardEndFirstPokerPos(count,parent_com,poker_obj,max_count,scale) + local poker_width,poker_height = poker_obj.width * scale,poker_obj.height * scale + local parent_width,parent_height = parent_com.width,parent_com.height + local pos_x,pos_y = start_pos.x + (index - 1) * offset_x,start_pos.y + if index > max_count then + pos_x = (index - max_count - 1) * offset_x + pos_y = pos_y + poker_height + offset_y + end + return Vector2.New(pos_x,pos_y) +end + +-- function M:PlayCardTypeEff(type1) +-- if type1 < 7 and type1 ~= 4 then return end +-- local eff_code = 0 +-- if type1 == 10 then +-- eff_code = 2 +-- elseif type1 == 11 then +-- eff_code = 3 +-- elseif type1 == 4 then +-- eff_code = 4 +-- else +-- eff_code = 1 +-- end +-- if self.cro_type_eff ~= nil then +-- coroutine.stop(self.cro_type_eff) +-- end +-- self.cro_type_eff = nil +-- self.cro_type_eff = coroutine.start(function() +-- self.type_eff_view = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/eff_"..eff_code) +-- if self.type_eff_view == nil then return end +-- self._view:AddChild(self.type_eff_view) +-- self.type_eff_view:SetXY((self._view.width - self.type_eff_view.width) / 2,self.outpoker_list.y) +-- self.type_eff_view:GetTransition("t0"):Play() +-- coroutine.wait(1.5) +-- if self.type_eff_view ~= nil then +-- self.type_eff_view:Dispose() +-- self.type_eff_view = nil +-- end +-- end) +-- end + +function M:PlayScore(score,isBomb,isWin) + -- if score == nil then + -- self.text_bomb_score.alpha = 0 + -- return + -- end + -- if isBomb then + -- self.text_bomb_score.text = score >= 0 and "+"..score or tostring(score) + -- self.text_bomb_score.grayed = score < 0 + -- self.ani_bomb_score:Play() + -- else + -- if score < 0 then + -- self.text_bomb_score.text = tostring(score) + -- self.text_bomb_score.grayed = true + -- elseif score > 0 then + -- self.text_bomb_score.text = "+"..score + -- self.text_bomb_score.grayed = false + -- else + -- local str = isWin and "+" or "-" + -- self.text_bomb_score.text = str..score + -- self.text_bomb_score.grayed = not isWin + -- end + -- self.ani_result_score:Play() + -- end +end + + + + +function M:UpdateHandPoker(cardList,isPlayAni,isMing) + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + self.cor_init_poker = nil + self.card_list = {} + self.hand_card_list:RemoveChildren(0,-1,true) + local card_length + local new_card_list + if isMing == true then + new_card_list = self._gameCtr:ChangeCodeByFrom(cardList,true) + card_length = #cardList + else + card_length = cardList + end + if isPlayAni == true then + self.cor_init_poker = coroutine.start(function() + for i = card_length, 1,-1 do + local code = isMing == true and new_card_list[i] or 0 + coroutine.wait(0.01) + local poker = self:CreatPoker1(code,0.4) + self.hand_card_list:AddChild(poker) + end + end) + else + for i = card_length, 1,-1 do + local code = isMing == true and new_card_list[i] or 0 + local poker = self:CreatPoker1(code,0.4) + self.hand_card_list:AddChild(poker) + end + end +end + +function M:SetRemainCardNumber(isPlay) + -- if isPlay then + -- self.ctr_one_card.selectedIndex = 1 + -- self.eff_one_card:Play(-1,0,nil) + -- else + -- self.ctr_one_card.selectedIndex = 0 + -- end + --if self.card_number then + -- self.card_number.visible = show + -- self.card_number.text = string.format("剩余:%d",number) + --end +end + +function M:CreatPoker1(poker,scale,bank) + + local poker_item = UIPackage.CreateObject("Extend_Poker_SanQianFen", "poker"..scale * 10) + local code = self:ChangeCodeByTo(poker) + local card_code_obj + + if DataManager.CurrenRoom.pai==0 then + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..code.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..code) + end + + else + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..code.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + end + + end + if card_code_obj == nil or bank==1 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + + card_code_obj:SetScale(scale,scale) + local card_num_obj = card_code_obj:GetChild("num") + if card_num_obj then + card_num_obj.visible = false + end + poker_item:AddChild(card_code_obj) + + return poker_item +end + +function M:CreatPoker(poker,scale,bank) + + local poker_item = UIPackage.CreateObject("Extend_Poker_SanQianFen", "poker"..12.5) + local code = self:ChangeCodeByTo(poker) + local card_code_obj + + if DataManager.CurrenRoom.pai==0 then + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..code.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..code) + end + + else + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..code.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + end + + end + if card_code_obj == nil or bank==1 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + + local card_num_obj = card_code_obj:GetChild("num") + if card_num_obj then + card_num_obj.visible = false + end + + card_code_obj:SetScale(scale,scale) + poker_item:AddChild(card_code_obj) + + return poker_item +end + +function M:ChangeCodeByTo( card ) + local flower = card % 10 + + local number = math.floor(card / 10) + if number == 8 then number = 5 end + if number == 15 then + number = 2 + end + return flower * 100 + number +end + +function M:ChangeCodeByTo1( card ) + local flower = card % 10 + + local number = math.floor(card / 10) + + -- if number == 15 then + -- number = 2 + -- end + return flower * 100 + number +end + + +function M:Clear() + self:PlayScore(nil) + self:SetRemainCardNumber(false) + self:SetOutCardInfo(nil,false) + self.hand_card_list:RemoveChildren(0,-1,true) + self._mask_liangpai:RemoveChildren(0,-1,true) +end + +function M:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_PlayerSelfPokerInfoView.lua b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_PlayerSelfPokerInfoView.lua new file mode 100644 index 00000000..1ab47e95 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_PlayerSelfPokerInfoView.lua @@ -0,0 +1,1862 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 17:04 +--- +local SanQianFen_PlayerPokerInfoView = import('.SanQianFen_PlayerPokerInfoView') +local SanQianFen_CardType = import('.SanQianFen_CardType') + +local CardView = { + btn_card = nil, + -- 牌号码 (大小) + card_code_number = 0, + -- 牌号码 (花色) + card_code_flower = 0, + -- 索引 + index = 0, + -- 牌的列数 + index_X = 0, + -- 每一列第几张牌 + index_Y = 0, + -- 原始位置 + old_postion = Vector2.zero, + m_Select = 0, +} + +local function NewCardView(card, cardcodenum, cardcodeflower,index_X,index_Y) + local self = {} + setmetatable(self, {__index = CardView}) + self.btn_card = card + self.card_code_number = cardcodenum + self.card_code_flower = cardcodeflower + self.card_isTouchable = 0 + self.index_X = index_X + self.index_Y = index_Y + return self +end + +local function tableSortNumber(a, b) + return a.card_code_number > b.card_code_number +end + +local SanQianFen_PlayerSelfPokerInfoView = { + _view = nil, + _mainView = nil, + _mask_liangpai = nil +} + +local M = SanQianFen_PlayerSelfPokerInfoView + +function M.new(view, mainView) + setmetatable(M, {__index = SanQianFen_PlayerPokerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._mainView = mainView + self.gameCtr = ControllerManager.GetController(GameController) + self:init() + return self +end + +function M:init() + self.Reset = false + self.ctr_outpoker = self._view:GetController('output') + self.outpoker_list = self._view:GetChild('out_card_list') + self.item_data = json.decode(self._view:GetChild('area_mask').text) + self.out_card_data = self.item_data['outcard_list'] + self.hand_card_list = self._view:GetChild('hand_card_list') + self.ctr_hand_card_pos = self._view:GetChild('hand_card_list') + self._mask_liangpai = self._view:GetChild('mask_liangpai') + self.isMoving = false + self.card_width = 129 + self.cards_count = 0 -- 牌的总列数 + self.cards_view = self._view:GetChild('hand_poker_c') + self.card_list = {} + self.out_card_list = {} + self.touchMoveFun = handler(self, self.TouchMoving1) + self.ctr_put_card_option = self._view:GetController('out_card_option') + self.ctr_piao = self._view:GetController('piao') + self.ctr_piao_value = self._view:GetController('piao_value') + self.ctr_put_error = self._view:GetController('put_error') + self.put_error_text = self._view:GetChild('put_error') + + self.ctr_select_card_type = self._view:GetController('select_card_type') + self.select_card_type_view = self._view:GetChild('choose_type') + + self.text_bomb_score = self._view:GetChild('Score') + self.ani_bomb_score = self._view:GetTransition('score') + self.ani_result_score = self._view:GetTransition('score_1') + + self.send_card = {} + self.tips_click_count = 0 + self:BtnEvent() + + -- local x = {415,215,315,408} + -- for i=1,#x do + -- local t = self:ChangeOneCodeByFrom(x[i]) + -- printlog("pppppppppppppppppppppppp",t) + -- printlog("pppppppppppppppppppppppp111111111",self:ChangeCodeByTo1(t)) + + -- end + + +end + +function M:ChangeOneCodeByFrom(card) + local flower = math.floor(card / 100) + local number = card % 100 + if number == 2 then + number = 15 + end + return number * 10 + flower +end + +function M:SortPoker(pokerList) + local pokerListSort = {} + for i=1,#pokerList do + local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) + pokerListSort[i] = card_number_code + end + table.sort(pokerListSort, function (a,b) + return a > b + end) + + local card_map = {} + local stack = {} + for i = 1, #pokerListSort do + local card = pokerListSort[i] + local card_num = math.floor(pokerListSort[i] / 10) + --printlog("aaaaaaaaaaaaaaa ",card_num) + if card_map[card_num] == nil then + card_map[card_num] = {card} + stack[#stack+1] = card_map[card_num] + else + card_map[card_num][#card_map[card_num] + 1] = card + end + end + + --pt(pokerListSort) + + + -- for k, v in pairs(card_map) do + -- if #v >= 0 then + -- stack[#stack+1] = v + -- end + -- end + + -- local stack1 = {} + -- for i=#stack,1,-1 do + -- stack1[#stack1+1]=stack[i] + -- end + --printlog("ccccccccccccccccccccccccccc") + --pt(stack) + return stack + +end + +function M:isBoomSelect(card,isSelect) + local num = 0 + -- printlog("cccccccccccccccccc111111111 ",card.card_code_flower) + for i = #self.card_list, 1, -1 do + if card.card_code_flower % 100 == self.card_list[i].card_code_flower % 100 then + num = num + 1 + end + end + + --printlog("cccccccccccccccccc222222222222222222 ",num,isSelect) + if num > 3 then + for i = #self.card_list, 1, -1 do + if card.card_code_flower % 100 == self.card_list[i].card_code_flower % 100 + and self.card_list[i]~=card + then + self:SetBtnCardColor(self.card_list[i],isSelect and 0.6 or 1) + self:UpdateCardMove(self.card_list[i].btn_card, isSelect, false) + + elseif self.card_list[i]~=card and isSelect then + self:SetBtnCardColor(self.card_list[i],1) + self:UpdateCardMove(self.card_list[i].btn_card, false, false) + end + end + else + -- self:UpdateCardMove(card,isSelect,false) + -- self:SetBtnCardColor(card,isSelect and 0.6 or 1) + end + +end + +function M:test() + +end + +function M:InitPoker(pokerList, isPlayAni, open) + --printlog("ccccccccccccccccccccccccccccc111111111111111") + --pt(pokerList) + local cs = 1.25 + if DataManager.CurrenRoom.cardsize==0 then + cs = 1.35 + elseif DataManager.CurrenRoom.cardsize == 1 then + cs = 1.25 + elseif DataManager.CurrenRoom.cardsize == 2 then + cs = 1.15 + end + cs = 0.9 + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + self.ctr_put_error.selectedIndex = 0 + end + -- print(vardump(self.card_list)) + self.cor_init_poker = nil + self.card_list = {} + + self.cards_view:RemoveChildren(0, -1, true) + if isPlayAni == true then + self.cor_init_poker = + coroutine.start( + function() + self._mainView._popEvent = false + if self._mainView._rightPanelView._settingView ~= nil then + self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(false) + end + --table.sort(pokerList) + local pokerListSort = self:SortPoker(pokerList) + if pokerListSort == nil or #pokerListSort == 0 then + return + end + self.cards_count = #pokerListSort + for i = 1, #pokerListSort do + local pokerListNum = 0 + for j = 1, #pokerListSort[i] do + local card_number_code = pokerListSort[i][j] + local code = self:ChangeCodeByTo1(card_number_code) + --printlog("ccccccccccccccccccccccccccccc2222222222222222 ",code) + + local btn_card = self:CreatPoker(card_number_code, cs, open) + self.card_width = 120 + self.card_hight = 171 + local x, y = 500, (j * 75) - 500 + btn_card:SetXY(x, y) + self.cards_view:AddChild(btn_card) + self.cards_view:SetChildIndex(btn_card, 12 - j) + local card_view = NewCardView(btn_card, card_number_code,code ,i, j) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + self:AddCardMoveEvent1(card_view) + end + for j = #self.card_list, 1, -1 do + coroutine.wait(0.005) + if pokerListNum == #pokerListSort[i] then + break + end + pokerListNum = pokerListNum + 1 + local card_view = self.card_list[j] + card_view.btn_card:RemoveFromParent() + self.cards_view:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos2(card_view, self.cards_count), 0.08) + end + end + + self:UpdateHandCardsPos1() + self._mainView._popEvent = true + if self._mainView._rightPanelView._settingView ~= nil then + self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(true) + end + end + ) + else + --printlog("wwwwwwwwwwwwwwww33333333333333333333333333333") + --pt(pokerList) + local pokerListSort = self:SortPoker(pokerList) + if pokerListSort == nil or #pokerListSort == 0 then + return + end + self.cards_count = #pokerListSort + for i = 1, #pokerListSort do + local pokerListNum = 0 + for j = 1, #pokerListSort[i] do + local card_number_code = pokerListSort[i][j] + local code = self:ChangeCodeByTo1(card_number_code) + -- printlog("ccccccccccccccccccccccccccccc2222222222222222 ",code) + local btn_card = self:CreatPoker(card_number_code, cs, open) + self.card_width = 120 + self.card_hight = 171 + + self.cards_view:AddChild(btn_card) + self.cards_view:SetChildIndex(btn_card, 12 - j) + local card_view = NewCardView(btn_card, card_number_code,code ,i, j) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + self:AddCardMoveEvent1(card_view) + end + --存牌堆 + for j = 1, #self.card_list do + local card_view = self.card_list[j] + card_view.btn_card.xy = self:GetHandCardPos2(card_view, self.cards_count,#pokerListSort[i]) + end + end + + self:UpdateHandCardsPos1(isPlayAni) + end +end + +-- 删手牌 +function M:DeleteHandCard(card_code_number) + local card = nil + for i = 1, #self.card_list do + local card_view = self.card_list[i] + if card_code_number == card_view.card_code_number then + card_view.btn_card.touchable = false + list_remove(self.card_list, card_view) + card = card_view + card_view.btn_card:RemoveFromParent() + self.cards_view:RemoveChild(card_view.btn_card, true) + break + end + end + if card ~= nil then + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + end + end + +end + +function M:InitPoker1(pokerList, isPlayAni, open) + -- self.zhizhanctr_select=0 + -- self.zhizhantype=0 + -- self.zhizhannumber=0 + -- self.zhizhanlength=0 + -- self.zhizhanmustPutMaxCard=0 + -- self.zhizhanplay=0 + -- self.zhizhanzdts=0 + local cs = 1.25 + if DataManager.CurrenRoom.cardsize==0 then + cs = 1.35 + elseif DataManager.CurrenRoom.cardsize == 1 then + cs = 1.25 + elseif DataManager.CurrenRoom.cardsize == 2 then + cs = 1.15 + end + + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + -- print(vardump(self.card_list)) + self.cor_init_poker = nil + self.card_list = {} + + self.cards_view:RemoveChildren(0, -1, true) + if isPlayAni == true then + self.cor_init_poker = + coroutine.start( + function() + self._mainView._popEvent = false + if self._mainView._rightPanelView._settingView ~= nil then + self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(false) + end + table.sort(pokerList) + + for i = 1, #pokerList do + local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) + local card_flower_code = pokerList[i] + local btn_card = self:CreatPoker(card_number_code, cs, open) + local x, y = self._view.width / 2 + 100, -200 + btn_card:SetXY(x, y) + btn_card.alpha = 0 + btn_card.touchable = false + -- coroutine.wait(0.05) + self.cards_view:AddChild(btn_card) + local card_view = NewCardView(btn_card, card_number_code, card_flower_code) + self.card_list[#self.card_list + 1] = card_view + + table.sort(self.card_list, tableSortNumber) + + if i == #pokerList then + for j = 1, #self.card_list do + local card = self.card_list[j] + card.btn_card.touchable = true + if open ~= 1 then + -- body + self:AddCardMoveEvent(card) + end + end + end + end + for j = #self.card_list, 1, -1 do + -- ViewUtil.PlaySound('SanQianFen_PK', 'extend/poker/sanqianfen/sound/mopai.mp3') + local card_view = self.card_list[j] + card_view.index = j + self.cards_view:SetChildIndex(card_view.btn_card, card_view.index - 1) + + card_view.btn_card:TweenMove(self:GetHandCardPos(j, #self.card_list), 0.10) + DSTween.To( + 0.7, + 1, + 0.1, + function(value) + card_view.btn_card:SetScale(value, value) + end + ) + DSTween.To( + 0.7, + 1, + 0.1, + function(value) + card_view.btn_card.alpha = value + end + ) + card_view.btn_card.alpha = 1 + end + + self._mainView._popEvent = true + if self._mainView._rightPanelView._settingView ~= nil then + self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(true) + end + end + ) + else + --printlog("wwwwwwwwwwwwwwww33333333333333333333333333333") + --pt(pokerList) + for i = 1, #pokerList do + local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) + local card_flower_code = pokerList[i] + local btn_card = self:CreatPoker(card_number_code, cs, open) + self.cards_view:AddChild(btn_card) + local card_view = NewCardView(btn_card, card_number_code, card_flower_code) + self.card_list[#self.card_list + 1] = card_view + end + table.sort(self.card_list, tableSortNumber) + for i = 1, #self.card_list do + local card = self.card_list[i] + card.index = i + self.cards_view:SetChildIndex(card.btn_card, card.index - 1) + card.btn_card.xy = self:GetHandCardPos(i, #self.card_list) + if open ~= 1 then + -- body + self:AddCardMoveEvent(card) + end + end + end +end + +function M:updatePoker() + + local templist = {} + for i = 1, #self.card_list do + templist[#templist + 1] = self.card_list[i].card_code_flower + end + self:InitPoker(templist, false, 0) +end + +function M:AddCardMoveEvent(card) + local send_card = {} + + card.btn_card.onTouchBegin:Set( + function(context) + self.send_card = {} + if card.btn_card.touchable == false then + return + end + + local xy = self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + if xy.y > -21 and xy.y < 221 then + self.touchBegin = xy + Stage.inst.onTouchMove:Add(self.touchMoveFun) + --Stage.inst.onClick:Add(self.touchMoveFun) + card.btn_card.onTouchEnd:Set( + function(context) + local xy = + self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + Stage.inst.onTouchMove:Remove(self.touchMoveFun) + --Stage.inst.onClick:onTouchMove(self.touchMoveFun) + if xy.y > -21 and xy.y < 221 then + if xy.x - self.touchBegin.x > 0 then + local max_x = xy.x + local min_x = self.touchBegin.x + for k = 1, #self.card_list do + local card = self.card_list[k] + + -- for i = 1, #self.card_list do + -- local card = self.card_list[i] + -- if card.btn_card.selected then + -- send_card[#send_card + 1] = card.card_code_flower + -- self.send_card[#self.send_card + 1] = card + -- end + -- end + if card.btn_card.touchable == true then + send_card[#send_card + 1] = card + + self:SetBtnCardColor(card, 1) + if k == #self.card_list then + if + card.btn_card.x + self.card_width > min_x and card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("SanQianFen_PK", "extend/poker/paodekuai/sound/click.mp3") + end + else + if + card.btn_card.x + + (self.card_width + self:GetHandCardOffset(#self.card_list)) > + min_x and + card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("SanQianFen_PK", "extend/poker/paodekuai/sound/click.mp3") + end + end + end + end + else + local max_x = self.touchBegin.x + local min_x = xy.x + -- self.send_card = {} + for k = 1, #self.card_list do + local card = self.card_list[k] + + -- for i = 1, #self.card_list do + -- local card = self.card_list[i] + -- if card.btn_card.selected then + -- send_card[#send_card + 1] = card.card_code_flower + -- self.send_card[#self.send_card + 1] = card + -- end + -- end + if card.btn_card.touchable == true then + send_card[#send_card + 1] = card + self:SetBtnCardColor(card, 1) + --print(vardump(card)) + if k == #self.card_list then + if + card.btn_card.x + self.card_width > min_x and card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("SanQianFen_PK", "extend/poker/paodekuai/sound/click.mp3") + end + else + if + card.btn_card.x + + (self.card_width + self:GetHandCardOffset(#self.card_list)) > + min_x and + card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("SanQianFen_PK", "extend/poker/paodekuai/sound/click.mp3") + end + end + end + end + end + + ViewUtil.PlaySound('SanQianFen_PK', 'extend/poker/sanqianfen/sound/click.mp3') + else + self.touchBegin = Vector2.New(0, 0) + for k = 1, #self.card_list do + local card = self.card_list[k] + if card.btn_card.touchable == true then + self:SetBtnCardColor(card, 1) + end + end + end + + Stage.inst:ResetInputState() + card.btn_card.onTouchEnd:Set(nil) + + --self:zhizhanxuanpai() + end + ) + else + local button = card.btn_card + button.onChanged:Add( + function() + -- body + if card.btn_card.selected == true then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + else + self:UpdateCardMove(card.btn_card, card.btn_card.selected, false) + end + end + ) + end + end + ) +end + + + +function M:zhizhanxuanpai() --智障选牌 + -- body + local temp_send_card = {} + for i = 1, #self.send_card do + if self.send_card[i] ~= self.send_card[i - 1] then + -- body + temp_send_card[#temp_send_card + 1] = self.send_card[i] + end + end + + local card_map, max_key = self:GetCardMapAndMaxKey(temp_send_card) + + list_type1, touch_type1 = self:CheckPairs(card_map, 0, 8) + + list_type2, touch_type2 = self:CheckPlane(card_map, 0, 6, 0) + list_bomb, touch_bomb = self:CheckBomb(card_map, 0, 4) + + local list_type, touch_type = self:CheckOnes(card_map, 0, 11) + for i = 5, 11 do + local list_temp, touch_temp = self:CheckOnes(card_map, 0, i) + if list_temp[1] ~= nil then + -- body + list_type = list_temp + end + end + local temp_list = list_type[1] + local temp_list1 = list_type1[1] + local temp_list2 = list_type2[1] + local temp_bomb = list_bomb[1] + if self.xunpai == nil then + -- body + self.xunpai = {} + end + + if temp_list ~= nil and temp_list1 == nil and temp_list2 == nil and temp_bomb == nil and #temp_list > #self.xunpai then + for i = 1, #self.send_card do + self:UpdateCardMove(self.send_card[i].btn_card, false, false) + end + for i = 1, #self.send_card do + for j = 1, #temp_list do + if self.send_card[i] == temp_list[j] then + -- body + self:UpdateCardMove(self.send_card[i].btn_card, true, false) + end + end + end + self.xunpai = temp_list + else + self.xunpai = {} + end +end + +function M:TouchMoving(context) + if self.cards_view == nil then + return + end + local send_card1 = {} + local xy = self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + self.isTouching = true + if xy.x - self.touchBegin.x > 0 then -- 往右边滑 + local max_x = xy.x + local min_x = self.touchBegin.x + for i = 1, #self.card_list do + local card = self.card_list[i] + if card.btn_card.touchable == false or card.card_isTouchable == 1 then + else + if + card.btn_card.x + (self.card_width + self:GetHandCardOffset(#self.card_list)) > min_x and + card.btn_card.x < max_x + then + self:SetBtnCardColor(card, 0.6) + if #send_card1 == 0 then + -- body + send_card1[1] = card + end + for i = 1, #send_card1 do + if send_card1[i] ~= card then + -- body + send_card1[#send_card1 + 1] = card + end + end + else + -- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + -- card.card_isTouchable = 1 + -- ViewUtil.PlaySound("SanQianFen_PK", "extend/poker/paodekuai/sound/click.mp3") + self:SetBtnCardColor(card, 1) + end + end + end + elseif xy.x - self.touchBegin.x < 0 then -- 左边滑 + local max_x = self.touchBegin.x + local min_x = xy.x + for i = 1, #self.card_list do + local card = self.card_list[i] + if card.btn_card.touchable == false or card.card_isTouchable == 1 then + else + if + card.btn_card.x + (self.card_width + self:GetHandCardOffset(#self.card_list)) > min_x and + card.btn_card.x < max_x + then + -- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + -- card.card_isTouchable = 1 + -- ViewUtil.PlaySound("SanQianFen_PK", "extend/poker/paodekuai/sound/click.mp3") + self:SetBtnCardColor(card, 0.6) + if #send_card1 == 0 then + -- body + send_card1[1] = card + end + for i = 1, #send_card1 do + if send_card1[i] ~= card then + -- body + send_card1[#send_card1 + 1] = card + end + end + else + self:SetBtnCardColor(card, 1) + end + end + end + end + --print(vardump(send_card1)) + -- local send_card = {} + -- self.send_card = {} + -- for i = 1, #self.card_list do + -- local card = self.card_list[i] + -- if card.btn_card.selected then + -- send_card[#send_card + 1] = card.card_code_flower + -- self.send_card[#self.send_card + 1] = card + -- end + -- end + self.send_card = send_card1 +end + +function M:AddCardMoveEvent1(card) + local send_card = {} + + card.btn_card.onTouchBegin:Set( + function(context) + self.send_card = {} + if card.btn_card.touchable == false then + return + end + self.beginCard = card + self.isMoving = false + local xy = self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + self.touchBegin = xy + --printlog("rrrrrrrrrrrrrrrrrrrrrrrrrr000000000000000 ",xy.y) + --pt(self.card_list) + Stage.inst.onTouchMove:Add(self.touchMoveFun) + local button = card.btn_card + card.btn_card.onTouchEnd:Set(function () + + self.beginCard = nil + --self:UpdateCardMove(card,not card.btn_card.selected,false) + --self:SetBtnCardColor(card,not card.btn_card.selected and 0.6 or 1) + --self:isBoomSelect(card,not card.btn_card.selected) + if not self.isMoving then + self:SetBtnCardColor(card,card.m_Select == 0 and 0.6 or 1) + end + self.isMoving = false + Stage.inst.onTouchMove:Remove(self.touchMoveFun) + + -- for i=1,#self.send_card do + + -- self:UpdateCardMove(self.send_card[i],true,false) + -- self:SetBtnCardColor(self.send_card[i],0.6) + -- end + -- for i=1,#self.card_list do + -- -- printlog("aaaaaaaaaaaaaaaaaaaa 111111111111 ",self.card_list[i].btn_card.selected) + -- self:UpdateCardMove(self.card_list[i],not self.card_list[i].btn_card.selected,false) + -- --self:UpdateCardMove(self.card_list[i],true,false) + -- --printlog("aaaaaaaaaaaaaaaaaaaa 2222222 ",self.card_list[i].btn_card.selected) + -- end + + -- for i=1,#self.send_card do + -- --printlog("aaaaaaaaaaaaaaaaaaaa1111 ",self.send_card[i].btn_card.selected) + -- end + + end) + -- button.onChanged:Add( + -- function() + -- printlog("aaaaaaaaaa2222222222222222222222222") + -- -- body + -- if card.btn_card.selected == true then + -- --printlog("aaaaaaaaaa3333333333333333") + -- self:SetBtnCardColor(card,0.6) + -- self.send_card[#self.send_card+1] = card + -- --self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + -- else + -- --printlog("aaaaaaaaaa44444444444444444444444") + -- --self:UpdateCardMove(card.btn_card, card.btn_card.selected, false) + + -- self:SetBtnCardColor(card,1) + -- end + -- --self:isBoomSelect(card,not card.btn_card.selected) + -- end + -- ) + + end + ) +end + +function M:TouchMoving1(context) + + if self.cards_view == nil then + return + end + local send_card1 = {} + local xy = self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + self.isMoving = true + self.isTouching = true + if xy.y - self.touchBegin.y > 0 then -- 往下边滑 + -- printlog("rrrrrrrrrr1111111111111111111") + + local max_y = xy.y + local min_y = self.touchBegin.y + for i = 1, #self.card_list do + local card = self.card_list[i] + if card.btn_card.touchable == false or card.card_isTouchable == 1 then + else + if + card.btn_card.y + (self.card_hight / 2 ) - 40 > min_y and + card.btn_card.x < max_y and card.index_X == self.beginCard.index_X + then + self:SetBtnCardColor(card, 0.6) + elseif self.beginCard and card.index_X == self.beginCard.index_X then + self:SetBtnCardColor(card, 1) + end + end + end + elseif xy.y - self.touchBegin.y < 0 then -- 上边滑 + -- printlog("wwwwwwwwwwwwwwwwwwwwwwwww ",xy.y) + local max_y = self.touchBegin.y + local min_y = xy.y + for i = 1, #self.card_list do + local card = self.card_list[i] + --printlog("rrrrrr4444444444444 ",card.btn_card.y," ",xy.y," ",max_y," ",card.index_X) + if + card.btn_card.y + (self.card_hight/2)-40 > min_y and + card.btn_card.y < max_y and self.beginCard and card.index_X == self.beginCard.index_X + then + self:SetBtnCardColor(card, 0.6) + elseif self.beginCard and card.index_X == self.beginCard.index_X then + self:SetBtnCardColor(card, 1) + end + + end + end + --self.send_card = send_card1 +end + +function M:SetBtnCardColor(card, num) + + if num == 0.6 then + card.m_Select = 1 + else + card.m_Select = 0 + end + -- if num == 0.6 then + -- local x = 0 + -- for i = 1, #self.card_list do + -- local card = self.card_list[i] + -- if card.btn_card.selected then + -- -- send_card[#send_card + 1] = card.card_code_flower + -- -- self.send_card[#self.send_card + 1] = card + -- end + -- end + -- printlog("ppppppppppp222222222222222222222222") + -- end + if + card.btn_card:GetChildAt(0) ~= nil and card.btn_card:GetChildAt(0):GetChildAt(0) ~= nil and + card.btn_card:GetChildAt(0):GetChildAt(0):GetChildAt(0) ~= nil + then + -- body + card.btn_card:GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(num, num, num) + end + + --if card.card_code_flower < 500 then + -- card.btn_card:GetChildAt(0):GetChildAt(2).color = Color(num,num,num) + -- card.btn_card:GetChildAt(0):GetChildAt(3).color = Color(num,num,num) + --end +end + +function M:ShowPiao(piao) + self.ctr_piao.selectedIndex = piao +end + +function M:HidePiao() + self.ctr_piao.selectedIndex = 0 +end + +function M:ShowOutCardOption(ctr_select, type, number, length, mustPutMaxCard, play, zdts) + --for i = 1, #self.out_card_list do + -- local card = self.out_card_list[i] + -- self.cards_view:RemoveChild(card.btn_card,true) + --end + --self.out_card_list = {} + + -- self.zhizhanctr_select=ctr_select + -- self.zhizhantype=type + -- self.zhizhannumber=number + -- self.zhizhanlength=length + -- self.zhizhanmustPutMaxCard=mustPutMaxCard + -- self.zhizhanplay=play + -- self.zhizhanzdts=zdts + --printlog("ccccccccccccccccc ",type) + self.tips_click_count = 0 + self.send_card = {} + self.tips_card_list = self:GetCardTips(type, number, length, mustPutMaxCard) + + if #self.tips_card_list >= 1 then + -- body + self:UpdateHandCardsColor() + end + -- + -- 自动提示 + -- if #self.tips_card_list ~= 0 and play~=0 and mustPutMaxCard==false and zdts==1 then + -- local index = self.tips_click_count % #self.tips_card_list + 1 + -- self:ShowTipsCard(index) + -- self.tips_click_count = self.tips_click_count + 1 + -- end + -- if #self.tips_card_list == 2 and self.tips_card_list[2][1].index == self.tips_card_list[1][1].index then + -- if #self.tips_card_list[2] == #self.tips_card_list[1] then + -- for i = 1, #self.tips_card_list[2] do + -- if self.tips_card_list[2][i].index == self.tips_card_list[1][i].index then + -- self:ShowTipsCard(1) + -- end + -- end + -- end + -- elseif #self.tips_card_list == 1 then + -- self:ShowTipsCard(1) + -- end + -- if mustPutMaxCard and play ~= 0 and zdts == 1 then + -- -- body + -- self:ShowTipsCard(#self.tips_card_list) + -- end + self.ctr_put_card_option.selectedIndex = ctr_select +end + +function M:SetOutCardInfo(cardlist, isPass, isAnim) + self.ctr_put_card_option.selectedIndex = 0 + for i = 1, #self.out_card_list do + local card = self.out_card_list[i] + self.cards_view:RemoveChild(card, true) + end + self.out_card_list = {} + if cardlist ~= nil then + -- todo + self:SetOutCardList(cardlist, false) + else + if isPass == true then + self.ctr_outpoker.selectedIndex = 2 + for i = 1, #self.card_list do + local card_view = self.card_list[i] + card_view.btn_card.touchable = true + self:UpdateCardMove(card_view.btn_card, false, false) + self:SetBtnCardColor(card_view, 1) + end + else + self.ctr_outpoker.selectedIndex = 0 + end + end +end + +function M:SetOutCardBlack() + for i = 1, #self.out_card_list do + local card = self.out_card_list[i] + if card and card:GetChildAt(0) and card:GetChildAt(0):GetChildAt(0) and card:GetChildAt(0):GetChildAt(0):GetChildAt(0) then + card:GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(0.7, 0.7, 0.7) + end + + end +end + +function M:SetOutCardList(cardlist, isAnim) + --pt(self.card_list) + local pos_y = -200 + if isAnim then + -- self.zhizhanctr_select=0 + -- self.zhizhantype=0 + -- self.zhizhannumber=0 + -- self.zhizhanlength=0 + -- self.zhizhanmustPutMaxCard=0 + -- self.zhizhanplay=0 + -- self.zhizhanzdts=0 + if self.move_cor then + coroutine.stop(self.move_cor) + self.move_cor = nil + end + local time = 0.1 + --local m_card_list = membe_deep_clone(self.card_list) + for i = 1, #cardlist do + local card_code_number = cardlist[i] + for j = 1, #self.card_list do + local card = self.card_list[j] + if card_code_number == card.card_code_number then + card.btn_card.onTouchBegin:Set(nil) + self.out_card_list[#self.out_card_list + 1] = card.btn_card + -- printlog("wwwwwwwwwwwwwwwwww44444444444444") + list_remove(self.card_list, card) + --list_remove(m_card_list,card) + -- todo 出牌动画 + local pos = + self:GetOutCardEndPokerPos( + i, + #cardlist, + self.cards_view, + card.btn_card, + self.out_card_data['maxcount_x'], + 0.7 + ) + card.btn_card:TweenMove(Vector2.New(pos.x, pos_y), time) + -- self.tween = TweenUtils.TweenFloat(1, 0.7, time, function(x) + -- card.btn_card:GetChildAt(0):SetScale(x, x) + -- end) + card.btn_card:GetChildAt(0):SetScale(0.7, 0.7) + break + end + end + + end + --self.card_list=m_card_list + --printlog("wwwwwwwwwwwwwwwwww55555555555555555555") + --pt(self.card_list) + self.move_cor = + coroutine.start( + function() + coroutine.wait(0.05) + for i = 1, #self.out_card_list do + local card = self.out_card_list[i] + self.cards_view:SetChildIndex(card, i - 1) + end + coroutine.wait(0.1) + ViewUtil.PlaySound('SanQianFen_PK', 'extend/poker/sanqianfen/sound/chupai.mp3') + end + ) + else + for i = 1, #cardlist do + local poker_item = UIPackage.CreateObject('Extend_Poker_SanQianFen', 'poker7') + local code = self:ChangeCodeByTo(cardlist[i]) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/" .. code) + local card_code_obj + -- if DataManager.CurrenRoom.pai==0 then + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..code) + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + -- end + -- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/" .. code .. "_1") + -- end + if DataManager.CurrenRoom.pai == 0 then + if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_SanQianFen/' .. code .. '_1') + else + card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_SanQianFen/' .. code) + end + else + if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_SanQianFen/' .. code .. '_2') + else + card_code_obj = UIPackage.CreateObjectFromURL('ui://Main_Poker/' .. code .. '_2') + end + end + if card_code_obj == nil then + card_code_obj = UIPackage.CreateObjectFromURL('ui://Main_Poker/00') + end + local card_num_obj = card_code_obj:GetChild("num") + if card_num_obj then + card_num_obj.visible = false + end + + card_code_obj:SetScale(0.7, 0.7) + poker_item:AddChild(card_code_obj) + --local poker = self:CreatPoker(cardlist[i],0.7) + self.cards_view:AddChild(poker_item) + local pos = + self:GetOutCardEndPokerPos( + i, + #cardlist, + self.cards_view, + poker_item, + self.out_card_data['maxcount_x'], + 1 + ) + poker_item.xy = Vector2.New(pos.x, pos_y) + self.out_card_list[#self.out_card_list + 1] = poker_item + if #cardlist> 3 and i == #cardlist then + if card_num_obj then + card_num_obj.visible = true + card_num_obj.text = #cardlist.."张" + end + end + end + end +end + +function M:DeleteHandCards(cardlist) + -- printlog("wwwwwwwwwwwwwwwwwwwwwwwwwww11111111111111") + -- pt(self.card_list) + -- pt(cardlist) + for i = 1, #cardlist do + local card_code_number = cardlist[i] + self:DeleteHandCard(card_code_number) + end + self:UpdateHandCardsPos1() + --printlog("cccccccccccccccccccccccccccrrrrrrrrrrrrrrrrrrrrrrr") + --pt(self.card_list) + --self:UpdateHandCardsPos1() + +end + +function M:UpdateHandCardsPos() + for i = 1, #self.card_list do + local card_view = self.card_list[i] + card_view.index = i + card_view.btn_card.touchable = true + self.cards_view:SetChildIndex(card_view.btn_card, card_view.index - 1) + --card_view.btn_card.xy = self:GetHandCardPos(i, #self.card_list) + card_view.btn_card:TweenMove(self:GetHandCardPos(i, #self.card_list), 0.1) + self:UpdateCardMove(card_view.btn_card, false, false) + self:SetBtnCardColor(card_view, 1) + end +end + +-- 手牌更新位置方法 self.card_list 里面的对象 NewCardView,index_X index_Y 就是xy序号 +function M:UpdateHandCardsPos1(t) + --得到有 多少列 + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + -- printlog("wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww") + --pt(CountCards) + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + self.cards_view:AddChild(card_view.btn_card) + local num = self:SameNumCode(card_view.card_code_flower%100) + card_view.old_postion = self:GetHandCardPos2(card_view, #CountCards,num) + -- if t == false then + -- card_view.btn_card.xy = card_view.old_postion + -- else + -- card_view.btn_card:TweenMove(card_view.old_postion, 0.3) + -- end + card_view.btn_card:TweenMove(card_view.old_postion, 0.3) + end + self:ShowCardNum() +end + +function M:ShowCardNum() + for i=1,#self.card_list do + if self.card_list[i].index_Y == 1 then + local card_num_obj = self.card_list[i].btn_card:GetChildAt(0):GetChild("num") + if card_num_obj then + local num = self:SameNumCode(self.card_list[i].card_code_flower%100) + if num > 3 then + card_num_obj.visible = true + card_num_obj.text = num.."张" + end + end + end + end +end + +function M:SameNumCode(code) + local num = 0 + for i=1,#self.card_list do + local numCode = self.card_list[i].card_code_flower % 100 + if code == numCode then + num = num + 1 + end + end + return num +end + +function M:ResetPoker() + self.Reset = true + for i = 1, #self.card_list do + local card_view = self.card_list[i] + self:UpdateCardMove(card_view.btn_card, false, false) + self:SetBtnCardColor(card_view,1) + end + self.send_card = {} + self.Reset = false +end + +function M:UpdateCardMove(btn_card, isSelected, isPlay) + --printlog("yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy") + --btn_card.selected = isSelected + -- local card_Move = btn_card:GetChildAt(0) + -- local xy = isSelected == true and Vector2.New(0, -30) or Vector2.New(0, 0) + -- if isPlay then + -- -- body + -- card_Move:TweenMove(xy, 0) + -- else + -- card_Move:TweenMove(xy, 0) + -- end +end + +-- +function M:UpdateHandCardsColor() + for i = 1, #self.card_list do + local card_view = self.card_list[i] + local num = card_view.btn_card.touchable == true and 1 or 0.6 + self:SetBtnCardColor(card_view, num) + end +end + +function M:BtnEvent() + self.btn_not_put = self._view:GetChild('btn_not_put') + self.btn_tips = self._view:GetChild('btn_tips') + self.btn_put = self._view:GetChild('btn_put') + + self.btn_put.onClick:Set( + function() + if self.Reset then + return + end + local send_card = {} + self.send_card = {} + local currentCard={} + for i = 1, #self.card_list do + local card = self.card_list[i] + table.insert(currentCard,card.card_code_flower) + -- if card.btn_card.selected then + -- send_card[#send_card + 1] = card.card_code_flower + -- self.send_card[#self.send_card + 1] = card + -- end + if card.m_Select == 1 then + send_card[#send_card + 1] = card.card_code_flower + self.send_card[#self.send_card + 1] = card + end + end + + if #send_card == 0 then + self:ErrorTip('请选择要出的牌 ') + else + self.gameCtr:SendCard(send_card,currentCard) + end + end + ) + self.btn_tips.onClick:Set( + function() + --printlog("wwwwwwwwwww111111111111111111111111") + --pt(self.tips_card_list) + if self.tips_card_list ~= nil and #self.tips_card_list ~= 0 then + local index = self.tips_click_count % #self.tips_card_list + 1 + self:ShowTipsCard(index) + self.tips_click_count = self.tips_click_count + 1 + end + end + ) + -- 过 + self.btn_not_put.onClick:Set( + function() + self.gameCtr:SendPass() + end + ) + + local function click_piao() + self.ctr_piao.selectedIndex = 0 + self.gameCtr:SendPiao(tonumber(self.ctr_piao_value.selectedPage)) + end + + local btn_piao0 = self._view:GetChild('piao0') + btn_piao0.onClick:Set(click_piao) + + local btn_piao1 = self._view:GetChild('piao1') + btn_piao1.onClick:Set(click_piao) + + local btn_piao2 = self._view:GetChild('piao2') + btn_piao2.onClick:Set(click_piao) + + local btn_piao3 = self._view:GetChild('piao3') + btn_piao3.onClick:Set(click_piao) + + local btn_piao5 = self._view:GetChild('piao5') + btn_piao5.onClick:Set(click_piao) + + local btn_piao8 = self._view:GetChild('piao8') + btn_piao8.onClick:Set(click_piao) +end + +function M:ShowTipsCard(index) + local item = self.tips_card_list[index] + for i = 1, #self.card_list do + local card = self.card_list[i] + local isExsit = false + for j = 1, #item do + if item[j] == self.card_list[i] then + self:UpdateCardMove(card.btn_card, true, false) + self:SetBtnCardColor(card,0.6) + isExsit = true + end + end + if isExsit == false then + self:UpdateCardMove(card.btn_card, false, false) + self:SetBtnCardColor(card,1) + end + end +end + +function M:GetHandCardOffset(count) + local start = -74---54 + + local offset = 0 + if count > 10 then + offset = start - count + 18 + else + offset = -50 + end + return offset +end + +--计算手牌位置 +function M:GetHandCardPos2(cards_view, cards,num) + local x, y = 0, 0 + local card_width = 120--self.card_width -- 牌的宽度 + local middle_x = self.cards_view.width / 2 + local start_x = middle_x - (cards / 2 * (card_width)) + x = start_x + (card_width) * (cards_view.index_X - 1) + + -- if self:getCardSize() == 1 then + -- y = 90 - (85 * cards_view.index_Y) + -- elseif self:getCardSize() == 1.2 then + -- y = 70 - (100 * cards_view.index_Y) + -- elseif self:getCardSize() == 0.6 then + -- y = 100 - (65 * cards_view.index_Y) + -- end + local t = 40 + -- if num then + -- if num > 8 then + -- t = 18 + -- elseif num > 5 then + -- t= 23 + -- else + -- t = 30 + -- end + -- end + + y = 104- (t * cards_view.index_Y) + return Vector2.New(x, y) +end + + +function M:GetHandCardPos(index, card_count) + local x, y = 0, -18 + local offset = self:GetHandCardOffset(card_count) + local middle_x =self.cards_view.width / 2 + local start_x = middle_x - (card_count / 2 * (self.card_width + offset)) + (offset / 2)+self.card_width / 2 + x = start_x + (self.card_width + offset) * (index - 1) + return Vector2.New(x, y) +end +function M:GetHandCardPos1(index, card_count) + local x, y = 0, -18 + local offset = self:GetHandCardOffset(card_count) + local middle_x = self.cards_view.width / 2 + local start_x = middle_x - (card_count / 2 * (self.card_width + offset)) + (offset / 2) + x = start_x + (self.card_width + offset) * (index - 1) + return x, y +end + + +function M:ErrorTip(error_text) + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + self.ctr_put_error.selectedIndex = 0 + end + self.cor_init_poker = nil + self.cor_init_poker = + coroutine.start( + function() + self.put_error_text.text = error_text + self.ctr_put_error.selectedIndex = 1 + coroutine.wait(2) + self.ctr_put_error.selectedIndex = 0 + end + ) +end + +--SanQianFen_CardType +--None = 0, +--OneCard = 1, +--OnePair = 2, +--Three = 3, +--Pairs = 4, +--ThreeAndTwo = 5, +--ThreeAndOne = 6, +--Plane = 7, +--PlaneAndTwo = 8, +--PlaneAndOne = 9, +--Straight = 10, +--Bomb = 11 +function M:GetCardTips(type, number, length, mustPutMaxCard, tip_templist) + local tip_list = {} + local sidaisan = false + local touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + --printlog("aaaaaaaaaaaaacccccccccccccccccccc11111111111111111111111111111") + --pt(self.card_list) + local card_map, max_key = self:GetCardMapAndMaxKey(self.card_list) + --printlog("aaaaaaaaaaaaaaaaaa222222222222222222222222222222222222222 ",max_key) + --pt(card_map) + if type == SanQianFen_CardType.None then + if DataManager.CurrenRoom.is_new_bout then + --tip_list = self:NewBoutTips(card_map) + end + return tip_list, touch_key_list + elseif type == SanQianFen_CardType.Bomb then + tip_list, touch_key_list = self:CheckBomb(card_map, number, length) + else + local list_type, list_bomb = {}, {} + local touch_type, touch_bomb + list_bomb, touch_bomb = self:CheckBomb(card_map, 0, 4) + + local card_templist = membe_clone(self.card_list) + + if list_bomb ~= nil and tip_templist == nil then + -- body + for i = 1, #list_bomb do + local templist_bomb = list_bomb[i] + for j = 1, #templist_bomb do + for k = 1, #card_templist do + if templist_bomb[j] == card_templist[k] then + -- body + list_remove(card_templist, card_templist[k]) + end + end + end + end + card_map, max_key = self:GetCardMapAndMaxKey(card_templist) + end + + if type == SanQianFen_CardType.OneCard then + -- if mustPutMaxCard then + -- number = max_key - 1 + -- self:ErrorTip("下家报单,请出最大的牌 ") + -- end + list_type, touch_type = self:CheckOneCard(card_map, number, length) + elseif type == SanQianFen_CardType.OnePair then + list_type, touch_type = self:CheckOnePair(card_map, number, length) + elseif type == SanQianFen_CardType.Three then + list_type, touch_type = self:CheckThree(card_map, number, length) + elseif type == SanQianFen_CardType.Pairs then + list_type, touch_type = self:CheckPairs(card_map, number, length) + elseif type == SanQianFen_CardType.ThreeAndTwo then + list_type, touch_type = self:CheckThreeAndTwo(card_map, number, length) + elseif type == SanQianFen_CardType.ThreeAndOne then + list_type, touch_type = self:CheckThreeAndOne(card_map, number, length) + elseif type == SanQianFen_CardType.Plane then + list_type, touch_type = self:CheckPlane(card_map, number, length, 0) + elseif type == SanQianFen_CardType.PlaneAndTwo then + list_type, touch_type = self:CheckPlane(card_map, number, length, 2) + elseif type == SanQianFen_CardType.PlaneAndOne then + list_type, touch_type = self:CheckPlane(card_map, number, length, 1) + elseif type == SanQianFen_CardType.Straight then + list_type, touch_type = self:CheckStraight(card_map, number, length) + elseif type == SanQianFen_CardType.FourAndtThree then + list_type, touch_type = self:CheckBomb(card_map, 0, 4) + if #list_type > 0 then + -- body + sidaisan = true + end + end + card_map, max_key = self:GetCardMapAndMaxKey(self.card_list) + tip_list = self:GetMergeAllList(list_type, list_bomb) + --list_bomb, touch_bomb = self:CheckBomb(card_map, 0, 4) + touch_key_list = self:GetMergeAllList(touch_type, touch_bomb) + local tip_templist2 = {} + if tip_templist == nil then + -- body + tip_templist2 = self:GetCardTips(type, number, length, mustPutMaxCard, tip_list) + end + if #tip_templist2 > 0 then + -- body + tip_list = self:GetMergeAllList(tip_list, tip_templist2) + end + end + + if (tip_templist ~= nil and sidaisan == false and #tip_templist >= 1) then + -- body + --self:SetNotTouchCard(touch_key_list, card_map) + end + + return tip_list +end + +-- 合并多个list +function M:GetMergeAllList(...) + local lists = {...} + local merge_list = {} + for i = 1, #lists do + local list_item = lists[i] + for j = 1, #list_item do + merge_list[#merge_list + 1] = list_item[j] + end + end + + return merge_list +end + +function M:NewBoutTips(pokerMap) + local new_bout_list = {} + for k, v in pairs(pokerMap) do + new_bout_list[#new_bout_list + 1] = v + end + return new_bout_list +end + +function M:CheckOneCard(pokerMap, num, length) + local one_card_list = {} + local touch_key_list = {} + if #self.card_list < length then + return one_card_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if k > num and #v == 1 then + one_card_list[#one_card_list + 1] = {v[1]} + touch_key_list[#touch_key_list + 1] = k + end + end + for k, v in pairs(pokerMap) do + if k > num and #v ~= 1 then + one_card_list[#one_card_list + 1] = {v[1]} + touch_key_list[#touch_key_list + 1] = k + end + end + return one_card_list, touch_key_list +end + +function M:CheckOnePair(pokerMap, num, length) + local one_pair_list = {} + local touch_key_list = {} + if #self.card_list < length then + return one_pair_list, touch_key_list + end + for k, v in pairs(pokerMap) do -- 从三条和对子里面提取 + if #v > 1 and k > num then + one_pair_list[#one_pair_list + 1] = {v[1], v[2]} + touch_key_list[#touch_key_list + 1] = k + end + end + return one_pair_list, touch_key_list +end + +function M:CheckThree(pokerMap, num, length) + local three_list = {} + local touch_key_list = {} + if #self.card_list < length then + return three_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if #v > 2 and k > num then + three_list[#three_list + 1] = {v[1], v[2], v[3]} + touch_key_list[#touch_key_list + 1] = k + end + end + return three_list, touch_key_list +end + +function M:CheckPairs(pokerMap, num, length) + local pairs_list = {} + local touch_key_list = {} + if #self.card_list < length then + return pairs_list, touch_key_list + end + local pair_length = length / 2 + local number_start = num - pair_length + 2 + local number_end = 15 - pair_length + for i = number_start, number_end do + local item_all_list = {} + for j = i, i + pair_length - 1 do + local item_list = pokerMap[j] + if item_list == nil then + break + elseif #item_list < 2 then + break + else + item_all_list[#item_all_list + 1] = item_list[1] + item_all_list[#item_all_list + 1] = item_list[2] + end + if j == i + pair_length - 1 then + pairs_list[#pairs_list + 1] = item_all_list + for k = i, i + pair_length - 1 do + touch_key_list[#touch_key_list + 1] = k + end + end + end + end + return pairs_list, touch_key_list +end + +function M:CheckThreeAndOne(pokerMap, num, length) + local three_and_one_list = {} + local touch_key_list = {} + if #self.card_list < length then + return three_and_one_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if #v >= 3 and k > num then + three_and_one_list[#three_and_one_list + 1] = {v[1], v[2], v[3]} + touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + end + end + return three_and_one_list, touch_key_list +end + +function M:CheckThreeAndTwo(pokerMap, num, length) + local three_and_two_list = {} + local touch_key_list = {} + if #self.card_list < length then + return three_and_two_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if #v >= 3 and k > num then + three_and_two_list[#three_and_two_list + 1] = {v[1], v[2], v[3]} + touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + end + end + return three_and_two_list, touch_key_list +end + +function M:CheckStraight(pokerMap, num, length) + local straight_list = {} + local touch_key_list = {} + if #self.card_list < length then + return straight_list, touch_key_list + end + local number_start = num - length + 2 + local number_end = 15 - length + for i = number_start, number_end do + local item_all_list = {} + for j = i, i + length - 1 do + local item_list = pokerMap[j] + if item_list == nil then + break + else + item_all_list[#item_all_list + 1] = item_list[1] + end + if j == i + length - 1 then + straight_list[#straight_list + 1] = item_all_list + for k = i, i + length - 1 do + touch_key_list[#touch_key_list + 1] = k + end + end + end + end + return straight_list, touch_key_list +end + +function M:CheckBomb(pokerMap, num, length) + local bomb_list = {} + local touch_key_list = {} + local threeA = DataManager.CurrenRoom.room_config.threeA + if threeA == 0 then + -- body + if #self.card_list < length then + return bomb_list, touch_key_list + end + else + if #self.card_list < 3 then + return bomb_list, touch_key_list + end + end + + for k, v in pairs(pokerMap) do + if #v == length and k > num then + --printlog("bbbbbbbbbbb ",k," ",num," ",length) + bomb_list[#bomb_list + 1] = v + touch_key_list[#touch_key_list + 1] = k + + end + + + if #v > length then + -- if k>num then + -- local v1 = membe_clone(v) + -- local v2 = {} + -- for i=1,length do + -- v2[#v2+1]=v1[i] + -- end + -- bomb_list[#bomb_list + 1] = v2 + -- touch_key_list[#touch_key_list + 1] = k + -- end + -- for i=1,#v-length do + -- local v1 = membe_clone(v) + -- local v2 = {} + -- for j=1,length+i do + -- v2[#v2+1] = v1[j] + -- end + -- bomb_list[#bomb_list + 1] = v2 + -- touch_key_list[#touch_key_list + 1] = k + -- end + bomb_list[#bomb_list + 1] = v + touch_key_list[#touch_key_list + 1] = k + end + + if threeA == 1 and #v == 3 and k == 14 then + bomb_list[#bomb_list + 1] = v + touch_key_list[#touch_key_list + 1] = k + end + end + + return bomb_list, touch_key_list +end + +function M:CheckPlane(pokerMap, num, length, and_num) + local plane_list = {} + local touch_key_list = {} + local l = and_num + 3 + local pair_length = length / l + local number_start = num - pair_length + 2 + local number_end = 15 - pair_length + for i = number_start, number_end do + local item_all_list = {} + for j = i, i + pair_length - 1 do + local item_list = pokerMap[j] + if item_list == nil then + break + elseif #item_list < 3 then + break + else + item_all_list[#item_all_list + 1] = item_list[1] + item_all_list[#item_all_list + 1] = item_list[2] + item_all_list[#item_all_list + 1] = item_list[3] + end + if j == i + pair_length - 1 then + plane_list[#plane_list + 1] = item_all_list + touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + end + end + end + return plane_list, touch_key_list +end + +function M:SetNotTouchCard(touch_key_list, card_map) + local all_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + for i = 1, #all_key_list do + local key = all_key_list[i] + local isExsit = self:IsExistByList(touch_key_list, key) + if isExsit == false then + local key_card_item = card_map[key] + if key_card_item ~= nil then + for j = 1, #key_card_item do + local card = key_card_item[j] + card.btn_card.touchable = false + self:UpdateCardMove(card.btn_card, false, false) + end + end + end + end +end + +function M:IsExistByList(list, item) + for i = 1, #list do + if list[i] == item then + return true + end + end + return false +end + +function M:GetCardByNumber(list, number) + for i = 1, #list do + if list[i].card_code_number == number then + return list[i] + end + end + return nil +end + +function M:GetCardMapAndMaxKey(pokerList) + local map, max_key = {}, 0 + for i = 1, #pokerList do + local number = math.floor(pokerList[i].card_code_number / 10) + if number > max_key then + max_key = number + end + if map[number] == nil then + map[number] = {pokerList[i]} + else + map[number][#map[number] + 1] = pokerList[i] + end + end + return map, max_key +end +function M:CheckOnes(pokerMap, num, length) + local one_card_list = {} + local touch_key_list = {} + local text = {} + local text2 = {} + local x = 0 + if #self.card_list < length then + return one_card_list, touch_key_list + end + for k, v in pairs(pokerMap) do + text = {} + text2 = {} + if k > num then + for l, p in pairs(pokerMap) do + for i = 0, length - 1 do + if l == k + i and l ~= 15 and l ~= 16 then + -- body + text[#text + 1] = {p[1]} + text2[#text2 + 1] = l + if #text >= length then + -- body + local x = #one_card_list + local y = #touch_key_list + for i = 1, #text - 1 do + one_card_list[x + 1] = text[1] + touch_key_list[y + 1] = text2[2] + -- for i, v in pairs(text2[i + 1]) do + -- if v ~= nil then + -- table.insert(touch_key_list[x + 1], v) + -- end + -- end + for i, v in pairs(text[i + 1]) do + if v ~= nil then + table.insert(one_card_list[x + 1], v) + end + end + end + end + end + end + end + end + end + return one_card_list, touch_key_list, length +end +function M:Clear() + self:PlayScore(nil) + self:SetOutCardInfo(nil, false) + self.card_list = {} + self.out_card_list = {} + self.cards_view:RemoveChildren(0, -1, true) + -- self.mask_liangpai:RemoveChildren(0,-1,true) +end + +-- function M:Clear1() +-- self:PlayScore(nil) +-- self:SetOutCardInfo(nil, false) + +-- self.out_card_list = {} + +-- -- self.mask_liangpai:RemoveChildren(0,-1,true) +-- end + +function M:ClearCheck() + self.card_list = {} + self.out_card_list = {} + self.cards_view:RemoveChildren(0, -1, true) +end + +function M:Destroy() + Stage.inst.onTouchMove:Remove(self.touchMoveFun) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_Protocol.lua b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_Protocol.lua new file mode 100644 index 00000000..1b4a817e --- /dev/null +++ b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_Protocol.lua @@ -0,0 +1,48 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:51 +--- +local SanQianFen_Protocol = { + SanQianFen_ConfirmToNextGame = "1003", + + SanQianFen_Send_Card = "1013", + + SanQianFen_Send_Guo = "1014", + + SanQianFen_Send_Piao = "1015", + + SanQianFen_Ming_Card = "2117", + + SanQianFen_Init_Card = "2011", + + SanQianFen_Options = "2004", + + SanQianFen_Index_Move = "2016", + + SanQianFen_Play_Succ = "2021", + + SanQianFen_Pass_Succ = "2030", + + SanQianFen_Put_Error = "2111", + + SanQianFen_Bomb_Score = "2118", + + SanQianFen_Result = "2007", + SanQianFen_Piao_Tip = "2031", + SanQianFen_Piao_Action = "2032", + + SanQianFen_ConfirmToNextGameSucc = "2010", + PT_GAMETUOGUAN = "2029",--托管 + SEND_TUOGUAN = "1018",--托管 + GAME_XIPAI = "20836", + GAME_EVENT_XIPAI = "20837", + GAME_EVENT_NOTIFY_XIPAI = "20838", + GAME_EVT_CARDINHAND = "202022", + GAME_EVT_UPDATE_510K_SCORE ="22119", + + GAME_EVT_UPDATE_XI_SCORE = "22120", + GAME_EVT_ALL_UPDATE_510K_SCORE = "22121", + GAME_EVT_SHANGYOU = "22122", +} + +return SanQianFen_Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_ResultView.lua b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_ResultView.lua new file mode 100644 index 00000000..65d3836b --- /dev/null +++ b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_ResultView.lua @@ -0,0 +1,433 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 11:05 +--- +require("Game.View.ResultView") + +local SanQianFen_ResultView = {} + +local M = SanQianFen_ResultView + +function SanQianFen_ResultView.new(blur_view, data, roomid, over, win_seat, dissolve, remaincards) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + + self.class = "SanQianFen_ResultView" + self._currenIndex = 0 + self._close_zone = false + --self._blur_view = blur_view + self._gamectr = ControllerManager.GetController(GameController) + self:init("ui://Extend_Poker_SanQianFen/clearing", data, roomid, over, win_seat, dissolve, remaincards) + + return self +end + +function M:init(url, data, roomid, over, win_seat, dissolve, remaincards) + + ResultView.init(self, url,true) + self.xiPaiCtr=self._view:GetController("xipai") + + + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig and round>1 then + self.xiPaiCtr.selectedIndex=1 + else + self.xiPaiCtr.selectedIndex=0 + end + + + --self:InitData(data,roomid) + --self:InitData(data,roomid) + --printlog("aaaaaaaaaaaaaaaa1111111111111111111111111222222222222222 ",dissolve) + --pt(data) + if dissolve == 1 then + -- body + self.xiPaiCtr.selectedIndex=0 + self:InitData(data, win_seat, roomid) + else + local xipai=self._view:GetChild("btn_xipai") + xipai.touchable=true + xipai.onClick:Add(function() + local xiPaiCallBack=function () + xipai.touchable=false + self.xiPaiCtr.selectedIndex=0 + ViewUtil.ErrorTip(1000000,"申请洗牌成功") + end + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendXiPaiAction(xiPaiCallBack) + end) + if DataManager.CurrenRoom.xipaiScore then + --xipai.text="洗牌 积分x"..DataManager.CurrenRoom.xipaiScore + else + --xipai.text="洗牌 积分x0" + end + + self:InitData_One(data, win_seat, over, roomid, remaincards) + end + +end + +function M:ChangeCodeByTo( card ) + local flower = card % 10 + local number = math.floor(card / 10) + if number == 15 then + number = 2 + end + return flower * 100 + number +end + +-- 小结算 +function M:InitData_One(data, winseat, over, roomid, remaincards) + + local room = DataManager.CurrenRoom + self._view:GetController("sdk").selectedIndex = 1 + local _gamectr = ControllerManager.GetController(GameController) + local list_view = self._view:GetChild("player_list_1") + list_view:RemoveChildrenToPool() + + local leftCardAll = self._view:GetChild("leftCardHand") + leftCardAll:RemoveChildrenToPool() + + if remaincards and #remaincards>0 then + table.sort(remaincards,function (a,b) + return a % 100 < b % 100 + + end) + for i=1,#remaincards do + local x = remaincards[i] % 100 + local t = remaincards[i] + if x == 8 then + t = remaincards[i] - 3 + end + local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..t) + if card_code_obj then + leftCardAll:AddChild(card_code_obj) + end + end + end + + + for i = 1, #data do + local player = data[i] + local item = list_view:AddItemFromPool("ui://Extend_Poker_SanQianFen/clearing_item_1") + + --printlog("cccccccccccccccccccccccccccccccccccccccccc") + -- pt(data[i]) + -- local leftCard = item:GetChild("leftCard") + -- leftCard:RemoveChildrenToPool() + -- table.sort(data[i].handCards,function (a,b) + + -- return a % 100 < b % 100 + -- end) + + -- for j=1,#data[i].handCards do + -- local code = data[i].handCards[j] + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..code) + -- if card_code_obj then + -- leftCard:AddChild(card_code_obj) + -- end + -- end + + -- table.sort(data[i].outCards,function (a,b) + -- return a % 100 < b % 100 + -- end) + + + + -- for k=1,#data[i].outCards do + -- local code = data[i].outCards[k] + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/"..code) + -- if card_code_obj then + -- leftCard:AddChild(card_code_obj) + -- card_code_obj:GetChildAt(0):GetChildAt(0).color = Color(0.7,0.7,0.7) + -- end + -- end + + + + -- local boom = item:GetChild("boom") + -- boom.text = player.thisboomnum + + local piao = item:GetChild("piao") + if player.piao <= 0 then + piao.text = "0" + else + piao.text = "" .. player.piao + end + + + -- local cur510kFen = item:GetChild("cur510kFen") + -- if player.cur510kFen then + -- cur510kFen.text =player.cur510kFen + -- else + -- cur510kFen.text = "nil" + -- end + + + local cur510kFen = item:GetChild("cur510kFen") + if player.cur510kFen then + cur510kFen.text =player.cur510kFen + else + cur510kFen.text = "nil" + end + + local ju510kFen = item:GetChild("ju510kFen") + if player.ju510kFen then + ju510kFen.text =player.ju510kFen + else + ju510kFen.text = "nil" + end + + local juXiFen = item:GetChild("juXiFen") + if player.juXiFen then + juXiFen.text =player.juXiFen + else + juXiFen.text = "nil" + end + + local curXiFen = item:GetChild("curXiFen") + if player.curXiFen then + curXiFen.text =player.curXiFen + else + curXiFen.text = "nil" + end + + local jiangli = item:GetChild("jiangli") + if player.jiangli then + jiangli.text =player.jiangli + else + jiangli.text = "nil" + end + + local leftFen = item:GetChild("leftFen") + if player.leftCardFen then + leftFen.text =player.leftCardFen + else + leftFen.text = "nil" + end + + + local nichen = item:GetChild("nichen") + + if player.nick ~= nil then + -- body + nichen.text = tostring(player.nick) + else + + nichen.text = tostring(player.self_user.nick_name) + end + + + -- local shengpai = item:GetChild("shengpai") + -- if player.cards ~= nil then + -- -- body + -- shengpai.text = tostring(#player.cards) + -- else + -- shengpai.text = tostring(#player.hand_list) + -- end + + local rt = 1 + if room.hpOnOff == 1 then + rt = room.score_times + end + + local hp_nonnegative = room:checkHpNonnegative() + local roundScore = player.winscore + if hp_nonnegative then + + local jifen = "" + if roundScore > 0 then + jifen = "+" .. roundScore + else + jifen = "" .. roundScore + end + + local tili = "" + local limit = "" + if player.hp_info.round_actual_hp > 0 then + tili = "(+" .. d2ad(player.hp_info.round_actual_hp) .. ")" + if player.hp_info.upper_limit then + limit = "达到上限" + end + else + tili = "(" .. d2ad(player.hp_info.round_actual_hp) .. ")" + if player.hp_info.upper_limit then + limit = "达到下限" + end + end + + item:GetChild("score").text = jifen .. tili .. limit + else + + local jifen = "" + if roundScore >= 0 then + jifen = "+" .. roundScore + else + jifen = "" .. roundScore + end + jifen = jifen .. " " + + local tili = "" + if room.hpOnOff > 0 then + + local need = roundScore * rt + tili = "(" + if roundScore > 0 then + tili = tili .. "+" .. tostring(need) + else + tili = tili .. tostring(need) + end + + tili = tili .. ")" + end + + + item:GetChild("score").text = jifen .. tili + end + + if roundScore >= 0 then + + if room.self_player.seat == player.seat then + -- body + self._view:GetController("result").selectedIndex = 1 + end + else + + if room.self_player.seat == player.seat then + self._view:GetController("result").selectedIndex = 0 + end + end + local shangyou = item:GetChild("shangyou") + if shangyou then + shangyou.visible = player.seat == winseat + end + + end + + + if over == 0 then + -- body + local btn_confirm = self._view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + self:Destroy() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:ConformToNextGame() + + end) + else + self.xiPaiCtr.selectedIndex=0 + local btn_confirm = self._view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + --self:Destroy() + self:InitData(data, winseat, roomid) + -- ViewManager.ChangeView(ViewManager.View_Lobby) + end) + + end +end + +-- 大结算 +function M:InitData(data, winseat, roomid) + self.xiPaiCtr.selectedIndex=0 + self._view:GetController("sdk").selectedIndex = 0 + + local room = DataManager.CurrenRoom + + local rt = 1 + if room.hpOnOff == 1 and room.score_times ~= 1 then + rt = room.score_times + end + + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + + local user = room:GetPlayerBySeat(data[i].seat).self_user + + player_list[i].id = user.account_id + + player_list[i].score = data[i].score + player_list[i].hp_info = data[i].hp_info + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].seat = data[i].seat + player_list[i].head_url = data[i].self_user.head_url + + if data[i].entrust ~= nil then + player_list[i].entrust = data[i].entrust > 0 + else + player_list[i].entrust = false + end + + player_list[i].param = {} + + player_list[i].param[1] = {} + player_list[i].param[1].key = "积分:" + player_list[i].param[1].value = tostring(data[i].allJu510kFen) + -- printlog("7777777777777777777777777777777") + -- pt(data[i]) + -- pt(data[i].settle_log) + + player_list[i].param[2] = {} + player_list[i].param[2].key = "奖分:" + player_list[i].param[2].value = tostring(data[i].jieSuanJiangLi) + + player_list[i].param[3] = {} + player_list[i].param[3].key = "总积分:" + player_list[i].param[3].value = tostring(data[i].cur510kFen) + + player_list[i].param[4] = {} + player_list[i].param[4].key = "总喜分:" + player_list[i].param[4].value = tostring(data[i].curXiFen) + + player_list[i].param[5] = {} + player_list[i].param[5].key = "总分:" + player_list[i].param[5].value = tostring(data[i].cur510kFen+data[i].curXiFen) + + player_list[i].param[6] = {} + player_list[i].param[6].key = "牌分:" + player_list[i].param[6].value = tostring(data[i].allLeftCardFen) + + -- printlog("aaaaaaaaaaaaaaawwwwwwwwwwwwwwwwwwwwwwwwww") + --pt(data) + + -- player_list[i].param[1] = {} + -- player_list[i].param[1].key = "赢局数:" + -- player_list[i].param[1].value = tostring(data[i].settle_log.winnum) + + -- player_list[i].param[2] = {} + -- player_list[i].param[2].key = "打出炸弹数:" + -- player_list[i].param[2].value = tostring(data[i].settle_log.boomnum) + + -- player_list[i].param[3] = {} + -- player_list[i].param[3].key = "春天次数:" + -- player_list[i].param[3].value = tostring(data[i].settle_log.springnum) + + -- player_list[i].param[4] = {} + -- player_list[i].param[4].key = "当局最高分:" + -- player_list[i].param[4].value = tostring(data[i].settle_log.maxscore * rt) + + if data[i].daniao > 0 then + player_list[i].flag = {"打鸟"} + end + end + + self:GenerateRoomResultInfo(room.room_config.Times, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + self:InitBigResult(room) + local big_result = self._view:GetChild("big_result") + local lst_p = big_result:GetChild("player_list") + -- local list_param = com_p:GetChild("list_param") + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + end + +end + +return M diff --git a/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_RightPanelView.lua b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_RightPanelView.lua new file mode 100644 index 00000000..527eb335 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_RightPanelView.lua @@ -0,0 +1,88 @@ +local MainRightPanelView = require("Game.View.MainRightPanelView") +local SanQianFen_RightPanelView = {} +local M = SanQianFen_RightPanelView +local function __init(self,mainView,view) + local right_panel = view + + local btn_setting = right_panel:GetChild("btn_setting") + btn_setting.onClick:Set(function() + local _settingView = mainView:NewSettingView() + _settingView.stateIndex = (mainView._room.curren_round >= 1 and mainView._allow_dissmiss) and 2 or 1 + _settingView.cd_time = mainView.dismiss_room_cd_time + _settingView:Show() + + local room = DataManager.CurrenRoom + _settingView.onCallback:Add(function(context) + local _gamectr = ControllerManager.GetController(GameController) + if (room.CurnrenState == StateType.Ready) then + _gamectr:LevelRoom(function(response) + if (response.ReturnCode == 0) then + ViewManager.ChangeView(ViewManager.View_Lobby) + GameApplication.Instance:ShowTips("房间已解散!") + end + end) + else + print("mainView.dismiss_room_cd_time"..mainView.dismiss_room_cd_time) + if mainView.dismiss_room_cd_time > 0 then + GameApplication.Instance:ShowTips("您还处于解散冷却时间当中,请稍后重试!") + else + _gamectr:AskDismissRoom() + end + end + end) + end) + + self._tex_data = right_panel:GetChild("tex_data") + self._tex_time = right_panel:GetChild("tex_time") + self._pb_batteryLevel = right_panel:GetChild("pb_batteryLevel") + self._xinhao = right_panel:GetController("xinhao") + self.ctr_xh = right_panel:GetChild("gcm_xinhao"):GetController("c1") + self.ctr_wifi = right_panel:GetChild("gcm_wifi"):GetController("c1") + self._tex_ping = right_panel:GetChild("gcm_xinhao"):GetChild("n7") + + self.ctr_log = right_panel:GetController("log") + local btn_log = right_panel:GetChild("btn_log") + btn_log.onClick:Set(function() + if self.onLogCallback then + self.onLogCallback() + end + end) + + self._total_time = 0 + self:__UpdateTime() + + -- self._timer = Timer.New(handler(self,self.__UpdateTime),10,-1,true) + -- self._timer:Start() +end +function SanQianFen_RightPanelView.new(mainView,view) + setmetatable(M, {__index = MainRightPanelView}) + local self = setmetatable({}, {__index = M}) + self.class = "SanQianFen_RightPanelView" + __init(self,mainView,view) + return self +end +function M:__UpdateTime() + self._tex_data.text = os.date("%Y-%m-%d") + self._tex_time.text = os.date("%H:%M") + if Application.platform == RuntimePlatform.IPhonePlayer or Application.platform == RuntimePlatform.Android then + self._pb_batteryLevel.value = GameApplication.Instance:GetBatteryLevel() + end + + local NetworkReachability = UnityEngine.NetworkReachability + local _client = ControllerManager.GameNetClinet + if not _client then return end + local ping = _client:getAveragePingTime() + if not ping then return end + ping = math.floor(ping / 2) + if ping > 300 then ping =300 end + if ping <= 100 then + self.ctr_xh.selectedIndex = 0 + elseif ping <= 300 then + self.ctr_xh.selectedIndex = 1 + else + self.ctr_xh.selectedIndex = 2 + end + self._tex_ping.text = ping .. "ms" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_Room.lua b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_Room.lua new file mode 100644 index 00000000..808f789a --- /dev/null +++ b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_Room.lua @@ -0,0 +1,26 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 14:36 +--- +local SanQianFen_Player = import(".SanQianFen_Player") + +local SanQianFen_Room = { +} + +local M = SanQianFen_Room + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Room}) + local self = setmetatable({}, {__index = M}) + self:init() + return self +end + + + +function M:NewPlayer() + return SanQianFen_Player.new() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_RoomConfig.lua b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_RoomConfig.lua new file mode 100644 index 00000000..f6970c27 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/sanqianfen/SanQianFen_RoomConfig.lua @@ -0,0 +1,492 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 10:54 +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.class = "SanQianFen_RoomConfig" + self.config=config + self.Leaf = config.leaf + self.Rule = config.rule + self.Times = config.times + self.WillBeOut = config.willBeOut + self.Heart10 = config.heartten + self.BombSpring = config.minboom + self.AA = config.aa + self.PlayerNum = config.maxPlayers + self.showlength = config.showlength + self.fourBeltThree=config.fourBeltThree + self.demolition=config.demolition + self.fangzuobi=config.fangzuobi + self.planelack=config.planelack + self.threelack=config.threelack + self.threeA=config.threeA + self.tuoguan_active_time=config.tuoguan_active_time + self.tuoguan=config.tuoguan + self.tuoguan_result_type=config.tuoguan_result_type + self.isNonnegative=config.isNonnegative + self.sandaidan = config.sandaidan + self.isHidden = 1--config.isHidden + self.ba = config.ba + self.fs = config.fs + + if config.piao ~= nil then + self.piao = config.piao + else + self.piao = 0 + end + + if config.daniao ~= nil then + self.daniao = config.daniao + else + self.daniao = 0 + end + + if self.isNonnegative == nil then + self.isNonnegative = 0 + end + self.energyTab=config.energyTab + + if self.energyTab==nil then + self.energyTab=0 + end + + return self +end + +--[[function M:GetDes(sp) + sp = sp or " " + local str = "" + -- str = str.. self.Times.."局"..sp + str = str .. RoomConfig.GetDes(self, sp).." " + local count=1 + if self.Leaf == 1 then + str = str.. "15张玩法" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str.. "16张玩法" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.Rule == 1 then + str = str.. "第一局黑桃3先出,随后赢家先出".."\n" + else + str = str.. "第一局系统随机选一张先出,随后赢家先出".."\n" + end + count=0 + + if self.WillBeOut == 1 then + str = str.. "能出必出" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str.. "可不必出" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + if self.showlength == 1 then + str = str.. "显示剩余牌" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + if self.fourBeltThree == 3 then + str = str.. "四带三" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.fourBeltThree == 2 then + str = str.. "四带二" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + if self.Heart10 == 1 then + str = str.. "红桃10分数翻倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.BombSpring == 1 then + str = str.. "\n4个3 或者3个A 1个2 春天\n" + end + if self.demolition == 1 then + str = str.. "炸弹不能拆" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + if self.fangzuobi == 1 and self.PlayerNum==3 then + str = str.. "防作弊" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.sandaidan == 1 then + str = str.. "\n三张飞机带单或者对子\n" + end + + if self.ba == 1 then + str = str.. "炸弹分数算赢家" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.fs == 1 then + str = str.. "反春天" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.planelack == 1 then + str = str.. "飞机少带可接完" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + if self.threelack == 1 then + str = str.. "三张少带可接完" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + if self.threeA ==1 then + str = str.. "三张A算炸弹" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.piao == 0 then + + elseif self.piao == 1 then + str = str.. "飘123" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.piao == 2 then + str = str.. "飘235" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.piao == 3 then + str = str.. "飘258" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.daniao == 1 then + str = str.. "打鸟+10" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.daniao == 2 then + str = str.. "打鸟+20" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.daniao == 3 then + str = str.. "打鸟+50" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + return str +end--]] + + +function M:GetDes(sp) + sp = sp or " " + local str = "" + -- str = str.. self.Times.."局"..sp + str = str .. RoomConfig.GetDes(self, sp) + if self.Leaf == 1 then + str = str.. "15张玩法"..sp + else + str = str.. "16张玩法"..sp + end + + if self.Rule == 1 then + str = str.. "第一局黑桃3先出,随后赢家先出"..sp + else + str = str.. "第一局系统随机选一张先出,随后赢家先出"..sp + end + + if self.WillBeOut == 1 then + str = str.. "能出必出"..sp + else + str = str.. "可不必出"..sp + end + if self.showlength == 1 then + str = str.. "显示剩余牌"..sp + end + if self.fourBeltThree == 3 then + str = str.. "四带三"..sp + elseif self.fourBeltThree == 2 then + str = str.. "四带二"..sp + end + if self.Heart10 == 1 then + str = str.. "红桃10分数翻倍"..sp + end + + if self.BombSpring == 1 then + str = str.. "4个3 或者3个A 1个2 春天"..sp + end + if self.demolition == 1 then + str = str.. "炸弹不能拆"..sp + end + if self.fangzuobi == 1 and self.PlayerNum==3 then + str = str.. "防作弊"..sp + end + + if self.sandaidan == 1 then + str = str.. "三张飞机带单或者对子"..sp + end + + if self.ba == 1 then + str = str.. "炸弹分数算赢家"..sp + end + + if self.fs == 1 then + str = str.. "反春天"..sp + end + + + if self.planelack == 1 then + str = str.. "飞机少带可接完"..sp + end + if self.threelack == 1 then + str = str.. "三张少带可接完"..sp + end + if self.threeA ==1 then + str = str.. "三张A算炸弹"..sp + end + + if self.piao == 0 then + + elseif self.piao == 1 then + str = str.. "飘123"..sp + elseif self.piao == 2 then + str = str.. "飘235"..sp + elseif self.piao == 3 then + str = str.. "飘258"..sp + end + + if self.daniao == 1 then + str = str.. "打鸟+10"..sp + elseif self.daniao == 2 then + str = str.. "打鸟+20"..sp + elseif self.daniao == 3 then + str = str.. "打鸟+50"..sp + end + + return "" +end + + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_Poker_SanQianFen/gamerule") + return gamerulepanel +end + + +function M:GetGameSMSize() + return 467,500 +end + +function M:GetGameName() + return "三千分" +end + +--function M:GetIsShowCardNumber() +-- return self.ShowNumber == 1 +--end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/shengsidu/EXGameInfo.lua b/lua_probject/extend_project/extend/poker/shengsidu/EXGameInfo.lua new file mode 100644 index 00000000..bd285088 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/shengsidu/EXGameInfo.lua @@ -0,0 +1,243 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 15:19 +--- +local EXGameInfo = {} + +local M = EXGameInfo + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/poker/shengsidu/ui/Info_Poker_ShengSiDu") + return self +end + +function M:FillData(view, index) + self._maxPlayer = 3 -- 默认玩家人数 + self._roundChoice = 3 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_ShengSiDu/Creat_RunFast") + + self._config:GetChild("people_2").onClick:Set(function() + self._config:GetController("rule").selectedIndex = 0 + end) + + local piao = self._config:GetController("piao") + local daniao = self._config:GetController("daniao") + + piao.onChanged:Add(function() + if piao.selectedIndex ~= 0 then + daniao.selectedIndex = 0 + end + end) + + daniao.onChanged:Add(function() + if daniao.selectedIndex ~= 0 then + piao.selectedIndex = 0 + end + end) + +end + +local _help_url = "ui://Info_Poker_ShengSiDu/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_Poker_ShengSiDu/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_Poker_ShengSiDu/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list = {"生死赌"} +function M:GetPlayList() + return _play_list +end + +function M:LoadConfigData(data) + local _config = self._config + _config:GetController("round").selectedIndex = data.opt - 1 + _config:GetController("rule").selectedIndex = data.rule -1 + _config:GetController("player_num").selectedIndex = data.maxPlayers-2 + _config:GetChild("fangzuobi").selected = data.fangzuobi + + _config:GetChild("fangpian3bidai").selected = false + if data.must_first_card==1 then + _config:GetChild("fangpian3bidai").selected = true + end + + _config:GetChild("will_be_card").selected = false + if data.willBeOut==1 then + _config:GetChild("will_be_card").selected = true + end + + + _config:GetChild("baodanbiding").selected = false + if data.baodanbili==1 then + _config:GetChild("baodanbiding").selected = true + end + + _config:GetChild("showlength").selected = false + if data.showlength==1 then + _config:GetChild("showlength").selected = true + end + + _config:GetChild("2bulian3").selected = false + if data.two_budai_three==1 then + _config:GetChild("2bulian3").selected = true + end + + _config:GetChild("3d2bufenduihesan").selected = false + if data.sandai2_notdui==1 then + _config:GetChild("3d2bufenduihesan").selected = true + end + + _config:GetChild("Akaitou").selected = false + if data.a_ke_dai_tou==1 then + _config:GetChild("Akaitou").selected = true + end + + _config:GetChild("3zkeshaodaiwan").selected = false + if data.threeoutlack==1 then + _config:GetChild("3zkeshaodaiwan").selected = true + end + + _config:GetChild("3zkeshaojiewan").selected = false + if data.threelack==1 then + _config:GetChild("3zkeshaojiewan").selected = true + end + + _config:GetChild("4zshaodaikechuwan").selected = false + if data.fouroutlack==1 then + _config:GetChild("4zshaodaikechuwan").selected = true + end + + + --_config:GetChild("baodanbiding").selected = data.baodanbili + --_config:GetChild("showlength").selected = data.showlength + --_config:GetChild("2bulian3").selected = data.two_budai_three + --_config:GetChild("3d2bufenduihesan").selected = data.sandai2_notdui + --_config:GetChild("Akaitou").selected = data.a_ke_dai_tou + --_config:GetChild("3zkeshaodaiwan").selected = data.threeoutlack + --_config:GetChild("3zkeshaojiewan").selected = data.threelack + --_config:GetChild("4zshaodaikechuwan").selected = data.fouroutlack + _config:GetController("piao").selectedIndex = data.zha_dan_score + _config:GetController("jifen").selectedIndex = data.ji_fen_type + +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController("round").selectedIndex + local rule = _config:GetController("rule").selectedIndex + + local player_num = _config:GetController("player_num").selectedIndex + local fangzuobi=false + if player_num>0 then + fangzuobi = _config:GetChild("fangzuobi").selected + end + + local must_first_card=0 + if rule==0 then + if _config:GetChild("fangpian3bidai").selected then + must_first_card=1 + end + else + --must_first_card=2 + end + + local willBeOut=0 + if _config:GetChild("will_be_card").selected then + willBeOut=1 + end + + local baodanbili=0 + if _config:GetChild("baodanbiding").selected then + baodanbili=1 + end + + local showlength=0 + if _config:GetChild("showlength").selected then + showlength=1 + end + + + local two_budai_three=0 + if _config:GetChild("2bulian3").selected then + two_budai_three=1 + end + + local sandai2_notdui=0 + if _config:GetChild("3d2bufenduihesan").selected then + sandai2_notdui=1 + end + + local a_ke_dai_tou=0 + if _config:GetChild("Akaitou").selected then + a_ke_dai_tou=1 + end + + + local threeoutlack=0 + if _config:GetChild("3zkeshaodaiwan").selected then + threeoutlack=1 + end + + local threelack=0 + if _config:GetChild("3zkeshaojiewan").selected then + threelack=1 + end + + local fouroutlack=0 + if _config:GetChild("4zshaodaikechuwan").selected then + fouroutlack=1 + end + + + + local zha_dan_score = _config:GetController("piao").selectedIndex + + local ji_fen_type = _config:GetController("jifen").selectedIndex + + + local _data = {} + _data["account_id"] = DataManager.SelfUser.Id + _data["opt"] = round + 1 + _data["rule"] = rule +1 + _data["must_first_card"] = must_first_card + _data["willBeOut"] = willBeOut + _data["maxPlayers"] = player_num + 2 + _data["fangzuobi"] = fangzuobi + _data["baodanbili"] = baodanbili + + + _data["showlength"] = showlength + _data["two_budai_three"] = two_budai_three + _data["sandai2_notdui"] = sandai2_notdui + _data["a_ke_dai_tou"] = a_ke_dai_tou + _data["threeoutlack"] = threeoutlack + _data["threelack"] = threelack + _data["fouroutlack"] = fouroutlack + _data["zha_dan_score"] = zha_dan_score + _data["ji_fen_type"] = ji_fen_type + + + return _data +end + +function M:OnChangeOption(ctype, pay_obj) + IGameInfo.OnChangeOption(self, ctype, pay_obj) + local people = self._config:GetController("player_num") + people.onChanged:Set(function() + self._maxPlayer = people.selectedIndex + 2 + self:ShowVariablePrice(ctype, pay_obj) + end) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/shengsidu/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/poker/shengsidu/EXPlayerInfoView.lua new file mode 100644 index 00000000..8289df0f --- /dev/null +++ b/lua_probject/extend_project/extend/poker/shengsidu/EXPlayerInfoView.lua @@ -0,0 +1,52 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + + +function M:FillData(player) + + + PlayerInfoView.FillData(self, player) + if player.cur_hp ~= nil then + self:UpdateScore(d2ad(player.cur_hp)) + else + local rt = 1 + if self._main_view._room.hpOnOff == 1 then + rt = self._main_view._room.score_times + end + self:UpdateScore(player.total_score * rt) + end + + +end + +function M:UpdatePiao(piao) + + if piao == nil or piao == -1 then + self._view:GetChild("piao").text = "" + elseif piao == 0 then + self._view:GetChild("piao").text = "不飘" + elseif piao == 1 then + self._view:GetChild("piao").text = "飘1分" + elseif piao == 2 then + self._view:GetChild("piao").text = "飘2分" + elseif piao == 3 then + self._view:GetChild("piao").text = "飘3分" + elseif piao == 5 then + self._view:GetChild("piao").text = "飘5分" + elseif piao == 8 then + self._view:GetChild("piao").text = "飘8分" + end +end + + +return M diff --git a/lua_probject/extend_project/extend/poker/shengsidu/ExtendConfig.lua b/lua_probject/extend_project/extend/poker/shengsidu/ExtendConfig.lua new file mode 100644 index 00000000..69cebd56 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/shengsidu/ExtendConfig.lua @@ -0,0 +1,260 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:57 +--- + +local EXTEND_MODEL_NAME = ... +local EXGameInfo = import(".EXGameInfo") +local RunFast_MainView = import(".ShengSiDu_MainView") +local RunFast_GameController = import(".ShengSiDu_GameController") +local RunFast_RoomConfig = import(".ShengSiDu_RoomConfig") +local RunFast_Player = import(".ShengSiDu_Player") +local RunFast_Room = import(".ShengSiDu_Room") +local RunFast_PlayerBackView = import(".ShengSiDu_PlayerBackView") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = "ExtendConfig" + self.extend_id = 14 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = RunFast_MainView + self._viewMap[ViewManager.View_PlayBack] = RunFast_PlayerBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/poker/shengsidu/ui/Info_Poker_ShengSiDu") + self:UnAssets() +end + +function M:UnAssets() + UIPackage.RemovePackage("extend/poker/shengsidu/ui/Extend_Poker_ShengSiDu") + ResourcesManager.UnLoadGroup("ShengSiDu_PK") +end + +local _gameInfo = nil +function M:GetGameInfo() +if not _gameInfo then + _gameInfo = EXGameInfo.new() +end +return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = RunFast_GameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return RunFast_Room.new() +end + +function M:GetGameRule() + return RunFast_RuleView.new() +end + +function M:GetIconUrl() + return "ui://Extend_Poker_ShengSiDu/icon" + -- +end + +function M:FillRoomConfig(room,_config) + room.room_config = RunFast_RoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + if _ctr_game == nil then + self:GetGameController() + end + printlog("1111111111111") + pt(s2croom) + local reload = s2croom["reload"] + + local _tableInfo = s2croom["tableInfo"] + pt(_tableInfo) + + + local _config = _tableInfo["config"] + room.room_config = RunFast_RoomConfig.new(_config) + + room.curren_round = _tableInfo["round"] + if room.curren_round == 0 and reload then + room.curren_round = 1 + end + + local playerList = _tableInfo["playerData"] + for i = 1,#playerList do + local _jp = playerList[i] + + local p = RunFast_Player.new() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + if (DataManager.SelfUser.account_id == pid) then + room.self_player = p + p.self_user = DataManager.SelfUser + else + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + end + p.self_user.location = Location.new(_jp["pos"] or "") + p.self_user.host_ip = _jp["ip"] + p.total_score = _jp["score"] or 0 + if _jp.hp_info then + p.cur_hp = _jp.hp_info.cur_hp + end + p.hp_info = _jp["hp_info"] + + if _jp["entrust"] then + p.entrust = _jp.entrust + end + room:AddPlayer(p) + end + + DataManager.CurrenRoom.fristSend=0 + + local owner = s2croom["owner"] + room.owner_id = owner + room.game_status = 0 + if reload then + + local reloadInfo = s2croom["reloadInfo"] + + local playing = reloadInfo["playing"] + + room.curren_turn_seat = reloadInfo["active_seat"] + local info_list = reloadInfo["info_list"] + if playing == true then + + + room.CurnrenState = StateType.Palying + room.game_status=1 + + for i = 1, #info_list do + local p = room:GetPlayerById(info_list[i]["playerid"]) + + if p == room.self_player then + p.hand_list = reloadInfo["hand_card"] + p.open= reloadInfo["open"] + end + DataManager.CurrenRoom.fristSend=info_list[1]["first_card"] + p.hand_count = info_list[i]["card_size"] + p.piao = info_list[i]["piao"] + local last_outcard = info_list[i]["last_outcard"] + if last_outcard ~= nil and last_outcard[1] ~= 0 then + local out_card_list = _ctr_game:ChangeCodeByFrom(last_outcard.card_list,true) + local card_type,number,length,plan_three_count = _ctr_game:GetCardListInfo(out_card_list,last_outcard.card_list) + p.out_card_list = _ctr_game:GetSortOutCardList(out_card_list,card_type,number,plan_three_count) + p.out_rawcard_list=last_outcard.card_list + else + p.out_card_list = {0} + p.out_rawcard_list={0} + end + end + else + + room.game_status=1 + + room.CurnrenState = StateType.PalyingWait + + room.winseat = reloadInfo["winseat"] + room.remaincards = reloadInfo["remaincards"] + + for i = 1, #info_list do + local playerData = info_list[i] + local p = room:GetPlayerById(playerData["playerid"]) + + p.ready = playerData["certainseat"] == 1 and true or false + + local last_outcard = info_list[i]["last_outcard"] + if last_outcard ~= nil and last_outcard[1] ~= 0 then + + local out_card_list = _ctr_game:ChangeCodeByFrom(last_outcard.card_list,true) + local card_type,number,length,plan_three_count = _ctr_game:GetCardListInfo(out_card_list,last_outcard.card_list) + p.out_card_list = _ctr_game:GetSortOutCardList(out_card_list,card_type,number,plan_three_count) + p.out_rawcard_list=last_outcard.card_list + else + p.out_card_list = {0} + p.out_rawcard_list={0} + end + + p.hand_list = info_list[i]["cards"] + p.winscore = info_list[i]["winscore"] + p.piao = info_list[i]["piao"] + p.hand_count = info_list[i]["card_size"] + p.thisboomnum=info_list[i]["thisboomnum"] + p.open= info_list[i]["open"] + end + end + else + room.CurnrenState = StateType.Ready + end +end + + + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.room_id + room.room_config = RunFast_RoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + local _info_list = _tableInfo["playerData"] + for i = 1,#_info_list do + local _jp = _info_list[i] + local p = RunFast_Player.new() + p.seat = _jp["seat"] + p.aid = _jp["aid"] + local pid = _jp["aid"] + if p.aid == DataManager.SelfUser.account_id then + room.self_player = p + end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.hand_list = _hand_card + p.hand_count = #_hand_card + p.total_score = _jp["score"] + p.piao = _jp["piao"] + p.open= _jp["open"] + p.hp_info = _jp["hp_info"] + if _jp['hp_info'] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_CardType.lua b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_CardType.lua new file mode 100644 index 00000000..b315dfd5 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_CardType.lua @@ -0,0 +1,26 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 11:30 +--- + +local RunFast_CardType = { + None = 0, + OneCard = 1,--一张 + OnePair = 2,--一对 + Three = 3,--三张 + Pairs = 4,--连对 + ThreeAndTwo = 5,--三带二 + ThreeAndOne = 6,--三带一 + Plane = 7,--飞机 + PlaneAndTwo = 8,--飞机带二 + PlaneAndOne = 9,--飞机带一 + Straight = 10, --顺子 + + Bomb = 11,--炸 + FourAndtThree=12,--四代三 + + FourAndtOne=13,--四带一 + +} + +return RunFast_CardType \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_GameController.lua b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_GameController.lua new file mode 100644 index 00000000..e032ddba --- /dev/null +++ b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_GameController.lua @@ -0,0 +1,731 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 11:28 +--- + +local RunFast_Protocol = import(".ShengSiDu_Protocol") +local RunFast_GameEvent = import(".ShengSiDu_GameEvent") +local RunFast_CardType = import(".ShengSiDu_CardType") +local RunFast_PutError = { + "必须先出 ", + "出牌不符合规定牌型 ", + "下家报单,请出最大的牌 ", + "炸弹不能拆", + "报单必顶不能过" +} + +local RunFast_GameController = {} + +local M = RunFast_GameController + +function M.new() + setmetatable(M, {__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("跑得快") + self.class = "RunFast_GameController" + return self +end + +function M:init(name) + GameController.init(self, name) + self:RegisterEvt() +end + +-- 事件注册 +function M:RegisterEvt() + self._eventmap[RunFast_Protocol.RunFast_Ming_Card] = self.OnMingCard + self._eventmap[RunFast_Protocol.RunFast_Init_Card] = self.OnInitCard + self._eventmap[RunFast_Protocol.RunFast_Options] = self.OnOptions +-- self._eventmap[RunFast_Protocol.RunFast_Index_Move] = self.OnIndexMove + self._eventmap[RunFast_Protocol.RunFast_Play_Succ] = self.OnPlaySucc + self._eventmap[RunFast_Protocol.RunFast_Put_Error] = self.OnPutError + self._eventmap[RunFast_Protocol.RunFast_Pass_Succ] = self.OnPassSucc + self._eventmap[RunFast_Protocol.RunFast_Result] = self.OnResult + self._eventmap[RunFast_Protocol.RunFast_Bomb_Score] = self.OnBombScore + self._eventmap[RunFast_Protocol.RunFast_Piao_Tip] = self.OnPiaoTip + self._eventmap[RunFast_Protocol.RunFast_Piao_Action] = self.OnPiaoAction + self._eventmap[RunFast_Protocol.RunFast_ConfirmToNextGameSucc] = self.OnConfrimToNextGameSucc + --self._eventmap[RunFast_Protocol.RunFast_Oener] = self.Oener + -- self._eventmap[Protocol.GAME_EVT_PLAYER_JOIN] = self.OnEventPlayerEnter + self._eventmap[RunFast_Protocol.PT_GAMETUOGUAN] = self.Game_TuoGuan +end +-- function M:Oener(evt_data) +-- local seat = evt_data["owner"] +-- self._cacheEvent:Enqueue(function() + +-- DispatchEvent(self._dispatcher,RunFast_GameEvent.Oener,seat) +-- end) +-- end +-- function M:OnEventPlayerEnter(evt_data) +-- local p = self._room:NewPlayer() +-- local _user + +-- _user = User.new() +-- _user.account_id = evt_data["aid"] +-- _user.host_ip = evt_data["ip"] +-- _user.nick_name = evt_data["nick"] +-- _user.head_url = evt_data["portrait"] +-- _user.sex = evt_data["sex"] +-- _user.location = Location.new(evt_data["pos"] or "") +-- p.seat = evt_data["seat"] +-- p.ready = evt_data["ready"] == 1 and true or false +-- p.self_user = _user +-- p.line_state = 1 +-- p.total_score=evt_data["score"] +-- p.hp_info = evt_data["hp_info"] +-- -- p.total_score=self._room.room_config.energyTab==0 and evt_data["score"] or evt_data["score"]/10 + +-- DataManager.CurrenRoom:AddPlayer(p) +-- DispatchEvent(self._dispatcher,GameEvent.PlayerEnter, p) +-- end +function M:SendCard(cards,currentCard) + local _data = {} + _data["card"] = cards + _data["all_card"] = currentCard + local _client = ControllerManager.GameNetClinet + _client:send(RunFast_Protocol.RunFast_Send_Card, _data) +end + +function M:SendPiao(piao) + local _data = {} + _data["id"] = piao + local _client = ControllerManager.GameNetClinet + _client:send(RunFast_Protocol.RunFast_Send_Piao, _data) +end + +function M:SendPass() + local _client = ControllerManager.GameNetClinet + _client:send(RunFast_Protocol.RunFast_Send_Guo) +end + +function M:SendInitCardEnd() + local _client = ControllerManager.GameNetClinet + _client:send(RunFast_Protocol.RunFast_Init_Card_End) +end + +function M:ConformToNextGame() + local _client = ControllerManager.GameNetClinet + _client:send(RunFast_Protocol.RunFast_ConfirmToNextGame) +end + +function M:OnMingCard(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + printlog("明牌=========>>>") + pt(evt_data) + local card = evt_data["mingpai"] + self._cacheEvent:Enqueue( + function() + self._room.ming_card = card + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnMingCard, card) + end + ) +end + +function M:OnInitCard(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + printlog("开始发牌===>>>") + pt(evt_data) + local cardlist = evt_data["cards"] + local round = evt_data["round"] + DataManager.CurrenRoom.fristSend=evt_data["first_card"] + self._cacheEvent:Enqueue( + function() + for _, player in ipairs(self._room.player_list) do + player:Clear() + player.hand_count = #cardlist + end + + self._room.curren_round = round + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnInitCard, round, cardlist) + end + ) +end + +function M:OnBombScore(evt_data) + printlog("炸弹分===>>>>") + pt(evt_data) + local scoreList = evt_data["gold_list"] + self._cacheEvent:Enqueue( + function() + for i = 1, #scoreList do + local score = scoreList[i].bom_score + local player = self._room:GetPlayerById(scoreList[i].aid) + if score then + player.total_score = player.total_score + score + else + printlog("炸弹分数异常===>>>") + end + + end + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnBombScore, scoreList) + end + ) +end + +function M:OnPlaySucc(evt_data) + printlog("出牌成功==========>>>") + pt(evt_data) + local seat = evt_data["player"] + local card_obj = evt_data["card_obj"] + local cards = card_obj["card_list"] + local remain = evt_data["remain"] -- 报单 + self._cacheEvent:Enqueue( + function() + local otherList = self:GetOtherSeatList(seat) + local player = self._room:GetPlayerBySeat(seat) + local out_card_list = self:ChangeCodeByFrom(cards, true) + player.hand_count = remain + local card_type, number, length, plan_three_count = self:GetCardListInfo(out_card_list,cards) + player.out_card_list = self:GetSortOutCardList(out_card_list, card_type, number, plan_three_count) + player.out_rawcard_list=cards + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnPlaySucc, player, remain, card_type, number, otherList,length) + end + ) +end + +function M:OnPassSucc(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue( + function() + local p = self._room:GetPlayerBySeat(seat) + p.out_card_list = {0} + p.out_rawcard_list={0} + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnPassSucc, p) + end + ) +end + +local erroCardName={[103]="方片3",[104]="方片4",[105]="方片5",[106]="方片6",[107]="方片7",[108]="方片8",[109]="方片9" +,[110]="方片10",[111]="方片J",[112]="方片Q",[113]="方片K",[114]="方片A"} +function M:OnPutError(evt_data) + printlog("错误提示====>>>") + pt(evt_data) + local code = evt_data["error"] + self._cacheEvent:Enqueue( + function() + local error_str = self:GetErrorStr(code) + if code==0 and DataManager.CurrenRoom.fristSend then + local temstr=erroCardName[DataManager.CurrenRoom.fristSend] + if temstr then + error_str=error_str..temstr + end + end + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnErrorTip, error_str) + end + ) +end +function M:TuoGuan(isTuo) + local _data = {} + _data["tuoguan"] = isTuo + local _client = ControllerManager.GameNetClinet + _client:send(RunFast_Protocol.SEND_TUOGUAN, _data) +end + +function M:Game_TuoGuan(evt_data) + local tuoguan = evt_data["tuoguan"] + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher, RunFast_GameEvent.Game_TuoGuan, tuoguan, seat) + end) +end +function M:OnIndexMove(evt_data) + local seat = evt_data["index"] + self._cacheEvent:Enqueue( + function() + self._room.curren_turn_seat = seat + self._room.is_new_bout = self:GetIsNewBout(seat) + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnIndexMove, seat) + end + ) +end + +function M:OnOptions(evt_data) + local play = evt_data["play"] + local pass = evt_data["pass"] + pass=pass+1 + printlog("操作====>>>") + pt(evt_data) + self._cacheEvent:Enqueue( + function() + local lastCardList,lastRawCardList = self:GetLastCardList(self._room.self_player.seat) + local cardType, cardNum, cardLength = self:GetCardListInfo(lastCardList,lastRawCardList) + + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnOptions, play, cardType, cardNum, cardLength, pass) + end + ) +end + +function M:OnPiaoTip(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local piao = evt_data["piao"] + local reload = evt_data["reload"] + self._cacheEvent:Enqueue( + function() + + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnPiaoTips, piao,reload) + end + ) +end + +function M:OnPiaoAction(evt_data) + local seat = evt_data["seat"] + local piao = evt_data["piao"] + + self._cacheEvent:Enqueue( + function() + + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnPiaoAction, seat,piao) + end + ) +end + +function M:OnResult(evt_data) + printlog("结算====>>>") + pt(evt_data) + local result_type = evt_data["type"] + + local info = evt_data["info"] + local winseat = evt_data["winseat"] + local remaincards = evt_data["remaincards"] + + if result_type == 1 then + local over = 1 + ControllerManager.SetGameNetClient(nil, true) + self._cacheEvent:Enqueue( + function() + for i = 1, #info do + local p = self._room:GetPlayerBySeat(info[i]["seat"]) + p.total_score = info[i]["score"] + info[i]["self_user"] = p.self_user + end + coroutine.start( + function () + coroutine.wait(2) + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnResult, over, info, winseat, remaincards) + end + ) + --DispatchEvent(self._dispatcher, RunFast_GameEvent.OnResult, over, info, winseat, remaincards) + end + ) + elseif result_type == 0 then + local over = 0 + self._cacheEvent:Enqueue( + function() + for i = 1, #info do + local p = self._room:GetPlayerBySeat(info[i]["seat"]) + p.total_score = info[i]["score"] + info[i]["self_user"] = p.self_user + end + coroutine.start( + function () + coroutine.wait(2) + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnResult, over, info, winseat, remaincards) + end + ) + --DispatchEvent(self._dispatcher, RunFast_GameEvent.OnResult, over, info, winseat, remaincards) + end + ) + else + local dissolve = 1 + ControllerManager.SetGameNetClient(nil, true) + for i = 1, #info do + local p = self._room:GetPlayerBySeat(info[i]["seat"]) + p.total_score = info[i]["score"] + info[i]["self_user"] = p.self_user + end + + coroutine.start( + function () + coroutine.wait(2) + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnResultByDissolve, over, info, winseat, dissolve) + end + ) + + -- DispatchEvent(self._dispatcher, RunFast_GameEvent.OnResultByDissolve, over, info, winseat, dissolve) + end +end + +function M:OnConfrimToNextGameSucc(evt_data) + local aid = evt_data["aid"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, RunFast_GameEvent.OnConfrimToNextGameSucc, aid) + end + ) +end +function M:Game_TuoGuan(evt_data) + local tuoguan = evt_data["tuoguan"] + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher, RunFast_GameEvent.Game_TuoGuan, tuoguan, seat) + end) +end +function M:ChangeCodeByFrom(cardList, isSort) + --printlog("ChangeCodeByFrom=====》》》") + --pt(cardList) + isSort = isSort or false + local new_card_list = {} + for i = 1, #cardList do + local flower = math.floor(cardList[i] / 100) + --printlog("flower==>>>",flower) + local number = cardList[i] % 100 + --printlog("number==>>>",number) + if number == 2 then + number = 15 + end + local card = number * 10 + flower + --printlog("card==>>>",card) + new_card_list[#new_card_list + 1] = card + end + return isSort == true and table.sort(new_card_list) or new_card_list +end + +function M:GetOtherSeatList(seat) + local list = {} + for i = 1, self._room.room_config.people_num do + if seat ~= i then + list[#list + 1] = i + end + end + return list +end + +-- +function M:GetIsNewBout(seat) + local passCount = 0 + for i = 1, #self._room.player_list do + local player = self._room.player_list[i] + if seat ~= player.seat then + local isPass = self:GetIsPass(player.out_card_list) + if isPass then + passCount = passCount + 1 + end + end + end + if passCount == self._room.room_config.people_num - 1 then + return true + else + return false + end +end + +function M:GetLastSeat(seat) + local last_seat = seat - 1 + if last_seat < 1 then + last_seat = last_seat + self._room.room_config.people_num + end + return last_seat +end + +function M:GetLastCardList(seat) + local last_seat = self:GetLastSeat(seat) + local player = self._room:GetPlayerBySeat(last_seat) + local isPass = self:GetIsPass(player.out_card_list) + if isPass then + if self._room.room_config.people_num == 2 then + return {} + end + local last_seat_2 = self:GetLastSeat(last_seat) + local player_2 = self._room:GetPlayerBySeat(last_seat_2) + local isPass_2 = self:GetIsPass(player_2.out_card_list) + if isPass_2 then + return {},{} + else + return player_2.out_card_list,player_2.out_rawcard_list + end + else + return player.out_card_list,player.out_rawcard_list + end +end + +function M:GetErrorStr(code) + return RunFast_PutError[code + 1] +end + +function M:GetSortOutCardList(outCardList, cardType, cardNumber, plan_three_count) + if cardType == 3 or cardType == 5 or cardType == 6 then + local removeList = {} + for i = #outCardList, 1, -1 do + local card = outCardList[i] + if math.floor(card / 10) == cardNumber then + removeList[#removeList + 1] = card + table.remove(outCardList, i) + end + end + for i = 1, #removeList do + table.insert(outCardList, 1, removeList[i]) + end + elseif cardType >= 7 and cardType <= 9 then + local removeList = {} + for i = #outCardList, 1, -1 do + local card = outCardList[i] + if math.floor(card / 10) <= cardNumber and math.floor(card / 10) > cardNumber - plan_three_count then + removeList[#removeList + 1] = card + table.remove(outCardList, i) + end + end + for i = 1, #removeList do + table.insert(outCardList, 1, removeList[i]) + end + end + return outCardList +end + +--None = 0, +--OneCard = 1, +--OnePair = 2, +--Three = 3, +--Pairs = 4, +--ThreeAndTwo = 5, +--ThreeAndOne = 6, +--Plane = 7, +--PlaneAndTwo = 8, +--PlaneAndOne = 9, +--Straight = 10, +--Bomb = 11 +-- 牌型,大小, 长度 +function M:GetCardListInfo(cardlist,cardRawList) + + if #cardlist == 0 then + return 0, 0, 0, 0 + end + + + -- 检测牌型 + local card_type, card_num, card_length, plan_three_count = RunFast_CardType.None, 0, #cardlist, 0 + local card_map = self:GetCardMapByList(cardlist) + --printlog("初始数据==>>>") + --pt(cardlist) + --printlog("逆向解析数据==>>>") + --pt(card_map) + + if #cardlist == 1 then + card_type = RunFast_CardType.OneCard + card_num = math.floor(cardlist[1] / 10) + elseif #cardlist == 2 then + card_type = RunFast_CardType.OnePair + card_num = math.floor(cardlist[1] / 10) + elseif #cardlist == 3 then + local str1=tonumber(string.sub(cardRawList[1],2)) + local str2=tonumber(string.sub(cardRawList[2],2)) + local str3=tonumber(string.sub(cardRawList[3],2)) + printlog("str1==>>>",str1) + printlog("str2==>>>",str2) + printlog("str3==>>>",str3) + if str1==str2 and str2==str3 then + card_type = RunFast_CardType.Three + else + card_num = math.floor(cardlist[1] / 10) + if card_num==14 and DataManager.CurrenRoom.room_config.threeA==1 then + -- body + card_type = RunFast_CardType.Bomb + else + card_type = RunFast_CardType.Three + + end + if str1~=str2~=str3 then + card_type=RunFast_CardType.Straight + end + end + + elseif #cardlist == 4 then + local str1=tonumber(string.sub(cardRawList[1],2)) + local str2=tonumber(string.sub(cardRawList[2],2)) + local str3=tonumber(string.sub(cardRawList[3],2)) + local str4=tonumber(string.sub(cardRawList[4],2)) + + if str1~=str2 and str2~=str3 and str3~=str4 then + card_type=RunFast_CardType.Straight + else + local max_key = 0 + for k, v in pairs(card_map) do + if #v == 4 then + card_type = RunFast_CardType.Bomb + card_num = k + elseif #v == 3 then + card_type = RunFast_CardType.ThreeAndOne + card_num = k + elseif #v == 2 then + if k > max_key then + max_key = k + end + card_type = RunFast_CardType.Pairs + card_num = max_key + end + end + + end + elseif #cardlist == 5 then + local count, max_key = 0, 0 + for k, v in pairs(card_map) do + if #v == 4 then + card_type=RunFast_CardType.FourAndtOne + card_num=k + elseif #v >= 3 then + card_type = RunFast_CardType.ThreeAndTwo + card_num = k + elseif #v == 1 then + count = count + 1 + if k > max_key then + max_key = k + end + if count == 5 then + card_type = RunFast_CardType.Straight + card_num = max_key + end + end + end + elseif #cardlist == 7 then + local count, max_key = 0, 0 + for k, v in pairs(card_map) do + if #v >= 4 then + card_type = RunFast_CardType.FourAndtThree + card_num = k + elseif #v == 1 then + count = count + 1 + if k > max_key then + max_key = k + end + if count == 7 then + card_type = RunFast_CardType.Straight + card_num = max_key + end + end + end + else + local one_count, two_count, three_count = 0, 0, 0 + local max_one_key, max_two_key, max_three_key = 0, 0, 0 + + for k, v in pairs(card_map) do + + if #v == 2 then + + if k > max_two_key then + max_two_key = k + end + two_count = two_count + 1 + if two_count == #cardlist / 2 then + card_type = RunFast_CardType.Pairs + card_num = max_two_key + end + elseif #v == 1 then + + if k > max_one_key then + max_one_key = k + end + one_count = one_count + 1 + if one_count == #cardlist then + card_type = RunFast_CardType.Straight + card_num = max_one_key + end + elseif #v == 3 then + + if max_three_key == 0 then + max_three_key = k + three_count = three_count + 1 + elseif k > max_three_key and k == max_three_key + 1 then + max_three_key = k + three_count = three_count + 1 + elseif k < max_three_key and k == max_three_key - 1 then + max_three_key = k + three_count = three_count + 1 + -- else + -- max_three_key = k + end + + --three_count = three_count + 1 + end + end + -- plan_three_count = three_count + -- if three_count * 5 >= #cardlist then + -- card_type = RunFast_CardType.PlaneAndTwo + -- card_num = max_three_key + -- elseif three_count * 4 >= #cardlist then + -- card_type = RunFast_CardType.PlaneAndOne + -- card_num = max_three_key + -- elseif three_count * 3 >= #cardlist then + -- card_type = RunFast_CardType.Plane + -- card_num = max_three_key + -- end + plan_three_count = three_count + + if three_count * 3 == #cardlist then + card_type = RunFast_CardType.Plane + card_num = max_three_key + + elseif three_count * 4 >= #cardlist and #cardlist%4==0 then + card_type = RunFast_CardType.PlaneAndOne + card_num = max_three_key + + + elseif three_count * 5 >= #cardlist and #cardlist%5==0 then + card_type = RunFast_CardType.PlaneAndTwo + card_num = max_three_key + + + end + + + + end + + return card_type, card_num, card_length, plan_three_count +end + +function M:GetCardMapByList(cardlist) + printlog("GetCardMapByList===>>>") + local card_map = {} + for i = 1, #cardlist do + local card = cardlist[i] + local card_num = math.floor(cardlist[i] / 10) + printlog("card_num==>>>",card_num) + if card_map[card_num] == nil then + card_map[card_num] = {card} + else + card_map[card_num][#card_map[card_num] + 1] = card + end + end + return card_map +end + +function M:GetIsPass(cardlist) + if #cardlist == 0 then + return true + end + if cardlist[1] ~= nil and cardlist[1] == 0 then + return true + end + return false +end + +--请求离开房间 +function M:LevelRoom(callBack) + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + _client:send( + Protocol.GAME_EXIT_ROOM, + nil, + function(res) + if res.ReturnCode == 0 then + ControllerManager.ChangeController(LoddyController) + elseif res.ReturnCode == 27 then + ViewUtil.ErrorTip(res.ReturnCode, "退出房间失败!") + end + callBack(res) + end + ) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_GameEvent.lua b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_GameEvent.lua new file mode 100644 index 00000000..06a56635 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_GameEvent.lua @@ -0,0 +1,21 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:55 +--- +local RunFast_GameEvent = { + OnMingCard = "OnMingCard", + OnInitCard = "OnInitCard", + OnOptions = "OnOptions", + OnPiaoTips = "OnPiaoTips", + OnPiaoAction = "OnPiaoAction", + OnBombScore = "OnBombScore", + OnIndexMove = "OnIndexMove", + OnPlaySucc = "OnPlaySucc", + OnErrorTip = "OnErrorTip", + OnPassSucc = "OnPassSucc", + OnResult = "OnResult", + OnResultByDissolve = "OnResultByDissolve", + OnConfrimToNextGameSucc = "OnConfrimToNextGameSucc", + Game_TuoGuan="Game_TuoGuan", +} +return RunFast_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_MainView.lua b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_MainView.lua new file mode 100644 index 00000000..734dcf59 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_MainView.lua @@ -0,0 +1,1440 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 9:41 +--- +local PKMainView = import("main.poker.PKMainView") +local RunFast_PlayerPokerInfoView = import(".ShengSiDu_PlayerPokerInfoView") +local RunFast_PlayerSelfPokerInfoView = import(".ShengSiDu_PlayerSelfPokerInfoView") +local RunFast_GameEvent = import(".ShengSiDu_GameEvent") +local RunFast_ResultView = import(".ShengSiDu_ResultView") +local RunFast_RightPanelView = import(".ShengSiDu_RightPanelView") +local PlayerInfoView = import(".EXPlayerInfoView") +local TableBG = import('Game.Data.TableBG') +local M = {} +function M.new() + setmetatable(M, {__index = PKMainView}) + local self = setmetatable({}, {__index = M}) + self.class = "RunFast_MainView" + self:init() + self._gamectr = ControllerManager.GetController(GameController) + return self +end + +local default_bg = 1 +local bg_config = { + {id = 1, url = 'extend/poker/shengsidu/bg/bg1', thumb = 'ui://Extend_Poker_ShengSiDu/table_bg1'}, + {id = 2, url = 'extend/poker/shengsidu/bg/bg2', thumb = 'ui://Extend_Poker_ShengSiDu/table_bg2'}, + {id = 3, url = 'extend/poker/shengsidu/bg/bg3', thumb = 'ui://Extend_Poker_ShengSiDu/table_bg3'} +} + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/poker/shengsidu/ui/Extend_Poker_ShengSiDu") + PKMainView.InitView(self, "ui://Extend_Poker_ShengSiDu/RunFast_Main_" .. room.room_config.people_num,nil,1,default_bg,bg_config,nil,"ui://Extend_Poker_ShengSiDu/SettingWindow1") + local _room = DataManager.CurrenRoom + local user_id = DataManager.SelfUser.account_id + + local json_data = Utils.LoadLocalFile(user_id.._room.game_id.."pai") + if json_data == nil then + local _gamectr = self._gamectr + self._room.pai = 0 + else + local _data = json.decode(json_data) + local pai = _data["pai"] + self._room.pai = pai + end + + json_data = Utils.LoadLocalFile(user_id.._room.game_id.."cardsize") + if json_data == nil then + local _gamectr = self._gamectr + self._room.cardsize = 1 + else + local _data = json.decode(json_data) + local cardsize = _data["cardsize"] + self._room.cardsize = cardsize + end + + + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem, self) + tem.visible = false + end + local list = self._room.player_list + for i=1,#list do + local p = list[i] + local info = _player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + end + + + local rightpanel = self._view:GetChild("right_panel") + if self._rightPanelView ~= nil then + self._rightPanelView:Destroy() + end + + self._rightPanelView = RunFast_RightPanelView.new(self, rightpanel) + for i=1,#self._room.player_list do + + if self._room.self_player.seat==self._room.player_list[i].seat and self._room.self_player.self_user.account_id ~= self._room.player_list[i].self_user.account_id then + -- body + local ErrorMsgTip = UIPackage.CreateObject("Common", "Win_ConnectTip") + local _action = self._view:AddChild(ErrorMsgTip) + _action.xy = Vector2((self._view.width - _action.width) / 4, self._view.height / 4) + local text = _action:GetChild("tex_message") + local btn1 = _action:GetChild("btn_connect") + local btn2 = _action:GetChild("btn_back") + text.text = "您来晚了,座位有人,请重新进牌桌" + btn1.visible=false + btn2:Center() + btn2.y=btn2.y+50 + btn2.onClick:Set(function() + -- body + ErrorMsgTip:Destroy() + ErrorMsgTip = nil + self._gamectr:LevelRoom(function(res) + ViewUtil.CloseModalWait() + NetResetConnectWindow.CloseNetReset() + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + end) + end + end + + if self._room.hpOnOff == 1 and self._room.score_times ~= 1 then + -- body + self._view:GetChild("roominfo_panel1"):GetChild("tex_beishu").text=self._room.score_times .."倍" + else + self._view:GetChild("roominfo_panel1"):GetChild("tex_beishu").text="" + end + + self.ctr_state = self._view:GetController("state") + self._ctr_action = self._view:GetController("action") + self._tex_leftTime = self._view:GetChild("time"):GetChild("title") + self.ctr_time = self._view:GetController("time") + self._text_round = self._view:GetChild("round") + self.ctr_card_eff = self._view:GetController("card_eff") + self._player_card_info = {} + + local _player_card_info = self._player_card_info + for i = 1, room.room_config.people_num do + local tem = self._view:GetChild("player_card_info_" .. i) + _player_card_info[i] = self:NewPlayerCardInfoView(tem, i) + end + + local list = room.player_list + --pt(list) + if not room.self_player.ready then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 0 + end + self._left_time = 0 + self.bgm_index = 1 + local state = self._room.CurnrenState + + if room.CurnrenState ~= StateType.PalyingWait then + self._state.selectedIndex = state + if room.CurnrenState == StateType.Palying then + self:ReConnectForStart() + end + else + + self._state.selectedIndex = StateType.Palying + self:ReconnectForClearing() + + end + + self._view:GetChild("btn_back_jiesan").onClick:Set(function () + if self.dismiss_room_cd_time > 0 then + ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!") + else + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:AskDismissRoom() + end + + end) + --local tempdsaf=self._view:GetChild("btn_back_jiesan") + --tempdsaf:GetChild("n3").displayObject.gameObject:SetActive(false) + --self._view:GetChild("btn_back_jiesan").displayObject.gameObject:SetActive(false) + + self:ChangeBgmMusic() + self:EventInit() + + self._view:GetChild("mask").onClick:Set(function() + self:ResetPoker() + end) + local btn_rule = self._view:GetChild("right_panel"):GetChild("btn_log") + self._view:GetChild('info_text'):GetChild('text').text = room.room_config:GetDes() + --[[if room.room_config.Leaf == 1 then + if room.room_config.people_num ==2 then + self._view:GetChild('wanfa_text').text = '十五张' .. '二人跑得快' .. room.score_times .. '倍' + else + self._view:GetChild('wanfa_text').text = '十五张' .. '三人跑得快' .. room.score_times .. '倍' + end + else + if room.room_config.people_num == 2 then + self._view:GetChild('wanfa_text').text = '十六张' .. '二人跑得快' .. room.score_times .. '倍' + else + self._view:GetChild('wanfa_text').text = '十六张' .. '三人跑得快' .. room.score_times .. '倍' + end + end--]] + + self._view:GetChild('wanfa_text').text =room.room_config.people_num.. '人生死赌' .. room.score_times .. '倍' + + if self._view:GetChild("shengyu")~=nil then + -- body + + if room.room_config.Leaf==1 then + -- body + self._view:GetChild("shengyu"):GetChild("shengyu").text="剩余15张" + else + self._view:GetChild("shengyu"):GetChild("shengyu").text="剩余16张" + end + end +end +function M:UpdateCard( index ) + self._room.pai=index + local card_info = self._player_card_info[1] + -- for i=1,#self._room.player_list do + -- print(i) + -- end + card_info:updatePoker() + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + + if self._room.curren_turn_seat ~= player.seat then + if player.out_card_list[1] == 0 then + player_card_info:SetOutCardInfo(nil, true) + else + player_card_info:SetOutCardInfo(player.out_card_list, false) + end + end + end + if self.caozuo==1 then + local ctr_number = self.pass + local lastCardList,lastRawCardList = self._gamectr:GetLastCardList(self._room.self_player.seat) + local cardType, cardNum, cardLength = self._gamectr:GetCardListInfo(lastCardList,lastRawCardList) + local m = false + local next_seat = self._room.self_player.seat + 1 + if next_seat > self._room.room_config.people_num then + next_seat = next_seat - self._room.room_config.people_num + end + if self._room:GetPlayerBySeat(next_seat).hand_count == 1 and self._room.room_config.WillBeOut == 1 then + m = true + end + local zdts = self._view:GetController("zidongtishi").selectedIndex + self._player_card_info[1]:ShowOutCardOption(ctr_number, cardType, cardNum, cardLength,m) + end +end + +function M:UpdateCardSize(index) + self._room.cardsize=index + local card_info = self._player_card_info[1] + card_info:updatePoker() +end + +function M:NewPlayerCardInfoView(tem, index) + if index == 1 then + return RunFast_PlayerSelfPokerInfoView.new(tem, self) + end + return RunFast_PlayerPokerInfoView.new(tem, self) +end + +function M:OnPlayerEnter(...) + MainView.OnPlayerEnter(self, ...) + local arg = {...} + local p = arg[1] + local index = self:GetPos(p.seat) + local info = self._player_info[index] + local selecet_seat = self._view:GetChild("seat_" .. index) + if selecet_seat ~= nil then + selecet_seat.visible = true + end + info:FillData(p) + if self._room.banker_seat == self._room.self_player.seat and self._room.self_player.ready then + self._ctr_action.selectedIndex = 0 + end +end + +function M:OnPlayerReady(...) + local arg = {...} + local p = arg[1] + local _room = self._room + local _player_info = self._player_info + if p.seat == _room.self_player.seat then + self._ctr_action.selectedIndex = 0 + end + local info = _player_info[self:GetPos(p.seat)] + info:Ready(true) +--local readyNum = 0 +--for i = 1, #_room.player_list do +-- local player = _room.player_list[i] +-- if player.ready then readyNum = readyNum + 1 end +--end +--if _room.banker_seat == _room.self_player.seat and readyNum > 1 and readyNum == _room.room_config.people_num then +-- if self._state.selectedIndex == 2 then +-- local _gamectr = ControllerManager.GetController(GameController) +-- _gamectr:StartGame() +-- end +-- --self._ctr_action.selectedIndex = 2 +--end +end + +function M:OnPlayerLeave(...) + MainView.OnPlayerLeave(self, ...) + local _room = self._room + if not _room.self_player.ready then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 0 + end +end + + +function M:EventInit() + local _gamectr = ControllerManager.GetController(GameController) + MainView.EventInit(self) + local _player_info = self._player_info + local _player_card_info = self._player_card_info + local _room = self._room + _gamectr:AddEventListener(RunFast_GameEvent.OnMingCard, function(...) + local arg = {...} + local card = arg[1] + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 1 + self:PlayCardEff(card) + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnInitCard, function(...) + local arg = {...} + local round = arg[1] + local cardlist = arg[2] + + + if self.result_view ~= nil then + self.result_view:Destroy() + self.result_view = nil + end + + self._player_card_info[1]:HidePiao() + + if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + self.MypokerList = cardlist + end + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 0 + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + self:UpdateRound(round) + ViewUtil.PlaySound("ShengSiDu_PK", "extend/poker/shengsidu/sound/fapai.mp3") + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local head_info = self._player_info[self:GetPos(p.seat)] + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + -- body + + if self._room.room_config.showlength==1 then + -- body + head_info._view:GetController("shengyu").selectedIndex=1 + else + head_info._view:GetController("shengyu").selectedIndex=0 + end + + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..p.hand_count.."张" + + + + end + p:Clear() + head_info:FillData(p) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:Clear() + head_info:Ready(false) + + if p.seat == self._room.self_player.seat then + if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + card_info:InitPoker(cardlist,true,1) + else + card_info:InitPoker(cardlist,true) + end + + else + --card_info:UpdateHandPoker(#cardlist,true,false) --todo + --card_info:UpdateRemainCard(#cardlist,true) + end + end + end) + + + -- _gamectr:AddEventListener(RunFast_GameEvent.Oener,function ( ... ) + -- local arg = {...} + -- local seat = arg[1] + -- local head_info = self._player_info[self:GetPos(seat)] + -- head_info._view:GetController("Oener").selectedIndex=1 + -- end) + _gamectr:AddEventListener(RunFast_GameEvent.OnIndexMove, function(...) + local arg = {...} + local seat = arg[1] + local isNewBout = arg[2] + local index = self:GetPos(seat) + + self.ctr_time.selectedIndex = index + -- for i=1,#self._player_info do + -- if index==i then + -- -- body + -- local head_info = self._player_info[index] + -- head_info:MarkBank(true) + -- else + -- local head_info = self._player_info[i] + -- head_info:MarkBank(false) + -- end + -- end + + if index == 1 then + local card_info = self._player_card_info[index] + card_info:SetOutCardInfo(nil, false) + -- if self.MypokerList ~= nil then + -- -- body + -- card_info:Clear() + -- card_info:InitPoker(self.MypokerList, false) + -- self.MypokerList = nil + -- end + end + self._left_time = 20 + if self._room.ming_card ~= nil then + self._view:GetTransition("t" .. index):Play() + self._room.ming_card = nil + if self.tween ~= nil then + TweenUtils.Kill(self.tween) + self.tween = nil + end + end + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnBombScore, function(...) + local arg = {...} + local scoreList = arg[1] + -- for i = 1, #scoreList do + -- local player = self._room:GetPlayerBySeat(i) + -- local card_info = self._player_card_info[self:GetPos(i)] + -- local head_info = self._player_info[self:GetPos(i)] + -- card_info:PlayScore(scoreList[i], true) + -- head_info:UpdateScore(player.total_score) + -- end + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnPlaySucc, function(...) + local arg = {...} + local p = arg[1] + local card_number = arg[2] + local cardstype = arg[3] + local num = arg[4] + local otherList = arg[5] + local length = arg[6] + self.ctr_time.selectedIndex = 0 + + local index = self:GetPos(p.seat) + if index==1 then + self.caozuo=0 + end + local head_info = self._player_info[index] + if head_info._view:GetChild("shengyu")~=nil then + -- body + -- body + if card_number~=nil then + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..card_number.."张" + end + + + end + local card_info = self._player_card_info[index] + card_info:SetOutCardInfo(p.out_card_list, false, true) + for i = 1, #otherList do + local other_seat = otherList[i] + local other_card_info = self._player_card_info[self:GetPos(other_seat)] + other_card_info:SetOutCardBlack() + end + if index == 1 then + card_info:DeleteHandCards(p.out_card_list) + else + card_info:SetRemainCardNumber(card_number == 1) + --card_info:UpdateHandPoker(card_number,false,false) -- todo + end + if self._room.is_new_bout == true then + for i = 1, #self._room.player_list do + local player = self._room.player_list[i] + local card_info_i = self._player_card_info[self:GetPos(player.seat)] + if p.seat ~= player.seat then + card_info_i:SetOutCardInfo(nil, false) + end + end + -- card_info:PlayCardTypeEff(cardstype) + -- if cardstype~=12 then + -- -- body + + + -- if cardstype==10 and length>=6 then + -- -- card_info_i + -- local chuan = UIPackage.CreateObject("Extend_Poker_RunFast", "chuan1") + -- local card_info_i = self._player_card_info[self:GetPos(p.seat)] + + -- card_info_i._mask_liangpai:AddChild(chuan) + -- chuan:GetChild("n0").asMovieClip.playing = true + -- ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/sunzi.mp3") + -- coroutine.start(function() + -- coroutine.wait(1.5) + -- if chuan~=nil then + -- -- body + -- chuan:Dispose() + -- end + + -- end) + + -- else + -- self:_Effect(cardstype, p) + -- end + -- end + self:_Effect(cardstype, p) + + else + if cardstype == 11 and cardstype~=12 then + self:_Effect(cardstype, p) + end + end + self:PlaySound(p.self_user.sex, self:GetSoundFileName(cardstype, num, self._room.is_new_bout)) + if card_number == 1 then + --self:ChangeBgmMusic(2) + self:ChangeBgmMusic(1) + if self._cor_sound ~= nil then + coroutine.stop(self._cor_sound) + end + self._cor_sound = nil + self._cor_sound = coroutine.start(function() + coroutine.wait(1) + self:PlaySound(p.self_user.sex, "card_1") + end) + end + + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnPassSucc, function(...) + local arg = {...} + local p = arg[1] + + self.ctr_time.selectedIndex = 0 + local card_info = self._player_card_info[self:GetPos(p.seat)] + + --card_info:SetOutCardInfo(nil, false) + if p.seat == self._room.self_player.seat and self.MypokerList ~= nil then + -- body + card_info:Clear() + card_info:InitPoker(self.MypokerList, false) + self.MypokerList = nil + end + card_info:SetOutCardInfo(nil, true) + self:PlaySound(p.self_user.sex, "pass_" .. math.random(1, 4)) + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnErrorTip, function(...) + local arg = {...} + local error_str = arg[1] + self._player_card_info[1]:ErrorTip(error_str) + -- self._player_card_info[1]:ResetPoker() + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnPiaoTips, function(...) + local arg = {...} + local piao = arg[1] + local reload = arg[2] + if reload == 0 then + + if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + self.MypokerList = cardlist + end + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 0 + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + self:UpdateRound(self._room.curren_round) + + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local head_info = self._player_info[self:GetPos(p.seat)] + + p:Clear() + head_info:FillData(p) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:Clear() + head_info:Ready(false) + head_info:UpdatePiao(-1) + end + end + + self._player_card_info[1]:ShowPiao(piao) + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnPiaoAction, function(...) + local arg = {...} + local seat = arg[1] + local piao = arg[2] + local head_info = self._player_info[self:GetPos(seat)] + head_info:UpdatePiao(piao) + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnOptions, function(...) + local arg = {...} + local play = arg[1] + local pass = arg[5] + local card_type = arg[2] + local card_number = arg[3] + local card_length = arg[4] + + local ctr_number = pass + + self.caozuo=1 --记录是否是自己出牌的阶段 + self.pass=pass + local m = false + local next_seat = self._room.self_player.seat + 1 + local card_info = self._player_card_info[1] + --card_info:SetOutCardInfo(nil, false) + if self.MypokerList ~= nil then + -- body + card_info:Clear() + card_info:InitPoker(self.MypokerList, false) + self.MypokerList = nil + end + if next_seat > self._room.room_config.people_num then + next_seat = next_seat - self._room.room_config.people_num + end + if self._room:GetPlayerBySeat(next_seat).hand_count == 1 and self._room.room_config.WillBeOut == 1 then + m = true + end + local zdts = self._view:GetController("zidongtishi").selectedIndex + self._player_card_info[1]:ShowOutCardOption(ctr_number, card_type, card_number, card_length,m,play,zdts) + end) + -- 托管 + _gamectr:AddEventListener(RunFast_GameEvent.Game_TuoGuan, function(...) + local arg = {...} + local tuoguan = arg[1] + local seat = arg[2] + + local tuoguanzhong = self._view:GetChild("tuoguanzhong") + local zhezhao = self._view:GetChild("n109") + local head_info = self._player_info[self:GetPos(seat)] + if (tuoguan == 1) then + if (seat == self._room.self_player.seat ) then + tuoguanzhong.visible = true + -- tuoguanzhong.sortingOrder = 2 + zhezhao.visible = true + zhezhao.onClick:Set(function() + _gamectr:TuoGuan(0) + end) + else + head_info._view:GetController("tuoguan").selectedIndex = 1 + end + -- if self.ispanguangzhe == true then + -- -- body + -- zhezhao.visible = false + -- end + else + if (seat == self._room.self_player.seat) then + tuoguanzhong.visible = false + zhezhao.visible = false + -- local btn_tuoguan = self._view:GetChild("n107") + -- btn_tuoguan.onClick:Set(function() + -- _gamectr:TuoGuan(1) + -- -- self:ZhiNengtuoguan() + -- end) + else + head_info._view:GetController("tuoguan").selectedIndex = 0 + end + end + end) + _gamectr:AddEventListener(RunFast_GameEvent.OnResult, function(...) + local arg = {...} + local over = arg[1] + local info = arg[2] + local win_seat = arg[3] + local remaincards = arg[4] + -- local energyTab = arg[5] + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if self.MypokerList ~= nil then + -- body + local card_info = self._player_card_info[self:GetPos(self._room.self_player.seat)] + card_info:Clear() + card_info:InitPoker(self.MypokerList, false) + self.MypokerList = nil + end + if otherpoker_list ~= nil then + -- body + otherpoker_list:RemoveChildrenToPool() + otherpoker_list.visible=true + end + + if remaincards then + -- body + local newremaincards = _gamectr:ChangeCodeByFrom(remaincards,true) + table.sort(remaincards) + for i = #newremaincards, 1, -1 do + coroutine.start(function() + coroutine.wait(0.01) + + local flow = newremaincards[i] % 10 + local num = (newremaincards[i] - (newremaincards[i] % 10)) / 10 + local card_n = flow * 100 + num + local poker_item = UIPackage.CreateObject("Extend_Poker_ShengSiDu", "poker6") + + --local code = self:ChangeCodeByTo(card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/" .. card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + local card_code_obj = nil + if DataManager.CurrenRoom.pai==0 then + if card_n==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/"..card_n.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/"..card_n) + end + + else + if card_n==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/"..card_n.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + end + + end + if card_code_obj ~= nil then + card_code_obj:SetScale(0.6, 0.6) + if poker_item ~= nil then + poker_item:AddChild(card_code_obj) + otherpoker_list:AddChild(poker_item) + end + + end + + end) + + + end + + end + if self._cor_sound ~= nil then + coroutine.stop(self._cor_sound) + self._cor_sound = nil + end + + if self.destory_win ~= nil then + coroutine.stop(self.destory_win) + end + + self.destory_win = nil + self.destory_win = coroutine.start(function() + -- print("11111111111111") + -- coroutine.wait(1) + if self._room.self_player.seat == win_seat then + local sprint_seat_list = self:GetSpringSeats(info) + if #sprint_seat_list > 0 then + local url = "ui://Extend_Poker_ShengSiDu/Spring" + self.WinItem_view = UIPackage.CreateObjectFromURL(url) + self._view:AddChild(self.WinItem_view) + self.WinItem_view:Center() + self.WinItem_view:GetTransition("t0"):Play() + ViewUtil.PlaySound("ShengSiDu_PK", "base/common/sound/win new.mp3") + end + -- local url = #sprint_seat_list > 0 and "ui://Extend_Poker_RunFastNew/Spring" or "ui://Extend_Poker_RunFastNew/Win_Mine" + + + else + local beigang = false + if #self:GetSpringSeats(info)>0 then + for i=1,#self:GetSpringSeats(info) do + if self:GetSpringSeats(info)[i]==self._room.self_player.seat then + local url = "ui://Extend_Poker_ShengSiDu/spring2" + self.WinItem_view = UIPackage.CreateObjectFromURL(url) + self._view:AddChild(self.WinItem_view) + self.WinItem_view:Center() + self.WinItem_view:GetTransition("t0"):Play() + beigang=true + end + end + + end + -- if beigang == false then + -- self:CreateRankEff() + -- end + + end + for i = 1, #info do + local player = info[i] + local p = self._room:GetPlayerBySeat(player.seat) + local head_info = self._player_info[self:GetPos(player.seat)] + local card_info = self._player_card_info[self:GetPos(player.seat)] + if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then + p.hp_info = player.hp_info + head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) + head_info._view:GetChild('zhanji').visible = true + local num = player.hp_info.total_hp + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(player.hp_info.total_hp) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + end + card_info:PlayScore(d2ad(player.hp_info.round_actual_hp), false, win_seat == player.seat) + else + local rt = 1 + if self._room.hpOnOff == 1 then + rt = self._room.score_times + end + if over == 1 and self._room.hpOnOff == 1 then + head_info:UpdateScore(player.score / 10) --不可负分 + else + head_info:UpdateScore(player.score * rt) + end + card_info:PlayScore(player.winscore * rt, false, win_seat == player.seat) + end + + + if player.seat ~= self._room.self_player.seat then + card_info:UpdateHandPoker(player.cards, false, true) + card_info:SetRemainCardNumber(false) + end + end + self:ChangeBgmMusic(1) + -- if over == 0 then + if #self:GetSpringSeats(info) > 0 then + -- print("222222222222222222") + coroutine.wait(1) + else + -- print("333333333333333333") + -- coroutine.wait(2) + end + + self.result_view = RunFast_ResultView.new(self._root_view, info, self._room.room_id, over, win_seat, 0, remaincards) + self.result_view:Show() + if self.WinItem_view ~= nil then + self.WinItem_view:Dispose() + self.WinItem_view = nil + end + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + + if self._room.self_player.entrust == true then + local btn_confirm = self.result_view._view:GetChild("btn_confirm") + btn_confirm.onClick:Call() + end + + -- local _actionView = UIPackage.CreateObject("Common", "Btn_Yellow") + -- _actionView.icon = "ui://Common/btn_comfirm" + -- _actionView.onClick:Set(function () + -- --local _gamectr = ControllerManager.GetController(GameController) + -- _gamectr:ConformToNextGame() + -- _actionView:Dispose() + -- end) + -- _actionView.xy = Vector2(900, 625) + -- self._view:AddChild(_actionView) + -- else + -- coroutine.wait(4) + -- self.result_view = RunFast_ResultView.new(self._root_view,info,self._room.room_id) + -- self.result_view:Show() + -- end + end) + if over==1 then + -- body + self:UnmarkSelfTuoguan() + ControllerManager.ChangeController(LoddyController) + + end + end) + + _gamectr:AddEventListener(RunFast_GameEvent.OnResultByDissolve, function(...) + + local arg = {...} + local over = arg[1] + local info = arg[2] + local winseat = arg[3] + local dissolve = arg[4] + + self.result_view = RunFast_ResultView.new(self._root_view, info, self._room.room_id, over, winseat, dissolve,nil) + self.result_view:Show() + ControllerManager.ChangeController(LoddyController) + self:UnmarkSelfTuoguan() + end) + + -- 确定开始下一局 成功 + _gamectr:AddEventListener(RunFast_GameEvent.OnConfrimToNextGameSucc, function(...) + local arg = {...} + local aid = arg[1] + local p = self._room:GetPlayerById(aid) + if p.seat == self._room.self_player.seat then + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + if self.destory_win ~= nil then + coroutine.stop(self.destory_win) + self.destory_win = nil + end + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + local player_head = self._player_info[self:GetPos(player.seat)] + player_card_info:Clear() + local otherpoker_list = self._view:GetChild("otherpoker_list") + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + --player_head._view:GetController("Oener").selectedIndex=0 + end + end + local player_info = self._player_info[self:GetPos(p.seat)] + player_info:Ready(true) + end) +end + +function M:ReConnectForStart() + + local _gamectr = ControllerManager.GetController(GameController) + self._room.is_new_bout = _gamectr:GetIsNewBout(self._room.curren_turn_seat) + self._state.selectedIndex = 1 + self._view:GetController("time").selectedIndex = self:GetPos(self._room.curren_turn_seat) + + self:UpdateRound(self._room.curren_round) + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + local head_info = self._player_info[self:GetPos(player.seat)] + head_info:Ready(false) + + --如果是体力值不可负分模式 则显示当前的hp值 + if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then + head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) + head_info._view:GetChild('zhanji').visible = true + local num = player.hp_info.total_hp + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = '+' .. d2ad(player.hp_info.total_hp) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + end + else + local rt = 1 + if self._room.hpOnOff == 1 then + rt = self._room.score_times + end + head_info:UpdateScore(player.total_score * rt) + end + + head_info:UpdateLineState(player.line_state) + head_info:UpdatePiao(player.piao) + + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + -- body + + + if self._room.room_config.showlength==1 then + -- body + head_info._view:GetController("shengyu").selectedIndex=1 + else + head_info._view:GetController("shengyu").selectedIndex=0 + end + + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..player.hand_count.."张" + + + + end + if player.seat == self._room.self_player.seat then + if player.open ~= nil and player.open == 0 and self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + self.MypokerList = player.hand_list + player_card_info:InitPoker(player.hand_list, false, 1) + + else + + player_card_info:InitPoker(player.hand_list, false) + end + + else + + player_card_info:SetRemainCardNumber(player.hand_count == 1) + if player.hand_count == 1 then + self.bgm_index = 2 + end + end + if self._room.curren_turn_seat ~= player.seat then + -- head_info:MarkBank(false) + if player.out_card_list[1] == 0 then + player_card_info:SetOutCardInfo(nil, false) + else + player_card_info:SetOutCardInfo(player.out_card_list, false) + end + else + -- head_info:MarkBank(true) + end + end +end + +function M:ReconnectForClearing() + self:UpdateRound(self._room.curren_round) + local win_seat = 0 + --self.rank_view = self:CreateRankEff(self._room.winseat) + for _, player in ipairs(self._room.player_list) do + local head_info = self._player_info[self:GetPos(player.seat)] + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + + --如果是体力值不可负分模式 则显示当前的hp值 + if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then + head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) + head_info._view:GetChild('zhanji').visible = true + local num = player.hp_info.total_hp + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = '+' .. d2ad(player.hp_info.total_hp) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + end + -- player_card_info:PlayScore(d2ad(player.hp_info.round_actual_hp)) + else + local rt = 1 + if self._room.hpOnOff == 1 then + rt = self._room.score_times + end + head_info:UpdateScore(player.total_score * rt) + -- player_card_info:PlayScore(player.winscore * rt, false, self._room.winseat) + end + + head_info:UpdateLineState(player.line_state) + --head_info._view:GetController("Oener").selectedIndex=0 + head_info:UpdatePiao(player.piao) + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + -- body + + if self._room.room_config.showlength==1 then + -- body + head_info._view:GetController("shengyu").selectedIndex=1 + else + head_info._view:GetController("shengyu").selectedIndex=0 + end + + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..player.hand_count.."张" + + end + + + if player.seat == self._room.self_player.seat then + + player_card_info:InitPoker(player.hand_list, false) + else + player_card_info:UpdateHandPoker(player.hand_list, false, true) + end + if player.out_card_list[1] == 0 then + + player_card_info:SetOutCardInfo(nil, false) + else + player_card_info:SetOutCardInfo(player.out_card_list, false) + end + end + win_seat=self._room.winseat + self._room.winseat = nil + + local remaincards = self._room.remaincards + if self._room.game_status==1 then + + + -- body + coroutine.start(function() + coroutine.wait(0.3) + + self.result_view = RunFast_ResultView.new(self._root_view, self._room.player_list, self._room.room_id, 0, win_seat,0,nil) + self.result_view:Show() + local card_info = self._player_card_info[1] + card_info._view:GetChild("out_card_list").visible=true + end) + if remaincards then + + local newremaincards = self._gamectr:ChangeCodeByFrom(remaincards,true) + + -- body + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list:RemoveChildrenToPool() + otherpoker_list.visible=true + end + + for i = #newremaincards, 1, -1 do + coroutine.start(function() + coroutine.wait(0.1 * (15 - i)) + + + local flow = newremaincards[i] % 10 + local num = (newremaincards[i] - (newremaincards[i] % 10)) / 10 + local card_n = flow * 100 + num + local poker_item = UIPackage.CreateObject("Extend_Poker_ShengSiDu", "poker6") + + --local code = self:ChangeCodeByTo(card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/" .. card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + local card_code_obj + if DataManager.CurrenRoom.pai==0 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/"..card_n) + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/" .. card_n .. "_2") + end + if card_n==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/"..card_n.."_1") + end + if card_code_obj then + card_code_obj:SetScale(0.6, 0.6) + poker_item:AddChild(card_code_obj) + end + + otherpoker_list:AddChild(poker_item) + end) + end + end + end +end + +function M:CreateRankEff() + self.rank_view = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/rank_eff") + self._view:AddChild(self.rank_view) + self.rank_view:Center() + self.rank_view:GetTransition("t0"):Play() +end + +function M:_Effect( type1 ,player) + -- body + + if type1==13 then return printlog("四带一效果==》》》") end + + + + if type1 < 7 and type1 ~= 4 and type1 ~= 5 then + return + end + local eff_code = 0 + if type1 == 10 then + eff_code = 2 + elseif type1 == 11 then + eff_code = 3 + elseif type1 == 4 then + eff_code = 4 + elseif type1 == 12 then + return + elseif type1 == 5 then + eff_code = 5 + else + eff_code = 1 + end + local info = self._player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/eff_"..eff_code) + -- local effect = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/eff2_1") + effect.touchable = false + effect:GetTransition("t0"):Play() + -- effect:SetXY((self._view.width - effect.width) / 2,(self._view.hight - effect.hight) / 2) + if eff_code==3 then + self._view:AddChild(effect) + else + pNode:AddChild(effect) + end + + + if eff_code==1 then + self.eff_feiji = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/eff_feiji") + self._view:AddChild(self.eff_feiji) + self.eff_feiji:Center() + self.eff_feiji:GetTransition("t0"):Play() + end + if eff_code==3 then + effect:Center() + else + if self:GetPos(player.seat)== 1 then + effect.x,effect.y = 0,24 + else + effect.x,effect.y = 24,67 + end + end + + + -- effect:Center() + -- if eff_code ==3 then + -- coroutine.start(function() + -- coroutine.wait(1) + -- effect:Dispose() + -- end) + -- else + coroutine.start(function() + coroutine.wait(1) + if self.eff_feiji~=nil then + self.eff_feiji:Dispose() + end + effect:Dispose() + end) + -- end +end +-- function M:_Effect(type1, player) + -- if type1 < 7 and type1 ~= 4 then return end + -- local eff_code = 0 + -- if type1 == 10 then --顺子 + -- eff_code = 2 + -- elseif type1 == 11 then --炸 + -- eff_code = 3 + -- elseif type1 == 4 then --连对 + -- eff_code = 4 + -- else + -- eff_code = 6 + -- end + -- local info = self._player_card_info[self:GetPos(player.seat)] + -- local pNode = info._mask_liangpai + -- local effect = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/MovieClip" .. eff_code) + + -- effect.touchable = false + + -- --effect:SetXY((self._view.width - effect.width) / 2,(self._view.hight - effect.hight) / 2) + -- pNode:AddChild(effect) + -- if type1 == 10 then --顺子 + -- effect.x, effect.y = -400, -200 + -- elseif type1 == 11 then --炸 + -- effect.x, effect.y = -80, -225 + -- elseif type1 == 4 then --连对 + -- effect.x, effect.y = -400, -200 + -- else + -- effect.x, effect.y = -157, -140 + -- end + -- coroutine.start(function() + -- if type1== 10 or type1== 11 or type1== 4 then + -- -- body + -- coroutine.wait(2) + -- effect:Dispose() + -- else + -- coroutine.wait(1.2) + -- effect:Dispose() + -- end + + -- end) +-- if eff_code ==3 then +-- coroutine.start(function() +-- coroutine.wait(1) +-- effect:Dispose() +-- end) +-- else +-- coroutine.start(function() +-- coroutine.wait(2) +-- effect:Dispose() +-- end) +-- end +-- end + + +function M:UpdateRound(round) + local total_round = self._room.room_config.Times + self._text_round.text = string.format("%d / %d 局", round, total_round) +end + +function M:GetSoundFileName(type, num, isNewBout) + local fileName + if isNewBout then + if type > 6 or type == 4 then + if type == 8 or type == 9 then + type = 7 + end + fileName = tostring(type) + elseif type > 2 then + fileName = string.format("3_%d", num) + else + fileName = string.format("%d_%d", type, num) + end + else + math.randomseed(os.time()) + if type > 2 and type ~= 11 then + local r = math.random(1, 3) + fileName = "dani_" .. r + elseif type == 11 then + fileName = tostring(type) + else + fileName = string.format("%d_%d", type, num) + end + end + return fileName +end + +function M:GetSpringSeats(player_info) + local seat_list = {} + local card_max_length = self._room.room_config.Leaf + 14 + for i = 1, #player_info do + local player = player_info[i] + if #player.cards == card_max_length then + seat_list[#seat_list + 1] = player.seat + end + end + return seat_list +end + +function M:PlayCardEff(card) + if self.cor_card_eff ~= nil then + coroutine.stop(self.cor_card_eff) + end + self.cor_card_eff = nil + local cor_time = 0.1 + self.cor_card_eff = coroutine.start(function() + self._popEvent = false + local eff = self._view:GetChild("poker_eff") + local poker_obj = eff:GetChild("poker") + local poker_back = eff:GetChild("di") + poker_back.visible = false + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/" .. card) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card .. "_2") + local card_code_obj + if DataManager.CurrenRoom.pai==0 then + printlog("DataManager.CurrenRoom.pai==11","ui://Extend_Poker_ShengSiDu/"..card) + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/"..card) + else + printlog("DataManager.CurrenRoom.pai==222","ui://Extend_Poker_ShengSiDu/"..card) + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card .. "_2") + end + card_code_obj:SetScale(1, 1) + poker_obj:AddChild(card_code_obj) + card_code_obj.visible = true + self.tween = TweenUtils.TweenFloat(0, 2340, cor_time, function(x) + poker_back.rotationY = x + poker_obj.rotationY = -180 + x + local x_1 = x % 360 + if (x_1 > 90 and x_1 < 270) then + poker_obj.visible = true + poker_back.visible = false + else + poker_obj.visible = false + poker_back.visible = true + end + end) + coroutine.wait(1) + --card_code_obj:Dispose() + self._popEvent = true + end) + +end + +function M:ResetPoker() + -- if self._room.curren_turn_seat == self._room.self_player.seat then + -- self._player_card_info[1]:ResetPoker() + -- end + self._player_card_info[1]:ResetPoker() +end + +function M:PlaySound(sex, path) + + local sex_path = ViewUtil.Sex_Chat[sex]-- 1 男 2 女 + local sound_path = string.format("extend/poker/shengsidu/sound/%s/%s.mp3", sex_path, path) + ViewUtil.PlaySound("ShengSiDu_PK", sound_path) +end + +function M:ChangeBgmMusic(bgm_index) + if bgm_index == nil then + bgm_index = self.bgm_index + else + self.bgm_index = bgm_index + end + ViewUtil.PlayMuisc("ShengSiDu_PK", string.format("extend/poker/shengsidu/sound/bgm%d.mp3", 1)) +end +function M:OnPlayerEnter( ... ) + local arg = {...} + local p = arg[1] + for i=1,#self._room.player_list do + if self._room.self_player.seat==self._room.player_list[i].seat and self._room.self_player.self_user.account_id ~= self._room.player_list[i].self_user.account_id then + -- body + local ErrorMsgTip = UIPackage.CreateObject("Common", "Win_ConnectTip") + local _action = self._view:AddChild(ErrorMsgTip) + _action.xy = Vector2((self._view.width - _action.width) / 4, self._view.height / 4) + local text = _action:GetChild("tex_message") + local btn1 = _action:GetChild("btn_connect") + local btn2 = _action:GetChild("btn_back") + text.text = "您来晚了,座位有人,请重新进牌桌" + btn1.visible=false + btn2:Center() + btn2.y=btn2.y+50 + btn2.onClick:Set(function() + -- body + ErrorMsgTip:Destroy() + ErrorMsgTip = nil + self._gamectr:LevelRoom(function(res) + ViewUtil.CloseModalWait() + NetResetConnectWindow.CloseNetReset() + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + end) + end + end + -- if p ~= self._room.self_player and self._room.room_config.people_num <= 4 and self._room.room_config.people_num >= 3 and self._gamectr:CheckGPS() then + -- if self.distance_view then + -- self.distance_view:Destroy() + -- end + -- self.distance_view = PlayerDistanceView.new(true) + -- self.distance_view:Show() + -- end + -- local info = self._player_info[self:GetPos(p.seat)] + -- info:FillData(p) + -- info._view.visible = true + MainView.OnPlayerEnter(self, ...) +end + +function M:Destroy() + for i = 1, #self._room.player_list do + local player = self._room.player_list[i] + local card_info_i = self._player_card_info[self:GetPos(player.seat)] + + card_info_i:Destroy() + if card_info_i ~= nil and card_info_i.cor_init_poker ~= nil then + coroutine.stop(card_info_i.cor_init_poker) + end + end + PKMainView.Destroy(self) + UIPackage.RemovePackage("extend/poker/runfast/ui/Extend_Poker_ShengSiDu") +end + +return M diff --git a/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_Player.lua b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_Player.lua new file mode 100644 index 00000000..4875e5b0 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_Player.lua @@ -0,0 +1,37 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:42 +--- +local RunFast_Player = { + -- 手牌列表 + hand_count = 0, + out_card_list = {}, + hand_list = {}, + isOneCard= false, -- 报单 +} + +local M = RunFast_Player + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_count = 0 + self.out_card_list = {} + self.out_rawcard_list={} + self.hand_list = {} + self.isOneCard = false + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_count = 0 + self.out_card_list = {} + self.out_rawcard_list={} + self.hand_list = {} + self.isOneCard = false +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_PlayerBackView.lua b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_PlayerBackView.lua new file mode 100644 index 00000000..a1a4e413 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_PlayerBackView.lua @@ -0,0 +1,439 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/25 13:52 +--- +local PKPlayBackView = require('main.poker.PKPlayBackView') +local RunFast_PlayerCardInfoView = import('.ShengSiDu_PlayerPokerInfoView') +local RunFast_PlayerSelfCardInfoView = import('.ShengSiDu_PlayerSelfPokerInfoView') +local PlayerInfoView = import('.EXPlayerInfoView') +local RunFast_RightPanelView = import(".ShengSiDu_RightPanelView") +local RunFast_ResultView = import(".ShengSiDu_ResultView") +local M = {} + +local RunFast_Record_Event = { + Evt_OutCard = 'OutCard', + Evt_Pass = 'pass', + Evt_NewRound = 'newindex', + Evt_result = 'result', + Evt_Result = 'Result' +} + +local default_bg = 1 +local bg_config = { + {id = 1, url = 'extend/poker/shengsidu/bg/bg1', thumb = 'ui://Extend_Poker_ShengSiDu/table_bg1'}, + {id = 2, url = 'extend/poker/shengsidu/bg/bg2', thumb = 'ui://Extend_Poker_ShengSiDu/table_bg2'}, + {id = 3, url = 'extend/poker/shengsidu/bg/bg3', thumb = 'ui://Extend_Poker_ShengSiDu/table_bg3'} +} + +--- Create a new +function M.new() + setmetatable(M, {__index = PKPlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = 'RunFast_PlayBackView' + self:init() + + return self +end + +function M:InitView(url) + local room = self._room + if not room.self_player then + room.self_player = room:GetPlayerBySeat(1) + end + self._gamectr = ControllerManager.GetController(GameController) + UIPackage.AddPackage('extend/poker/shengsidu/ui/Extend_Poker_ShengSiDu') + PKPlayBackView.InitView(self, 'ui://Extend_Poker_ShengSiDu/RunFast_Main_' .. self._room.room_config.people_num, default_bg, bg_config) + self._tex_round = self._view:GetChild('round') + self._player_card_info = {} + local _player_card_info = self._player_card_info + for i = 1, room.room_config.people_num do + local tem = self._view:GetChild('player_card_info_' .. i) + self._player_card_info[i] = self:NewPlayerPokerInfoView(tem, i) + end + local rightpanel = self._view:GetChild("right_panel") + if self._rightPanelView ~= nil then + self._rightPanelView:Destroy() + end + + self._rightPanelView = RunFast_RightPanelView.new(self, rightpanel) + rightpanel:GetChild("btn_setting").onClick:Clear() + + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild('player_info' .. i) + _player_info[i] = PlayerInfoView.new(tem, self) + end + local list = self._room.player_list + for i=1,#list do + local p = list[i] + local info = _player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + end + if self._room.hpOnOff == 1 and self._room.score_times ~= 1 then + -- body + self._view:GetChild('roominfo_panel1'):GetChild('tex_beishu').text = self._room.score_times .. '倍' + else + self._view:GetChild('roominfo_panel1'):GetChild('tex_beishu').text = '' + end + self._eventmap = {} + self._cmdmap = {} + self._cmdmap[RunFast_Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[RunFast_Record_Event.Evt_Pass] = self.CmdPass + self._cmdmap[RunFast_Record_Event.Evt_NewRound] = self.CmdNewRound + self._cmdmap[RunFast_Record_Event.Evt_result] = self.Cmdresult + self._cmdmap[RunFast_Record_Event.Evt_Result] = self.CmdResult +end + +function M:NewPlayerPokerInfoView(view, index) + if index == 1 then + return RunFast_PlayerSelfCardInfoView.new(view, self) + end + return RunFast_PlayerCardInfoView.new(view, self) +end + +function M:FillRoomData(data) + print("hidezhanji 1111") + self._currentStep = 1 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local roominfo_panel = self._view:GetChild('roominfo_panel1') + + roominfo_panel:GetChild('tex_roomid').text = data.info.roomid + roominfo_panel:GetChild('tex_gametype').text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + local head_info = self._player_info[self:GetPos(p.seat)] + + if p.total_hp then + print("hidezhanji 2222") + + head_info._view:GetChild('zhanji').visible=false + + if room.hpOnOff == 1 or room:checkHpNonnegative() then + head_info._view:GetChild('zhanji').visible=true + head_info._view:GetChild('text_jifen').text = d2ad(p.total_hp) + end + end + head_info:FillData(p) + head_info:UnmarkTuoguan() + head_info:UpdateScore() + if p.seat ~= room.self_player.seat then + card_info:UpdateHandPoker(p.hand_list, false, true) + end + head_info:UpdatePiao(p.piao) + + end + + self:UpdateRound() + + self:GenerateAllStepData(data) + self:ShowStep(1) +end + +function M:ShowStep(index) + local step = self._step[index] + if step==nil then + return + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + + local info = self._player_card_info[self:GetPos(i)] + p.hand_list = step.player_card_data[i].hand_list + p.out_card_list = step.player_card_data[i].out_card_list + p.hand_left_count = #p.hand_list + + if p.seat ~= self._room.self_player.seat then + info:UpdateHandPoker(p.hand_list, false, true) + else + info:InitPoker(p.hand_list, false) + end + + end + + if step.cmd == RunFast_Record_Event.Evt_OutCard then + local seat = step.current_out_seat + local p = self._room:GetPlayerBySeat(seat) + local info = self._player_card_info[self:GetPos(seat)] + local card = step.out_card_list + local card_list = self._gamectr:ChangeCodeByFrom(card, true) + info:SetOutCardInfo(card_list, false) + self:ClearNextSeatOutCard(seat) + end + + if step.cmd == RunFast_Record_Event.Evt_Pass then + local seat = step.current_out_seat + local p = self._room:GetPlayerBySeat(seat) + local info = self._player_card_info[self:GetPos(seat)] + info:SetOutCardInfo(nil, true) + self:ClearNextSeatOutCard(seat) + end + if step.cmd == RunFast_Record_Event.Evt_NewRound then + for i = 1, #self._room.player_list do + local p = self._room:GetPlayerBySeat(i) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:SetOutCardInfo(nil, false) + end + end + if step.cmd == RunFast_Record_Event.Evt_result then + local result = step.result + for i = 1, #result do + local card_info = self._player_card_info[self:GetPos(result[i].seat)] + + if result[i].entrust ~= nil and result[i].entrust == true then + local head_info = self._player_info[self:GetPos(result[i].seat)] + head_info:MarkTuoguan() + end + -- head_info:UpdateScore(result[i].score) + card_info:PlayScore(result[i].score, false, step.win_seat == result[i].seat) + end + end + if step.cmd == RunFast_Record_Event.Evt_Result then + local Result = step.Result + self.result_view = RunFast_ResultView.new(self._root_view, Result.info, self._room.room_id, Result.type, Result.winseat, 0, Result.remaincards) + local num = self._view:GetChildIndex(self._view:GetChild("panel_record")) + self._view:AddChildAt(self.result_view._view, num) + else + if self.result_view then + self.result_view:Dispose() + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = '' + + step.win = 0 + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.hand_list = p.hand_card + u.hand_count = #u.hand_list + u.out_card_list = {} + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + u.card_list = cmd.data.card + data.out_card_list = cmd.data.card_list + for i = 1, #data.out_card_list do + local out_card = data.out_card_list[i] + for j = 1, #u.hand_list do + if u.hand_list[j] == out_card then + list_remove(u.hand_list, out_card) + break + end + end + end +end + +function M:CmdNewRound(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd +end + +function M:CmdPass(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat +end +function M:Cmdresult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result = cmd.data.result + data.win_seat = cmd.seat +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.Result = cmd.data + for i = 1, #data.Result.info do + local p = data.Result.info[i] + p.nick = self._room:GetPlayerBySeat(p.seat).self_user.nick_name + end +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_clone(last_step) + step.player_card_data = {} + local card_data = step.player_card_data + for i = 1, #last_step.player_card_data do + card_data[i] = {} + card_data[i].hand_list = membe_clone(last_step.player_card_data[i].hand_list) + card_data[i].out_card_list = membe_clone(last_step.player_card_data[i].out_card_list) + end + step.Result = nil + self._step[#self._step + 1] = step + return step +end + +function M:ClearNextSeatOutCard(currenOutCardSeat) + local people_num = self._room.room_config.people_num + local next_seat = currenOutCardSeat + 1 + if next_seat > people_num then + next_seat = next_seat - people_num + end + local p = self._room:GetPlayerBySeat(next_seat) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:SetOutCardInfo(nil, false) +end + +function M:UpdateRound() + local round = self._room.curren_round + self._tex_round.text = string.format('第 %d 局', round) +end + +function M:NextRecordPlay() + self._totalRound = tonumber(self._totalRound) + local result = PlayBackView.NextRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + if self.result_view then + self.result_view:Dispose() + self.result_view = nil + end +end + +function M:LastRecordPlay() + local result = PlayBackView.LastRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + if self.result_view then + self.result_view:Dispose() + self.result_view = nil + end +end + +function M:Play() + self:ChangeAlpha() + self:ChangePlayState(not self._play) + if not self._play then + return + end + if (self._currentStep == #self.cmdList and self._playFoward) or (self._currentStep == 0 and not self._playFoward) then + self._currentStep = 0 + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:ChangePlayState(state) + self._play = state + self:ChangeTextSpeed() + local btn_play = self._view:GetChild('panel_record'):GetChild('btn_play') + if self._play then + btn_play:GetController('state').selectedIndex = 1 + else + btn_play:GetController('state').selectedIndex = 0 + end +end + +function M:ChangeTextSpeed() + local str1 = self._play and self._speed or '' + self._view:GetChild('panel_record'):GetChild('tex_speed').text = str1 + local str2 = + not self._play and (self._playFoward and '播放暂停' or '回退暂停') or + self._playFoward and (self._speed == 1 and '播放' or '快进') or + (self._speed == 1 and '回退' or '快退') + self._view:GetChild('panel_record'):GetChild('tex_2').text = str2 + local str3 = self._play and '倍速度' or '' + self._view:GetChild('panel_record'):GetChild('tex_1').text = str3 +end + +function M:CmdLeftArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if not self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = false + self:ChangeTextSpeed() + end +end + +function M:CmdRightArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:OnUpdate() + if self._play then + if (self._currentStep == #self.cmdList + 1 and self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像结尾了,再次点击播放按钮可重新播放') + return + elseif (self._currentStep == 0 and not self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像开头了,再次点击播放按钮可重新播放') + return + end + self._timer = self._timer + Time.deltaTime + if self._timer >= 1 / self._speed then + self._timer = 0 + local step = self._playFoward and 1 or -1 + self._currentStep = self._currentStep + step + if self._currentStep > 0 then + self:ShowStep(self._currentStep) + end + end + end +end + +function M:Destroy() + UpdateBeat:Remove(self.OnUpdate, self) + PlayBackView.Destroy(self) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_PlayerPokerInfoView.lua b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_PlayerPokerInfoView.lua new file mode 100644 index 00000000..3a03befa --- /dev/null +++ b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_PlayerPokerInfoView.lua @@ -0,0 +1,383 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 16:35 +--- +local RunFast_PlayerPokerInfoView = { + _view = nil, + _mainView = nil, + _mask_liangpai = nil, +} + +local M = RunFast_PlayerPokerInfoView + +function M.new( view,mainView ) + local self = {} + setmetatable(self, {__index = M}) + self._view = view + self._mainView = mainView + self:init() + return self +end + + + +function M:init() + local view = self._view + self._gameCtr = ControllerManager.GetController(GameController) + + self.item_data = json.decode(self._view:GetChild("area_mask").text) + self.out_card_data = self.item_data["outcard_list"] + self._mask_liangpai = view:GetChild("mask_liangpai") + self.ctr_outpoker = view:GetController("output") + self.outpoker_list = view:GetChild(self.out_card_data["parent"]) + + self.hand_card_list = view:GetChild("hand_card_list") + + self.ctr_one_card = view:GetController("one_card") + self.eff_one_card = view:GetChild("one_card_eff"):GetTransition("t0") + + self.text_bomb_score = view:GetChild("Score") + self.ani_bomb_score = view:GetTransition("score") + self.ani_result_score = view:GetTransition("score_1") +end + +function M:SetOutCardInfo(cardlist,isPass,isAnim) + self.outpoker_list:RemoveChildren(0,-1,true) + if cardlist == nil then + if isPass == true then + self.ctr_outpoker.selectedIndex = 2 + else + self.ctr_outpoker.selectedIndex = 0 + end + else + if isAnim then + if self.move_cor then + coroutine.stop(self.move_cor) + self.move_cor = nil + end + local time = 0.1 + for i = 1, #cardlist do + local poker_item = UIPackage.CreateObject("Extend_Poker_ShengSiDu", "poker7") + local code = self:ChangeCodeByTo(cardlist[i]) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/"..code) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + local card_code_obj + -- if DataManager.CurrenRoom.pai==0 then + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/"..code) + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + -- end + -- if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/"..code.."_1") + -- end + if DataManager.CurrenRoom.pai==0 then + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/"..code.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/"..code) + end + + else + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/"..code.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + end + + end + if card_code_obj == nil then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + --card_code_obj:SetScale(1,1) + poker_item:AddChild(card_code_obj) + --local poker = self:CreatPoker(cardlist[i],0.7) + self.outpoker_list:AddChild(poker_item) + poker_item.xy = Vector2.New(self.out_card_data["start_x"],self.out_card_data["start_y"]) + poker_item:TweenMove(self:GetOutCardEndPokerPos(i,#cardlist,self.outpoker_list,poker_item,self.out_card_data["maxcount_x"],1),time) + --card_code_obj + -- self.tween = TweenUtils.TweenFloat(1,0.7,time,function(x) + -- card_code_obj:SetScale(x,x) + -- end) + card_code_obj:SetScale(0.7,0.7) + end + self.move_cor = coroutine.start(function() + coroutine.wait(0.1) + ViewUtil.PlaySound("ShengSiDu_PK", "extend/poker/shengsidu/sound/chupai.mp3") + end) + else + for i = 1, #cardlist do + local poker_item = UIPackage.CreateObject("Extend_Poker_ShengSiDu", "poker7") + local code = self:ChangeCodeByTo(cardlist[i]) + local card_code_obj + if DataManager.CurrenRoom.pai==0 then + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/"..code.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/"..code) + end + + else + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/"..code.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + end + + end + if card_code_obj == nil then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + card_code_obj:SetScale(0.7,0.7) + poker_item:AddChild(card_code_obj) + --local poker = self:CreatPoker(cardlist[i],0.7) + self.outpoker_list:AddChild(poker_item) + poker_item.xy = self:GetOutCardEndPokerPos(i,#cardlist,self.outpoker_list,poker_item,self.out_card_data["maxcount_x"],1) + end + end + --self.ctr_outpoker.selectedIndex = 1 + end +end + +function M:SetOutCardBlack() + for i = 0, self.outpoker_list.numChildren - 1 do + self.outpoker_list:GetChildAt(i):GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(0.7,0.7,0.7) + end +end + +-- 12 -61 --11 58 --10 55 --46 +function M:GetOffSet(cardLength) -- 15 -70 + if cardLength > 8 then + return 40 + else + return - cardLength * 5 + 80 + end +end +function M:GetOutCardEndFirstPokerPos(count,parent_com,poker_obj,max_count,scale) + local parent_width,parent_height = parent_com.width,parent_com.height + local poker_width,poker_height = poker_obj.width * scale,poker_obj.height * scale + local offset = self:GetOffSet(count) + local x,y = 0,0 + --local length = (count - 1) * (poker_width + offset) + poker_width + --if length <= parent_width then + -- x = (parent_width - length) / 2 + -- y = (parent_height - poker_height) / 2 + --end + if count <= max_count then + local length = (count - 1) * offset + poker_width + x = (parent_width - length) / 2 + y = ((parent_height - poker_height) / 2) + + end + return Vector2.New(x,y) +end + +function M:GetOutCardEndPokerPos(index,count,parent_com,poker_obj,max_count,scale) + local offset_x,offset_y = self:GetOffSet(count),-50 + local start_pos = self:GetOutCardEndFirstPokerPos(count,parent_com,poker_obj,max_count,scale) + local poker_width,poker_height = poker_obj.width * scale,poker_obj.height * scale + local parent_width,parent_height = parent_com.width,parent_com.height + local pos_x,pos_y = start_pos.x + (index - 1) * offset_x,start_pos.y + if index > max_count then + pos_x = (index - max_count - 1) * offset_x + pos_y = pos_y + poker_height + offset_y + end + return Vector2.New(pos_x,pos_y) +end + +-- function M:PlayCardTypeEff(type1) +-- if type1 < 7 and type1 ~= 4 then return end +-- local eff_code = 0 +-- if type1 == 10 then +-- eff_code = 2 +-- elseif type1 == 11 then +-- eff_code = 3 +-- elseif type1 == 4 then +-- eff_code = 4 +-- else +-- eff_code = 1 +-- end +-- if self.cro_type_eff ~= nil then +-- coroutine.stop(self.cro_type_eff) +-- end +-- self.cro_type_eff = nil +-- self.cro_type_eff = coroutine.start(function() +-- self.type_eff_view = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/eff_"..eff_code) +-- if self.type_eff_view == nil then return end +-- self._view:AddChild(self.type_eff_view) +-- self.type_eff_view:SetXY((self._view.width - self.type_eff_view.width) / 2,self.outpoker_list.y) +-- self.type_eff_view:GetTransition("t0"):Play() +-- coroutine.wait(1.5) +-- if self.type_eff_view ~= nil then +-- self.type_eff_view:Dispose() +-- self.type_eff_view = nil +-- end +-- end) +-- end + +function M:PlayScore(score,isBomb,isWin) + if score == nil then + self.text_bomb_score.alpha = 0 + return + end + if isBomb then + self.text_bomb_score.text = score >= 0 and "+"..score or tostring(score) + self.text_bomb_score.grayed = score < 0 + self.ani_bomb_score:Play() + else + if score < 0 then + self.text_bomb_score.text = tostring(score) + self.text_bomb_score.grayed = true + elseif score > 0 then + self.text_bomb_score.text = "+"..score + self.text_bomb_score.grayed = false + else + local str = isWin and "+" or "-" + self.text_bomb_score.text = str..score + self.text_bomb_score.grayed = not isWin + end + self.ani_result_score:Play() + end +end + + + + +function M:UpdateHandPoker(cardList,isPlayAni,isMing) + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + self.cor_init_poker = nil + self.card_list = {} + self.hand_card_list:RemoveChildren(0,-1,true) + local card_length + local new_card_list + if isMing == true then + new_card_list = self._gameCtr:ChangeCodeByFrom(cardList,true) + card_length = #cardList + else + card_length = cardList + end + if isPlayAni == true then + self.cor_init_poker = coroutine.start(function() + for i = card_length, 1,-1 do + local code = isMing == true and new_card_list[i] or 0 + coroutine.wait(0.01) + local poker = self:CreatPoker1(code,0.4) + self.hand_card_list:AddChild(poker) + end + end) + else + for i = card_length, 1,-1 do + local code = isMing == true and new_card_list[i] or 0 + local poker = self:CreatPoker1(code,0.4) + self.hand_card_list:AddChild(poker) + end + end +end + +function M:SetRemainCardNumber(isPlay) + if isPlay then + self.ctr_one_card.selectedIndex = 1 + self.eff_one_card:Play(-1,0,nil) + else + self.ctr_one_card.selectedIndex = 0 + end + --if self.card_number then + -- self.card_number.visible = show + -- self.card_number.text = string.format("剩余:%d",number) + --end +end + +function M:CreatPoker1(poker,scale,bank) + + local poker_item = UIPackage.CreateObject("Extend_Poker_ShengSiDu", "poker"..scale * 10) + local code = self:ChangeCodeByTo(poker) + local card_code_obj + + if DataManager.CurrenRoom.pai==0 then + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/"..code.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/"..code) + end + + else + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/"..code.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + end + + end + if card_code_obj == nil or bank==1 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + + card_code_obj:SetScale(scale,scale) + poker_item:AddChild(card_code_obj) + + return poker_item +end + +function M:CreatPoker(poker,scale,bank) + + local poker_item = UIPackage.CreateObject("Extend_Poker_ShengSiDu", "poker"..12.5) + local code = self:ChangeCodeByTo(poker) + local card_code_obj + + if DataManager.CurrenRoom.pai==0 then + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/"..code.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/"..code) + end + + else + if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/"..code.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + end + + end + if card_code_obj == nil or bank==1 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + + card_code_obj:SetScale(scale,scale) + poker_item:AddChild(card_code_obj) + + return poker_item +end + +function M:ChangeCodeByTo( card ) + local flower = card % 10 + local number = math.floor(card / 10) + if number == 15 then + number = 2 + end + return flower * 100 + number +end + + +function M:Clear() + self:PlayScore(nil) + self:SetRemainCardNumber(false) + self:SetOutCardInfo(nil,false) + self.hand_card_list:RemoveChildren(0,-1,true) + self._mask_liangpai:RemoveChildren(0,-1,true) +end + +function M:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_PlayerSelfPokerInfoView.lua b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_PlayerSelfPokerInfoView.lua new file mode 100644 index 00000000..097a0783 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_PlayerSelfPokerInfoView.lua @@ -0,0 +1,1313 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 17:04 +--- +local RunFast_PlayerPokerInfoView = import('.ShengSiDu_PlayerPokerInfoView') +local RunFast_CardType = import('.ShengSiDu_CardType') + +local CardView = { + btn_card = nil, + -- 牌号码 (大小) + card_code_number = 0, + -- 牌号码 (花色) + card_code_flower = 0, + -- 索引 + index = 0 +} + +local function NewCardView(card, cardcodenum, cardcodeflower) + local self = {} + setmetatable(self, {__index = CardView}) + self.btn_card = card + self.card_code_number = cardcodenum + self.card_code_flower = cardcodeflower + self.card_isTouchable = 0 + return self +end + +local function tableSortNumber(a, b) + return a.card_code_number > b.card_code_number +end + +local RunFast_PlayerSelfPokerInfoView = { + _view = nil, + _mainView = nil, + _mask_liangpai = nil +} + +local M = RunFast_PlayerSelfPokerInfoView + +function M.new(view, mainView) + setmetatable(M, {__index = RunFast_PlayerPokerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._mainView = mainView + self.gameCtr = ControllerManager.GetController(GameController) + self:init() + return self +end + +function M:init() + self.Reset = false + self.ctr_outpoker = self._view:GetController('output') + self.outpoker_list = self._view:GetChild('out_card_list') + self.item_data = json.decode(self._view:GetChild('area_mask').text) + self.out_card_data = self.item_data['outcard_list'] + self.hand_card_list = self._view:GetChild('hand_card_list') + self.ctr_hand_card_pos = self._view:GetChild('hand_card_list') + self._mask_liangpai = self._view:GetChild('mask_liangpai') + self.card_width = 129 + self.cards_view = self._view:GetChild('hand_poker_c') + self.card_list = {} + self.out_card_list = {} + self.touchMoveFun = handler(self, self.TouchMoving) + self.ctr_put_card_option = self._view:GetController('out_card_option') + self.ctr_piao = self._view:GetController('piao') + self.ctr_piao_value = self._view:GetController('piao_value') + self.ctr_put_error = self._view:GetController('put_error') + self.put_error_text = self._view:GetChild('put_error') + + self.ctr_select_card_type = self._view:GetController('select_card_type') + self.select_card_type_view = self._view:GetChild('choose_type') + + self.text_bomb_score = self._view:GetChild('Score') + self.ani_bomb_score = self._view:GetTransition('score') + self.ani_result_score = self._view:GetTransition('score_1') + + self.send_card = {} + self.tips_click_count = 0 + self:BtnEvent() +end + +function M:InitPoker(pokerList, isPlayAni, open) + -- self.zhizhanctr_select=0 + -- self.zhizhantype=0 + -- self.zhizhannumber=0 + -- self.zhizhanlength=0 + -- self.zhizhanmustPutMaxCard=0 + -- self.zhizhanplay=0 + -- self.zhizhanzdts=0 + local cs = 1.25 + if DataManager.CurrenRoom.cardsize==0 then + cs = 1.35 + elseif DataManager.CurrenRoom.cardsize == 1 then + cs = 1.25 + elseif DataManager.CurrenRoom.cardsize == 2 then + cs = 1.15 + end + + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + -- print(vardump(self.card_list)) + self.cor_init_poker = nil + self.card_list = {} + + self.cards_view:RemoveChildren(0, -1, true) + if isPlayAni == true then + self.cor_init_poker = + coroutine.start( + function() + self._mainView._popEvent = false + if self._mainView._rightPanelView._settingView ~= nil then + self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(false) + end + table.sort(pokerList) + + for i = 1, #pokerList do + local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) + local card_flower_code = pokerList[i] + local btn_card = self:CreatPoker(card_number_code, cs, open) + local x, y = self._view.width / 2 + 100, -200 + btn_card:SetXY(x, y) + btn_card.alpha = 0 + btn_card.touchable = false + -- coroutine.wait(0.05) + self.cards_view:AddChild(btn_card) + local card_view = NewCardView(btn_card, card_number_code, card_flower_code) + self.card_list[#self.card_list + 1] = card_view + + table.sort(self.card_list, tableSortNumber) + + if i == #pokerList then + for j = 1, #self.card_list do + local card = self.card_list[j] + card.btn_card.touchable = true + if open ~= 1 then + -- body + self:AddCardMoveEvent(card) + end + end + end + end + for j = #self.card_list, 1, -1 do + -- ViewUtil.PlaySound('RunFastNew_PK', 'extend/poker/runfast/sound/mopai.mp3') + local card_view = self.card_list[j] + card_view.index = j + self.cards_view:SetChildIndex(card_view.btn_card, card_view.index - 1) + + card_view.btn_card:TweenMove(self:GetHandCardPos(j, #self.card_list), 0.10) + DSTween.To( + 0.7, + 1, + 0.1, + function(value) + card_view.btn_card:SetScale(value, value) + end + ) + DSTween.To( + 0.7, + 1, + 0.1, + function(value) + card_view.btn_card.alpha = value + end + ) + card_view.btn_card.alpha = 1 + end + + self._mainView._popEvent = true + if self._mainView._rightPanelView._settingView ~= nil then + self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(true) + end + end + ) + else + + for i = 1, #pokerList do + local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) + local card_flower_code = pokerList[i] + local btn_card = self:CreatPoker(card_number_code, cs, open) + self.cards_view:AddChild(btn_card) + local card_view = NewCardView(btn_card, card_number_code, card_flower_code) + self.card_list[#self.card_list + 1] = card_view + end + table.sort(self.card_list, tableSortNumber) + for i = 1, #self.card_list do + local card = self.card_list[i] + card.index = i + self.cards_view:SetChildIndex(card.btn_card, card.index - 1) + card.btn_card.xy = self:GetHandCardPos(i, #self.card_list) + if open ~= 1 then + -- body + self:AddCardMoveEvent(card) + end + end + end +end + +function M:updatePoker() + + local templist = {} + for i = 1, #self.card_list do + templist[#templist + 1] = self.card_list[i].card_code_flower + end + self:InitPoker(templist, false, 0) +end + +function M:AddCardMoveEvent(card) + local send_card = {} + + card.btn_card.onTouchBegin:Set( + function(context) + self.send_card = {} + if card.btn_card.touchable == false then + return + end + local xy = self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + if xy.y > -21 and xy.y < 221 then + self.touchBegin = xy + Stage.inst.onTouchMove:Add(self.touchMoveFun) + --Stage.inst.onClick:Add(self.touchMoveFun) + card.btn_card.onTouchEnd:Set( + function(context) + local xy = + self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + Stage.inst.onTouchMove:Remove(self.touchMoveFun) + --Stage.inst.onClick:onTouchMove(self.touchMoveFun) + if xy.y > -21 and xy.y < 221 then + if xy.x - self.touchBegin.x > 0 then + local max_x = xy.x + local min_x = self.touchBegin.x + for k = 1, #self.card_list do + local card = self.card_list[k] + + -- for i = 1, #self.card_list do + -- local card = self.card_list[i] + -- if card.btn_card.selected then + -- send_card[#send_card + 1] = card.card_code_flower + -- self.send_card[#self.send_card + 1] = card + -- end + -- end + if card.btn_card.touchable == true then + send_card[#send_card + 1] = card + + self:SetBtnCardColor(card, 1) + if k == #self.card_list then + if + card.btn_card.x + self.card_width > min_x and card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") + end + else + if + card.btn_card.x + + (self.card_width + self:GetHandCardOffset(#self.card_list)) > + min_x and + card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") + end + end + end + end + else + local max_x = self.touchBegin.x + local min_x = xy.x + -- self.send_card = {} + for k = 1, #self.card_list do + local card = self.card_list[k] + + -- for i = 1, #self.card_list do + -- local card = self.card_list[i] + -- if card.btn_card.selected then + -- send_card[#send_card + 1] = card.card_code_flower + -- self.send_card[#self.send_card + 1] = card + -- end + -- end + if card.btn_card.touchable == true then + send_card[#send_card + 1] = card + self:SetBtnCardColor(card, 1) + --print(vardump(card)) + if k == #self.card_list then + if + card.btn_card.x + self.card_width > min_x and card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") + end + else + if + card.btn_card.x + + (self.card_width + self:GetHandCardOffset(#self.card_list)) > + min_x and + card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") + end + end + end + end + end + + ViewUtil.PlaySound('ShengSiDu_PK', 'extend/poker/shengsidu/sound/click.mp3') + else + self.touchBegin = Vector2.New(0, 0) + for k = 1, #self.card_list do + local card = self.card_list[k] + if card.btn_card.touchable == true then + self:SetBtnCardColor(card, 1) + end + end + end + + Stage.inst:ResetInputState() + card.btn_card.onTouchEnd:Set(nil) + + self:zhizhanxuanpai() + end + ) + else + local button = card.btn_card + button.onChanged:Add( + function() + -- body + if card.btn_card.selected == true then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + else + self:UpdateCardMove(card.btn_card, card.btn_card.selected, false) + end + end + ) + end + end + ) +end +function M:zhizhanxuanpai() --智障选牌 + -- body + local temp_send_card = {} + for i = 1, #self.send_card do + if self.send_card[i] ~= self.send_card[i - 1] then + -- body + temp_send_card[#temp_send_card + 1] = self.send_card[i] + end + end + + local card_map, max_key = self:GetCardMapAndMaxKey(temp_send_card) + + list_type1, touch_type1 = self:CheckPairs(card_map, 0, 8) + + list_type2, touch_type2 = self:CheckPlane(card_map, 0, 6, 0) + list_bomb, touch_bomb = self:CheckBomb(card_map, 0, 4) + + local list_type, touch_type = self:CheckOnes(card_map, 0, 11) + for i = 5, 11 do + local list_temp, touch_temp = self:CheckOnes(card_map, 0, i) + if list_temp[1] ~= nil then + -- body + list_type = list_temp + end + end + local temp_list = list_type[1] + local temp_list1 = list_type1[1] + local temp_list2 = list_type2[1] + local temp_bomb = list_bomb[1] + if self.xunpai == nil then + -- body + self.xunpai = {} + end + + if temp_list ~= nil and temp_list1 == nil and temp_list2 == nil and temp_bomb == nil and #temp_list > #self.xunpai then + for i = 1, #self.send_card do + self:UpdateCardMove(self.send_card[i].btn_card, false, false) + end + for i = 1, #self.send_card do + for j = 1, #temp_list do + if self.send_card[i] == temp_list[j] then + -- body + self:UpdateCardMove(self.send_card[i].btn_card, true, false) + end + end + end + self.xunpai = temp_list + else + self.xunpai = {} + end +end + +function M:TouchMoving(context) + if self.cards_view == nil then + return + end + local send_card1 = {} + local xy = self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + self.isTouching = true + if xy.x - self.touchBegin.x > 0 then -- 往右边滑 + local max_x = xy.x + local min_x = self.touchBegin.x + for i = 1, #self.card_list do + local card = self.card_list[i] + if card.btn_card.touchable == false or card.card_isTouchable == 1 then + else + if + card.btn_card.x + (self.card_width + self:GetHandCardOffset(#self.card_list)) > min_x and + card.btn_card.x < max_x + then + self:SetBtnCardColor(card, 0.8) + if #send_card1 == 0 then + -- body + send_card1[1] = card + end + for i = 1, #send_card1 do + if send_card1[i] ~= card then + -- body + send_card1[#send_card1 + 1] = card + end + end + else + -- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + -- card.card_isTouchable = 1 + -- ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") + self:SetBtnCardColor(card, 1) + end + end + end + elseif xy.x - self.touchBegin.x < 0 then -- 左边滑 + local max_x = self.touchBegin.x + local min_x = xy.x + for i = 1, #self.card_list do + local card = self.card_list[i] + if card.btn_card.touchable == false or card.card_isTouchable == 1 then + else + if + card.btn_card.x + (self.card_width + self:GetHandCardOffset(#self.card_list)) > min_x and + card.btn_card.x < max_x + then + -- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + -- card.card_isTouchable = 1 + -- ViewUtil.PlaySound("RunFastNew_PK", "extend/poker/paodekuai/sound/click.mp3") + self:SetBtnCardColor(card, 0.8) + if #send_card1 == 0 then + -- body + send_card1[1] = card + end + for i = 1, #send_card1 do + if send_card1[i] ~= card then + -- body + send_card1[#send_card1 + 1] = card + end + end + else + self:SetBtnCardColor(card, 1) + end + end + end + end + --print(vardump(send_card1)) + -- local send_card = {} + -- self.send_card = {} + -- for i = 1, #self.card_list do + -- local card = self.card_list[i] + -- if card.btn_card.selected then + -- send_card[#send_card + 1] = card.card_code_flower + -- self.send_card[#self.send_card + 1] = card + -- end + -- end + self.send_card = send_card1 +end + +function M:SetBtnCardColor(card, num) + if + card.btn_card:GetChildAt(0) ~= nil and card.btn_card:GetChildAt(0):GetChildAt(0) ~= nil and + card.btn_card:GetChildAt(0):GetChildAt(0):GetChildAt(0) ~= nil + then + -- body + card.btn_card:GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(num, num, num) + end + + --if card.card_code_flower < 500 then + -- card.btn_card:GetChildAt(0):GetChildAt(2).color = Color(num,num,num) + -- card.btn_card:GetChildAt(0):GetChildAt(3).color = Color(num,num,num) + --end +end + +function M:ShowPiao(piao) + self.ctr_piao.selectedIndex = piao +end + +function M:HidePiao() + self.ctr_piao.selectedIndex = 0 +end + +function M:ShowOutCardOption(ctr_select, type, number, length, mustPutMaxCard, play, zdts) + --for i = 1, #self.out_card_list do + -- local card = self.out_card_list[i] + -- self.cards_view:RemoveChild(card.btn_card,true) + --end + --self.out_card_list = {} + + -- self.zhizhanctr_select=ctr_select + -- self.zhizhantype=type + -- self.zhizhannumber=number + -- self.zhizhanlength=length + -- self.zhizhanmustPutMaxCard=mustPutMaxCard + -- self.zhizhanplay=play + -- self.zhizhanzdts=zdts + self.tips_click_count = 0 + self.send_card = {} + self.tips_card_list = self:GetCardTips(type, number, length, mustPutMaxCard) + + if #self.tips_card_list >= 1 then + -- body + self:UpdateHandCardsColor() + end + -- + -- 自动提示 + -- if #self.tips_card_list ~= 0 and play~=0 and mustPutMaxCard==false and zdts==1 then + -- local index = self.tips_click_count % #self.tips_card_list + 1 + -- self:ShowTipsCard(index) + -- self.tips_click_count = self.tips_click_count + 1 + -- end + if #self.tips_card_list == 2 and self.tips_card_list[2][1].index == self.tips_card_list[1][1].index then + if #self.tips_card_list[2] == #self.tips_card_list[1] then + for i = 1, #self.tips_card_list[2] do + if self.tips_card_list[2][i].index == self.tips_card_list[1][i].index then + self:ShowTipsCard(1) + end + end + end + elseif #self.tips_card_list == 1 then + self:ShowTipsCard(1) + end + if mustPutMaxCard and play ~= 0 and zdts == 1 then + -- body + self:ShowTipsCard(#self.tips_card_list) + end + self.ctr_put_card_option.selectedIndex = ctr_select +end + +function M:SetOutCardInfo(cardlist, isPass, isAnim) + self.ctr_put_card_option.selectedIndex = 0 + for i = 1, #self.out_card_list do + local card = self.out_card_list[i] + self.cards_view:RemoveChild(card, true) + end + self.out_card_list = {} + if cardlist ~= nil then + -- todo + self:SetOutCardList(cardlist, isAnim) + else + if isPass == true then + self.ctr_outpoker.selectedIndex = 2 + for i = 1, #self.card_list do + local card_view = self.card_list[i] + card_view.btn_card.touchable = true + self:UpdateCardMove(card_view.btn_card, false, false) + self:SetBtnCardColor(card_view, 1) + end + else + self.ctr_outpoker.selectedIndex = 0 + end + end +end + +function M:SetOutCardBlack() + for i = 1, #self.out_card_list do + local card = self.out_card_list[i] + card:GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(0.7, 0.7, 0.7) + end +end + +function M:SetOutCardList(cardlist, isAnim) + local pos_y = -200 + if isAnim then + -- self.zhizhanctr_select=0 + -- self.zhizhantype=0 + -- self.zhizhannumber=0 + -- self.zhizhanlength=0 + -- self.zhizhanmustPutMaxCard=0 + -- self.zhizhanplay=0 + -- self.zhizhanzdts=0 + if self.move_cor then + coroutine.stop(self.move_cor) + self.move_cor = nil + end + local time = 0.1 + for i = 1, #cardlist do + local card_code_number = cardlist[i] + for j = 1, #self.card_list do + local card = self.card_list[j] + if card_code_number == card.card_code_number then + card.btn_card.onTouchBegin:Set(nil) + self.out_card_list[#self.out_card_list + 1] = card.btn_card + list_remove(self.card_list, card) + -- todo 出牌动画 + local pos = + self:GetOutCardEndPokerPos( + i, + #cardlist, + self.cards_view, + card.btn_card, + self.out_card_data['maxcount_x'], + 0.7 + ) + card.btn_card:TweenMove(Vector2.New(pos.x, pos_y), time) + -- self.tween = TweenUtils.TweenFloat(1, 0.7, time, function(x) + -- card.btn_card:GetChildAt(0):SetScale(x, x) + -- end) + card.btn_card:GetChildAt(0):SetScale(0.7, 0.7) + break + end + end + end + self.move_cor = + coroutine.start( + function() + coroutine.wait(0.05) + for i = 1, #self.out_card_list do + local card = self.out_card_list[i] + self.cards_view:SetChildIndex(card, i - 1) + end + coroutine.wait(0.1) + ViewUtil.PlaySound('ShengSiDu_PK', 'extend/poker/shengsidu/sound/chupai.mp3') + end + ) + else + for i = 1, #cardlist do + local poker_item = UIPackage.CreateObject('Extend_Poker_ShengSiDu', 'poker7') + local code = self:ChangeCodeByTo(cardlist[i]) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/" .. code) + local card_code_obj + -- if DataManager.CurrenRoom.pai==0 then + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/"..code) + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + -- end + -- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFast/" .. code .. "_1") + -- end + if DataManager.CurrenRoom.pai == 0 then + if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_ShengSiDu/' .. code .. '_1') + else + card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_ShengSiDu/' .. code) + end + else + if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_ShengSiDu/' .. code .. '_2') + else + card_code_obj = UIPackage.CreateObjectFromURL('ui://Main_Poker/' .. code .. '_2') + end + end + if card_code_obj == nil then + card_code_obj = UIPackage.CreateObjectFromURL('ui://Main_Poker/00') + end + card_code_obj:SetScale(0.7, 0.7) + poker_item:AddChild(card_code_obj) + --local poker = self:CreatPoker(cardlist[i],0.7) + self.cards_view:AddChild(poker_item) + local pos = + self:GetOutCardEndPokerPos( + i, + #cardlist, + self.cards_view, + poker_item, + self.out_card_data['maxcount_x'], + 1 + ) + poker_item.xy = Vector2.New(pos.x, pos_y) + self.out_card_list[#self.out_card_list + 1] = poker_item + end + end +end + +function M:DeleteHandCards(cardlist) + for i = 1, #cardlist do + local card_code_number = cardlist[i] + for j = 1, #self.card_list do + local card = self.card_list[j] + if card_code_number == card.card_code_number then + --self.out_card_list[#self.out_card_list + 1] = card + list_remove(self.card_list, card) + -- todo 出牌动画 + self.cards_view:RemoveChild(card.btn_card, true) + break + end + end + end + self:UpdateHandCardsPos() +end + +function M:UpdateHandCardsPos() + for i = 1, #self.card_list do + local card_view = self.card_list[i] + card_view.index = i + card_view.btn_card.touchable = true + self.cards_view:SetChildIndex(card_view.btn_card, card_view.index - 1) + --card_view.btn_card.xy = self:GetHandCardPos(i, #self.card_list) + card_view.btn_card:TweenMove(self:GetHandCardPos(i, #self.card_list), 0.1) + self:UpdateCardMove(card_view.btn_card, false, false) + self:SetBtnCardColor(card_view, 1) + end +end + +function M:ResetPoker() + self.Reset = true + for i = 1, #self.card_list do + local card_view = self.card_list[i] + self:UpdateCardMove(card_view.btn_card, false, false) + end + self.send_card = {} + self.Reset = false +end + +function M:UpdateCardMove(btn_card, isSelected, isPlay) + btn_card.selected = isSelected + local card_Move = btn_card:GetChildAt(0) + local xy = isSelected == true and Vector2.New(0, -30) or Vector2.New(0, 0) + if isPlay then + -- body + card_Move:TweenMove(xy, 0) + else + card_Move:TweenMove(xy, 0) + end +end + +-- +function M:UpdateHandCardsColor() + for i = 1, #self.card_list do + local card_view = self.card_list[i] + local num = card_view.btn_card.touchable == true and 1 or 0.6 + self:SetBtnCardColor(card_view, num) + end +end + +function M:BtnEvent() + self.btn_not_put = self._view:GetChild('btn_not_put') + self.btn_tips = self._view:GetChild('btn_tips') + self.btn_put = self._view:GetChild('btn_put') + + self.btn_put.onClick:Set( + function() + if self.Reset then + return + end + local send_card = {} + self.send_card = {} + local currentCard={} + for i = 1, #self.card_list do + local card = self.card_list[i] + table.insert(currentCard,card.card_code_flower) + if card.btn_card.selected then + send_card[#send_card + 1] = card.card_code_flower + self.send_card[#self.send_card + 1] = card + end + end + + if #send_card == 0 then + self:ErrorTip('请选择要出的牌 ') + else + self.gameCtr:SendCard(send_card,currentCard) + end + end + ) + self.btn_tips.onClick:Set( + function() + if self.tips_card_list ~= nil and #self.tips_card_list ~= 0 then + local index = self.tips_click_count % #self.tips_card_list + 1 + self:ShowTipsCard(index) + self.tips_click_count = self.tips_click_count + 1 + end + end + ) + -- 过 + self.btn_not_put.onClick:Set( + function() + self.gameCtr:SendPass() + end + ) + + local function click_piao() + self.ctr_piao.selectedIndex = 0 + self.gameCtr:SendPiao(tonumber(self.ctr_piao_value.selectedPage)) + end + + local btn_piao0 = self._view:GetChild('piao0') + btn_piao0.onClick:Set(click_piao) + + local btn_piao1 = self._view:GetChild('piao1') + btn_piao1.onClick:Set(click_piao) + + local btn_piao2 = self._view:GetChild('piao2') + btn_piao2.onClick:Set(click_piao) + + local btn_piao3 = self._view:GetChild('piao3') + btn_piao3.onClick:Set(click_piao) + + local btn_piao5 = self._view:GetChild('piao5') + btn_piao5.onClick:Set(click_piao) + + local btn_piao8 = self._view:GetChild('piao8') + btn_piao8.onClick:Set(click_piao) +end + +function M:ShowTipsCard(index) + local item = self.tips_card_list[index] + for i = 1, #self.card_list do + local card = self.card_list[i] + local isExsit = false + for j = 1, #item do + if item[j] == self.card_list[i] then + self:UpdateCardMove(card.btn_card, true, false) + isExsit = true + end + end + if isExsit == false then + self:UpdateCardMove(card.btn_card, false, false) + end + end +end + +function M:GetHandCardOffset(count) + local start = -54 + + local offset = 0 + if count > 10 then + offset = start - count + 18 + else + offset = -50 + end + return offset +end + +function M:GetHandCardPos(index, card_count) + local x, y = 0, -18 + local offset = self:GetHandCardOffset(card_count) + local middle_x = self.cards_view.width / 2 + local start_x = middle_x - (card_count / 2 * (self.card_width + offset)) + (offset / 2) + x = start_x + (self.card_width + offset) * (index - 1) + return Vector2.New(x, y) +end +function M:GetHandCardPos1(index, card_count) + local x, y = 0, -18 + local offset = self:GetHandCardOffset(card_count) + local middle_x = self.cards_view.width / 2 + local start_x = middle_x - (card_count / 2 * (self.card_width + offset)) + (offset / 2) + x = start_x + (self.card_width + offset) * (index - 1) + return x, y +end +function M:ChangeOneCodeByFrom(card) + local flower = math.floor(card / 100) + local number = card % 100 + if number == 2 then + number = 15 + end + return number * 10 + flower +end + +function M:ErrorTip(error_text) + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + self.cor_init_poker = nil + self.cor_init_poker = + coroutine.start( + function() + self.put_error_text.text = error_text + self.ctr_put_error.selectedIndex = 1 + coroutine.wait(2) + self.ctr_put_error.selectedIndex = 0 + end + ) +end + +--RunFast_CardType +--None = 0, +--OneCard = 1, +--OnePair = 2, +--Three = 3, +--Pairs = 4, +--ThreeAndTwo = 5, +--ThreeAndOne = 6, +--Plane = 7, +--PlaneAndTwo = 8, +--PlaneAndOne = 9, +--Straight = 10, +--Bomb = 11 +function M:GetCardTips(type, number, length, mustPutMaxCard, tip_templist) + local tip_list = {} + local sidaisan = false + local touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + local card_map, max_key = self:GetCardMapAndMaxKey(self.card_list) + if type == RunFast_CardType.None then + if DataManager.CurrenRoom.is_new_bout then + tip_list = self:NewBoutTips(card_map) + end + return tip_list, touch_key_list + elseif type == RunFast_CardType.Bomb then + tip_list, touch_key_list = self:CheckBomb(card_map, number, length) + else + local list_type, list_bomb = {}, {} + local touch_type, touch_bomb + list_bomb, touch_bomb = self:CheckBomb(card_map, 0, 4) + + local card_templist = membe_clone(self.card_list) + + if list_bomb ~= nil and tip_templist == nil then + -- body + for i = 1, #list_bomb do + local templist_bomb = list_bomb[i] + for j = 1, #templist_bomb do + for k = 1, #card_templist do + if templist_bomb[j] == card_templist[k] then + -- body + list_remove(card_templist, card_templist[k]) + end + end + end + end + card_map, max_key = self:GetCardMapAndMaxKey(card_templist) + end + + if type == RunFast_CardType.OneCard then + -- if mustPutMaxCard then + -- number = max_key - 1 + -- self:ErrorTip("下家报单,请出最大的牌 ") + -- end + list_type, touch_type = self:CheckOneCard(card_map, number, length) + elseif type == RunFast_CardType.OnePair then + list_type, touch_type = self:CheckOnePair(card_map, number, length) + elseif type == RunFast_CardType.Three then + list_type, touch_type = self:CheckThree(card_map, number, length) + elseif type == RunFast_CardType.Pairs then + list_type, touch_type = self:CheckPairs(card_map, number, length) + elseif type == RunFast_CardType.ThreeAndTwo then + list_type, touch_type = self:CheckThreeAndTwo(card_map, number, length) + elseif type == RunFast_CardType.ThreeAndOne then + list_type, touch_type = self:CheckThreeAndOne(card_map, number, length) + elseif type == RunFast_CardType.Plane then + list_type, touch_type = self:CheckPlane(card_map, number, length, 0) + elseif type == RunFast_CardType.PlaneAndTwo then + list_type, touch_type = self:CheckPlane(card_map, number, length, 2) + elseif type == RunFast_CardType.PlaneAndOne then + list_type, touch_type = self:CheckPlane(card_map, number, length, 1) + elseif type == RunFast_CardType.Straight then + list_type, touch_type = self:CheckStraight(card_map, number, length) + elseif type == RunFast_CardType.FourAndtThree then + list_type, touch_type = self:CheckBomb(card_map, 0, 4) + if #list_type > 0 then + -- body + sidaisan = true + end + elseif type == RunFast_CardType.FourAndtOne then + printlog("四带一==>>>") + list_type, touch_type = self:CheckThreeAndTwo(card_map, number, length) + end + card_map, max_key = self:GetCardMapAndMaxKey(self.card_list) + tip_list = self:GetMergeAllList(list_type, list_bomb) + --list_bomb, touch_bomb = self:CheckBomb(card_map, 0, 4) + touch_key_list = self:GetMergeAllList(touch_type, touch_bomb) + local tip_templist2 = {} + if tip_templist == nil then + -- body + tip_templist2 = self:GetCardTips(type, number, length, mustPutMaxCard, tip_list) + end + if #tip_templist2 > 0 then + -- body + tip_list = self:GetMergeAllList(tip_list, tip_templist2) + end + end + + if (tip_templist ~= nil and sidaisan == false and #tip_templist >= 1) then + -- body + self:SetNotTouchCard(touch_key_list, card_map) + end + + return tip_list +end + +-- 合并多个list +function M:GetMergeAllList(...) + local lists = {...} + local merge_list = {} + for i = 1, #lists do + local list_item = lists[i] + for j = 1, #list_item do + merge_list[#merge_list + 1] = list_item[j] + end + end + + return merge_list +end + +function M:NewBoutTips(pokerMap) + local new_bout_list = {} + for k, v in pairs(pokerMap) do + new_bout_list[#new_bout_list + 1] = v + end + return new_bout_list +end + +function M:CheckOneCard(pokerMap, num, length) + local one_card_list = {} + local touch_key_list = {} + if #self.card_list < length then + return one_card_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if k > num then + one_card_list[#one_card_list + 1] = {v[1]} + touch_key_list[#touch_key_list + 1] = k + end + end + return one_card_list, touch_key_list +end + +function M:CheckOnePair(pokerMap, num, length) + local one_pair_list = {} + local touch_key_list = {} + if #self.card_list < length then + return one_pair_list, touch_key_list + end + for k, v in pairs(pokerMap) do -- 从三条和对子里面提取 + if #v > 1 and k > num then + one_pair_list[#one_pair_list + 1] = {v[1], v[2]} + touch_key_list[#touch_key_list + 1] = k + end + end + return one_pair_list, touch_key_list +end + +function M:CheckThree(pokerMap, num, length) + local three_list = {} + local touch_key_list = {} + if #self.card_list < length then + return three_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if #v > 2 and k > num then + three_list[#three_list + 1] = {v[1], v[2], v[3]} + touch_key_list[#touch_key_list + 1] = k + end + end + return three_list, touch_key_list +end + +function M:CheckPairs(pokerMap, num, length) + local pairs_list = {} + local touch_key_list = {} + if #self.card_list < length then + return pairs_list, touch_key_list + end + local pair_length = length / 2 + local number_start = num - pair_length + 2 + local number_end = 15 - pair_length + for i = number_start, number_end do + local item_all_list = {} + for j = i, i + pair_length - 1 do + local item_list = pokerMap[j] + if item_list == nil then + break + elseif #item_list < 2 then + break + else + item_all_list[#item_all_list + 1] = item_list[1] + item_all_list[#item_all_list + 1] = item_list[2] + end + if j == i + pair_length - 1 then + pairs_list[#pairs_list + 1] = item_all_list + for k = i, i + pair_length - 1 do + touch_key_list[#touch_key_list + 1] = k + end + end + end + end + return pairs_list, touch_key_list +end + +function M:CheckThreeAndOne(pokerMap, num, length) + local three_and_one_list = {} + local touch_key_list = {} + if #self.card_list < length then + return three_and_one_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if #v >= 3 and k > num then + three_and_one_list[#three_and_one_list + 1] = {v[1], v[2], v[3]} + touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + end + end + return three_and_one_list, touch_key_list +end + +function M:CheckThreeAndTwo(pokerMap, num, length) + local three_and_two_list = {} + local touch_key_list = {} + if #self.card_list < length then + return three_and_two_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if #v >= 3 and k > num then + three_and_two_list[#three_and_two_list + 1] = {v[1], v[2], v[3]} + touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + end + end + return three_and_two_list, touch_key_list +end + +function M:CheckStraight(pokerMap, num, length) + local straight_list = {} + local touch_key_list = {} + if #self.card_list < length then + return straight_list, touch_key_list + end + local number_start = num - length + 2 + local number_end = 15 - length + for i = number_start, number_end do + local item_all_list = {} + for j = i, i + length - 1 do + local item_list = pokerMap[j] + if item_list == nil then + break + else + item_all_list[#item_all_list + 1] = item_list[1] + end + if j == i + length - 1 then + straight_list[#straight_list + 1] = item_all_list + for k = i, i + length - 1 do + touch_key_list[#touch_key_list + 1] = k + end + end + end + end + return straight_list, touch_key_list +end + +function M:CheckBomb(pokerMap, num, length) + local bomb_list = {} + local touch_key_list = {} + local threeA = DataManager.CurrenRoom.room_config.threeA + if threeA == 0 then + -- body + if #self.card_list < length then + return bomb_list, touch_key_list + end + else + if #self.card_list < 3 then + return bomb_list, touch_key_list + end + end + + for k, v in pairs(pokerMap) do + if #v == 4 and k > num then + bomb_list[#bomb_list + 1] = v + touch_key_list[#touch_key_list + 1] = k + end + if threeA == 1 and #v == 3 and k == 14 then + bomb_list[#bomb_list + 1] = v + touch_key_list[#touch_key_list + 1] = k + end + end + + return bomb_list, touch_key_list +end + +function M:CheckPlane(pokerMap, num, length, and_num) + local plane_list = {} + local touch_key_list = {} + local l = and_num + 3 + local pair_length = length / l + local number_start = num - pair_length + 2 + local number_end = 15 - pair_length + for i = number_start, number_end do + local item_all_list = {} + for j = i, i + pair_length - 1 do + local item_list = pokerMap[j] + if item_list == nil then + break + elseif #item_list < 3 then + break + else + item_all_list[#item_all_list + 1] = item_list[1] + item_all_list[#item_all_list + 1] = item_list[2] + item_all_list[#item_all_list + 1] = item_list[3] + end + if j == i + pair_length - 1 then + plane_list[#plane_list + 1] = item_all_list + touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + end + end + end + return plane_list, touch_key_list +end + +function M:SetNotTouchCard(touch_key_list, card_map) + local all_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + for i = 1, #all_key_list do + local key = all_key_list[i] + local isExsit = self:IsExistByList(touch_key_list, key) + if isExsit == false then + local key_card_item = card_map[key] + if key_card_item ~= nil then + for j = 1, #key_card_item do + local card = key_card_item[j] + card.btn_card.touchable = false + self:UpdateCardMove(card.btn_card, false, false) + end + end + end + end +end + +function M:IsExistByList(list, item) + for i = 1, #list do + if list[i] == item then + return true + end + end + return false +end + +function M:GetCardByNumber(list, number) + for i = 1, #list do + if list[i].card_code_number == number then + return list[i] + end + end + return nil +end + +function M:GetCardMapAndMaxKey(pokerList) + local map, max_key = {}, 0 + for i = 1, #pokerList do + local number = math.floor(pokerList[i].card_code_number / 10) + if number > max_key then + max_key = number + end + if map[number] == nil then + map[number] = {pokerList[i]} + else + map[number][#map[number] + 1] = pokerList[i] + end + end + return map, max_key +end +function M:CheckOnes(pokerMap, num, length) + local one_card_list = {} + local touch_key_list = {} + local text = {} + local text2 = {} + local x = 0 + if #self.card_list < length then + return one_card_list, touch_key_list + end + for k, v in pairs(pokerMap) do + text = {} + text2 = {} + if k > num then + for l, p in pairs(pokerMap) do + for i = 0, length - 1 do + if l == k + i and l ~= 15 and l ~= 16 then + -- body + text[#text + 1] = {p[1]} + text2[#text2 + 1] = l + if #text >= length then + -- body + local x = #one_card_list + local y = #touch_key_list + for i = 1, #text - 1 do + one_card_list[x + 1] = text[1] + touch_key_list[y + 1] = text2[2] + -- for i, v in pairs(text2[i + 1]) do + -- if v ~= nil then + -- table.insert(touch_key_list[x + 1], v) + -- end + -- end + for i, v in pairs(text[i + 1]) do + if v ~= nil then + table.insert(one_card_list[x + 1], v) + end + end + end + end + end + end + end + end + end + return one_card_list, touch_key_list, length +end +function M:Clear() + self:PlayScore(nil) + self:SetOutCardInfo(nil, false) + self.card_list = {} + self.out_card_list = {} + self.cards_view:RemoveChildren(0, -1, true) + -- self.mask_liangpai:RemoveChildren(0,-1,true) +end + +function M:Destroy() + Stage.inst.onTouchMove:Remove(self.touchMoveFun) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_Protocol.lua b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_Protocol.lua new file mode 100644 index 00000000..f70eef08 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_Protocol.lua @@ -0,0 +1,39 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:51 +--- +local RunFast_Protocol = { + RunFast_ConfirmToNextGame = "1003", + + RunFast_Send_Card = "1013", + + RunFast_Send_Guo = "1014", + + RunFast_Send_Piao = "1015", + + RunFast_Ming_Card = "2117", + + RunFast_Init_Card = "2011", + + RunFast_Options = "2004", + + RunFast_Index_Move = "2016", + + RunFast_Play_Succ = "2021", + + RunFast_Pass_Succ = "2030", + + RunFast_Put_Error = "2111", + + RunFast_Bomb_Score = "2118", + + RunFast_Result = "2007", + RunFast_Piao_Tip = "2031", + RunFast_Piao_Action = "2032", + + RunFast_ConfirmToNextGameSucc = "2010", + PT_GAMETUOGUAN = "2029",--托管 + SEND_TUOGUAN = "1018",--托管 +} + +return RunFast_Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_ResultView.lua b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_ResultView.lua new file mode 100644 index 00000000..d30a4dd1 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_ResultView.lua @@ -0,0 +1,250 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 11:05 +--- +require("Game.View.ResultView") + +local RunFast_ResultView = {} + +local M = RunFast_ResultView + +function RunFast_ResultView.new(blur_view, data, roomid, over, win_seat, dissolve, remaincards) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + + self.class = "RunFast_ResultView" + self._currenIndex = 0 + self._close_zone = false + --self._blur_view = blur_view + self._gamectr = ControllerManager.GetController(GameController) + + self:init("ui://Extend_Poker_ShengSiDu/clearing", data, roomid, over, win_seat, dissolve, remaincards) + return self +end + +function M:init(url, data, roomid, over, win_seat, dissolve, remaincards) + + ResultView.init(self, url) + + --self:InitData(data,roomid) + --self:InitData(data,roomid) + if dissolve == 1 then + -- body + self:InitData(data, win_seat, roomid) + else + self:InitData_One(data, win_seat, over, roomid, remaincards) + end + +end + + +-- 小结算 +function M:InitData_One(data, winseat, over, roomid, remaincards) + + local room = DataManager.CurrenRoom + self._view:GetController("sdk").selectedIndex = 1 + local _gamectr = ControllerManager.GetController(GameController) + local list_view = self._view:GetChild("player_list_1") + list_view:RemoveChildrenToPool() + + for i = 1, #data do + local player = data[i] + local item = list_view:AddItemFromPool("ui://Extend_Poker_ShengSiDu/clearing_item_1") + + local boom = item:GetChild("boom") + boom.text = player.thisboomnum + + local piao = item:GetChild("piao") + if player.piao <= 0 then + piao.text = "0" + else + piao.text = "" .. player.piao + end + + local nichen = item:GetChild("nichen") + + if player.nick ~= nil then + -- body + nichen.text = tostring(player.nick) + else + + nichen.text = tostring(player.self_user.nick_name) + end + + + local shengpai = item:GetChild("shengpai") + if player.cards ~= nil then + -- body + shengpai.text = tostring(#player.cards) + else + shengpai.text = tostring(#player.hand_list) + end + + local rt = 1 + if room.hpOnOff and room.hpOnOff == 1 then + rt = room.score_times + end + + local hp_nonnegative = room:checkHpNonnegative() + local roundScore = player.winscore + if hp_nonnegative then + + local jifen = "" + if roundScore > 0 then + jifen = "+" .. roundScore + else + jifen = "" .. roundScore + end + + local tili = "" + local limit = "" + if player.hp_info.round_actual_hp > 0 then + tili = "(+" .. d2ad(player.hp_info.round_actual_hp) .. ")" + if player.hp_info.upper_limit then + limit = "达到上限" + end + else + tili = "(" .. d2ad(player.hp_info.round_actual_hp) .. ")" + if player.hp_info.upper_limit then + limit = "达到下限" + end + end + + item:GetChild("score").text = jifen .. tili .. limit + else + + local jifen = "" + if roundScore >= 0 then + jifen = "+" .. roundScore + else + jifen = "" .. roundScore + end + jifen = jifen .. " " + + local tili = "" + if room.hpOnOff > 0 then + + local need = roundScore * rt + tili = "(" + if roundScore > 0 then + tili = tili .. "+" .. tostring(need) + else + tili = tili .. tostring(need) + end + + tili = tili .. ")" + end + + + item:GetChild("score").text = jifen .. tili + end + + if roundScore >= 0 then + + if room.self_player.seat == player.seat then + -- body + self._view:GetController("result").selectedIndex = 1 + end + else + + if room.self_player.seat == player.seat then + self._view:GetController("result").selectedIndex = 0 + end + end + + end + + + if over == 0 then + -- body + local btn_confirm = self._view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + self:Destroy() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:ConformToNextGame() + + end) + else + local btn_confirm = self._view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + --self:Destroy() + self:InitData(data, winseat, roomid) + -- ViewManager.ChangeView(ViewManager.View_Lobby) + end) + + end +end + +-- 大结算 +function M:InitData(data, winseat, roomid) + self._view:GetController("sdk").selectedIndex = 0 + + local room = DataManager.CurrenRoom + + local rt = 1 + if room.hpOnOff == 1 and room.score_times ~= 1 then + rt = room.score_times + end + + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + + local user = room:GetPlayerBySeat(data[i].seat).self_user + + player_list[i].id = user.account_id + + player_list[i].score = data[i].score + player_list[i].hp_info = data[i].hp_info + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].seat = data[i].seat + player_list[i].head_url = data[i].self_user.head_url + + if data[i].entrust ~= nil then + player_list[i].entrust = data[i].entrust > 0 + else + player_list[i].entrust = false + end + + player_list[i].param = {} + + player_list[i].param[1] = {} + player_list[i].param[1].key = "赢局数:" + player_list[i].param[1].value = tostring(data[i].settle_log.winnum) + + player_list[i].param[2] = {} + player_list[i].param[2].key = "打出炸弹数:" + player_list[i].param[2].value = tostring(data[i].settle_log.boomnum) + + player_list[i].param[3] = {} + player_list[i].param[3].key = "春天次数:" + player_list[i].param[3].value = tostring(data[i].settle_log.springnum) + + player_list[i].param[4] = {} + player_list[i].param[4].key = "当局最高分:" + player_list[i].param[4].value = tostring(data[i].settle_log.maxscore * rt) + + if data[i].daniao > 0 then + player_list[i].flag = {"打鸟"} + end + end + + self:GenerateRoomResultInfo(room.room_config.Times, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + self:InitBigResult(room) + local big_result = self._view:GetChild("big_result") + local lst_p = big_result:GetChild("player_list") + -- local list_param = com_p:GetChild("list_param") + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + end + +end + +return M diff --git a/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_RightPanelView.lua b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_RightPanelView.lua new file mode 100644 index 00000000..6a842d42 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_RightPanelView.lua @@ -0,0 +1,88 @@ +local MainRightPanelView = require("Game.View.MainRightPanelView") +local RunFast_RightPanelView = {} +local M = RunFast_RightPanelView +local function __init(self,mainView,view) + local right_panel = view + + local btn_setting = right_panel:GetChild("btn_setting") + btn_setting.onClick:Set(function() + local _settingView = mainView:NewSettingView() + _settingView.stateIndex = (mainView._room.curren_round >= 1 and mainView._allow_dissmiss) and 2 or 1 + _settingView.cd_time = mainView.dismiss_room_cd_time + _settingView:Show() + + local room = DataManager.CurrenRoom + _settingView.onCallback:Add(function(context) + local _gamectr = ControllerManager.GetController(GameController) + if (room.CurnrenState == StateType.Ready) then + _gamectr:LevelRoom(function(response) + if (response.ReturnCode == 0) then + ViewManager.ChangeView(ViewManager.View_Lobby) + GameApplication.Instance:ShowTips("房间已解散!") + end + end) + else + print("mainView.dismiss_room_cd_time"..mainView.dismiss_room_cd_time) + if mainView.dismiss_room_cd_time > 0 then + GameApplication.Instance:ShowTips("您还处于解散冷却时间当中,请稍后重试!") + else + _gamectr:AskDismissRoom() + end + end + end) + end) + + self._tex_data = right_panel:GetChild("tex_data") + self._tex_time = right_panel:GetChild("tex_time") + self._pb_batteryLevel = right_panel:GetChild("pb_batteryLevel") + self._xinhao = right_panel:GetController("xinhao") + self.ctr_xh = right_panel:GetChild("gcm_xinhao"):GetController("c1") + self.ctr_wifi = right_panel:GetChild("gcm_wifi"):GetController("c1") + self._tex_ping = right_panel:GetChild("gcm_xinhao"):GetChild("n7") + + self.ctr_log = right_panel:GetController("log") + local btn_log = right_panel:GetChild("btn_log") + btn_log.onClick:Set(function() + if self.onLogCallback then + self.onLogCallback() + end + end) + + self._total_time = 0 + self:__UpdateTime() + + -- self._timer = Timer.New(handler(self,self.__UpdateTime),10,-1,true) + -- self._timer:Start() +end +function RunFast_RightPanelView.new(mainView,view) + setmetatable(M, {__index = MainRightPanelView}) + local self = setmetatable({}, {__index = M}) + self.class = "RunFast_RightPanelView" + __init(self,mainView,view) + return self +end +function M:__UpdateTime() + self._tex_data.text = os.date("%Y-%m-%d") + self._tex_time.text = os.date("%H:%M") + if Application.platform == RuntimePlatform.IPhonePlayer or Application.platform == RuntimePlatform.Android then + self._pb_batteryLevel.value = GameApplication.Instance:GetBatteryLevel() + end + + local NetworkReachability = UnityEngine.NetworkReachability + local _client = ControllerManager.GameNetClinet + if not _client then return end + local ping = _client:getAveragePingTime() + if not ping then return end + ping = math.floor(ping / 2) + if ping > 300 then ping =300 end + if ping <= 100 then + self.ctr_xh.selectedIndex = 0 + elseif ping <= 300 then + self.ctr_xh.selectedIndex = 1 + else + self.ctr_xh.selectedIndex = 2 + end + self._tex_ping.text = ping .. "ms" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_Room.lua b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_Room.lua new file mode 100644 index 00000000..3202d240 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_Room.lua @@ -0,0 +1,26 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 14:36 +--- +local RunFast_Player = import(".ShengSiDu_Player") + +local RunFast_Room = { +} + +local M = RunFast_Room + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Room}) + local self = setmetatable({}, {__index = M}) + self:init() + return self +end + + + +function M:NewPlayer() + return RunFast_Player.new() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_RoomConfig.lua b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_RoomConfig.lua new file mode 100644 index 00000000..3b2c936b --- /dev/null +++ b/lua_probject/extend_project/extend/poker/shengsidu/ShengSiDu_RoomConfig.lua @@ -0,0 +1,397 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 10:54 +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.class = "RunFast_RoomConfig" + self.config=config + self.Leaf = config.leaf + self.Rule = config.rule + self.Times = config.times + self.WillBeOut = config.willBeOut + self.Heart10 = config.heartten + self.BombSpring = config.minboom + self.AA = config.aa + self.PlayerNum = config.maxPlayers + self.showlength = config.showlength + self.fourBeltThree=config.fourBeltThree + self.demolition=config.demolition + self.fangzuobi=config.fangzuobi + self.planelack=config.planelack + self.threelack=config.threelack + self.threeA=config.threeA + self.tuoguan_active_time=config.tuoguan_active_time + self.tuoguan=config.tuoguan + self.tuoguan_result_type=config.tuoguan_result_type + self.isNonnegative=config.isNonnegative + self.sandaidan = config.sandaidan + self.isHidden = config.isHidden + self.ba = config.ba + self.fs = config.fs + + if config.piao ~= nil then + self.piao = config.piao + else + self.piao = 0 + end + + if config.daniao ~= nil then + self.daniao = config.daniao + else + self.daniao = 0 + end + + if self.isNonnegative == nil then + self.isNonnegative = 0 + end + self.energyTab=config.energyTab + + if self.energyTab==nil then + self.energyTab=0 + end + + return self +end + +function M:GetDes(sp) + sp = sp or " " + local str = "" + -- str = str.. self.Times.."局"..sp + str = str .. RoomConfig.GetDes(self, sp).." " + local count=1 + + + if self.Rule == 1 then + str = str.. "方片3坐庄" + if self.config["must_first_card"]==1 then + str = str .."-必带先出牌" + end + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str.. "赢家连庄" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.WillBeOut == 1 then + str = str.. "能出必出" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str.. "可不必出" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + if self.showlength == 1 then + str = str.. "显示剩余牌" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["baodanbili"]==1 then + str = str .."报单必顶" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["two_budai_three"]==1 then + str = str .."2不连3" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str .."二可连三" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["sandai2_notdui"]==1 then + str = str .."3带2不分对和散" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + tr = str .."3带2区分对和散" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["Akaitou"]==1 then + str = str .."A可开头" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + tr = str .."A不可开头" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["threeoutlack"]==1 then + str = str .."3张可少带出完" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["threelack"]==1 then + str = str .."3张可少带接完" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["fouroutlack"]==1 then + str = str .."4张可少带出完" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + + + + if self.piao == 0 then + str = str.. "炸弹不计分" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.piao == 1 then + str = str.. "炸弹一分" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.piao == 2 then + str = str.. "炸弹三分" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.piao == 3 then + str = str.. "炸弹五分" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["jifen"]==0 then + str = str .."剩余牌计分" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str .."排名计分" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + return str +end + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_Poker_ShengSiDu/gamerule") + return gamerulepanel +end + + +function M:GetGameSMSize() + return 467,500 +end + +function M:GetGameName() + return "生死赌" +end + +--function M:GetIsShowCardNumber() +-- return self.ShowNumber == 1 +--end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/twodoudizhu/EXGameInfo.lua b/lua_probject/extend_project/extend/poker/twodoudizhu/EXGameInfo.lua new file mode 100644 index 00000000..8c2d0dc9 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/twodoudizhu/EXGameInfo.lua @@ -0,0 +1,210 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 15:19 +--- +local EXGameInfo = {} + +local M = EXGameInfo + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = "EXGameInfo" + UIPackage.AddPackage("extend/poker/twodoudizhu/ui/Info_Poker_TwoDouDiZhu") + return self +end + +function M:FillData(view, index) + self._maxPlayer = 3 -- 默认玩家人数 + self._roundChoice = 3 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL("ui://Info_Poker_TwoDouDiZhu/Creat_TwoDouDiZhu") + + self._config:GetChild("people_2").onClick:Set(function() + self._config:GetController("rule").selectedIndex = 0 + end) + + local piao = self._config:GetController("piao") + local daniao = self._config:GetController("daniao") + + piao.onChanged:Add(function() + if piao.selectedIndex ~= 0 then + daniao.selectedIndex = 0 + end + end) + + daniao.onChanged:Add(function() + if daniao.selectedIndex ~= 0 then + piao.selectedIndex = 0 + end + end) + +end + +local _help_url = "ui://Info_Poker_TwoDouDiZhu/Com_help" +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_Poker_TwoDouDiZhu/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_Poker_TwoDouDiZhu/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list = {"二人斗地主"} +function M:GetPlayList() + return _play_list +end + +function M:LoadConfigData(data) + printlog("LoadConfigData====================================") + local _config = self._config + _config:GetController("round").selectedIndex = data.opt - 1 + _config:GetController("rule").selectedIndex = data.rule == 2 and 0 or 1 + -- _config:GetController("play_list").selectedIndex = data.leaf - 1 + -- _config:GetController("willBeOut").selectedIndex = data.willBeOut - 1 + -- _config:GetController("heart10").selectedIndex = data.heartten - 1 + -- _config:GetController("bombSpring").selectedIndex = data.minboom - 1 + -- _config:GetController("player_num").selectedIndex = data.maxPlayers == 2 and 0 or 1 + -- _config:GetController("Cost").selectedIndex = data.AA == 0 and 0 or 1 + -- _config:GetController("showlength").selectedIndex = data.showlength + _config:GetController("fourBeltThree").selectedIndex = data.fourBeltThree + -- _config:GetController("demolition").selectedIndex = data.demolition + -- _config:GetController("fangzuobi").selectedIndex = data.fangzuobi + + local sandaidan = data.sandaidan + if sandaidan ~= nil and sandaidan == 1 then + _config:GetChild("sandaidan").selected = true + + _config:GetChild("planelack").selected = false + _config:GetChild("Threelack").selected = false + + else + -- _config:GetChild("sandaidan").selected = false + + -- _config:GetChild("planelack").selected = data.planelack == 1 and true or false + -- _config:GetChild("Threelack").selected = data.threelack == 1 and true or false + end + + local fs = data.fs + -- if fs ~= nil and fs == 1 then + -- _config:GetChild("fan_sprint").selected = true + -- else + -- _config:GetChild("fan_sprint").selected = false + -- end + + local ba = data.ba + -- if ba ~= nil and ba == 1 then + -- _config:GetChild("boom_add").selected = true + -- else + -- _config:GetChild("boom_add").selected = false + -- end + + --_config:GetChild("ThreeA").selected = data.threeA == 1 and true or false + + if data.piao ~= nil then + _config:GetController("piao").selectedIndex = data.piao + end + + if data.daniao ~= nil then + _config:GetController("daniao").selectedIndex = data.daniao + end + + _config:GetController("threetwo").selectedIndex = data.threeBeltTwo + _config:GetController("three").selectedIndex = data.threezhang + _config:GetController("bei").selectedIndex = data.baseMul + _config:GetController("rangxian").selectedIndex = data.rangXian + _config:GetController("fengding").selectedIndex = data.scoreTop + + +end + +function M:SelectedConfigData() + printlog("SelectedConfigData=======================================") + local _config = self._config + local round = _config:GetController("round").selectedIndex + local rule = _config:GetController("rule").selectedIndex == 0 and 2 or 1 + local leaf = 0--_config:GetController("play_list").selectedIndex + local willBeOut = 0--_config:GetController("willBeOut").selectedIndex + local bombSpring = 0--_config:GetController("bombSpring").selectedIndex + local heart10 = 0--_config:GetController("heart10").selectedIndex + local player_num = 0--_config:GetController("player_num").selectedIndex + local AA = 0--_config:GetController("Cost").selectedIndex + local showlength = 0--_config:GetController("showlength").selectedIndex + local fourBeltThree = _config:GetController("fourBeltThree").selectedIndex + local demolition = 0--_config:GetController("demolition").selectedIndex + local fangzuobi = 0--_config:GetController("fangzuobi").selectedIndex + local planelack =0-- _config:GetChild("planelack").selected and 1 or 0 + local threelack = 0--_config:GetChild("Threelack").selected and 1 or 0 + local ThreeA =0 --_config:GetChild("ThreeA").selected and 1 or 0 + local piao =0-- _config:GetController("piao").selectedIndex + local daniao = 0--_config:GetController("daniao").selectedIndex + local sandaidan = 0--_config:GetController("sandaidan").selectedIndex + local ba = 0--_config:GetChild("boom_add").selected and 1 or 0 + local fs =0-- _config:GetChild("fan_sprint").selected and 1 or 0 + + local threeBeltTwo = _config:GetController("threetwo").selectedIndex + local threezhang = _config:GetController("three").selectedIndex + local baseMul = _config:GetController("bei").selectedIndex + local rangXian = _config:GetController("rangxian").selectedIndex + local scoreTop = _config:GetController("fengding").selectedIndex + + printlog("fourBeltThree===================",fourBeltThree) + local _data = {} + _data["account_id"] = DataManager.SelfUser.Id + _data["opt"] = round + 1 + _data["rule"] = rule == 0 and 2 or 1 + _data["leaf"] = leaf + 1 + _data["AA"] = AA + _data["willBeOut"] = willBeOut + 1 + _data["showlength"] = showlength + _data["heartten"] = willBeOut == 0 and heart10 + 1 or 2 + _data["minboom"] = (willBeOut == 0 and leaf == 1 and player_num == 1) and bombSpring + 1 or 2 + _data["maxPlayers"] = player_num + 2 + _data["fourBeltThree"] = fourBeltThree + _data["demolition"] = demolition + _data["fangzuobi"] = fangzuobi + _data["threeA"] = ThreeA + _data["piao"] = piao + _data["daniao"] = daniao + _data["sandaidan"] = sandaidan + _data["ba"] = ba + _data["fs"] = fs + + _data["threeBeltTwo"] = threeBeltTwo + _data["threezhang"] = threezhang + _data["baseMul"] = baseMul + _data["rangXian"] = rangXian + _data["scoreTop"] = scoreTop + + if willBeOut == 1 then + -- body + _data["planelack"] = 0 + _data["threelack"] = 0 + else + + if sandaidan == 1 then + _data["planelack"] = 0 + _data["threelack"] = 0 + else + _data["planelack"] = planelack + _data["threelack"] = threelack + end + end + return _data +end + +function M:OnChangeOption(ctype, pay_obj) + IGameInfo.OnChangeOption(self, ctype, pay_obj) + local people = self._config:GetController("player_num") + people.onChanged:Set(function() + self._maxPlayer = people.selectedIndex + 2 + self:ShowVariablePrice(ctype, pay_obj) + end) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/twodoudizhu/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/poker/twodoudizhu/EXPlayerInfoView.lua new file mode 100644 index 00000000..8289df0f --- /dev/null +++ b/lua_probject/extend_project/extend/poker/twodoudizhu/EXPlayerInfoView.lua @@ -0,0 +1,52 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + + +function M:FillData(player) + + + PlayerInfoView.FillData(self, player) + if player.cur_hp ~= nil then + self:UpdateScore(d2ad(player.cur_hp)) + else + local rt = 1 + if self._main_view._room.hpOnOff == 1 then + rt = self._main_view._room.score_times + end + self:UpdateScore(player.total_score * rt) + end + + +end + +function M:UpdatePiao(piao) + + if piao == nil or piao == -1 then + self._view:GetChild("piao").text = "" + elseif piao == 0 then + self._view:GetChild("piao").text = "不飘" + elseif piao == 1 then + self._view:GetChild("piao").text = "飘1分" + elseif piao == 2 then + self._view:GetChild("piao").text = "飘2分" + elseif piao == 3 then + self._view:GetChild("piao").text = "飘3分" + elseif piao == 5 then + self._view:GetChild("piao").text = "飘5分" + elseif piao == 8 then + self._view:GetChild("piao").text = "飘8分" + end +end + + +return M diff --git a/lua_probject/extend_project/extend/poker/twodoudizhu/ExtendConfig.lua b/lua_probject/extend_project/extend/poker/twodoudizhu/ExtendConfig.lua new file mode 100644 index 00000000..7c0f6ffe --- /dev/null +++ b/lua_probject/extend_project/extend/poker/twodoudizhu/ExtendConfig.lua @@ -0,0 +1,260 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:57 +--- + +local EXTEND_MODEL_NAME = ... +local EXGameInfo = import(".EXGameInfo") +local TwoDouDiZhu_MainView = import(".TwoDouDiZhu_MainView") +local TwoDouDiZhu_GameController = import(".TwoDouDiZhu_GameController") +local TwoDouDiZhu_RoomConfig = import(".TwoDouDiZhu_RoomConfig") +local TwoDouDiZhu_Player = import(".TwoDouDiZhu_Player") +local TwoDouDiZhu_Room = import(".TwoDouDiZhu_Room") +local TwoDouDiZhu_PlayerBackView = import(".TwoDouDiZhu_PlayerBackView") + +local ExtendConfig = {} + +local M = ExtendConfig + + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = "ExtendConfig" + self.extend_id = 14 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = TwoDouDiZhu_MainView + self._viewMap[ViewManager.View_PlayBack] = TwoDouDiZhu_PlayerBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage("extend/poker/twodoudizhu/ui/Info_Poker_TwoDouDiZhu") + self:UnAssets() +end + +function M:UnAssets() + UIPackage.RemovePackage("extend/poker/twodoudizhu/ui/Extend_Poker_TwoDouDiZhu") + ResourcesManager.UnLoadGroup("TwoDouDiZhu_PK") +end + +local _gameInfo = nil +function M:GetGameInfo() +if not _gameInfo then + _gameInfo = EXGameInfo.new() +end +return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = TwoDouDiZhu_GameController.new() + end + return _ctr_game +end + +function M:NewRoom() + return TwoDouDiZhu_Room.new() +end + +function M:GetGameRule() + return TwoDouDiZhu_RuleView.new() +end + +function M:GetIconUrl() + return "ui://Extend_Poker_TwoDouDiZhu/icon" + -- +end + +function M:FillRoomConfig(room,_config) + room.room_config = TwoDouDiZhu_RoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + if _ctr_game == nil then + self:GetGameController() + end + + local reload = s2croom["reload"] + + local _tableInfo = s2croom["tableInfo"] + + local _config = _tableInfo["config"] + room.room_config = TwoDouDiZhu_RoomConfig.new(_config) + + room.curren_round = _tableInfo["round"] + if room.curren_round == 0 and reload then + room.curren_round = 1 + end + + local playerList = _tableInfo["playerData"] + for i = 1,#playerList do + local _jp = playerList[i] + + local p = TwoDouDiZhu_Player.new() + p.seat = _jp["seat"] + local online = _jp["online"] + p.line_state = online + p.ready = _jp["ready"] == 1 and true or false + local pid = _jp["aid"] + if (DataManager.SelfUser.account_id == pid) then + room.self_player = p + p.self_user = DataManager.SelfUser + else + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + end + p.self_user.location = Location.new(_jp["pos"] or "") + p.self_user.host_ip = _jp["ip"] + p.total_score = _jp["score"] or 0 + if _jp.hp_info then + p.cur_hp = _jp.hp_info.cur_hp + end + p.hp_info = _jp["hp_info"] + + if _jp["entrust"] then + p.entrust = _jp.entrust + end + room:AddPlayer(p) + end + + + + local owner = s2croom["owner"] + room.owner_id = owner + room.game_status = 0 + if reload then + + + local reloadInfo = s2croom["reloadInfo"] + room.nineCards = reloadInfo["gameStatusData"]["nineCards"] + room.threeCards = reloadInfo["gameStatusData"]["threeCards"] + room.gameStatus = reloadInfo["gameStatusData"]["gameStatus"] + room.gameSeat = reloadInfo["gameStatusData"]["seat"] + room.threeCardMul = reloadInfo["gameStatusData"]["threeCardMul"] + room.curMul = reloadInfo["gameStatusData"]["curMul"] + + local playing = reloadInfo["playing"] + + room.curren_turn_seat = reloadInfo["active_seat"] + local info_list = reloadInfo["info_list"] + if playing == true then + + + room.CurnrenState = StateType.Palying + room.game_status=1 + + for i = 1, #info_list do + local p = room:GetPlayerById(info_list[i]["playerid"]) + + if p == room.self_player then + p.hand_list = reloadInfo["hand_card"] + p.open= reloadInfo["open"] + end + + p.hand_count = info_list[i]["card_size"] + p.piao = info_list[i]["piao"] + local last_outcard = info_list[i]["last_outcard"] + if last_outcard ~= nil and last_outcard[1] ~= 0 then + local out_card_list = _ctr_game:ChangeCodeByFrom(last_outcard.card_list,true) + local card_type,number,length,plan_three_count = _ctr_game:GetCardListInfo(out_card_list) + p.out_card_list = _ctr_game:GetSortOutCardList(out_card_list,card_type,number,plan_three_count) + else + p.out_card_list = {0} + end + end + else + + room.game_status=1 + + room.CurnrenState = StateType.PalyingWait + + room.winseat = reloadInfo["winseat"] + room.remaincards = reloadInfo["remaincards"] + + for i = 1, #info_list do + local playerData = info_list[i] + local p = room:GetPlayerById(playerData["playerid"]) + + p.ready = playerData["certainseat"] == 1 and true or false + + local last_outcard = info_list[i]["last_outcard"] + if last_outcard ~= nil and last_outcard[1] ~= 0 then + + local out_card_list = _ctr_game:ChangeCodeByFrom(last_outcard.card_list,true) + local card_type,number,length,plan_three_count = _ctr_game:GetCardListInfo(out_card_list) + p.out_card_list = _ctr_game:GetSortOutCardList(out_card_list,card_type,number,plan_three_count) + else + p.out_card_list = {0} + end + + p.hand_list = info_list[i]["cards"] + p.winscore = info_list[i]["winscore"] + p.piao = info_list[i]["piao"] + p.hand_count = info_list[i]["card_size"] + p.thisboomnum=info_list[i]["thisboomnum"] + p.open= info_list[i]["open"] + end + end + else + room.CurnrenState = StateType.Ready + end +end + + + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data["info"] + + local _config = _tableInfo["config"] + room.room_id = _tableInfo.room_id + room.room_config = TwoDouDiZhu_RoomConfig.new(_config) + room.owner_id = _config["ownerid"] + local active_seat = _tableInfo["active_seat"] + local bank_seat = _tableInfo["banker_seat"] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo["round"] + local _info_list = _tableInfo["playerData"] + for i = 1,#_info_list do + local _jp = _info_list[i] + local p = TwoDouDiZhu_Player.new() + p.seat = _jp["seat"] + p.aid = _jp["aid"] + local pid = _jp["aid"] + if p.aid == DataManager.SelfUser.account_id then + room.self_player = p + end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp["nick"] + u.head_url = _jp["portrait"] + u.sex = _jp["sex"] + -- end + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp["hand_card"] + p.hand_list = _hand_card + p.hand_count = #_hand_card + p.total_score = _jp["score"] + p.piao = _jp["piao"] + p.open= _jp["open"] + p.hp_info = _jp["hp_info"] + if _jp['hp_info'] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + room:AddPlayer(p) + end + room.cmdList = pd_data["cmdList"] +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_CardType.lua b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_CardType.lua new file mode 100644 index 00000000..f700e17c --- /dev/null +++ b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_CardType.lua @@ -0,0 +1,24 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 11:30 +--- + +local TwoDouDiZhu_CardType = { + None = 0, + OneCard = 1,--一张 + OnePair = 2,--一对 + Three = 3,--三张 + Pairs = 4,--连对 + ThreeAndTwo = 5,--三带二 + ThreeAndOne = 6,--三带一 + Plane = 7,--飞机 + PlaneAndTwo = 8,--飞机带二 + PlaneAndOne = 9,--飞机带一 + Straight = 10, --顺子 + + Bomb = 11,--炸 + FourAndtThree=12,--四代三 + HuoJian = 13,--火箭 +} + +return TwoDouDiZhu_CardType \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_GameController.lua b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_GameController.lua new file mode 100644 index 00000000..d0b90a3a --- /dev/null +++ b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_GameController.lua @@ -0,0 +1,780 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 11:28 +--- + +local TwoDouDiZhu_Protocol = import(".TwoDouDiZhu_Protocol") +local TwoDouDiZhu_GameEvent = import(".TwoDouDiZhu_GameEvent") +local TwoDouDiZhu_CardType = import(".TwoDouDiZhu_CardType") +local TwoDouDiZhu_PutError = { + "必须先出最小的牌", + "出牌不符合规定牌型 ", + "下家报单,请出最大的牌 ", + "炸弹不能拆" +} + +local TwoDouDiZhu_GameController = {} + +local M = TwoDouDiZhu_GameController + +function M.new() + setmetatable(M, {__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("二人斗地主") + self.class = "TwoDouDiZhu_GameController" + return self +end + +function M:init(name) + GameController.init(self, name) + self:RegisterEvt() +end + +-- 事件注册 +function M:RegisterEvt() + self._eventmap[TwoDouDiZhu_Protocol.TwoDouDiZhu_Ming_Card] = self.OnMingCard + self._eventmap[TwoDouDiZhu_Protocol.TwoDouDiZhu_Init_Card] = self.OnInitCard + self._eventmap[TwoDouDiZhu_Protocol.TwoDouDiZhu_Options] = self.OnOptions + self._eventmap[TwoDouDiZhu_Protocol.TwoDouDiZhu_Index_Move] = self.OnIndexMove + self._eventmap[TwoDouDiZhu_Protocol.TwoDouDiZhu_Play_Succ] = self.OnPlaySucc + self._eventmap[TwoDouDiZhu_Protocol.TwoDouDiZhu_Put_Error] = self.OnPutError + self._eventmap[TwoDouDiZhu_Protocol.TwoDouDiZhu_Pass_Succ] = self.OnPassSucc + self._eventmap[TwoDouDiZhu_Protocol.TwoDouDiZhu_Result] = self.OnResult + self._eventmap[TwoDouDiZhu_Protocol.TwoDouDiZhu_Bomb_Score] = self.OnBombScore + self._eventmap[TwoDouDiZhu_Protocol.TwoDouDiZhu_Piao_Tip] = self.OnPiaoTip + self._eventmap[TwoDouDiZhu_Protocol.TwoDouDiZhu_Piao_Action] = self.OnPiaoAction + self._eventmap[TwoDouDiZhu_Protocol.TwoDouDiZhu_ConfirmToNextGameSucc] = self.OnConfrimToNextGameSucc + --self._eventmap[TwoDouDiZhu_Protocol.TwoDouDiZhu_Oener] = self.Oener + -- self._eventmap[Protocol.GAME_EVT_PLAYER_JOIN] = self.OnEventPlayerEnter + self._eventmap[TwoDouDiZhu_Protocol.PT_GAMETUOGUAN] = self.Game_TuoGuan + + -- GAME_EVT_ALERT_JIAO_DIZHU = "2041", --通知玩家叫地主 + -- GAME_EVT_USER_JAIO_DIZHU_REQ = "2042", --玩家叫地主 叫/不叫 + -- GAME_EVT_USER_ALERT_QIANG_DIZHU = "2043", --通知玩家抢地主 + -- GAME_EVT_USER_QIANG_DIZHU_REQ = "2044", --玩家抢地主 抢/不抢 + + self._eventmap[TwoDouDiZhu_Protocol.GAME_EVT_ALERT_JIAO_DIZHU] = self.OnAlertJiaoDiZhu + self._eventmap[TwoDouDiZhu_Protocol.GAME_EVT_USER_ALERT_QIANG_DIZHU] = self.OnUserAlertQiangDiZhu + self._eventmap[TwoDouDiZhu_Protocol.GAME_EVT_USEr_JIAO_DIZHU_RSP] = self.OnUserJiaoDiZhu + + self._eventmap[TwoDouDiZhu_Protocol.GAME_EVT_USER_QIANG_DIZHU_RSP] = self.OnUserQiangDiZhu + + self._eventmap[TwoDouDiZhu_Protocol.GAME_EVT_DIZHU_INFO] = self.OnDiZhuInfo + + self._eventmap[TwoDouDiZhu_Protocol.GAME_EVT_DIZHU_RANG_XIAN_RSP] = self.OnRangXian + + + +end +-- function M:Oener(evt_data) +-- local seat = evt_data["owner"] +-- self._cacheEvent:Enqueue(function() + +-- DispatchEvent(self._dispatcher,TwoDouDiZhu_GameEvent.Oener,seat) +-- end) +-- end +-- function M:OnEventPlayerEnter(evt_data) +-- local p = self._room:NewPlayer() +-- local _user + +-- _user = User.new() +-- _user.account_id = evt_data["aid"] +-- _user.host_ip = evt_data["ip"] +-- _user.nick_name = evt_data["nick"] +-- _user.head_url = evt_data["portrait"] +-- _user.sex = evt_data["sex"] +-- _user.location = Location.new(evt_data["pos"] or "") +-- p.seat = evt_data["seat"] +-- p.ready = evt_data["ready"] == 1 and true or false +-- p.self_user = _user +-- p.line_state = 1 +-- p.total_score=evt_data["score"] +-- p.hp_info = evt_data["hp_info"] +-- -- p.total_score=self._room.room_config.energyTab==0 and evt_data["score"] or evt_data["score"]/10 + +-- DataManager.CurrenRoom:AddPlayer(p) +-- DispatchEvent(self._dispatcher,GameEvent.PlayerEnter, p) +-- end +function M:SendCard(cards,currentCard) + local _data = {} + _data["card"] = cards + _data["all_card"] = currentCard + printlog("出牌==========================") + pt(_data) + local _client = ControllerManager.GameNetClinet + _client:send(TwoDouDiZhu_Protocol.TwoDouDiZhu_Send_Card, _data) +end + +function M:SendPiao(piao) + local _data = {} + _data["id"] = piao + local _client = ControllerManager.GameNetClinet + _client:send(TwoDouDiZhu_Protocol.TwoDouDiZhu_Send_Piao, _data) +end + +function M:SendPass() + local _client = ControllerManager.GameNetClinet + _client:send(TwoDouDiZhu_Protocol.TwoDouDiZhu_Send_Guo) +end + +function M:SendInitCardEnd() + local _client = ControllerManager.GameNetClinet + _client:send(TwoDouDiZhu_Protocol.TwoDouDiZhu_Init_Card_End) +end + +function M:SendUserJiaoDiZhu(jiao) + local _data = {} + _data["jiao"] = jiao + local _client = ControllerManager.GameNetClinet + _client:send(TwoDouDiZhu_Protocol.GAME_EVT_USER_JAIO_DIZHU_REQ, _data) +end + +function M:SendUserQiangDiZhu(qiang) + local _data = {} + _data["qiang"] = qiang + local _client = ControllerManager.GameNetClinet + _client:send(TwoDouDiZhu_Protocol.GAME_EVT_USER_QIANG_DIZHU_REQ, _data) +end + +function M:SendUserRangXian() + local _client = ControllerManager.GameNetClinet + _client:send(TwoDouDiZhu_Protocol.GAME_EVT_DIZHU_RANG_XIAN) +end + +function M:OnAlertJiaoDiZhu(evt_data) + printlog("通知叫地主================================") + local seat = evt_data["seat"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnAlertJiaoDiZhu,seat) + end + ) +end + +function M:OnUserJiaoDiZhu(evt_data) + printlog("玩家叫地主广播 座位 jiao: 0-不叫 1-叫 count: 抢/叫次数================================") + local seat = evt_data["seat"] + local jiao = evt_data["jiao"] + local count = evt_data["count"] + local curMul = evt_data["curMul"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnUserJiaoDiZhu, seat,jiao,count,curMul) + end + ) +end + +function M:OnUserAlertQiangDiZhu(evt_data) + printlog("通知玩家抢地主===========================") + local seat = evt_data["seat"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnUserAlertQiangDiZhu, seat) + end + ) +end + +function M:OnUserQiangDiZhu(evt_data) + printlog("玩家抢地主广播 seat:座位号 qiang: 0-不抢 1-抢 count: 抢/叫次数================================") + local seat = evt_data["seat"] + local qiang = evt_data["qiang"] + local count = evt_data["count"] + + local rangCount = evt_data["rangCount"] + local leftCount = evt_data["leftCount"] + local curMul = evt_data["curMul"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnUserQiangDiZhu, seat,qiang,count,rangCount,leftCount,curMul) + end + ) +end + +function M:OnDiZhuInfo(evt_data) + printlog("定地主================================") + local seat = evt_data["seat"] + local cards = evt_data["cards"] + local mul = evt_data["mul"] + local rangCount = evt_data["rangCount"] + local curMul = evt_data["curMul"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnDiZhuInfo, seat,cards,mul,rangCount,curMul) + end + ) +end + +function M:OnRangXian(evt_data) + local seat = evt_data["seat"] + local rangCount = evt_data["rangCount"] + local curMul = evt_data["curMul"] + local leftCount = evt_data["leftCount"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnRangXian, seat,rangCount,curMul,leftCount) + end + ) +end + + +function M:ConformToNextGame() + local _client = ControllerManager.GameNetClinet + _client:send(TwoDouDiZhu_Protocol.TwoDouDiZhu_ConfirmToNextGame) +end + +function M:OnMingCard(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local card = evt_data["mingpai"] + self._cacheEvent:Enqueue( + function() + self._room.ming_card = card + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnMingCard, card) + end + ) +end + +function M:OnInitCard(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local cardlist = evt_data["cards"] + local round = evt_data["round"] + self._cacheEvent:Enqueue( + function() + for _, player in ipairs(self._room.player_list) do + player:Clear() + player.hand_count = #cardlist + end + + self._room.curren_round = round + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnInitCard, round, cardlist) + end + ) +end + +function M:OnBombScore(evt_data) + local scoreList = evt_data["gold_list"] + self._cacheEvent:Enqueue( + function() + for i = 1, #scoreList do + local score = scoreList[i].bom_score + local player = self._room:GetPlayerById(scoreList[i].aid) + player.total_score = player.total_score + score + end + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnBombScore, scoreList) + end + ) +end + +function M:OnPlaySucc(evt_data) + local seat = evt_data["player"] + local card_obj = evt_data["card_obj"] + local cards = card_obj["card_list"] + local remain = evt_data["remain"] -- 报单 + local curMul = evt_data["curMul"] + + local rangCount = evt_data["rangCount"] + local leftCount = evt_data["leftCount"] + printlog("出牌成功==========================") + pt(evt_data) + self._cacheEvent:Enqueue( + function() + local otherList = self:GetOtherSeatList(seat) + local player = self._room:GetPlayerBySeat(seat) + local out_card_list = self:ChangeCodeByFrom(cards, true) + player.hand_count = remain + local card_type, number, length, plan_three_count = self:GetCardListInfo(out_card_list) + player.out_card_list = self:GetSortOutCardList(out_card_list, card_type, number, plan_three_count) + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnPlaySucc, player, remain, card_type, number, otherList,length,rangCount,leftCount,curMul) + end + ) +end + +function M:OnPassSucc(evt_data) + printlog("pass成功=================================") + local seat = evt_data["seat"] + self._cacheEvent:Enqueue( + function() + local p = self._room:GetPlayerBySeat(seat) + p.out_card_list = {0} + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnPassSucc, p) + end + ) +end + +function M:OnPutError(evt_data) + local code = evt_data["error"] + printlog("出牌异常========================") + pt(evt_data) + self._cacheEvent:Enqueue( + function() + local error_str = self:GetErrorStr(code) + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnErrorTip, error_str) + end + ) +end +function M:TuoGuan(isTuo) + local _data = {} + _data["tuoguan"] = isTuo + local _client = ControllerManager.GameNetClinet + _client:send(TwoDouDiZhu_Protocol.SEND_TUOGUAN, _data) +end + +function M:Game_TuoGuan(evt_data) + local tuoguan = evt_data["tuoguan"] + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.Game_TuoGuan, tuoguan, seat) + end) +end +function M:OnIndexMove(evt_data) + local seat = evt_data["index"] + self._cacheEvent:Enqueue( + function() + self._room.curren_turn_seat = seat + self._room.is_new_bout = self:GetIsNewBout(seat) + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnIndexMove, seat) + end + ) +end + +function M:OnOptions(evt_data) + + local play = evt_data["play"] + local pass = evt_data["pass"] + local rang = evt_data["rang"] + local isCanPass = evt_data["isCanPass"] + local rangCount = evt_data["rangCount"] + local leftCount = evt_data["leftCount"] + printlog("出牌提示==========================") + pt(evt_data) + self._cacheEvent:Enqueue( + function() + local lastCardList = self:GetLastCardList(self._room.self_player.seat) + local cardType, cardNum, cardLength = self:GetCardListInfo(lastCardList) + + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnOptions, play, cardType, cardNum, cardLength, pass,rang,isCanPass,rangCount,leftCount) + end + ) +end + +function M:OnPiaoTip(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local piao = evt_data["piao"] + local reload = evt_data["reload"] + self._cacheEvent:Enqueue( + function() + + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnPiaoTips, piao,reload) + end + ) +end + +function M:OnPiaoAction(evt_data) + local seat = evt_data["seat"] + local piao = evt_data["piao"] + + self._cacheEvent:Enqueue( + function() + + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnPiaoAction, seat,piao) + end + ) +end + +function M:OnResult(evt_data) + local result_type = evt_data["type"] + + local info = evt_data["info"] + local winseat = evt_data["winseat"] + local remaincards = evt_data["remaincards"] + local feiCards = evt_data["feiCards"] + printlog("结算====================================") + pt(evt_data) + if result_type == 1 then + local over = 1 + ControllerManager.SetGameNetClient(nil, true) + self._cacheEvent:Enqueue( + function() + for i = 1, #info do + local p = self._room:GetPlayerBySeat(info[i]["seat"]) + p.total_score = info[i]["score"] + info[i]["self_user"] = p.self_user + end + + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnResult, over, info, winseat, remaincards,feiCards) + end + ) + elseif result_type == 0 then + local over = 0 + self._cacheEvent:Enqueue( + function() + for i = 1, #info do + local p = self._room:GetPlayerBySeat(info[i]["seat"]) + p.total_score = info[i]["score"] + info[i]["self_user"] = p.self_user + end + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnResult, over, info, winseat, remaincards,feiCards) + end + ) + else + local dissolve = 1 + ControllerManager.SetGameNetClient(nil, true) + for i = 1, #info do + local p = self._room:GetPlayerBySeat(info[i]["seat"]) + p.total_score = info[i]["score"] + info[i]["self_user"] = p.self_user + end + -- ControllerManager.ChangeController(LoddyController) + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnResultByDissolve, over, info, winseat, dissolve) + end +end + +function M:OnConfrimToNextGameSucc(evt_data) + local aid = evt_data["aid"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.OnConfrimToNextGameSucc, aid) + end + ) +end +function M:Game_TuoGuan(evt_data) + local tuoguan = evt_data["tuoguan"] + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher, TwoDouDiZhu_GameEvent.Game_TuoGuan, tuoguan, seat) + end) +end +function M:ChangeCodeByFrom(cardList, isSort) + isSort = isSort or false + local new_card_list = {} + for i = 1, #cardList do + local flower = math.floor(cardList[i] / 100) + local number = cardList[i] % 100 + if number == 2 then + number = 15 + end + local card = number * 10 + flower + new_card_list[#new_card_list + 1] = card + end + return isSort == true and table.sort(new_card_list) or new_card_list +end + +function M:GetOtherSeatList(seat) + local list = {} + for i = 1, self._room.room_config.people_num do + if seat ~= i then + list[#list + 1] = i + end + end + return list +end + +-- +function M:GetIsNewBout(seat) + local passCount = 0 + for i = 1, #self._room.player_list do + local player = self._room.player_list[i] + if seat ~= player.seat then + local isPass = self:GetIsPass(player.out_card_list) + if isPass then + passCount = passCount + 1 + end + end + end + if passCount == self._room.room_config.people_num - 1 then + return true + else + return false + end +end + +function M:GetLastSeat(seat) + local last_seat = seat - 1 + if last_seat < 1 then + last_seat = last_seat + self._room.room_config.people_num + end + return last_seat +end + +function M:GetLastCardList(seat) + local last_seat = self:GetLastSeat(seat) + local player = self._room:GetPlayerBySeat(last_seat) + local isPass = self:GetIsPass(player.out_card_list) + if isPass then + if self._room.room_config.people_num == 2 then + return {} + end + local last_seat_2 = self:GetLastSeat(last_seat) + local player_2 = self._room:GetPlayerBySeat(last_seat_2) + local isPass_2 = self:GetIsPass(player_2.out_card_list) + if isPass_2 then + return {} + else + return player_2.out_card_list + end + else + return player.out_card_list + end +end + +function M:GetErrorStr(code) + return TwoDouDiZhu_PutError[code + 1] +end + +function M:GetSortOutCardList(outCardList, cardType, cardNumber, plan_three_count) + if cardType == 3 or cardType == 5 or cardType == 6 then + local removeList = {} + for i = #outCardList, 1, -1 do + local card = outCardList[i] + if math.floor(card / 10) == cardNumber then + removeList[#removeList + 1] = card + table.remove(outCardList, i) + end + end + for i = 1, #removeList do + table.insert(outCardList, 1, removeList[i]) + end + elseif cardType >= 7 and cardType <= 9 then + local removeList = {} + for i = #outCardList, 1, -1 do + local card = outCardList[i] + if math.floor(card / 10) <= cardNumber and math.floor(card / 10) > cardNumber - plan_three_count then + removeList[#removeList + 1] = card + table.remove(outCardList, i) + end + end + for i = 1, #removeList do + table.insert(outCardList, 1, removeList[i]) + end + end + return outCardList +end + +--None = 0, +--OneCard = 1, +--OnePair = 2, +--Three = 3, +--Pairs = 4, +--ThreeAndTwo = 5, +--ThreeAndOne = 6, +--Plane = 7, +--PlaneAndTwo = 8, +--PlaneAndOne = 9, +--Straight = 10, +--Bomb = 11 +-- 牌型,大小, 长度 +function M:GetCardListInfo(cardlist) + + if #cardlist == 0 then + return 0, 0, 0, 0 + end + -- 检测牌型 + local card_type, card_num, card_length, plan_three_count = TwoDouDiZhu_CardType.None, 0, #cardlist, 0 + local card_map = self:GetCardMapByList(cardlist) + + if #cardlist == 1 then + card_type = TwoDouDiZhu_CardType.OneCard + card_num = math.floor(cardlist[1] / 10) + elseif #cardlist == 2 then + card_type = TwoDouDiZhu_CardType.OnePair + if (cardlist[1]) == 165 or (cardlist[1])==176 then + card_type = TwoDouDiZhu_CardType.HuoJian + end + card_num = math.floor(cardlist[1] / 10) + elseif #cardlist == 3 then + card_num = math.floor(cardlist[1] / 10) + if card_num==14 and DataManager.CurrenRoom.room_config.threeA==1 then + -- body + card_type = TwoDouDiZhu_CardType.Bomb + else + card_type = TwoDouDiZhu_CardType.Three + + end + + elseif #cardlist == 4 then + local max_key = 0 + for k, v in pairs(card_map) do + if #v == 4 then + card_type = TwoDouDiZhu_CardType.Bomb + card_num = k + elseif #v == 3 then + card_type = TwoDouDiZhu_CardType.ThreeAndOne + card_num = k + elseif #v == 2 then + if k > max_key then + max_key = k + end + card_type = TwoDouDiZhu_CardType.Pairs + card_num = max_key + end + end + elseif #cardlist == 5 then + local count, max_key = 0, 0 + for k, v in pairs(card_map) do + if #v >= 3 then + card_type = TwoDouDiZhu_CardType.ThreeAndTwo + card_num = k + elseif #v == 1 then + count = count + 1 + if k > max_key then + max_key = k + end + if count == 5 then + card_type = TwoDouDiZhu_CardType.Straight + card_num = max_key + end + end + end + elseif #cardlist == 7 then + local count, max_key = 0, 0 + for k, v in pairs(card_map) do + if #v >= 4 then + card_type = TwoDouDiZhu_CardType.FourAndtThree + card_num = k + elseif #v == 1 then + count = count + 1 + if k > max_key then + max_key = k + end + if count == 7 then + card_type = TwoDouDiZhu_CardType.Straight + card_num = max_key + end + end + end + else + local one_count, two_count, three_count = 0, 0, 0 + local max_one_key, max_two_key, max_three_key = 0, 0, 0 + + for k, v in pairs(card_map) do + + if #v == 2 then + + if k > max_two_key then + max_two_key = k + end + two_count = two_count + 1 + if two_count == #cardlist / 2 then + card_type = TwoDouDiZhu_CardType.Pairs + card_num = max_two_key + end + elseif #v == 1 then + + if k > max_one_key then + max_one_key = k + end + one_count = one_count + 1 + if one_count == #cardlist then + card_type = TwoDouDiZhu_CardType.Straight + card_num = max_one_key + end + elseif #v == 3 then + + if max_three_key == 0 then + max_three_key = k + three_count = three_count + 1 + elseif k > max_three_key and k == max_three_key + 1 then + max_three_key = k + three_count = three_count + 1 + elseif k < max_three_key and k == max_three_key - 1 then + max_three_key = k + three_count = three_count + 1 + -- else + -- max_three_key = k + end + + --three_count = three_count + 1 + end + end + -- plan_three_count = three_count + -- if three_count * 5 >= #cardlist then + -- card_type = TwoDouDiZhu_CardType.PlaneAndTwo + -- card_num = max_three_key + -- elseif three_count * 4 >= #cardlist then + -- card_type = TwoDouDiZhu_CardType.PlaneAndOne + -- card_num = max_three_key + -- elseif three_count * 3 >= #cardlist then + -- card_type = TwoDouDiZhu_CardType.Plane + -- card_num = max_three_key + -- end + plan_three_count = three_count + + if three_count * 3 == #cardlist then + card_type = TwoDouDiZhu_CardType.Plane + card_num = max_three_key + + elseif three_count * 4 >= #cardlist and #cardlist%4==0 then + card_type = TwoDouDiZhu_CardType.PlaneAndOne + card_num = max_three_key + + + elseif three_count * 5 >= #cardlist and #cardlist%5==0 then + card_type = TwoDouDiZhu_CardType.PlaneAndTwo + card_num = max_three_key + + + end + + + + end + + return card_type, card_num, card_length, plan_three_count +end + +function M:GetCardMapByList(cardlist) + local card_map = {} + for i = 1, #cardlist do + local card = cardlist[i] + local card_num = math.floor(cardlist[i] / 10) + if card_map[card_num] == nil then + card_map[card_num] = {card} + else + card_map[card_num][#card_map[card_num] + 1] = card + end + end + return card_map +end + +function M:GetIsPass(cardlist) + if #cardlist == 0 then + return true + end + if cardlist[1] ~= nil and cardlist[1] == 0 then + return true + end + return false +end + +--请求离开房间 +function M:LevelRoom(callBack) + local _client = ControllerManager.GameNetClinet + if not _client then + return + end + _client:send( + Protocol.GAME_EXIT_ROOM, + nil, + function(res) + if res.ReturnCode == 0 then + ControllerManager.ChangeController(LoddyController) + elseif res.ReturnCode == 27 then + ViewUtil.ErrorTip(res.ReturnCode, "退出房间失败!") + end + callBack(res) + end + ) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_GameEvent.lua b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_GameEvent.lua new file mode 100644 index 00000000..123584b3 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_GameEvent.lua @@ -0,0 +1,29 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:55 +--- +local TwoDouDiZhu_GameEvent = { + OnMingCard = "OnMingCard", + OnInitCard = "OnInitCard", + OnOptions = "OnOptions", + OnPiaoTips = "OnPiaoTips", + OnPiaoAction = "OnPiaoAction", + OnBombScore = "OnBombScore", + OnIndexMove = "OnIndexMove", + OnPlaySucc = "OnPlaySucc", + OnErrorTip = "OnErrorTip", + OnPassSucc = "OnPassSucc", + OnResult = "OnResult", + OnResultByDissolve = "OnResultByDissolve", + OnConfrimToNextGameSucc = "OnConfrimToNextGameSucc", + Game_TuoGuan="Game_TuoGuan", + + OnAlertJiaoDiZhu = "OnAlertJiaoDiZhu", + OnUserJiaoDiZhuReq = "OnUserJiaoDiZhuReq", + OnUserJiaoDiZhu = "OnUserJiaoDiZhu", + OnUserQiangDiZhu = "OnUserQiangDiZhu", + OnUserAlertQiangDiZhu = "OnUserAlertQiangDiZhu", + OnDiZhuInfo = "OnDiZhuInfo", + OnRangXian = "OnRangXian", +} +return TwoDouDiZhu_GameEvent \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_MainView.lua b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_MainView.lua new file mode 100644 index 00000000..f7387cf7 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_MainView.lua @@ -0,0 +1,1708 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/18 9:41 +--- +local PKMainView = import("main.poker.PKMainView") +local TwoDouDiZhu_PlayerPokerInfoView = import(".TwoDouDiZhu_PlayerPokerInfoView") +local TwoDouDiZhu_PlayerSelfPokerInfoView = import(".TwoDouDiZhu_PlayerSelfPokerInfoView") +local TwoDouDiZhu_GameEvent = import(".TwoDouDiZhu_GameEvent") +local TwoDouDiZhu_ResultView = import(".TwoDouDiZhu_ResultView") +local TwoDouDiZhu_RightPanelView = import(".TwoDouDiZhu_RightPanelView") +local PlayerInfoView = import(".EXPlayerInfoView") +local TableBG = import('Game.Data.TableBG') +local M = {} +function M.new() + setmetatable(M, {__index = PKMainView}) + local self = setmetatable({}, {__index = M}) + self.class = "TwoDouDiZhu_MainView" + self:init() + self._gamectr = ControllerManager.GetController(GameController) + return self +end + +local default_bg = 1 +local bg_config = { + {id = 1, url = 'extend/poker/twodoudizhu/bg/bg1', thumb = 'ui://Extend_Poker_TwoDouDiZhu/table_bg1'}, + {id = 2, url = 'extend/poker/twodoudizhu/bg/bg2', thumb = 'ui://Extend_Poker_TwoDouDiZhu/table_bg2'}, + {id = 3, url = 'extend/poker/twodoudizhu/bg/bg3', thumb = 'ui://Extend_Poker_TwoDouDiZhu/table_bg3'} +} + +local GameState = { + ROOM_STATUS_INIT = 1, --初始化 + ROOM_STATUS_FAPAI = 2, --发牌 + ROOM_STATUS_JIAO_DIZHU = 3, --叫地主 + ROOM_STATUS_QIANG_DIZHU = 4, --抢地主 + ROOM_STATUS_CHUPAI = 5, --出牌中 + ROOM_STATUS_FINISH = 6, +} + +function M:InitView(url) + local room = self._room + UIPackage.AddPackage("extend/poker/twodoudizhu/ui/Extend_Poker_TwoDouDiZhu") + printlog("============================",room.room_config.people_num) + PKMainView.InitView(self, "ui://Extend_Poker_TwoDouDiZhu/TwoDouDiZhu_Main_" .. room.room_config.people_num,nil,1,default_bg,bg_config,nil,"ui://Extend_Poker_TwoDouDiZhu/SettingWindow1") + local _room = DataManager.CurrenRoom + local user_id = DataManager.SelfUser.account_id + + local json_data = Utils.LoadLocalFile(user_id.._room.game_id.."pai") + if json_data == nil then + local _gamectr = self._gamectr + self._room.pai = 0 + else + local _data = json.decode(json_data) + local pai = _data["pai"] + self._room.pai = pai + end + + self.three = self._view:GetChild("three") + self.threeBei = self.three:GetChild("n9") + self.threeBei1 = self.three:GetChild("n10") + self.threeBei.text = "0" + self.threeBei1.text = "" + self.three.visible = false + self:UpThree({0,0,0}) + + json_data = Utils.LoadLocalFile(user_id.._room.game_id.."cardsize") + if json_data == nil then + local _gamectr = self._gamectr + self._room.cardsize = 1 + else + local _data = json.decode(json_data) + local cardsize = _data["cardsize"] + self._room.cardsize = cardsize + end + + + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem, self) + tem.visible = false + end + local list = self._room.player_list + for i=1,#list do + local p = list[i] + local info = _player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + end + + + local rightpanel = self._view:GetChild("right_panel") + if self._rightPanelView ~= nil then + self._rightPanelView:Destroy() + end + + self._rightPanelView = TwoDouDiZhu_RightPanelView.new(self, rightpanel) + for i=1,#self._room.player_list do + + if self._room.self_player.seat==self._room.player_list[i].seat and self._room.self_player.self_user.account_id ~= self._room.player_list[i].self_user.account_id then + -- body + local ErrorMsgTip = UIPackage.CreateObject("Common", "Win_ConnectTip") + local _action = self._view:AddChild(ErrorMsgTip) + _action.xy = Vector2((self._view.width - _action.width) / 4, self._view.height / 4) + local text = _action:GetChild("tex_message") + local btn1 = _action:GetChild("btn_connect") + local btn2 = _action:GetChild("btn_back") + text.text = "您来晚了,座位有人,请重新进牌桌" + btn1.visible=false + btn2:Center() + btn2.y=btn2.y+50 + btn2.onClick:Set(function() + -- body + ErrorMsgTip:Destroy() + ErrorMsgTip = nil + self._gamectr:LevelRoom(function(res) + ViewUtil.CloseModalWait() + NetResetConnectWindow.CloseNetReset() + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + end) + end + end + + if self._room.hpOnOff == 1 and self._room.score_times ~= 1 then + -- body + self._view:GetChild("roominfo_panel1"):GetChild("tex_beishu").text=self._room.score_times .."倍" + else + self._view:GetChild("roominfo_panel1"):GetChild("tex_beishu").text="" + end + + self.ctr_state = self._view:GetController("state") + self._ctr_action = self._view:GetController("action") + self._tex_leftTime = self._view:GetChild("time"):GetChild("title") + self.ctr_time = self._view:GetController("time") + self._text_round = self._view:GetChild("round") + self.ctr_card_eff = self._view:GetController("card_eff") + self._player_card_info = {} + + local _player_card_info = self._player_card_info + for i = 1, room.room_config.people_num do + local tem = self._view:GetChild("player_card_info_" .. i) + _player_card_info[i] = self:NewPlayerCardInfoView(tem, i) + end + + local list = room.player_list + if not room.self_player.ready then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 0 + end + self._left_time = 0 + self.bgm_index = 1 + local state = self._room.CurnrenState + + if room.CurnrenState ~= StateType.PalyingWait then + self._state.selectedIndex = state + if room.CurnrenState == StateType.Palying then + self:ReConnectForStart() + end + else + + self._state.selectedIndex = StateType.Palying + self:ReconnectForClearing() + + end + --local tempdsaf=self._view:GetChild("btn_back_jiesan") + --tempdsaf:GetChild("n3").displayObject.gameObject:SetActive(false) + --self._view:GetChild("btn_back_jiesan").displayObject.gameObject:SetActive(false + + self._view:GetChild("btn_back_jiesan").onClick:Set(function () + if self.dismiss_room_cd_time > 0 then + ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!") + else + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:AskDismissRoom() + end + + end) + + self:ChangeBgmMusic() + self:EventInit() + + self._view:GetChild("mask").onClick:Set(function() + self:ResetPoker() + end) + local btn_rule = self._view:GetChild("right_panel"):GetChild("btn_log") + self._view:GetChild('info_text'):GetChild('text').text = room.room_config:GetDes() + + if self._view:GetChild("shengyu")~=nil then + -- body + + if room.room_config.Leaf==1 then + -- body + self._view:GetChild("shengyu"):GetChild("shengyu").text="剩余15张" + else + self._view:GetChild("shengyu"):GetChild("shengyu").text="剩余16张" + end + end + + self.tips = self._view:GetChild("tips") + self.tips.visible = false + self.tipsContent = "你让[color=#ff0000]%s[/color]张牌,对手再出[color=#ff0000]%s[/color]张牌可胜利" + self.dizhuSeat = -1 + -- self.test = self._view:GetChild("test") + -- self.test.onClick:Set(function() + -- self.otherpoker_list = self._view:GetChild("otherpoker_list") + + -- local feiCards = {101,102} + -- if feiCards~= nil then + -- for i=1,#feiCards do + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/ddz_poker_"..feiCards[i]) + -- self.otherpoker_list:AddChild(card_code_obj) + -- end + -- end + + -- -- self._player_card_info[1]:ChongXuan() + -- end) + + -- self.test1 = self._view:GetChild("test1") + -- self.test1.onClick:Set(function() + + -- self._player_card_info[1]:AddThree({101,102,103,408,307,207,208,106},{101,102,103}) + -- end) + -- printlog(" self.ctr_state.selectedIndex ", self.ctr_state.selectedIndex) +end + +function M:UpThree(cards) + printlog("显示地主三张牌======================") + pt(cards) + local Icon1 = self.three:GetChild("n0") + local Icon2 = self.three:GetChild("n1") + local Icon3 = self.three:GetChild("n2") + Icon1.icon = "ui://Extend_Poker_TwoDouDiZhu/ddz_poker_"..cards[1] + Icon2.icon = "ui://Extend_Poker_TwoDouDiZhu/ddz_poker_"..cards[2] + Icon3.icon = "ui://Extend_Poker_TwoDouDiZhu/ddz_poker_"..cards[3] +end + +function M:UpMul(mul) + self.threeBei.text = mul.."倍" + self.three.visible = true +end + +function M:UpMul1(mul) + if mul>1 then + self.threeBei1.text = mul.."倍" + end +end + +function M:UpdateCard( index ) + self._room.pai=index + local card_info = self._player_card_info[1] + -- for i=1,#self._room.player_list do + -- print(i) + -- end + card_info:updatePoker() + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + + if self._room.curren_turn_seat ~= player.seat then + if player.out_card_list[1] == 0 then + player_card_info:SetOutCardInfo(nil, true) + else + player_card_info:SetOutCardInfo(player.out_card_list, false) + end + end + end + if self.caozuo==1 then + local ctr_number = self.pass == nil and 2 or 1 + local lastCardList = self._gamectr:GetLastCardList(self._room.self_player.seat) + local cardType, cardNum, cardLength = self._gamectr:GetCardListInfo(lastCardList) + local m = false + local next_seat = self._room.self_player.seat + 1 + if next_seat > self._room.room_config.people_num then + next_seat = next_seat - self._room.room_config.people_num + end + if self._room:GetPlayerBySeat(next_seat).hand_count == 1 and self._room.room_config.WillBeOut == 1 then + m = true + end + local zdts = self._view:GetController("zidongtishi").selectedIndex + self._player_card_info[1]:ShowOutCardOption(ctr_number, cardType, cardNum, cardLength,m) + end +end + +function M:UpdateCardSize(index) + self._room.cardsize=index + local card_info = self._player_card_info[1] + card_info:updatePoker() +end + +function M:NewPlayerCardInfoView(tem, index) + if index == 1 then + return TwoDouDiZhu_PlayerSelfPokerInfoView.new(tem, self) + end + return TwoDouDiZhu_PlayerPokerInfoView.new(tem, self) +end + +function M:OnPlayerEnter(...) + MainView.OnPlayerEnter(self, ...) + local arg = {...} + local p = arg[1] + local index = self:GetPos(p.seat) + local info = self._player_info[index] + local selecet_seat = self._view:GetChild("seat_" .. index) + if selecet_seat ~= nil then + selecet_seat.visible = true + end + info:FillData(p) + if self._room.banker_seat == self._room.self_player.seat and self._room.self_player.ready then + self._ctr_action.selectedIndex = 0 + end +end + +function M:OnPlayerReady(...) + local arg = {...} + local p = arg[1] + local _room = self._room + local _player_info = self._player_info + if p.seat == _room.self_player.seat then + self._ctr_action.selectedIndex = 0 + end + local info = _player_info[self:GetPos(p.seat)] + info:Ready(true) +--local readyNum = 0 +--for i = 1, #_room.player_list do +-- local player = _room.player_list[i] +-- if player.ready then readyNum = readyNum + 1 end +--end +--if _room.banker_seat == _room.self_player.seat and readyNum > 1 and readyNum == _room.room_config.people_num then +-- if self._state.selectedIndex == 2 then +-- local _gamectr = ControllerManager.GetController(GameController) +-- _gamectr:StartGame() +-- end +-- --self._ctr_action.selectedIndex = 2 +--end +end + +function M:OnPlayerLeave(...) + MainView.OnPlayerLeave(self, ...) + local _room = self._room + if not _room.self_player.ready then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 0 + end +end + + +function M:EventInit() + local _gamectr = ControllerManager.GetController(GameController) + MainView.EventInit(self) + local _player_info = self._player_info + local _player_card_info = self._player_card_info + local _room = self._room + + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnAlertJiaoDiZhu, function(...) + local arg = {...} + local seat = arg[1] + printlog("自己座位号+++++++++++++++++",self._room.self_player.seat) + if seat == self._room.self_player.seat then + self._player_card_info[1]:ChangeSelfJiao(1) + end + local card_info = self._player_card_info[self:GetPos(seat)] + card_info:ChangeJiao(-1) + self:UpMul(0) + end) + + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnUserAlertQiangDiZhu, function(...) + local arg = {...} + local seat = arg[1] + if seat == self._room.self_player.seat then + self._player_card_info[1]:ChangeSelfJiao(2) + end + local card_info = self._player_card_info[self:GetPos(seat)] + card_info:ChangeJiao(-1) + end) + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnUserJiaoDiZhu, function(...) + local arg = {...} + local seat = arg[1] + local jiao = arg[2] + local count = arg[3]--ChangeJiao + local curMul = arg[4] + local card_info = self._player_card_info[self:GetPos(seat)] + self:UpMul(curMul) + if seat == self._room.self_player.seat then + self._player_card_info[1]:ChangeSelfJiao(0) + end + local player1 = self._room:GetPlayerBySeat(seat) + if (jiao == 0) then + card_info:ChangeJiao(1) + self:PlaySound(player1.self_user.sex,"bujiao") + else + card_info:ChangeJiao(3) + self:PlaySound(player1.self_user.sex,"jiaodizhu") + end + end) + + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnUserQiangDiZhu, function(...) + local arg = {...} + local seat = arg[1] + local qiang = arg[2] + local count = arg[3] + local curMul = arg[6] + local card_info = self._player_card_info[self:GetPos(seat)] + self:UpMul(curMul) + self.tips.text = string.format(self.tipsContent,arg[4],arg[5]) + self.tips.visible = true + if seat == self._room.self_player.seat then + self._player_card_info[1]:ChangeSelfJiao(0) + end + local player1 = self._room:GetPlayerBySeat(seat) + + if (qiang == 0) then + card_info:ChangeJiao(2) + self:PlaySound(player1.self_user.sex,"buqiang") + else + card_info:ChangeJiao(4) + self:PlaySound(player1.self_user.sex,"qiangdizhu") + end + end) + + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnDiZhuInfo, function(...) + local arg = {...} + local seat = arg[1] + local cards = arg[2] + local mul = arg[3] + local rangCount = arg[4] + local curMul = arg[5] + self:UpMul(curMul) + self:UpMul1(mul) + self.dizhuSeat = seat + local card_info = self._player_card_info[self:GetPos(seat)] + if seat == self._room.self_player.seat then + self._player_card_info[1]:AddThree(cards) + end + self:UpThree(cards) + local _player_card_info = self._player_card_info + for i = 1, self._room.room_config.people_num do + self._player_card_info[i]:ChangeJiao(-1) + end + if (self.dizhuSeat==self._room.self_player.seat) then + self.tipsContent = "你让[color=#ff0000]%s[/color]张牌,对手再出[color=#ff0000]%s[/color]张牌可胜利" + else + self.tipsContent = "你被让[color=#ff0000]%s[/color]张牌,你再出[color=#ff0000]%s[/color]张牌可胜利" + end + end) + + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnRangXian, function(...) + local arg = {...} + local seat = arg[1] + local rangCount = arg[2] + local curMul = arg[3] + local leftCount = arg[4] + self:UpMul(curMul) + self.tips.text = string.format(self.tipsContent,rangCount,leftCount) + -- if (seat==self._room.self_player.seat) then + -- self.tipsContent = "你让[color=#ff0000]%s[/color]张牌,对手再出[color=#ff0000]%s[/color]张牌可胜利" + -- else + -- self.tipsContent = "你被让[color=#ff0000]%s[/color]张牌,你再出[color=#ff0000]%s[/color]张牌可胜利" + -- end + end) + + + + + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnMingCard, function(...) + local arg = {...} + local card = arg[1] + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 1 + self:PlayCardEff(card) + end) + + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnInitCard, function(...) + self.three.visible = false + local arg = {...} + local round = arg[1] + local cardlist = arg[2] + + printlog("发牌========================") + pt(cardlist) + if self.result_view ~= nil then + self.result_view:Destroy() + self.result_view = nil + end + + self._player_card_info[1]:HidePiao() + + if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + self.MypokerList = cardlist + end + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 0 + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + self:UpdateRound(round) + ViewUtil.PlaySound("TwoDouDiZhu_PK", "extend/poker/twodoudizhu/sound/fapai.mp3") + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local head_info = self._player_info[self:GetPos(p.seat)] + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + -- body + + if self._room.room_config.showlength==1 then + -- body + head_info._view:GetController("shengyu").selectedIndex=1 + else + head_info._view:GetController("shengyu").selectedIndex=0 + end + + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..p.hand_count.."张" + + + + end + p:Clear() + head_info:FillData(p) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:Clear() + head_info:Ready(false) + + if p.seat == self._room.self_player.seat then + if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + card_info:InitPoker(cardlist,true,1) + else + card_info:InitPoker(cardlist,true) + end + + else + --card_info:UpdateHandPoker(#cardlist,true,false) --todo + --card_info:UpdateRemainCard(#cardlist,true) + end + end + end) + + + -- _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.Oener,function ( ... ) + -- local arg = {...} + -- local seat = arg[1] + -- local head_info = self._player_info[self:GetPos(seat)] + -- head_info._view:GetController("Oener").selectedIndex=1 + -- end) + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnIndexMove, function(...) + local arg = {...} + local seat = arg[1] + local isNewBout = arg[2] + local index = self:GetPos(seat) + + self.ctr_time.selectedIndex = index + -- for i=1,#self._player_info do + -- if index==i then + -- -- body + -- local head_info = self._player_info[index] + -- head_info:MarkBank(true) + -- else + -- local head_info = self._player_info[i] + -- head_info:MarkBank(false) + -- end + -- end + + if index == 1 then + local card_info = self._player_card_info[index] + card_info:SetOutCardInfo(nil, false) + -- if self.MypokerList ~= nil then + -- -- body + -- card_info:Clear() + -- card_info:InitPoker(self.MypokerList, false) + -- self.MypokerList = nil + -- end + end + self._left_time = 20 + if self._room.ming_card ~= nil then + self._view:GetTransition("t" .. index):Play() + self._room.ming_card = nil + if self.tween ~= nil then + TweenUtils.Kill(self.tween) + self.tween = nil + end + end + end) + + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnBombScore, function(...) + local arg = {...} + local scoreList = arg[1] + -- for i = 1, #scoreList do + -- local player = self._room:GetPlayerBySeat(i) + -- local card_info = self._player_card_info[self:GetPos(i)] + -- local head_info = self._player_info[self:GetPos(i)] + -- card_info:PlayScore(scoreList[i], true) + -- head_info:UpdateScore(player.total_score) + -- end + end) + + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnPlaySucc, function(...) + local arg = {...} + local p = arg[1] + local card_number = arg[2] + local cardstype = arg[3] + local num = arg[4] + local otherList = arg[5] + local length = arg[6] + local curMul = arg[9] + self:UpMul(curMul) + self.ctr_time.selectedIndex = 0 + self.tips.text = string.format(self.tipsContent,arg[7],arg[8]) + self.tips.visible = true + local index = self:GetPos(p.seat) + if index==1 then + self.caozuo=0 + end + local head_info = self._player_info[index] + if head_info._view:GetChild("shengyu")~=nil then + -- body + -- body + if card_number~=nil then + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..card_number.."张" + end + + + end + local card_info = self._player_card_info[index] + card_info:SetOutCardInfo(p.out_card_list, false, true) + for i = 1, #otherList do + local other_seat = otherList[i] + local other_card_info = self._player_card_info[self:GetPos(other_seat)] + other_card_info:SetOutCardBlack() + end + if index == 1 then + card_info:DeleteHandCards(p.out_card_list) + else + card_info:SetRemainCardNumber(card_number == 1) + --card_info:UpdateHandPoker(card_number,false,false) -- todo + end + if self._room.is_new_bout == true then + for i = 1, #self._room.player_list do + local player = self._room.player_list[i] + local card_info_i = self._player_card_info[self:GetPos(player.seat)] + if p.seat ~= player.seat then + card_info_i:SetOutCardInfo(nil, false) + end + end + -- card_info:PlayCardTypeEff(cardstype) + -- if cardstype~=12 then + -- -- body + + + -- if cardstype==10 and length>=6 then + -- -- card_info_i + -- local chuan = UIPackage.CreateObject("Extend_Poker_TwoDouDiZhu", "chuan1") + -- local card_info_i = self._player_card_info[self:GetPos(p.seat)] + + -- card_info_i._mask_liangpai:AddChild(chuan) + -- chuan:GetChild("n0").asMovieClip.playing = true + -- ViewUtil.PlaySound("TwoDouDiZhu_PK", "extend/poker/paodekuai/sound/sunzi.mp3") + -- coroutine.start(function() + -- coroutine.wait(1.5) + -- if chuan~=nil then + -- -- body + -- chuan:Dispose() + -- end + + -- end) + + -- else + -- self:_Effect(cardstype, p) + -- end + -- end + self:_Effect(cardstype, p) + + else + if cardstype == 11 and cardstype~=12 then + self:_Effect(cardstype, p) + end + end + self:PlaySound(p.self_user.sex, self:GetSoundFileName(cardstype, num, self._room.is_new_bout)) + if card_number == 1 then + --self:ChangeBgmMusic(2) + self:ChangeBgmMusic(1) + if self._cor_sound ~= nil then + coroutine.stop(self._cor_sound) + end + self._cor_sound = nil + self._cor_sound = coroutine.start(function() + coroutine.wait(1) + self:PlaySound(p.self_user.sex, "card_1") + end) + end + + end) + + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnPassSucc, function(...) + local arg = {...} + local p = arg[1] + + self.ctr_time.selectedIndex = 0 + local card_info = self._player_card_info[self:GetPos(p.seat)] + + --card_info:SetOutCardInfo(nil, false) + if p.seat == self._room.self_player.seat and self.MypokerList ~= nil then + -- body + card_info:Clear() + card_info:InitPoker(self.MypokerList, false) + self.MypokerList = nil + end + card_info:SetOutCardInfo(nil, true) + self:PlaySound(p.self_user.sex, "buyao1") + end) + + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnErrorTip, function(...) + local arg = {...} + local error_str = arg[1] + self._player_card_info[1]:ErrorTip(error_str) + -- self._player_card_info[1]:ResetPoker() + end) + + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnPiaoTips, function(...) + local arg = {...} + local piao = arg[1] + local reload = arg[2] + if reload == 0 then + + if self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + self.MypokerList = cardlist + end + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + self.ctr_state.selectedIndex = 1 + self.ctr_card_eff.selectedIndex = 0 + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + self:UpdateRound(self._room.curren_round) + + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local head_info = self._player_info[self:GetPos(p.seat)] + + p:Clear() + head_info:FillData(p) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:Clear() + head_info:Ready(false) + head_info:UpdatePiao(-1) + end + end + + self._player_card_info[1]:ShowPiao(piao) + end) + + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnPiaoAction, function(...) + local arg = {...} + local seat = arg[1] + local piao = arg[2] + local head_info = self._player_info[self:GetPos(seat)] + head_info:UpdatePiao(piao) + end) + + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnOptions, function(...) + local arg = {...} + local play = arg[1] + local pass = arg[5] + local card_type = arg[2] + local card_number = arg[3] + local card_length = arg[4] + local rang = arg[6] + local isCanPass = arg[7] + local ctr_number = pass == nil and 2 or 1 + self.tips.text = string.format(self.tipsContent,arg[8],arg[9]) + self.tips.visible = true + if isCanPass == 1 then + ctr_number = 1 + else + ctr_number = 2 + end + if (rang == 1) then + ctr_number = 3 + end + self.caozuo=1 --记录是否是自己出牌的阶段 + self.pass=pass + local m = false + local next_seat = self._room.self_player.seat + 1 + local card_info = self._player_card_info[1] + --card_info:SetOutCardInfo(nil, false) + if self.MypokerList ~= nil then + -- body + card_info:Clear() + card_info:InitPoker(self.MypokerList, false) + self.MypokerList = nil + end + if next_seat > self._room.room_config.people_num then + next_seat = next_seat - self._room.room_config.people_num + end + if self._room:GetPlayerBySeat(next_seat).hand_count == 1 and self._room.room_config.WillBeOut == 1 then + m = true + end + local zdts = self._view:GetController("zidongtishi").selectedIndex + self._player_card_info[1]:ShowOutCardOption(ctr_number, card_type, card_number, card_length,m,play,zdts) + end) + -- 托管 + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.Game_TuoGuan, function(...) + local arg = {...} + local tuoguan = arg[1] + local seat = arg[2] + + local tuoguanzhong = self._view:GetChild("tuoguanzhong") + local zhezhao = self._view:GetChild("n109") + local head_info = self._player_info[self:GetPos(seat)] + if (tuoguan == 1) then + if (seat == self._room.self_player.seat ) then + tuoguanzhong.visible = true + -- tuoguanzhong.sortingOrder = 2 + zhezhao.visible = true + zhezhao.onClick:Set(function() + _gamectr:TuoGuan(0) + end) + else + head_info._view:GetController("tuoguan").selectedIndex = 1 + end + -- if self.ispanguangzhe == true then + -- -- body + -- zhezhao.visible = false + -- end + else + if (seat == self._room.self_player.seat) then + tuoguanzhong.visible = false + zhezhao.visible = false + -- local btn_tuoguan = self._view:GetChild("n107") + -- btn_tuoguan.onClick:Set(function() + -- _gamectr:TuoGuan(1) + -- -- self:ZhiNengtuoguan() + -- end) + else + head_info._view:GetController("tuoguan").selectedIndex = 0 + end + end + end) + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnResult, function(...) + + local arg = {...} + local over = arg[1] + local info = arg[2] + local win_seat = arg[3] + local remaincards = arg[4] + -- local energyTab = arg[5] + local feiCards = arg[5] + local otherpoker_list = self._view:GetChild("otherpoker_list") + self.tips.visible = false + if self.MypokerList ~= nil then + -- body + local card_info = self._player_card_info[self:GetPos(self._room.self_player.seat)] + card_info:Clear() + card_info:InitPoker(self.MypokerList, false) + self.MypokerList = nil + end + if otherpoker_list ~= nil then + -- body + otherpoker_list:RemoveChildrenToPool() + otherpoker_list.visible=true + end + + if remaincards then + -- body + local newremaincards = _gamectr:ChangeCodeByFrom(remaincards,true) + table.sort(remaincards) + for i = #newremaincards, 1, -1 do + coroutine.start(function() + coroutine.wait(0.01) + + local flow = newremaincards[i] % 10 + local num = (newremaincards[i] - (newremaincards[i] % 10)) / 10 + local card_n = flow * 100 + num + local poker_item = UIPackage.CreateObject("Extend_Poker_TwoDouDiZhu", "poker6") + + --local code = self:ChangeCodeByTo(card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/" .. card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + local card_code_obj = nil + if DataManager.CurrenRoom.pai==0 then + if card_n==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..card_n.."_1") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..card_n) + end + + else + if card_n==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- body + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..card_n.."_2") + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + end + + end + if card_code_obj ~= nil then + card_code_obj:SetScale(0.6, 0.6) + if poker_item ~= nil then + poker_item:AddChild(card_code_obj) + otherpoker_list:AddChild(poker_item) + end + + end + + end) + + + end + + end + if self._cor_sound ~= nil then + coroutine.stop(self._cor_sound) + self._cor_sound = nil + end + + if self.destory_win ~= nil then + coroutine.stop(self.destory_win) + end + + if self.WinItem_view ~= nil then + self.WinItem_view:Dispose() + self.WinItem_view = nil + end + + self.destory_win = nil + self.destory_win = coroutine.start(function() + -- print("11111111111111") + -- coroutine.wait(1) + if self:IsChunTian(info) then + local url = "ui://Extend_Poker_TwoDouDiZhu/Spring" + self.WinItem_view = UIPackage.CreateObjectFromURL(url) + self._view:AddChild(self.WinItem_view) + self.WinItem_view:Center() + self.WinItem_view:GetTransition("t0"):Play() + ViewUtil.PlaySound("TwoDouDiZhu_PK", "base/common/sound/win new.mp3") + end + + if self:IsFanChun(info) then + local url = "ui://Extend_Poker_TwoDouDiZhu/Spring1" + self.WinItem_view = UIPackage.CreateObjectFromURL(url) + self._view:AddChild(self.WinItem_view) + self.WinItem_view:Center() + self.WinItem_view:GetTransition("t0"):Play() + ViewUtil.PlaySound("TwoDouDiZhu_PK", "base/common/sound/win new.mp3") + end + --printlog("====================fanchun======================",self:IsChunTian(info),self:IsFanChun(info)) + coroutine.wait(1) + if self._room.self_player.seat == win_seat then + + -- local sprint_seat_list = self:GetSpringSeats(info) + -- if #sprint_seat_list > 0 then + -- local url = "ui://Extend_Poker_TwoDouDiZhu/Spring" + -- self.WinItem_view = UIPackage.CreateObjectFromURL(url) + -- self._view:AddChild(self.WinItem_view) + -- self.WinItem_view:Center() + -- self.WinItem_view:GetTransition("t0"):Play() + -- ViewUtil.PlaySound("TwoDouDiZhu_PK", "base/common/sound/win new.mp3") + -- end + -- local url = #sprint_seat_list > 0 and "ui://Extend_Poker_TwoDouDiZhu/Spring" or "ui://Extend_Poker_TwoDouDiZhu/Win_Mine" + + + else + local beigang = false + if #self:GetSpringSeats(info)>0 then + for i=1,#self:GetSpringSeats(info) do + if self:GetSpringSeats(info)[i]==self._room.self_player.seat then + -- local url = "ui://Extend_Poker_TwoDouDiZhu/spring2" + -- self.WinItem_view = UIPackage.CreateObjectFromURL(url) + -- self._view:AddChild(self.WinItem_view) + -- self.WinItem_view:Center() + -- self.WinItem_view:GetTransition("t0"):Play() + beigang=true + end + end + + end + -- if beigang == false then + -- self:CreateRankEff() + -- end + + end + for i = 1, #info do + local player = info[i] + local p = self._room:GetPlayerBySeat(player.seat) + local head_info = self._player_info[self:GetPos(player.seat)] + local card_info = self._player_card_info[self:GetPos(player.seat)] + if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then + p.hp_info = player.hp_info + head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) + head_info._view:GetChild('zhanji').visible = true + local num = player.hp_info.total_hp + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = "+" .. d2ad(player.hp_info.total_hp) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + end + card_info:PlayScore(d2ad(player.hp_info.round_actual_hp), false, win_seat == player.seat) + else + local rt = 1 + if self._room.hpOnOff == 1 then + rt = self._room.score_times + end + if over == 1 and self._room.hpOnOff == 1 then + head_info:UpdateScore(player.score / 10) --不可负分 + else + head_info:UpdateScore(player.score * rt) + end + card_info:PlayScore(player.winscore * rt, false, win_seat == player.seat) + end + + + if player.seat ~= self._room.self_player.seat then + card_info:UpdateHandPoker(player.cards, false, true) + card_info:SetRemainCardNumber(false) + end + end + self:ChangeBgmMusic(1) + -- if over == 0 then + -- if #self:GetSpringSeats(info) > 0 then + -- -- print("222222222222222222") + -- coroutine.wait(1) + -- else + -- -- print("333333333333333333") + -- -- coroutine.wait(2) + -- end + + self.result_view = TwoDouDiZhu_ResultView.new(self._root_view, info, self._room.room_id, over, win_seat, 0, remaincards,feiCards) + self.result_view:Show() + if self.WinItem_view ~= nil then + self.WinItem_view:Dispose() + self.WinItem_view = nil + end + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + + if self._room.self_player.entrust == true then + local btn_confirm = self.result_view._view:GetChild("btn_confirm") + btn_confirm.onClick:Call() + end + + -- local _actionView = UIPackage.CreateObject("Common", "Btn_Yellow") + -- _actionView.icon = "ui://Common/btn_comfirm" + -- _actionView.onClick:Set(function () + -- --local _gamectr = ControllerManager.GetController(GameController) + -- _gamectr:ConformToNextGame() + -- _actionView:Dispose() + -- end) + -- _actionView.xy = Vector2(900, 625) + -- self._view:AddChild(_actionView) + -- else + -- coroutine.wait(4) + -- self.result_view = TwoDouDiZhu_ResultView.new(self._root_view,info,self._room.room_id) + -- self.result_view:Show() + -- end + end) + if over==1 then + -- body + self:UnmarkSelfTuoguan() + ControllerManager.ChangeController(LoddyController) + + end + + self.threeBei.text = "0" + self.threeBei1.text = "" + self.three.visible = false + self:UpThree({0,0,0}) + end) + + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnResultByDissolve, function(...) + + local arg = {...} + local over = arg[1] + local info = arg[2] + local winseat = arg[3] + local dissolve = arg[4] + + self.result_view = TwoDouDiZhu_ResultView.new(self._root_view, info, self._room.room_id, over, winseat, dissolve,nil) + self.result_view:Show() + ControllerManager.ChangeController(LoddyController) + self:UnmarkSelfTuoguan() + end) + + -- 确定开始下一局 成功 + _gamectr:AddEventListener(TwoDouDiZhu_GameEvent.OnConfrimToNextGameSucc, function(...) + local arg = {...} + local aid = arg[1] + local p = self._room:GetPlayerById(aid) + if p.seat == self._room.self_player.seat then + if self.rank_view ~= nil then + self.rank_view:Dispose() + self.rank_view = nil + end + if self.destory_win ~= nil then + coroutine.stop(self.destory_win) + self.destory_win = nil + end + + if self.WinItem_view ~= nil then + self.WinItem_view:Dispose() + self.WinItem_view = nil + end + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + local player_head = self._player_info[self:GetPos(player.seat)] + player_card_info:Clear() + local otherpoker_list = self._view:GetChild("otherpoker_list") + if otherpoker_list ~= nil then + -- body + otherpoker_list.visible=false + otherpoker_list:RemoveChildrenToPool() + end + --player_head._view:GetController("Oener").selectedIndex=0 + end + end + local player_info = self._player_info[self:GetPos(p.seat)] + player_info:Ready(true) + end) +end + +function M:ReConnectForStart() + + local _gamectr = ControllerManager.GetController(GameController) + self._room.is_new_bout = _gamectr:GetIsNewBout(self._room.curren_turn_seat) + self._state.selectedIndex = 1 + self._view:GetController("time").selectedIndex = self:GetPos(self._room.curren_turn_seat) + + self:UpdateRound(self._room.curren_round) + for _, player in ipairs(self._room.player_list) do + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + local head_info = self._player_info[self:GetPos(player.seat)] + head_info:Ready(false) + + --如果是体力值不可负分模式 则显示当前的hp值 + if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then + head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) + head_info._view:GetChild('zhanji').visible = true + local num = player.hp_info.total_hp + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = '+' .. d2ad(player.hp_info.total_hp) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + end + else + local rt = 1 + if self._room.hpOnOff == 1 then + rt = self._room.score_times + end + head_info:UpdateScore(player.total_score * rt) + end + + head_info:UpdateLineState(player.line_state) + head_info:UpdatePiao(player.piao) + + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + -- body + + + if self._room.room_config.showlength==1 then + -- body + head_info._view:GetController("shengyu").selectedIndex=1 + else + head_info._view:GetController("shengyu").selectedIndex=0 + end + + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..player.hand_count.."张" + + + + end + if player.seat == self._room.self_player.seat then + if player.open ~= nil and player.open == 0 and self._room.room_config.people_num==3 and self._room.room_config.fangzuobi==1 then + -- body + self.MypokerList = player.hand_list + player_card_info:InitPoker(player.hand_list, false, 1) + + else + + player_card_info:InitPoker(player.hand_list, false) + end + + else + + player_card_info:SetRemainCardNumber(player.hand_count == 1) + if player.hand_count == 1 then + self.bgm_index = 2 + end + end + if self._room.curren_turn_seat ~= player.seat then + -- head_info:MarkBank(false) + if player.out_card_list[1] == 0 then + player_card_info:SetOutCardInfo(nil, false) + else + player_card_info:SetOutCardInfo(player.out_card_list, false) + end + else + -- head_info:MarkBank(true) + end + end + self:DuanXian() +end + +function M:ReconnectForClearing() + self:UpdateRound(self._room.curren_round) + local win_seat = 0 + --self.rank_view = self:CreateRankEff(self._room.winseat) + for _, player in ipairs(self._room.player_list) do + local head_info = self._player_info[self:GetPos(player.seat)] + local player_card_info = self._player_card_info[self:GetPos(player.seat)] + + --如果是体力值不可负分模式 则显示当前的hp值 + if player.hp_info ~= nil and player.hp_info.cur_hp ~= nil then + head_info:UpdateScore(d2ad(player.hp_info.cur_hp)) + head_info._view:GetChild('zhanji').visible = true + local num = player.hp_info.total_hp + if num > 0 then + head_info._view:GetController('text_color').selectedIndex = 0 + head_info._view:GetChild('text_jifen').text = '+' .. d2ad(player.hp_info.total_hp) + else + head_info._view:GetController('text_color').selectedIndex = 1 + head_info._view:GetChild('text_jifen').text = d2ad(player.hp_info.total_hp) + end + -- player_card_info:PlayScore(d2ad(player.hp_info.round_actual_hp)) + else + local rt = 1 + if self._room.hpOnOff == 1 then + rt = self._room.score_times + end + head_info:UpdateScore(player.total_score * rt) + -- player_card_info:PlayScore(player.winscore * rt, false, self._room.winseat) + end + + head_info:UpdateLineState(player.line_state) + --head_info._view:GetController("Oener").selectedIndex=0 + head_info:UpdatePiao(player.piao) + if head_info._view:GetChild("shengyu")~=nil and head_info._view:GetController("shengyu")~=nil then + -- body + + if self._room.room_config.showlength==1 then + -- body + head_info._view:GetController("shengyu").selectedIndex=1 + else + head_info._view:GetController("shengyu").selectedIndex=0 + end + + -- body + head_info._view:GetChild("shengyu"):GetChild("shengyu").text="剩"..player.hand_count.."张" + + end + + + if player.seat == self._room.self_player.seat then + + player_card_info:InitPoker(player.hand_list, false) + else + player_card_info:UpdateHandPoker(player.hand_list, false, true) + end + if player.out_card_list[1] == 0 then + + player_card_info:SetOutCardInfo(nil, false) + else + player_card_info:SetOutCardInfo(player.out_card_list, false) + end + end + win_seat=self._room.winseat + self._room.winseat = nil + + local remaincards = self._room.remaincards + if self._room.game_status==1 then + + + -- body + coroutine.start(function() + coroutine.wait(0.3) + + self.result_view = TwoDouDiZhu_ResultView.new(self._root_view, self._room.player_list, self._room.room_id, 0, win_seat,0,nil) + self.result_view:Show() + local card_info = self._player_card_info[1] + card_info._view:GetChild("out_card_list").visible=true + end) + if remaincards then + + local newremaincards = self._gamectr:ChangeCodeByFrom(remaincards,true) + + -- body + local otherpoker_list = self._view:GetChild("otherpoker_list") + + if otherpoker_list ~= nil then + -- body + otherpoker_list:RemoveChildrenToPool() + otherpoker_list.visible=true + end + + for i = #newremaincards, 1, -1 do + coroutine.start(function() + coroutine.wait(0.1 * (15 - i)) + + + local flow = newremaincards[i] % 10 + local num = (newremaincards[i] - (newremaincards[i] % 10)) / 10 + local card_n = flow * 100 + num + local poker_item = UIPackage.CreateObject("Extend_Poker_TwoDouDiZhu", "poker6") + + --local code = self:ChangeCodeByTo(card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/" .. card_n) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + local card_code_obj + -- if DataManager.CurrenRoom.pai==0 then + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..card_n) + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card_n .. "_2") + -- end + -- if card_n==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..card_n.."_1") + -- end + --printlog("======================== ",card_n) + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..card_n) + card_code_obj:SetScale(0.6, 0.6) + poker_item:AddChild(card_code_obj) + otherpoker_list:AddChild(poker_item) + end) + end + end + end + self:DuanXian() +end + +function M:DuanXian() + -- ROOM_STATUS_INIT = 1, --初始化 + -- ROOM_STATUS_FAPAI = 2, --发牌 + -- ROOM_STATUS_JIAO_DIZHU = 3, --叫地主 + -- ROOM_STATUS_QIANG_DIZHU = 4, --抢地主 + -- ROOM_STATUS_CHUPAI = 5, --出牌中 + -- ROOM_STATUS_FINISH = 6, + if (self._room.nineCards~=nil) then + end + if (self._room.threeCards~=nil) then + end + if (self._room.gameStatus~=nil) then + if(self._room.gameStatus == GameState.ROOM_STATUS_INIT) then + elseif (self._room.gameStatus == GameState.ROOM_STATUS_FAPAI) then + elseif (self._room.gameStatus == GameState.ROOM_STATUS_JIAO_DIZHU) then + if self._room.gameSeat == self._room.self_player.seat then + self._player_card_info[1]:ChangeSelfJiao(1) + end + elseif (self._room.gameStatus == GameState.ROOM_STATUS_QIANG_DIZHU) then + if self._room.gameSeat == self._room.self_player.seat then + self._player_card_info[1]:ChangeSelfJiao(2) + end + elseif (self._room.gameStatus == GameState.ROOM_STATUS_CHUPAI) then + if self._room.gameSeat == self._room.self_player.seat then + self._player_card_info[1]:ChangePutCardOption(1) + end + self:UpThree(self._room.threeCards) + self:UpMul(self._room.curMul) + self:UpMul1(self._room.threeCardMul) + end + end + if (self._room.nineCards~=nil) then + end +end + +function M:CreateRankEff() + self.rank_view = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/rank_eff") + self._view:AddChild(self.rank_view) + self.rank_view:Center() + self.rank_view:GetTransition("t0"):Play() +end + +function M:_Effect( type1 ,player) + -- body + + if type1 < 7 and type1 ~= 4 and type1 ~= 5 then + return + end + local eff_code = 0 + if type1 == 10 then + eff_code = 2 + elseif type1 == 11 or type1 == 13 then + eff_code = 3 + elseif type1 == 4 then + eff_code = 4 + elseif type1 == 12 then + return + elseif type1 == 5 then + eff_code = 5 + else + eff_code = 1 + end + local info = self._player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/eff_"..eff_code) + -- local effect = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/eff2_1") + effect.touchable = false + effect:GetTransition("t0"):Play() + -- effect:SetXY((self._view.width - effect.width) / 2,(self._view.hight - effect.hight) / 2) + if eff_code==3 then + self._view:AddChild(effect) + else + pNode:AddChild(effect) + end + + + if eff_code==1 then + self.eff_feiji = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/eff_feiji") + self._view:AddChild(self.eff_feiji) + self.eff_feiji:Center() + self.eff_feiji:GetTransition("t0"):Play() + end + if eff_code==3 then + effect:Center() + else + if self:GetPos(player.seat)== 1 then + effect.x,effect.y = 0,24 + else + effect.x,effect.y = 24,67 + end + end + + + -- effect:Center() + -- if eff_code ==3 then + -- coroutine.start(function() + -- coroutine.wait(1) + -- effect:Dispose() + -- end) + -- else + coroutine.start(function() + coroutine.wait(1) + if self.eff_feiji~=nil then + self.eff_feiji:Dispose() + end + effect:Dispose() + end) + -- end +end +-- function M:_Effect(type1, player) + -- if type1 < 7 and type1 ~= 4 then return end + -- local eff_code = 0 + -- if type1 == 10 then --顺子 + -- eff_code = 2 + -- elseif type1 == 11 then --炸 + -- eff_code = 3 + -- elseif type1 == 4 then --连对 + -- eff_code = 4 + -- else + -- eff_code = 6 + -- end + -- local info = self._player_card_info[self:GetPos(player.seat)] + -- local pNode = info._mask_liangpai + -- local effect = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/MovieClip" .. eff_code) + + -- effect.touchable = false + + -- --effect:SetXY((self._view.width - effect.width) / 2,(self._view.hight - effect.hight) / 2) + -- pNode:AddChild(effect) + -- if type1 == 10 then --顺子 + -- effect.x, effect.y = -400, -200 + -- elseif type1 == 11 then --炸 + -- effect.x, effect.y = -80, -225 + -- elseif type1 == 4 then --连对 + -- effect.x, effect.y = -400, -200 + -- else + -- effect.x, effect.y = -157, -140 + -- end + -- coroutine.start(function() + -- if type1== 10 or type1== 11 or type1== 4 then + -- -- body + -- coroutine.wait(2) + -- effect:Dispose() + -- else + -- coroutine.wait(1.2) + -- effect:Dispose() + -- end + + -- end) +-- if eff_code ==3 then +-- coroutine.start(function() +-- coroutine.wait(1) +-- effect:Dispose() +-- end) +-- else +-- coroutine.start(function() +-- coroutine.wait(2) +-- effect:Dispose() +-- end) +-- end +-- end + + +function M:UpdateRound(round) + local total_round = self._room.room_config.Times + self._text_round.text = string.format("%d / %d 局", round, total_round) +end + +function M:GetSoundFileName(type, num, isNewBout) + local fileName + if isNewBout then + if type > 6 or type == 4 then + if type == 8 or type == 9 then + type = 7 + end + fileName = tostring(type) + elseif type > 2 then + fileName = string.format("3_%d", num) + else + fileName = string.format("%d_%d", type, num) + end + else + math.randomseed(os.time()) + if type > 2 and type ~= 11 then + local r = math.random(1, 3) + fileName = "dani_" .. r + elseif type == 11 then + fileName = tostring(type) + else + fileName = string.format("%d_%d", type, num) + end + end + return fileName +end + +function M:IsChunTian(player_info) + local chun = false + for i = 1, #player_info do + local player = player_info[i] + if player.chuntian then + chun = true + break + end + end + return chun +end + +function M:IsFanChun(player_info) + local fanchun = false + for i = 1, #player_info do + local player = player_info[i] + if player.fanchun then + fanchun = true + break + end + end + return fanchun +end + +function M:GetSpringSeats(player_info) + local seat_list = {} + local card_max_length = 17--self._room.room_config.Leaf + 14 + for i = 1, #player_info do + local player = player_info[i] + if #player.cards == card_max_length then + seat_list[#seat_list + 1] = player.seat + end + end + return seat_list +end + +function M:PlayCardEff(card) + if self.cor_card_eff ~= nil then + coroutine.stop(self.cor_card_eff) + end + self.cor_card_eff = nil + local cor_time = 0.1 + self.cor_card_eff = coroutine.start(function() + self._popEvent = false + local eff = self._view:GetChild("poker_eff") + local poker_obj = eff:GetChild("poker") + local poker_back = eff:GetChild("di") + poker_back.visible = false + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/" .. card) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card .. "_2") + local card_code_obj + if DataManager.CurrenRoom.pai==0 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..card) + else + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. card .. "_2") + end + card_code_obj:SetScale(1, 1) + --poker_obj:AddChild(card_code_obj) + --card_code_obj.visible = true + self.tween = TweenUtils.TweenFloat(0, 2340, cor_time, function(x) + poker_back.rotationY = x + poker_obj.rotationY = -180 + x + local x_1 = x % 360 + if (x_1 > 90 and x_1 < 270) then + poker_obj.visible = true + poker_back.visible = false + else + poker_obj.visible = false + poker_back.visible = true + end + end) + coroutine.wait(1) + self._popEvent = true + end) + +end + +function M:ResetPoker() + -- if self._room.curren_turn_seat == self._room.self_player.seat then + -- self._player_card_info[1]:ResetPoker() + -- end + self._player_card_info[1]:ResetPoker() +end + +function M:PlaySound(sex, path) + + local sex_path = ViewUtil.Sex_Chat[sex]-- 1 男 2 女 + local sound_path = string.format("extend/poker/twodoudizhu/sound/%s/%s.mp3", sex_path, path) + ViewUtil.PlaySound("TwoDouDiZhu_PK", sound_path) +end + +function M:ChangeBgmMusic(bgm_index) + if bgm_index == nil then + bgm_index = self.bgm_index + else + self.bgm_index = bgm_index + end + ViewUtil.PlayMuisc("TwoDouDiZhu_PK", string.format("extend/poker/twodoudizhu/sound/bgm%d.mp3", 1)) +end +function M:OnPlayerEnter( ... ) + local arg = {...} + local p = arg[1] + for i=1,#self._room.player_list do + if self._room.self_player.seat==self._room.player_list[i].seat and self._room.self_player.self_user.account_id ~= self._room.player_list[i].self_user.account_id then + -- body + local ErrorMsgTip = UIPackage.CreateObject("Common", "Win_ConnectTip") + local _action = self._view:AddChild(ErrorMsgTip) + _action.xy = Vector2((self._view.width - _action.width) / 4, self._view.height / 4) + local text = _action:GetChild("tex_message") + local btn1 = _action:GetChild("btn_connect") + local btn2 = _action:GetChild("btn_back") + text.text = "您来晚了,座位有人,请重新进牌桌" + btn1.visible=false + btn2:Center() + btn2.y=btn2.y+50 + btn2.onClick:Set(function() + -- body + ErrorMsgTip:Destroy() + ErrorMsgTip = nil + self._gamectr:LevelRoom(function(res) + ViewUtil.CloseModalWait() + NetResetConnectWindow.CloseNetReset() + ControllerManager.ChangeController(LoddyController) + ViewManager.ChangeView(ViewManager.View_Lobby) + end) + end) + end + end + -- if p ~= self._room.self_player and self._room.room_config.people_num <= 4 and self._room.room_config.people_num >= 3 and self._gamectr:CheckGPS() then + -- if self.distance_view then + -- self.distance_view:Destroy() + -- end + -- self.distance_view = PlayerDistanceView.new(true) + -- self.distance_view:Show() + -- end + -- local info = self._player_info[self:GetPos(p.seat)] + -- info:FillData(p) + -- info._view.visible = true + MainView.OnPlayerEnter(self, ...) +end + +function M:Destroy() + for i = 1, #self._room.player_list do + local player = self._room.player_list[i] + local card_info_i = self._player_card_info[self:GetPos(player.seat)] + + card_info_i:Destroy() + if card_info_i ~= nil and card_info_i.cor_init_poker ~= nil then + coroutine.stop(card_info_i.cor_init_poker) + end + end + self.tips.visible = false + PKMainView.Destroy(self) + UIPackage.RemovePackage("extend/poker/twodoudizhu/ui/Extend_Poker_TwoDouDiZhu") +end + +return M diff --git a/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_Player.lua b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_Player.lua new file mode 100644 index 00000000..6578a398 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_Player.lua @@ -0,0 +1,35 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:42 +--- +local TwoDouDiZhu_Player = { + -- 手牌列表 + hand_count = 0, + out_card_list = {}, + hand_list = {}, + isOneCard= false, -- 报单 +} + +local M = TwoDouDiZhu_Player + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_count = 0 + self.out_card_list = {} + self.hand_list = {} + self.isOneCard = false + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_count = 0 + self.out_card_list = {} + self.hand_list = {} + self.isOneCard = false +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_PlayerBackView.lua b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_PlayerBackView.lua new file mode 100644 index 00000000..652138ee --- /dev/null +++ b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_PlayerBackView.lua @@ -0,0 +1,534 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/25 13:52 +--- +local PKPlayBackView = require('main.poker.PKPlayBackView') +local TwoDouDiZhu_PlayerCardInfoView = import('.TwoDouDiZhu_PlayerPokerInfoView') +local TwoDouDiZhu_PlayerSelfCardInfoView = import('.TwoDouDiZhu_PlayerSelfPokerInfoView') +local PlayerInfoView = import('.EXPlayerInfoView') +local TwoDouDiZhu_RightPanelView = import(".TwoDouDiZhu_RightPanelView") +local TwoDouDiZhu_ResultView = import(".TwoDouDiZhu_ResultView") +local M = {} + +local TwoDouDiZhu_Record_Event = { + Evt_OutCard = 'OutCard', + Evt_Pass = 'pass', + Evt_NewRound = 'newindex', + Evt_result = 'result', + Evt_Result = 'Result', + Evt_jiaoDiZhu = 'jiaoDiZhu', + Evt_qiangDiZhu = 'qiangDiZhu', + Evt_diZhuInfo = 'diZhuInfo' +} + +local default_bg = 1 +local bg_config = { + {id = 1, url = 'extend/poker/twodoudizhu/bg/bg1', thumb = 'ui://Extend_Poker_TwoDouDiZhu/table_bg1'}, + {id = 2, url = 'extend/poker/twodoudizhu/bg/bg2', thumb = 'ui://Extend_Poker_TwoDouDiZhu/table_bg2'}, + {id = 3, url = 'extend/poker/twodoudizhu/bg/bg3', thumb = 'ui://Extend_Poker_TwoDouDiZhu/table_bg3'} +} + +--- Create a new +function M.new() + setmetatable(M, {__index = PKPlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = 'TwoDouDiZhu_PlayBackView' + self:init() + + return self +end + +function M:InitView(url) + local room = self._room + if not room.self_player then + room.self_player = room:GetPlayerBySeat(1) + end + self._gamectr = ControllerManager.GetController(GameController) + UIPackage.AddPackage('extend/poker/twodoudizhu/ui/Extend_Poker_TwoDouDiZhu') + PKPlayBackView.InitView(self, 'ui://Extend_Poker_TwoDouDiZhu/TwoDouDiZhu_Main_' .. self._room.room_config.people_num, default_bg, bg_config) + self._tex_round = self._view:GetChild('round') + self._player_card_info = {} + local _player_card_info = self._player_card_info + for i = 1, room.room_config.people_num do + local tem = self._view:GetChild('player_card_info_' .. i) + self._player_card_info[i] = self:NewPlayerPokerInfoView(tem, i) + end + local rightpanel = self._view:GetChild("right_panel") + if self._rightPanelView ~= nil then + self._rightPanelView:Destroy() + end + + self.three = self._view:GetChild("three") + self.threeBei = self.three:GetChild("n9") + self.three.visible = false + + self._rightPanelView = TwoDouDiZhu_RightPanelView.new(self, rightpanel) + rightpanel:GetChild("btn_setting").onClick:Clear() + + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild('player_info' .. i) + _player_info[i] = PlayerInfoView.new(tem, self) + end + local list = self._room.player_list + for i=1,#list do + local p = list[i] + local info = _player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + end + if self._room.hpOnOff == 1 and self._room.score_times ~= 1 then + -- body + self._view:GetChild('roominfo_panel1'):GetChild('tex_beishu').text = self._room.score_times .. '倍' + else + self._view:GetChild('roominfo_panel1'):GetChild('tex_beishu').text = '' + end + self._eventmap = {} + self._cmdmap = {} + self._cmdmap[TwoDouDiZhu_Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[TwoDouDiZhu_Record_Event.Evt_Pass] = self.CmdPass + self._cmdmap[TwoDouDiZhu_Record_Event.Evt_NewRound] = self.CmdNewRound + self._cmdmap[TwoDouDiZhu_Record_Event.Evt_result] = self.Cmdresult + self._cmdmap[TwoDouDiZhu_Record_Event.Evt_Result] = self.CmdResult + + self._cmdmap[TwoDouDiZhu_Record_Event.Evt_jiaoDiZhu] = self.CmdjiaoDiZhu + self._cmdmap[TwoDouDiZhu_Record_Event.Evt_qiangDiZhu] = self.CmdqiangDiZhu + self._cmdmap[TwoDouDiZhu_Record_Event.Evt_diZhuInfo] = self.CmddiZhuInfo + + +end + +function M:NewPlayerPokerInfoView(view, index) + if index == 1 then + return TwoDouDiZhu_PlayerSelfCardInfoView.new(view, self) + end + return TwoDouDiZhu_PlayerCardInfoView.new(view, self) +end + +function M:FillRoomData(data) + print("hidezhanji 1111") + self._currentStep = 1 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local roominfo_panel = self._view:GetChild('roominfo_panel1') + + roominfo_panel:GetChild('tex_roomid').text = data.info.roomid + roominfo_panel:GetChild('tex_gametype').text = room.room_config:GetGameName() + + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + local head_info = self._player_info[self:GetPos(p.seat)] + + if p.total_hp then + print("hidezhanji 2222") + + head_info._view:GetChild('zhanji').visible=false + + if room.hpOnOff == 1 or room:checkHpNonnegative() then + head_info._view:GetChild('zhanji').visible=true + head_info._view:GetChild('text_jifen').text = d2ad(p.total_hp) + end + end + head_info:FillData(p) + head_info:UnmarkTuoguan() + head_info:UpdateScore() + if p.seat ~= room.self_player.seat then + card_info:UpdateHandPoker(p.hand_list, false, true) + end + head_info:UpdatePiao(p.piao) + + end + + self:UpdateRound() + + self:GenerateAllStepData(data) + self:ShowStep(1) +end + +function M:ShowStep(index) + local step = self._step[index] + if step==nil then + return + end + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + + local info = self._player_card_info[self:GetPos(i)] + p.hand_list = step.player_card_data[i].hand_list + p.out_card_list = step.player_card_data[i].out_card_list + p.hand_left_count = #p.hand_list + + if p.seat ~= self._room.self_player.seat then + info:UpdateHandPoker(p.hand_list, false, true) + else + info:InitPoker(p.hand_list, false) + end + + end + + -- Evt_jiaoDiZhu = 'jiaoDiZhu', + -- Evt_qiangDiZhu = 'qiangDiZhu', + -- Evt_diZhuInfo = 'diZhuInfo' + if step.cmd == TwoDouDiZhu_Record_Event.Evt_OutCard then + local seat = step.current_out_seat + local p = self._room:GetPlayerBySeat(seat) + local info = self._player_card_info[self:GetPos(seat)] + local card = step.out_card_list + local card_list = self._gamectr:ChangeCodeByFrom(card, true) + printlog("============111111111111111111111111111") + pt(card_list) + info:SetOutCardInfo(card_list, false) + self:ClearNextSeatOutCard(seat) + end + if step.cmd == TwoDouDiZhu_Record_Event.Evt_jiaoDiZhu then + local seat = step.seat + local jiao = step.jiao + local card_info = self._player_card_info[self:GetPos(seat)] + if (jiao == 0) then + card_info:ChangeJiao(1) + else + card_info:ChangeJiao(3) + end + + end + if step.cmd == TwoDouDiZhu_Record_Event.Evt_qiangDiZhu then + local seat = step.seat + local qiang = step.qiang + local card_info = self._player_card_info[self:GetPos(seat)] + if (qiang == 0) then + card_info:ChangeJiao(2) + else + card_info:ChangeJiao(4) + end + end + if step.cmd == TwoDouDiZhu_Record_Event.Evt_diZhuInfo then + local seat = step.seat + + local cards = step.cards + local mul = step.mul + self:UpMul(mul) + local card_info = self._player_card_info[self:GetPos(seat)] + + self:UpThree(cards) + local _player_card_info = self._player_card_info + for i = 1, self._room.room_config.people_num do + self._player_card_info[i]:ChangeJiao(-1) + end + end + + if step.cmd == TwoDouDiZhu_Record_Event.Evt_Pass then + local seat = step.current_out_seat + local p = self._room:GetPlayerBySeat(seat) + local info = self._player_card_info[self:GetPos(seat)] + info:SetOutCardInfo(nil, true) + self:ClearNextSeatOutCard(seat) + end + if step.cmd == TwoDouDiZhu_Record_Event.Evt_NewRound then + for i = 1, #self._room.player_list do + local p = self._room:GetPlayerBySeat(i) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:SetOutCardInfo(nil, false) + end + end + if step.cmd == TwoDouDiZhu_Record_Event.Evt_result then + local result = step.result + for i = 1, #result do + local card_info = self._player_card_info[self:GetPos(result[i].seat)] + + if result[i].entrust ~= nil and result[i].entrust == true then + local head_info = self._player_info[self:GetPos(result[i].seat)] + head_info:MarkTuoguan() + end + -- head_info:UpdateScore(result[i].score) + card_info:PlayScore(result[i].score, false, step.win_seat == result[i].seat) + end + end + if step.cmd == TwoDouDiZhu_Record_Event.Evt_Result then + local Result = step.Result + self.result_view = TwoDouDiZhu_ResultView.new(self._root_view, Result.info, self._room.room_id, Result.type, Result.winseat, 0, Result.remaincards) + local num = self._view:GetChildIndex(self._view:GetChild("panel_record")) + self._view:AddChildAt(self.result_view._view, num) + else + if self.result_view then + self.result_view:Dispose() + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = '' + + step.win = 0 + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.hand_list = p.hand_card + u.hand_count = #u.hand_list + u.out_card_list = {} + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + u.card_list = cmd.data.card + data.out_card_list = cmd.data.card_list + printlog("card_listcard_list ") + pt(data.out_card_list) + for i = 1, #data.out_card_list do + local out_card = data.out_card_list[i] + for j = 1, #u.hand_list do + if u.hand_list[j] == out_card then + list_remove(u.hand_list, out_card) + break + end + end + end +end + +function M:CmdNewRound(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd +end + +function M:CmdPass(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat +end +function M:Cmdresult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result = cmd.data.result + data.win_seat = cmd.seat +end + +function M:CmdResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.Result = cmd.data + for i = 1, #data.Result.info do + local p = data.Result.info[i] + p.nick = self._room:GetPlayerBySeat(p.seat).self_user.nick_name + end +end + + + +function M:CmdjiaoDiZhu(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.data["seat"] + data.jiao = cmd.data["jiao"] +end + +function M:CmdqiangDiZhu(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.data["seat"] + data.qiang = cmd.data["qiang"] +end + +function M:CmddiZhuInfo(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.data["seat"] + data.cards = cmd.data["cards"] + data.mul = cmd.data["mul"] + +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = membe_clone(last_step) + step.player_card_data = {} + local card_data = step.player_card_data + for i = 1, #last_step.player_card_data do + card_data[i] = {} + card_data[i].hand_list = membe_clone(last_step.player_card_data[i].hand_list) + card_data[i].out_card_list = membe_clone(last_step.player_card_data[i].out_card_list) + end + step.Result = nil + self._step[#self._step + 1] = step + return step +end + +function M:ClearNextSeatOutCard(currenOutCardSeat) + local people_num = self._room.room_config.people_num + local next_seat = currenOutCardSeat + 1 + if next_seat > people_num then + next_seat = next_seat - people_num + end + local p = self._room:GetPlayerBySeat(next_seat) + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:SetOutCardInfo(nil, false) +end + +function M:UpdateRound() + local round = self._room.curren_round + self._tex_round.text = string.format('第 %d 局', round) +end + +function M:NextRecordPlay() + self._totalRound = tonumber(self._totalRound) + local result = PlayBackView.NextRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + if self.result_view then + self.result_view:Dispose() + self.result_view = nil + end +end + +function M:LastRecordPlay() + local result = PlayBackView.LastRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + if self.result_view then + self.result_view:Dispose() + self.result_view = nil + end +end + +function M:Play() + self:ChangeAlpha() + self:ChangePlayState(not self._play) + if not self._play then + return + end + if (self._currentStep == #self.cmdList and self._playFoward) or (self._currentStep == 0 and not self._playFoward) then + self._currentStep = 0 + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:ChangePlayState(state) + self._play = state + self:ChangeTextSpeed() + local btn_play = self._view:GetChild('panel_record'):GetChild('btn_play') + if self._play then + btn_play:GetController('state').selectedIndex = 1 + else + btn_play:GetController('state').selectedIndex = 0 + end +end + +function M:ChangeTextSpeed() + local str1 = self._play and self._speed or '' + self._view:GetChild('panel_record'):GetChild('tex_speed').text = str1 + local str2 = + not self._play and (self._playFoward and '播放暂停' or '回退暂停') or + self._playFoward and (self._speed == 1 and '播放' or '快进') or + (self._speed == 1 and '回退' or '快退') + self._view:GetChild('panel_record'):GetChild('tex_2').text = str2 + local str3 = self._play and '倍速度' or '' + self._view:GetChild('panel_record'):GetChild('tex_1').text = str3 +end + +function M:CmdLeftArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if not self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = false + self:ChangeTextSpeed() + end +end + +function M:CmdRightArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:OnUpdate() + if self._play then + if (self._currentStep == #self.cmdList + 1 and self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像结尾了,再次点击播放按钮可重新播放') + return + elseif (self._currentStep == 0 and not self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像开头了,再次点击播放按钮可重新播放') + return + end + self._timer = self._timer + Time.deltaTime + if self._timer >= 1 / self._speed then + self._timer = 0 + local step = self._playFoward and 1 or -1 + self._currentStep = self._currentStep + step + if self._currentStep > 0 then + self:ShowStep(self._currentStep) + end + end + end +end + +function M:Destroy() + UpdateBeat:Remove(self.OnUpdate, self) + PlayBackView.Destroy(self) +end + +function M:UpThree(cards) + + local Icon1 = self.three:GetChild("n0") + local Icon2 = self.three:GetChild("n1") + local Icon3 = self.three:GetChild("n2") + Icon1.icon = "ui://Extend_Poker_TwoDouDiZhu/ddz_poker_"..cards[1] + Icon2.icon = "ui://Extend_Poker_TwoDouDiZhu/ddz_poker_"..cards[2] + Icon3.icon = "ui://Extend_Poker_TwoDouDiZhu/ddz_poker_"..cards[3] +end + +function M:UpMul(mul) + self.threeBei.text = mul.."倍" + self.three.visible = true +end + +return M diff --git a/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_PlayerPokerInfoView.lua b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_PlayerPokerInfoView.lua new file mode 100644 index 00000000..246c67b6 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_PlayerPokerInfoView.lua @@ -0,0 +1,417 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 16:35 +--- +local TwoDouDiZhu_PlayerPokerInfoView = { + _view = nil, + _mainView = nil, + _mask_liangpai = nil, +} + +local M = TwoDouDiZhu_PlayerPokerInfoView + +function M.new( view,mainView ) + local self = {} + setmetatable(self, {__index = M}) + self._view = view + self._mainView = mainView + self:init() + return self +end + + + +function M:init() + local view = self._view + self._gameCtr = ControllerManager.GetController(GameController) + + self.item_data = json.decode(self._view:GetChild("area_mask").text) + self.out_card_data = self.item_data["outcard_list"] + self._mask_liangpai = view:GetChild("mask_liangpai") + self.ctr_outpoker = view:GetController("output") + self.outpoker_list = view:GetChild(self.out_card_data["parent"]) + + self.hand_card_list = view:GetChild("hand_card_list") + + self.ctr_one_card = view:GetController("one_card") + self.eff_one_card = view:GetChild("one_card_eff"):GetTransition("t0") + + self.text_bomb_score = view:GetChild("Score") + self.ani_bomb_score = view:GetTransition("score") + self.ani_result_score = view:GetTransition("score_1") + + self.liutip = view:GetChild("liutip") + self.liuIcon = self.liutip:GetChild("n0") + self.liutip.visible = false +end + +function M:ChangeJiao(a) + printlog("changejiao aaaaaaaaaaaaa",a) + if (a == -1) then + self.liutip.visible = false + return + end + if (a == 0) then + self.liuIcon.icon = "ui://Extend_Poker_TwoDouDiZhu/ddz_two_icon_buchu" + elseif (a==1) then + self.liuIcon.icon = "ui://Extend_Poker_TwoDouDiZhu/ddz_two_icon_bujiao" + elseif (a==2) then + self.liuIcon.icon = "ui://Extend_Poker_TwoDouDiZhu/ddz_two_icon_buqiang" + elseif (a==3) then + self.liuIcon.icon = "ui://Extend_Poker_TwoDouDiZhu/ddz_two_icon_jiaodizhu" + elseif (a==4) then + self.liuIcon.icon = "ui://Extend_Poker_TwoDouDiZhu/ddz_two_icon_qiangdizhu" + end + self.liutip.visible = true +end + +function M:SetOutCardInfo(cardlist,isPass,isAnim) + self.outpoker_list:RemoveChildren(0,-1,true) + if cardlist == nil then + if isPass == true then + self.ctr_outpoker.selectedIndex = 2 + else + self.ctr_outpoker.selectedIndex = 0 + end + else + if isAnim then + if self.move_cor then + coroutine.stop(self.move_cor) + self.move_cor = nil + end + local time = 0.1 + for i = 1, #cardlist do + local poker_item = UIPackage.CreateObject("Extend_Poker_TwoDouDiZhu", "poker7") + local code = self:ChangeCodeByTo(cardlist[i]) + + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + local card_code_obj + -- if DataManager.CurrenRoom.pai==0 then + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code) + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + -- end + -- if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code.."_1") + -- end + -- if DataManager.CurrenRoom.pai==0 then + -- if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code.."_1") + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code) + -- end + + -- else + -- if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code.."_2") + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + -- end + + -- end + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code) + if card_code_obj == nil then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + --card_code_obj:SetScale(1,1) + poker_item:AddChild(card_code_obj) + --local poker = self:CreatPoker(cardlist[i],0.7) + self.outpoker_list:AddChild(poker_item) + poker_item.xy = Vector2.New(self.out_card_data["start_x"],self.out_card_data["start_y"]) + poker_item:TweenMove(self:GetOutCardEndPokerPos(i,#cardlist,self.outpoker_list,poker_item,self.out_card_data["maxcount_x"],1),time) + --card_code_obj + -- self.tween = TweenUtils.TweenFloat(1,0.7,time,function(x) + -- card_code_obj:SetScale(x,x) + -- end) + card_code_obj:SetScale(0.7,0.7) + end + self.move_cor = coroutine.start(function() + coroutine.wait(0.1) + ViewUtil.PlaySound("TwoDouDiZhu_PK", "extend/poker/TwoDouDiZhu/sound/chupai.mp3") + end) + else + for i = 1, #cardlist do + local poker_item = UIPackage.CreateObject("Extend_Poker_TwoDouDiZhu", "poker7") + local code = self:ChangeCodeByTo(cardlist[i]) + local card_code_obj + + -- if DataManager.CurrenRoom.pai==0 then + -- if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code.."_1") + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code) + -- end + + -- else + -- if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code.."_2") + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + -- end + + -- end + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code) + if card_code_obj == nil then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + card_code_obj:SetScale(0.7,0.7) + poker_item:AddChild(card_code_obj) + --local poker = self:CreatPoker(cardlist[i],0.7) + self.outpoker_list:AddChild(poker_item) + poker_item.xy = self:GetOutCardEndPokerPos(i,#cardlist,self.outpoker_list,poker_item,self.out_card_data["maxcount_x"],1) + end + end + --self.ctr_outpoker.selectedIndex = 1 + end +end + +function M:SetOutCardBlack() + for i = 0, self.outpoker_list.numChildren - 1 do + self.outpoker_list:GetChildAt(i):GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(0.7,0.7,0.7) + end +end + +-- 12 -61 --11 58 --10 55 --46 +function M:GetOffSet(cardLength) -- 15 -70 + if cardLength > 8 then + return 40 + else + return - cardLength * 5 + 80 + end +end +function M:GetOutCardEndFirstPokerPos(count,parent_com,poker_obj,max_count,scale) + local parent_width,parent_height = parent_com.width,parent_com.height + local poker_width,poker_height = poker_obj.width * scale,poker_obj.height * scale + local offset = self:GetOffSet(count) + local x,y = 0,0 + --local length = (count - 1) * (poker_width + offset) + poker_width + --if length <= parent_width then + -- x = (parent_width - length) / 2 + -- y = (parent_height - poker_height) / 2 + --end + if count <= max_count then + local length = (count - 1) * offset + poker_width + x = (parent_width - length) / 2 + y = ((parent_height - poker_height) / 2) + + end + return Vector2.New(x,y) +end + +function M:GetOutCardEndPokerPos(index,count,parent_com,poker_obj,max_count,scale) + local offset_x,offset_y = self:GetOffSet(count),-50 + local start_pos = self:GetOutCardEndFirstPokerPos(count,parent_com,poker_obj,max_count,scale) + local poker_width,poker_height = poker_obj.width * scale,poker_obj.height * scale + local parent_width,parent_height = parent_com.width,parent_com.height + local pos_x,pos_y = start_pos.x + (index - 1) * offset_x,start_pos.y + if index > max_count then + pos_x = (index - max_count - 1) * offset_x + pos_y = pos_y + poker_height + offset_y + end + return Vector2.New(pos_x,pos_y) +end + +-- function M:PlayCardTypeEff(type1) +-- if type1 < 7 and type1 ~= 4 then return end +-- local eff_code = 0 +-- if type1 == 10 then +-- eff_code = 2 +-- elseif type1 == 11 then +-- eff_code = 3 +-- elseif type1 == 4 then +-- eff_code = 4 +-- else +-- eff_code = 1 +-- end +-- if self.cro_type_eff ~= nil then +-- coroutine.stop(self.cro_type_eff) +-- end +-- self.cro_type_eff = nil +-- self.cro_type_eff = coroutine.start(function() +-- self.type_eff_view = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/eff_"..eff_code) +-- if self.type_eff_view == nil then return end +-- self._view:AddChild(self.type_eff_view) +-- self.type_eff_view:SetXY((self._view.width - self.type_eff_view.width) / 2,self.outpoker_list.y) +-- self.type_eff_view:GetTransition("t0"):Play() +-- coroutine.wait(1.5) +-- if self.type_eff_view ~= nil then +-- self.type_eff_view:Dispose() +-- self.type_eff_view = nil +-- end +-- end) +-- end + +function M:PlayScore(score,isBomb,isWin) + if score == nil then + self.text_bomb_score.alpha = 0 + return + end + if isBomb then + self.text_bomb_score.text = score >= 0 and "+"..score or tostring(score) + self.text_bomb_score.grayed = score < 0 + self.ani_bomb_score:Play() + else + if score < 0 then + self.text_bomb_score.text = tostring(score) + self.text_bomb_score.grayed = true + elseif score > 0 then + self.text_bomb_score.text = "+"..score + self.text_bomb_score.grayed = false + else + local str = isWin and "+" or "-" + self.text_bomb_score.text = str..score + self.text_bomb_score.grayed = not isWin + end + self.ani_result_score:Play() + end +end + + + + +function M:UpdateHandPoker(cardList,isPlayAni,isMing) + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + self.cor_init_poker = nil + self.card_list = {} + self.hand_card_list:RemoveChildren(0,-1,true) + local card_length + local new_card_list + if isMing == true then + new_card_list = self._gameCtr:ChangeCodeByFrom(cardList,true) + card_length = #cardList + else + card_length = cardList + end + if isPlayAni == true then + self.cor_init_poker = coroutine.start(function() + for i = card_length, 1,-1 do + local code = isMing == true and new_card_list[i] or 0 + coroutine.wait(0.01) + local poker = self:CreatPoker1(code,0.4) + self.hand_card_list:AddChild(poker) + end + end) + else + for i = card_length, 1,-1 do + local code = isMing == true and new_card_list[i] or 0 + local poker = self:CreatPoker1(code,0.4) + self.hand_card_list:AddChild(poker) + end + end +end + +function M:SetRemainCardNumber(isPlay) + if isPlay then + self.ctr_one_card.selectedIndex = 1 + self.eff_one_card:Play(-1,0,nil) + else + self.ctr_one_card.selectedIndex = 0 + end + --if self.card_number then + -- self.card_number.visible = show + -- self.card_number.text = string.format("剩余:%d",number) + --end +end + +function M:CreatPoker1(poker,scale,bank) + + local poker_item = UIPackage.CreateObject("Extend_Poker_TwoDouDiZhu", "poker"..scale * 10) + local code = self:ChangeCodeByTo(poker) + local card_code_obj + + -- if DataManager.CurrenRoom.pai==0 then + -- if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code.."_1") + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code) + -- end + + -- else + -- if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code.."_2") + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + -- end + + -- end + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code) + if card_code_obj == nil or bank==1 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + + card_code_obj:SetScale(scale,scale) + poker_item:AddChild(card_code_obj) + + return poker_item +end + +function M:CreatPoker(poker,scale,bank) + + local poker_item = UIPackage.CreateObject("Extend_Poker_TwoDouDiZhu", "poker"..12.5) + local code = self:ChangeCodeByTo(poker) + local card_code_obj + + --printlog("========+++++++++++++++codecodecodecode ",code) + -- if DataManager.CurrenRoom.pai==0 then + -- if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code.."_1") + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code) + -- end + + -- else + -- if code==310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code.."_2") + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + -- end + + -- end + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code) + if card_code_obj == nil or bank==1 then + card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/00") + end + + card_code_obj:SetScale(scale,scale) + poker_item:AddChild(card_code_obj) + + return poker_item +end + +function M:ChangeCodeByTo( card ) + -- if card > 500 then + -- return card + -- end + local flower = card % 10 + local number = math.floor(card / 10) + if number == 15 then + number = 2 + end + return flower * 100 + number +end + + +function M:Clear() + self:PlayScore(nil) + self:SetRemainCardNumber(false) + self:SetOutCardInfo(nil,false) + self.hand_card_list:RemoveChildren(0,-1,true) + self._mask_liangpai:RemoveChildren(0,-1,true) +end + +function M:Destroy() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_PlayerSelfPokerInfoView.lua b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_PlayerSelfPokerInfoView.lua new file mode 100644 index 00000000..90211cce --- /dev/null +++ b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_PlayerSelfPokerInfoView.lua @@ -0,0 +1,1450 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 17:04 +--- +local TwoDouDiZhu_PlayerPokerInfoView = import('.TwoDouDiZhu_PlayerPokerInfoView') +local TwoDouDiZhu_CardType = import('.TwoDouDiZhu_CardType') + +local CardView = { + btn_card = nil, + -- 牌号码 (大小) + card_code_number = 0, + -- 牌号码 (花色) + card_code_flower = 0, + -- 索引 + index = 0 +} + +local function NewCardView(card, cardcodenum, cardcodeflower) + local self = {} + setmetatable(self, {__index = CardView}) + self.btn_card = card + self.card_code_number = cardcodenum + self.card_code_flower = cardcodeflower + self.card_isTouchable = 0 + return self +end + +local function tableSortNumber(a, b) + return a.card_code_number > b.card_code_number +end + +local TwoDouDiZhu_PlayerSelfPokerInfoView = { + _view = nil, + _mainView = nil, + _mask_liangpai = nil +} + +local M = TwoDouDiZhu_PlayerSelfPokerInfoView + +function M.new(view, mainView) + setmetatable(M, {__index = TwoDouDiZhu_PlayerPokerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._mainView = mainView + self.gameCtr = ControllerManager.GetController(GameController) + self:init() + return self +end + +function M:init() + self.Reset = false + self.ctr_outpoker = self._view:GetController('output') + self.outpoker_list = self._view:GetChild('out_card_list') + self.item_data = json.decode(self._view:GetChild('area_mask').text) + self.out_card_data = self.item_data['outcard_list'] + self.hand_card_list = self._view:GetChild('hand_card_list') + self.ctr_hand_card_pos = self._view:GetChild('hand_card_list') + self._mask_liangpai = self._view:GetChild('mask_liangpai') + self.card_width = 129 + self.cards_view = self._view:GetChild('hand_poker_c') + self.card_list = {} + self.out_card_list = {} + self.touchMoveFun = handler(self, self.TouchMoving) + self.ctr_put_card_option = self._view:GetController('out_card_option') + self.ctr_piao = self._view:GetController('piao') + self.ctr_piao_value = self._view:GetController('piao_value') + self.ctr_put_error = self._view:GetController('put_error') + self.put_error_text = self._view:GetChild('put_error') + + self.ctr_select_card_type = self._view:GetController('select_card_type') + self.select_card_type_view = self._view:GetChild('choose_type') + + self.text_bomb_score = self._view:GetChild('Score') + self.ani_bomb_score = self._view:GetTransition('score') + self.ani_result_score = self._view:GetTransition('score_1') + + self.jiao = self._view:GetController('jiao') + + self.btnNoJiao = self._view:GetChild("btnNoJiao") + self.btnNoQiang = self._view:GetChild("btnNoQiang") + self.btnQiang = self._view:GetChild("btnQiang") + self.btnJiao = self._view:GetChild("btnJiao") + self.btnChong = self._view:GetChild("btnChong") + + self.liutip = self._view:GetChild("liutip") + self.liuIcon = self.liutip:GetChild("n0") + self.liutip.visible = false + + self.send_card = {} + self.tips_click_count = 0 + + self.CurrenPokerList = {} + self:BtnEvent() +end + +function M:ChongXuan() + for i = 1, #self.card_list do + local card_view = self.card_list[i] + self:UpdateCardMove(card_view.btn_card, false, false) + end +end + +function M:ChangeSelfJiao(index) + printlog("jiao ",index) + self.jiao.selectedIndex = index +end + +function M:AddThree(threeList) + for i = 1,#threeList do + table.insert(self.CurrenPokerList,threeList[i]) + end + --table.sort(self.CurrenPokerList) + self:InitPoker(self.CurrenPokerList) + self.card_list[#self.card_list + 1] = card_view + for i=1,#threeList do + for j = 1,#self.card_list do + if (threeList[i]==self.card_list[j].card_code_flower) then + self:UpdateCardMove(self.card_list[j].btn_card, true, false) + coroutine.start(function() + coroutine.wait(1) + self:UpdateCardMove(self.card_list[j].btn_card, false, false) + end) + break + end + end + end + +end + +function M:InitPoker(pokerList, isPlayAni, open) + -- self.zhizhanctr_select=0 + -- self.zhizhantype=0 + -- self.zhizhannumber=0 + -- self.zhizhanlength=0 + -- self.zhizhanmustPutMaxCard=0 + -- self.zhizhanplay=0 + -- self.zhizhanzdts=0 + printlog("手牌==========================") + pt(pokerList) + self.CurrenPokerList = {} + local cs = 1.25 + if DataManager.CurrenRoom.cardsize==0 then + cs = 1.35 + elseif DataManager.CurrenRoom.cardsize == 1 then + cs = 1.25 + elseif DataManager.CurrenRoom.cardsize == 2 then + cs = 1.15 + end + + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + -- print(vardump(self.card_list)) + self.cor_init_poker = nil + self.card_list = {} + + self.cards_view:RemoveChildren(0, -1, true) + if isPlayAni == true then + self.cor_init_poker = + coroutine.start( + function() + self._mainView._popEvent = false + if self._mainView._rightPanelView._settingView ~= nil then + self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(false) + end + table.sort(pokerList) + + for i = 1, #pokerList do + local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) + local card_flower_code = pokerList[i] + printlog("card_number_code ",card_number_code," ","card_flower_code",card_flower_code) + local btn_card = self:CreatPoker(card_number_code, cs, open) + local x, y = self._view.width / 2 + 100, -200 + btn_card:SetXY(x, y) + btn_card.alpha = 0 + btn_card.touchable = false + -- coroutine.wait(0.05) + self.cards_view:AddChild(btn_card) + local card_view = NewCardView(btn_card, card_number_code, card_flower_code) + self.card_list[#self.card_list + 1] = card_view + + table.sort(self.card_list, tableSortNumber) + + if i == #pokerList then + for j = 1, #self.card_list do + local card = self.card_list[j] + card.btn_card.touchable = true + if open ~= 1 then + -- body + self:AddCardMoveEvent(card) + end + end + end + end + for j = #self.card_list, 1, -1 do + -- ViewUtil.PlaySound('TwoDouDiZhuNew_PK', 'extend/poker/TwoDouDiZhu/sound/mopai.mp3') + local card_view = self.card_list[j] + card_view.index = j + self.cards_view:SetChildIndex(card_view.btn_card, card_view.index - 1) + + card_view.btn_card:TweenMove(self:GetHandCardPos(j, #self.card_list), 0.10) + DSTween.To( + 0.7, + 1, + 0.1, + function(value) + card_view.btn_card:SetScale(value, value) + end + ) + DSTween.To( + 0.7, + 1, + 0.1, + function(value) + card_view.btn_card.alpha = value + end + ) + card_view.btn_card.alpha = 1 + end + + self._mainView._popEvent = true + if self._mainView._rightPanelView._settingView ~= nil then + self._mainView._rightPanelView._settingView:SetBtnDismissRoomEnable(true) + end + end + ) + else + + for i = 1, #pokerList do + local card_number_code = self:ChangeOneCodeByFrom(pokerList[i]) + local card_flower_code = pokerList[i] + local btn_card = self:CreatPoker(card_number_code, cs, open) + self.cards_view:AddChild(btn_card) + local card_view = NewCardView(btn_card, card_number_code, card_flower_code) + self.card_list[#self.card_list + 1] = card_view + end + table.sort(self.card_list, tableSortNumber) + for i = 1, #self.card_list do + local card = self.card_list[i] + card.index = i + self.cards_view:SetChildIndex(card.btn_card, card.index - 1) + card.btn_card.xy = self:GetHandCardPos(i, #self.card_list) + if open ~= 1 then + -- body + self:AddCardMoveEvent(card) + end + end + end + + self.CurrenPokerList = pokerList +end + +function M:updatePoker() + + local templist = {} + for i = 1, #self.card_list do + templist[#templist + 1] = self.card_list[i].card_code_flower + end + self:InitPoker(templist, false, 0) +end + +function M:AddCardMoveEvent(card) + local send_card = {} + + card.btn_card.onTouchBegin:Set( + function(context) + self.send_card = {} + if card.btn_card.touchable == false then + return + end + local xy = self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + if xy.y > -21 and xy.y < 221 then + self.touchBegin = xy + Stage.inst.onTouchMove:Add(self.touchMoveFun) + --Stage.inst.onClick:Add(self.touchMoveFun) + card.btn_card.onTouchEnd:Set( + function(context) + local xy = + self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + Stage.inst.onTouchMove:Remove(self.touchMoveFun) + --Stage.inst.onClick:onTouchMove(self.touchMoveFun) + if xy.y > -21 and xy.y < 221 then + if xy.x - self.touchBegin.x > 0 then + local max_x = xy.x + local min_x = self.touchBegin.x + for k = 1, #self.card_list do + local card = self.card_list[k] + + -- for i = 1, #self.card_list do + -- local card = self.card_list[i] + -- if card.btn_card.selected then + -- send_card[#send_card + 1] = card.card_code_flower + -- self.send_card[#self.send_card + 1] = card + -- end + -- end + if card.btn_card.touchable == true then + send_card[#send_card + 1] = card + + self:SetBtnCardColor(card, 1) + if k == #self.card_list then + if + card.btn_card.x + self.card_width > min_x and card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("TwoDouDiZhuNew_PK", "extend/poker/paodekuai/sound/click.mp3") + end + else + if + card.btn_card.x + + (self.card_width + self:GetHandCardOffset(#self.card_list)) > + min_x and + card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("TwoDouDiZhuNew_PK", "extend/poker/paodekuai/sound/click.mp3") + end + end + end + end + else + local max_x = self.touchBegin.x + local min_x = xy.x + -- self.send_card = {} + for k = 1, #self.card_list do + local card = self.card_list[k] + + -- for i = 1, #self.card_list do + -- local card = self.card_list[i] + -- if card.btn_card.selected then + -- send_card[#send_card + 1] = card.card_code_flower + -- self.send_card[#self.send_card + 1] = card + -- end + -- end + if card.btn_card.touchable == true then + send_card[#send_card + 1] = card + self:SetBtnCardColor(card, 1) + --print(vardump(card)) + if k == #self.card_list then + if + card.btn_card.x + self.card_width > min_x and card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("TwoDouDiZhuNew_PK", "extend/poker/paodekuai/sound/click.mp3") + end + else + if + card.btn_card.x + + (self.card_width + self:GetHandCardOffset(#self.card_list)) > + min_x and + card.btn_card.x < max_x and + card.card_isTouchable == 0 + then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + --ViewUtil.PlaySound("TwoDouDiZhuNew_PK", "extend/poker/paodekuai/sound/click.mp3") + end + end + end + end + end + + ViewUtil.PlaySound('TwoDouDiZhu_PK', 'extend/poker/twodoudizhu/sound/click.mp3') + else + self.touchBegin = Vector2.New(0, 0) + for k = 1, #self.card_list do + local card = self.card_list[k] + if card.btn_card.touchable == true then + self:SetBtnCardColor(card, 1) + end + end + end + + Stage.inst:ResetInputState() + card.btn_card.onTouchEnd:Set(nil) + + self:zhizhanxuanpai() + end + ) + else + local button = card.btn_card + button.onChanged:Add( + function() + -- body + if card.btn_card.selected == true then + self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + else + self:UpdateCardMove(card.btn_card, card.btn_card.selected, false) + end + end + ) + end + end + ) +end +function M:zhizhanxuanpai() --智障选牌 + -- body + local temp_send_card = {} + for i = 1, #self.send_card do + if self.send_card[i] ~= self.send_card[i - 1] then + -- body + temp_send_card[#temp_send_card + 1] = self.send_card[i] + end + end + + local card_map, max_key = self:GetCardMapAndMaxKey(temp_send_card) + + list_type1, touch_type1 = self:CheckPairs(card_map, 0, 8) + + list_type2, touch_type2 = self:CheckPlane(card_map, 0, 6, 0) + list_bomb, touch_bomb = self:CheckBomb(card_map, 0, 4) + + local list_type, touch_type = self:CheckOnes(card_map, 0, 11) + for i = 5, 11 do + local list_temp, touch_temp = self:CheckOnes(card_map, 0, i) + if list_temp[1] ~= nil then + -- body + list_type = list_temp + end + end + local temp_list = list_type[1] + local temp_list1 = list_type1[1] + local temp_list2 = list_type2[1] + local temp_bomb = list_bomb[1] + if self.xunpai == nil then + -- body + self.xunpai = {} + end + + if temp_list ~= nil and temp_list1 == nil and temp_list2 == nil and temp_bomb == nil and #temp_list > #self.xunpai then + for i = 1, #self.send_card do + self:UpdateCardMove(self.send_card[i].btn_card, false, false) + end + for i = 1, #self.send_card do + for j = 1, #temp_list do + if self.send_card[i] == temp_list[j] then + -- body + self:UpdateCardMove(self.send_card[i].btn_card, true, false) + end + end + end + self.xunpai = temp_list + else + self.xunpai = {} + end +end + +function M:TouchMoving(context) + if self.cards_view == nil then + return + end + local send_card1 = {} + local xy = self.cards_view:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + self.isTouching = true + if xy.x - self.touchBegin.x > 0 then -- 往右边滑 + local max_x = xy.x + local min_x = self.touchBegin.x + for i = 1, #self.card_list do + local card = self.card_list[i] + if card.btn_card.touchable == false or card.card_isTouchable == 1 then + else + if + card.btn_card.x + (self.card_width + self:GetHandCardOffset(#self.card_list)) > min_x and + card.btn_card.x < max_x + then + self:SetBtnCardColor(card, 0.8) + if #send_card1 == 0 then + -- body + send_card1[1] = card + end + for i = 1, #send_card1 do + if send_card1[i] ~= card then + -- body + send_card1[#send_card1 + 1] = card + end + end + else + -- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + -- card.card_isTouchable = 1 + -- ViewUtil.PlaySound("TwoDouDiZhuNew_PK", "extend/poker/paodekuai/sound/click.mp3") + self:SetBtnCardColor(card, 1) + end + end + end + elseif xy.x - self.touchBegin.x < 0 then -- 左边滑 + local max_x = self.touchBegin.x + local min_x = xy.x + for i = 1, #self.card_list do + local card = self.card_list[i] + if card.btn_card.touchable == false or card.card_isTouchable == 1 then + else + if + card.btn_card.x + (self.card_width + self:GetHandCardOffset(#self.card_list)) > min_x and + card.btn_card.x < max_x + then + -- self:UpdateCardMove(card.btn_card, not card.btn_card.selected, false) + -- card.card_isTouchable = 1 + -- ViewUtil.PlaySound("TwoDouDiZhuNew_PK", "extend/poker/paodekuai/sound/click.mp3") + self:SetBtnCardColor(card, 0.8) + if #send_card1 == 0 then + -- body + send_card1[1] = card + end + for i = 1, #send_card1 do + if send_card1[i] ~= card then + -- body + send_card1[#send_card1 + 1] = card + end + end + else + self:SetBtnCardColor(card, 1) + end + end + end + end + --print(vardump(send_card1)) + -- local send_card = {} + -- self.send_card = {} + -- for i = 1, #self.card_list do + -- local card = self.card_list[i] + -- if card.btn_card.selected then + -- send_card[#send_card + 1] = card.card_code_flower + -- self.send_card[#self.send_card + 1] = card + -- end + -- end + self.send_card = send_card1 +end + +function M:SetBtnCardColor(card, num) + if + card.btn_card:GetChildAt(0) ~= nil and card.btn_card:GetChildAt(0):GetChildAt(0) ~= nil and + card.btn_card:GetChildAt(0):GetChildAt(0):GetChildAt(0) ~= nil + then + -- body + card.btn_card:GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(num, num, num) + end + + --if card.card_code_flower < 500 then + -- card.btn_card:GetChildAt(0):GetChildAt(2).color = Color(num,num,num) + -- card.btn_card:GetChildAt(0):GetChildAt(3).color = Color(num,num,num) + --end +end + +function M:ShowPiao(piao) + self.ctr_piao.selectedIndex = piao +end + +function M:HidePiao() + self.ctr_piao.selectedIndex = 0 +end + +function M:ShowOutCardOption(ctr_select, type, number, length, mustPutMaxCard, play, zdts) + --for i = 1, #self.out_card_list do + -- local card = self.out_card_list[i] + -- self.cards_view:RemoveChild(card.btn_card,true) + --end + --self.out_card_list = {} + + -- self.zhizhanctr_select=ctr_select + -- self.zhizhantype=type + -- self.zhizhannumber=number + -- self.zhizhanlength=length + -- self.zhizhanmustPutMaxCard=mustPutMaxCard + -- self.zhizhanplay=play + -- self.zhizhanzdts=zdts + self.tips_click_count = 0 + self.send_card = {} + self.tips_card_list = self:GetCardTips(type, number, length, mustPutMaxCard) + + local x = {} + for i=1,#self.card_list do + if (self.card_list[i].card_code_flower == 516 or self.card_list[i].card_code_flower == 617) then + table.insert(x,self.card_list[i]) + end + end + if (#x>1) then + table.insert(self.tips_card_list,x) + end + + if #self.tips_card_list >= 1 then + -- body + self:UpdateHandCardsColor() + end + -- + -- 自动提示 + -- if #self.tips_card_list ~= 0 and play~=0 and mustPutMaxCard==false and zdts==1 then + -- local index = self.tips_click_count % #self.tips_card_list + 1 + -- self:ShowTipsCard(index) + -- self.tips_click_count = self.tips_click_count + 1 + -- end + if #self.tips_card_list == 2 and self.tips_card_list[2][1].index == self.tips_card_list[1][1].index then + if #self.tips_card_list[2] == #self.tips_card_list[1] then + for i = 1, #self.tips_card_list[2] do + if self.tips_card_list[2][i].index == self.tips_card_list[1][i].index then + self:ShowTipsCard(1) + end + end + end + elseif #self.tips_card_list == 1 then + self:ShowTipsCard(1) + end + if mustPutMaxCard and play ~= 0 and zdts == 1 then + -- body + self:ShowTipsCard(#self.tips_card_list) + end + self.ctr_put_card_option.selectedIndex = ctr_select + --v[1].card_code_flower == 516 or v[1].card_code_flower == 617 + + +end + +function M:ChangePutCardOption(ctr_select) + self.ctr_put_card_option.selectedIndex = ctr_select +end + +function M:SetOutCardInfo(cardlist, isPass, isAnim) + self.ctr_put_card_option.selectedIndex = 0 + for i = 1, #self.out_card_list do + local card = self.out_card_list[i] + self.cards_view:RemoveChild(card, true) + end + self.out_card_list = {} + if cardlist ~= nil then + -- todo + self:SetOutCardList(cardlist, isAnim) + else + if isPass == true then + self.ctr_outpoker.selectedIndex = 2 + for i = 1, #self.card_list do + local card_view = self.card_list[i] + card_view.btn_card.touchable = true + self:UpdateCardMove(card_view.btn_card, false, false) + self:SetBtnCardColor(card_view, 1) + end + else + self.ctr_outpoker.selectedIndex = 0 + end + end +end + +function M:SetOutCardBlack() + for i = 1, #self.out_card_list do + local card = self.out_card_list[i] + card:GetChildAt(0):GetChildAt(0):GetChildAt(0).color = Color(0.7, 0.7, 0.7) + end +end + +function M:SetOutCardList(cardlist, isAnim) + local pos_y = -200 + if isAnim then + -- self.zhizhanctr_select=0 + -- self.zhizhantype=0 + -- self.zhizhannumber=0 + -- self.zhizhanlength=0 + -- self.zhizhanmustPutMaxCard=0 + -- self.zhizhanplay=0 + -- self.zhizhanzdts=0 + if self.move_cor then + coroutine.stop(self.move_cor) + self.move_cor = nil + end + local time = 0.1 + for i = 1, #cardlist do + local card_code_number = cardlist[i] + for j = 1, #self.card_list do + local card = self.card_list[j] + if card_code_number == card.card_code_number then + card.btn_card.onTouchBegin:Set(nil) + self.out_card_list[#self.out_card_list + 1] = card.btn_card + list_remove(self.card_list, card) + -- todo 出牌动画 + local pos = + self:GetOutCardEndPokerPos( + i, + #cardlist, + self.cards_view, + card.btn_card, + self.out_card_data['maxcount_x'], + 0.7 + ) + card.btn_card:TweenMove(Vector2.New(pos.x, pos_y), time) + -- self.tween = TweenUtils.TweenFloat(1, 0.7, time, function(x) + -- card.btn_card:GetChildAt(0):SetScale(x, x) + -- end) + card.btn_card:GetChildAt(0):SetScale(0.7, 0.7) + break + end + end + end + self.move_cor = + coroutine.start( + function() + coroutine.wait(0.05) + for i = 1, #self.out_card_list do + local card = self.out_card_list[i] + self.cards_view:SetChildIndex(card, i - 1) + end + coroutine.wait(0.1) + ViewUtil.PlaySound('TwoDouDiZhu_PK', 'extend/poker/twodoudizhu/sound/chupai.mp3') + end + ) + else + for i = 1, #cardlist do + local poker_item = UIPackage.CreateObject('Extend_Poker_TwoDouDiZhu', 'poker7') + local code = self:ChangeCodeByTo(cardlist[i]) + -- local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/" .. code) + local card_code_obj + printlog("code=========================",code) + -- if DataManager.CurrenRoom.pai==0 then + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code) + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Main_Poker/" .. code .. "_2") + -- end + -- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/" .. code .. "_1") + -- end + -- if DataManager.CurrenRoom.pai == 0 then + -- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_TwoDouDiZhu/' .. code .. '_1') + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_TwoDouDiZhu/' .. code) + -- end + -- else + -- if code == 310 and DataManager.CurrenRoom.room_config.Heart10 == 1 then + -- -- body + -- card_code_obj = UIPackage.CreateObjectFromURL('ui://Extend_Poker_TwoDouDiZhu/' .. code .. '_2') + -- else + -- card_code_obj = UIPackage.CreateObjectFromURL('ui://Main_Poker/' .. code .. '_2') + -- end + -- end + card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/"..code) + if card_code_obj == nil then + card_code_obj = UIPackage.CreateObjectFromURL('ui://Main_Poker/00') + end + card_code_obj:SetScale(0.7, 0.7) + poker_item:AddChild(card_code_obj) + --local poker = self:CreatPoker(cardlist[i],0.7) + self.cards_view:AddChild(poker_item) + local pos = + self:GetOutCardEndPokerPos( + i, + #cardlist, + self.cards_view, + poker_item, + self.out_card_data['maxcount_x'], + 1 + ) + poker_item.xy = Vector2.New(pos.x, pos_y) + self.out_card_list[#self.out_card_list + 1] = poker_item + end + end +end + +function M:DeleteHandCards(cardlist) + for i = 1, #cardlist do + local card_code_number = cardlist[i] + for j = 1, #self.card_list do + local card = self.card_list[j] + if card_code_number == card.card_code_number then + --self.out_card_list[#self.out_card_list + 1] = card + list_remove(self.card_list, card) + -- todo 出牌动画 + self.cards_view:RemoveChild(card.btn_card, true) + break + end + end + end + self:UpdateHandCardsPos() +end + +function M:UpdateHandCardsPos() + for i = 1, #self.card_list do + local card_view = self.card_list[i] + card_view.index = i + card_view.btn_card.touchable = true + self.cards_view:SetChildIndex(card_view.btn_card, card_view.index - 1) + --card_view.btn_card.xy = self:GetHandCardPos(i, #self.card_list) + card_view.btn_card:TweenMove(self:GetHandCardPos(i, #self.card_list), 0.1) + self:UpdateCardMove(card_view.btn_card, false, false) + self:SetBtnCardColor(card_view, 1) + end +end + +function M:ResetPoker() + self.Reset = true + for i = 1, #self.card_list do + local card_view = self.card_list[i] + self:UpdateCardMove(card_view.btn_card, false, false) + end + self.send_card = {} + self.Reset = false +end + +function M:UpdateCardMove(btn_card, isSelected, isPlay) + btn_card.selected = isSelected + local card_Move = btn_card:GetChildAt(0) + local xy = isSelected == true and Vector2.New(0, -30) or Vector2.New(0, 0) + if isPlay then + -- body + card_Move:TweenMove(xy, 0) + else + card_Move:TweenMove(xy, 0) + end +end + +-- +function M:UpdateHandCardsColor() + for i = 1, #self.card_list do + local card_view = self.card_list[i] + local num = card_view.btn_card.touchable == true and 1 or 0.6 + self:SetBtnCardColor(card_view, num) + end +end + +function M:BtnEvent() + self.btn_not_put = self._view:GetChild('btn_not_put') + self.btn_tips = self._view:GetChild('btn_tips') + self.btn_put = self._view:GetChild('btn_put') + self.btn_rangxian = self._view:GetChild("btn_rangxian") + + self.btn_rangxian.onClick:Set( + function() + local _curren_msg = UIPackage.CreateObjectFromURL('ui://Common/MessageBox') + self._mainView._view:AddChild(_curren_msg) + _curren_msg:Center() + _curren_msg:GetChild('tex_message').text = '选择让先后再让对方3张牌,且对方先出牌,倍数翻倍' + _curren_msg:GetChild('btn_ok').onClick:Set( + function() + self.ctr_put_card_option.selectedIndex = 0 + self.gameCtr:SendUserRangXian() + _curren_msg:Dispose() + _curren_msg = nil + + end + ) + _curren_msg:GetChild('btn_close').onClick:Set( + function() + _curren_msg:Dispose() + _curren_msg = nil + end + ) + end + ) + + self.btn_put.onClick:Set( + function() + if self.Reset then + return + end + local send_card = {} + self.send_card = {} + local currentCard={} + for i = 1, #self.card_list do + local card = self.card_list[i] + table.insert(currentCard,card.card_code_flower) + if card.btn_card.selected then + send_card[#send_card + 1] = card.card_code_flower + self.send_card[#self.send_card + 1] = card + end + end + + if #send_card == 0 then + self:ErrorTip('请选择要出的牌 ') + else + self.gameCtr:SendCard(send_card,currentCard) + end + end + ) + self.btn_tips.onClick:Set( + function() + if self.tips_card_list ~= nil and #self.tips_card_list ~= 0 then + local index = self.tips_click_count % #self.tips_card_list + 1 + self:ShowTipsCard(index) + self.tips_click_count = self.tips_click_count + 1 + end + end + ) + + -- self.btnNoJiao = self._view:GetChild("btnNoJiao") + -- self.btnNoQiang = self._view:GetChild("btnNoQiang") + -- self.btnQiang = self._view:GetChild("btnQiang") + -- self.btnJiao = self._view:GetChild("btnJiao") + + + self.btnChong.onClick:Set( + function() + self:ChongXuan() + end + ) + + self.btnNoJiao.onClick:Set( + function() + self.gameCtr:SendUserJiaoDiZhu(0) + end + ) + + self.btnNoQiang.onClick:Set( + function() + self.gameCtr:SendUserQiangDiZhu(0) + end + ) + + self.btnQiang.onClick:Set( + function() + self.gameCtr:SendUserQiangDiZhu(1) + end + ) + + self.btnJiao.onClick:Set( + function() + self.gameCtr:SendUserJiaoDiZhu(1) + end + ) + -- 过 + self.btn_not_put.onClick:Set( + function() + self.gameCtr:SendPass() + end + ) + + local function click_piao() + self.ctr_piao.selectedIndex = 0 + self.gameCtr:SendPiao(tonumber(self.ctr_piao_value.selectedPage)) + end + + local btn_piao0 = self._view:GetChild('piao0') + btn_piao0.onClick:Set(click_piao) + + local btn_piao1 = self._view:GetChild('piao1') + btn_piao1.onClick:Set(click_piao) + + local btn_piao2 = self._view:GetChild('piao2') + btn_piao2.onClick:Set(click_piao) + + local btn_piao3 = self._view:GetChild('piao3') + btn_piao3.onClick:Set(click_piao) + + local btn_piao5 = self._view:GetChild('piao5') + btn_piao5.onClick:Set(click_piao) + + local btn_piao8 = self._view:GetChild('piao8') + btn_piao8.onClick:Set(click_piao) +end + +function M:ShowTipsCard(index) + local item = self.tips_card_list[index] + for i = 1, #self.card_list do + local card = self.card_list[i] + local isExsit = false + for j = 1, #item do + if item[j] == self.card_list[i] then + self:UpdateCardMove(card.btn_card, true, false) + isExsit = true + end + end + if isExsit == false then + self:UpdateCardMove(card.btn_card, false, false) + end + end +end + +function M:GetHandCardOffset(count) + local start = -60 + + local offset = 0 + if count > 10 then + offset = start - count + 13 + else + offset = -50 + end + return offset +end + +function M:GetHandCardPos(index, card_count) + local x, y = 0, -18 + local offset = self:GetHandCardOffset(card_count) + local middle_x = self.cards_view.width / 2 + local start_x = middle_x - (card_count / 2 * (self.card_width + offset)) + (offset / 2) + x = start_x + (self.card_width + offset) * (index - 1) + return Vector2.New(x, y) +end +function M:GetHandCardPos1(index, card_count) + local x, y = 0, -18 + local offset = self:GetHandCardOffset(card_count) + local middle_x = self.cards_view.width / 2 + local start_x = middle_x - (card_count / 2 * (self.card_width + offset)) + (offset / 2) + x = start_x + (self.card_width + offset) * (index - 1) + return x, y +end +function M:ChangeOneCodeByFrom(card) + -- if card > 500 then + -- return card + -- end + local flower = math.floor(card / 100) + local number = card % 100 + if number == 2 then + number = 15 + end + return number * 10 + flower +end + +function M:ErrorTip(error_text) + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + self.cor_init_poker = nil + self.cor_init_poker = + coroutine.start( + function() + self.put_error_text.text = error_text + self.ctr_put_error.selectedIndex = 1 + coroutine.wait(2) + self.ctr_put_error.selectedIndex = 0 + end + ) +end + +--TwoDouDiZhu_CardType +--None = 0, +--OneCard = 1, +--OnePair = 2, +--Three = 3, +--Pairs = 4, +--ThreeAndTwo = 5, +--ThreeAndOne = 6, +--Plane = 7, +--PlaneAndTwo = 8, +--PlaneAndOne = 9, +--Straight = 10, +--Bomb = 11 +function M:GetCardTips(type, number, length, mustPutMaxCard, tip_templist) + local tip_list = {} + local sidaisan = false + local touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + local card_map, max_key = self:GetCardMapAndMaxKey(self.card_list) + if type == TwoDouDiZhu_CardType.None then + if DataManager.CurrenRoom.is_new_bout then + tip_list = self:NewBoutTips(card_map) + end + return tip_list, touch_key_list + elseif type == TwoDouDiZhu_CardType.Bomb then + tip_list, touch_key_list = self:CheckBomb(card_map, number, length) + else + local list_type, list_bomb = {}, {} + local touch_type, touch_bomb + list_bomb, touch_bomb = self:CheckBomb(card_map, 0, 4) + + local card_templist = membe_clone(self.card_list) + + if list_bomb ~= nil and tip_templist == nil then + -- body + for i = 1, #list_bomb do + local templist_bomb = list_bomb[i] + for j = 1, #templist_bomb do + for k = 1, #card_templist do + if templist_bomb[j] == card_templist[k] then + -- body + list_remove(card_templist, card_templist[k]) + end + end + end + end + card_map, max_key = self:GetCardMapAndMaxKey(card_templist) + end + + if type == TwoDouDiZhu_CardType.OneCard then + -- if mustPutMaxCard then + -- number = max_key - 1 + -- self:ErrorTip("下家报单,请出最大的牌 ") + -- end + list_type, touch_type = self:CheckOneCard(card_map, number, length) + elseif type == TwoDouDiZhu_CardType.OnePair then + list_type, touch_type = self:CheckOnePair(card_map, number, length) + elseif type == TwoDouDiZhu_CardType.Three then + list_type, touch_type = self:CheckThree(card_map, number, length) + elseif type == TwoDouDiZhu_CardType.Pairs then + list_type, touch_type = self:CheckPairs(card_map, number, length) + elseif type == TwoDouDiZhu_CardType.ThreeAndTwo then + list_type, touch_type = self:CheckThreeAndTwo(card_map, number, length) + elseif type == TwoDouDiZhu_CardType.ThreeAndOne then + list_type, touch_type = self:CheckThreeAndOne(card_map, number, length) + elseif type == TwoDouDiZhu_CardType.Plane then + list_type, touch_type = self:CheckPlane(card_map, number, length, 0) + elseif type == TwoDouDiZhu_CardType.PlaneAndTwo then + list_type, touch_type = self:CheckPlane(card_map, number, length, 2) + elseif type == TwoDouDiZhu_CardType.PlaneAndOne then + list_type, touch_type = self:CheckPlane(card_map, number, length, 1) + elseif type == TwoDouDiZhu_CardType.Straight then + list_type, touch_type = self:CheckStraight(card_map, number, length) + elseif type == TwoDouDiZhu_CardType.FourAndtThree then + list_type, touch_type = self:CheckBomb(card_map, 0, 4) + if #list_type > 0 then + -- body + sidaisan = true + end + end + card_map, max_key = self:GetCardMapAndMaxKey(self.card_list) + tip_list = self:GetMergeAllList(list_type, list_bomb) + --list_bomb, touch_bomb = self:CheckBomb(card_map, 0, 4) + touch_key_list = self:GetMergeAllList(touch_type, touch_bomb) + local tip_templist2 = {} + if tip_templist == nil then + -- body + tip_templist2 = self:GetCardTips(type, number, length, mustPutMaxCard, tip_list) + end + if #tip_templist2 > 0 then + -- body + tip_list = self:GetMergeAllList(tip_list, tip_templist2) + end + end + + if (tip_templist ~= nil and sidaisan == false and #tip_templist >= 1) then + -- body + self:SetNotTouchCard(touch_key_list, card_map) + end + + return tip_list +end + +-- 合并多个list +function M:GetMergeAllList(...) + local lists = {...} + local merge_list = {} + for i = 1, #lists do + local list_item = lists[i] + for j = 1, #list_item do + merge_list[#merge_list + 1] = list_item[j] + end + end + + return merge_list +end + +function M:NewBoutTips(pokerMap) + local new_bout_list = {} + for k, v in pairs(pokerMap) do + new_bout_list[#new_bout_list + 1] = v + end + return new_bout_list +end + +function M:CheckOneCard(pokerMap, num, length) + local one_card_list = {} + local touch_key_list = {} + if #self.card_list < length then + return one_card_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if k > num then + one_card_list[#one_card_list + 1] = {v[1]} + touch_key_list[#touch_key_list + 1] = k + end + end + return one_card_list, touch_key_list +end + +function M:CheckOnePair(pokerMap, num, length) + local one_pair_list = {} + local touch_key_list = {} + if #self.card_list < length then + return one_pair_list, touch_key_list + end + for k, v in pairs(pokerMap) do -- 从三条和对子里面提取 + if #v > 1 and k > num then + one_pair_list[#one_pair_list + 1] = {v[1], v[2]} + touch_key_list[#touch_key_list + 1] = k + end + end + return one_pair_list, touch_key_list +end + +function M:CheckThree(pokerMap, num, length) + local three_list = {} + local touch_key_list = {} + if #self.card_list < length then + return three_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if #v > 2 and k > num then + three_list[#three_list + 1] = {v[1], v[2], v[3]} + touch_key_list[#touch_key_list + 1] = k + end + end + return three_list, touch_key_list +end + +function M:CheckPairs(pokerMap, num, length) + local pairs_list = {} + local touch_key_list = {} + if #self.card_list < length then + return pairs_list, touch_key_list + end + local pair_length = length / 2 + local number_start = num - pair_length + 2 + local number_end = 15 - pair_length + for i = number_start, number_end do + local item_all_list = {} + for j = i, i + pair_length - 1 do + local item_list = pokerMap[j] + if item_list == nil then + break + elseif #item_list < 2 then + break + else + item_all_list[#item_all_list + 1] = item_list[1] + item_all_list[#item_all_list + 1] = item_list[2] + end + if j == i + pair_length - 1 then + pairs_list[#pairs_list + 1] = item_all_list + for k = i, i + pair_length - 1 do + touch_key_list[#touch_key_list + 1] = k + end + end + end + end + return pairs_list, touch_key_list +end + +function M:CheckThreeAndOne(pokerMap, num, length) + local three_and_one_list = {} + local touch_key_list = {} + if #self.card_list < length then + return three_and_one_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if #v >= 3 and k > num then + three_and_one_list[#three_and_one_list + 1] = {v[1], v[2], v[3]} + touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + end + end + return three_and_one_list, touch_key_list +end + +function M:CheckThreeAndTwo(pokerMap, num, length) + local three_and_two_list = {} + local touch_key_list = {} + if #self.card_list < length then + return three_and_two_list, touch_key_list + end + for k, v in pairs(pokerMap) do + if #v >= 3 and k > num then + three_and_two_list[#three_and_two_list + 1] = {v[1], v[2], v[3]} + touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + end + end + return three_and_two_list, touch_key_list +end + +function M:CheckStraight(pokerMap, num, length) + local straight_list = {} + local touch_key_list = {} + if #self.card_list < length then + return straight_list, touch_key_list + end + local number_start = num - length + 2 + local number_end = 15 - length + for i = number_start, number_end do + local item_all_list = {} + for j = i, i + length - 1 do + local item_list = pokerMap[j] + if item_list == nil then + break + else + item_all_list[#item_all_list + 1] = item_list[1] + end + if j == i + length - 1 then + straight_list[#straight_list + 1] = item_all_list + for k = i, i + length - 1 do + touch_key_list[#touch_key_list + 1] = k + end + end + end + end + return straight_list, touch_key_list +end + +function M:CheckBomb(pokerMap, num, length) + local bomb_list = {} + local touch_key_list = {} + local threeA = DataManager.CurrenRoom.room_config.threeA + if threeA == 0 then + -- body + if #self.card_list < length then + return bomb_list, touch_key_list + end + else + if #self.card_list < 3 then + return bomb_list, touch_key_list + end + end + local daxiaowang = 0 + for k, v in pairs(pokerMap) do + if #v == 4 and k > num then --- + bomb_list[#bomb_list + 1] = v + touch_key_list[#touch_key_list + 1] = k + end + + if threeA == 1 and #v == 3 and k == 14 then + bomb_list[#bomb_list + 1] = v + touch_key_list[#touch_key_list + 1] = k + end + end + + return bomb_list, touch_key_list +end + +function M:CheckPlane(pokerMap, num, length, and_num) + local plane_list = {} + local touch_key_list = {} + local l = and_num + 3 + local pair_length = length / l + local number_start = num - pair_length + 2 + local number_end = 15 - pair_length + for i = number_start, number_end do + local item_all_list = {} + for j = i, i + pair_length - 1 do + local item_list = pokerMap[j] + if item_list == nil then + break + elseif #item_list < 3 then + break + else + item_all_list[#item_all_list + 1] = item_list[1] + item_all_list[#item_all_list + 1] = item_list[2] + item_all_list[#item_all_list + 1] = item_list[3] + end + if j == i + pair_length - 1 then + plane_list[#plane_list + 1] = item_all_list + touch_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + end + end + end + return plane_list, touch_key_list +end + +function M:SetNotTouchCard(touch_key_list, card_map) + local all_key_list = {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} + for i = 1, #all_key_list do + local key = all_key_list[i] + local isExsit = self:IsExistByList(touch_key_list, key) + if isExsit == false then + local key_card_item = card_map[key] + if key_card_item ~= nil then + for j = 1, #key_card_item do + local card = key_card_item[j] + card.btn_card.touchable = false + self:UpdateCardMove(card.btn_card, false, false) + end + end + end + end +end + +function M:IsExistByList(list, item) + for i = 1, #list do + if list[i] == item then + return true + end + end + return false +end + +function M:GetCardByNumber(list, number) + for i = 1, #list do + if list[i].card_code_number == number then + return list[i] + end + end + return nil +end + +function M:GetCardMapAndMaxKey(pokerList) + local map, max_key = {}, 0 + for i = 1, #pokerList do + local number = math.floor(pokerList[i].card_code_number / 10) + if number > max_key then + max_key = number + end + if map[number] == nil then + map[number] = {pokerList[i]} + else + map[number][#map[number] + 1] = pokerList[i] + end + end + return map, max_key +end +function M:CheckOnes(pokerMap, num, length) + local one_card_list = {} + local touch_key_list = {} + local text = {} + local text2 = {} + local x = 0 + if #self.card_list < length then + return one_card_list, touch_key_list + end + for k, v in pairs(pokerMap) do + text = {} + text2 = {} + if k > num then + for l, p in pairs(pokerMap) do + for i = 0, length - 1 do + if l == k + i and l ~= 15 and l ~= 16 then + -- body + text[#text + 1] = {p[1]} + text2[#text2 + 1] = l + if #text >= length then + -- body + local x = #one_card_list + local y = #touch_key_list + for i = 1, #text - 1 do + one_card_list[x + 1] = text[1] + touch_key_list[y + 1] = text2[2] + -- for i, v in pairs(text2[i + 1]) do + -- if v ~= nil then + -- table.insert(touch_key_list[x + 1], v) + -- end + -- end + for i, v in pairs(text[i + 1]) do + if v ~= nil then + table.insert(one_card_list[x + 1], v) + end + end + end + end + end + end + end + end + end + return one_card_list, touch_key_list, length +end +function M:Clear() + self:PlayScore(nil) + self:SetOutCardInfo(nil, false) + self.card_list = {} + self.out_card_list = {} + self.cards_view:RemoveChildren(0, -1, true) + self:ChangeJiao(-1) + self.CurrenPokerList = {} + -- self.mask_liangpai:RemoveChildren(0,-1,true) +end + +function M:Destroy() + Stage.inst.onTouchMove:Remove(self.touchMoveFun) +end + +return M diff --git a/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_Protocol.lua b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_Protocol.lua new file mode 100644 index 00000000..a6bdb78c --- /dev/null +++ b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_Protocol.lua @@ -0,0 +1,50 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/13 10:51 +--- +local TwoDouDiZhu_Protocol = { + TwoDouDiZhu_ConfirmToNextGame = "1003", + + TwoDouDiZhu_Send_Card = "1013", + + TwoDouDiZhu_Send_Guo = "1014", + + TwoDouDiZhu_Send_Piao = "1015", + + TwoDouDiZhu_Ming_Card = "2117", + + TwoDouDiZhu_Init_Card = "2011", + + TwoDouDiZhu_Options = "2004", + + TwoDouDiZhu_Index_Move = "2016", + + TwoDouDiZhu_Play_Succ = "2021", + + TwoDouDiZhu_Pass_Succ = "2030", + + TwoDouDiZhu_Put_Error = "2111", + + TwoDouDiZhu_Bomb_Score = "2118", + + TwoDouDiZhu_Result = "2007", + TwoDouDiZhu_Piao_Tip = "2031", + TwoDouDiZhu_Piao_Action = "2032", + + TwoDouDiZhu_ConfirmToNextGameSucc = "2010", + PT_GAMETUOGUAN = "2029",--托管 + SEND_TUOGUAN = "1018",--托管 + + GAME_EVT_ALERT_JIAO_DIZHU = "2041", --通知玩家叫地主 + GAME_EVT_USER_JAIO_DIZHU_REQ = "2042", --玩家叫地主 叫/不叫 + GAME_EVT_USEr_JIAO_DIZHU_RSP = "2043", --玩家叫地主广播 "seat": 座位 "jiao": 0-不叫 1-叫 "count": 抢/叫次数 + GAME_EVT_USER_ALERT_QIANG_DIZHU = "2044", --通知玩家抢地主 + GAME_EVT_USER_QIANG_DIZHU_REQ = "2045", --玩家抢地主 "qiang": 0-不抢 1-抢 + GAME_EVT_USER_QIANG_DIZHU_RSP = "2046", --玩家抢地主广播 “seat”:座位号 "qiang": 0-不抢 1-抢 "count": 抢/叫次数 + GAME_EVT_DIZHU_INFO = "2047", --确定地主 "seat":座位号 "cards": 三张底牌 "mul": 倍数 + GAME_EVT_DIZHU_RANG_XIAN = "2051", + GAME_EVT_DIZHU_RANG_XIAN_RSP = "2052", + +} + +return TwoDouDiZhu_Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_ResultView.lua b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_ResultView.lua new file mode 100644 index 00000000..6b409052 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_ResultView.lua @@ -0,0 +1,263 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 11:05 +--- +require("Game.View.ResultView") + +local TwoDouDiZhu_ResultView = {} + +local M = TwoDouDiZhu_ResultView + +function TwoDouDiZhu_ResultView.new(blur_view, data, roomid, over, win_seat, dissolve, remaincards,feiCards) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + + self.class = "TwoDouDiZhu_ResultView" + self._currenIndex = 0 + self._close_zone = false + --self._blur_view = blur_view + self._gamectr = ControllerManager.GetController(GameController) + printlog("++++++++++++++++++++++++++++") + pt(feiCards) + self:init("ui://Extend_Poker_TwoDouDiZhu/clearing", data, roomid, over, win_seat, dissolve, remaincards,feiCards) + return self +end + +function M:init(url, data, roomid, over, win_seat, dissolve, remaincards,feiCards) + + ResultView.init(self, url) + + --self:InitData(data,roomid) + --self:InitData(data,roomid) + if dissolve == 1 then + -- body + self:InitData(data, win_seat, roomid) + else + self:InitData_One(data, win_seat, over, roomid, remaincards,feiCards) + end + +end + + +-- 小结算 +function M:InitData_One(data, winseat, over, roomid, remaincards,feiCards) + + local room = DataManager.CurrenRoom + self._view:GetController("sdk").selectedIndex = 1 + local _gamectr = ControllerManager.GetController(GameController) + local list_view = self._view:GetChild("player_list_1") + list_view:RemoveChildrenToPool() + + self.feiqi = self._view:GetChild("feiqi") + self.feiqi:RemoveChildrenToPool() + if feiCards~= nil then + for i=1,#feiCards do + local card_code_obj = UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/ddz_poker_"..feiCards[i]) + self.feiqi:AddChild(card_code_obj) + end + end + + for i = 1, #data do + local player = data[i] + local item = list_view:AddItemFromPool("ui://Extend_Poker_TwoDouDiZhu/clearing_item_1") + + local boom = item:GetChild("boom") + boom.text = player.thisboomnum + + local piao = item:GetChild("piao") + if player.piao <= 0 then + piao.text = "0" + else + piao.text = "" .. player.piao + end + + local nichen = item:GetChild("nichen") + + if player.nick ~= nil then + -- body + nichen.text = tostring(player.nick) + else + + nichen.text = tostring(player.self_user.nick_name) + end + + + local shengpai = item:GetChild("shengpai") + if player.cards ~= nil then + -- body + shengpai.text = tostring(#player.cards) + else + shengpai.text = tostring(#player.hand_list) + end + + local rt = 1 + if room.hpOnOff == 1 then + rt = room.score_times + end + + local hp_nonnegative = room:checkHpNonnegative() + local roundScore = player.winscore + if hp_nonnegative then + + local jifen = "" + if roundScore > 0 then + jifen = "+" .. roundScore + else + jifen = "" .. roundScore + end + + local tili = "" + local limit = "" + if player.hp_info.round_actual_hp > 0 then + tili = "(+" .. d2ad(player.hp_info.round_actual_hp) .. ")" + if player.hp_info.upper_limit then + limit = "达到上限" + end + else + tili = "(" .. d2ad(player.hp_info.round_actual_hp) .. ")" + if player.hp_info.upper_limit then + limit = "达到下限" + end + end + + item:GetChild("score").text = jifen .. tili .. limit + else + + local jifen = "" + if roundScore >= 0 then + jifen = "+" .. roundScore + else + jifen = "" .. roundScore + end + jifen = jifen .. " " + + local tili = "" + if room.hpOnOff > 0 then + + local need = roundScore * rt + tili = "(" + if roundScore > 0 then + tili = tili .. "+" .. tostring(need) + else + tili = tili .. tostring(need) + end + + tili = tili .. ")" + end + + + item:GetChild("score").text = jifen .. tili + end + + if roundScore >= 0 then + + if room.self_player.seat == player.seat then + -- body + self._view:GetController("result").selectedIndex = 1 + end + else + + if room.self_player.seat == player.seat then + self._view:GetController("result").selectedIndex = 0 + end + end + + end + + + if over == 0 then + -- body + local btn_confirm = self._view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + self:Destroy() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:ConformToNextGame() + + end) + else + local btn_confirm = self._view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + --self:Destroy() + self:InitData(data, winseat, roomid) + -- ViewManager.ChangeView(ViewManager.View_Lobby) + end) + + end +end + +-- 大结算 +function M:InitData(data, winseat, roomid) + + self._view:GetController("sdk").selectedIndex = 0 + + + + local room = DataManager.CurrenRoom + + local rt = 1 + if room.hpOnOff == 1 and room.score_times ~= 1 then + rt = room.score_times + end + + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + + local user = room:GetPlayerBySeat(data[i].seat).self_user + + player_list[i].id = user.account_id + + player_list[i].score = data[i].score + player_list[i].hp_info = data[i].hp_info + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].seat = data[i].seat + player_list[i].head_url = data[i].self_user.head_url + + if data[i].entrust ~= nil then + player_list[i].entrust = data[i].entrust > 0 + else + player_list[i].entrust = false + end + + player_list[i].param = {} + + player_list[i].param[1] = {} + player_list[i].param[1].key = "赢局数:" + player_list[i].param[1].value = tostring(data[i].settle_log.winnum) + + player_list[i].param[2] = {} + player_list[i].param[2].key = "打出炸弹数:" + player_list[i].param[2].value = tostring(data[i].settle_log.boomnum) + + player_list[i].param[3] = {} + player_list[i].param[3].key = "春天次数:" + player_list[i].param[3].value = tostring(data[i].settle_log.springnum) + + player_list[i].param[4] = {} + player_list[i].param[4].key = "当局最高分:" + player_list[i].param[4].value = tostring(data[i].settle_log.maxscore * rt) + + if data[i].daniao > 0 then + player_list[i].flag = {"打鸟"} + end + end + + self:GenerateRoomResultInfo(room.room_config.Times, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + self:InitBigResult(room) + local big_result = self._view:GetChild("big_result") + local lst_p = big_result:GetChild("player_list") + -- local list_param = com_p:GetChild("list_param") + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + end + +end + +return M diff --git a/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_ResultView1.lua b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_ResultView1.lua new file mode 100644 index 00000000..26294e42 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_ResultView1.lua @@ -0,0 +1,245 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 11:05 +--- +--require("Game.View.ResultView") + +local TwoDouDiZhu_ResultView = {} + +local M = TwoDouDiZhu_ResultView + +function TwoDouDiZhu_ResultView.new(blur_view, data, roomid, over, win_seat, dissolve, remaincards) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + + self.class = "TwoDouDiZhu_ResultView" + self._currenIndex = 0 + self._close_zone = false + --self._blur_view = blur_view + self._gamectr = ControllerManager.GetController(GameController) + + self:init("ui://Extend_Poker_TwoDouDiZhu/clearing", data, roomid, over, win_seat, dissolve, remaincards) + return self +end + +function M:init(url, data, roomid, over, win_seat, dissolve, remaincards) + BaseWindow.init(self, url) + self.big_result = self._view:GetChild("big_result") + self.big_result.visible = false + + self.n47 = self._view:GetChild("n47") + self.n47.visible = false + --ResultView.init(self, url) + + --self:InitData(data,roomid) + --self:InitData(data,roomid) + local player = self.big_result:GetChild("player") + player.visible = false + + if dissolve == 1 then + -- body + self:InitData(data, win_seat, roomid) + + else + self:InitData_One(data, win_seat, over, roomid, remaincards) + end + +end + + +-- 小结算 +function M:InitData_One(data, winseat, over, roomid, remaincards) + + local room = DataManager.CurrenRoom + -- self._view:GetController("sdk").selectedIndex = 1 + local _gamectr = ControllerManager.GetController(GameController) + local list_view = self._view:GetChild("player_list_1") + list_view:RemoveChildrenToPool() + + for i = 1, #data do + local player = data[i] + local item = list_view:AddItemFromPool("ui://Extend_Poker_TwoDouDiZhu/clearing_item_1") + + local boom = item:GetChild("boom") + boom.text = player.thisboomnum + + local piao = item:GetChild("piao") + if player.piao <= 0 then + piao.text = "0" + else + piao.text = "" .. player.piao + end + + local nichen = item:GetChild("nichen") + + if player.nick ~= nil then + -- body + nichen.text = tostring(player.nick) + else + + nichen.text = tostring(player.self_user.nick_name) + end + + + local shengpai = item:GetChild("shengpai") + if player.cards ~= nil then + -- body + shengpai.text = tostring(#player.cards) + else + shengpai.text = tostring(#player.hand_list) + end + + local rt = 1 + if room.hpOnOff == 1 then + rt = room.score_times + end + + local hp_nonnegative = room:checkHpNonnegative() + local roundScore = player.winscore + if hp_nonnegative then + + local jifen = "" + if roundScore > 0 then + jifen = "+" .. roundScore + else + jifen = "" .. roundScore + end + + local tili = "" + local limit = "" + if player.hp_info.round_actual_hp > 0 then + tili = "(+" .. d2ad(player.hp_info.round_actual_hp) .. ")" + if player.hp_info.upper_limit then + limit = "达到上限" + end + else + tili = "(" .. d2ad(player.hp_info.round_actual_hp) .. ")" + if player.hp_info.upper_limit then + limit = "达到下限" + end + end + + item:GetChild("score").text = jifen .. tili .. limit + else + + local jifen = "" + if roundScore >= 0 then + jifen = "+" .. roundScore + else + jifen = "" .. roundScore + end + jifen = jifen .. " " + + local tili = "" + if room.hpOnOff > 0 then + + local need = roundScore * rt + tili = "(" + if roundScore > 0 then + tili = tili .. "+" .. tostring(need) + else + tili = tili .. tostring(need) + end + + tili = tili .. ")" + end + + + item:GetChild("score").text = jifen .. tili + end + + if roundScore >= 0 then + + if room.self_player.seat == player.seat then + -- body + --self._view:GetController("result").selectedIndex = 1 + end + else + + if room.self_player.seat == player.seat then + --self._view:GetController("result").selectedIndex = 0 + end + end + + end + + + if over == 0 then + -- body + local btn_confirm = self._view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + self:Destroy() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:ConformToNextGame() + + end) + else + local btn_confirm = self._view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + --self:Destroy() + self:InitData(data, winseat, roomid) + -- ViewManager.ChangeView(ViewManager.View_Lobby) + end) + + end + + self.n47.visible = true + self.big_result.visible = false +end + +-- 大结算 +function M:InitData(data, winseat, roomid) + + -- self._view:GetController("sdk").selectedIndex = 0 + self.n47.visible = false + self.big_result.visible = true + + local room = DataManager.CurrenRoom + + local rt = 1 + if room.hpOnOff == 1 and room.score_times ~= 1 then + rt = room.score_times + end + + -- 赋值result_info,聊天室分享需要 + + --self:GenerateRoomResultInfo(room.room_config.Times, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + --self:InitBigResult(room) + local big_result = self._view:GetChild("big_result") + local lst_p = big_result:GetChild("player_list") + lst_p:RemoveChildrenToPool() + + big_result:GetChild('txt_room_id').text = '房号:' .. roomid + big_result:GetChild('txt_game_name').text = "二人斗地主" + big_result:GetChild('txt_game_data').text = os.date('%Y-%m-%d %H:%M', os.time()) + + for i = 1, #data do + local user = room:GetPlayerBySeat(data[i].seat).self_user + local item = lst_p:AddItemFromPool() + item:GetChild('txt_name').text = user.nick + local head = item:GetChild('head'):GetChild('n4') + ImageLoad.Load(data[i].self_user.head_url, head) + item:GetChild('txt_navigate').text = tostring(data[i].total_score) + end + + -- local list_param = com_p:GetChild("list_param") + for i = 1, lst_p.numChildren do + local com_p = lst_p:GetChildAt(i - 1) + local list_param = com_p:GetChild("list_param") + for j = 1, list_param.numChildren do + local tem = list_param:GetChildAt(j - 1) + tem:GetChild("txt_value").textFormat.size = 30 + end + end + + local btn_close = big_result:GetChild('btn_close') + btn_close.onClick:Set( + function() + self:Destroy() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + +end + +return M diff --git a/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_RightPanelView.lua b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_RightPanelView.lua new file mode 100644 index 00000000..1cb9f26e --- /dev/null +++ b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_RightPanelView.lua @@ -0,0 +1,88 @@ +local MainRightPanelView = require("Game.View.MainRightPanelView") +local TwoDouDiZhu_RightPanelView = {} +local M = TwoDouDiZhu_RightPanelView +local function __init(self,mainView,view) + local right_panel = view + + local btn_setting = right_panel:GetChild("btn_setting") + btn_setting.onClick:Set(function() + local _settingView = mainView:NewSettingView() + _settingView.stateIndex = (mainView._room.curren_round >= 1 and mainView._allow_dissmiss) and 2 or 1 + _settingView.cd_time = mainView.dismiss_room_cd_time + _settingView:Show() + + local room = DataManager.CurrenRoom + _settingView.onCallback:Add(function(context) + local _gamectr = ControllerManager.GetController(GameController) + if (room.CurnrenState == StateType.Ready) then + _gamectr:LevelRoom(function(response) + if (response.ReturnCode == 0) then + ViewManager.ChangeView(ViewManager.View_Lobby) + GameApplication.Instance:ShowTips("房间已解散!") + end + end) + else + print("mainView.dismiss_room_cd_time"..mainView.dismiss_room_cd_time) + if mainView.dismiss_room_cd_time > 0 then + GameApplication.Instance:ShowTips("您还处于解散冷却时间当中,请稍后重试!") + else + _gamectr:AskDismissRoom() + end + end + end) + end) + + self._tex_data = right_panel:GetChild("tex_data") + self._tex_time = right_panel:GetChild("tex_time") + self._pb_batteryLevel = right_panel:GetChild("pb_batteryLevel") + self._xinhao = right_panel:GetController("xinhao") + self.ctr_xh = right_panel:GetChild("gcm_xinhao"):GetController("c1") + self.ctr_wifi = right_panel:GetChild("gcm_wifi"):GetController("c1") + self._tex_ping = right_panel:GetChild("gcm_xinhao"):GetChild("n7") + + self.ctr_log = right_panel:GetController("log") + local btn_log = right_panel:GetChild("btn_log") + btn_log.onClick:Set(function() + if self.onLogCallback then + self.onLogCallback() + end + end) + + self._total_time = 0 + self:__UpdateTime() + + -- self._timer = Timer.New(handler(self,self.__UpdateTime),10,-1,true) + -- self._timer:Start() +end +function TwoDouDiZhu_RightPanelView.new(mainView,view) + setmetatable(M, {__index = MainRightPanelView}) + local self = setmetatable({}, {__index = M}) + self.class = "TwoDouDiZhu_RightPanelView" + __init(self,mainView,view) + return self +end +function M:__UpdateTime() + self._tex_data.text = os.date("%Y-%m-%d") + self._tex_time.text = os.date("%H:%M") + if Application.platform == RuntimePlatform.IPhonePlayer or Application.platform == RuntimePlatform.Android then + self._pb_batteryLevel.value = GameApplication.Instance:GetBatteryLevel() + end + + local NetworkReachability = UnityEngine.NetworkReachability + local _client = ControllerManager.GameNetClinet + if not _client then return end + local ping = _client:getAveragePingTime() + if not ping then return end + ping = math.floor(ping / 2) + if ping > 300 then ping =300 end + if ping <= 100 then + self.ctr_xh.selectedIndex = 0 + elseif ping <= 300 then + self.ctr_xh.selectedIndex = 1 + else + self.ctr_xh.selectedIndex = 2 + end + self._tex_ping.text = ping .. "ms" +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_Room.lua b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_Room.lua new file mode 100644 index 00000000..296f5d14 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_Room.lua @@ -0,0 +1,26 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 14:36 +--- +local TwoDouDiZhu_Player = import(".TwoDouDiZhu_Player") + +local TwoDouDiZhu_Room = { +} + +local M = TwoDouDiZhu_Room + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Room}) + local self = setmetatable({}, {__index = M}) + self:init() + return self +end + + + +function M:NewPlayer() + return TwoDouDiZhu_Player.new() +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_RoomConfig.lua b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_RoomConfig.lua new file mode 100644 index 00000000..9edaa583 --- /dev/null +++ b/lua_probject/extend_project/extend/poker/twodoudizhu/TwoDouDiZhu_RoomConfig.lua @@ -0,0 +1,199 @@ +--- +--- Created by 谌建军. +--- DateTime: 2017/12/19 10:54 +--- +local M = {} + + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.class = "TwoDouDiZhu_RoomConfig" + self.Leaf = config.leaf + self.Rule = config.rule + self.Times = config.times + self.WillBeOut = config.willBeOut + self.Heart10 = config.heartten + self.BombSpring = config.minboom + self.AA = config.aa + self.PlayerNum = config.maxPlayers + self.showlength = config.showlength + self.fourBeltThree=config.fourBeltThree + self.demolition=config.demolition + self.fangzuobi=config.fangzuobi + self.planelack=config.planelack + self.threelack=config.threelack + self.threeA=config.threeA + self.tuoguan_active_time=config.tuoguan_active_time + self.tuoguan=config.tuoguan + self.tuoguan_result_type=config.tuoguan_result_type + self.isNonnegative=config.isNonnegative + self.sandaidan = config.sandaidan + self.isHidden = config.isHidden + self.ba = config.ba + self.fs = config.fs + + self.fourBeltThree = config.fourBeltThree + self.threeBeltTwo = config.threeBeltTwo + self.baseMul =config.baseMul + self.rangXian = config.rangXian + self.threezhang = config.threezhang + if config.piao ~= nil then + self.piao = config.piao + else + self.piao = 0 + end + + if config.daniao ~= nil then + self.daniao = config.daniao + else + self.daniao = 0 + end + + if self.isNonnegative == nil then + self.isNonnegative = 0 + end + self.energyTab=config.energyTab + + if self.energyTab==nil then + self.energyTab=0 + end + + return self +end + +function M:GetDes(sp) + sp = sp or " " + local str = "" + -- str = str.. self.Times.."局"..sp + str = str .. RoomConfig.GetDes(self, sp).." " + local count=1 + if self.rangXian == 1 then + str = str.. "让先" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.fourBeltThree == 2 then + str = str.. "四带二" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.threeBeltTwo == 1 then + str = str.. "三带二" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.baseMul == 1 then + str = str.. "一倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str.. "二倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.Rule == 1 then + str = str.. "随机首叫" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.threezhang == 1 then + str = str.. "三张" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + return str +end + + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_Poker_TwoDouDiZhu/gamerule") + return gamerulepanel +end + + +function M:GetGameSMSize() + return 467,500 +end + + +function M:GetGameName() + return "二人斗地主" +end + +--function M:GetIsShowCardNumber() +-- return self.ShowNumber == 1 +--end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXGameController.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXGameController.lua new file mode 100644 index 00000000..f4727e90 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXGameController.lua @@ -0,0 +1,500 @@ +local RB_Protocol = import(".Protocol") +local FZTipList = require("main.zipai.FZData") +local RB_GameEvent = import(".RunBeard_GameEvent") +local M = {} + +--- Create a new HZ_GameController +function M.new() + setmetatable(M,{__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("常德跑胡子") + self.class = "RB_GameController" + return self +end + +function M:init(name) + GameController.init(self,name) + + self._eventmap[RB_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[RB_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[RB_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[RB_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[RB_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[RB_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + + self._eventmap[RB_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[RB_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[RB_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[RB_Protocol.GAME_EVT_QIPAI] = self.OnEventQIPAI + self._eventmap[RB_Protocol.GAME_EVT_ADD_CARD] = self.OnAddCard + self._eventmap[RB_Protocol.GAME_EVENT_XIPAI] = self.OnEventXiPai + self._eventmap[RB_Protocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim + + +end + +function M:SendXiPaiAction(callBack) + local _data = {} + local _client = ControllerManager.GameNetClinet + _client:send(RB_Protocol.GAME_XIPAI, _data) + self.XiPaiCallBack=callBack +end + +function M:OnEventXiPai(evt_data) + if evt_data["result"]==0 then + if self.XiPaiCallBack then + self.XiPaiCallBack() + end + else + ViewUtil.ErrorTip(1000000,"申请洗牌失败") + end + +end + +function M:OnEventXiPaiAnim(evt_data) + printlog("洗牌动画===》》》》") + pt(evt_data) + local playeridList = evt_data["list"] + local isXiPai=false + local otherisXiPai = false + if playeridList and #playeridList>0 then + for i=1,#playeridList do + local p = self._room:GetPlayerById(playeridList[i]) + if p== self._room.self_player then + isXiPai=true + else + otherisXiPai=true + end + end + end + + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.EventXiPai,isXiPai,otherisXiPai) + end) +end + +-- 发送出牌指令到服务器 +function M:SendOutCard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_DIS_CARD, _data) + end + +end +--GAME_CHANGE_CARD GAME_DIS_CARD +function M:SendChangeCards( card_list ) + local _data = {} + if card_list then + _data["card_list"] = card_list + else + _data["card_list"]={} + end + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_CHANGE_CARD, _data) + end +end + +function M:SendChangeTypeFace(TypeFace) + -- body + local _data = {} + _data["typeface"] = TypeFace + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_CHANGE_TYPEfACE, _data) + end +end + + +function M:ConformToNextGame( ) + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_EVT_CHUI) + end +end + +-- 发送放子选择到服务器 +function M:SendAction(id,num) + local _data = {} + _data["id"] = id + if num ~=nil then + _data["biid"] = num + end + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_ACTION, _data) + end +end + +function M:OnEventSendCards(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + _room.curren_round = _room.curren_round + 1 + if _room.curren_round > 0 then _room.playing = true end + local handcards = {} + if evt_data.card_list and #evt_data.card_list>0 then + handcards = evt_data["card_list"] + else + ViewUtil.ErrorTip(100000,"发牌数据异常") + end + + local p = _room.self_player + local seat =nil + if evt_data.bank_seat then + seat = evt_data["bank_seat"] + else + ViewUtil.ErrorTip(100001,"发牌座位异常") + end _room.banker_seat = seat + for i=1,#_room.player_list do + _room.self_player.handcard_list ={} + _room.self_player.card_list = {} + _room.player_list[i].hand_left_count = 20 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + _room.player_list[i].outcard_list = {} + _room.player_list[i].hu_xi = 0 + end + self._cacheEvent:Enqueue(function() + _room.self_player.handcard_list=handcards + self._room.self_player.hand_left_count = #handcards + DispatchEvent(self._dispatcher,RB_GameEvent.SendCards, p) + ControllerManager.IsSendCard=true + end) +end + +function M:OnEventOutCard(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + if(seat == _room.self_player.seat) then + list_remove(_room.self_player.handcard_list,card) + end + p.DiceCard = card + p.hand_left_count = p.hand_left_count -1 + DispatchEvent(self._dispatcher,RB_GameEvent.OutCard, p,card) + end) +end + +function M:OnEventQIPAI(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + if(not p.outcard_list) then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + DispatchEvent(self._dispatcher,RB_GameEvent.QiCard, seat,card) + end) +end + +function M:OnEventTakeCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + if card ~=0 then + p.DiceCard = card + end + DispatchEvent(self._dispatcher,RB_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnAddCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local p = _room:GetPlayerBySeat(seat) + + self._cacheEvent:Enqueue(function() + p.DiceCard = 0 + p.hand_left_count = p.hand_left_count +1 + if (seat == _room.self_player.seat) then + _room.self_player.handcard_list[#_room.self_player.handcard_list+1] = card + end + DispatchEvent(self._dispatcher,RB_GameEvent.AddCard, seat, card) + end) +end + +function M:OnEventOutHint(evt_data) + self._cacheEvent:Enqueue(function() + + DispatchEvent(self._dispatcher,RB_GameEvent.OutHint) + end) + +end + +function M:OnEventTurn(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + local uid = evt_data["uid"] + for i=1,#list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + tip.bi_list = dtip["bi_list"] + if (dtip["opcard"]) then + local opcard = dtip["opcard"] + tip.OpCard = opcard + table.sort(tip.OpCard) + tip.OpCard[3] = tip.Card + end + tiplist:AddTip(tip) + + end + DispatchEvent(self._dispatcher,RB_GameEvent.FZTips, tiplist,uid) + end) +end + +function M:OnEventFzAction(evt_data) + local _room = self._room + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local ftype = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + local huxi = evt_data["hu_xi"] + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local isNeedDelHandCard =0 + p.hu_xi = huxi + local fz = {} + fz.card = card + fz.type = ftype + fz.active_card = actice_card + fz.from_seat = from_seat + fz.opcard =opcard + local remove_num = #opcard + if ftype == RB_FZType.Chi then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Bi then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + list_remove(_room.self_player.handcard_list,fz.card) + end + elseif ftype == RB_FZType.Peng then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Kan then + if (p == _room.self_player) then + if #opcard==2 then + _room.self_player.handcard_list[#_room.self_player.handcard_list+1] = card + end + p.fz_list[#p.fz_list+1] = fz + end + elseif ftype == RB_FZType.ChouWei then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,2 do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Wei then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Pao then + + if (p == _room.self_player) then + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + if p.fz_list[i].type == RB_FZType.Kan then + isNeedDelHandCard =3 + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + remove_num= 0 + p.fz_list[i].type= RB_FZType.Pao + end + end + local num =0 + for i=1,#_room.self_player.handcard_list do + if card == _room.self_player.handcard_list[i] then + num=num+1 + end + end + if num>0 then + isNeedDelHandCard =num + + for i=1,num do + list_remove(_room.self_player.handcard_list,card) + end + local isAddTi =false + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Pao + isAddTi=true + remove_num= 0 + end + end + if isAddTi==false then + p.fz_list[#p.fz_list+1] = fz + end + end + + else + local num =0 + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Pao + num=1 + remove_num= 0 + end + end + if num==0 then + p.fz_list[#p.fz_list+1] = fz + end + end + + elseif ftype == RB_FZType.Ti then + + if (p == _room.self_player) then + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + if p.fz_list[i].type == RB_FZType.Kan then + isNeedDelHandCard =3 + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + remove_num= 0 + p.fz_list[i].type= RB_FZType.Ti + end + end + local num =0 + for i=1,#_room.self_player.handcard_list do + if card == _room.self_player.handcard_list[i] then + num=num+1 + end + end + if num>0 then + isNeedDelHandCard =num + + for i=1,num do + list_remove(_room.self_player.handcard_list,card) + end + local isAddTi =false + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Ti + remove_num= 0 + isAddTi=true + end + end + if isAddTi==false then + p.fz_list[#p.fz_list+1] = fz + end + end + + else + local num =0 + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Ti + remove_num= 0 + num=1 + end + end + if num==0 then + p.fz_list[#p.fz_list+1] = fz + end + + end + + end + + + p.hand_left_count = p.hand_left_count - remove_num + if fz.type == RB_FZType.Pao or fz.type == RB_FZType.Ti then + coroutine.start(function() + coroutine.wait(0.5) + DispatchEvent(self._dispatcher,RB_GameEvent.FangziAction, fz, p,isNeedDelHandCard) + end) + else + DispatchEvent(self._dispatcher,RB_GameEvent.FangziAction, fz, p,isNeedDelHandCard) + end + + end) +end + +function M:OnEventHu(evt_data) + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + -- print(win_p.hand_left_count) + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + table.sort( win_p.card_list, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher,RB_GameEvent.ZPHuCard, evt_data["seat"],evt_data["from_seat"],cards) + end) +end + +function M:OneventResult1(evt_data) + local over = evt_data.type + --0:小结算 1:小大结算 2:大结算 + self._room.playing = false + if 0 == over then + local result = evt_data.result + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil,true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXGameInfo.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXGameInfo.lua new file mode 100644 index 00000000..f9256127 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXGameInfo.lua @@ -0,0 +1,353 @@ +local EXGameInfo = {} + +local M = EXGameInfo + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = 'EXGameInfo' + UIPackage.AddPackage('extend/zipai/changdepaohuzi/ui/Extend_Poker_ChangdeWHZ') + UIPackage.AddPackage('extend/zipai/changdepaohuzi/ui/Info_Poker_ChangdeWHZ') + return self +end + +function M:FillData() + self._maxPlayer = 3 -- 默认玩家人数 + self._roundChoice = 3 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL('ui://Extend_Poker_ChangdeWHZ/Cgm_create_room') + + if oldGameVersion ==1 then + self._config:GetChild("xipai").visible=false + end + + if oldGameVersion==2 then + self._config:GetController("xipai").selectedIndex=1 + self.xipaiValueText=self._config:GetChild('xipaifen') + self.xipaiValueText.text=1 + self.xipaiValue=1 + + self.anchouValueText=self._config:GetChild('anchoufen') + self.anchouValueText.text=1 + self.anchouValue=1 + + local btn_cr = self._config:GetChild('sdsrbtn') + btn_cr.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.xipaiValueText.text=value/1000 + self.xipaiValue=value/1000 + + end, 3, nil) + gniv:Show() + + + end + ) + local btn_cr2 = self._config:GetChild('anchoubtn') + btn_cr2.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.anchouValueText.text=value/1000 + self.anchouValue=value/1000 + + end, 3, nil) + gniv:Show() + + + end + ) + end + + + local btn_jia = self._config:GetChild('btn_jia') + local btn_jian = self._config:GetChild('btn_jian') + local btn_jia1 = self._config:GetChild('btn_jia1') + local btn_jian1 = self._config:GetChild('btn_jian1') + local btn_jia2 = self._config:GetChild('btn_jia2') + local btn_jian2 = self._config:GetChild('btn_jian2') + -- local fS=self._config:GetChild('btn_round8'):GetChild("title") + -- fS.text="1局" + -- fS=self._config:GetChild('btn_round16'):GetChild("title") + -- fS.text="8局" + btn_jia.onClick:Set( + function() + if self._config:GetController('tun').selectedIndex ~= 5 then + self._config:GetController('tun').selectedIndex = self._config:GetController('tun').selectedIndex + 1 + end + if self._config:GetController('tun').selectedIndex == 5 then + btn_jia.touchable = false + btn_jia.grayed = true + end + if self._config:GetController('tun').selectedIndex > 0 then + btn_jian.touchable = true + btn_jian.grayed = false + end + end + ) + btn_jian.onClick:Set( + function() + if self._config:GetController('tun').selectedIndex ~= 0 then + self._config:GetController('tun').selectedIndex = self._config:GetController('tun').selectedIndex - 1 + end + if self._config:GetController('tun').selectedIndex == 0 then + btn_jian.touchable = false + btn_jian.grayed = true + end + if self._config:GetController('tun').selectedIndex < 5 then + btn_jia.touchable = true + btn_jia.grayed = false + end + end + ) + btn_jia1.onClick:Set( + function() + if self._config:GetController('tun').selectedIndex ~= 5 then + self._config:GetController('tun').selectedIndex = self._config:GetController('tun').selectedIndex + 1 + end + if self._config:GetController('tun').selectedIndex == 5 then + btn_jia1.touchable = false + btn_jia1.grayed = true + end + if self._config:GetController('tun').selectedIndex > 0 then + btn_jian1.touchable = true + btn_jian1.grayed = false + end + end + ) + btn_jian1.onClick:Set( + function() + if self._config:GetController('tun').selectedIndex ~= 0 then + self._config:GetController('tun').selectedIndex = self._config:GetController('tun').selectedIndex - 1 + end + if self._config:GetController('tun').selectedIndex == 0 then + btn_jian1.touchable = false + btn_jian1.grayed = true + end + if self._config:GetController('tun').selectedIndex < 5 then + btn_jia1.touchable = true + btn_jia1.grayed = false + end + end + ) + + btn_jia2.onClick:Set( + function() + if self._config:GetController('tun').selectedIndex ~= 5 then + self._config:GetController('tun').selectedIndex = self._config:GetController('tun').selectedIndex + 1 + end + if self._config:GetController('tun').selectedIndex == 5 then + btn_jia2.touchable = false + btn_jia2.grayed = true + end + if self._config:GetController('tun').selectedIndex > 0 then + btn_jian2.touchable = true + btn_jian2.grayed = false + end + end + ) + btn_jian2.onClick:Set( + function() + if self._config:GetController('tun').selectedIndex ~= 0 then + self._config:GetController('tun').selectedIndex = self._config:GetController('tun').selectedIndex - 1 + end + if self._config:GetController('tun').selectedIndex == 0 then + btn_jian2.touchable = false + btn_jian2.grayed = true + end + if self._config:GetController('tun').selectedIndex < 5 then + btn_jia2.touchable = true + btn_jia2.grayed = false + end + end + ) +end +local _help_url = 'ui://Info_Poker_ChangdeWHZ/Com_help' +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_Poker_ChangdeWHZ/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_Poker_ChangdeWHZ/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list = {"全名堂","红黑点","多红多番"} +function M:GetPlayList() + return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local wanfa_C = _config:GetController('btn_Controller').selectedIndex + local round = _config:GetController('round').selectedIndex+1 --== 0 and 1 or 2 + local Cost = _config:GetController('Cost').selectedIndex + local tun = _config:GetController('tun').selectedIndex + local fengding = _config:GetController('fengding').selectedIndex + local tuanyuan = _config:GetController('tuanyuan').selectedIndex + local hanghangxi = _config:GetController('hanghangxi').selectedIndex + local siqi = _config:GetController('siqi').selectedIndex + local shuahou = _config:GetController('shuahou').selectedIndex + local huangfan = _config:GetController('huangfan').selectedIndex + local jiaxingxing = _config:GetController('jiaxingxing').selectedIndex + local tinghu = _config:GetController('tinghu').selectedIndex + local duizifu = _config:GetController('duizifu').selectedIndex + local back = _config:GetController('Back').selectedIndex + local yuan = _config:GetController('yuan').selectedIndex + local tianhu = _config:GetController('tianhu').selectedIndex + local dihu = _config:GetController('dihu').selectedIndex + local haihu = _config:GetController('haihu').selectedIndex + local renshu = _config:GetController('renshu').selectedIndex == 0 and 2 or 3 + -- local qupai = _config:GetController('qupai').selectedIndex == 1 and true or false + local _data = {} + _data['opt'] = round -- 1 2 8局 16 局 + _data['mode'] = wanfa_C + 1 -- 1 全名堂 2 红黑点 3 多红多番 + _data['AA'] = Cost + _data['maxPlayers'] = renshu + if wanfa_C == 0 then + _data['tun'] = tun -- 充囤 0 1 2 3 4 分别是 1 2 3 4 5 + _data['fengding'] = fengding -- 封顶 0 1 2 全名堂分别是 不封顶 100封顶 200封顶 + _data['tuanyuan'] = tuanyuan -- 大团圆 0 不选 1 选 + _data['hanghangxi'] = hanghangxi -- 行行息 0 不选 1 选 + _data['shuahou'] = shuahou -- 耍猴 0 不选 1 选 + _data['huangfan'] = huangfan -- 黄番 0 不选 1 选 + _data['jiaxingxing'] = jiaxingxing -- 假行行 0 不选 1 选 + _data['tinghu'] = tinghu -- 听胡 0 不选 1 选 + _data['siqi'] = siqi -- 四七红 0 不选 1 选 + _data['back'] = back -- 四七红 0 不选 1 选 + _data['yuan'] = yuan -- 四七红 0 不选 1 选 + elseif wanfa_C == 1 then + _data['tun'] = tun -- 充囤 0 1 2 3 4 5 分别是 0 1 2 3 4 5 + _data['fengding'] = fengding -- 封顶 0 1 2 红黑点分别是 不封顶 单局20封顶 单局 40封顶 + _data['duizifu'] = duizifu -- 对子胡 0 不选 1 选 + elseif wanfa_C == 2 then + _data['tun'] = tun -- 充囤 0 1 2 3 4 5 分别是 0 1 2 3 4 5 + _data['tianhu'] = tianhu + _data['dihu'] = dihu + _data['haihu'] = haihu + _data['tinghu'] = tinghu + _data['huangfan'] = huangfan + _data['fengding'] = fengding -- 封顶 0 + end + if renshu == 2 then + _data['qupai'] = false + end + + local xi_pai=false + if oldGameVersion ==2 then + if _config:GetChild("xipai") then + xi_pai = _config:GetChild("xipai").selected + end + end + + _data['xi_pai'] = xi_pai + + local xi_pai_score=0 + local an_chou_score=0 + + if oldGameVersion==2 then + xi_pai_score=self.xipaiValue + an_chou_score=self.anchouValue + end + + _data['xi_pai_score'] = xi_pai_score*1000 + _data['an_chou_score'] = an_chou_score*1000 + + _data['xi_pai'] = xi_pai + return _data +end + +function M:LoadConfigData(data) + local _config = self._config + _config:GetController('btn_Controller').selectedIndex = data.mode - 1 + _config:GetController('round').selectedIndex = data.opt - 1 --== 1 and 0 or 1 + _config:GetController('Cost').selectedIndex = data.AA + _config:GetController('renshu').selectedIndex = data.maxPlayers == 2 and 0 or 1 + if data.mode == 1 then + _config:GetController('tun').selectedIndex = data.tun + _config:GetController('fengding').selectedIndex = data.fengding + _config:GetController('tuanyuan').selectedIndex = data.tuanyuan + _config:GetController('hanghangxi').selectedIndex = data.hanghangxi + _config:GetController('siqi').selectedIndex = data.siqi + _config:GetController('shuahou').selectedIndex = data.shuahou + _config:GetController('huangfan').selectedIndex = data.huangfan + _config:GetController('jiaxingxing').selectedIndex = data.jiaxingxing + _config:GetController('tinghu').selectedIndex = data.tinghu + _config:GetController('Back').selectedIndex = data.back + _config:GetController('yuan').selectedIndex = data.yuan + elseif data.mode == 2 then + _config:GetController('tun').selectedIndex = data.tun + _config:GetController('fengding').selectedIndex = data.fengding + _config:GetController('duizifu').selectedIndex = data.duizifu + elseif data.mode == 3 then + _config:GetController('haihu').selectedIndex = 0 + _config:GetController('tinghu').selectedIndex = 0 + _config:GetController('tianhu').selectedIndex = 0 + _config:GetController('dihu').selectedIndex = 0 + _config:GetController('huangfan').selectedIndex = 0 + _config:GetController('tun').selectedIndex = data.tun + _config:GetController('fengding').selectedIndex = data.fengding + end + if data.maxPlayers == 2 then + --_config:GetController('qupai').selectedIndex = data.qupai == true and 1 or 0 + end + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected=data.xi_pai + end + + + if oldGameVersion==2 then + self.xipaiValueText.text=data.xi_pai_score/1000 + self.xipaiValue=data.xi_pai_score/1000 + + self.anchouValueText.text=data.an_chou_score/1000 + self.anchouValue=data.an_chou_score/1000 + end + +end +function M:OnChangeOption(ctype) + IGameInfo.OnChangeOption(self, ctype) + local people = self._config:GetController('renshu') + people.onChanged:Set( + function() + self._maxPlayer = people.selectedIndex == 0 and 2 or 3 + self:ShowVariablePrice(ctype) + end + ) +end +return M diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXMainView.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXMainView.lua new file mode 100644 index 00000000..b1300b7b --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXMainView.lua @@ -0,0 +1,1015 @@ +local SettingView = import('.main.ZPSettingView') +local PlayerSelfCardInfoView = import('.PlayerSelfCardInfoView') +local PlayerCardInfoView = import('.PlayerCardInfoView') +local ZPMainView = import('.main.ZPMainView') +local GameEvent = import('.RunBeard_GameEvent') +local RunBeard_ResultView = import('.RunBeard_ResultView') + +local M = {} +local Fix_Msg_Chat = { + '在搞么的,出牌撒', + '又掉线哒!', + '和你打牌太有味了', + '人呢?还搞不搞滴', + '哈哈,对不住了', + '稍等哈哈,马上就来', + '不要走,决战到天亮', + '牌打得不错嘛!', + '今朝这个方位硬是不好', + '不好意思临时有事,申请解散!' +} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M, {__index = ZPMainView}) + local self = setmetatable({}, {__index = M}) + self.class = 'RunBeard_MainView' + self._full = true + self:init() + return self +end + +function M:getCardItem(card_1, card_2) + if self._room.change_card_display ~= nil then + return card_1 .. self._room.change_card_display .. card_2 + else + return card_1 .. '2_' .. card_2 + end +end +function M:InitView(url) + local _room = self._room + self.Fix_Msg_Chat = Fix_Msg_Chat + ViewUtil.PlayMuisc('ChangDe_ZP', 'extend/zipai/changdepaohuzi/sound/bg.mp3') + UIPackage.AddPackage('extend/zipai/changdepaohuzi/ui/Extend_Poker_ChangdeWHZ') + ZPMainView.InitView(self, 'ui://Main_RunBeard/Main_' .. _room.room_config.people_num, false, false, 1.2, 15) + + self:PlayerChangeLineState() + SettingView.onEXMainCallback = handler(self, self.UpdateCardDisplay) + SettingView.onUpdataCardSizeCallback = handler(self, self.UpdateCardSize) + + for i = 1, #_room.player_list do + local p = _room.player_list[i] + local head = self._player_info[self:GetPos(p.seat)] + if head._tex_score then + head._tex_score.visible = true + end + head:UpdateScore() + end + + if _room.playing or _room.curren_round > 0 then + self:ReloadRoom() + end + self._view:GetController('jushu').selectedIndex = 1 + self:setBtn() +end + +function M:setBtn() + local rightpanel = self._view:GetChild('right_panel') + local btn_rule = rightpanel:GetChild('btn_log') + local gcm_chat = self._view:GetChild('gcm_chat') + local _btn_chat = gcm_chat:GetChild('n1') + _btn_chat:GetChild('icon').icon = 'ui://Main_RunBeard/chat_img' + local btn_record = gcm_chat:GetChild('btn_record') + btn_record:GetChild('icon').icon = 'ui://Main_RunBeard/yuyin_img' + + if btn_rule ~= nil then + btn_rule.onClick:Set( + function() + if self.RuleView == nil or self.RuleView._is_destroy then + self.RuleView = RoomInfoView.new(self._room) + end + self.RuleView:Show() + end + ) + end + local btn_setting = self._view:GetChild('btn_setting') + btn_setting.onClick:Set( + function() + local _settingView = self:NewSettingView() + _settingView.stateIndex = (self._room.curren_round >= 1 and self._allow_dissmiss) and 2 or 1 + _settingView.cd_time = self.dismiss_room_cd_time + _settingView:Show() + + local room = DataManager.CurrenRoom + _settingView.onCallback:Add( + function(context) + local _gamectr = ControllerManager.GetController(GameController) + if (room.CurnrenState == StateType.Ready) then + _gamectr:LevelRoom( + function(response) + if (response.ReturnCode == 0) then + ViewManager.ChangeView(ViewManager.View_Lobby) + GameApplication.Instance:ShowTips('房间已解散!') + end + end + ) + else + _gamectr:AskDismissRoom( + function(res) + ViewUtil.ErrorTip(res.ReturnCode, '') + end + ) + end + end + ) + end + ) + local tex_roomid = rightpanel:GetChild('tex_roomid') + tex_roomid.text = self._room.room_id + if self._room.room_config.isHidden and self._room.room_config.isHidden == 1 then + tex_roomid.text = "000000" + end +end + +function M:NewPlayerCardInfoView(view, index) + if index == 1 then + return PlayerSelfCardInfoView.new(view, self) + end + return PlayerCardInfoView.new(view, self) +end +function M:closeTipOnTuoguan() + if self._clearingView ~= nil then + self._clearingView:Close() + end + self:__CloseTip() +end +function M:EventInit() + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _player_info = self._player_info + local _gamectr = self._gamectr + + _gamectr:AddEventListener(GameEvent.EventXiPai,function( ... ) + local arg = {...} + local currentPlayer1=arg[1] + local currentPlayer2=arg[2] + printlog("jefe AddEventListener===》》》》",arg) + self._popEvent = false + if ( currentPlayer1 ) then + + local xipaiCB=function () + self._popEvent = true + end + self:PlayXiPai(xipaiCB) + + end + + + if ( currentPlayer2 ) then + --self._popEvent = false + local xipaiCB2=function () + self._popEvent = true + end + self:PlayXiPai1(xipaiCB2) + end + + + end) + + _gamectr:AddEventListener( + GameEvent.SendCards, + function(...) + self._popEvent = false + self._leftcard = 1 + self._leftcard = 1 + local rightpanel = self._view:GetChild('right_panel') + local tex_round = rightpanel:GetChild('tex_round') + if tex_round ~= nil then + tex_round.text = '第 ' .. _room.curren_round .. ' 局' + end + self._view:GetChild('tex_round').text = '第 ' .. _room.curren_round .. '/' .. _room.room_config.round .. ' 局' + + self._state.selectedIndex = 1 + self:closeTipOnTuoguan() + local list = _room.player_list + for i = 1, #list do + local p = list[i] + p.hu_xi = 0 + local _info = self._player_card_info[self:GetPos(p.seat)] + _info:SetPlayer(p) + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + info._view:GetController('huxi').selectedIndex = 1 + info._view:GetChild('huxi').text = p.hu_xi + info._view:GetController('zhanji').selectedIndex = 0 + + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + if p.total_hp == nil then + p.total_hp = 0 + end + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + local card_info = self._player_card_info[1] + card_info:UpdateIsOnClick(false) + card_info:InitHandCard(true) + end + ) + + _gamectr:AddEventListener( + GameEvent.GetCard, + function(...) + local arg = {...} + local seat = arg[1] + local card = arg[2] + local _leftcard = arg[3] + self._left_time = 15 + self._tex_LeftCard.text = '剩余 ' .. _leftcard .. ' 张牌' + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateOutCardList(card, true, true, self:GetPos(seat)) + if card ~= 0 then + local p = _room:GetPlayerBySeat(seat) + self:PlaySound(p.self_user.sex, 'F_' .. card) + else + self._popEvent = false + coroutine.start( + function() + coroutine.wait(0.5) + self._popEvent = true + info:ClearOutCard() + end + ) + end + end + ) + _gamectr:AddEventListener( + GameEvent.AddCard, + function(...) + local arg = {...} + local seat = arg[1] + local card = arg[2] + self._popEvent = false + local info = self._player_card_info[self:GetPos(seat)] + coroutine.start( + function() + coroutine.wait(0.5) + if seat == self._room.self_player.seat then + info:InitHandCard(false) + end + info:ClearOutCard() + self._popEvent = true + end + ) + end + ) + + _gamectr:AddEventListener( + GameEvent.EventTurn, + function(...) + local arg = {...} + local seat = arg[1] + local list = _room.player_list + local readyNum = 0 + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 0 + end + local info = self._player_info[self:GetPos(seat)] + info._view:GetController('time').selectedIndex = 1 + end + ) + _gamectr:AddEventListener( + GameEvent.OutHint, + function(...) + _room.curren_outcard_seat = _room.self_player.seat + coroutine.start( + function() + coroutine.wait(0.5) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:ChuPaiTiShi() + end + ) + end + ) + + _gamectr:AddEventListener( + GameEvent.OutCard, + function(...) + self:__CloseTip() + self._left_time = 0 + local arg = {...} + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:PlaySound(p.self_user.sex, 'F_' .. card) + if seat == self._room.self_player.seat then + _room.curren_outcard_seat = -1 + info:DeleteHandCard(card) + info:UpdateIsOnClick(true) + info:SendChangeCard() + info:ChuPaiTiShi() + end + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 0 + end + info:UpdateOutCardList(card, true, false, self:GetPos(seat)) + if self._leftcard == 1 then + self._leftcard = 0 + for i = 1, #_room.player_list do + local p = _room.player_list[i] + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateFzList(p.fz_list, false, p.seat) + end + end + end + ) + + _gamectr:AddEventListener( + GameEvent.QiCard, + function(...) + self:__CloseTip() + self._popEvent = false + self._left_time = 0 + local arg = {...} + local seat = arg[1] + local card = arg[2] + local p = _room:GetPlayerBySeat(seat) + local info = self._player_card_info[self:GetPos(seat)] + info:PlayingOutCardAnima(p.DiceCard) + p.DiceCard = 0 + info:UpdateQiPai(p.outcard_list, true, seat) + self._popEvent = true + end + ) + _gamectr:AddEventListener( + GameEvent.FZTips, + function(...) + local arg = {...} + local _tip = arg[1] + local _uid = arg[2] + self:__FangziTip(_tip, _uid) + end + ) + + _gamectr:AddEventListener(GameEvent.FangziAction, handler(self, self.OnFangziAction)) + + _gamectr:AddEventListener( + GameEvent.ZPHuCard, + function(...) + self._left_time = 0 + self:__CloseTip() + self._popEvent = false + local arg = {...} + local w = arg[1] + local l = arg[2] + local cards = arg[3] + local info = self._player_card_info[self:GetPos(w)] + -- info:UpdateHandCard() + + local url = 'ui://Extend_Poker_ChangdeWHZ/别人胡' + local pNode = info._mask_liangpai + local player = _room:GetPlayerBySeat(w) + if w == _room.self_player.seat then + url = 'ui://Extend_Poker_ChangdeWHZ/自己胡牌' + pNode = self._view + end + self:PlaySound(player.self_user.sex, 'F_Hu') + local he = UIPackage.CreateObjectFromURL(url) + he:GetTransition('t2'):Play() + if w == _room.self_player.seat then + he:Center() + end + pNode:AddChild(he) + coroutine.start( + function() + coroutine.wait(0.7) + he:Dispose() + self._popEvent = true + end + ) + end + ) + + _gamectr:AddEventListener( + GameEvent.ZPResult1, + function(...) + self._popEvent = false + self._left_time = 0 + local arg = {...} + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local x = {} + self._hu_tip:FillData(x) + self:__CloseTip() + if self._clearingView == nil then + if liuju == true then + self._clearingView = RunBeard_ResultView.new(self._view, 1) + else + self._clearingView = RunBeard_ResultView.new(self._view) + end + end + coroutine.start( + function() + coroutine.wait(0.5) + -- if self._clearingView._is_destroy then return end + self._clearingView:Show() + if _room.curren_round ~= _room.room_config.round then + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + p.total_score = data[i].total_score + p.cur_hp = data[i]['cur_hp'] or 0 + p.total_hp = data[i]['total_hp'] or 0 + if data[i]['hp_info'] then + p.cur_hp = data[i].hp_info.cur_hp + p.total_hp = data[i].hp_info.total_hp == nil and 0 or data[i].hp_info.total_hp + info._view:GetController('zhanji').selectedIndex = 0 + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + + card_info:Clear() + info:UpdateScore() + end + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 0 + end + + for i = 1, #_room.player_list do + _room.self_player.handcard_list = {} + _room.player_list[i].DiceCard = nil + _room.player_list[i].hand_left_count = 20 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + _room.player_list[i].outcard_list = {} + _room.player_list[i].hu_xi = 0 + end + end + self._popEvent = true + end + ) + if _room.curren_round ~= _room.room_config.round then + self._clearingView:InitData( + 0, + _room, + result, + nil, + function(...) + self._state.selectedIndex = 2 + self._clearingView = nil + end + ) + end + end + ) + + _gamectr:AddEventListener( + GameEvent.ZPResult2, + function(...) + self._left_time = 0 + local arg = {...} + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + local x = {} + self._hu_tip:FillData(x) + self:__CloseTip() + self:UnmarkSelfTuoguan() + self._clearingView = RunBeard_ResultView.new() + coroutine.start( + function() + coroutine.wait(0.5) + self._clearingView:Show() + end + ) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end + ) +end + +function M:OutCard(card_item) + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card_item) +end + +--改变牌队形 +function M:ChangeCards(list) + local _gamectr = ControllerManager.GetController(GameController) + if _gamectr then + _gamectr:SendChangeCards(list) + end +end + +function M:__FangziTip(tip, _uid) + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject('Main_RunBeard', 'Gcm_action_tips') + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + + local _lit_fanzi = _chipeng_tip:GetChild('lit_fanzi') + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + local tip_hu = false + local count = #_tlist + for k = 1, #_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + if td.type == 8 then + tip_hu = true + end + end + for k = 1, #_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + local url = 'ui://Main_RunBeard/Btn_fztip' + local btn_t = _lit_fanzi:AddItemFromPool(url) + btn_t.icon = 'ui://Main_RunBeard/newop_' .. td.type + btn_t.data = {tip, td, tip_hu} + btn_t.onClick:Set(self.__TipAction, self) + end + if p.hand_left_count ~= 0 then + local _btn_pass = _lit_fanzi:AddItemFromPool('ui://Main_RunBeard/Btn_pass_new') + _btn_pass.onClick:Set( + function() + if tip_hu then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + _gamectr:SendAction(_uid) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end + ) + + guo_msg:Show() + else + _gamectr:SendAction(_uid) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end + ) + end + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() + _chipeng_tip.x = _chipeng_tip.x + 200 + _chipeng_tip.y = _chipeng_tip.y - 50 +end +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local tip_hu = data[3] + local list = tip.tip_map_type[td.weight] + if (#list > 1) or td.type == 1 then + self:_ChiView( + list, + tip_hu, + function(id) + if tip_hu and td.type ~= 8 then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + _gamectr:SendAction(id) + guo_msg:Close() + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + ) + guo_msg:Show() + else + _gamectr:SendAction(id) + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + end + ) + --self._chipeng_tip.visible = false + return + end + if tip_hu and td.type ~= 8 then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + _gamectr:SendAction(td.id) + guo_msg:Close() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + if (self._chipeng_tip == nil) then + return + end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + ) + guo_msg:Show() + else + _gamectr:SendAction(td.id) + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + if (self._chipeng_tip == nil) then + return + end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end +end + +function M:_ChiView(tip_list, tip_hu, callback) + local _pop_tip_choice = UIPackage.CreateObject('Main_RunBeard', 'Pop_tip_choice') + local list_choose = _pop_tip_choice:GetChild('Lst_choose') + _pop_tip_choice:GetChild('dibtn').onClick:Add( + function() + _pop_tip_choice:Dispose() + end + ) + + list_choose:RemoveChildrenToPool() + for i = 1, #tip_list do + if tip_list[i].weight ~= 4 then + local item_choose = list_choose:AddItemFromPool() + item_choose:GetChild('card' .. 2).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', tip_list[i].OpCard[1])) + item_choose:GetChild('card' .. 3).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', tip_list[i].OpCard[2])) + item_choose:GetChild('card' .. 1).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', tip_list[i].card)) + + item_choose.onClick:Add( + function() + for k = 1, list_choose.numChildren do + list_choose:GetChildAt(k - 1):GetController('zhong').selectedIndex = 0 + end + item_choose:GetController('zhong').selectedIndex = 1 + if tip_list[i].bi_list == nil then + callback(tip_list[i].id) + else + self.bilist = {} + self._chiid = tip_list[i].id + self:CheckRatioCard(tip_list[i].bi_list, 1, tip_list[i].card) + end + end + ) + end + end + list_choose:ResizeToFit(#tip_list) + _pop_tip_choice:GetChild('di1').width = list_choose.width + 110 + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width) / 2, -100) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:CheckRatioCard(_tiplist, index, chicard, _biid, list) + if _biid ~= nil then + self.bilist = {} + self.bilist[#self.bilist + 1] = _biid + end + if self._pop_tip_choice == nil then + -- statements + return + end + self._pop_tip_choice:GetController('bipai').selectedIndex = index + local Bilist_choose = self._pop_tip_choice:GetChild('Bi_Lst_choose' .. index) + Bilist_choose:RemoveChildrenToPool() + for i = 1, #_tiplist do + local item = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Comp_choose') + local item_choose = Bilist_choose:AddChild(item) + item_choose:GetChild('card' .. 2).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', _tiplist[i].opcard[1])) + item_choose:GetChild('card' .. 3).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', _tiplist[i].opcard[2])) + item_choose:GetChild('card' .. 1).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', chicard)) + item_choose:GetController('zhong').selectedIndex = 0 + item_choose.onClick:Add( + function() + for k = 1, Bilist_choose.numChildren do + Bilist_choose:GetChildAt(k - 1):GetController('zhong').selectedIndex = 0 + end + item_choose:GetController('zhong').selectedIndex = 1 + if _tiplist[i].bi_list == nil then + if index == 1 then + self.bilist = {} + end + self.bilist[#self.bilist + 1] = i - 1 + if tip_hu then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + self._gamectr:SendAction(self._chiid, self.bilist) + guo_msg:Close() + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + ) + guo_msg:Show() + else + self._gamectr:SendAction(self._chiid, self.bilist) + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + else + self:CheckRatioCard(_tiplist[i].bi_list, 2, chicard, i - 1, #_tiplist) + end + end + ) + end + Bilist_choose:ResizeToFit(#_tiplist) + self._pop_tip_choice:GetChild('di' .. index + 1).width = Bilist_choose.width + 110 +end + +-- lua table 深拷贝 +function M:deepcopy(object) + local lookup_table = {} + local function _copy(object) + if type(object) ~= 'table' then + return object + elseif lookup_table[object] then + return lookup_table[object] + end + local new_table = {} + lookup_table[object] = new_table + for index, value in pairs(object) do + new_table[_copy(index)] = _copy(value) + end + return setmetatable(new_table, getmetatable(object)) + end + return _copy(object) +end + +function M:OnFangziAction(...) + local arg = {...} + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local num = arg[3] + if fz.type == RB_FZType.Peng or fz.type == RB_FZType.Chi or fz.type == RB_FZType.Bi then + self:__CloseTip() + end + if (player == self._room.self_player) then + local info = _player_card_info[self:GetPos(player.seat)] + info:UpdateIsOnClick(false) + end + self._popEvent = false + + local info = _player_card_info[self:GetPos(player.seat)] + info:UpdateFzList(player.fz_list, true, player.seat) --更新放子数组 + if (player == self._room.self_player) then + if fz.type == RB_FZType.Chi then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.Bi then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + info:DeleteHandCard(fz.card) + elseif fz.type == RB_FZType.Peng then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.Kan then + if #fz.opcard == 2 then + info:InitHandCard(false) + end + info:UpdateKan(fz.card) + elseif fz.type == RB_FZType.Wei then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.ChouWei then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.Pao then + if num > 0 then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + end + elseif fz.type == RB_FZType.Ti then + if num > 0 then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + end + end + coroutine.start( + function() + coroutine.wait(0.3) + if fz.type ~= RB_FZType.Kan then + info:SendChangeCard() + end + end + ) + end + if fz.type ~= RB_FZType.Kan and fz.type ~= RB_FZType.Bi then + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject('Extend_Poker_ChangdeWHZ', 'FzEffect') + + if fz.type == RB_FZType.Peng then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "peng") + self:PlaySound(player.self_user.sex, 'F_Peng') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'peng') + elseif fz.type == RB_FZType.Chi then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "chi") + self:PlaySound(player.self_user.sex, 'F_Chi') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'chi') + elseif fz.type == RB_FZType.Wei then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "wei") + self:PlaySound(player.self_user.sex, 'F_GuoSao') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'wei') + elseif fz.type == RB_FZType.ChouWei then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Extend_Poker_RunBeard", "chouwei") + self:PlaySound(player.self_user.sex, 'F_GuoSao') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'chouwei') + elseif fz.type == RB_FZType.Pao then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "pao") + self:PlaySound(player.self_user.sex, 'F_KaiDuo') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'pao') + --effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "pao") + elseif fz.type == RB_FZType.Ti then + self:PlaySound(player.self_user.sex, 'F_SaoChuan') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'ti') + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "ti") + end + effect.touchable = false + effect.x, effect.y = 0, 0 + effect:GetTransition('t0'):Play() + pNode:AddChild(effect) + coroutine.start( + function() + coroutine.wait(1) + effect:Dispose() + end + ) + end + if (player == self._room.self_player) then + coroutine.start( + function() + coroutine.wait(0.5) + local info = _player_card_info[self:GetPos(player.seat)] + info:ShowHuTip() + end + ) + end + local removeOutcard = _player_card_info[self:GetPos(fz.from_seat)] + local p = self._room:GetPlayerBySeat(fz.from_seat) + if p.DiceCard ~= nil and fz.active_card == p.DiceCard then + removeOutcard:ClearOutCard() + p.DiceCard = nil + end + local list = self._room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetChild('huxi').text = p.hu_xi + end + self._popEvent = true + coroutine.start( + function() + coroutine.wait(0.3) + local info = _player_card_info[1] + info:UpdateIsOnClick(true) + end + ) +end + +function M:ReloadRoom() + local _gamectr = self._gamectr + local room = self._room + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + end + if room.discard == 0 then + self._leftcard = 1 + else + self._leftcard = 0 + end + for i = 1, #room.player_list do + local p = room.player_list[i] + if p.seat == room.banker_seat then + local head = self._player_info[self:GetPos(p.seat)] + head:MarkBank(true) + end + if p.ready then + self._player_info[self:GetPos(p.seat)]:Ready(true) + else + self._player_info[self:GetPos(p.seat)]:Ready(false) + end + if self._state.selectedIndex == 1 then + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('huxi').selectedIndex = 1 + info._view:GetChild('huxi').text = p.hu_xi + info._view:GetController('zhanji').selectedIndex = 0 + if room.hpOnOff == 1 or room:checkHpNonnegative() then + if p.total_hp == nil then + p.total_hp = 0 + end + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateQiPai(p.outcard_list) + card_info:UpdateFzList(p.fz_list, false, p.seat) + if p.DiceCard ~= nil and p.DiceCard ~= 0 then + card_info:UpdateOutCardList(p.DiceCard) + end + if DataManager.CurrenRoom.curren_outcard_seat == p.seat then + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 1 + end + if p.seat == self._room.self_player.seat then + card_info:ChuPaiTiShi() + if + self._room.self_player.card_list ~= nil and + #self._room.self_player.handcard_list == #self._room.self_player.card_list + then + local _list = self:deepcopy(self._room.self_player.card_list) + local cards = {} + for i = 1, #_list do + cards[#cards + 1] = _list[i].card_item + end + table.sort(cards, ViewUtil.HandCardSort) + table.sort(self._room.self_player.handcard_list, ViewUtil.HandCardSort) + + local isNot = false + for i = 1, #cards do + if cards[i] ~= self._room.self_player.handcard_list[i] then + isNot = true + end + end + if isNot == true then + card_info:InitHandCard(false) + else + card_info:UpdateHandCards(self._room.self_player.card_list) + end + else + card_info:InitHandCard(false) + end + -- card_info:ChuPaiTiShi() + card_info:ShowHuTip() + for i = 1, #p.fz_list do + if p.fz_list[i].type == RB_FZType.Kan then + card_info:UpdateKan(3, p.fz_list[i].card) + end + end + end + end + + self._tex_LeftCard.text = '剩余 ' .. room.left_count .. ' 张牌' + local rightpanel = self._view:GetChild('right_panel') + local tex_round = rightpanel:GetChild('tex_round') + if tex_round ~= nil then + tex_round.text = '第 ' .. room.curren_round .. ' 局' + end + self._view:GetChild('tex_round').text = '第 ' .. room.curren_round .. '/' .. room.room_config.round .. ' 局' +end + +function M:PlayChatSound(sex, chat_index) + local sex_path = ViewUtil.Sex_Chat[sex] + local path1 = string.format('extend/zipai/changdepaohuzi/sound/%s/chat_%s.mp3', sex_path, tostring(chat_index)) + ViewUtil.PlaySound('ChangDe_ZP', path1) +end + +function M:PlaySound(sex, path) + local sex_path = ViewUtil.Sex_Chat[sex] -- 1 男 2 女 + local sound_path = string.format('extend/zipai/changdepaohuzi/sound/%s/%s.mp3', sex_path, path) + ViewUtil.PlaySound('ChangDe_ZP', sound_path) +end + +function M:__CloseTip() + if (self._chipeng_tip) then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if (self._pop_tip_choice) then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +function M:Destroy() + ZPMainView.Destroy(self) + UIPackage.RemovePackage('extend/zipai/changdepaohuzi/ui/Extend_Poker_ChangdeWHZ') +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXPlayBackView.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXPlayBackView.lua new file mode 100644 index 00000000..4ec205fc --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXPlayBackView.lua @@ -0,0 +1,662 @@ +local ZPPlayBackView = require('main.zipai.ZPPlayBackView') +local PlayerSelfCardInfoView = import('.PlayerSelfCardInfoView') +local PlayerCardInfoView = import('.PlayerCardInfoView') +local RunBeard_ResultView = import('.RunBeard_ResultView') +local M = {} + +local Record_Event = { + Evt_OutCard = 'OutCard', + Evt_GetCard = 'GetCard', + Evt_Action = 'Action', + Evt_ThrowCard = 'ThrowCard', + Evt_AddCard = 'AddCard', + Evt_ChangePaiXing = 'ChangePaiXing', + Evt_Win = 'Win', + Evt_result = 'result' +} + +local function tableSortNumber(a, b) + return a.card_code_number > b.card_code_number +end + +--- Create a new +function M.new() + setmetatable(M, {__index = PlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = 'PlayBackView' + self:init() + + return self +end + +function M:InitView(url) + local room = self._room + self._gamectr = ControllerManager.GetController(GameController) + UIPackage.AddPackage('base/main_zipai/ui/Main_RunBeard') + UIPackage.AddPackage('extend/zipai/changdepaohuzi/ui/Extend_Poker_ChangdeWHZ') + ZPPlayBackView.InitView(self, 'ui://Main_RunBeard/Main_' .. room.room_config.people_num) + UpdateBeat:Add(self.OnUpdate, self) + + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. room.game_id) + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + if typeface == 1 then + room.change_card_display = '2_' + else + room.change_card_display = '1_' + end + end + self._player_card_info = {} + local _player_card_info = self._player_card_info + for i = 1, room.room_config.people_num do + local tem = self._view:GetChild('player_card_info' .. i) + self._player_card_info[i] = self:NewPlayerPokerInfoView(tem, i) + end + local rightpanel = self._view:GetChild('right_panel') + self.btn_setting = rightpanel:GetChild('btn_setting') + self.btn_setting.visible = false + + self.tex_time = rightpanel:GetChild('tex_time') + self.tex_time.visible = false + + self.gcm_xinhao = rightpanel:GetChild('gcm_xinhao') + self.gcm_xinhao.visible = false + + self.pb_batteryLevel = rightpanel:GetChild('pb_batteryLevel') + self.pb_batteryLevel.visible = false + + local tex_round_item = rightpanel:GetChild('tex_round') + if tex_round_item ~= nil then + tex_round_item.text = '第 ' .. room.curren_round .. ' 局' + end + local btn_rule = rightpanel:GetChild('btn_log') + if btn_rule ~= nil then + btn_rule.onClick:Set( + function() + if self.RuleView == nil or self.RuleView._is_destroy then + self.RuleView = RoomInfoView.new(self._room) + end + self.RuleView:Show() + end + ) + end + local tex_roomid = rightpanel:GetChild('tex_roomid') + tex_roomid.text = room.room_id + rightpanel:GetChild('tex_gametype').text = room.room_config:GetGameName() + + self._tex_round = self._view:GetChild('tex_round') + self._tex_LeftCard = self._view:GetChild('remaining_card') + self._eventmap = {} + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_ThrowCard] = self.CmdThrowCard + self._cmdmap[Record_Event.Evt_AddCard] = self.CmdAddCard + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_ChangePaiXing] = self.CmdChangePaiXing + self._cmdmap[Record_Event.Evt_result] = self.onResult +end + +function M:NewPlayerPokerInfoView(view, index) + if index == 1 then + return PlayerSelfCardInfoView.new(view, self) + end + return PlayerCardInfoView.new(view, self) +end + +function M:FillRoomData(data) + if self._win_pic then + self._win_pic:Dispose() + end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local roominfo_panel = self._view:GetChild('roominfo_panel1') + roominfo_panel:GetChild('tex_roomid').text = room.room_id + roominfo_panel:GetChild('tex_gametype').text = room.room_config:GetGameName() + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:SetPlayer(p) + if p.seat == room.self_player.seat then + card_info:UpdateIsOnClick(false) + end + local infoHand = self._player_info[self:GetPos(p.seat)] + infoHand._view:GetController('huxi').selectedIndex = 1 + infoHand._view:GetChild('huxi').text = p.hu_xi + if p.total_hp then + infoHand._view:GetController('zhanji').selectedIndex = 0 + if room.hpOnOff == 1 or room:checkHpNonnegative() then + infoHand._view:GetController('zhanji').selectedIndex = 1 + infoHand._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + infoHand:UpdateScore() + end + end + self.CheckServerErrorList={} + self:UpdateRound(self._room.curren_round) + self:GenerateAllStepData(data) + self:ShowStep(1) + self:UpdateStep(1) +end + + + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateStep(index + 1) + self:UpdateLeftCard(step.left_card) + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hu_xi = step.player_card_data[i].hu_xi + p.hand_left_count = #p.card_list + + if index == 1 then + info:Clear() + if p.total_hp then + local avHand = self._player_info[self:GetPos(p.seat)] + local room = DataManager.CurrenRoom + avHand._view:GetController('zhanji').selectedIndex = 0 + if room.hpOnOff == 1 or room:checkHpNonnegative() then + avHand._view:GetController('zhanji').selectedIndex = 1 + avHand._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + avHand:UpdateScore() + end + end + if p.hu_xi ~= nil then + local infoHand = self._player_info[self:GetPos(p.seat)] + infoHand._view:GetChild('huxi').text = p.hu_xi + end + if step.cmd == Record_Event.Evt_Action then + if p.fz_list ~= nil and #p.fz_list > 0 then + info:UpdateFzList(p.fz_list) + end + end + + if index>1 then + for k,v in pairs(self.CheckServerErrorList) do + --printlog("k===>>>",k) + --printlog("v===>>>",v) + --printlog(k,index) + --pt(p.card_list) + if tonumber(index+1)>tonumber(k) then + list_remove(p.card_list,v) + end + + end + end + + + + if p.seat ~= self._room.self_player.seat then + info:InitHandCard(p.card_list) + else + self._room.self_player.handcard_list = p.card_list + info:InitHandCard(false) + end + + + + + --if p.seat == self._room.self_player.seat then + --[[if step.cmd == Record_Event.Evt_ChangePaiXing then + local _card_list = {} + for i = 1, #step.card_list do + local data = {} + data.card_item = step.card_list[i].card + data.index_X = step.card_list[i].X + data.index_Y = step.card_list[i].Y + _card_list[#_card_list + 1] = data + end + local info = self._player_card_info[self:GetPos(step.seat)] + if step.card_list[1].card ~= nil then + info:UpdateHandCards(_card_list) + else + info:UpdateHandCards(step.card_list) + end + end--]] + --end + + if step.cmd == Record_Event.Evt_OutCard or step.cmd == Record_Event.Evt_GetCard then + if step.DiceCard ~= nil and step.DiceCard ~= 0 then + if p.seat == step.seat then + info:UpdateOutCardList(step.DiceCard) + coroutine.start( + function() + coroutine.wait(1.5) + info:ClearOutCard() + end + ) + end + end + end + if p.outcard_list ~= nil then + info:UpdateQiPai(p.outcard_list) + end + end + -- print("step.cmd ",step.cmdm,Record_Event.Evt_Win) + if step.cmd == Record_Event.Evt_result then + local _room = DataManager.CurrenRoom + local result = step.result + self._win_pic = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/胡') + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + + if result ~= nil then + if self._clearingView == nil then + self._clearingView = RunBeard_ResultView.new(self._view) + coroutine.start( + function() + coroutine.wait(0.5) + self._clearingView:Show() + end + ) + end + local data = result.data.info_list + self._clearingView:InitData( + 0, + _room, + result.data, + nil, + function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + -- p.cur_hp = data[i]['cur_hp'] or 0 + -- if data[i]['hp_info'] then + -- p.cur_hp = data[i].hp_info.cur_hp + -- end + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + if data[i]['hp_info'] then + p.total_score = d2ad(data[i].hp_info.cur_hp) + local stotal_hp = data[i].hp_info.total_hp + info._view:GetController('zhanji').selectedIndex = 0 + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(stotal_hp) + end + end + info:UpdateScore(p.total_score) + end + self._clearingView = nil + end + ) + end + else + if self._win_pic then + self._win_pic:Dispose() + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + --pt(cmdList) + self._step = {} + local step = {} + local info = data.info + --pt(info) + step.cmd = '' + step.left_card = info.left_card + step.win = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.hu_xi = 0 + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + data.seat = cmd.seat + data.DiceCard = cmd.data.card +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + data.seat = cmd.seat + data.DiceCard = cmd.data.card +end +function M:CmdThrowCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + data.current_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + data.out_card_list = cmd.data.card + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end +function M:CmdAddCard(cmd, index) + --printlog("CmdAddCard======>>>",index,cmd.data.card) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + local _room = self._room + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card + --pt(u.card_list) +end + +function M:onResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result = cmd.result +end + +function M:CmdChangePaiXing(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + data.card_list = cmd.data.card_list +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + local p = data.player_card_data[cmd.seat] + local fz = {} + p.hu_xi = cmd.data.hu_xi + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.active_card = cmd.data.card + fz.opcard = cmd.data.opcard + local opcard = fz.opcard + local ftype = fz.type + local card = fz.card + local remove_num = #opcard + if ftype == RB_FZType.Chi then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Bi then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + list_remove(p.card_list, fz.card) + elseif ftype == RB_FZType.Peng then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Kan then + local _room = self._room + if #opcard == 2 then + p.card_list[#p.card_list + 1] = card + end + elseif ftype == RB_FZType.ChouWei then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, 2 do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Wei then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Pao then + local num = 0 + for i = 1, #p.card_list do + if card == p.card_list[i] then + num = num + 1 + end + end + local isAddTi = false + for i = 1, #p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type = RB_FZType.Pao + isAddTi = true + end + end + if num > 0 then + for i = 1, num do + list_remove(p.card_list, card) + end + + if isAddTi == false then + p.fz_list[#p.fz_list + 1] = fz + end + end + elseif ftype == RB_FZType.Ti then + local num = 0 + for i = 1, #p.card_list do + if card == p.card_list[i] then + num = num + 1 + end + end + --table.insert(self.CheckServerErrorList,card) + if self.CheckServerErrorList==nil then + self.CheckServerErrorList={} + end + self.CheckServerErrorList[index]=card + local isAddTi = false + for i = 1, #p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type = RB_FZType.Ti + isAddTi = true + end + end + if num > 0 then + for i = 1, num do + list_remove(p.card_list, card) + end + + if isAddTi == false then + p.fz_list[#p.fz_list + 1] = fz + end + end + end +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = '剩余 ' .. num .. ' 张牌' +end + +function M:UpdateRound(round) + self._tex_round.text = '第 ' .. round .. '/' .. self._room.room_config.round .. ' 局' +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = self:deepcopy(last_step) + step.player_card_data = {} + local card_data = step.player_card_data + for i = 1, #last_step.player_card_data do + card_data[i] = {} + card_data[i].card_list = self:deepcopy(last_step.player_card_data[i].card_list) + card_data[i].outcard_list = self:deepcopy(last_step.player_card_data[i].outcard_list) + card_data[i].fz_list = self:deepcopy(last_step.player_card_data[i].fz_list) + card_data[i].hand_left_count = #card_data[i].card_list + card_data[i].hu_xi = self:deepcopy(last_step.player_card_data[i].hu_xi) + end + --pt(card_data) + self._step[#self._step + 1] = step + return step +end + +-- lua table 深拷贝 +function M:deepcopy(object) + local lookup_table = {} + local function _copy(object) + if type(object) ~= 'table' then + return object + elseif lookup_table[object] then + return lookup_table[object] + end + local new_table = {} + lookup_table[object] = new_table + for index, value in pairs(object) do + new_table[_copy(index)] = _copy(value) + end + return setmetatable(new_table, getmetatable(object)) + end + return _copy(object) +end + +function M:NextRecordPlay() + printlog("NextRecordPlay") + local result = PlayBackView.NextRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() +end + +function M:LastRecordPlay() + printlog("LastRecordPlay") + local result = PlayBackView.LastRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() +end + +function M:Play() + self:ChangeAlpha() + self:ChangePlayState(not self._play) + if not self._play then + return + end + if (self._currentStep == #self.cmdList and self._playFoward) or (self._currentStep == 0 and not self._playFoward) then + self._currentStep = 0 + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:ChangePlayState(state) + self._play = state + self:ChangeTextSpeed() + local btn_play = self._view:GetChild('panel_record'):GetChild('btn_play') + if self._play then + btn_play:GetController('state').selectedIndex = 1 + else + btn_play:GetController('state').selectedIndex = 0 + end +end + +function M:ChangeTextSpeed() + local str1 = self._play and self._speed or '' + self._view:GetChild('panel_record'):GetChild('tex_speed').text = str1 + local str2 = + not self._play and (self._playFoward and '播放暂停' or '回退暂停') or + self._playFoward and (self._speed == 1 and '播放' or '快进') or + (self._speed == 1 and '回退' or '快退') + self._view:GetChild('panel_record'):GetChild('tex_2').text = str2 + local str3 = self._play and '倍速度' or '' + self._view:GetChild('panel_record'):GetChild('tex_1').text = str3 +end + +function M:CmdLeftArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if not self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = false + self:ChangeTextSpeed() + end +end + +function M:CmdRightArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:OnUpdate() + if self._play then + if (self._currentStep == #self.cmdList and self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像结尾了,再次点击播放按钮可重新播放') + return + elseif (self._currentStep == 0 and not self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像开头了,再次点击播放按钮可重新播放') + return + end + self._timer = self._timer + Time.deltaTime + if self._timer >= 1 / self._speed then + self._timer = 0 + local step = self._playFoward and 1 or -1 + self._currentStep = self._currentStep + step + self:ShowStep(self._currentStep) + end + end +end + +function M:Destroy() + UpdateBeat:Remove(self.OnUpdate, self) + PlayBackView.Destroy(self) +end + +function M:UpdateStep(step) + self._record:GetChild('tex_step').text = '第 ' .. step .. ' / ' .. #self._step .. '步' +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXPlayer.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXPlayer.lua new file mode 100644 index 00000000..fe112fd2 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXPlayer.lua @@ -0,0 +1,37 @@ + + +local EXPlayer ={ + -- 手牌列表 + card_list = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil, + hu_xi =0 +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 + self.hu_xi =0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXRoomConfig.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXRoomConfig.lua new file mode 100644 index 00000000..785dc4b9 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/EXRoomConfig.lua @@ -0,0 +1,182 @@ + +local M = {} + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.config=config + self.class = "RoomConfig" + self.round = config["times"] + self.mode = config["mode"] + self.tun = config["tun"] + self.fengding = config["fengding"] + self.tuanyuan = config["tuanyuan"] + self.hanghangxi = config["hanghangxi"] + self.siqi = config["siqi"] + self.shuahou = config["shuahou"] + self.huangfan = config["huangfan"] + self.jiaxingxing = config["jiaxingxing"] + self.tinghu = config["tinghu"] + self.duizifu = config["duizifu"] + self.back = config["back"] + self.yuan = config["yuan"] + self.tianhu =config["tianhu"] + self.dihu =config["dihu"] + self.haihu =config["haihu"] + self.maxPlayers = config["maxPlayers"] + self.qupai = config["qupai"] + self.isHidden = config.isHidden + + return self +end + +function M:GetDes(sp) + sp = sp or " " + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + if self.maxPlayers == 2 then + if self.qupai then + str = str .."去牌" + str = str .. sp + end + end + if (self.mode==1) then + str = str .. "全名堂" + str = str .. sp + str = str .. (self.tun).."囤" + str = str .. sp + if self.fengding == 0 then + str = str .. "不封顶" + str = str .. sp + elseif self.fengding == 1 then + str = str .. "100封顶" + str = str .. sp + elseif self.fengding == 2 then + str = str .. "200封顶" + str = str .. sp + elseif self.fengding == 3 then + str = str .. "300封顶" + str = str .. sp + elseif self.fengding == 4 then + str = str .. "500封顶" + str = str .. sp + elseif self.fengding == 5 then + str = str .. "1000封顶" + str = str .. sp + end + if self.tuanyuan == 1 then + str = str .. "大团圆" + str = str .. sp + end + if self.hanghangxi == 1 then + str = str .. "行行息" + str = str .. sp + end + if self.siqi == 1 then + str = str .. "四七红" + str = str .. sp + end + if self.shuahou == 1 then + str = str .. "耍猴" + str = str .. sp + end + if self.huangfan == 1 then + str = str .. "黄番" + str = str .. sp + end + if self.jiaxingxing == 1 then + str = str .. "假行行" + str = str .. sp + end + if self.tinghu == 1 then + str = str .. "听胡" + str = str .. sp + end + if self.back == 1 then + str = str .. "背靠背" + str = str .. sp + end + if self.yuan == 1 then + str = str .. "圆" + str = str .. sp + end + elseif (self.mode == 2 ) then + str = str .. "红黑点" + str = str .. sp + str = str .. (self.tun).."囤" + str = str .. sp + if self.duizifu == 1 then + str = str .. "对子胡" + str = str .. sp + end + if self.fengding == 0 then + str = str .. "不封顶" + str = str .. sp + elseif self.fengding == 1 then + str = str .. "单局20封顶" + str = str .. sp + elseif self.fengding == 2 then + str = str .. "单局40封顶" + str = str .. sp + end + elseif (self.mode == 3 ) then + str = str .. "多红多番" + str = str .. sp + -- if self.tianhu == 1 then + -- str = str .. "天胡" + -- str = str .. sp + -- end + -- if self.dihu == 1 then + -- str = str .. "地胡" + -- str = str .. sp + -- end + -- if self.haihu == 1 then + -- str = str .. "海湖" + -- str = str .. sp + -- end + -- if self.tinghu == 1 then + -- str = str .. "听胡" + -- str = str .. sp + -- end + -- if self.huangfan == 1 then + -- str = str .. "黄番" + -- str = str .. sp + -- end + str = str .. (self.tun).."囤" + str = str .. sp + if self.fengding == 0 then + str = str .. "不封顶" + str = str .. sp + elseif self.fengding == 1 then + str = str .. "60封顶" + str = str .. sp + elseif self.fengding == 2 then + str = str .. "80封顶" + str = str .. sp + end + end + + + str = str.sub(str,1,string.len(str)-string.len(sp)) + return str +end + +function M:GetGameName() + if self.mode == 1 then + return self.maxPlayers .. "人全名堂-常德跑胡子" + elseif self.mode == 2 then + return self.maxPlayers .. "人红黑点-常德跑胡子" + elseif self.mode == 3 then + return self.maxPlayers .. "人多红多番-常德跑胡子" + end + return self.maxPlayers .. "人常德跑胡子" +end + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_Poker_ChangdeWHZ/gamerule") + return gamerulepanel +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/ExtendConfig.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/ExtendConfig.lua new file mode 100644 index 00000000..b5259ac8 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/ExtendConfig.lua @@ -0,0 +1,236 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import('.EXGameInfo') +local EXMainView = import('.EXMainView') +local EXGameController = import('.EXGameController') +local EXRoomConfig = import('.EXRoomConfig') +local EXPlayBackView = import('.EXPlayBackView') +local explayer = import('.EXPlayer') +local ExtendConfig = {} + +local M = ExtendConfig + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = 'ExtendConfig' + self.extend_id = 15 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage('extend/zipai/changdepaohuzi/ui/Info_Poker_ChangdeWHZ') + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage('extend/zipai/changdepaohuzi/ui/Extend_Poker_ChangdeWHZ') + ResourcesManager.UnLoadGroup('ChangDe_ZP') +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:FillRoomConfig(room, _config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + local reload = s2croom['reload'] + local _tableInfo = s2croom['tableInfo'] + + local _config = _tableInfo['config'] + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo['playerData'] + room.curren_round = _tableInfo['round'] + for i = 1, #playerList do + local _jp = playerList[i] + + local p = explayer.new() + p.seat = _jp['seat'] + local online = _jp['online'] + p.line_state = online + p.ready = _jp['ready'] == 1 and true or false + local pid = _jp['aid'] + if (DataManager.SelfUser.account_id == pid) then + room.self_player = p + p.self_user = DataManager.SelfUser + else + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp['nick'] + u.head_url = _jp['portrait'] + u.sex = _jp['sex'] + end + p.entrust = _jp['entrust'] + p.self_user.host_ip = _jp['ip'] + p.self_user.location = Location.new(_jp['pos'] or '') + p.cur_hp = _jp['cur_hp'] or 0 + p.total_hp = _jp['total_hp'] or 0 + if _jp['hp_info'] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + room:AddPlayer(p) + end + + -- 如果重写了player类,就需要传第二个参数 + -- self:FillPlayerData(playerList, explayer) + + if (reload) then + local _reloadInfo = s2croom['reloadInfo'] + local _hand_card = _reloadInfo['hand_card'] + local _card_list = _reloadInfo['card_list'] + local _discard = _reloadInfo['discard'] + room.discard = _discard + -- local _index = _reloadInfo["typeface"] + -- if _index ==1 then + -- room.change_card_display = "2_" + -- else + -- room.change_card_display = "1_" + -- end + room.self_player.handcard_list = _hand_card + room.self_player.card_list = {} + for i = 1, #_card_list do + local data = {} + data.card_item = _card_list[i].card + data.index_X = _card_list[i].X + data.index_Y = _card_list[i].Y + room.self_player.card_list[#room.self_player.card_list + 1] = data + end + local active_seat = _reloadInfo['active_seat'] + local bank_seat = _reloadInfo['banker_seat'] + local playing = _reloadInfo['playing'] + local _info_list = _reloadInfo['info_list'] + local last_outcard_seat = _reloadInfo['last_outcard_seat'] + + room.left_count = _reloadInfo['left_card'] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo['curren_outcard_seat'] + if active_seat ~= 0 then + local player = room:GetPlayerBySeat(active_seat) + player.DiceCard = _reloadInfo['acitve_card'] + end + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i = 1, #_info_list do + local tem = _info_list[i] + local playerid = tem['playerid'] + local p = room:GetPlayerById(playerid) + local outcard_list = tem['outcard_list'] + p.outcard_list = outcard_list + p.total_score = tem['score'] + p.hu_xi = tem['hu_xi'] + p.hand_left_count = tem['card_count'] + p.cur_hp = tem['cur_hp'] or 0 + p.total_hp = tem['total_hp'] or 0 + if tem['hp_info'] then + p.cur_hp = tem.hp_info.cur_hp + p.total_hp = tem.hp_info.total_hp + end + p.entrust = tem['entrust'] + + local opcard = tem['opcard'] + for k = 1, #opcard do + local op = opcard[k] + local fz = {} + fz.type = op['type'] + local data = {} + data[1] = op['card1'] + data[2] = op['card3'] + fz.opcard = data + fz.card = op['card2'] + fz.active_card = op['card2'] + + p.fz_list[#p.fz_list + 1] = fz + if p.seat == room.self_player.seat then + if fz.type == RB_FZType.Kan then + for i = 1, 3 do + room.self_player.handcard_list[#room.self_player.handcard_list + 1] = fz.card + end + end + end + end + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data['info'] + + local _config = _tableInfo['config'] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config['ownerid'] + local active_seat = _tableInfo['active_seat'] + local bank_seat = _tableInfo['banker_seat'] + room.left_count = _tableInfo['left_card'] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo['round'] + + local _info_list = _tableInfo['playerData'] + for i = 1, #_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp['seat'] + local online = _jp['online'] + p.line_state = online + p.ready = _jp['ready'] == 1 and true or false + local pid = _jp['aid'] + if pid == DataManager.SelfUser.account_id then + room.self_player = p + end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp['nick'] + u.head_url = _jp['portrait'] + u.sex = _jp['sex'] + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp['hand_card'] + p.hand_card = _hand_card + if room.self_player ~= nil and p.seat == room.self_player.seat then + room.self_player.handcard_list = _hand_card + end + p.total_score = _jp['score'] + p.hand_left_count = #_hand_card + p.cur_hp = _jp['cur_hp'] or 0 + p.total_hp = _jp['total_hp'] or 0 + if _jp['hp_info'] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data['cmdList'] + room.result = pd_data['result'] +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/PlayerCardInfoView.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/PlayerCardInfoView.lua new file mode 100644 index 00000000..93083b03 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/PlayerCardInfoView.lua @@ -0,0 +1,267 @@ +local PlayerCardInfoView = require("main.zipai.ZPPlayerCardInfoView") + +local M = {} +function M.new(view,mainView) + + setmetatable(M, {__index = PlayerCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + + + +function M:UpdateFzList( fz_list ,ispaly,seat) + self._area_fz_list:RemoveChildren(0,-1,true) + for i = 1,#fz_list do + local fzitem = nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/ComponentNew") + if(ispaly == false)then + fzitem:RemoveChildren(0,-1,true) + end + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetController("c2").selectedIndex =1 + fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].active_card) + fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[1]) + fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[2]) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Peng then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Wei then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Pao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Ti then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + if self._mainView._leftcard ==1 and self._player.seat ~= DataManager.CurrenRoom.banker_seat then + for j=1,4 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + else + for j=1,4 do + if j==4 then + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + else + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + end + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + end + end +end + +function M:playAnim(fzitem,fzcards, size,i,ispaly,seat) + if(ispaly == nil)then + ispaly =false + end + + local isaddLast = false + if(ispaly and i == size)then --匹配最后一个牌 + local faArray= fzitem:GetChild("chiwei1") + + if(DataManager.CurrenRoom.room_config.people_num ==3)then + if(DataManager.CurrenRoom.self_player.seat == 1)then + if(seat == 2)then + faArray= fzitem:GetChild("chiwei1") + else + faArray= fzitem:GetChild("chiwei") + end + elseif(DataManager.CurrenRoom.self_player.seat == 2) then + if(seat == 3)then + faArray= fzitem:GetChild("chiwei1") + else + faArray= fzitem:GetChild("chiwei") + end + elseif(DataManager.CurrenRoom.self_player.seat == 3)then + if(seat == 1)then + faArray= fzitem:GetChild("chiwei1") + else + faArray= fzitem:GetChild("chiwei") + end + end + end + + if(faArray~=nil)then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end + if(seat~=nil)then + isaddLast = self:isAddFirst(seat) + end + if(isaddLast)then + local index_postion = 0 + self._area_fz_list:AddChildAt(fzitem,index_postion) + else + self._area_fz_list:AddChild(fzitem) + end +end + +function M:isAddFirst(seat) + local isaddLast = false + if(DataManager.CurrenRoom.room_config.people_num ==3)then + if(DataManager.CurrenRoom.self_player.seat == 1)then + if(seat == 2)then + isaddLast = true + end + elseif(DataManager.CurrenRoom.self_player.seat == 2)then + if(seat == 3)then + isaddLast = true + end + elseif(DataManager.CurrenRoom.self_player.seat == 3)then + if(seat == 1)then + isaddLast = true + end + end + elseif DataManager.CurrenRoom.room_config.people_num ==2 then + isaddLast = true + end + return isaddLast +end + +function M:PlayingOutCardAnima(card) + coroutine.start(function() + coroutine.wait(0.1) + self:ClearOutCard() + end) +end + +function M:UpdateOutCardList(outcard,isShow,isMopai,seat) + if(isShow == nil) then + isShow = false + end + if(isMopai == nil) then + isMopai = false + end + + self._area_outcard_list:RemoveChildren(0,-1,true) + local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + + if outcard==0 then + outcards:GetChild("icon").icon ="ui://Main_RunBeard/202_1_300" + else + outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/203_",outcard) + end + outcards.x,outcards.y = 0,0 + local show_di_bg = outcards:GetChild("show_di_bg") + -- show_di_bg.visible = true + if(isShow)then + if outcard == 0 then + show_di_bg.visible = false + end + if(seat ~= nil and outcards~=nil)then + if(DataManager.CurrenRoom.room_config.people_num ==3)then + if(seat ==2)then + seat = 3 + elseif(seat == 3)then + seat =2 + end + elseif DataManager.CurrenRoom.room_config.people_num ==2 then + seat = 3 + end + if(isMopai)then + if outcard ~= 0 then + outcards:GetTransition("mopai"..seat):Play(function( ) + -- show_di_bg.visible = true + + end) + end + else + show_di_bg.visible = false + outcards:GetTransition("cpai"..seat):Play() + end + else + -- show_di_bg.visible = true + end + else + show_di_bg.visible = false + end + self._area_outcard_list:AddChild(outcards) +end + +--弃牌 +function M:UpdateQiPai( qi_list,ispaly,seat) + self._area_qipai_list:RemoveChildren(0,-1,true) + for i=1,#qi_list do + local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + qicards:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",qi_list[i]) + if(ispaly)then + if(i == #qi_list) then + if(DataManager.CurrenRoom.room_config.people_num ==2)then + qicards:GetTransition("t0"):Play() + else + if(DataManager.CurrenRoom.self_player.seat == 1)then + if(seat == 2)then + qicards:GetTransition("t0"):Play() + else + qicards:GetTransition("t1"):Play() + end + elseif(DataManager.CurrenRoom.self_player.seat == 2)then + if(seat == 3)then + qicards:GetTransition("t0"):Play() + else + qicards:GetTransition("t1"):Play() + end + elseif(DataManager.CurrenRoom.self_player.seat == 3)then + if(seat == 1)then + qicards:GetTransition("t0"):Play() + else + qicards:GetTransition("t1"):Play() + end + else + qicards:GetTransition("t0"):Play() + end + + end + end + end + self._area_qipai_list:AddChild(qicards) + end + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/PlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/PlayerSelfCardInfoView.lua new file mode 100644 index 00000000..245cf0d6 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/PlayerSelfCardInfoView.lua @@ -0,0 +1,476 @@ +local PlayerSelfCardInfoView = require("main.zipai.ZPPlayerSelfCardInfoView") +local CardCheck = require("main.zipai.CardCheck") +local M = {} +-- +function M.new(view,mainView) + setmetatable(M, {__index = PlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self._full = true + self:init() + return self +end + + +function M:onTouchBegin(context) + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + local button = context.sender + local card = button.data + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self:ShowHuTip(card.card_item) + end + card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/203_",card.card_item) + card.btn_card.sortingOrder = 100 + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + card.btn_card.xy = Vector2.New(card.btn_card.x+20 ,card.btn_card.y-50) + card.touch_pos = xy - button.xy + +end + +function M:__OnDragEnd(context) + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + if self.outcard_button then + self.outcard_button = nil + end + local button = context.sender + + local card = button.data + + local _room = DataManager.CurrenRoom + card.btn_card.sortingOrder = 0 + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + if (button.y < -380 and _room.curren_outcard_seat == _room.self_player.seat) then + button.touchable = false + self.outcard_button = card + self:UpdateIsOnClick(false) + self._mainView:OutCard(card.card_item) + else + local isChangeCard = false + self.outcard_button = nil + card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/201_",card.card_item) + self._area_handcard_list:AddChild(button) + if #self.card_list == 1 then + isChangeCard = false + self:UpdateHandCardsPos() + return + end + local CountCards = {} + for i=1,#self.card_list do + local lists = {} + if CountCards[self.card_list[i].index_X] == nil then + lists[#lists+1] = self.card_list[i] + CountCards[self.card_list[i].index_X]= lists + else + CountCards[self.card_list[i].index_X][#CountCards[self.card_list[i].index_X]+1] =self.card_list[i] + end + end + local minmark = 1 + local maxmark = #self.card_list + if card == self.card_list[1] or card == self.card_list[#self.card_list] then + if self.card_list[1].index_X == self.card_list[2].index_X then + minmark =2 + end + if self.card_list[#self.card_list].index_X == self.card_list[#self.card_list-1].index_X then + maxmark =#self.card_list-1 + end + end + if button.x+button.width/2 < self.card_list[minmark].btn_card.x and #CountCards<10 then + list_remove(self.card_list,card) + local num = 0 + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num+1 + end + end + if num ==0 then + for i=1,#self.card_list do + if self.card_list[i].index_X < card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + else + for i=1,#self.card_list do + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + card.index_X =1 + card.index_Y =1 + table.insert(self.card_list,1,card) + isChangeCard = true + elseif button.x+button.width/2 > (self.card_list[maxmark].btn_card.x +button.width) and #CountCards<10 then + list_remove(self.card_list,card) + local num = 0 + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X then + num = num+1 + end + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + end + if num ==0 then + for i=1,#self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + end + card.index_X =self.card_list[#self.card_list].index_X+1 + card.index_Y =1 + self.card_list[#self.card_list+1] =card + isChangeCard = true + else + local MoveCard = false + local MoveCardPos = 0 + local MoveCardY = 0 + for i=1,#CountCards do + local card_view = CountCards[i][1] + if card_view~=nil then + if button.x+button.width/2 > card_view.old_postion.x and button.x+button.width/2 < (card_view.old_postion.x+button.width) then + if card ~= card_view and #CountCards[i] <4 and card.index_X ~= card_view.index_X then + + MoveCardPos = i + MoveCardY = #CountCards[i]+1 + MoveCard = true + list_remove(self.card_list,card) + end + end + end + end + local MoveCardindex = 0 + -- local MoveCardY = 0 + if button.x+button.width/2 > card.old_postion.x and button.x+button.width/2 < (card.old_postion.x+button.width) then + if #CountCards[card.index_X]>1 then + for i=1,#CountCards[card.index_X] do + local _cv = CountCards[card.index_X][i] + if _cv ~= card then + if button.y+button.height/2 > _cv.btn_card.y and button.y+button.height/2 < (_cv.btn_card.y+button.height) then + --向下移動 + if ((button.y+button.height/2) +20) > (card.old_postion.y+button.height) then + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + --向上移動 + elseif ((button.y+button.height/2) -20) < card.old_postion.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + end + elseif i == #CountCards[card.index_X] and button.y+button.height/2 < _cv.btn_card.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + elseif i == 1 and button.y+button.height/2 > (_cv.btn_card.y+button.width) then + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + end + end + end + end + + end + if MoveCard ==true and MoveCardindex ==0 then + local num = 0 + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num+1 + end + end + if num ==0 then + for i=1,#self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + if MoveCardPos > card.index_X then + MoveCardPos = MoveCardPos-1 + end + end + card.index_X =MoveCardPos + card.index_Y =MoveCardY + for i=#self.card_list,1,-1 do + if MoveCardPos == self.card_list[i].index_X then + table.insert(self.card_list,(i+1),card) + break + end + end + isChangeCard = true + --上下移动 + elseif MoveCard ==true and MoveCardindex ~= 0 then + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X then + --向下移动 + if MoveCardindex == -1 then + if self.card_list[i].index_Y < card.index_Y and self.card_list[i].index_Y >= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y + 1 + + end + --向上移动 + else + if self.card_list[i].index_Y > card.index_Y and self.card_list[i].index_Y <= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + + end + end + end + end + card.index_X =MoveCardPos + card.index_Y =MoveCardY + for i=#self.card_list,1,-1 do + if MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY-1) then + table.insert(self.card_list,(i+1),card) + break + elseif MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY+1) then + table.insert(self.card_list,i,card) + break + end + end + isChangeCard = true + else + isChangeCard = false + self._area_handcard_list:AddChild(button) + end + + end + self:UpdateHandCardsPos() + if isChangeCard ==true then + self:SendChangeCard() + end + end +end + +function M:UpdateOutCardList(outcard,isShow,isMopai,seat) + if(isShow == nil) then + isShow = false + end + if(isMopai == nil) then + isMopai = false + end + self._area_outcard_list:RemoveChildren(0,-1,true) + local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + + if outcard==0 then + outcards:GetChild("icon").icon ="ui://Main_RunBeard/202_1_300" + else + outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/203_",outcard) + end + outcards.x,outcards.y = 0,0 + local show_di_bg = outcards:GetChild("show_di_bg") + --show_di_bg.visible = true + if(isShow)then + if outcard == 0 then + show_di_bg.visible = false + end + if(seat ~= nil and outcards~=nil)then + if(isMopai)then + if outcard ~= 0 then + outcards:GetTransition("mopai"..seat):Play(function( ) + -- show_di_bg.visible = true + + end) + end + else + show_di_bg.visible = false + outcards:GetTransition("cpai"..seat):Play() + end + else + --show_di_bg.visible = true + end + else + show_di_bg.visible = false + end + self._area_outcard_list:AddChild(outcards) +end + +--弃牌 +function M:UpdateQiPai( qi_list,isplay) + self._area_qipai_list:RemoveChildren(0,-1,true) + for i=1,#qi_list do + local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + qicards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/202_",qi_list[i]) + if(isplay)then + if(i == #qi_list) then + qicards:GetTransition("t0"):Play() + end + end + self._area_qipai_list:AddChild(qicards) + end +end + +--摸牌动画 +function M:PlayingOutCardAnima( card) + coroutine.start(function() + coroutine.wait(0.1) + self:ClearOutCard() + end) +end + +function M:UpdateFzList( fz_list ,ispaly) + self._area_fz_list:RemoveChildren(0,-1,true) + for i = 1,#fz_list do + local fzitem=nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/ComponentNew") + if(ispaly == false)then + fzitem:RemoveChildren(0,-1,true) + end + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].active_card) + fzcards:GetController("c2").selectedIndex = 1 + fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[1]) + fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[2]) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Peng then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Wei then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetController("c1").selectedIndex=1 + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Pao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Ti then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + if j==4 then + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + else + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + end + end +end + + +function M:playAnim( fzitem,fzcards, size,i,ispaly ) + if(ispaly == nil)then + ispaly =false + end + if(ispaly and i == size)then + local faArray= fzitem:GetChild("chiwei") + if(faArray~=nil)then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end + self._area_fz_list:AddChild(fzitem) +end + + + --出牌提示动画 + function M:ChuPaiTiShi() + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + local chu_player = DataManager.CurrenRoom.self_player + local selfplayeTable = {} + selfplayeTable.handcard_list = chu_player.handcard_list + selfplayeTable.fz_list = chu_player.fz_list + selfplayeTable.tiCount = chu_player.tiCount + selfplayeTable.paoCount = chu_player.paoCount + selfplayeTable.hu_xi = chu_player.hu_xi + local player = membe_deep_clone(selfplayeTable) + local mark_ting= {} + for i=1,#DataManager.CurrenRoom.self_player.handcard_list do + local card = DataManager.CurrenRoom.self_player.handcard_list[i] + list_remove(player.handcard_list, card) + local _player = membe_deep_clone(player) + local tingList = CardCheck.tingPai(_player,DataManager.CurrenRoom) + local isKan = false + for j=1,#player.fz_list do + if card == player.fz_list[j].card and player.fz_list[j].type == RB_FZType.Kan then + isKan =true + end + end + if #tingList > 0 and isKan == false then + + mark_ting[#mark_ting+1] = card + end + table.insert(player.handcard_list, card) + table.sort( player.handcard_list, ViewUtil.HandCardSort) + end + -- print("ChuPaiTiShi",#mark_ting,vardump(player)) + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self._view :GetController("chupai").selectedIndex =1 + if #mark_ting>0 then + for i=1,#mark_ting do + for k=1,#self.card_list do + local card_view= self.card_list[k] + if card_view.card_item == mark_ting[i] then + card_view.btn_card:GetController("mark_ting").selectedIndex = 1 + end + end + end + end + else + self._view :GetController("chupai").selectedIndex =0 + for k=1,#self.card_list do + local card_view= self.card_list[k] + card_view.btn_card:GetController("mark_ting").selectedIndex = 0 + + end + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/Protocol.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/Protocol.lua new file mode 100644 index 00000000..f6929fad --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/Protocol.lua @@ -0,0 +1,51 @@ +local Protocol = { + + + -- 出牌 + GAME_DIS_CARD = "611", + -- 提示选择行为 + GAME_ACTION = "612", + + -- 通知服务器手牌队形改变 + GAME_CHANGE_CARD = "613", + -- 通知服务器牌字体改变 + GAME_CHANGE_TYPEfACE = "615", + + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 结算 + GAME_EVT_RESULT1 = "817", + + -- 弃牌 + GAME_EVT_QIPAI = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + --第二十一张牌 + GAME_EVT_ADD_CARD = "821", + + GAME_XIPAI = "20836", + GAME_EVENT_XIPAI = "20837", + GAME_EVENT_NOTIFY_XIPAI = "20838", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/RunBeard_GameEvent.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/RunBeard_GameEvent.lua new file mode 100644 index 00000000..a01a5097 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/RunBeard_GameEvent.lua @@ -0,0 +1,39 @@ + +local RunBeard_GameEvent = { + -- 换座 + + -- 发牌 + SendCards = "SendCards", + + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + + EventDicelCard ="EventDicelCard", + OnEventTake = "OnEventTake", + + OnEcentRecond = "OnEcentRecond", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + QiCard = "QiCard", + AddCard = "AddCard", + + EventXiPai="EventXiPai", + +} +return RunBeard_GameEvent diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/RunBeard_ResultView.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/RunBeard_ResultView.lua new file mode 100644 index 00000000..c709555b --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/RunBeard_ResultView.lua @@ -0,0 +1,752 @@ +require('Game.View.ResultView') +local PendulumRule = require('main.zipai.PendulumRule') +local RunBeard_ResultView = {} + +local M = RunBeard_ResultView + +function RunBeard_ResultView.new(blur_view, index) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self.class = 'RunBeard_ResultView' + self._currenIndex = 0 + if index ~= 1 then + self._blur_view = blur_view + end + self._close_zone = false + + self:init('ui://Extend_Poker_ChangdeWHZ/clearing') + self.xiPaiCtr=self._view:GetController("xipai") + return self +end + +function M:init(url) + ResultView.init(self, url) + local btn_share = self._view:GetChild('btn_share') + btn_share.onClick:Set( + function() + ShareScreenShot() + end + ) +end + +function M:InitData(over, room, result, total_result, callback) + local _overCtr = self._view:GetController('over') + local btn_confirm = self._view:GetChild('btn_confirm') + local btn_result = self._view:GetChild('btn_showResult') + local _btnCtr = self._view:GetController('button') + local _sdkCtr = self._view:GetController('sdk') + local _icon = self._view:GetChild('win_base') + local btn_close = self._view:GetChild('btn_close') + self._view:GetChild('tex_roomnum').text = room.room_id + self._view:GetChild('tex_data').text = os.date('%Y-%m-%d %H:%M', os.time()) + + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig then + self.xiPaiCtr.selectedIndex=1 + else + self.xiPaiCtr.selectedIndex=0 + end + + local xipai=self._view:GetChild("btn_xipai") + xipai.touchable=true + xipai.onClick:Add(function() + local xiPaiCallBack=function () + xipai.touchable=false + self.xiPaiCtr.selectedIndex=0 + ViewUtil.ErrorTip(1000000,"申请洗牌成功") + end + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendXiPaiAction(xiPaiCallBack) + end) + if result and result.xipai_score then + xipai.text="洗牌 积分x"..result.xipai_score + end + + if result ~= nil and result.liuju == true then + _icon.icon = 'ui://Main_RunBeard/liuju' + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + _overCtr.selectedIndex = 2 + + if over ~= 1 then + btn_confirm.onClick:Add( + function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:Close() + + if callback then + callback() + end + end + ) + self:AddClearItem(room, result, nil, over) + return + else + self.xiPaiCtr.selectedIndex=0 + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add( + function() + _overCtr.selectedIndex = 3 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + end + ) + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, result, total_result.info_list, over) + end + end + if over == 0 and result.liuju == false then + _icon.icon = 'ui://Main_RunBeard/jiesuan' + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + _overCtr.selectedIndex = 0 + btn_confirm.onClick:Add( + function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:Close() + + if callback then + callback() + end + end + ) + self:AddClearItem(room, result, nil, over) + elseif over == 1 and result.liuju == false then + _icon.icon = 'ui://Main_RunBeard/jiesuan' + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + _overCtr.selectedIndex = 0 + btn_result.onClick:Add( + function() + _overCtr.selectedIndex = 3 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + end + ) + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, result, total_result.info_list, over) + else + if result ~= nil then + if result.liuju == false then + _icon.icon = 'ui://Main_RunBeard/jiesuan' + over = 2 + _overCtr.selectedIndex = 3 + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, nil, total_result.info_list, over) + end + else + _icon.icon = 'ui://Main_RunBeard/jiesuan' + over = 2 + _overCtr.selectedIndex = 3 + self.xiPaiCtr.selectedIndex=0 + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, nil, total_result.info_list, over) + end + end +end + +function M:AddClearItem(room, data, total_data, over) + local n = over + 1 + local list_view1 = self._view:GetChild('player_list') + local list_view2 = self._view:GetChild('player_list_2') + + if data ~= nil and data.liuju == true then + self:FillLiuJuItemData(room, data) + if over == 1 then + self:FillItemData2(room, total_data, list_view2) + end + else + if 0 == over or 1 == over and data.liuju == false then + self:FillItemData(room, data, list_view1) + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end + end +end + +function M:GetPos(room, seat) + return ViewUtil.GetPos(room.self_player.seat, seat, room.room_config.people_num) +end +function M:FillLiuJuItemData(room, data) + local qipai_list = self._view:GetChild('qipai_listl') + local _dipaiC = self._view:GetController('qipai') + qipai_list:RemoveChildrenToPool() + if data.throw_card ~= nil and #data.throw_card > 0 then + _dipaiC.selectedIndex = 1 + local hand_card = PendulumRule.GetHandCard(data.throw_card, 3) + for k = 1, #hand_card do + local cards = qipai_list:AddItemFromPool() + for j = 1, #hand_card[k] do + cards:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + else + _dipaiC.selectedIndex = 0 + end + for i = 1, #data.info_list do + if data.info_list[i].seat ~= room.self_player.seat and #data.info_list[i].hand_card > 0 then + local card_list + if #data.info_list == 2 then + card_list = self._view:GetChild('card_list_2') + else + if self:GetPos(room, data.info_list[i].seat) == 2 then + card_list = self._view:GetChild('card_list_1') + else + card_list = self._view:GetChild('card_list_3') + end + end + + card_list:RemoveChildrenToPool() + for k = 1, #data.info_list[i].opCardList do + local fztype = data.info_list[i].opCardList[k].type + if fztype == RB_FZType.Kan then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', data.info_list[i].opCardList[k].card1) + end + end + end + local hand_card = PendulumRule.GetHandCard(data.info_list[i].hand_card, 3) + for k = 1, #hand_card do + local item = card_list:AddItemFromPool() + for j = 1, #hand_card[k] do + item:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + end + end +end + +function M:FillItemData(room, data, item) + local dipai_list = self._view:GetChild('dipai_list') + dipai_list:RemoveChildren(0, -1, true) + if data.left_card ~= nil and #data.left_card > 0 then + for i = 1, #data.left_card do + local dipais = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Qipai') + dipais:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/202_', data.left_card[i]) + dipai_list:AddChild(dipais) + end + end + local qipai_list = self._view:GetChild('qipai_list') + local _dipaiC = self._view:GetController('qipai') + qipai_list:RemoveChildrenToPool() + if data.throw_card ~= nil and #data.throw_card > 0 then + _dipaiC.selectedIndex = 1 + local hand_card = PendulumRule.GetHandCard(data.throw_card, 3) + for k = 1, #hand_card do + local cards = qipai_list:AddItemFromPool() + for j = 1, #hand_card[k] do + cards:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + else + _dipaiC.selectedIndex = 0 + end + local info_list = data.info_list + local Yes_win = false + local win_data = {} + for i = 1, #info_list do + if info_list[i].is_win == true then + Yes_win = true + win_data = info_list[i] + end + end + if win_data.seat == room.self_player.seat then + self._view:GetChild('show_win').visible = true + self._view:GetChild('show_low').visible = false + else + self._view:GetChild('show_win').visible = false + self._view:GetChild('show_low').visible = true + end + + if Yes_win == true then + local isWin_Card = true + local p = room:GetPlayerBySeat(win_data.seat) + if p.self_user.account_id == room.owner_id then + self._view:GetController('owner').selectedIndex = 1 + end + if p.seat == room.banker_seat then + self._view:GetController('bank').selectedIndex = 1 + end + self._view:GetChild('WinerName').text = p.self_user.nick_name + self._view:GetChild('chongtunshu').text = '充囤:' .. room.room_config.tun .. ' 囤' + self._view:GetChild('huxi').text = '胡息:' .. win_data.hu_xi + self._view:GetChild('tunshu').text = '基础囤数:' .. win_data.tun + self._view:GetChild('zongtunshu').text = '总囤数:' .. win_data.total_tun + if win_data.round_score >= 0 then + self._view:GetChild('score').text = '游戏分:+' .. win_data.round_score + self._view:GetChild('score').grayed = false + else + self._view:GetChild('score').text = '游戏分:' .. win_data.round_score + self._view:GetChild('score').grayed = true + end + local hp_info = win_data.hp_info + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值 + self._view:GetChild('tili_score').visible = true + self._view:GetChild('tili_title').visible = true + if (round_actual_hp > 0) then + self._view:GetChild('tili_score').text = '积分:+' .. round_actual_hp + self._view:GetChild('tili_score').grayed = false + else + self._view:GetChild('tili_score').text = '积分:' .. round_actual_hp + self._view:GetChild('tili_score').grayed = true + end + end + + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限 + if (isupper_limit) then + self._view:GetChild('yidashangxian').text = '已达上限' + else + self._view:GetChild('yidashangxian').text = '' + end + end + + local btn_head = self._view:GetChild('btn_head') + ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) + local fullname_list = self._view:GetChild('fullname_list') + fullname_list:RemoveChildren(0, -1, true) + if win_data.mingtang ~= nil and #win_data.mingtang > 0 then + for i = 1, #win_data.mingtang do + local dipais = UIPackage.CreateObjectFromURL('ui://Extend_Poker_ChangdeWHZ/FullName') + dipais:GetChild('n0').icon = 'ui://Extend_Poker_ChangdeWHZ/hu_' .. win_data.mingtang[i].mingtang + if win_data.mingtang[i].type == 1 and win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 番' + elseif win_data.mingtang[i].type == 2 and win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 囤' + elseif win_data.mingtang[i].type == 3 and win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 倍' + end + fullname_list:AddChild(dipais) + end + end + local card_list = self._view:GetChild('card_list') + card_list:RemoveChildrenToPool() + if #win_data.cardList > 0 then + for i = 1, #win_data.cardList do + -- 1 是对子 2 是三个的 + local fztype = win_data.cardList[i].type + if fztype == 1 then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '将' + cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi + cards:GetController('c1').selectedIndex = 0 + if win_data.cardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + for j = 1, 2 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card1) + end + else + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '顺' + if + win_data.cardList[i].card1 == win_data.cardList[i].card2 and + win_data.cardList[i].card1 == win_data.cardList[i].card3 + then + cards:GetChild('card_type').text = '碰' + end + cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card1) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card2) + cards:GetChild('card_3').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card3) + if isWin_Card == true then + if win_data.cardList[i].card1 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + elseif win_data.cardList[i].card2 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 2 + elseif win_data.cardList[i].card3 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 3 + end + end + end + end + end + for i = 1, #win_data.opCardList do + local fztype = win_data.opCardList[i].type + if fztype == RB_FZType.Chi then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '顺' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card2) + cards:GetChild('card_3').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card3) + if isWin_Card == true then + if win_data.opCardList[i].card1 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + elseif win_data.opCardList[i].card2 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 2 + elseif win_data.opCardList[i].card3 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 3 + end + end + elseif fztype == RB_FZType.Peng then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '碰' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + elseif fztype == RB_FZType.Kan then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '坎' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + elseif fztype == RB_FZType.Wei or fztype == RB_FZType.ChouWei then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '畏' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + elseif fztype == RB_FZType.Pao then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '跑' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 2 + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + elseif fztype == RB_FZType.Ti then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '提' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 2 + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + end + end + + if #win_data.hand_card > 0 then + for i = 1, #win_data.hand_card, 4 do + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '散' + cards:GetChild('card_huxi').text = 0 + cards:GetController('c1').selectedIndex = 2 + for j = 0, 3 do + if (i + j) <= #win_data.hand_card then + cards:GetChild('card_' .. (j + 1)).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.hand_card[i + j]) + if win_data.hand_card[i + j] == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = j + 1 + end + end + end + end + end + end + + item:RemoveChildrenToPool() + for i = 1, #info_list do + if info_list[i].is_win == false then + local player = item:AddItemFromPool() + local p = room:GetPlayerBySeat(info_list[i].seat) + if p.self_user.account_id == room.owner_id then + player:GetController('owner').selectedIndex = 1 + end + if p.seat == room.banker_seat then + player:GetController('bank').selectedIndex = 1 + end + local btn_head = player:GetChild('btn_head') + ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) + player:GetChild('playerName').text = p.self_user.nick_name + if info_list[i].round_score >= 0 then + player:GetChild('score').text = '+' .. info_list[i].round_score + player:GetChild('score').grayed = false + else + player:GetChild('score').text = info_list[i].round_score + player:GetChild('score').grayed = true + end + local hp_info = info_list[i].hp_info + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值 + player:GetChild('tili_score').visible = true + player:GetChild('tili_title').visible = true + if (round_actual_hp > 0) then + player:GetChild('tili_score').text = '+' .. round_actual_hp + player:GetChild('tili_score').grayed = false + else + player:GetChild('tili_score').text = '' .. round_actual_hp + player:GetChild('tili_score').grayed = true + end + end + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限 + if (isupper_limit) then + player:GetChild('yidashangxian').text = '已达上限' + else + player:GetChild('yidashangxian').text = '' + end + end + local card_list = player:GetChild('card_list') + card_list:RemoveChildrenToPool() + for k = 1, #info_list[i].opCardList do + local fztype = info_list[i].opCardList[k].type + if fztype == RB_FZType.Chi then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card2) + cards:GetChild('card_3').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card3) + elseif fztype == RB_FZType.Peng then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Kan then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Wei or fztype == RB_FZType.ChouWei then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Pao then + local cards = card_list:AddItemFromPool() + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Ti then + local cards = card_list:AddItemFromPool() + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + end + end + if #info_list[i].hand_card > 0 then + local hand_card = PendulumRule.GetHandCard(info_list[i].hand_card, 3) + for k = 1, #hand_card do + local cards = card_list:AddItemFromPool() + for j = 1, #hand_card[k] do + cards:GetChild('card_' .. (j)).icon = + self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + end + end + end +end + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + local p = room:GetPlayerBySeat(data[i].seat) + player_list[i].id = user.account_id + local total_score = data[i].total_score + player_list[i].hp_info = data[i].hp_info + player_list[i].score = total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + local entrust = data[i].entrust + if entrust == nil then + entrust = false + end + player_list[i].entrust = entrust + player_list[i].param = {} + local wcount = 0 + if (data[i].win_count ~= nil) then + wcount = data[i].win_count + end + local hxcount = 0 + if (data[i].total_huxi ~= nil) then + hxcount = data[i].total_huxi + end + player_list[i].param[1] = {} + player_list[i].param[1].key = '胡牌次数:' + player_list[i].param[1].value = tostring(wcount) + player_list[i].param[2] = {} + player_list[i].param[2].key = '胡息总数:' + player_list[i].param[2].value = tostring(hxcount) + end + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + self:SetGSListlineGap(5) + self:InitBigResult(room, 26) + DataManager.CurrenRoom = nil + -- list:RemoveChildrenToPool() + -- for i =1, #data do + -- local total_score = room:GetTotalScore(data[i].total_score) + -- local item = list:AddItemFromPool() + -- local p = room:GetPlayerBySeat(data[i].seat) + -- if p.self_user.account_id == room.owner_id then + -- item:GetController("owner").selectedIndex = 1 + -- end + + -- local btn_head = item:GetChild("btn_head") + -- ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) + -- item:GetChild("win_count").text = "胡牌次数:"..data[i].win_count.."次" + -- item:GetChild("total_huxi").text = "胡息总数:"..data[i].total_huxi + -- --点赞 + -- self:Click_zan(item, p.self_user.account_id) + + -- item:GetChild("name").text = p.self_user.nick_name + + -- local hp_info = data[i].hp_info + -- if(hp_info ~=nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + -- -- --体力值 + -- -- local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值 + -- local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限 + -- if(isupper_limit)then + -- item:GetChild("yidashangxian").text = "已达上限" + -- else + -- item:GetChild("yidashangxian").text = "" + -- end + -- end + -- local x = room:GetOriginScore(total_score) + -- if total_score >= 0 then + -- item:GetChild("score").text = "+"..x + -- item:GetChild("score").grayed = false + -- else + -- item:GetChild("score").text = x + -- item:GetChild("score").grayed = true + -- end + -- if room.hpOnOff == 1 and room.score_times ~= 1 or room:checkHpNonnegative() then + -- item:GetController("bei") .selectedIndex=1 + -- item:GetChild("sss").text = room.score_times + -- if(hp_info ~= nil)then + -- local round_actual_hp = d2ad(hp_info.total_hp) --// 本局实际输赢体力值 + -- total_score = round_actual_hp + -- end + -- if total_score >= 0 then + -- item:GetChild("score1").text = "+"..total_score + -- item:GetChild("score1").grayed = false + -- else + -- item:GetChild("score1").text = total_score + -- item:GetChild("score1").grayed = true + -- end + -- end + -- if #data ==3 then + -- if i ==1 then + -- if total_score >data[2].total_score and total_score >data[3].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- elseif i ==2 then + -- if total_score >data[1].total_score and total_score >data[3].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- elseif i ==3 then + -- if total_score >data[2].total_score and total_score >data[1].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- end + -- else + -- if i ==1 then + -- if total_score >data[2].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- elseif i ==2 then + -- if total_score >data[1].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- end + + -- end + -- end + + -- DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild('btn_head') + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= '' then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end +function M:getCardItem(card_1, card_2) + local _room = DataManager.CurrenRoom + if _room ~= nil and _room.change_card_display ~= nil then + return card_1 .. _room.change_card_display .. card_2 + else + return card_1 .. '2_' .. card_2 + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/CardCheck.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/CardCheck.lua new file mode 100644 index 00000000..647014d7 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/CardCheck.lua @@ -0,0 +1,635 @@ +-- 检测牌是否存在 +local function checkCard(eventCard, cardList, num) + if num == nil then + num = 1 + end + local result = 0 + for i = 1, #cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if (result == num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card, count) + for i = 1, count do + list_remove(cardList, card) + end +end + +local function checkCardAndRomve(eventCard, cardList, num) + if (checkCard(eventCard, cardList, num)) then + removeCard(cardList, eventCard, num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard, cardList) + local result = 0 + for i = 1, #cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + stackHuxi = nil +} + +function M:push(cardGroup) + self.stack[#self.stack + 1] = cardGroup +end +function M:pushhuxi(cardGroup) + self.stackHuxi[#self.stackHuxi + 1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack, #self.stack) + for _, card in ipairs(cardGroup) do + self.cardList[#self.cardList + 1] = card + end + table.sort(self.cardList) +end +-- 顺子 +function M:tryShunzi1(card, player) + if card < 300 and card % 100 > 8 then + return false + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + removeCard(self.cardList, card, 1) + local cardGroup = {card, card + 1, card + 2} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + return true + end + return false +end + + +-- 2 7 10 +function M:tryShunzi3(card, player) + if card % 100 == 2 then + if (checkCard(card + 5, self.cardList, 1)) and (checkCard(card + 8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 5, 1) + removeCard(self.cardList, card + 8, 1) + local cardGroup = {card, card + 5, card + 8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + return true + end + end + return false +end + + +-- 坎 +function M:tryKezi(card, player) + if (checkCard(card, self.cardList, 3)) then + removeCard(self.cardList, card, 3) + local cardGroup = {card, card, card} + self:push(cardGroup) + local _huxi = 1 + if self.drawCard~=card then + --printlog("tryKezi====>>>",self.drawCard,card) + _huxi = 3 + end + self:pushhuxi(_huxi) + return true + end + return false +end + + + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (checkCard(card, self.cardList, 2)) then + removeCard(self.cardList, card, 2) + local cardGroup = {card, card} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + elseif (checkCard(card, self.cardList, 1)) then + if card % 100 <=9 then + if (checkCard(card+1, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+1, 1) + local cardGroup = {card, card+1} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + end + + if card % 100 <=8 then + if (checkCard(card+2, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+2, 1) + local cardGroup = {card, card+2} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + end + + if card % 100 >=2 then + if (checkCard(card-1, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-1, 1) + local cardGroup = {card, card-1} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + end + + if card % 100 >=3 then + if (checkCard(card-2, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-2, 1) + local cardGroup = {card, card-2} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + end + + if card % 100 ==2 then + if (checkCard(card+5, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+5, 1) + local cardGroup = {card, card+5} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card+8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+8, 1) + local cardGroup = {card, card+8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + + if card % 100 ==7 then + if (checkCard(card-5, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-5, 1) + local cardGroup = {card, card-5} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card+3, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+3, 1) + local cardGroup = {card, card+3} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + if card % 100 ==10 then + if (checkCard(card-8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-8, 1) + local cardGroup = {card, card-8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card-3, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-3, 1) + local cardGroup = {card, card-3} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + + end + + return false +end + + +function M:tryPair2(card) + if (self.pair_count > 0) then + return false + end + + if (checkCard(card, self.cardList, 1)) then + if card % 100 ==2 then + if (checkCard(card+5, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+5, 1) + local cardGroup = {card, card+5} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card+8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+8, 1) + local cardGroup = {card, card+8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + + if card % 100 ==7 then + if (checkCard(card-5, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-5, 1) + local cardGroup = {card, card-5} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card+3, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+3, 1) + local cardGroup = {card, card+3} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + if card % 100 ==10 then + if (checkCard(card-8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-8, 1) + local cardGroup = {card, card-8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card-3, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-3, 1) + local cardGroup = {card, card-3} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + + end + + return false +end + + + +function M:tryWin(player) + + if #self.cardList == 0 then + if (self.pair_count == 1) then + return true + elseif self.pair_count == 2 and #self.stack==2 then + local tempPList={} + for i=1,#self.stack do + local card1=self.stack[i][1] + local card2=self.stack[i][2] + table.insert(tempPList,card1) + table.insert(tempPList,card2) + end + + if #tempPList~=4 then return false end + + table.sort(tempPList) + + if tempPList[1]==tempPList[2]+1 and tempPList[2]==tempPList[3]+1 and tempPList[3]==tempPList[4]+1 then + return true + end + + end + + return false + end + + + local activeCard = 0 + for i = 1, #self.cardList do + if (self.cardList[i] == 201 or self.cardList[i] == 202) then + activeCard = self.cardList[i] + break + end + end + if (activeCard == 0) then + activeCard = self.cardList[1] + end + + if (activeCard % 100 == 1) then + if self:tryShunzi1(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + if self:tryKezi(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair2(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + elseif activeCard % 100 == 2 then + if self:tryShunzi3(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + if self:tryKezi(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair2(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryShunzi1(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + else + if self:tryKezi(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair2(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + + if self:tryShunzi1(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + end + return false +end + +local function init(self, player, cardInhand, addCard) + self.stack = {} + self.stackHuxi = {} + self.pair_count = 0 + self.kong_count = 0 + self.drawCard=0 + self.cardList = membe_clone(cardInhand) + if addCard == nil then + self.kong_count = 1 + else + self.kong_count = 0 + self.cardList[#self.cardList + 1] = addCard + self.drawCard=addCard + end + table.sort(self.cardList) + return self:tryWin(player) +end + +function M.tingPai(player, room) + local self = setmetatable({}, {__index = M}) + local tingList = {} + local cardInhand = player.handcard_list + if not cardInhand or #cardInhand == 0 then + return tingList + end + local kan_huxi = 0 + local kan_cards = {} + for j = 1, #player.fz_list do + for i = 1, #cardInhand do + if cardInhand[i] == player.fz_list[j].active_card and player.fz_list[j].type == 3 then + kan_cards[#kan_cards + 1] = cardInhand[i] + break + end + end + end + if #kan_cards > 0 then + for i = 1, #kan_cards do + kan_huxi = kan_huxi + 3 + removeCard(cardInhand, kan_cards[i], 3) + end + end + player.tiCount = 0 + player.paoCount = 0 + + + for k = 100, 200, 100 do + for i = 1, 10 do + local tem = k + i + local result = init(self, player, cardInhand, tem) + if result then + --printlog("是否胡牌===>>>",tem) + end + + local num = 0 + for k = 1, #self.stackHuxi do + num = num + self.stackHuxi[k] + end + + if result then + local num1 = 0 + --pt(self.stackHuxi) + for k = 1, #self.stackHuxi do + num1 = num1 + self.stackHuxi[k] + --printlog(self.stackHuxi[k]) + end + --printlog("胡息数量===>>>",player.hu_xi,num1,kan_huxi) + if (player.hu_xi + num1 + kan_huxi) >= (self:getHuxi(room)-1) then + tingList[#tingList + 1] = tem + end + end + + + + end + end + return tingList +end + +function M:getHuxi(room) + if room.game_id == 15 then + return 8 + end + if room.game_id == 13 or room.game_id == 14 or room.game_id == 23 then + return 15 + elseif room.game_id == 26 then + return 10 + elseif room.game_id == 29 then + if room.room_config.maxPlayers == 3 then + return 15 + else + return 9 + end + end +end + +function M:GetFzData(tem, ctype) + local huxi + + if ctype == 1 then + huxi=1 + elseif ctype == 2 then + huxi=1 + elseif ctype == 3 then + huxi = 3 + elseif ctype == 4 then + huxi = 3 + elseif ctype == 5 then + huxi = 3 + elseif ctype == 7 then + huxi = 5 + end + return huxi +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/FZData.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/FZData.lua new file mode 100644 index 00000000..e5bb09cd --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/FZData.lua @@ -0,0 +1,45 @@ +RB_FZType = +{ + Chi = 1, + Peng = 2, + Kan = 3, + Wei = 4, + ChouWei=5, + Pao = 6, + Ti = 7, + HU = 8, + Bi = 9, + PengPao =10, + WeiPao =11, + WeiTi =12, + KanTi =13, + DuiZi = 14, + zhao = 15, +} + +local FZTipList = { + tip_map_id = nil, + tip_map_type = nil +} + +local M = FZTipList + +function M.new() + local self = {} + setmetatable(self,{__index = FZTipList}) + self.tip_map_id = {} + self.tip_map_type = {} + return self +end + +function M:AddTip(tip) + self.tip_map_id[tip.id] = tip + local tiplist = self.tip_map_type[tip.weight] + if not tiplist then + tiplist = {} + self.tip_map_type[tip.weight] = tiplist + end + tiplist[#tiplist+1] = tip +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/HuTipView.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/HuTipView.lua new file mode 100644 index 00000000..d6e6e97b --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/HuTipView.lua @@ -0,0 +1,69 @@ +local HuTipView = { + _view_start_pos = nil, + _touch_start_pos = nil, +} + +local M = HuTipView + +function M.new(main_view) + local self = {} + self.class = "HuTipView" + setmetatable(self,{__index = HuTipView}) + self._main_view = main_view + self:init() + return self +end + +local function SetObjEnabled(obj, enabled) + obj.visible = enabled + obj.touchable = enabled +end +function M:OnTouchBegin(context) + self._view_start_pos = Vector2(self._view.x, self._view.y) + self._touch_start_pos = self._main_view._view:GlobalToLocal(Vector2(context.inputEvent.x, context.inputEvent.y)) +end +function M:OnTouchMove(context) + local xy = self._main_view._view:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + local dist = Vector2(xy.x - self._touch_start_pos.x, xy.y - self._touch_start_pos.y) + local posx = self._view_start_pos.x + dist.x + local posy = self._view_start_pos.y + dist.y + local max_x = self._main_view._view.width - self._view.width + local max_y = self._main_view._view.height - self._view.height + self._view.x = posx < 0 and 0 or posx > max_x and max_x or posx + self._view.y = posy < 0 and 0 or posy > max_y and max_y or posy +end + +function M:init() + self._view = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Hu_Tip") + self._main_view._view:AddChild(self._view) + local width = self._view.width + local m_width = self._main_view._view.width + local m_height = self._main_view._view.height + -- self._view.x = 0.5 * m_width - 0.5 * width + self._view.x = 0 + self._view.y = 0.7 * m_height + SetObjEnabled(self._view, false) + self._view.onTouchBegin:Add(handler(self, self.OnTouchBegin)) + self._view.onTouchMove:Add(handler(self, self.OnTouchMove)) +end + +function M:FillData(cards) + local lst_card = self._view:GetChild("tingpai") + lst_card:RemoveChildrenToPool() + local num = #cards + if num > 0 then + if num > 4 and num < 28 then + self._view.width = 191 + ((num > 4 and 6 or num) - 3) * 38 + self._view.height = 69 + (math.ceil(num / 5) - 1) * 56 + end + for i = 1, num do + local item = lst_card:AddItemFromPool() + item:GetChild("icon").icon = "ui://Main_RunBeard/202_1_" .. cards[i] + end + SetObjEnabled(self._view, true) + else + SetObjEnabled(self._view, false) + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/PendulumRule.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/PendulumRule.lua new file mode 100644 index 00000000..8f6b21cc --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/PendulumRule.lua @@ -0,0 +1,1177 @@ + +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + if num ==nil then + num =1 + end + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + end + end + if(result ==num) then + return true + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local M = { + cardList = nil, + stack = nil, +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + self.cardList[#self.cardList + 1] = card + end + table.sort(self.cardList) +end + +function M:tryShunzi1(card,type1 ) + if card < 300 and card % 100 > 8 then + return false + end + if (checkCard(card, self.cardList)) and (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card+1,1) + removeCard(self.cardList,card+2,1) + removeCard(self.cardList,card,1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end +function M:tryShunzi2( card ,type1) + if card -card%100 == 100 then + if self:tryShunzi1(card+100,0) or self:tryShunzi3(card+100,0) then + return false + end + if checkCard(card+100,self.cardList,1) and checkCard(card,self.cardList,2) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,2) + removeCard(self.cardList,card+100,1) + local cardGroup = {card,card,card+100} + self:push(cardGroup) + return true + end + if (checkCard(card+100,self.cardList,2)) and (checkCard(card,self.cardList,1)) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+100,2) + local cardGroup = {card+100,card+100,card} + self:push(cardGroup) + return true + end + else + if self:tryShunzi1(card-100) or self:tryShunzi3(card-100) then + return false + end + if (checkCard(card-100,self.cardList,1)) and checkCard(card,self.cardList,2) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,2) + removeCard(self.cardList,card-100,1) + local cardGroup = {card,card,card-100} + self:push(cardGroup) + return true + end + if (checkCard(card-100,self.cardList,2)) and checkCard(card,self.cardList,1) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card-100,2) + local cardGroup = {card-100,card-100,card} + self:push(cardGroup) + return true + end + end + return false +end +function M:tryShunzi3( card,type1 ) + if card % 100 == 2 then + if (checkCard(card, self.cardList, 1)) and (checkCard(card+5, self.cardList, 1)) and (checkCard(card+8, self.cardList, 1)) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+5,1) + removeCard(self.cardList,card+8,1) + local cardGroup = {card,card+5,card+8} + self:push(cardGroup) + return true + + end + return false + end + return false +end + +function M:tryKezi(card) + if (checkCard(card, self.cardList, 3)) then + removeCard(self.cardList,card,3) + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryTi(card) + if (checkCard(card, self.cardList, 4)) then + removeCard(self.cardList,card,4) + local cardGroup = {card,card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (checkCard(card, self.cardList, 2)) then + removeCard(self.cardList,card,2) + local cardGroup = {card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryShunzi4( card ) + if card -card%100 == 100 then + if self:tryShunzi1(card+100,0) or self:tryShunzi3(card+100,0) or self:tryShunzi5(card+100,0) then + return false + end + if checkCard(card+100,self.cardList,1) and checkCard(card,self.cardList,1) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+100,1) + local cardGroup = {card,card+100} + self:push(cardGroup) + return true + end + if (checkCard(card+100,self.cardList,1)) and (checkCard(card,self.cardList,1)) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+100,1) + local cardGroup = {card,card+100} + self:push(cardGroup) + return true + end + else + if self:tryShunzi1(card-100,0) or self:tryShunzi3(card-100,0) or self:tryShunzi5(card-100,0) then + return false + end + if (checkCard(card-100,self.cardList,1)) and checkCard(card,self.cardList,1) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card-100,1) + local cardGroup = {card-100,card} + self:push(cardGroup) + return true + end + if (checkCard(card-100,self.cardList,1)) and checkCard(card,self.cardList,1) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card-100,1) + local cardGroup = {card,card-100} + self:push(cardGroup) + return true + end + end + return false +end +function M:tryShunzi5( card ,type1) + if card % 100 == 2 then + if (checkCard(card, self.cardList, 1)) and (checkCard(card+5, self.cardList, 1)) then + if self:tryShunzi2(card+5,0) or self:tryShunzi1(card+5,0) then + return false + end + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+5,1) + local cardGroup = {card,card+5} + self:push(cardGroup) + return true + end + if (checkCard(card, self.cardList, 1)) and (checkCard(card+8, self.cardList, 1)) then + if self:tryShunzi2(card+8,0) or self:tryShunzi1(card+8,0) then + return false + end + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+8,1) + local cardGroup = {card,card+8} + self:push(cardGroup) + return true + end + elseif card % 100 == 7 then + if (checkCard(card, self.cardList, 1)) and (checkCard(card+3, self.cardList, 1)) then + if self:tryShunzi2(card+3,0) or self:tryShunzi1(card+3,0) then + return false + end + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+3,1) + local cardGroup = {card,card+3} + self:push(cardGroup) + return true + end + end + return false +end + +function M:tryMenzi1( card ) + + if (checkCard(card, self.cardList, 1)) and (checkCard(card+1, self.cardList, 1)) then + if self:tryShunzi2(card+1,0) or self:tryShunzi1(card+1,0) or self:tryShunzi3(card+1,0) then + return false + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+1,1) + local cardGroup = {card,card+1} + self:push(cardGroup) + return true + end + if (checkCard(card, self.cardList, 1)) and (checkCard(card+2, self.cardList, 1)) then + if self:tryShunzi2(card+2,0) or self:tryShunzi1(card+2,0) or self:tryShunzi3(card+2,0) then + return false + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+2,1) + local cardGroup = {card,card+2} + self:push(cardGroup) + return true + end + + return false +end + +function M:tryOneCard(card) + if (checkCard(card, self.cardList, 1)) then + removeCard(self.cardList,card,1) + local cardGroup = {card} + self:push(cardGroup) + return true + end + return false +end + -- 摆牌规则 先四后三 对子 顺子 单个 +function M:tryPendulumRule() + for i=1,10 do + for k=100,200,100 do + local tem = k + i + local x = true + if x and self:tryTi(tem) then + x =false + end + if x and self:tryKezi(tem) then + x =false + end + if x and self:tryShunzi2(tem) then + x =false + end + if x and self:tryPair(tem) then + x =false + end + if x and self:tryShunzi3(tem) then + x =false + end + if x and self:tryShunzi1(tem) then + x =false + end + if x and self:tryShunzi5(tem) then + x =false + end + if x and self:tryShunzi4(tem) then + x =false + end + if x and self:tryMenzi1(tem) then + x =false + end + if x and self:tryOneCard(tem) then + x =false + end + end + end + if #self.stack >10 then + --变成10列--这里牌多了也不会报错了 + local removeitem = 0 + local card = 0 + for i=#self.stack,1,-1 do + if #self.stack[i] == 1 and removeitem ==0 then + removeitem = i + card = self.stack[i][1] + list_remove(self.stack[i],self.stack[i][1]) + end + end + if card ~= 0 then + list_remove(self.stack,self.stack[removeitem]) + for i=#self.stack,1,-1 do + if #self.stack[i] >0 and #self.stack[i] <3 then + self.stack[i][#self.stack[i] +1] = card + break + end + end + end + end + return self.stack +end + + + + +--摆牌规则 优先胡息 +function M:tryPendulumRule2() + local card_count = #self.cardList + local cards_map = {} + local CountCards = {} + for i=1,#self.cardList do + CountCards[self.cardList[i]]= CountCards[self.cardList[i]] == nil and 1 or CountCards[self.cardList[i]] + 1 + end + --pt(self.cardList) + --printlog("摆牌规则 优先胡息====》》》") + --pt(CountCards) + + + --find4 + for k,v in pairs(CountCards) do + if (v == 4 and k<200) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3 and k<200) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2 and k<200) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + + + + + --find 小 2 7 10 + local counta = CountCards[102] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[110]~=nil and CountCards[102] >0 and CountCards[107] >0 and CountCards[110] >0 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cs[3]= 110 + cards_map[#cards_map+1] = cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 3 + end + end + end + + + --find 小 123 + local counta = CountCards[101] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[101]~=nil and CountCards[102]~=nil and CountCards[103]~=nil and CountCards[101] >0 and CountCards[102] >0 and CountCards[103] >0 then + local cs = {} + cs[1]= 101 + cs[2]= 102 + cs[3]= 103 + cards_map[#cards_map+1] = cs + CountCards[101] = CountCards[101]-1 + CountCards[102] = CountCards[102]-1 + CountCards[103] = CountCards[103]-1 + card_count = card_count - 3 + end + end + end + + + --find abc + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] == CountCards[i + 1] and CountCards[i] == CountCards[i + 2] then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + + + + + --find ab + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + + + + + --find 小 2 7 两个 + for i=101,110 do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[102] ==1 and CountCards[107] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[102]~=nil and CountCards[110]~=nil and CountCards[102] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[107]~=nil and CountCards[110]~=nil and CountCards[107] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 107 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + local tempCardList={} + for i = 101, 110 do + if CountCards[i]~=nil and (CountCards[i] == 1) then + table.insert(tempCardList,i) + CountCards[i]=CountCards[i]-1 + end + end + + + local cs={} + local count=1 + for i=1,#tempCardList do + --[[if i%3==1 then + cs[count]={} + end + + table.insert(cs[count],tempCardList[i]) + + if i%3==0 then + count=count+1 + end--]] + + local cst={} + table.insert(cst,tempCardList[i]) + table.insert(cs,cst) + + end + + for i=1 , #cs do + cards_map[#cards_map+1]=cs[i] + card_count =card_count- #cs[i] + end + + + ----------------------------- + --find4 + for k,v in pairs(CountCards) do + if (v == 4 and k>200) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3 and k>200) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2 and k>200) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + + --find 大 2 7 10 + local countA = CountCards[202] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[210]~=nil and CountCards[202] >0 and CountCards[207] >0 and CountCards[210] >0 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cs[3]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 3 + end + end + end + + --find 大 123 + local countA = CountCards[201] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[201]~=nil and CountCards[202]~=nil and CountCards[203]~=nil and CountCards[201] >0 and CountCards[202] >0 and CountCards[203] >0 then + local cs = {} + cs[1]= 201 + cs[2]= 202 + cs[3]= 203 + cards_map[#cards_map+1]=cs + CountCards[201] = CountCards[201]-1 + CountCards[202] = CountCards[202]-1 + CountCards[203] = CountCards[203]-1 + card_count = card_count - 3 + end + end + end + + --find ABC + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] == CountCards[i + 1] and CountCards[i] == CountCards[i + 2] then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + + --[[ --find AAa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] >= 2 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-3; + end + end + end + + --find Aa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] == 1 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 1; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-2 + end + end + end --]] + + --find AB + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + --find 大 2 7 两个 + for i=201,210 do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[202] ==1 and CountCards[207] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + card_count = card_count - 2 + end + end + + + for i=201,210 do + if CountCards[202]~=nil and CountCards[210]~=nil and CountCards[202] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + for i=201,210 do + if CountCards[207]~=nil and CountCards[210]~=nil and CountCards[207] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 207 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + + + -------------------- + + + + + local singleList = {} + --find else + for k,v in pairs(CountCards) do + if (v == 1) then + singleList[#singleList+1] = k + CountCards[k] = CountCards[k] -1 + + end + end + + for i=1,#singleList do + local cs={} + table.insert(cs,singleList[i]) + cards_map[#cards_map + 1]= cs + end + + --[[local index = 3 + for i=1,#singleList,index do + local cs ={} + cs[#cs+1] = singleList[i] + if i < #singleList then cs[#cs+1] = singleList[i+1] end + if i < #singleList - 1 then cs[#cs+1] = singleList[i+2] end + cards_map[#cards_map + 1]=cs + end--]] + --变成9列--这里牌多了也不会报错了 + --[[for i=9 ,1,-1 do + for j = #cards_map , 9,-1 do + if #cards_map[i] < 3 then + cards_map[i][#cards_map[i]+1] = cards_map[j][1] + list_remove(cards_map[j],cards_map[j][1]) + end + end + end--]] + + --pt(cards_map) + --printlog("11111111111111111111") + local mapCount=#cards_map + if mapCount>12 then + local tempCardMpList1={} + local tempCardMpList2={} + local tempCardMpList3={} + for i=1,mapCount do + if #cards_map[i]>=2 then + table.insert(tempCardMpList1,cards_map[i]) + else + if cards_map[i][1]<200 then + table.insert(tempCardMpList2,cards_map[i][1]) + elseif cards_map[i][1]>200 then + table.insert(tempCardMpList3,cards_map[i][1]) + end + end + end + + --pt(tempCardMpList1) + --pt(tempCardMpList2) + --pt(tempCardMpList3) + + local cs={} + local count=1 + for i=1,#tempCardMpList2 do + if i%3==1 then + cs[count]={} + end + + table.insert(cs[count],tempCardMpList2[i]) + + if i%3==0 then + count=count+1 + end + + end + + for i=1 , #cs do + tempCardMpList1[#tempCardMpList1+1]=cs[i] + end + + + local cs={} + local count=1 + for i=1,#tempCardMpList3 do + if i%3==1 then + cs[count]={} + end + + table.insert(cs[count],tempCardMpList3[i]) + + if i%3==0 then + count=count+1 + end + + end + + for i=1 , #cs do + tempCardMpList1[#tempCardMpList1+1]=cs[i] + end + + + cards_map=tempCardMpList1 + end + + table.sort(cards_map, ViewUtil.HandCardSort3) + --pt(cards_map) + return cards_map + +end + + +--摆牌规则 优先顺子 -AAa- 对子 - 单牌 +function M:tryPendulumRule3() + local card_count = #self.cardList + local cards_map = {} + local CountCards = {} + for i=1,#self.cardList do + CountCards[self.cardList[i]]= CountCards[self.cardList[i]] == nil and 1 or CountCards[self.cardList[i]] + 1 + end + --find4 + for k,v in pairs(CountCards) do + if (v == 4) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + --find abc + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] >0 and CountCards[i + 1]>0 and CountCards[i + 2]>0 then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + --find ABC + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] >0 and CountCards[i + 1]>0 and CountCards[i + 2]>0 then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + --find 大 2 7 10 + local countA = CountCards[202] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[210]~=nil and CountCards[202] >0 and CountCards[207] >0 and CountCards[210] >0 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cs[3]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 3 + end + end + end + + --find 小 2 7 10 + local counta = CountCards[102] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[110]~=nil and CountCards[102] >0 and CountCards[107] >0 and CountCards[110] >0 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cs[3]= 110 + cards_map[#cards_map+1] = cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 3 + end + end + end + + --find AAa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] >= 2 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-3; + end + end + end + --find aaA + for i = 101, 110 do + if CountCards[i]~=nil and (CountCards[i] >= 2) then + if CountCards[i + 100]~=nil and (CountCards[i + 100] == 1) then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i+100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i +100] = CountCards[i +100] - 1 + card_count = card_count-3; + end + end + end + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + --find Aa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] == 1 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 1; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-2 + end + end + end + --find ab + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + --find AB + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + --find 大 2 7 两个 + for i=201,210 do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[202] ==1 and CountCards[207] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + card_count = card_count - 2 + end + end + + for i=201,210 do + if CountCards[202]~=nil and CountCards[210]~=nil and CountCards[202] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + for i=201,210 do + if CountCards[207]~=nil and CountCards[210]~=nil and CountCards[207] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 207 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + --find 小 2 7 两个 + for i=101,110 do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[102] ==1 and CountCards[107] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[102]~=nil and CountCards[110]~=nil and CountCards[102] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[107]~=nil and CountCards[110]~=nil and CountCards[107] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 107 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + local singleList = {} + --find else + for k,v in pairs(CountCards) do + if (v == 1) then + singleList[#singleList+1] = k + CountCards[k] = CountCards[k] -1 + + end + end + local index = 3 + for i=1,#singleList,index do + local cs ={} + cs[#cs+1] = singleList[i] + if i < #singleList then cs[#cs+1] = singleList[i+1] end + if i < #singleList - 1 then cs[#cs+1] = singleList[i+2] end + cards_map[#cards_map + 1]=cs + end + --变成9列--这里牌多了也不会报错了 + for i=10 ,1,-1 do + for j = #cards_map , 10,-1 do + if #cards_map[i] < 3 then + cards_map[i][#cards_map[i]+1] = cards_map[j][1] + list_remove(cards_map[j],cards_map[j][1]) + end + end + end + + return cards_map + +end + +local function init(self,cardInhand,index) + self.cardList= {} + self.stack = {} + self.cardList = membe_clone(cardInhand) + table.sort(self.cardList) + if index== nil or index ==0 then + return self:tryPendulumRule2() + elseif index == 1 then + return self:tryPendulumRule() + elseif index == 2 then + return self:tryPendulumRule2() + elseif index == 3 then + return self:tryPendulumRule3() + end +end + +function M.GetHandCard(cardInhand,index) + local self = setmetatable({}, {__index = M}) + if not cardInhand or #cardInhand == 0 then + return nil + end + local HandCardList = init(self,cardInhand,index) + return HandCardList +end + + +return M + + + + + diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPCardView.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPCardView.lua new file mode 100644 index 00000000..2c24f342 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPCardView.lua @@ -0,0 +1,119 @@ + + +local M = { + btn_card = nil, + card_item = 0, + Hierarchy = 0, + index_X = 0, + index_Y = 0, + isUser = false, + initPos = Vector2.zero +} + + +function M.InitCardView(card_code, index_X, index_Y, type) + -- setmetatable(M, {__index = CardView}) + local self = setmetatable({}, {__index = M}) + self._room = DataManager.CurrenRoom + self.btn_card = self:InitUI(card_code, type) + self.card_item = card_code + self.index_X = index_X + self.index_Y = index_Y + self.btn_card.data = self + + self:Init() + return self, self.btn_card +end + +function M:Init() + self.card_width = 87 + self.initPos = Vector2.zero +end + +function M:InitUI(card_code, type) + local card + if type == 0 then + card = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Btn_Card") + self.icon = card:GetChild("icon") + self.icon.icon = self:getHandCardItem("ui://Main_RunBeard/201_", card_code) + self.icon:SetScale(self:getCardSize(), self:getCardSize()) + card:GetChild("n6"):SetScale(self:getCardSize(), self:getCardSize()) + elseif type == 1 then + card = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + self.icon = card:GetChild("icon") + if card_code == 0 then + self.icon = "ui://Main_RunBeard/202_1_300" + else + self.icon = self:GetCardItem("ui://Main_RunBeard/203_", card_code) + end + end + return card +end + +function M:GetCardItem(card_1, card_2) + local room = DataManager.CurrenRoom + if room.change_card_display ~= nil then + return card_1 .. room.change_card_display .. card_2 + else + return card_1 .. "2_" .. card_2 + end +end + +function M:getCardSize() + if self._room.change_card_size ~= nil then + return self._room.change_card_size + else + return 1 + end +end + +function M:getHandCardItem(card_1, card_2) + if self._room.change_card_display ~= nil then + if self._room.change_card_display == "1_" then + if self._room.change_card_size ~= nil then + self.card_width = 94 * self._room.change_card_size + else + self.card_width = 94 + end + + return card_1 .. "4_" .. card_2 + end + if self._room.change_card_size ~= nil then + self.card_width = 87 * self._room.change_card_size + else + self.card_width = 87 + end + return card_1 .. self._room.change_card_display .. card_2 + else + if self._room.change_card_size ~= nil then + self.card_width = 90 * self._room.change_card_size + else + self.card_width = 90 + end + return card_1 .. "6_" .. card_2 + end +end + +function M:UpdateKan() + self.btn_card.touchable = false + self.btn_card:GetController("Kan").selectedIndex = 1 +end + +function M:UpdateTing(isting) + self.btn_card:GetController("mark_ting").selectedIndex = isting and 1 or 0 +end + +function M:UpdateIcon() + self.icon.icon = self:getHandCardItem("ui://Main_RunBeard/201_", self.card_item) + -- self.btn_card:TweenMove(self:GetHandCardPos(self, #CountCards), 0.02) +end + +function M:UpdateScale() + local size = self._room.change_card_size + -- card_view.btn_card:GetChild("icon").icon = self:getHandCardItem("ui://Main_RunBeard/201_", card_view.card_item) + self.icon:SetScale(size, size) + self.btn_card:GetChild("n6"):SetScale(size, size) + -- self:getCardWidth() +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPChiView.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPChiView.lua new file mode 100644 index 00000000..66b171b5 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPChiView.lua @@ -0,0 +1,131 @@ +local M = {} + +function M.InitChiView(gamectr, view, cardInfo) + local self = setmetatable({}, {__index = M}) + self._room = DataManager.CurrenRoom + self.class = "ChiView" + self._gamectr = gamectr + self._mainView = view + self._cardInfo = cardInfo + return self +end + +function M:UpdateChiView(list, tip_hu, callback, cardInfo) + self:ShowView(list, tip_hu, callback, cardInfo) +end + +function M:ShowView(tiplist, tip_hu, callback, cardInfo) + local _pop_tip_choice = UIPackage.CreateObject("Main_RunBeard", "Pop_tip_choice") + local list_choose = _pop_tip_choice:GetChild("Lst_choose") + _pop_tip_choice:GetChild("dibtn").onClick:Add(function() + _pop_tip_choice:Dispose() + end) + + -- --list 去重复的 + if #tiplist == 1 then + _pop_tip_choice:GetController("bipai").selectedIndex = 3 + end + + local tip_list = membe_deep_clone(tiplist) + for i = 1, #tiplist do + for k = 1, #tip_list do + if tip_list[k].weight ~= 4 and tiplist[i].id ~= tip_list[k].id then + if tiplist[i].OpCard[1] == tip_list[k].OpCard[1] and tiplist[i].OpCard[2] == tip_list[k].OpCard[2] then + tip_list[i].weight = 4 + end + end + end + end + + list_choose:RemoveChildrenToPool() + for i = 1, #tip_list do + if tip_list[i].weight ~=4 then + local item_choose = list_choose:AddItemFromPool() + self:SetIcon(item_choose, 2, tip_list[i].OpCard[1]) + self:SetIcon(item_choose, 3, tip_list[i].OpCard[2]) + self:SetIcon(item_choose, 1, tip_list[i].card) + + item_choose.onClick:Add(function() + for k=1,list_choose.numChildren do + list_choose:GetChildAt(k-1):GetController("zhong") .selectedIndex = 0 + end + item_choose:GetController("zhong").selectedIndex = 1 + if tip_list[i].bi_list ==nil then + callback(tip_list[i].id) + self:CloseTip() + else + self.bilist={} + self._chiid = tip_list[i].id + self:CheckRatioCard(tip_list[i].bi_list,1,tip_list[i].card) + + end + end) + end + end + list_choose:ResizeToFit(#tip_list) + _pop_tip_choice:GetChild("di1").width = list_choose.width+110 + _pop_tip_choice.xy = Vector2((self._mainView.width - _pop_tip_choice.width)/2, -100) + self._mainView:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice + end + --比牌显示 + function M:CheckRatioCard(_tiplist,index,chicard,_biid) + if _biid ~=nil then + self.bilist={} + self.bilist[#self.bilist+1] = _biid + end + self._pop_tip_choice:GetController("bipai").selectedIndex = index + local Bilist_choose = self._pop_tip_choice:GetChild("Bi_Lst_choose"..index) + Bilist_choose:RemoveChildrenToPool() + for i = 1, #_tiplist do + local item = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Comp_choose") + local item_choose = Bilist_choose:AddChild(item) + self:SetIcon(item_choose, 2, _tiplist[i].opcard[1]) + self:SetIcon(item_choose, 3, _tiplist[i].opcard[2]) + self:SetIcon(item_choose, 1, chicard) + item_choose:GetController("zhong") .selectedIndex = 0 + item_choose.onClick:Add(function() + for k=1,Bilist_choose.numChildren do + Bilist_choose:GetChildAt(k-1):GetController("zhong") .selectedIndex = 0 + end + item_choose:GetController("zhong") .selectedIndex = 1 + if _tiplist[i].bi_list ==nil then + if tip_hu then + local guo_msg = MsgWindow.new(self._root_view, "确定取消胡吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + self.bilist[#self.bilist+1] = i-1 + self._gamectr:SendAction(self._chiid,self.bilist) + guo_msg:Close() + self:CloseTip() + self._cardInfo:UpdateIsOnClick(false) + end) + guo_msg:Show() + else + self.bilist[#self.bilist+1] = i-1 + self._gamectr:SendAction(self._chiid,self.bilist) + self:CloseTip() + self._cardInfo:UpdateIsOnClick(false) + end + else + self:CheckRatioCard(_tiplist[i].bi_list,2,chicard,i-1) + end + end) + end + Bilist_choose:ResizeToFit(#_tiplist) + self._pop_tip_choice:GetChild("di"..index+1).width = Bilist_choose.width+110 + + end + + +function M:SetIcon(item, index, card) + item:GetChild("card" .. index).icon = UIPackage.GetItemURL("Main_RunBeard", CommonFun:GetCardItem("201_", card)) +end + +function M:CloseTip() + if (self._pop_tip_choice) then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPFzCardView.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPFzCardView.lua new file mode 100644 index 00000000..13c794e0 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPFzCardView.lua @@ -0,0 +1,182 @@ +local M = {} + +local source_fz_03 = "ui://Main_RunBeard/Fz_0_3" +local source_fz_04 = "ui://Main_RunBeard/Fz_0_4" +local source_card = "ui://Main_RunBeard/202_" + +function M:getCardItem(card_1, card_2) + local room = DataManager.CurrenRoom + if room.change_card_display ~= nil then + return card_1 .. room.change_card_display .. card_2 + else + return card_1 .. "6_" .. card_2 + end +end + +function M.InitFzView(fz,isMy,isplay,index,count) + printlog("jefe InitFzView>>>") + local self = setmetatable({}, {__index = M}) + local item,fzcards + if fz.type ~= RB_FZType.Kan then + item = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Component1")--Extend_Poker_AHRunBeard + item:RemoveChildren(0, -1, true) + end + + -- local fzItem + if fz.type == RB_FZType.Bi or fz.type == RB_FZType.Chi then + fzcards = self:UpateChiBi(item,fz) + elseif fz.type == RB_FZType.Peng then + fzcards = self:UpdatePeng(item,fz) + elseif fz.type == RB_FZType.Wei or fz.type == RB_FZType.ChouWei then + fzcards = self:UpdateWei(item,fz,isMy) + elseif fz.type == RB_FZType.Ti then + fzcards = self:UpateTi(item,fz) + elseif fz.type == RB_FZType.Pao then + fzcards = self:UpatePao(item,fz) + end + + if item ~= nil and fzcards ~= nil then + self:PlayEffect(item,fzcards,isplay,index,count) + end + + return item,fzcards +end + +function M:UpateChiBi(item,fz) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_03) + local cardId1,cardId2,cardId3 + if #fz.opcard == 2 then + cardId1 = fz.card + cardId2 = fz.opcard[1] + cardId3 = fz.opcard[2] + else + cardId1 = fz.opcard[1] + cardId2 = fz.opcard[2] + cardId3 = fz.opcard[3] + end + fzcards:GetChild("card_" .. 1).icon = self:getCardItem(source_card, cardId1) + fzcards:GetController("c2").selectedIndex = 1 + fzcards:GetChild("card_" .. 2).icon = self:getCardItem(source_card, cardId2) + -- local card = fz.opcard[2] == nil and fz.opcard[1] or fz.opcard[2] + fzcards:GetChild("card_" .. 3).icon = self:getCardItem(source_card, cardId3) + fzcards.x, fzcards.y = 0, 0 + item:AddChildAt(fzcards, 0) + return fzcards +end + +function M:UpdatePeng(item,fz) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_03) + for j = 1, 3 do + fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1]) + end + fzcards.x, fzcards.y = 0, 0 + item:AddChildAt(fzcards, 0) + return fzcards +end + +function M:UpdateWei(item,fz,isMy) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_03) + --fzcards:GetController("c1").selectedIndex=1 + local room = DataManager.CurrenRoom + for j = 1, 3 do + if room.room_config.mingwei or fz.type==RB_FZType.ChouWei or isMy then + if j == 3 then + fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1]) + else + fzcards:GetChild("card_" .. j).icon = "ui://Main_RunBeard/202_1_300" + end + else + --未勾选明偎 + -- if isMy then + -- fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1]) + -- fzcards:GetController("c1").selectedIndex = 1 + -- else + fzcards:GetChild("card_" .. j).icon = "ui://Main_RunBeard/202_1_300" + -- end + end + + end + fzcards.x, fzcards.y = 0, 0 + item:AddChildAt(fzcards,0) + return fzcards +end + +function M:UpateTi(item, fz,icon) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_04) + for i = 1, 4 do + if i == 4 and fz.type == RB_FZType.Ti then + fzcards:GetChild("card_" .. i).icon = self:getCardItem(source_card, fz.card) + else + fzcards:GetChild("card_" .. i).icon = "ui://Main_RunBeard/202_1_300" + end + end + fzcards.x, fzcards.y = 0, 0 + -- item:AddChildAt(fzcards,0) + return fzcards +end + +function M:UpatePao(item, fz,icon) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_04) + for i = 1, 4 do + fzcards:GetChild("card_" .. i).icon = self:getCardItem(source_card, fz.opcard[1]) + end + fzcards.x, fzcards.y = 0, 0 + return fzcards +end + +function M:PlayEffect(fzitem,fzcards,isplay,index,count) + if (isplay == nil) then + isplay = false + end + if (isplay and index == count) then + local faArray = fzitem:GetChild("chiwei") + if (faArray ~= nil) then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end +end + +function M:PlayEffectOther(fzitem,fzcards, size,i,isplay,seat) + isplay = isplay == nil and false or isplay + local isAddlast = false + + local room = DataManager.CurrenRoom + if isplay and i== size then + local faArray = fzitem:GetChild("chiwei") + if room.room_config.people_num == 3 then + if (room.self_player.seat == 1) then + if (seat == 2) then + faArray = fzitem:GetChild("chiwei1") + else + faArray = fzitem:GetChild("chiwei") + end + elseif (room.self_player.seat == 2) then + if (seat == 3) then + faArray = fzitem:GetChild("chiwei1") + else + faArray = fzitem:GetChild("chiwei") + end + elseif (room.self_player.seat == 3) then + if (seat == 1) then + faArray = fzitem:GetChild("chiwei1") + else + faArray = fzitem:GetChild("chiwei") + end + end + end + + if (faArray ~= nil) then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPGameController.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPGameController.lua new file mode 100644 index 00000000..ab5e5a19 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPGameController.lua @@ -0,0 +1,10 @@ + +local M = {} + +setmetatable(M,{__index = GameController}) + +function M:init(name) + GameController.init(self,name) +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPGameEvent.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPGameEvent.lua new file mode 100644 index 00000000..1cacd2ec --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPGameEvent.lua @@ -0,0 +1,23 @@ +local ZPGameEvent = { + -- 发牌 + SendCards = 'SendCards', + --发最后一张牌 + AddCard = 'AddCard', + -- 胡牌 + ZPHuCard = 'ZPHuCard', + -- 结算事件 + ZPResult1 = 'ZPResult1', + -- 大结算事件 + ZPResult2 = 'ZPResult2', + -- 转盘指向事件 + EventTurn = 'EventTurn', + OutHint = 'OutHint', --出牌tips + GetCard = 'GetCard', --摸牌 + OutCard = 'OutCard', --出牌 + FangziAction = 'FangziAction', --吃碰等操作事件 + FZTips = 'FZTips', --放子提示 + QiCard = 'QiCard', --弃牌 + FangWei = 'FangWei' +} + +return ZPGameEvent diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPMainView.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPMainView.lua new file mode 100644 index 00000000..8f55bc57 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPMainView.lua @@ -0,0 +1,402 @@ +local PlayerSelfCardInfoView = import('.ZPPlayerSelfCardInfoView') +local PlayerCardInfoView = import('.ZPPlayerCardInfoView') +local ZPSettingView = import('.ZPSettingView') +local ZPTableBG = import('.ZPTableBG') +local HuTipView = import('.HuTipView') +local ZPGameEvent = import('.ZPGameEvent') +local M = { + default_btn = false +} + +setmetatable(M, {__index = MainView}) + +local default_bg = 1 + +function M:InitView(url, isdisplay, open_social, change_card_size, qihu) + UIPackage.AddPackage('base/main_zipai/ui/Main_RunBeard') + MainView.InitView(self, url) + self._full_offset = false + --显示背景 + ZPTableBG.LoadTableBG(default_bg, self._room.game_id, self._root_view) + self.qihu = qihu + if qihu ~= nil then + local id = ZPTableBG.GetTableBG(self._room.game_id) + if id > 3 or id <= 0 then + id = 1 + end + if self._room.score_times ~= nil and self._room.score_times > 0 then + self._view:GetChild('di_text').text = + self._room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起 ' .. self._room.score_times .. '倍' + else + self._view:GetChild('di_text').text = self._room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起' + end + self._view:GetController('bg_state').selectedIndex = id - 1 + end + self.cd_time = 0 + self.default_btn = open_social + if isdisplay == nil then + isdisplay = false + end + local tex_round = self._view:GetChild('tex_round') + self._tex_leftTime = self._view:GetChild('time') + local remaining_card = self._view:GetChild('remaining_card') + self._tex_LeftCard = self._view:GetChild('remaining_card') + self._rightPanelView._opt = 2 + self._rightPanelView:__UpdateTime() + local rightpanel = self._view:GetChild('right_panel') + if (rightpanel ~= nil) then + self.tex_gametype = rightpanel:GetChild('tex_gametype') + if (self.tex_gametype ~= nil) then + self.tex_gametype.text = self._room.room_config:GetGameName() + end + end + self._player_card_info = {} + local _room = self._room + self._hu_tip = HuTipView.new(self) + --加载上次游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id) + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + + local _gamectr = self._gamectr + _gamectr:SendChangeTypeFace(typeface) + if typeface == 1 then + if isdisplay then + self._room.change_card_display = '7_' + else + self._room.change_card_display = '2_' + end + elseif typeface == 2 then + self._room.change_card_display = '1_' + elseif typeface == 3 then + self._room.change_card_display = '3_' + elseif typeface == 4 then + self._room.change_card_display = '8_' + end + end + -- self._view.fairyBatching = true + --加载上次游戏的手牌大小 + + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. 'cardsize_new') + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_cardsize'] + local _gamectr = self._gamectr + if typeface == 0 then + self._room.change_card_size = 1.2 + elseif typeface == 1 then + self._room.change_card_size = 1 + elseif typeface == 2 then + self._room.change_card_size = 0.8 + end + else + self._room.change_card_size = change_card_size + end + + --加载上次游戏的接收语音 + if self.default_btn then + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. 'yuyin') + local json_data1 = Utils.LoadLocalFile(user_id .. _room.game_id .. 'chupai') + local json_data2 = Utils.LoadLocalFile(user_id .. _room.game_id .. 'fangyan') + self._room.yuyin_typeface = 1 + self._room.chupai_typeface = 1 + self._room.fangyan_typeface = 1 + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + self._room.yuyin_typeface = typeface + self:SetInteractEnabled(typeface == 1 and 0 or 1) + end + if json_data1 ~= nil then + local _data = json.decode(json_data1) + local typeface = _data['game_typeface'] + self._room.chupai_typeface = typeface + end + if json_data2 ~= nil then + local _data = json.decode(json_data2) + local typeface = _data['game_typeface'] + self._room.fangyan_typeface = typeface + end + end + + local _player_card_info = self._player_card_info + for i = 1, _room.room_config.people_num do + local tem = self._view:GetChild('player_card_info' .. i) + _player_card_info[i] = self:NewPlayerCardInfoView(tem, i) + end + + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = _player_card_info[self:GetPos(p.seat)] + info:SetPlayer(p) + info:FillData() + end + + self._rightPanelView.ctr_log.selectedIndex = 0 + local list = _room.player_list + local readyNum = 0 + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + if p.ready then + readyNum = readyNum + 1 + end + end + if (_room.curren_round > 0) then + self._rightPanelView.ctr_log.selectedIndex = 0 + end + + self._ctr_action = self._view:GetController('action') + if _room.banker_seat == _room.self_player.seat and readyNum > 1 and readyNum == _room.room_config.people_num then + elseif not _room.self_player.ready then + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig then + if round>1 then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 2 + end + + else + self._ctr_action.selectedIndex = 1 + end + + + else + self._ctr_action.selectedIndex = 0 + end + + self:ResetHandCard() + self:showBackBtnView() + self:InitXiPai() + self:InitXiPai1() +end + +function M:InitXiPai() + self._xipaiPanel = UIPackage.CreateObjectFromURL("ui://Common/panel_handzipai02") + self._root_view:AddChild(self._xipaiPanel) + + local offset = get_offset(self._full_offset) + + self._xipaiPanel.width = GRoot.inst.width - (offset * 2) + self._xipaiPanel.height = GRoot.inst.height + self._xipaiPanel.x = offset + + self._xipaiPanel.visible=false + --self:PlayXiPai() +end + +function M:PlayXiPai(xipaiCallBack) + if self._xipaiPanel then + coroutine.start(function() + self._xipaiPanel.visible=true + self._xipaiPanel:GetTransition("XiPai"):Play() + coroutine.wait(3.5) + self._xipaiPanel.visible=false + if xipaiCallBack then + xipaiCallBack() + end + end) + + + end +end + +function M:InitXiPai1() + self._xipaiPanel1 = UIPackage.CreateObjectFromURL("ui://Common/panel_handzipai03") + self._root_view:AddChild(self._xipaiPanel1) + + local offset = get_offset(self._full_offset) + + self._xipaiPanel1.width = GRoot.inst.width - (offset * 2) + self._xipaiPanel1.height = GRoot.inst.height + self._xipaiPanel1.x = offset + + self._xipaiPanel1.visible=false + --self:PlayXiPai() +end + +function M:PlayXiPai1(xipaiCallBack) + if self._xipaiPanel1 then + coroutine.start(function() + self._xipaiPanel1.visible=true + self._xipaiPanel1:GetTransition("XiPai"):Play() + coroutine.wait(3.5) + self._xipaiPanel1.visible=false + if xipaiCallBack then + xipaiCallBack() + end + end) + + + end +end + + +function M:NewSettingView(cardIndex) + local settingView = ZPSettingView.new(self._view, 2, self.default_btn,cardIndex) + settingView:FillBgSection( + function(url) + LoadGameBg(url, self._root_view) + end, + self._room.game_id, + default_bg, + self._room, + self.qihu + ) + return settingView +end + +function M:EventInit() + MainView.EventInit(self) +end + +function M:NewPlayerCardInfoView(view, index) + if index == 1 then + return PlayerSelfCardInfoView.new(view, self) + end + return PlayerCardInfoView.new(view, self) +end + +-- 设置 更新 手牌字体 三套 +function M:UpdateCardDisplay(index) + local _gamectr = self._gamectr + _gamectr:SendChangeTypeFace(index) + if index == 1 then + self._room.change_card_display = '2_' + elseif index == 2 then + self._room.change_card_display = '1_' + elseif index == 3 then + self._room.change_card_display = '3_' + elseif index == 4 then + self._room.change_card_display = '8_' + end + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + if p.DiceCard ~= nil and p.DiceCard ~= 0 then + info:UpdateOutCardList(p.DiceCard) + end + if p.outcard_list ~= nil and #p.outcard_list > 0 then + info:UpdateQiPai(p.outcard_list) + end + if p.fz_list ~= nil and #p.fz_list > 0 then + info:UpdateFzList(p.fz_list) + end + if p.seat == self._room.self_player.seat then + info:UpdateCardDisplay() + end + end +end + +-- 设置 更新 手牌大小 +function M:UpdateCardSize(index) + if index == 0 then + self._room.change_card_size = 1.2 + elseif index == 1 then + self._room.change_card_size = 1 + elseif index == 2 then + self._room.change_card_size = 0.8 + end + local info = self._player_card_info[1] + info:UpdateCardSize() +end + +-- 设置 更新 方言 +function M:UpdateFangyan(index) + self._room.fangyan_typeface = index +end +--刷新手牌排列 按钮 三种 排列方法 在 PendulumRule 里 +function M:ResetHandCard(...) + local btn_reset = self._view:GetChild('btn_reset') + --btn_reset.visible=false + btn_reset.onClick:Set( + function(...) + if self._popEvent == false then + return + end + --加载上次的 + local index = 1 + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. 'ResetHandCard') + if json_data ~= nil then + local _data = json.decode(json_data) + index = _data['index'] + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['ResetHandCard'] = true + if index == 1 then + _data['index'] = 2 + elseif index == 2 then + _data['index'] = 3 + elseif index == 3 then + _data['index'] = 1 + end + local key = user_id .. 'ResetHandCard' + Utils.SaveLocalFile(key, json.encode(_data)) + local x = _data['index'] + local card_info = self._player_card_info[1] + --printlog("1111111111111111111111111",x) + card_info:InitHandCard(false, x) + end + ) +end + +function M:showBackBtnView() + local btn_back_lobby = self._view:GetChild('btn_back_lobby') + local btn_jiesan_lobby1 = self._view:GetChild('Btn_jiesan_lobby') + --btn_jiesan_lobby1.displayObject.gameObject:SetActive(false) + --btn_jiesan_lobby1:GetChild("n8").displayObject.gameObject:SetActive(false) + if (btn_jiesan_lobby1 ~= nil) then + btn_jiesan_lobby1.onClick:Set( + function() + if (self.cd_time > 0) then + ViewUtil.ErrorTip(nil, '您还处于解散冷却时间当中,请稍后再试') + else + self.cd_time = 30 + self._gamectr:AskDismissRoom( + function(res) + ViewUtil.ErrorTip(res.ReturnCode, '') + end + ) + self:onDisBandTimer() + end + end + ) + end +end + +--解散计时器 +function M:onDisBandTimer() + if self.cd_coroutine ~= nil then + coroutine.stop(self.cd_coroutine) + end + self.cd_coroutine = + coroutine.start( + function() + while (self.cd_time > 0) do + self.cd_time = self.cd_time - 1 + self.cd_time = math.max(0, self.cd_time) + if self.cd_time > 0 then + coroutine.wait(1) + end + end + end + ) +end + +function M:Destroy() + UIPackage.RemovePackage('base/main_zipai/ui/Main_RunBeard') + MainView.Destroy(self) +end +return M diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPPlayBackView.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPPlayBackView.lua new file mode 100644 index 00000000..5633fd43 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPPlayBackView.lua @@ -0,0 +1,13 @@ +local ZPTableBG = import('.ZPTableBG') + +local M = {} + +setmetatable(M, {__index = PlayBackView}) + +function M:InitView(url) + PlayBackView.InitView(self, url) + local _view = self._view + ZPTableBG.LoadTableBG(1, self._room.game_id, self._root_view) +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPPlayer.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPPlayer.lua new file mode 100644 index 00000000..fe112fd2 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPPlayer.lua @@ -0,0 +1,37 @@ + + +local EXPlayer ={ + -- 手牌列表 + card_list = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil, + hu_xi =0 +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 + self.hu_xi =0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPPlayerCardInfoView.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPPlayerCardInfoView.lua new file mode 100644 index 00000000..dfab2634 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPPlayerCardInfoView.lua @@ -0,0 +1,476 @@ +local PendulumRule = import('.PendulumRule') +AreaOderType = { + left_right = "left_right", + right_left = "right_left", + up_down = "up_down", + down_up = "down_up" +} + +local PlayerCardInfoView = { + _view = nil, + _mainView = nil, + + _mask_liangpai = nil, + _area_outcard_list = nil, + _area_handcard_list = nil, + + +} +local function NewCardView(card,cardItem,index_X,index_Y) + local self = {} + setmetatable(self,{__index = CardView}) + self.btn_card = card + self.card_item = cardItem + self.index_X = index_X + self.index_Y = index_Y + return self +end + + +local M = PlayerCardInfoView + +function M.new(view,mainView) + local self = {} + setmetatable(self, {__index = M}) + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:init() + + local view = self._view + self._room = DataManager.CurrenRoom + self._area_outcard_list = view:GetChild("area_outcard_list") + self._area_handcard_list = view:GetChild("area_handcard_list") + self._area_fz_list = view:GetChild("area_fz_list") + self._area_qipai_list = view:GetChild("windcard_list") + self._mask_liangpai = view:GetChild("mask_liangpai") + UIPackage.AddPackage("base/main_zipai/ui/Main_RunBeard") +end + +function M:SetPlayer(p) + self._player = p +end + +function M:FillData(begin) + +end + +function M:Clear() + self._area_outcard_list:RemoveChildren(0, -1, true) + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_qipai_list:RemoveChildren(0, -1, true) + self._mask_liangpai:RemoveChildren(0, -1, true) +end + + +function M:fillCard(obj,card_type,card) + +end + + +function M:ClearOutCard() + self._area_outcard_list:RemoveChildren(0, -1, true) + +end + +--弃牌 +function M:UpdateQiPai( qi_list) + self._area_qipai_list:RemoveChildren(0,-1,true) + for i=1,#qi_list do + local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + qicards:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",qi_list[i]) + self._area_qipai_list:AddChild(qicards) + end + +end + + --放字 +function M:UpdateFzList( fz_list ) + printlog("jefe UpdateFzList=======") + pt(fz_list) + self._area_fz_list:RemoveChildren(0,-1,true) + for i = 1,#fz_list do + local fzitem = nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Component1") + fzitem:RemoveChildren(0,-1,true) + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetController("c2").selectedIndex =1 + fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].active_card) + fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[1]) + fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[2]) + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Peng then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Wei then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Pao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Ti then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + if j==4 then + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + else + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + end + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + end + end +end + +--回放手牌 +function M:InitHandCard(handcard) + self._area_handcard_list:RemoveChildren(0,-1,true) + local pokerList =PendulumRule.GetHandCard(handcard) --self:PendulumRule(handcard) + self.card_lists ={} + for i =1,#pokerList do + for j =1,#pokerList[i] do + local card_code = pokerList[i][j] + local btn_card =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",card_code) + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card,5-j) + local card_view = NewCardView(btn_card,card_code,i,j) + self.card_lists[#self.card_lists+1] = card_view + end + end + for j=#self.card_lists,1,-1 do + local card_view = self.card_lists[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view,#pokerList) + end + + if self._player.fz_list~=nil then + for i=1,#self._player.fz_list do + if self._player.fz_list[i].type == RB_FZType.Kan then + self:UpdateKan(self._player.fz_list[i].card) + end + end + end +end + + + +function M:UpdateHandCards( list ) + self.card_lists = {} + self._area_handcard_list:RemoveChildren(0,-1,true) + local CountCards = {} + for i=1,#list do + CountCards[list[i].index_X]=CountCards[list[i].index_X] == nil and 1 or CountCards[list[i].index_X] + 1 + end + for i=1,#list do + local card_code = list[i].card_item + local btn_card =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",card_code) + local card_view = NewCardView(btn_card,card_code,list[i].index_X,list[i].index_Y) + --存牌堆 + self.card_lists[#self.card_lists+1] =card_view + end + for j=#self.card_lists,1,-1 do + local card_view = self.card_lists[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view,#CountCards) + end + +end + +--牌位置 +function M:GetHandCardPos(cards_view,cards) + local x,y = 0,0 + local card_width = 42 -- 牌的宽度 + local middle_x = self._area_handcard_list.width / 2 + local start_x = middle_x - (cards / 2 * (card_width)) + x = start_x + (card_width) * (cards_view.index_X - 1) + y = 0 - (42*cards_view.index_Y) + return Vector2.New(x,y) +end + + + +function M:UpdateOutCardList(outcard) + + self._area_outcard_list:RemoveChildren(0,-1,true) + local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + if outcard==0 then + outcards:GetChild("icon").icon ="ui://Main_RunBeard/201_1_300" + else + outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/203_",outcard) + end + outcards.x,outcards.y = 0,0 + self._area_outcard_list:AddChild(outcards) +end + +--摸牌动画 +function M:PlayingOutCardAnima(card) + if(self._area_outcard_list ~=nil and self._area_outcard_list.numChildren>0)then + self._area_outcard_list:GetChildAt(0):GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/202_",card) + self._view:GetTransition("t0"):Play() + end + coroutine.start(function() + coroutine.wait(0.1) + self:ClearOutCard() + end) + -- +end + + +--摆牌规则 +function M:PendulumRule(handcard) + local room = DataManager.CurrenRoom + local card_list = handcard + local card_count = #card_list + local cards_map = {} + local CountCards = {} + for i=1,#card_list do + CountCards[card_list[i]]= CountCards[card_list[i]] == nil and 1 or CountCards[card_list[i]] + 1 + end + --find4 + for k,v in pairs(CountCards) do + if (v == 4) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + --find AAa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] >= 2 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-3 + end + end + end + --find aaA + for i = 101, 110 do + if CountCards[i]~=nil and (CountCards[i] >= 2) then + if CountCards[i + 100]~=nil and (CountCards[i + 100] == 1) then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i+100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i +100] = CountCards[i +100] - 1 + card_count = card_count-3 + end + end + end + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + --find 小 2 7 10 + local counta = CountCards[102] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[110]~=nil and CountCards[102] >0 and CountCards[107] >0 and CountCards[110] >0 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cs[3]= 110 + cards_map[#cards_map+1] = cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 3 + end + end + end + + --find 大 2 7 10 + local countA = CountCards[202] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[210]~=nil and CountCards[202] >0 and CountCards[207] >0 and CountCards[210] >0 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cs[3]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 3 + end + end + end + + --find abc + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and (CountCards[i] > 0 and CountCards[i + 1] > 0 and CountCards[i + 2] > 0) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + --find ABC + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and (CountCards[i] > 0 and CountCards[i + 1] > 0 and CountCards[i + 2] > 0) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + --find Aa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] == 1 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 1; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-2 + end + end + end + + local r_count = 9 - #cards_map + local merge = false + merge = r_count0 then + for i=1,#tempNotPutList do + self:UpdateKan(tempNotPutList[i]) + end + end +end + +--手牌 +function M:InitHandCard(isPlayAni, index) + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + self.outcard_button = nil + + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + self.cor_init_poker = nil + local _room = DataManager.CurrenRoom + --得到排序好的 list + local pokerList = PendulumRule.GetHandCard(_room.self_player.handcard_list, index) + if pokerList == nil or #pokerList == 0 then + return + end + self.cards_count = #pokerList + self.card_list = {} + self._area_handcard_list:RemoveChildren(0, -1, true) + --开始发牌动画 + if isPlayAni == true then + self.cor_init_poker = + coroutine.start( + function() + self._mainView._popEvent = false + if self._mainView._rightPanelView._settingView ~= nil then + self._mainView._rightPanelView._settingView:SetBtnUpdateCardEnable(false) + end + for i = 1, #pokerList do + local pokerListNum = 0 + for j = 1, #pokerList[i] do + local card_code = pokerList[i][j] + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 95 * self:getCardSize() + self.card_hight = 123 * self:getCardSize() + local x, y = 500, (j * 85) - 500 + btn_card:SetXY(x, y) + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card, 5 - j) + local card_view = NewCardView(btn_card, card_code, i, j) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + btn_card.data = card_view + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + end + for j = #self.card_list, 1, -1 do + coroutine.wait(0.005) + if pokerListNum == #pokerList[i] then + break + end + pokerListNum = pokerListNum + 1 + local card_view = self.card_list[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, self.cards_count), 0.08) + end + end + self:UpdateHandCardsPos() + self._mainView._popEvent = true + self:UpdateIsOnClick(true) + if self._mainView._rightPanelView._settingView ~= nil then + coroutine.start( + function() + coroutine.wait(1) + self._mainView._rightPanelView._settingView:SetBtnUpdateCardEnable(true) + end + ) + end + end + ) + else + --没有发牌动画 + for i = 1, #pokerList do + for j = 1, #pokerList[i] do + local card_code = pokerList[i][j] + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 95 * self:getCardSize() + self.card_hight = 123 * self:getCardSize() + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card, 5 - j) + local card_view = NewCardView(btn_card, card_code, i, j) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + btn_card.data = card_view + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + end + --存牌堆 + for j = 1, #self.card_list do + local card_view = self.card_list[j] + card_view.btn_card.xy = self:GetHandCardPos(card_view, self.cards_count) + end + end + if self._player.fz_list ~= nil then + for i = 1, #self._player.fz_list do + if self._player.fz_list[i].type == RB_FZType.Kan then + self:UpdateKan(self._player.fz_list[i].card) + end + end + end + self:UpdateHandCardsPos() + end + + self:SetNotPutCard() +end +--更新手牌 +function M:UpdateHandCards(list) + self.card_list = {} + self._area_handcard_list:RemoveChildren(0, -1, true) + + self.outcard_button = nil + + local CountCards = {} + for i = 1, #list do + CountCards[list[i].index_X] = CountCards[list[i].index_X] == nil and 1 or CountCards[list[i].index_X] + 1 + end + for i = 1, #list do + local card_code = list[i].card_item + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 87 * self:getCardSize() + self.card_hight = 110 * self:getCardSize() + local card_view = NewCardView(btn_card, card_code, list[i].index_X, list[i].index_Y) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + btn_card.data = card_view + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + end + for j = #self.card_list, 1, -1 do + local card_view = self.card_list[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view, #CountCards) + end + if self._player.fz_list ~= nil then + for i = 1, #self._player.fz_list do + if self._player.fz_list[i].type == RB_FZType.Kan then + self:UpdateKan(self._player.fz_list[i].card) + end + end + end + self:SetNotPutCard() +end + +-- -- +function M:onTouchBegin(context) + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + local button = context.sender + local card = button.data + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self:ShowHuTip(card.card_item) + end + card.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/203_', card.card_item) + -- card.btn_card.sortingOrder = 100 + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + card.btn_card.xy = Vector2.New(card.btn_card.x + 20, card.btn_card.y - 50) + card.touch_pos = xy - button.xy +end + +function M:onTouchMove(context) + local button = context.sender + local card = button.data + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + button.xy = xy - card.touch_pos +end + +--出牌提示动画 +function M:ChuPaiTiShi() + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self._view:GetController('chupai').selectedIndex = 1 + else + self._view:GetController('chupai').selectedIndex = 0 + end +end +-- 删手牌 +function M:DeleteHandCard(carditem) + local card = nil + if self.outcard_button ~= nil and carditem == self.outcard_button.card_item then + list_remove(self.card_list, self.outcard_button) + self._area_handcard_list:RemoveChild(self.outcard_button.btn_card, true) + + card = self.outcard_button + self.outcard_button = nil + else + for i = 1, #self.card_list do + local card_view = self.card_list[i] + if carditem == card_view.card_item then + card_view.btn_card.touchable = false + list_remove(self.card_list, card_view) + card = card_view + --card_view.btn_card:RemoveFromParent() + self._area_handcard_list:RemoveChild(card_view.btn_card, true) + break + end + end + end + if card ~= nil then + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + end + end + self:UpdateHandCardsPos() +end +--更新手牌的坎 +function M:UpdateKan(card) + for i = 1, #self.card_list do + local card_view = self.card_list[i] + if card_view.card_item == card then + --card_view.btn_card.touchable = false + card_view.btn_card:GetController('Kan').selectedIndex = 1 + end + end +end + +-- 手牌更新位置方法 self.card_list 里面的对象 NewCardView,index_X index_Y 就是xy序号 +function M:UpdateHandCardsPos() + --得到有 多少列 + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.old_postion = self:GetHandCardPos(card_view, #CountCards) + card_view.btn_card:TweenMove(card_view.old_postion, 0.3) + end + self:ShowHuTip() +end + +--刷新手牌字体 +function M:UpdateCardDisplay() + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + card_view.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_view.card_item) + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, #CountCards), 0.3) + end +end +--更新手牌大小 +function M:UpdateCardSize() + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + card_view.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_view.card_item) + card_view.btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + card_view.btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 87 * self:getCardSize() + self.card_hight = 110 * self:getCardSize() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, #CountCards), 0.3) + end +end + +function M:UpdateIsOnClick(isOut) + self._view.touchable = isOut +end + +-- 结束 拖拽事件 +-- 根据牌结束点的位置 判断是出牌还是调整位置 button.xy 和 牌的xy比较 +function M:__OnDragEnd(context) + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + if self.outcard_button then + self.outcard_button = nil + end + local button = context.sender + local card = button.data + -- card.btn_card.sortingOrder = 0 + local _room = DataManager.CurrenRoom + + if (button.y < -320 and _room ~= nil and _room.curren_outcard_seat == _room.self_player.seat) then + button.touchable = false + self.outcard_button = card + self:UpdateIsOnClick(false) + self._mainView:OutCard(card.card_item) + else + local isChangeCard = false + self.outcard_button = nil + card.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card.card_item) + self._area_handcard_list:AddChild(button) + if #self.card_list == 1 then + isChangeCard = false + self:UpdateHandCardsPos() + return + end + local CountCards = {} + for i = 1, #self.card_list do + local lists = {} + if CountCards[self.card_list[i].index_X] == nil then + lists[#lists + 1] = self.card_list[i] + CountCards[self.card_list[i].index_X] = lists + else + CountCards[self.card_list[i].index_X][#CountCards[self.card_list[i].index_X] + 1] = self.card_list[i] + end + end + local minmark = 1 + local maxmark = #self.card_list + if card == self.card_list[1] or card == self.card_list[#self.card_list] then + if self.card_list[1].index_X == self.card_list[2].index_X then + minmark = 2 + end + if self.card_list[#self.card_list].index_X == self.card_list[#self.card_list - 1].index_X then + maxmark = #self.card_list - 1 + end + end + --位置x小于第一张牌 放第一排 + if button.x + button.width / 2 < self.card_list[minmark].btn_card.x and #CountCards < 10 then + --位置大于最后一张牌 放最后一排 + list_remove(self.card_list, card) + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X < card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + else + for i = 1, #self.card_list do + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + card.index_X = 1 + card.index_Y = 1 + table.insert(self.card_list, 1, card) + isChangeCard = true + elseif button.x + button.width / 2 > (self.card_list[maxmark].btn_card.x + button.width) and #CountCards < 10 then + list_remove(self.card_list, card) + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + end + card.index_X = self.card_list[#self.card_list].index_X + 1 + card.index_Y = 1 + self.card_list[#self.card_list + 1] = card + isChangeCard = true + else + --放已有的牌堆上 判断放第几列 + local MoveCard = false + local MoveCardPos = 0 + local MoveCardY = 0 + for i = 1, #CountCards do + local card_view = CountCards[i][1] + if card_view ~= nil then + if + button.x + button.width / 2 > card_view.old_postion.x and + button.x + button.width / 2 < (card_view.old_postion.x + button.width) + then + if card ~= card_view and #CountCards[i] < 4 and card.index_X ~= card_view.index_X then + MoveCardPos = i + MoveCardY = #CountCards[i] + 1 + MoveCard = true + list_remove(self.card_list, card) + end + end + end + end + local MoveCardindex = 0 + -- local MoveCardY = 0 + if + button.x + button.width / 2 > card.old_postion.x and + button.x + button.width / 2 < (card.old_postion.x + button.width) + then + if #CountCards[card.index_X] > 1 then + for i = 1, #CountCards[card.index_X] do + local _cv = CountCards[card.index_X][i] + if _cv ~= card then + if + button.y + button.height / 2 > _cv.btn_card.y and + button.y + button.height / 2 < (_cv.btn_card.y + button.height) + then + --向下移動 + if ((button.y + button.height / 2) + 20) > (card.old_postion.y + button.height) then + --向上移動 + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + elseif ((button.y + button.height / 2) - 20) < card.old_postion.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + end + elseif i == #CountCards[card.index_X] and button.y + button.height / 2 < _cv.btn_card.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + elseif i == 1 and button.y + button.height / 2 > (_cv.btn_card.y + button.width) then + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + end + end + end + end + end + if MoveCard == true and MoveCardindex == 0 then + --上下移动 + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + if MoveCardPos > card.index_X then + MoveCardPos = MoveCardPos - 1 + end + end + card.index_X = MoveCardPos + card.index_Y = MoveCardY + for i = #self.card_list, 1, -1 do + if MoveCardPos == self.card_list[i].index_X then + table.insert(self.card_list, (i + 1), card) + break + end + end + isChangeCard = true + elseif MoveCard == true and MoveCardindex ~= 0 then + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X then + --向下移动 + if MoveCardindex == -1 then + --向上移动 + if self.card_list[i].index_Y < card.index_Y and self.card_list[i].index_Y >= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y + 1 + end + else + if self.card_list[i].index_Y > card.index_Y and self.card_list[i].index_Y <= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + end + end + end + card.index_X = MoveCardPos + card.index_Y = MoveCardY + for i = #self.card_list, 1, -1 do + if MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY - 1) then + table.insert(self.card_list, (i + 1), card) + break + elseif MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY + 1) then + table.insert(self.card_list, i, card) + break + end + end + isChangeCard = true + else + isChangeCard = false + self._area_handcard_list:AddChild(button) + end + end + self:UpdateHandCardsPos() + --每次改变手牌排列发给服务器 重连 回放需要用 --回放需要没次改变都要显示 + if isChangeCard == true then + self:SendChangeCard() + end + end +end + +--改变手牌排列发给服务器 +function M:SendChangeCard(...) + local list = {} + for i = 1, #self.card_list do + local data = {} + data.card = self.card_list[i].card_item + data.X = self.card_list[i].index_X + data.Y = self.card_list[i].index_Y + list[#list + 1] = data + end + self._mainView:ChangeCards(list) +end + +--计算手牌位置 +function M:GetHandCardPos(cards_view, cards) + local x, y = 0, 0 + local card_width = self.card_width -- 牌的宽度 + local middle_x = self._area_handcard_list.width / 2 + local start_x = middle_x - (cards / 2 * (card_width)) + x = start_x + (card_width) * (cards_view.index_X - 1) + + if self:getCardSize() == 1 then + y = 90 - (85 * cards_view.index_Y) + elseif self:getCardSize() == 1.2 then + y = 70 - (110 * cards_view.index_Y) + elseif self:getCardSize() == 0.8 then + y = 100 - (65 * cards_view.index_Y) + end + return Vector2.New(x, y) +end + +--更新 吃碰 +function M:UpdateFzList(fz_list) + printlog("jefe self UpdateFzList=======") + pt(fz_list) + self._area_fz_list:RemoveChildren(0, -1, true) + for i = 1, #fz_list do + local fzitem = nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Component1') + fzitem:RemoveChildren(0, -1, true) + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + fzcards:GetChild('card_' .. 1).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].active_card) + fzcards:GetController('c2').selectedIndex = 1 + fzcards:GetChild('card_' .. 2).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].opcard[1]) + fzcards:GetChild('card_' .. 3).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].opcard[2]) + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Peng then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + for j = 1, 3 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Wei then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + fzcards:GetController('c1').selectedIndex = 1 + for j = 1, 3 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + fzcards:GetController('c1').selectedIndex = 1 + for j = 1, 3 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Pao then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_4') + for j = 1, 4 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Ti then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_4') + for j = 1, 4 do + if j == 4 then + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + else + fzcards:GetChild('card_' .. j).icon = 'ui://Main_RunBeard/202_1_300' + end + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + end + end +end + +function M:ClearOutCard() + self._area_outcard_list:RemoveChildren(0, -1, true) +end +--出牌 +function M:UpdateOutCardList(outcard) + self._area_outcard_list:RemoveChildren(0, -1, true) + local outcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Gcm_OutCard') + if outcard == 0 then + outcards:GetChild('icon').icon = 'ui://Main_RunBeard/201_1_300' + else + outcards:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/203_', outcard) + end + outcards.x, outcards.y = 0, 0 + self._area_outcard_list:AddChild(outcards) +end + +--弃牌 +function M:UpdateQiPai(qi_list) + self._area_qipai_list:RemoveChildren(0, -1, true) + for i = 1, #qi_list do + local qicards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Qipai') + qicards:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/202_', qi_list[i]) + self._area_qipai_list:AddChild(qicards) + end +end + +--摸牌动画 +function M:PlayingOutCardAnima(card) + if (self._area_outcard_list ~= nil and self._area_outcard_list.numChildren > 0) then + self._area_outcard_list:GetChildAt(0):GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/202_', card) + self._view:GetTransition('t0'):Play() + end + coroutine.start( + function() + coroutine.wait(0.1) + self:ClearOutCard() + end + ) +end + +--得到设置的牌字体 +function M:getCardItem(card_1, card_2) + if self._room.change_card_display ~= nil then + --printlog("===========",self._room.change_card_display) + return card_1 .. self._room.change_card_display .. card_2 + else + return card_1 .. '2_' .. card_2 + end +end +--得到设置的牌大小 +function M:getCardSize() + if self._room.change_card_size ~= nil then + return self._room.change_card_size + else + return 1 + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPProtocol.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPProtocol.lua new file mode 100644 index 00000000..7c0b7ff3 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPProtocol.lua @@ -0,0 +1,36 @@ +local Protocol = { + -- 通知服务器出牌 + GAME_DIS_CARD = "611", + -- 通知服务器提示选择行为 + GAME_ACTION = "612", + -- 通知服务器手牌队形改变 + GAME_CHANGE_CARD = "613", + -- 通知服务器牌字体改变 + GAME_CHANGE_TYPEfACE = "615", + + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + -- 出牌事件 + GAME_EVT_DISCARD = "812", + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + -- action 事件 + GAME_EVT_ACTION = "815", + -- 胡牌事件 + GAME_EVT_HU = "816", + -- 结算 + GAME_EVT_RESULT1 = "817", + -- 弃牌 + GAME_EVT_QIPAI = "818", + -- 抓牌 + GAME_EVT_DRAW = "819", + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + --第二十一张牌 + GAME_EVT_ADD_CARD = "821", + +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPSettingView.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPSettingView.lua new file mode 100644 index 00000000..58080559 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPSettingView.lua @@ -0,0 +1,336 @@ +local SettingView = require('Game.View.SettingView') +local ZPTableBG = import('.ZPTableBG') + +local ZPSettingView = { + -- 修改牌字体 + onEXMainCallback = nil, + -- 修改手牌大小 + onUpdataCardSizeCallback = nil, + -- 语音 + onEXVoiceCallback = nil, + -- 快速出牌 + onEXChuPaiCallback = nil, + -- 方言 + onEXFangYanCallback = nil +} +local M = ZPSettingView + +function ZPSettingView.new(blur_view, index, open_social,cardIndex) + setmetatable(SettingView, {__index = BaseWindow}) + setmetatable(M, {__index = SettingView}) + local self = setmetatable({}, {__index = M}) + self.class = 'ZPSettingView' + self._currenIndex = 0 + self._blur_view = blur_view + self.onCallback = event('onCallback', true) + self.stateIndex = 0 + self.cd_time = 0 + self._btn_dismiss_room_enable = false + self._close_destroy = true + self.bigSize = 1.2 + self.mediumSize = 1 + self.smallSize = 0.8 + self._full = true + self._anim_pop = 2 + self._open_social = open_social + self._cardType=cardIndex + self:init('ui://Main_RunBeard/New_SettingWindow') + return self +end + +function M:init(url) + SettingView.init(self, url) + if DataManager.CurrenRoom == nil then + return + end + self._view = self._view:GetChild('showview') + + local view = self._view + local slider_sound = view:GetChild('slider_sound') + local slider_music = view:GetChild('slider_music') + -- local btn_music = view:GetChild('btn_music') + -- local btn_sound = view:GetChild('btn_sound') + + -- btn_music.selected = (GameApplication.Instance.MusicValue < 5 and false or true) + slider_sound.value = GameApplication.Instance.SoundValue + slider_music.value = GameApplication.Instance.MusicValue + -- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true + + slider_music.onChanged:Add( + function() + GameApplication.Instance.MusicValue = slider_music.value + -- btn_music.selected = GameApplication.Instance.MusicValue < 5 and false or true + end + ) + + slider_sound.onChanged:Add( + function() + GameApplication.Instance.SoundValue = slider_sound.value + -- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true + end + ) + + local room = DataManager.CurrenRoom + local c1 = self._view:GetController('cards') + if self._cardType then + c1.selectedIndex = self._cardType + end + + local size = self._view:GetController('size') + if room.change_card_size ~= nil then + + if room.change_card_size == self.bigSize then + size.selectedIndex = 0 + elseif room.change_card_size == self.mediumSize then + size.selectedIndex = 1 + elseif room.change_card_size == self.smallSize then + size.selectedIndex = 2 + end + else + room.change_card_size = 0 + size.selectedIndex = 0 + end + printlog("room.change_card_display===>>>",room.change_card_display) + if room.change_card_display ~= nil then + local _str = string.sub(room.change_card_display, 1, 1) + local n = tonumber(_str) + if n == 1 then + c1.selectedIndex = 1 + elseif n == 2 then + c1.selectedIndex = 0 + elseif n == 8 then + c1.selectedIndex = 3 + else + c1.selectedIndex = 2 + end + end + if self._open_social then + self._view:GetChild('n78').visible = true + self._view:GetChild('n88').visible = true + self._view:GetChild('n57').visible = true + + local yuyin = self._view:GetController('yuyin') + local chupai = self._view:GetController('chupai') + local fangyan = self._view:GetController('fangyan') + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. room.game_id .. 'yuyin') + local json_data1 = Utils.LoadLocalFile(user_id .. room.game_id .. 'chupai') + local json_data2 = Utils.LoadLocalFile(user_id .. room.game_id .. 'fangyan') + yuyin.selectedIndex = 1 + chupai.selectedIndex = 1 + room.yuyin_typeface = 1 + room.chupai_typeface = 1 + fangyan.selectedIndex = 1 + room.fangyan_typeface = 1 + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + room.yuyin_typeface = typeface + end + if json_data1 ~= nil then + local _data = json.decode(json_data1) + local typeface = _data['game_typeface'] + room.chupai_typeface = typeface + end + if json_data2 ~= nil then + local _data = json.decode(json_data2) + local typeface = _data['game_typeface'] + room.fangyan_typeface = typeface + end + if room.yuyin_typeface ~= nil then + yuyin.selectedIndex = room.yuyin_typeface + end + if room.chupai_typeface ~= nil then + chupai.selectedIndex = room.chupai_typeface + end + if room.fangyan_typeface ~= nil then + fangyan.selectedIndex = room.fangyan_typeface + end + else + self._view:GetChild('n78').visible = false + self._view:GetChild('n88').visible = false + self._view:GetChild('n57').visible = false + end + + c1.onChanged:Set( + function() + if self.onEXMainCallback then + self.onEXMainCallback(c1.selectedIndex + 1) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = c1.selectedIndex + 1 + local key = user_id .. room.game_id + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + + size.onChanged:Set( + function() + if self.onUpdataCardSizeCallback then + self.onUpdataCardSizeCallback(size.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_cardsize'] = size.selectedIndex + local key = user_id .. room.game_id .. 'cardsize_new' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + if self._open_social then + self._view:GetChild('n78').visible = false + local yuyin = self._view:GetController('yuyin') + local chupai = self._view:GetController('chupai') + local fangyan = self._view:GetController('fangyan') + yuyin.onChanged:Set( + function() + if self.onEXVoiceCallback then + room.yuyin_typeface = yuyin.selectedIndex + self.onEXVoiceCallback(yuyin.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = yuyin.selectedIndex + local key = user_id .. room.game_id .. 'yuyin' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + chupai.onChanged:Set( + function() + if self.onEXChuPaiCallback then + room.chupai_typeface = chupai.selectedIndex + self.onEXChuPaiCallback(chupai.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = chupai.selectedIndex + local key = user_id .. room.game_id .. 'chupai' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + fangyan.onChanged:Set( + function() + if self.onEXFangYanCallback then + room.fangyan_typeface = fangyan.selectedIndex + self.onEXFangYanCallback(fangyan.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = fangyan.selectedIndex + local key = user_id .. room.game_id .. 'fangyan' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + else + self._view:GetChild('n78').visible = false + end +end + +function M:Show() + SettingView.Show(self) + self:UpdateIndex() + self:UpdateCardSizeIndex() +end +--根据存的数据改变设置里面的控制器 + +function M:UpdateIndex() + local room = DataManager.CurrenRoom + local c1 = self._view:GetController('cards') + if room.change_card_display ~= nil then + local _str = string.sub(room.change_card_display, 1, 1) + local n = tonumber(_str) + if n == 7 then + n = 2 + end + if n == 1 then + c1.selectedIndex = 1 + elseif n == 2 then + c1.selectedIndex = 0 + elseif n == 8 then + c1.selectedIndex = 3 + else + c1.selectedIndex = 2 + end + end +end +function M:UpdateCardSizeIndex() + local room = DataManager.CurrenRoom + local size = self._view:GetController('size') + if room.change_card_size ~= nil then + if room.change_card_size == self.bigSize then + size.selectedIndex = 0 + elseif room.change_card_size == self.mediumSize then + size.selectedIndex = 1 + elseif room.change_card_size == self.smallSize then + size.selectedIndex = 2 + end + else + size.selectedIndex = 0 + end +end + +function M:SetBtnUpdateCardEnable(enable) + self._view:GetChild('n37').enabled = enable + self._view:GetChild('n38').enabled = enable + self._view:GetChild('n49').enabled = enable +end + +function M:FillBgSection(cb, game_id, default_bg, room, qihu) + if (default_bg == nil) then + default_bg = 1 + end + local view = self._view + local lst_bg = view:GetChild('lst_bg') + local ctr_bg = view:GetController('bg') + for i = 1, #bg_config_zipai do + local config = bg_config_zipai[i] + local item = lst_bg:AddItemFromPool() + item.icon = config.thumb + if i > 3 then + ctr_bg:AddPage(i - 1) + end + item.onClick:Add( + function() + cb(config.url) + ctr_bg.selectedIndex = i - 1 + if qihu ~= nil then + -- self._blur_view:GetChild('di_text').text = room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起' + self._blur_view:GetController('bg_state').selectedIndex = i - 1 + end + end + ) + end + self._game_id = game_id + self._bg = ZPTableBG.GetTableBG(game_id) + local index = 0 + if self._bg > 0 then + lst_bg.selectedIndex = self._bg - 1 + index = lst_bg.selectedIndex + else + ctr_bg.selectedIndex = default_bg - 1 + index = ctr_bg.selectedIndex + end + if qihu ~= nil then + -- self._blur_view:GetChild('di_text').text = room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起' + if index < 3 then + self._blur_view:GetController('bg_state').selectedIndex = index + else + self._blur_view:GetController('bg_state').selectedIndex = 0 + end + end +end +function M:Destroy() + local bg_id = self._view:GetController('bg').selectedIndex + 1 + if self._bg ~= bg_id then + self._bg = bg_id + ZPTableBG.SaveTableBG(self._game_id, self._bg) + end + SettingView.Destroy(self) +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPTableBG.lua b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPTableBG.lua new file mode 100644 index 00000000..e11083ee --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/changdepaohuzi/main/ZPTableBG.lua @@ -0,0 +1,84 @@ +-- 记录各游戏的桌面背景 +json = require 'cjson' + +local ZPTableBG = {} + +local M = ZPTableBG + bg_config_zipai = { + {id = 1, url = "base/main_zipai/bg/bg_1", thumb = "ui://Main_RunBeard/table_bg1"}, + {id = 2, url = "base/main_zipai/bg/bg_2", thumb = "ui://Main_RunBeard/table_bg2"}, + {id = 3, url = "base/main_zipai/bg/bg_3", thumb = "ui://Main_RunBeard/table_bg3"}, + -- {id = 4, url = "base/main_zipai/bg/bg_gold", thumb = "ui://Main_RunBeard/table_bg3"}, + -- {id = 5, url = "base/main_zipai/bg/bg8", thumb = "ui://Main_RunBeard/table_bg1"}, + -- {id = 6, url = "base/tablebg/bg/bg1", thumb = "ui://Common/b04"}, +} + +local function GetBG(data, game_id) + local bg_id = 0 + for i = 1, #data do + if data[i].game_id == game_id then + bg_id = data[i].bg_id + break + end + end + return bg_id +end +local function SetBG(data, game_id, bg_id) + local contain_key = false + for i = 1, #data do + if data[i].game_id == game_id then + contain_key = true + if data[i].bg_id ~= bg_id then + data[i].bg_id = bg_id + break + end + end + end + if not contain_key then + local _data = {} + _data.game_id = game_id + _data.bg_id = bg_id + table.insert(data, _data) + end +end + +function ZPTableBG.GetTableBG(game_id) + local id = -1 + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + local config_data = json.decode(json_data) + id = GetBG(config_data, game_id) + end + return id +end + +function ZPTableBG.LoadTableBG(id, game_id, main_view) + local bg_id = M.GetTableBG(game_id) + local index + if bg_id > 0 then + index = bg_id + else + index = id + end + + if index>3 then + -- body + index=1 + end + local url = bg_config_zipai[index].url + LoadGameBg(url, main_view) +end + +function ZPTableBG.SaveTableBG(game_id, bg_id) + local config_data + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + config_data = json.decode(json_data) + else + config_data = {} + end + SetBG(config_data, game_id, bg_id) + Utils.SaveLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code, json.encode(config_data)) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/fulushou/EXGameController.lua b/lua_probject/extend_project/extend/zipai/fulushou/EXGameController.lua new file mode 100644 index 00000000..cc6eb4ef --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/EXGameController.lua @@ -0,0 +1,538 @@ +local RB_Protocol = import(".Protocol") +local FZTipList = import(".main.FZData") +local RB_GameEvent = import(".RunBeard_GameEvent") +local M = {} + +--- Create a new HZ_GameController +function M.new() + setmetatable(M,{__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("福禄寿") + self.class = "RB_GameController" + return self +end + +function M:init(name) + GameController.init(self,name) + + self._eventmap[RB_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[RB_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[RB_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[RB_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[RB_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[RB_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + + self._eventmap[RB_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[RB_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[RB_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[RB_Protocol.GAME_EVT_QIPAI] = self.OnEventQIPAI + --self._eventmap[RB_Protocol.GAME_EVT_ADD_CARD] = self.OnAddCard + + self._eventmap[RB_Protocol.GAME_EVT_Piao_Tip] = self.OnPiaoTip + self._eventmap[RB_Protocol.GAME_EVT_Piao_Action] = self.OnPiaoAction + + self._eventmap[RB_Protocol.GAME_EVENT_XIPAI] = self.OnEventXiPai + self._eventmap[RB_Protocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim + + +end + + + + +function M:SendXiPaiAction(callBack) + local _data = {} + local _client = ControllerManager.GameNetClinet + _client:send(RB_Protocol.GAME_XIPAI, _data) + self.XiPaiCallBack=callBack +end + +function M:OnEventXiPai(evt_data) + if evt_data["result"]==0 then + if self.XiPaiCallBack then + self.XiPaiCallBack() + end + else + ViewUtil.ErrorTip(1000000,"申请洗牌失败") + end + +end + + + + + +function M:OnEventXiPaiAnim(evt_data) + printlog("洗牌动画===》》》》") + pt(evt_data) + local playeridList = evt_data["list"] + local my_isXiPai=false + local other_isXiPai=false + if playeridList and #playeridList>0 then + for i=1,#playeridList do + local p = self._room:GetPlayerById(playeridList[i]) + if p== self._room.self_player then + my_isXiPai=true + else + other_isXiPai=true + end + end + end + + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.EventXiPai,my_isXiPai,other_isXiPai) + end) +end + + + + +-- 发送出牌指令到服务器 +function M:SendOutCard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_DIS_CARD, _data) + end + +end +--GAME_CHANGE_CARD GAME_DIS_CARD +function M:SendChangeCards( card_list ) + local _data = {} + if card_list then + _data["card_list"] = card_list + else + _data["card_list"]={} + end + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_CHANGE_CARD, _data) + end +end + +function M:SendChangeTypeFace(TypeFace) + -- body + local _data = {} + _data["typeface"] = TypeFace + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_CHANGE_TYPEfACE, _data) + end +end + + +function M:ConformToNextGame( ) + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_EVT_CHUI) + end +end + +-- 发送放子选择到服务器 +function M:SendAction(id,num) + local _data = {} + _data["id"] = id + if num ~=nil then + _data["biid"] = num + end + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_ACTION, _data) + end +end + + +function M:SendPiao(piao,callBack) + local _data = {} + _data["id"] = piao + local _client = ControllerManager.GameNetClinet + _client:send(RB_Protocol.GAME_EVT_Send_Piao, _data) + self.PiaoTipsCallBack=callBack +end + + + + +function M:OnPiaoTip(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + printlog("飘分提示===>>>>") + pt(evt_data) + + local piao = evt_data["piao"] + local reload = evt_data["reload"] + local last_piao = evt_data["last_piao"] + local last_winer = evt_data["last_winer"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, RB_GameEvent.OnPiaoTips, piao,reload,last_piao,last_winer) + ControllerManager.IsSendCard=true + end + ) +end + +function M:OnPiaoAction(evt_data) + local seat = evt_data["seat"] + local piao = evt_data["piao"] + if seat==DataManager.CurrenRoom.self_player.seat then + if self.PiaoTipsCallBack then + self.PiaoTipsCallBack() + self.PiaoTipsCallBack=nil + end + end + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, RB_GameEvent.OnPiaoAction, seat,piao) + end + ) +end + + +function M:OnEventSendCards(evt_data) + printlog("发牌事件===》》》") + pt(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + _room.curren_round = _room.curren_round + 1 + if _room.curren_round > 0 then _room.playing = true end + + local handcards = {} + if evt_data.card_list and #evt_data.card_list>0 then + handcards = evt_data["card_list"] + else + ViewUtil.ErrorTip(100000,"发牌数据异常") + end + + local p = _room.self_player + local seat =nil + if evt_data.bank_seat then + seat = evt_data["bank_seat"] + else + ViewUtil.ErrorTip(100001,"发牌座位异常") + end + + _room.banker_seat = seat + for i=1,#_room.player_list do + _room.self_player.handcard_list ={} + _room.self_player.card_list = {} + _room.player_list[i].hand_left_count = 18 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + _room.player_list[i].outcard_list = {} + _room.player_list[i].hu_xi = 0 + end + self._cacheEvent:Enqueue(function() + _room.self_player.handcard_list=handcards + self._room.self_player.hand_left_count = #handcards + DispatchEvent(self._dispatcher,RB_GameEvent.SendCards, p) + print("发牌结束=====打开标志") + ControllerManager.IsSendCard=true + end) +end + +function M:OnEventOutCard(evt_data) + printlog("出牌===>>>") + pt(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + if(seat == _room.self_player.seat) then + list_remove(_room.self_player.handcard_list,card) + end + p.DiceCard = card + p.hand_left_count = p.hand_left_count -1 + + if(not p.outcard_list) then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + + DispatchEvent(self._dispatcher,RB_GameEvent.OutCard, p,card) + + end) +end + +function M:OnEventQIPAI(evt_data) + printlog("弃牌===>>>") + local seat = evt_data["seat"] + local card = evt_data["card"] + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + if(not p.outcard_list) then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + DispatchEvent(self._dispatcher,RB_GameEvent.QiCard, seat,card) + end) +end + +function M:OnEventTakeCard(evt_data) + printlog("抓牌====>>>>") + pt(evt_data) + + self._room.self_player.CardTingList={} + self._room.self_player.allTingPaiList={} + self._room.self_player.tingPaiList=evt_data.ting_list + + if evt_data.ting_list and #evt_data.ting_list>0 then + local tempTingList={} + local tempCardTingList={} + for i=1,#DataManager.CurrenRoom.self_player.tingPaiList do + local tempCard=DataManager.CurrenRoom.self_player.tingPaiList[i].card + local tempV=DataManager.CurrenRoom.self_player.tingPaiList[i].value + tempCardTingList[tempCard]=tempV + if tempV and #tempV>0 then + for j=1,#tempV do + if IsHasDictionary(tempV[j],tempTingList)==false then + table.insert(tempTingList,tempV[j]) + end + end + end + end + if #tempTingList>0 then + DispatchEvent(self._dispatcher,RB_GameEvent.TuoGuanTipsEvt,true) + self._room.self_player.allTingPaiList=tempTingList + self._room.self_player.CardTingList=tempCardTingList + --pt(tempCardTingList) + end + else + DispatchEvent(self._dispatcher,RB_GameEvent.TuoGuanTipsEvt,false) + end + + ---------- + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local handcard_list=evt_data["card_list"] + local outcard_list=evt_data["outcard_list"] + local p = _room:GetPlayerBySeat(seat) + p.hand_left_count = p.hand_left_count +1 + if seat == _room.self_player.seat then + self._cacheEvent:Enqueue(function() + if card ~=0 then + p.DiceCard = card + end + + if (seat == _room.self_player.seat) then + p.hand_left_count=#handcard_list + --_room.self_player.handcard_list[#_room.self_player.handcard_list+1] = card + _room.self_player.handcard_list=handcard_list + end + + p.outcard_list=outcard_list + + DispatchEvent(self._dispatcher,RB_GameEvent.GetCard, seat, card,left_count) + end) + else + DispatchEvent(self._dispatcher,RB_GameEvent.ShowremainCard, seat,left_count) + end + + +end + +function M:OnAddCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local p = _room:GetPlayerBySeat(seat) + + self._cacheEvent:Enqueue(function() + p.DiceCard = 0 + p.hand_left_count = p.hand_left_count +1 + if (seat == _room.self_player.seat) then + _room.self_player.handcard_list[#_room.self_player.handcard_list+1] = card + end + DispatchEvent(self._dispatcher,RB_GameEvent.AddCard, seat, card) + end) +end + +function M:OnEventOutHint(evt_data) + printlog("出牌提示事件===》》》") + pt(evt_data) + self._cacheEvent:Enqueue(function() + + DispatchEvent(self._dispatcher,RB_GameEvent.OutHint) + end) + +end + +function M:OnEventTurn(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + printlog("放子提示事件===》》》") + pt(evt_data) + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + --local uid = evt_data["uid"] + for i=1,#list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + --tip.bi_list = dtip["bi_list"] + if (dtip["opcard"]) then + local opcard = dtip["opcard"] + tip.OpCard = opcard + table.sort(tip.OpCard) + tip.OpCard[3] = tip.Card + end + tiplist:AddTip(tip) + + end + DispatchEvent(self._dispatcher,RB_GameEvent.FZTips, tiplist) + end) +end + +function M:OnEventFzAction(evt_data) + printlog("放子行为事件===》》》") + pt(evt_data) + + + self._room.self_player.CardTingList={} + self._room.self_player.allTingPaiList={} + self._room.self_player.tingPaiList=evt_data.ting_list + + if evt_data.ting_list and #evt_data.ting_list>0 then + local tempTingList={} + local tempCardTingList={} + for i=1,#DataManager.CurrenRoom.self_player.tingPaiList do + local tempCard=DataManager.CurrenRoom.self_player.tingPaiList[i].card + local tempV=DataManager.CurrenRoom.self_player.tingPaiList[i].value + tempCardTingList[tempCard]=tempV + if tempV and #tempV>0 then + for j=1,#tempV do + if IsHasDictionary(tempV[j],tempTingList)==false then + table.insert(tempTingList,tempV[j]) + end + end + end + end + if #tempTingList>0 then + DispatchEvent(self._dispatcher,RB_GameEvent.TuoGuanTipsEvt,true) + self._room.self_player.allTingPaiList=tempTingList + self._room.self_player.CardTingList=tempCardTingList + --pt(tempCardTingList) + end + else + DispatchEvent(self._dispatcher,RB_GameEvent.TuoGuanTipsEvt,false) + end + + + --------- + + local _room = self._room + _room.self_player.currentNotPutCardList=evt_data["notput"] + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local ftype = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + local outcard_list=evt_data["outcard_list"] + local huxi = evt_data["hu_xi"] + local actice_card = membe_clone(opcard) + table.insert(actice_card,card) + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local isNeedDelHandCard =0 + p.hu_xi = huxi + local fz = {} + fz.card = card + fz.type = ftype + fz.active_card = actice_card + fz.from_seat = from_seat + fz.opcard =opcard + local remove_num = #opcard + if ftype == RB_FZTypeFLS.Chi then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZTypeFLS.Peng then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + + elseif ftype == RB_FZTypeFLS.Gang or ftype == RB_FZTypeFLS.SGang or ftype == RB_FZTypeFLS.Zhao or ftype == RB_FZTypeFLS.SZhao then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + + end + + p.tempOutcartList=outcard_list + p.hand_left_count = p.hand_left_count - remove_num + DispatchEvent(self._dispatcher,RB_GameEvent.FangziAction, fz, p) + + end) +end + +function M:OnEventHu(evt_data) + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + -- print(win_p.hand_left_count) + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + table.sort( win_p.card_list, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher,RB_GameEvent.ZPHuCard, evt_data["seat"],evt_data["from_seat"],cards) + end) +end + +function M:OneventResult1(evt_data) + printlog("结算=============>>>") + pt(evt_data) + local over = evt_data.type + --0:小结算 1:小大结算 2:大结算 + self._room.playing = false + if 0 == over then + local result = evt_data.result + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil,true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/fulushou/EXGameInfo.lua b/lua_probject/extend_project/extend/zipai/fulushou/EXGameInfo.lua new file mode 100644 index 00000000..8a7e3e96 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/EXGameInfo.lua @@ -0,0 +1,243 @@ +local EXGameInfo = {} + +local M = EXGameInfo + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = 'EXGameInfo' + UIPackage.AddPackage('extend/zipai/fulushou/ui/Info_Poker_FuLuShou') + return self +end + +function M:FillData() + printlog("jefe fulushou") + self._maxPlayer = 3 -- 默认玩家人数 + self._roundChoice = 2 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL('ui://Info_Poker_FuLuShou/Cgm_create_room') + if oldGameVersion ==1 then + self._config:GetController("xipai").selectedIndex=0 + end + + if oldGameVersion==2 then + self._config:GetController("xipai").selectedIndex=1 + + self.xipaiValueText=self._config:GetChild('xipaifen') + self.xipaiValueText.text=1 + self.xipaiValue=1 + + self.anchouValueText=self._config:GetChild('anchoufen') + self.anchouValueText.text=1 + self.anchouValue=1 + + local btn_cr = self._config:GetChild('sdsrbtn') + btn_cr.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.xipaiValueText.text=value/1000 + self.xipaiValue=value/1000 + + end, 3, nil) + gniv:Show() + + + end + ) + + + local btn_cr2 = self._config:GetChild('anchoubtn') + btn_cr2.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.anchouValueText.text=value/1000 + self.anchouValue=value/1000 + + end, 3, nil) + gniv:Show() + + + end + ) + + end + +end +local _help_url = 'ui://Info_Poker_FuLuShou/Com_help' +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_Poker_FuLuShou/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_Poker_FuLuShou/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +--local _play_list = {"三人玩法","二人玩法"} +function M:GetPlayList() + --return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController('round').selectedIndex == 0 and 1 or 2 + local renshu = _config:GetController('play_list').selectedIndex +2 + + local xuan_zhuang=_config:GetController('zhuangjia').selectedIndex + local piao=_config:GetController('piao').selectedIndex + local piao1=false + local piao2=false + local piao3=false + local piao4=false + if piao==3 then + piao1=_config:GetChild('pf1').selected and true or false + piao2=_config:GetChild('pf2').selected and true or false + piao3=_config:GetChild('pf3').selected and true or false + piao4=_config:GetChild('pf4').selected and true or false + end + local fen_diejia=_config:GetController('fen').selectedIndex + + local qing_zui_hu=_config:GetController('qinzuihu').selectedIndex + local gang_zhao_liu_xi=_config:GetChild('gangzhao').selected and true or false + local special_peng_peng_hu=_config:GetChild('pengpenghu').selected and true or false + + local piao_fen = _config:GetController('piaofen').selectedIndex + + + local _data = {} + _data['opt'] = round -- 1 2 8局 16 局 + _data['maxPlayers'] = renshu + _data['xuan_zhuang'] = xuan_zhuang + _data['piao'] = piao + _data['piao1'] = piao1 + _data['piao2'] = piao2 + _data['piao3'] = piao3 + _data['piao4'] = piao4 + _data['fen_diejia'] = fen_diejia + _data['qing_zui_hu'] = qing_zui_hu + _data['gang_zhao_liu_xi'] = gang_zhao_liu_xi + _data['special_peng_peng_hu'] = special_peng_peng_hu + if (piao_fen == 0) then + _data["piao_fen"] = 1 + elseif (piao_fen == 1) then + _data["piao_fen"] = 2 + elseif (piao_fen == 2) then + _data["piao_fen"] = 3 + elseif (piao_fen == 3) then + _data["piao_fen"] = 5 + end + + + local xi_pai=false + if oldGameVersion ==2 then + if _config:GetChild("xipai") then + xi_pai = _config:GetChild("xipai").selected + end + end + _data['xi_pai'] = xi_pai + + local xi_pai_score=0 + local an_chou_score=0 + + if oldGameVersion==2 then + xi_pai_score=self.xipaiValue + an_chou_score=self.anchouValue + end + + _data['xi_pai_score'] = xi_pai_score*1000 + _data['an_chou_score'] = an_chou_score*1000 + + + return _data +end + +function M:LoadConfigData(data) + local _config = self._config + + _config:GetController('play_list').selectedIndex = data.maxPlayers -2 + _config:GetController('round').selectedIndex = data.opt == 1 and 0 or 1 + _config:GetController('zhuangjia').selectedIndex= data.xuan_zhuang + _config:GetController('piao').selectedIndex= data.piao + _config:GetChild('pf1').selected=data.piao1 + _config:GetChild('pf2').selected=data.piao2 + _config:GetChild('pf3').selected=data.piao3 + _config:GetChild('pf4').selected=data.piao4 + + if (data.piao_fen == 1) then + _config:GetController('piaofen').selectedIndex = 0 + elseif (data.piao_fen == 2) then + _config:GetController('piaofen').selectedIndex = 1 + elseif (data.piao_fen == 3) then + _config:GetController('piaofen').selectedIndex = 2 + elseif (data.piao_fen == 5) then + _config:GetController('piaofen').selectedIndex = 3 + end + + + + _config:GetController('fen').selectedIndex= data.fen_diejia + + _config:GetController('qinzuihu').selectedIndex= data.qing_zui_hu + _config:GetChild('gangzhao').selected = data.gang_zhao_liu_xi + _config:GetChild('pengpenghu').selected= data.special_peng_peng_hu + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected=data.xi_pai + end + + if oldGameVersion==2 then + self.xipaiValueText.text=data.xi_pai_score/1000 + self.xipaiValue=data.xi_pai_score/1000 + + self.anchouValueText.text=data.an_chou_score/1000 + self.anchouValue=data.an_chou_score/1000 + end + +end + +function M:OnChangeOption(ctype) + IGameInfo.OnChangeOption(self, ctype) + + local play_list = self._config:GetController('play_list') + play_list.onChanged:Add( + function() + self._maxPlayer = play_list.selectedIndex +2 + self:ShowVariablePrice(ctype) + end + ) +end +return M diff --git a/lua_probject/extend_project/extend/zipai/fulushou/EXMainView.lua b/lua_probject/extend_project/extend/zipai/fulushou/EXMainView.lua new file mode 100644 index 00000000..dcb92b9c --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/EXMainView.lua @@ -0,0 +1,1233 @@ +local SettingView = import('.main.ZPSettingView') +local PlayerSelfCardInfoView = import('.PlayerSelfCardInfoView') +local PlayerCardInfoView = import('.PlayerCardInfoView') +local ZPMainView = import('.main.ZPMainView') +local GameEvent = import('.RunBeard_GameEvent') +local RunBeard_ResultView = import('.RunBeard_ResultView') +local PlayerInfoView = import(".EXPlayerInfoView") + +local M = {} +local Fix_Msg_Chat = { + '在搞么的,出牌撒', + '又掉线哒!', + '和你打牌太有味了', + '人呢?还搞不搞滴', + '哈哈,对不住了', + '稍等哈哈,马上就来', + '不要走,决战到天亮', + '牌打得不错嘛!', + '今朝这个方位硬是不好', + '不好意思临时有事,申请解散!' +} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M, {__index = ZPMainView}) + local self = setmetatable({}, {__index = M}) + self.class = 'RunBeard_MainView' + self._full = true + self:init() + return self +end + +function M:getCardItem(card_1, card_2) + if self._room.change_card_display ~= nil then + return card_1 .. self._room.change_card_display .. card_2 + else + return card_1 .. '1_' .. card_2 + end +end +function M:InitView(url) + local _room = self._room + self.Fix_Msg_Chat = Fix_Msg_Chat + ViewUtil.PlayMuisc('FuLuShou_ZP', 'extend/zipai/fulushou/sound/bgMain.mp3') + UIPackage.AddPackage('extend/zipai/fulushou/ui/Extend_Poker_FuLuShou') + ZPMainView.InitView(self, 'ui://Main_RunBeardMaJiang/Main_' .. _room.room_config.people_num, false, false, 1.2, 8) + + + self:PlayerChangeLineState() + SettingView.onEXMainCallback = handler(self, self.UpdateCardDisplay) + SettingView.onUpdataCardSizeCallback = handler(self, self.UpdateCardSize) + + + + for i = 1, #_room.player_list do + local p = _room.player_list[i] + local head = self._player_info[self:GetPos(p.seat)] + head:UpdateScore() + end + + if _room.playing or _room.curren_round > 0 then + self:ReloadRoom() + end + self._view:GetController('jushu').selectedIndex = 1 + self._view:GetChild("di_text").text = _room.room_config.people_num .. '人福禄寿 11息起胡 ' .. _room.score_times .. '倍' + self:setBtn() +end + +function M:setBtn() + local rightpanel = self._view:GetChild('right_panel') + local btn_rule = rightpanel:GetChild('btn_log') + local gcm_chat = self._view:GetChild('gcm_chat') + local _btn_chat = gcm_chat:GetChild('n1') + _btn_chat:GetChild('icon').icon = 'ui://Main_RunBeardMaJiang/chat_img' + local btn_record = gcm_chat:GetChild('btn_record') + btn_record:GetChild('icon').icon = 'ui://Main_RunBeardMaJiang/yuyin_img' + + if btn_rule ~= nil then + btn_rule.onClick:Set( + function() + if self.RuleView == nil or self.RuleView._is_destroy then + self.RuleView = RoomInfoView.new(self._room) + end + self.RuleView:Show() + end + ) + end + local btn_setting = self._view:GetChild('btn_setting') + btn_setting.onClick:Set( + function() + local _settingView = self:NewSettingView() + _settingView.stateIndex = (self._room.curren_round >= 1 and self._allow_dissmiss) and 2 or 1 + _settingView.cd_time = self.dismiss_room_cd_time + _settingView:Show() + + local room = DataManager.CurrenRoom + _settingView.onCallback:Add( + function(context) + local _gamectr = ControllerManager.GetController(GameController) + if (room.CurnrenState == StateType.Ready) then + _gamectr:LevelRoom( + function(response) + if (response.ReturnCode == 0) then + ViewManager.ChangeView(ViewManager.View_Lobby) + GameApplication.Instance:ShowTips('房间已解散!') + end + end + ) + else + _gamectr:AskDismissRoom( + function(res) + ViewUtil.ErrorTip(res.ReturnCode, '') + end + ) + end + end + ) + end + ) + local tex_roomid = rightpanel:GetChild('tex_roomid') + tex_roomid.text = self._room.room_id + if self._room.room_config.isHidden and self._room.room_config.isHidden == 1 then + tex_roomid.text = "000000" + end +end + +function M:InitPlayerInfoView() + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem,self) + tem.visible = false + end +end + + +function M:NewPlayerCardInfoView(view, index) + if index == 1 then + return PlayerSelfCardInfoView.new(view, self) + end + return PlayerCardInfoView.new(view, self) +end +function M:closeTipOnTuoguan() + if self._clearingView ~= nil then + self._clearingView:Close() + end + self:__CloseTip() +end +function M:EventInit() + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _player_info = self._player_info + local _gamectr = self._gamectr + + + + _gamectr:AddEventListener(GameEvent.TuoGuanTipsEvt,function( ... ) + local arg = {...} + local isOpen=arg[1] + local self_Player=_player_info[self:GetPos( _room.self_player.seat)] + --local entrust_time=DataManager.CurrenRoom.entrust_time + --printlog("11111111111111",entrust_time) + if self_Player then + local btn_TG=self_Player._view:GetChild("Btn_tuoguan") + if btn_TG then + local tempTG=self_Player._view:GetController("tuoguan") + if tempTG then + if isOpen then + tempTG.selectedIndex=1 + else + tempTG.selectedIndex=0 + end + + end + + btn_TG.onClick:Set( + function() + local tuoguan_msg = MsgWindow.new(self._root_view, '确定托管吗?', MsgWindow.MsgMode.OkAndCancel) + tuoguan_msg.onOk:Add( + function() + self._gamectr:OnEvtOpenGameHuTuoGtips(true) + tuoguan_msg:Close() + tempTG.selectedIndex=0 + end + ) + + tuoguan_msg:Show() + + end) + + + + + end + + end + + + end) + + + + + _gamectr:AddEventListener(GameEvent.EventXiPai,function( ... ) + local arg = {...} + local currentPlayer1=arg[1] + local currentPlayer2=arg[2] + + if self._player_card_info[1].HidePiao then + self._player_card_info[1]:HidePiao() + end + + self._popEvent = false + if ( currentPlayer1 ) then + + local xipaiCB=function () + self._popEvent = true + end + self:PlayXiPai(xipaiCB) + + end + + + if ( currentPlayer2 ) then + --self._popEvent = false + local xipaiCB2=function () + self._popEvent = true + end + self:PlayXiPai1(xipaiCB2) + end + + + end) + + + + _gamectr:AddEventListener(GameEvent.OnPiaoTips, function(...) + local arg = {...} + local piao = arg[1] + local reload = arg[2] + local last_piao = arg[3] + local last_winer = arg[4] + + if piao >0 and piao <3 then piao=1 end + + + if reload==0 then + --self._popEvent = false + self._leftcard = 1 + self._leftcard = 1 + local rightpanel = self._view:GetChild('right_panel') + local tex_round = rightpanel:GetChild('tex_round') + if tex_round ~= nil then + tex_round.text = '第 ' .. _room.curren_round .. ' 局' + end + self._view:GetChild('tex_round').text = '第 ' .. _room.curren_round .. '/' .. _room.room_config.round .. ' 局' + + self._state.selectedIndex = 1 + self:closeTipOnTuoguan() + local list = _room.player_list + for i = 1, #list do + local p = list[i] + p.hu_xi = 0 + local _info = self._player_card_info[self:GetPos(p.seat)] + _info:SetPlayer(p) + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + info:UpdatePiao(-1) + info._view:GetController('huxi').selectedIndex = 1 + info._view:GetChild('huxi').text ="" --p.hu_xi + info._view:GetController('zhanji').selectedIndex = 0 + + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + if p.total_hp == nil then + p.total_hp = 0 + end + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + + end + --local card_info = self._player_card_info[1] + --card_info:UpdateIsOnClick(false) + --card_info:InitHandCard(true) + printlog("飘分提示==>>>") + if last_winer==1 then + self._player_card_info[1]:ShowSpecialPiao(piao,last_piao) + else + self._player_card_info[1]:ShowPiao(piao) + end + + end) + + + _gamectr:AddEventListener(GameEvent.OnPiaoAction, function(...) + local arg = {...} + local seat = arg[1] + local piao = arg[2] + local head_info = self._player_info[self:GetPos(seat)] + head_info:UpdatePiao(piao) + end) + + _gamectr:AddEventListener( + GameEvent.SendCards, + function(...) + self._popEvent = false + self._leftcard = 1 + self._leftcard = 1 + local rightpanel = self._view:GetChild('right_panel') + local tex_round = rightpanel:GetChild('tex_round') + if tex_round ~= nil then + tex_round.text = '第 ' .. _room.curren_round .. ' 局' + end + self._view:GetChild('tex_round').text = '第 ' .. _room.curren_round .. '/' .. _room.room_config.round .. ' 局' + + self._state.selectedIndex = 1 + self:closeTipOnTuoguan() + local list = _room.player_list + for i = 1, #list do + local p = list[i] + p.hu_xi = 0 + local _info = self._player_card_info[self:GetPos(p.seat)] + _info:SetPlayer(p) + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + info._view:GetController('huxi').selectedIndex = 1 + info._view:GetChild('huxi').text = p.hu_xi + info._view:GetController('zhanji').selectedIndex = 0 + + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + if p.total_hp == nil then + p.total_hp = 0 + end + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + local card_info = self._player_card_info[1] + card_info:UpdateIsOnClick(false) + card_info:InitHandCard(true) + end + ) + + _gamectr:AddEventListener( + GameEvent.GetCard, + function(...) + self._popEvent = false + local arg = {...} + local seat = arg[1] + local card = arg[2] + local _leftcard = arg[3] + self._left_time = 15 + self._tex_LeftCard.text = '剩余 ' .. _leftcard .. ' 张牌' + local info = self._player_card_info[self:GetPos(seat)] + + info:UpdateOutCardList(card, true, true, self:GetPos(seat)) + if card ~= 0 then + local p = _room:GetPlayerBySeat(seat) + --self:PlaySound(p.self_user.sex, 'F_' .. card) + self._popEvent = false + coroutine.start( + function() + coroutine.wait(0.2) + if seat == self._room.self_player.seat then + info:InitHandCard(false) + info:ChuPaiTiShi() + end + self._popEvent = true + info:ClearOutCard() + end + ) + end + end + ) + + _gamectr:AddEventListener( + GameEvent.ShowremainCard, + function(...) + local arg = {...} + local seat = arg[1] + local _leftcard = arg[2] + self._tex_LeftCard.text = '剩余 ' .. _leftcard .. ' 张牌' + end + ) + + _gamectr:AddEventListener( + GameEvent.AddCard, + function(...) + local arg = {...} + local seat = arg[1] + local card = arg[2] + self._popEvent = false + local info = self._player_card_info[self:GetPos(seat)] + coroutine.start( + function() + coroutine.wait(0.5) + if seat == self._room.self_player.seat then + info:InitHandCard(false) + end + info:ClearOutCard() + self._popEvent = true + end + ) + end + ) + + _gamectr:AddEventListener( + GameEvent.EventTurn, + function(...) + local arg = {...} + local seat = arg[1] + local list = _room.player_list + local readyNum = 0 + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 0 + end + local info = self._player_info[self:GetPos(seat)] + info._view:GetController('time').selectedIndex = 1 + end + ) + _gamectr:AddEventListener( + GameEvent.OutHint, + function(...) + _room.curren_outcard_seat = _room.self_player.seat + coroutine.start( + function() + coroutine.wait(0.5) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:ChuPaiTiShi() + end + ) + end + ) + + _gamectr:AddEventListener( + GameEvent.OutCard, + function(...) + self._popEvent = false + self:__CloseTip() + self._left_time = 0 + local arg = {...} + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:PlaySound(p.self_user.sex, 'F_' .. card) + if seat == self._room.self_player.seat then + _room.curren_outcard_seat = -1 + --info:DeleteHandCard(card) + info:InitHandCard(false) + info:UpdateIsOnClick(true) + --info:SendChangeCard() + info:ChuPaiTiShi() + + end + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 0 + end + info:UpdateOutCardList(card, true, false, self:GetPos(seat)) + if self._leftcard == 1 then + self._leftcard = 0 + for i = 1, #_room.player_list do + local p = _room.player_list[i] + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateFzList(p.fz_list, false, p.seat) + end + end + + ------ + --if(not p.outcard_list) then p.outcard_list = {} end + --p.outcard_list[#p.outcard_list+1] = card + + coroutine.start( + function() + coroutine.wait(0.5) + local info = self._player_card_info[self:GetPos(seat)] + info:PlayingOutCardAnima(p.DiceCard) + p.DiceCard = 0 + info:UpdateQiPai(p.outcard_list, true, seat) + + self._popEvent = true + end + ) + + + end + ) + + _gamectr:AddEventListener( + GameEvent.QiCard, + function(...) + self:__CloseTip() + self._popEvent = false + self._left_time = 0 + local arg = {...} + local seat = arg[1] + local card = arg[2] + local p = _room:GetPlayerBySeat(seat) + --p.DiceCard=card + local info = self._player_card_info[self:GetPos(seat)] + info:PlayingOutCardAnima(p.DiceCard) + p.DiceCard = 0 + info:UpdateQiPai(p.outcard_list, true, seat) + self._popEvent = true + end + ) + _gamectr:AddEventListener( + GameEvent.FZTips, + function(...) + local arg = {...} + local _tip = arg[1] + --local _uid = arg[2] + self:__FangziTip(_tip) + end + ) + + _gamectr:AddEventListener(GameEvent.FangziAction, handler(self, self.OnFangziAction)) + + _gamectr:AddEventListener( + GameEvent.ZPHuCard, + function(...) + self._left_time = 0 + self:__CloseTip() + self._popEvent = false + local arg = {...} + local w = arg[1] + local l = arg[2] + local cards = arg[3] + local info = self._player_card_info[self:GetPos(w)] + -- info:UpdateHandCard() + + local url = 'ui://Extend_Poker_FuLuShou/别人胡' + local pNode = info._mask_liangpai + local player = _room:GetPlayerBySeat(w) + if w == _room.self_player.seat then + url = 'ui://Extend_Poker_FuLuShou/自己胡牌' + pNode = self._view + end + self:PlaySound(player.self_user.sex, 'F_Hu') + local he = UIPackage.CreateObjectFromURL(url) + he:GetTransition('t2'):Play() + if w == _room.self_player.seat then + he:Center() + end + pNode:AddChild(he) + coroutine.start( + function() + coroutine.wait(0.7) + he:Dispose() + self._popEvent = true + end + ) + end + ) + + _gamectr:AddEventListener( + GameEvent.ZPResult1, + function(...) + self._popEvent = false + self._left_time = 0 + local arg = {...} + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local x = {} + self._hu_tip:FillData(x) + self:__CloseTip() + if self._clearingView == nil then + if liuju == true then + self._clearingView = RunBeard_ResultView.new(self._view, 1) + else + self._clearingView = RunBeard_ResultView.new(self._view) + end + end + coroutine.start( + function() + coroutine.wait(0.5) + -- if self._clearingView._is_destroy then return end + self._clearingView:Show() + if _room.curren_round ~= _room.room_config.round then + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + p.total_score = data[i].total_score + p.cur_hp = data[i]['cur_hp'] or 0 + p.total_hp = data[i]['total_hp'] or 0 + if data[i]['hp_info'] then + p.cur_hp = data[i].hp_info.cur_hp + p.total_hp = data[i].hp_info.total_hp == nil and 0 or data[i].hp_info.total_hp + info._view:GetController('zhanji').selectedIndex = 0 + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + + card_info:Clear() + info:UpdateScore() + end + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 0 + end + + for i = 1, #_room.player_list do + _room.self_player.handcard_list = {} + _room.player_list[i].DiceCard = nil + _room.player_list[i].hand_left_count = 20 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + _room.player_list[i].outcard_list = {} + _room.player_list[i].hu_xi = 0 + end + end + self._popEvent = true + end + ) + if _room.curren_round ~= _room.room_config.round then + self._clearingView:InitData( + 0, + _room, + result, + nil, + function(...) + self._state.selectedIndex = 2 + self._clearingView = nil + end + ) + end + end + ) + + _gamectr:AddEventListener( + GameEvent.ZPResult2, + function(...) + self._left_time = 0 + local arg = {...} + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + local x = {} + self._hu_tip:FillData(x) + self:__CloseTip() + self:UnmarkSelfTuoguan() + self._clearingView = RunBeard_ResultView.new() + coroutine.start( + function() + coroutine.wait(0.5) + self._clearingView:Show() + end + ) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end + ) +end + +function M:OutCard(card_item) + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card_item) +end + +--改变牌队形 +function M:ChangeCards(list) + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendChangeCards(list) +end + +function M:__FangziTip(tip) + printlog("进入放子提示流程===>>>") + --pt(tip) + self._popEvent=false + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject('Main_RunBeardMaJiang', 'Gcm_action_tips') + --printlog("Gcm_action_tips===>>>",_chipeng_tip) + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + + local _lit_fanzi = _chipeng_tip:GetChild('lit_fanzi') + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + pt(_tlist) + local tip_hu = false + local count = #_tlist + for k = 1, #_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + if td.type == 7 then + tip_hu = true + end + end + for k = 1, #_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + --printlog("td==",td) + local url = 'ui://Main_RunBeardMaJiang/Btn_fztip' + local btn_t = _lit_fanzi:AddItemFromPool(url) + printlog("td.type==",td.type) + --printlog("btn_t==",btn_t) + --if td.type==6 then + btn_t:GetChild("hupai").icon="ui://Main_RunBeardMaJiang/201_1_" .. td.card + btn_t:GetController("hupai").selectedIndex=1 + --end + btn_t.icon = 'ui://Main_RunBeardMaJiang/newop_' .. td.type + btn_t.data = {tip, td, tip_hu} + btn_t.onClick:Set(self.__TipAction, self) + end + if p.hand_left_count ~= 0 then + local _btn_pass = _lit_fanzi:AddItemFromPool('ui://Main_RunBeardMaJiang/Btn_pass_new') + _btn_pass.onClick:Set( + function() + if tip_hu then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end + ) + + guo_msg:Show() + else + _gamectr:SendAction(0) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end + ) + end + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() + _chipeng_tip.x = _chipeng_tip.x + 200 + _chipeng_tip.y = _chipeng_tip.y - 130 + self._popEvent=true +end +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local tip_hu = data[3] + local list = tip.tip_map_type[td.weight] + --printlog("__TipAction==>>>",td.type) + --pt(list) + if #list > 1 then + self:_ChiView( + list, + tip_hu, + function(id) + if tip_hu and td.type ~= 7 then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + _gamectr:SendAction(id) + guo_msg:Close() + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + ) + guo_msg:Show() + else + _gamectr:SendAction(id) + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + end + ,td.type + ) + --self._chipeng_tip.visible = false + return + + end + if tip_hu and td.type ~= 7 then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + _gamectr:SendAction(td.id) + guo_msg:Close() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + if (self._chipeng_tip == nil) then + return + end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + ) + guo_msg:Show() + else + _gamectr:SendAction(td.id) + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + if (self._chipeng_tip == nil) then + return + end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end +end + +function M:_ChiView(tip_list, tip_hu, callback,typeValue) + local _pop_tip_choice = UIPackage.CreateObject('Main_RunBeardMaJiang', 'Pop_tip_choice') + local list_choose = _pop_tip_choice:GetChild('Lst_choose') + _pop_tip_choice:GetChild('dibtn').onClick:Add( + function() + _pop_tip_choice:Dispose() + end + ) + list_choose:RemoveChildrenToPool() + if typeValue and (typeValue==4 or typeValue==6) then + if typeValue==4 then + _pop_tip_choice:GetChild('n65').text="杠 牌" + else + _pop_tip_choice:GetChild('n65').text="招 牌" + end + + for i = 1, #tip_list do + --if tip_list[i].weight == 4 then + local item_choose = list_choose:AddItemFromPool() + item_choose:GetChild('card' .. 2).icon = + UIPackage.GetItemURL('Main_RunBeardMaJiang', self:getCardItem('201_', tip_list[i].card)) + + item_choose.onClick:Add( + function() + for k = 1, list_choose.numChildren do + list_choose:GetChildAt(k - 1):GetController('zhong').selectedIndex = 0 + end + item_choose:GetController('zhong').selectedIndex = 1 + if tip_list[i].bi_list == nil then + callback(tip_list[i].id) + else + self.bilist = {} + self._chiid = tip_list[i].id + self:CheckRatioCard(tip_list[i].bi_list, 1, tip_list[i].card) + end + end + ) + --end + end + else + + for i = 1, #tip_list do + if tip_list[i].weight ~= 4 then + local item_choose = list_choose:AddItemFromPool() + item_choose:GetChild('card' .. 2).icon = + UIPackage.GetItemURL('Main_RunBeardMaJiang', self:getCardItem('201_', tip_list[i].OpCard[1])) + item_choose:GetChild('card' .. 3).icon = + UIPackage.GetItemURL('Main_RunBeardMaJiang', self:getCardItem('201_', tip_list[i].OpCard[2])) + item_choose:GetChild('card' .. 1).icon = + UIPackage.GetItemURL('Main_RunBeardMaJiang', self:getCardItem('201_', tip_list[i].card)) + + item_choose.onClick:Add( + function() + for k = 1, list_choose.numChildren do + list_choose:GetChildAt(k - 1):GetController('zhong').selectedIndex = 0 + end + item_choose:GetController('zhong').selectedIndex = 1 + if tip_list[i].bi_list == nil then + callback(tip_list[i].id) + else + self.bilist = {} + self._chiid = tip_list[i].id + self:CheckRatioCard(tip_list[i].bi_list, 1, tip_list[i].card) + end + end + ) + end + end + + end + + + + list_choose:ResizeToFit(#tip_list) + _pop_tip_choice:GetChild('di1').width = list_choose.width + 110 + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width) / 2, -100) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:CheckRatioCard(_tiplist, index, chicard, _biid, list) + if _biid ~= nil then + self.bilist = {} + self.bilist[#self.bilist + 1] = _biid + end + if self._pop_tip_choice == nil then + -- statements + return + end + self._pop_tip_choice:GetController('bipai').selectedIndex = index + local Bilist_choose = self._pop_tip_choice:GetChild('Bi_Lst_choose' .. index) + Bilist_choose:RemoveChildrenToPool() + for i = 1, #_tiplist do + local item = UIPackage.CreateObjectFromURL('ui://Main_RunBeardMaJiang/Comp_choose') + local item_choose = Bilist_choose:AddChild(item) + item_choose:GetChild('card' .. 2).icon = + UIPackage.GetItemURL('Main_RunBeardMaJiang', self:getCardItem('201_', _tiplist[i].opcard[1])) + item_choose:GetChild('card' .. 3).icon = + UIPackage.GetItemURL('Main_RunBeardMaJiang', self:getCardItem('201_', _tiplist[i].opcard[2])) + item_choose:GetChild('card' .. 1).icon = + UIPackage.GetItemURL('Main_RunBeardMaJiang', self:getCardItem('201_', chicard)) + item_choose:GetController('zhong').selectedIndex = 0 + item_choose.onClick:Add( + function() + for k = 1, Bilist_choose.numChildren do + Bilist_choose:GetChildAt(k - 1):GetController('zhong').selectedIndex = 0 + end + item_choose:GetController('zhong').selectedIndex = 1 + if _tiplist[i].bi_list == nil then + if index == 1 then + self.bilist = {} + end + self.bilist[#self.bilist + 1] = i - 1 + if tip_hu then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + self._gamectr:SendAction(self._chiid, self.bilist) + guo_msg:Close() + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + ) + guo_msg:Show() + else + self._gamectr:SendAction(self._chiid, self.bilist) + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + else + self:CheckRatioCard(_tiplist[i].bi_list, 2, chicard, i - 1, #_tiplist) + end + end + ) + end + Bilist_choose:ResizeToFit(#_tiplist) + self._pop_tip_choice:GetChild('di' .. index + 1).width = Bilist_choose.width + 110 +end + +-- lua table 深拷贝 +function M:deepcopy(object) + local lookup_table = {} + local function _copy(object) + if type(object) ~= 'table' then + return object + elseif lookup_table[object] then + return lookup_table[object] + end + local new_table = {} + lookup_table[object] = new_table + for index, value in pairs(object) do + new_table[_copy(index)] = _copy(value) + end + return setmetatable(new_table, getmetatable(object)) + end + return _copy(object) +end + +function M:OnFangziAction(...) + local arg = {...} + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + --local num = arg[3] + --if fz.type == RB_FZTypeFLS.Peng or fz.type == RB_FZTypeFLS.Chi or fz.type == RB_FZTypeFLS.Bi then + self:__CloseTip() + --end + if (player == self._room.self_player) then + local info = _player_card_info[self:GetPos(player.seat)] + info:UpdateIsOnClick(false) + end + self._popEvent = false + + local info = _player_card_info[self:GetPos(player.seat)] + info:UpdateFzList(player.fz_list, true, player.seat) --更新放子数组 + if (player == self._room.self_player) then + if fz.type == RB_FZTypeFLS.Chi then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZTypeFLS.Peng then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + + elseif fz == RB_FZTypeFLS.Gang or fz == RB_FZTypeFLS.SGang or fz == RB_FZTypeFLS.Zhao or fz == RB_FZTypeFLS.SZhao then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + end + + + info:InitHandCard(false) + end + if fz.type ~= RB_FZTypeFLS.Kan and fz.type ~= RB_FZTypeFLS.Bi then + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject('Extend_Poker_FuLuShou', 'FzEffect') + + if fz.type == RB_FZTypeFLS.Peng then + self:PlaySound(player.self_user.sex, 'F_Peng') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeardMaJiang', 'peng') + elseif fz.type == RB_FZTypeFLS.Chi then + self:PlaySound(player.self_user.sex, 'F_Chi') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeardMaJiang', 'chi') + elseif fz == RB_FZTypeFLS.Gang or fz == RB_FZTypeFLS.SGang then + self:PlaySound(player.self_user.sex, 'F_Gang') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeardMaJiang', 'gang') + elseif fz == RB_FZTypeFLS.Zhao or fz == RB_FZTypeFLS.SZhao then + self:PlaySound(player.self_user.sex, 'F_Zhao') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeardMaJiang', 'zhao') + end + effect.touchable = false + effect.x, effect.y = 0, 0 + effect:GetTransition('t0'):Play() + pNode:AddChild(effect) + coroutine.start( + function() + coroutine.wait(1) + effect:Dispose() + end + ) + end + + + if player.tempOutcartList then + for i=1,#player.tempOutcartList do + local infoP= DataManager.CurrenRoom:GetPlayerById(player.tempOutcartList[i].playerid) + if infoP then + infoP.outcard_list=player.tempOutcartList[i].outcard_list + local infoC = _player_card_info[self:GetPos(infoP.seat)] + if infoC then + infoC:UpdateQiPai(infoP.outcard_list) + end + end + end + end + + + if (player == self._room.self_player) then + coroutine.start( + function() + coroutine.wait(0.5) + local info = _player_card_info[self:GetPos(player.seat)] + info:ShowHuTip() + info:ChuPaiTiShi() + end + ) + end + local removeOutcard = _player_card_info[self:GetPos(fz.from_seat)] + local p = self._room:GetPlayerBySeat(fz.from_seat) + if p.DiceCard ~= nil and fz.active_card == p.DiceCard then + removeOutcard:ClearOutCard() + p.DiceCard = nil + end + local list = self._room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + --print(p.hu_xi) + info._view:GetChild('huxi').text = p.hu_xi + end + + if player == self._room.self_player then + local info = _player_card_info[self:GetPos(player.seat)] + info:SetNotPutCard() + end + + self._popEvent = true + coroutine.start( + function() + coroutine.wait(0.15) + local info = _player_card_info[1] + info:UpdateIsOnClick(true) + end + ) +end + +function M:ReloadRoom() + local _gamectr = self._gamectr + local room = self._room + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + end + if room.discard == 0 then + self._leftcard = 1 + else + self._leftcard = 0 + end + for i = 1, #room.player_list do + local p = room.player_list[i] + if p.seat == room.banker_seat then + local head = self._player_info[self:GetPos(p.seat)] + head:MarkBank(true) + end + if p.ready then + self._player_info[self:GetPos(p.seat)]:Ready(true) + else + self._player_info[self:GetPos(p.seat)]:Ready(false) + end + + --if p.piao then + -- self._player_info[self:GetPos(p.seat)]:UpdatePiao(-1) + --else + self._player_info[self:GetPos(p.seat)]:UpdatePiao(p.piao) + --end + + if self._state.selectedIndex == 1 then + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('huxi').selectedIndex = 1 + info._view:GetChild('huxi').text = p.hu_xi + info._view:GetController('zhanji').selectedIndex = 0 + if room.hpOnOff == 1 or room:checkHpNonnegative() then + if p.total_hp == nil then + p.total_hp = 0 + end + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateQiPai(p.outcard_list) + card_info:UpdateFzList(p.fz_list, false, p.seat) + if p.DiceCard ~= nil and p.DiceCard ~= 0 then + card_info:UpdateOutCardList(p.DiceCard) + end + if DataManager.CurrenRoom.curren_outcard_seat == p.seat then + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 1 + end + if p.seat == self._room.self_player.seat then + card_info:ChuPaiTiShi() + --[[if + self._room.self_player.card_list ~= nil and + #self._room.self_player.handcard_list == #self._room.self_player.card_list + then + local _list = self:deepcopy(self._room.self_player.card_list) + local cards = {} + for i = 1, #_list do + cards[#cards + 1] = _list[i].card_item + end + table.sort(cards, ViewUtil.HandCardSort) + table.sort(self._room.self_player.handcard_list, ViewUtil.HandCardSort) + + local isNot = false + for i = 1, #cards do + if cards[i] ~= self._room.self_player.handcard_list[i] then + isNot = true + end + end + if isNot == true then + card_info:InitHandCard(false) + else + card_info:UpdateHandCards(self._room.self_player.card_list) + end + else + card_info:InitHandCard(false) + end--]] + + card_info:InitHandCard(false) + card_info:ShowHuTip() + for i = 1, #p.fz_list do + if p.fz_list[i].type == RB_FZTypeFLS.Kan then + card_info:UpdateKan(3, p.fz_list[i].card) + end + end + end + end + + printlog("jefe abcs",room.left_count); + + self._tex_LeftCard.text = '剩余 ' .. room.left_count .. ' 张牌' + local rightpanel = self._view:GetChild('right_panel') + local tex_round = rightpanel:GetChild('tex_round') + if tex_round ~= nil then + tex_round.text = '第 ' .. room.curren_round .. ' 局' + end + self._view:GetChild('tex_round').text = '第 ' .. room.curren_round .. '/' .. room.room_config.round .. ' 局' +end + +function M:PlayChatSound(sex, chat_index) + local sex_path = ViewUtil.Sex_Chat[sex] + local path1 = string.format('extend/zipai/fulushou/sound/%s/chat_%s.mp3', sex_path, tostring(chat_index)) + ViewUtil.PlaySound('FuLuShou_ZP', path1) +end + +function M:PlaySound(sex, path) + local sex_path = ViewUtil.Sex_Chat[1] -- 1 男 2 女 + local sound_path = string.format('extend/zipai/fulushou/sound/%s/%s.mp3', sex_path, path) + printlog(sound_path) + ViewUtil.PlaySound('FuLuShou_ZP', sound_path) +end + +function M:__CloseTip() + if (self._chipeng_tip) then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if (self._pop_tip_choice) then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +function M:Destroy() + ZPMainView.Destroy(self) + UIPackage.RemovePackage('extend/zipai/fulushou/ui/Extend_Poker_FuLuShou') +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/fulushou/EXPlayBackView.lua b/lua_probject/extend_project/extend/zipai/fulushou/EXPlayBackView.lua new file mode 100644 index 00000000..e4f80a20 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/EXPlayBackView.lua @@ -0,0 +1,615 @@ +local ZPPlayBackView = import('.main.ZPPlayBackView') +local PlayerSelfCardInfoView = import('.PlayerSelfCardInfoView') +local PlayerCardInfoView = import('.PlayerCardInfoView') +local RunBeard_ResultView = import('.RunBeard_ResultView') +--local PendulumRule = import('.main.PendulumRule') +local M = {} + +local Record_Event = { + Evt_OutCard = 'OutCard', + Evt_GetCard = 'GetCard', + Evt_Action = 'Action', + Evt_ThrowCard = 'ThrowCard', + Evt_AddCard = 'AddCard', + Evt_ChangePaiXing = 'ChangePaiXing', + Evt_Win = 'Win', + Evt_result = 'result' +} + +local function tableSortNumber(a, b) + return a.card_code_number > b.card_code_number +end + +--- Create a new +function M.new() + setmetatable(M, {__index = PlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = 'PlayBackView' + self:init() + + return self +end + +function M:InitView(url) + local room = self._room + self._gamectr = ControllerManager.GetController(GameController) + UIPackage.AddPackage('base/main_zipaimajiang/ui/Main_RunBeardMaJiang') + UIPackage.AddPackage('extend/zipai/fulushou/ui/Extend_Poker_FuLuShou') + ZPPlayBackView.InitView(self, 'ui://Main_RunBeardMaJiang/Main_' .. room.room_config.people_num) + UpdateBeat:Add(self.OnUpdate, self) + + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. room.game_id) + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + if typeface == 1 then + room.change_card_display = '2_' + else + room.change_card_display = '1_' + end + end + self._player_card_info = {} + local _player_card_info = self._player_card_info + for i = 1, room.room_config.people_num do + local tem = self._view:GetChild('player_card_info' .. i) + self._player_card_info[i] = self:NewPlayerPokerInfoView(tem, i) + end + local rightpanel = self._view:GetChild('right_panel') + self.btn_setting = rightpanel:GetChild('btn_setting') + self.btn_setting.visible = false + + self.tex_time = rightpanel:GetChild('tex_time') + self.tex_time.visible = false + + self.gcm_xinhao = rightpanel:GetChild('gcm_xinhao') + self.gcm_xinhao.visible = false + + self.pb_batteryLevel = rightpanel:GetChild('pb_batteryLevel') + self.pb_batteryLevel.visible = false + + local tex_round_item = rightpanel:GetChild('tex_round') + if tex_round_item ~= nil then + tex_round_item.text = '第 ' .. room.curren_round .. ' 局' + end + local btn_rule = rightpanel:GetChild('btn_log') + if btn_rule ~= nil then + btn_rule.onClick:Set( + function() + if self.RuleView == nil or self.RuleView._is_destroy then + self.RuleView = RoomInfoView.new(self._room) + end + self.RuleView:Show() + end + ) + end + local tex_roomid = rightpanel:GetChild('tex_roomid') + tex_roomid.text = room.room_id + rightpanel:GetChild('tex_gametype').text = room.room_config:GetGameName() + + self._tex_round = self._view:GetChild('tex_round') + self._tex_LeftCard = self._view:GetChild('remaining_card') + self._eventmap = {} + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_ThrowCard] = self.CmdThrowCard + self._cmdmap[Record_Event.Evt_AddCard] = self.CmdAddCard + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_ChangePaiXing] = self.CmdChangePaiXing + self._cmdmap[Record_Event.Evt_result] = self.onResult +end + +function M:NewPlayerPokerInfoView(view, index) + if index == 1 then + return PlayerSelfCardInfoView.new(view, self) + end + return PlayerCardInfoView.new(view, self) +end + +function M:FillRoomData(data) + if self._win_pic then + self._win_pic:Dispose() + end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local roominfo_panel = self._view:GetChild('roominfo_panel1') + roominfo_panel:GetChild('tex_roomid').text = room.room_id + roominfo_panel:GetChild('tex_gametype').text = room.room_config:GetGameName() + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:SetPlayer(p) + if p.seat == room.self_player.seat then + card_info:UpdateIsOnClick(false) + end + local infoHand = self._player_info[self:GetPos(p.seat)] + infoHand._view:GetController('huxi').selectedIndex = 1 + infoHand._view:GetChild('huxi').text = p.hu_xi + if p.total_hp then + infoHand._view:GetController('zhanji').selectedIndex = 0 + if room.hpOnOff == 1 or room:checkHpNonnegative() then + infoHand._view:GetController('zhanji').selectedIndex = 1 + infoHand._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + infoHand:UpdateScore() + end + end + self:UpdateRound(self._room.curren_round) + self:GenerateAllStepData(data) + self:ShowStep(1) + self:UpdateStep(1) +end + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateStep(index + 1) + self:UpdateLeftCard(step.left_card) + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hu_xi = step.player_card_data[i].hu_xi + p.hand_left_count = #p.card_list + + if index == 1 then + info:Clear() + if p.total_hp then + local avHand = self._player_info[self:GetPos(p.seat)] + local room = DataManager.CurrenRoom + avHand._view:GetController('zhanji').selectedIndex = 0 + if room.hpOnOff == 1 or room:checkHpNonnegative() then + avHand._view:GetController('zhanji').selectedIndex = 1 + avHand._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + avHand:UpdateScore() + end + end + if p.hu_xi ~= nil then + local infoHand = self._player_info[self:GetPos(p.seat)] + infoHand._view:GetChild('huxi').text = p.hu_xi + end + + if step.cmd == Record_Event.Evt_Action then + if p.fz_list ~= nil and #p.fz_list > 0 then + info:UpdateFzList1(p.fz_list) + end + end + + + + + if step.cmd == Record_Event.Evt_GetCard then + if step.DiceCard ~= nil and step.DiceCard ~= 0 then + if p.seat == step.seat then + info:UpdateOutCardList(step.DiceCard) + self.lastCard=step.DiceCard + coroutine.start( + function() + coroutine.wait(0.5) + info:ClearOutCard() + end + ) + end + end + end + + if step.cmd == Record_Event.Evt_OutCard then + if step.DiceCard ~= nil and step.DiceCard ~= 0 then + if p.seat == step.seat then + info:UpdateOutCardList(step.DiceCard) + self.lastCard=step.DiceCard + coroutine.start( + function() + coroutine.wait(1) + info:ClearOutCard() + end + ) + end + end + end + + + + if p.outcard_list ~= nil then + info:UpdateQiPai(p.outcard_list) + end + + if p.seat ~= self._room.self_player.seat then + info:InitHandCard(p.card_list) + else + self._room.self_player.handcard_list = p.card_list + info:InitHandCard(false) + end + + if step.cmd== Record_Event.Evt_Win then + if p.seat == step.win and self.lastCard then + info:UpdateOutCardList(self.lastCard) + end + end + + + --info:InitHandCard(p.card_list) + + + + end + -- print("step.cmd ",step.cmdm,Record_Event.Evt_Win) + if step.cmd == Record_Event.Evt_result then + local _room = DataManager.CurrenRoom + local result = step.result + self._win_pic = UIPackage.CreateObjectFromURL('ui://Main_RunBeardMaJiang/胡') + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + + if result ~= nil then + if self._clearingView == nil then + self._clearingView = RunBeard_ResultView.new(self._view) + coroutine.start( + function() + coroutine.wait(0.5) + self._clearingView:Show() + end + ) + end + local data = result.data.info_list + self._clearingView:InitData( + 0, + _room, + result.data, + nil, + function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + -- p.cur_hp = data[i]['cur_hp'] or 0 + -- if data[i]['hp_info'] then + -- p.cur_hp = data[i].hp_info.cur_hp + -- end + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + if data[i]['hp_info'] then + p.total_score = d2ad(data[i].hp_info.cur_hp) + local stotal_hp = data[i].hp_info.total_hp + info._view:GetController('zhanji').selectedIndex = 0 + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(stotal_hp) + end + end + info:UpdateScore(p.total_score) + end + self._clearingView = nil + end + ) + end + else + if self._win_pic then + self._win_pic:Dispose() + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = '' + step.left_card = info.left_card + step.win = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.hu_xi = 0 + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdOutCard(cmd, index) + printlog("出牌==》》》》") + pt(cmd) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + data.seat = cmd.seat + data.DiceCard = cmd.data.card + + data.out_card_list = cmd.data.card + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end + +function M:CmdGetCard(cmd, index) + print("抓牌==》》》") + pt(cmd) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + data.seat = cmd.seat + data.DiceCard = cmd.data.card + + u.card_list[#u.card_list + 1] = cmd.data.card + +end +function M:CmdThrowCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + data.current_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + data.out_card_list = cmd.data.card + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end +function M:CmdAddCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + local _room = self._room + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card +end + +function M:onResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result = cmd.result +end + +function M:CmdChangePaiXing(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + data.card_list = cmd.data.card_list +end + +function M:CmdAction(cmd, index) + printlog("吃杠彭行为=====》》》》》") + pt(cmd) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + local p = data.player_card_data[cmd.seat] + local fz = {} + p.hu_xi = cmd.data.hu_xi + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.active_card = cmd.data.card + fz.opcard = cmd.data.opcard + local opcard = fz.opcard + local ftype = fz.type + local card = fz.card + local remove_num = #opcard + if ftype == RB_FZTypeFLS.Chi then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZTypeFLS.Peng then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZTypeFLS.Gang or ftype == RB_FZTypeFLS.SGang or ftype == RB_FZTypeFLS.Zhao or ftype == RB_FZTypeFLS.SZhao then + local num = 0 + for i = 1, #p.card_list do + if card == p.card_list[i] then + num = num + 1 + end + end + local isAddTi = false + for i = 1, #p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type = RB_FZTypeFLS.Gang + -- isAddTi = true + end + end + if num > 0 then + for i = 1, num do + list_remove(p.card_list, card) + end + + if isAddTi == false then + p.fz_list[#p.fz_list + 1] = fz + end + end + end +end + +function M:CmdWin(cmd, index) + pt("赢牌===>>>",cmd) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = '剩余 ' .. num .. ' 张牌' +end + +function M:UpdateRound(round) + self._tex_round.text = '第 ' .. round .. '/' .. self._room.room_config.round .. ' 局' +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = self:deepcopy(last_step) + step.player_card_data = {} + local card_data = step.player_card_data + for i = 1, #last_step.player_card_data do + card_data[i] = {} + card_data[i].card_list = self:deepcopy(last_step.player_card_data[i].card_list) + card_data[i].outcard_list = self:deepcopy(last_step.player_card_data[i].outcard_list) + card_data[i].fz_list = self:deepcopy(last_step.player_card_data[i].fz_list) + card_data[i].hand_left_count = #card_data[i].card_list + card_data[i].hu_xi = self:deepcopy(last_step.player_card_data[i].hu_xi) + end + self._step[#self._step + 1] = step + return step +end + +-- lua table 深拷贝 +function M:deepcopy(object) + local lookup_table = {} + local function _copy(object) + if type(object) ~= 'table' then + return object + elseif lookup_table[object] then + return lookup_table[object] + end + local new_table = {} + lookup_table[object] = new_table + for index, value in pairs(object) do + new_table[_copy(index)] = _copy(value) + end + return setmetatable(new_table, getmetatable(object)) + end + return _copy(object) +end + +function M:NextRecordPlay() + local result = PlayBackView.NextRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() +end + +function M:LastRecordPlay() + local result = PlayBackView.LastRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() +end + +function M:Play() + self:ChangeAlpha() + self:ChangePlayState(not self._play) + if not self._play then + return + end + if (self._currentStep == #self.cmdList and self._playFoward) or (self._currentStep == 0 and not self._playFoward) then + self._currentStep = 0 + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:ChangePlayState(state) + self._play = state + self:ChangeTextSpeed() + local btn_play = self._view:GetChild('panel_record'):GetChild('btn_play') + if self._play then + btn_play:GetController('state').selectedIndex = 1 + else + btn_play:GetController('state').selectedIndex = 0 + end +end + +function M:ChangeTextSpeed() + local str1 = self._play and self._speed or '' + self._view:GetChild('panel_record'):GetChild('tex_speed').text = str1 + local str2 = + not self._play and (self._playFoward and '播放暂停' or '回退暂停') or + self._playFoward and (self._speed == 1 and '播放' or '快进') or + (self._speed == 1 and '回退' or '快退') + self._view:GetChild('panel_record'):GetChild('tex_2').text = str2 + local str3 = self._play and '倍速度' or '' + self._view:GetChild('panel_record'):GetChild('tex_1').text = str3 +end + +function M:CmdLeftArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if not self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = false + self:ChangeTextSpeed() + end +end + +function M:CmdRightArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:OnUpdate() + if self._play then + if (self._currentStep == #self.cmdList and self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像结尾了,再次点击播放按钮可重新播放') + return + elseif (self._currentStep == 0 and not self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像开头了,再次点击播放按钮可重新播放') + return + end + self._timer = self._timer + Time.deltaTime + if self._timer >= 1 / self._speed then + self._timer = 0 + local step = self._playFoward and 1 or -1 + self._currentStep = self._currentStep + step + self:ShowStep(self._currentStep) + end + end +end + +function M:Destroy() + UpdateBeat:Remove(self.OnUpdate, self) + PlayBackView.Destroy(self) +end + +function M:UpdateStep(step) + self._record:GetChild('tex_step').text = '第 ' .. step .. ' / ' .. #self._step .. '步' +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/fulushou/EXPlayer.lua b/lua_probject/extend_project/extend/zipai/fulushou/EXPlayer.lua new file mode 100644 index 00000000..fe112fd2 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/EXPlayer.lua @@ -0,0 +1,37 @@ + + +local EXPlayer ={ + -- 手牌列表 + card_list = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil, + hu_xi =0 +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 + self.hu_xi =0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/fulushou/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/zipai/fulushou/EXPlayerInfoView.lua new file mode 100644 index 00000000..7d32adea --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/EXPlayerInfoView.lua @@ -0,0 +1,52 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + + +--[[function M:FillData(player) + + + PlayerInfoView.FillData(self, player) + if player.cur_hp ~= nil then + self:UpdateScore(d2ad(player.cur_hp)) + else + local rt = 1 + if self._main_view._room.hpOnOff == 1 then + rt = self._main_view._room.score_times + end + self:UpdateScore(player.total_score * rt) + end + + +end--]] + +function M:UpdatePiao(piao) + + if piao == nil or piao == -1 then + self._view:GetChild("piao").text = "" + elseif piao == 0 then + self._view:GetChild("piao").text = "不飘" + elseif piao == 1 then + self._view:GetChild("piao").text = "飘1分" + elseif piao == 2 then + self._view:GetChild("piao").text = "飘2分" + elseif piao == 3 then + self._view:GetChild("piao").text = "飘3分" + elseif piao == 5 then + self._view:GetChild("piao").text = "飘5分" + elseif piao == 8 then + self._view:GetChild("piao").text = "飘8分" + end +end + + +return M diff --git a/lua_probject/extend_project/extend/zipai/fulushou/EXRoomConfig.lua b/lua_probject/extend_project/extend/zipai/fulushou/EXRoomConfig.lua new file mode 100644 index 00000000..01fab38c --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/EXRoomConfig.lua @@ -0,0 +1,482 @@ + +local M = {} + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.config=config + self.entrust_time=config["tuoguan"] + + self.class = "RoomConfig" + self.round = config["times"] + self.mode = config["mode"] + self.tun = config["tun"] + self.fengding = config["fengding"] + self.tuanyuan = config["tuanyuan"] + self.hanghangxi = config["hanghangxi"] + self.siqi = config["siqi"] + self.shuahou = config["shuahou"] + self.huangfan = config["huangfan"] + self.jiaxingxing = config["jiaxingxing"] + self.tinghu = config["tinghu"] + self.duizifu = config["duizifu"] + self.back = config["back"] + self.yuan = config["yuan"] + self.tianhu =config["tianhu"] + self.dihu =config["dihu"] + self.haihu =config["haihu"] + self.maxPlayers = config["maxPlayers"] + self.qupai = config["qupai"] + self.isHidden = config.isHidden + + self.hh = config["hh"] or 0 + self.dh = config["dh"] or 0 + self.hw = config["hw"] or 0 + self.wh = config["wh"] or 0 + + self.hd = config["hd"] or 0 + self.wd = config["wd"] or 0 + self.jhd = config["jhd"] or 0 + + self.dhdf = config["dhdf"] or 0 + return self +end + +--[[function M:GetDes(sp) + sp = sp or " " + local count=0 + local str = self.round and self.round .. "局" .. " " or "" + str = str .. RoomConfig.GetDes(self, sp).."\n" + + + if self.config["kawai"]==0 then + str = str .."卡歪" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + tr = str .."不卡歪" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["first_rand_zhuang"] then + str = str .."首局随机庄" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["zhuang_di_hu"]==0 then + str = str .."庄家地胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + tr = str .."庄家不地胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["hao_config"]==0 then + str = str .."豪123" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + tr = str .."豪234" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["hao_jiabei"]==0 then + str = str .."-不加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["hao_jiabei"]==1 then + str = str .."低于10分加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["hao_jiabei"]==2 then + str = str .."低于20分加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["hao_jiabei"]==3 then + str = str .."低于30分加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["hao_jiabei"]==4 then + str = str .."低于40分加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["hao_jiabei"]==5 then + str = str .."低于50分加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["ming_tang"]==0 then + str = str .."名堂60/80/100" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str .."名堂80/100/120" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["piao"]==0 then + str = str .."不飘" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["piao"]==1 then + str = str .."飘123" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["piao"]==2 then + str = str .."飘235" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["piao"]==3 then + str = str .."飘258" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["qupai"]==0 then + str = str .."不抽" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["piao"]==1 then + str = str .."抽10" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["piao"]==2 then + str = str .."抽19" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + return str +end +--]] + + +function M:GetDes(sp) + sp = sp or " " + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + + if self.config["xuan_zhuang"]==0 then + str = str .."轮庄" + str = str ..sp + + else + str = str .."胡牌庄" + str = str ..sp + end + + + + if self.config["qing_zui_hu"]==0 then + str = str .."亲嘴0胡" + str = str ..sp + + else + tr = str .."亲嘴2胡" + str = str ..sp + + end + + if self.config["gang_zhao_liu_xi"] then + str = str .."杠招6息" + str = str .. sp + end + + if self.config["special_peng_peng_hu"] then + str = str .."碰碰胡每个字不少于2个字" + str = str .. sp + end + + + + if self.config["piao"]==0 then + str = str .."不飘" + + str = str ..sp + + elseif self.config["piao"]==1 then + str = str .."热漂" + + str = str ..sp + + elseif self.config["piao"]==2 then + str = str .."冷飘" + + str = str ..sp + + elseif self.config["piao"]==3 then + str = str .."固定飘" + + str = str ..sp + + + if self.config["piao1"] then + str = str .."飘1" + + str = str ..sp + end + + if self.config["piao2"] then + str = str .."飘2" + + str = str ..sp + end + + if self.config["piao3"] then + str = str .."飘3" + + str = str ..sp + end + + if self.config["piao4"] then + str = str .."飘5" + + str = str ..sp + end + + end + + if self.config["fen_diejia"]==0 then + str = str .."叠加" + + str = str ..sp + + else + str = str .."不叠加" + + str = str ..sp + + end + + + + return str +end + + +function M:GetGameName() + return self.maxPlayers .. '人福禄寿' +end + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_Poker_FuLuShou/gamerule") + return gamerulepanel +end + + +function M:GetGameSMSize() + return 467,500 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/fulushou/ExtendConfig.lua b/lua_probject/extend_project/extend/zipai/fulushou/ExtendConfig.lua new file mode 100644 index 00000000..c4405c91 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/ExtendConfig.lua @@ -0,0 +1,241 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import('.EXGameInfo') +local EXMainView = import('.EXMainView') +local EXGameController = import('.EXGameController') +local EXRoomConfig = import('.EXRoomConfig') +local EXPlayBackView = import('.EXPlayBackView') +local explayer = import('.EXPlayer') +local ExtendConfig = {} + +local M = ExtendConfig + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = 'ExtendConfig' + self.extend_id = 13 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage('extend/zipai/fulushou/ui/Info_Poker_FuLuShou') + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage('extend/zipai/fulushou/ui/Extend_Poker_FuLuShou') + ResourcesManager.UnLoadGroup('FuLuShou_ZP') +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:FillRoomConfig(room, _config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + printlog("初始化数据===>>>") + pt(s2croom) + local room = DataManager.CurrenRoom + local reload = s2croom['reload'] + local _tableInfo = s2croom['tableInfo'] + + local _config = _tableInfo['config'] + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo['playerData'] + room.curren_round = _tableInfo['round'] + for i = 1, #playerList do + local _jp = playerList[i] + + local p = explayer.new() + p.seat = _jp['seat'] + local online = _jp['online'] + p.line_state = online + p.ready = _jp['ready'] == 1 and true or false + --p.piao=_jp['piao'] + local pid = _jp['aid'] + if (DataManager.SelfUser.account_id == pid) then + room.self_player = p + p.self_user = DataManager.SelfUser + else + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp['nick'] + u.head_url = _jp['portrait'] + u.sex = _jp['sex'] + end + p.entrust = _jp['entrust'] + p.self_user.host_ip = _jp['ip'] + p.self_user.location = Location.new(_jp['pos'] or '') + p.cur_hp = _jp['cur_hp'] or 0 + p.total_hp = _jp['total_hp'] or 0 + if _jp['hp_info'] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + room:AddPlayer(p) + end + + -- 如果重写了player类,就需要传第二个参数 + -- self:FillPlayerData(playerList, explayer) + + if (reload) then + local _reloadInfo = s2croom['reloadInfo'] + room.self_player.currentNotPutCardList=_reloadInfo['notput'] + local _hand_card = _reloadInfo['hand_card'] + local _card_list = _reloadInfo['card_list'] + local _discard = _reloadInfo['discard'] + room.discard = _discard + -- local _index = _reloadInfo["typeface"] + -- if _index ==1 then + -- room.change_card_display = "2_" + -- else + -- room.change_card_display = "1_" + -- end + room.self_player.handcard_list = _hand_card + room.self_player.card_list = {} + --[[ for i = 1, #_card_list do + local data = {} + data.card_item = _card_list[i].card + data.index_X = _card_list[i].X + data.index_Y = _card_list[i].Y + room.self_player.card_list[#room.self_player.card_list + 1] = data + end--]] + local active_seat = _reloadInfo['active_seat'] + local bank_seat = _reloadInfo['banker_seat'] + local playing = _reloadInfo['playing'] + local _info_list = _reloadInfo['info_list'] + local last_outcard_seat = _reloadInfo['last_outcard_seat'] + + room.left_count = _reloadInfo['left_card'] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo['curren_outcard_seat'] + if active_seat ~= 0 then + local player = room:GetPlayerBySeat(active_seat) + player.DiceCard = _reloadInfo['acitve_card'] + end + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i = 1, #_info_list do + local tem = _info_list[i] + local playerid = tem['playerid'] + local p = room:GetPlayerById(playerid) + local outcard_list = tem['outcard_list'] + p.outcard_list = outcard_list + p.total_score = tem['score'] + p.hu_xi = tem['hu_xi'] + p.hand_left_count = tem['card_count'] + p.cur_hp = tem['cur_hp'] or 0 + p.total_hp = tem['total_hp'] or 0 + if tem['hp_info'] then + p.cur_hp = tem.hp_info.cur_hp + p.total_hp = tem.hp_info.total_hp + end + p.entrust = tem['entrust'] + p.piao=tem['piao'] + local opcard = tem['opcard'] + for k = 1, #opcard do + local op = opcard[k] + local fz = {} + fz.type = op['type'] + --local data = {} + --data[1] = op['card1'] + --data[2] = op['card3'] + --fz.opcard = data + fz.card = op['card'] + fz.active_card = op['opcard'] + + p.fz_list[#p.fz_list + 1] = fz + if p.seat == room.self_player.seat then + if fz.type == RB_FZTypeFLS.Kan then + for i = 1, 3 do + room.self_player.handcard_list[#room.self_player.handcard_list + 1] = fz.card + end + end + end + end + pt(p) + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data['info'] + + local _config = _tableInfo['config'] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config['ownerid'] + local active_seat = _tableInfo['active_seat'] + local bank_seat = _tableInfo['banker_seat'] + room.left_count = _tableInfo['left_card'] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo['round'] + + local _info_list = _tableInfo['playerData'] + for i = 1, #_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp['seat'] + local online = _jp['online'] + p.line_state = online + p.ready = _jp['ready'] == 1 and true or false + local pid = _jp['aid'] + if pid == DataManager.SelfUser.account_id then + room.self_player = p + end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp['nick'] + u.head_url = _jp['portrait'] + u.sex = _jp['sex'] + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp['hand_card'] + p.hand_card = _hand_card + if room.self_player ~= nil and p.seat == room.self_player.seat then + room.self_player.handcard_list = _hand_card + end + p.total_score = _jp['score'] + p.hand_left_count = #_hand_card + p.cur_hp = _jp['cur_hp'] or 0 + p.total_hp = _jp['total_hp'] or 0 + if _jp['hp_info'] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data['cmdList'] + room.result = pd_data['result'] +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/fulushou/PlayerCardInfoView.lua b/lua_probject/extend_project/extend/zipai/fulushou/PlayerCardInfoView.lua new file mode 100644 index 00000000..1702bbe5 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/PlayerCardInfoView.lua @@ -0,0 +1,262 @@ +local PlayerCardInfoView = import(".main.ZPPlayerCardInfoView") + +local M = {} +function M.new(view,mainView) + + setmetatable(M, {__index = PlayerCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + + + +function M:UpdateFzList( fz_list ,ispaly,seat) + self._area_fz_list:RemoveChildren(0,-1,true) + for i = 1,#fz_list do + local fzitem = nil + if fz_list[i].type ~= RB_FZTypeFLS.Kan then + fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/ComponentNew") + if(ispaly == false)then + fzitem:RemoveChildren(0,-1,true) + end + end + if fz_list[i].type == RB_FZTypeFLS.Chi or fz_list[i].type == RB_FZTypeFLS.Bi then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Fz_0_3") + fzcards:GetController("c2").selectedIndex =1 + for j=1,#fz_list[i].active_card do + fzcards:GetChild("card_"..j).icon = self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].active_card[j]) + end + --fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].active_card) + --fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].opcard[1]) + --fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].opcard[2]) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZTypeFLS.Peng then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].active_card[j]) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZTypeFLS.Wei then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeardMaJiang/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZTypeFLS.ChouWei then + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeardMaJiang/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZTypeFLS.Gang or fz_list[i].type == RB_FZTypeFLS.Zhao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Fz_0_4") + for j=1,4 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].active_card[j]) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZTypeFLS.SGang or fz_list[i].type == RB_FZTypeFLS.SZhao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Fz_0_4") + + for j=1,4 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeardMaJiang/202_1_300" + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + end + end +end + +function M:playAnim(fzitem,fzcards, size,i,ispaly,seat) + if(ispaly == nil)then + ispaly =false + end + + local isaddLast = false + if(ispaly and i == size)then --匹配最后一个牌 + local faArray= fzitem:GetChild("chiwei1") + + if(DataManager.CurrenRoom.room_config.people_num ==3)then + if(DataManager.CurrenRoom.self_player.seat == 1)then + if(seat == 2)then + faArray= fzitem:GetChild("chiwei1") + else + faArray= fzitem:GetChild("chiwei") + end + elseif(DataManager.CurrenRoom.self_player.seat == 2) then + if(seat == 3)then + faArray= fzitem:GetChild("chiwei1") + else + faArray= fzitem:GetChild("chiwei") + end + elseif(DataManager.CurrenRoom.self_player.seat == 3)then + if(seat == 1)then + faArray= fzitem:GetChild("chiwei1") + else + faArray= fzitem:GetChild("chiwei") + end + end + end + + if(faArray~=nil)then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end + if(seat~=nil)then + isaddLast = self:isAddFirst(seat) + end + if(isaddLast)then + local index_postion = 0 + self._area_fz_list:AddChildAt(fzitem,index_postion) + else + self._area_fz_list:AddChild(fzitem) + end +end + +function M:isAddFirst(seat) + local isaddLast = false + if(DataManager.CurrenRoom.room_config.people_num ==3)then + if(DataManager.CurrenRoom.self_player.seat == 1)then + if(seat == 2)then + isaddLast = true + end + elseif(DataManager.CurrenRoom.self_player.seat == 2)then + if(seat == 3)then + isaddLast = true + end + elseif(DataManager.CurrenRoom.self_player.seat == 3)then + if(seat == 1)then + isaddLast = true + end + end + elseif DataManager.CurrenRoom.room_config.people_num ==2 then + isaddLast = true + end + return isaddLast +end + +function M:PlayingOutCardAnima(card) + coroutine.start(function() + coroutine.wait(0.1) + self:ClearOutCard() + end) +end + +function M:UpdateOutCardList(outcard,isShow,isMopai,seat) + if(isShow == nil) then + isShow = false + end + if(isMopai == nil) then + isMopai = false + end + + self._area_outcard_list:RemoveChildren(0,-1,true) + local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Gcm_OutCard") + + if outcard==0 then + outcards:GetChild("icon").icon ="ui://Main_RunBeardMaJiang/202_1_300" + else + outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeardMaJiang/203_",outcard) + end + outcards.x,outcards.y = 0,0 + local show_di_bg = outcards:GetChild("show_di_bg") + --show_di_bg.visible = true + if(isShow)then + if outcard == 0 then + show_di_bg.visible = false + end + if(seat ~= nil and outcards~=nil)then + if(DataManager.CurrenRoom.room_config.people_num ==3)then + if(seat ==2)then + seat = 3 + elseif(seat == 3)then + seat =2 + end + elseif DataManager.CurrenRoom.room_config.people_num ==2 then + seat = 3 + end + if(isMopai)then + if outcard ~= 0 then + outcards:GetTransition("mopai"..seat):Play(function( ) + -- show_di_bg.visible = true + + end) + end + else + show_di_bg.visible = false + outcards:GetTransition("cpai"..seat):Play() + end + else + --show_di_bg.visible = true + end + else + show_di_bg.visible = false + end + self._area_outcard_list:AddChild(outcards) +end + +--弃牌 +function M:UpdateQiPai( qi_list,ispaly,seat) + self._area_qipai_list:RemoveChildren(0,-1,true) + for i=1,#qi_list do + local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Qipai") + qicards:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeardMaJiang/202_",qi_list[i]) + if(ispaly)then + if(i == #qi_list) then + if(DataManager.CurrenRoom.room_config.people_num ==2)then + qicards:GetTransition("t0"):Play() + else + if(DataManager.CurrenRoom.self_player.seat == 1)then + if(seat == 2)then + qicards:GetTransition("t0"):Play() + else + qicards:GetTransition("t1"):Play() + end + elseif(DataManager.CurrenRoom.self_player.seat == 2)then + if(seat == 3)then + qicards:GetTransition("t0"):Play() + else + qicards:GetTransition("t1"):Play() + end + elseif(DataManager.CurrenRoom.self_player.seat == 3)then + if(seat == 1)then + qicards:GetTransition("t0"):Play() + else + qicards:GetTransition("t1"):Play() + end + else + qicards:GetTransition("t0"):Play() + end + + end + end + end + self._area_qipai_list:AddChild(qicards) + end + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/fulushou/PlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/zipai/fulushou/PlayerSelfCardInfoView.lua new file mode 100644 index 00000000..cdf91b50 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/PlayerSelfCardInfoView.lua @@ -0,0 +1,423 @@ +local PlayerSelfCardInfoView = import(".main.ZPPlayerSelfCardInfoView") +local CardCheck = import(".main.CardCheck") +local SanPaiInfoView=import(".SanPaiInfoView") +local M = {} +-- +function M.new(view,mainView) + setmetatable(M, {__index = PlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self._full = true + self:init() + self.onclickNum=0 + return self +end + + +function M:onTouchBegin(context) + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + --printlog("点击卡牌=============================>>>") + self.onclickNum=self.onclickNum+1 + local button = context.sender + local card = button.data + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self:ShowHuTip(card.card_item) + end + card.startPos=Vector2.New(card.btn_card.x,card.btn_card.y) + local tempOrder=card.btn_card.sortingOrder or 1 + card.order=tonumber(tempOrder) + + card.btn_card:GetController('cardnum').selectedIndex=0 + card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeardMaJiang/203_",card.card_item) + + + card.btn_card.sortingOrder = 100 + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + card.btn_card.xy = Vector2.New(card.btn_card.x+20 ,card.btn_card.y-50) + card.touch_pos = xy - button.xy + +end + +function M:__OnDragEnd(context) + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + if self.outcard_button then + self.outcard_button = nil + end + --printlog("点击结束卡牌============================>>>") + local button = context.sender + + local card = button.data + + local _room = DataManager.CurrenRoom + if (button.y < -480 and _room.curren_outcard_seat == _room.self_player.seat) then + local OutCardCallBackFunc=function () + button.touchable = false + self.outcard_button = card + self:UpdateIsOnClick(false) + self._mainView:OutCard(card.card_item) + end + + local tingpaiList=DataManager.CurrenRoom.self_player.tingPaiList + local isHasTing=CheckDictionaryFromContent(card.card_item,DataManager.CurrenRoom.self_player.tingPaiList) + --printlog("是否包含有====》》》》",isHasTing) + --pt(tingpaiList) + if isHasTing==nil then isHasTing=false end + + if isHasTing==false and tingpaiList and #tingpaiList>0 then + local spCallBackFunc=function (isOP) + if isOP then + OutCardCallBackFunc() + else + local isChangeCard = false + self.outcard_button = nil + card.btn_card:GetController('cardnum').selectedIndex=card.sameNum-1 + card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeardMaJiang/201_",card.card_item) + self._area_handcard_list:AddChild(button) + if card.btn_card.sortingOrder then + card.btn_card.sortingOrder = card.order or 1 + end + + if #self.card_list == 1 then + isChangeCard = false + self:UpdateHandCardsPos() + return + end + card.btn_card.xy=card.startPos + end + end + local SPView=SanPaiInfoView.new(spCallBackFunc) + + + else + OutCardCallBackFunc() + end + + + + + else + local isChangeCard = false + self.outcard_button = nil + card.btn_card:GetController('cardnum').selectedIndex=card.sameNum-1 + card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeardMaJiang/201_",card.card_item) + self._area_handcard_list:AddChild(button) + + if card.btn_card.sortingOrder then + card.btn_card.sortingOrder = card.order or 1 + end + + if #self.card_list == 1 then + isChangeCard = false + self:UpdateHandCardsPos() + return + end + card.btn_card.xy=card.startPos + end +end + + + + + +function M:__OnClickHandCard(context) + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + if self.outcard_button then + self.outcard_button = nil + end + + local button = context.sender + + local card = button.data + + local _room = DataManager.CurrenRoom + + if (Utils.IsDoubleClick(context) and _room.curren_outcard_seat == _room.self_player.seat) then + local OutCardCallBackFunc=function () + button.touchable = false + self.outcard_button = card + self:UpdateIsOnClick(false) + self._mainView:OutCard(card.card_item) + end + + local tingpaiList=DataManager.CurrenRoom.self_player.tingPaiList + local isHasTing=CheckDictionaryFromContent(card.card_item,DataManager.CurrenRoom.self_player.tingPaiList) + --printlog("是否包含有====》》》》",isHasTing) + --pt(tingpaiList) + if isHasTing==nil then isHasTing=false end + + if isHasTing==false and tingpaiList and #tingpaiList>0 then + local spCallBackFunc=function (isOP) + if isOP then + OutCardCallBackFunc() + else + local isChangeCard = false + self.outcard_button = nil + card.btn_card:GetController('cardnum').selectedIndex=card.sameNum-1 + card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeardMaJiang/201_",card.card_item) + self._area_handcard_list:AddChild(button) + if card.btn_card.sortingOrder then + card.btn_card.sortingOrder = card.order or 1 + end + + if #self.card_list == 1 then + isChangeCard = false + self:UpdateHandCardsPos() + return + end + card.btn_card.xy=card.startPos + end + end + local SPView=SanPaiInfoView.new(spCallBackFunc) + + + else + OutCardCallBackFunc() + end + + + + end + + +end + + + + +function M:UpdateOutCardList(outcard,isShow,isMopai,seat) + self:HidePiao() + if(isShow == nil) then + isShow = false + end + if(isMopai == nil) then + isMopai = false + end + self._area_outcard_list:RemoveChildren(0,-1,true) + local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Gcm_OutCard") + + if outcard==0 then + outcards:GetChild("icon").icon ="ui://Main_RunBeardMaJiang/202_1_300" + else + outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeardMaJiang/203_",outcard) + end + outcards.x,outcards.y = 0,0 + local show_di_bg = outcards:GetChild("show_di_bg") + -- show_di_bg.visible = true + if(isShow)then + if outcard == 0 then + show_di_bg.visible = false + end + if(seat ~= nil and outcards~=nil)then + if(isMopai)then + if outcard ~= 0 then + outcards:GetTransition("mopai"..seat):Play(function( ) + -- show_di_bg.visible = true + + end) + end + else + show_di_bg.visible = false + outcards:GetTransition("cpai"..seat):Play() + end + else + --show_di_bg.visible = true + end + else + show_di_bg.visible = false + end + self._area_outcard_list:AddChild(outcards) +end + +--弃牌 +function M:UpdateQiPai( qi_list,isplay) + self._area_qipai_list:RemoveChildren(0,-1,true) + for i=1,#qi_list do + local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Qipai") + qicards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeardMaJiang/202_",qi_list[i]) + if(isplay)then + if(i == #qi_list) then + qicards:GetTransition("t1"):Play() + end + end + self._area_qipai_list:AddChild(qicards) + end +end + +--摸牌动画 +function M:PlayingOutCardAnima( card) + coroutine.start(function() + coroutine.wait(0.1) + self:ClearOutCard() + end) +end + +function M:UpdateFzList( fz_list ,ispaly) + self._area_fz_list:RemoveChildren(0,-1,true) + for i = 1,#fz_list do + local fzitem=nil + if fz_list[i].type ~= RB_FZTypeFLS.Kan then + fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/ComponentNew") + if(ispaly == false)then + fzitem:RemoveChildren(0,-1,true) + end + end + if fz_list[i].type == RB_FZTypeFLS.Chi then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Fz_0_3") + --fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].active_card) + fzcards:GetController("c2").selectedIndex = 1 + -- fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].opcard[1]) + --fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].opcard[2]) + for j=1,#fz_list[i].active_card do + fzcards:GetChild("card_"..j).icon = self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].active_card[j]) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZTypeFLS.Peng then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].active_card[j]) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZTypeFLS.Gang or fz_list[i].type == RB_FZTypeFLS.Zhao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Fz_0_4") + for j=1,4 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].active_card[j]) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZTypeFLS.SGang or fz_list[i].type == RB_FZTypeFLS.SZhao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Fz_0_4") + + for j=1,4 do + if j == 4 then + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeardMaJiang/202_', fz_list[i].active_card[j]) + else + fzcards:GetChild('card_' .. j).icon = 'ui://Main_RunBeardMaJiang/202_1_300' + end + + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + end + end +end + + +function M:playAnim( fzitem,fzcards, size,i,ispaly ) + if(ispaly == nil)then + ispaly =false + end + if(ispaly and i == size)then + local faArray= fzitem:GetChild("chiwei") + if(faArray~=nil)then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end + self._area_fz_list:AddChild(fzitem) +end + + + --出牌提示动画 + function M:ChuPaiTiShi() + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + --[[local chu_player = DataManager.CurrenRoom.self_player + local selfplayeTable = {} + selfplayeTable.handcard_list = chu_player.handcard_list + selfplayeTable.fz_list = chu_player.fz_list + selfplayeTable.tiCount = chu_player.tiCount + selfplayeTable.paoCount = chu_player.paoCount + selfplayeTable.hu_xi = chu_player.hu_xi + local player = membe_deep_clone(selfplayeTable) + local mark_ting= {} + for i=1,#DataManager.CurrenRoom.self_player.handcard_list do + local card = DataManager.CurrenRoom.self_player.handcard_list[i] + list_remove(player.handcard_list, card) + local _player = membe_deep_clone(player) + local tingList = CardCheck.tingPai(_player,DataManager.CurrenRoom) + local isKan = false + for j=1,#player.fz_list do + if card == player.fz_list[j].card and player.fz_list[j].type == RB_FZTypeFLS.Kan then + isKan =true + end + end + if #tingList > 0 and isKan == false then + + mark_ting[#mark_ting+1] = card + end + table.insert(player.handcard_list, card) + table.sort( player.handcard_list, ViewUtil.HandCardSort) + end--]] + -- print("ChuPaiTiShi",#mark_ting,vardump(player)) + + + ---------------- + + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self._view :GetController("chupai").selectedIndex =1 + --[[if #mark_ting>0 then + for i=1,#mark_ting do + for k=1,#self.card_list do + local card_view= self.card_list[k] + if card_view.card_item == mark_ting[i] then + card_view.btn_card:GetController("mark_ting").selectedIndex = 1 + end + end + end + end--]] + + ---------------------- + if DataManager.CurrenRoom.self_player.tingPaiList and #DataManager.CurrenRoom.self_player.tingPaiList>0 then + for k=1,#self.card_list do + local card_view= self.card_list[k] + local isTing,curIndex=CheckDictionaryFromContent(card_view.card_item,DataManager.CurrenRoom.self_player.tingPaiList) + if isTing then + --printlog("听牌提示===》》》",curIndex) + --pt(DataManager.CurrenRoom.self_player.tingPaiList[curIndex]) + local value=#DataManager.CurrenRoom.self_player.tingPaiList[curIndex].value + if tonumber(value)>0 then + card_view.btn_card:GetController("mark_ting").selectedIndex = 1 + end + + end + + end + + end + + + + + else + self._view :GetController("chupai").selectedIndex =0 + for k=1,#self.card_list do + local card_view= self.card_list[k] + card_view.btn_card:GetController("mark_ting").selectedIndex = 0 + + end + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/fulushou/Protocol.lua b/lua_probject/extend_project/extend/zipai/fulushou/Protocol.lua new file mode 100644 index 00000000..79c9308a --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/Protocol.lua @@ -0,0 +1,56 @@ +local Protocol = { + + + -- 出牌 + GAME_DIS_CARD = "611", + -- 提示选择行为 + GAME_ACTION = "612", + + -- 通知服务器手牌队形改变 + --GAME_CHANGE_CARD = "613", + -- 通知服务器牌字体改变 + --GAME_CHANGE_TYPEfACE = "615", + + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 结算 + GAME_EVT_RESULT1 = "817", + + -- 弃牌 + GAME_EVT_QIPAI = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + --第二十一张牌 + GAME_EVT_ADD_CARD = "821", + + GAME_EVT_Send_Piao = "1015", + GAME_EVT_Piao_Tip = "2031", + GAME_EVT_Piao_Action = "2032", + + GAME_XIPAI = "20836", + GAME_EVENT_XIPAI = "20837", + GAME_EVENT_NOTIFY_XIPAI = "20838", + +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/fulushou/RunBeard_GameEvent.lua b/lua_probject/extend_project/extend/zipai/fulushou/RunBeard_GameEvent.lua new file mode 100644 index 00000000..4bf7850e --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/RunBeard_GameEvent.lua @@ -0,0 +1,46 @@ + +local RunBeard_GameEvent = { + -- 换座 + + -- 发牌 + SendCards = "SendCards", + + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + + EventDicelCard ="EventDicelCard", + OnEventTake = "OnEventTake", + + OnEcentRecond = "OnEcentRecond", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + + GetCard = "GetCard", + + ShowremainCard = "ShowremainCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + QiCard = "QiCard", + AddCard = "AddCard", + + OnPiaoTips="OnPiaoTips", + OnPiaoAction="OnPiaoAction", + EventXiPai="EventXiPai", + + TuoGuanTipsEvt="TuoGuanTipsEvt", + SanTingTipsEvt="SanTingTipsEvt", + +} +return RunBeard_GameEvent diff --git a/lua_probject/extend_project/extend/zipai/fulushou/RunBeard_ResultView.lua b/lua_probject/extend_project/extend/zipai/fulushou/RunBeard_ResultView.lua new file mode 100644 index 00000000..d5b16fa4 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/RunBeard_ResultView.lua @@ -0,0 +1,754 @@ +require('Game.View.ResultView') +local PendulumRule = import('.main.PendulumRule') +local RunBeard_ResultView = {} + +local M = RunBeard_ResultView + +function RunBeard_ResultView.new(blur_view, index) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self.class = 'RunBeard_ResultView' + self._currenIndex = 0 + if index ~= 1 then + self._blur_view = blur_view + end + self._close_zone = false + + self:init('ui://Extend_Poker_FuLuShou/clearing') + self.xiPaiCtr=self._view:GetController("xipai") + return self +end + +function M:init(url) + ResultView.init(self, url) + local btn_share = self._view:GetChild('btn_share') + btn_share.onClick:Set( + function() + ShareScreenShot() + end + ) +end + +function M:InitData(over, room, result, total_result, callback) + local _overCtr = self._view:GetController('over') + local btn_confirm = self._view:GetChild('btn_confirm') + local btn_result = self._view:GetChild('btn_showResult') + local _btnCtr = self._view:GetController('button') + local _sdkCtr = self._view:GetController('sdk') + local _icon = self._view:GetChild('win_base') + local btn_close = self._view:GetChild('btn_close') + self._view:GetChild('tex_roomnum').text = room.room_id + self._view:GetChild('tex_data').text = os.date('%Y-%m-%d %H:%M', os.time()) + + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig and round>1 then + self.xiPaiCtr.selectedIndex=1 + else + self.xiPaiCtr.selectedIndex=0 + end + + local xipai=self._view:GetChild("btn_xipai") + xipai.touchable=true + xipai.onClick:Add(function() + local xiPaiCallBack=function () + xipai.touchable=false + self.xiPaiCtr.selectedIndex=0 + ViewUtil.ErrorTip(1000000,"申请洗牌成功") + end + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendXiPaiAction(xiPaiCallBack) + end) + if result and result.xipai_score then + --xipai.text="洗牌 积分x"..result.xipai_score + end + + + + if result ~= nil and result.liuju == true then + _icon.icon = 'ui://Main_RunBeardMaJiang/liuju' + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + _overCtr.selectedIndex = 2 + + if over ~= 1 then + + + + btn_confirm.onClick:Add( + function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:Close() + + if callback then + callback() + end + end + ) + self:AddClearItem(room, result, nil, over) + return + else + self.xiPaiCtr.selectedIndex=0 + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add( + function() + _overCtr.selectedIndex = 3 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + end + ) + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, result, total_result.info_list, over) + end + end + + if over == 0 and result.liuju == false then + _icon.icon = 'ui://Main_RunBeardMaJiang/jiesuan' + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + _overCtr.selectedIndex = 0 + btn_confirm.onClick:Add( + function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:Close() + + if callback then + callback() + end + end + ) + self:AddClearItem(room, result, nil, over) + elseif over == 1 and result.liuju == false then + _icon.icon = 'ui://Main_RunBeardMaJiang/jiesuan' + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + _overCtr.selectedIndex = 0 + btn_result.onClick:Add( + function() + _overCtr.selectedIndex = 3 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + end + ) + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, result, total_result.info_list, over) + else + if result ~= nil then + if result.liuju == false then + _icon.icon = 'ui://Main_RunBeardMaJiang/jiesuan' + over = 2 + _overCtr.selectedIndex = 3 + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, nil, total_result.info_list, over) + end + else + self.xiPaiCtr.selectedIndex=0 + _icon.icon = 'ui://Main_RunBeardMaJiang/jiesuan' + over = 2 + _overCtr.selectedIndex = 3 + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, nil, total_result.info_list, over) + end + end +end + +function M:AddClearItem(room, data, total_data, over) + local n = over + 1 + local list_view1 = self._view:GetChild('player_list') + local list_view2 = self._view:GetChild('player_list_2') + + if data ~= nil and data.liuju == true then + self:FillLiuJuItemData(room, data) + if over == 1 then + self:FillItemData2(room, total_data, list_view2) + end + else + if 0 == over or 1 == over and data.liuju == false then + self:FillItemData(room, data, list_view1) + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end + end +end + +function M:GetPos(room, seat) + return ViewUtil.GetPos(room.self_player.seat, seat, room.room_config.people_num) +end +function M:FillLiuJuItemData(room, data) + local qipai_list = self._view:GetChild('qipai_listl') + local _dipaiC = self._view:GetController('qipai') + qipai_list:RemoveChildrenToPool() + if data.throw_card ~= nil and #data.throw_card > 0 then + _dipaiC.selectedIndex = 1 + local hand_card = PendulumRule.GetHandCard(data.throw_card, 3) + --[[for k = 1, #hand_card do + local cards = qipai_list:AddItemFromPool() + for j = 1, #hand_card[k] do + cards:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeardMaJiang/202_', hand_card[k][j]) + end + end--]] + + --[[for k = 1, #hand_card do + for i = 1, #hand_card[k] do + for j = 1, #hand_card[k][i] do + local item = card_list:AddItemFromPool() + if hand_card[k][i][j] then + item:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeardMaJiang/202_', hand_card[k][i][j]) + end + + end + end + + end--]] + + + else + _dipaiC.selectedIndex = 0 + end + for i = 1, #data.info_list do + if data.info_list[i].seat ~= room.self_player.seat and #data.info_list[i].hand_card > 0 then + local card_list + if #data.info_list == 2 then + card_list = self._view:GetChild('card_list_2') + else + if self:GetPos(room, data.info_list[i].seat) == 2 then + card_list = self._view:GetChild('card_list_1') + else + card_list = self._view:GetChild('card_list_3') + end + end + + card_list:RemoveChildrenToPool() + for k = 1, #data.info_list[i].opCardList do + local fztype = data.info_list[i].opCardList[k].type + if fztype == RB_FZTypeFLS.Kan then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeardMaJiang/202_', data.info_list[i].opCardList[k].card1) + end + end + end + local hand_card = PendulumRule.GetHandCard(data.info_list[i].hand_card, 3) + --pt(hand_card) + --[[for k = 1, #hand_card do + for i = 1, #hand_card[k] do + for j = 1, #hand_card[k][i] do + local item = card_list:AddItemFromPool() + if hand_card[k][i][j] then + item:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeardMaJiang/202_', hand_card[k][i][j]) + end + + end + end + + end--]] + end + end +end + + +function M:FillItemData(room, data, item) + local dipai_list = self._view:GetChild('dipai_list') + dipai_list:RemoveChildren(0, -1, true) + if data.left_card ~= nil and #data.left_card > 0 then + for i = 1, #data.left_card do + local dipais = UIPackage.CreateObjectFromURL('ui://Main_RunBeardMaJiang/Qipai') + dipais:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeardMaJiang/202_', data.left_card[i]) + dipai_list:AddChild(dipais) + end + end + local qipai_list = self._view:GetChild('qipai_list') + local _dipaiC = self._view:GetController('qipai') + qipai_list:RemoveChildrenToPool() + if data.throw_card ~= nil and #data.throw_card > 0 then + _dipaiC.selectedIndex = 1 + local hand_card = PendulumRule.GetHandCard(data.throw_card, 3) + for k = 1, #hand_card do + local cards = qipai_list:AddItemFromPool() + for j = 1, #hand_card[k] do + cards:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeardMaJiang/202_', hand_card[k][j]) + end + end + else + _dipaiC.selectedIndex = 0 + end + local info_list = data.info_list + local Yes_win = false + local win_data = {} + for i = 1, #info_list do + if info_list[i].is_win == true then + Yes_win = true + win_data = info_list[i] + end + end + --printlog("win_data===>>>") + --pt(win_data) + if win_data.seat == room.self_player.seat then + self._view:GetChild('show_win').visible = true + self._view:GetChild('show_low').visible = false + else + self._view:GetChild('show_win').visible = false + self._view:GetChild('show_low').visible = true + end + + if Yes_win == true then + local isWin_Card = true + local p = room:GetPlayerBySeat(win_data.seat) + if p.self_user.account_id == room.owner_id then + self._view:GetController('owner').selectedIndex = 1 + end + if p.seat == room.banker_seat then + self._view:GetController('bank').selectedIndex = 1 + end + self._view:GetChild('WinerName').text = p.self_user.nick_name + --self._view:GetChild('chongtunshu').text = '充囤:' .. room.room_config.tun .. ' 囤' + --self._view:GetChild('huxi').text ='' --'胡息:' .. win_data.hu_xi + --self._view:GetChild('tunshu').text = '基础囤数:' .. win_data.tun + --self._view:GetChild('zongtunshu').text = '总囤数:' .. win_data.total_tun + if win_data.round_score >= 0 then + self._view:GetChild('score').text = '游戏分:+' .. win_data.round_score + self._view:GetChild('score').grayed = false + else + self._view:GetChild('score').text = '游戏分:' .. win_data.round_score + self._view:GetChild('score').grayed = true + end + local hp_info = win_data.hp_info + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值 + self._view:GetChild('tili_score').visible = true + self._view:GetChild('tili_title').visible = true + if (round_actual_hp > 0) then + self._view:GetChild('tili_score').text = '积分:+' .. round_actual_hp + self._view:GetChild('tili_score').grayed = false + else + self._view:GetChild('tili_score').text = '积分:' .. round_actual_hp + self._view:GetChild('tili_score').grayed = true + end + end + + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限 + if (isupper_limit) then + self._view:GetChild('yidashangxian').text = '已达上限' + else + self._view:GetChild('yidashangxian').text = '' + end + end + + local btn_head = self._view:GetChild('btn_head') + ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) + local fullname_list = self._view:GetChild('fullname_list') + fullname_list:RemoveChildren(0, -1, true) + if win_data.mingtang ~= nil and #win_data.mingtang > 0 then + for i = 1, #win_data.mingtang do + local dipais = UIPackage.CreateObjectFromURL('ui://Extend_Poker_FuLuShou/FullName') + dipais:GetChild('n0').icon = 'ui://Extend_Poker_FuLuShou/hu_' .. win_data.mingtang[i].mingtang + --[[if win_data.mingtang[i].type == 1 and win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 番' + elseif win_data.mingtang[i].type == 2 and win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 囤' + elseif win_data.mingtang[i].type == 3 and win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 倍' + end--]] + if win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. '胡息' + end + fullname_list:AddChild(dipais) + end + end + local card_list = self._view:GetChild('card_list') + card_list:RemoveChildrenToPool() + + pt(win_data.opCardList) + for i = 1, #win_data.opCardList do + local fztype = win_data.opCardList[i].type + if fztype == RB_FZTypeFLS.Chi then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '吃' + cards:GetChild('card_huxi').text ="" --win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeardMaJiang/201_', win_data.opCardList[i].opcard[1]) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeardMaJiang/201_', win_data.opCardList[i].opcard[2]) + cards:GetChild('card_3').icon = + self:getCardItem('ui://Main_RunBeardMaJiang/201_', win_data.opCardList[i].opcard[3]) + + elseif fztype == RB_FZTypeFLS.Peng then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '碰' + cards:GetChild('card_huxi').text ="" --win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeardMaJiang/201_', win_data.opCardList[i].opcard[j]) + end + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + elseif fztype == RB_FZTypeFLS.Zhao or fztype == RB_FZTypeFLS.SZhao then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '招' + cards:GetChild('card_huxi').text = ''--win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 2 + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeardMaJiang/201_', win_data.opCardList[i].opcard[j]) + end + elseif fztype == RB_FZTypeFLS.Gang or fztype == RB_FZTypeFLS.SGang then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '杠' + cards:GetChild('card_huxi').text = ''--win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 2 + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeardMaJiang/201_', win_data.opCardList[i].opcard[j]) + end + end + end + + + + if #win_data.hand_card > 0 then + local hand_card = win_data.hand_card + if hand_card then + local sortHandcard=PendulumRule.GetHandCard(win_data.hand_card) + --printlog("1111111111111111111111111111") + --pt(sortHandcard) + + for i = 1, #sortHandcard do + local pokerListNum = 0 + cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '散' + cards:GetChild('card_huxi').text ='' + cards:GetController('c1').selectedIndex = 2 + + for j = 1, #sortHandcard[i] do + local indexIcon=cards:GetChild('card_' .. (j)) + cards:GetController('item').selectedIndex=j-1 + local countNum=cards:GetController('num'..j) + local currentCardNum=#sortHandcard[i][j] + countNum.selectedIndex=currentCardNum-1 + local card_code=0 + card_code = sortHandcard[i][j][1] + indexIcon.icon = + self:getCardItem('ui://Main_RunBeardMaJiang/201_', card_code) + + if card_code == win_data.win_card and isWin_Card == true then + isWin_Card = false + --cards:GetController('hu').selectedIndex = j + end + + end + + + + end + + + + + end + + + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '胡' + cards:GetChild('card_huxi').text ='' + cards:GetController('c1').selectedIndex = 2 + cards:GetChild('card_' .. (1)).icon = + self:getCardItem('ui://Main_RunBeardMaJiang/201_', win_data.win_card) + cards:GetController('hu').selectedIndex =1 + end + + + + end + + item:RemoveChildrenToPool() + for i = 1, #info_list do + if info_list[i].is_win == false then + local player = item:AddItemFromPool() + local p = room:GetPlayerBySeat(info_list[i].seat) + if p.self_user.account_id == room.owner_id then + player:GetController('owner').selectedIndex = 1 + end + if p.seat == room.banker_seat then + player:GetController('bank').selectedIndex = 1 + end + local btn_head = player:GetChild('btn_head') + ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) + player:GetChild('playerName').text = p.self_user.nick_name + if info_list[i].round_score >= 0 then + player:GetChild('score').text = '+' .. info_list[i].round_score + player:GetChild('score').grayed = false + else + player:GetChild('score').text = info_list[i].round_score + player:GetChild('score').grayed = true + end + local hp_info = info_list[i].hp_info + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值 + player:GetChild('tili_score').visible = true + player:GetChild('tili_title').visible = true + if (round_actual_hp > 0) then + player:GetChild('tili_score').text = '+' .. round_actual_hp + player:GetChild('tili_score').grayed = false + else + player:GetChild('tili_score').text = '' .. round_actual_hp + player:GetChild('tili_score').grayed = true + end + end + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限 + if (isupper_limit) then + player:GetChild('yidashangxian').text = '已达上限' + else + player:GetChild('yidashangxian').text = '' + end + end + local card_list = player:GetChild('card_list') + card_list:RemoveChildrenToPool() + for k = 1, #info_list[i].opCardList do + local fztype = info_list[i].opCardList[k].type + if fztype == RB_FZTypeFLS.Chi then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeardMaJiang/202_', info_list[i].opCardList[k].opcard[1]) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeardMaJiang/202_', info_list[i].opCardList[k].opcard[2]) + cards:GetChild('card_3').icon = + self:getCardItem('ui://Main_RunBeardMaJiang/202_', info_list[i].opCardList[k].opcard[3]) + elseif fztype == RB_FZTypeFLS.Peng then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeardMaJiang/202_', info_list[i].opCardList[k].opcard[j]) + end + elseif ftype == RB_FZTypeFLS.Gang or ftype == RB_FZTypeFLS.SGang or ftype == RB_FZTypeFLS.Zhao or ftype == RB_FZTypeFLS.SZhao then + local cards = card_list:AddItemFromPool() + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeardMaJiang/202_', info_list[i].opCardList[k].opcard[j]) + end + --[[elseif fztype == RB_FZTypeFLS.Ti then + local cards = card_list:AddItemFromPool() + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeardMaJiang/202_', info_list[i].opCardList[k].opcard[j]) + end--]] + end + end + --[[if #info_list[i].hand_card > 0 then + local hand_card = PendulumRule.GetHandCard(info_list[i].hand_card) + for k = 1, #hand_card do + local cards = card_list:AddItemFromPool() + for j = 1, #hand_card[k] do + cards:GetChild('card_' .. (j)).icon = + self:getCardItem('ui://Main_RunBeardMaJiang/202_', hand_card[k][j]) + end + end + end--]] + + + if #info_list[i].hand_card > 0 then + local hand_card = info_list[i].hand_card + if hand_card then + local index=1 + local cards=nil + for i = 1, #hand_card do + index=i%3 + if index ==1 then + cards = card_list:AddItemFromPool() + end + + if i%3==0 then + index=3 + end + + cards:GetChild('card_' .. (index)).icon = + self:getCardItem('ui://Main_RunBeardMaJiang/202_', hand_card[i]) + + + end + + end + + end + end + end +end + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + local p = room:GetPlayerBySeat(data[i].seat) + player_list[i].id = user.account_id + local total_score = data[i].total_score + player_list[i].hp_info = data[i].hp_info + player_list[i].score = total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + local entrust = data[i].entrust + if entrust == nil then + entrust = false + end + player_list[i].entrust = entrust + player_list[i].param = {} + local wcount = 0 + if (data[i].win_count ~= nil) then + wcount = data[i].win_count + end + local hxcount = 0 + if (data[i].total_huxi ~= nil) then + hxcount = data[i].total_huxi + end + player_list[i].param[1] = {} + player_list[i].param[1].key = '胡牌次数:' + player_list[i].param[1].value = tostring(wcount) + player_list[i].param[2] = {} + -- player_list[i].param[2].key = '胡息总数:' + player_list[i].param[2].value = tostring(hxcount) + end + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + self:SetGSListlineGap(5) + self:InitBigResult(room, 26) + DataManager.CurrenRoom = nil + -- list:RemoveChildrenToPool() + -- for i =1, #data do + -- local total_score = room:GetTotalScore(data[i].total_score) + -- local item = list:AddItemFromPool() + -- local p = room:GetPlayerBySeat(data[i].seat) + -- if p.self_user.account_id == room.owner_id then + -- item:GetController("owner").selectedIndex = 1 + -- end + + -- local btn_head = item:GetChild("btn_head") + -- ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) + -- item:GetChild("win_count").text = "胡牌次数:"..data[i].win_count.."次" + -- item:GetChild("total_huxi").text = "胡息总数:"..data[i].total_huxi + -- --点赞 + -- self:Click_zan(item, p.self_user.account_id) + + -- item:GetChild("name").text = p.self_user.nick_name + + -- local hp_info = data[i].hp_info + -- if(hp_info ~=nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + -- -- --体力值 + -- -- local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值 + -- local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限 + -- if(isupper_limit)then + -- item:GetChild("yidashangxian").text = "已达上限" + -- else + -- item:GetChild("yidashangxian").text = "" + -- end + -- end + -- local x = room:GetOriginScore(total_score) + -- if total_score >= 0 then + -- item:GetChild("score").text = "+"..x + -- item:GetChild("score").grayed = false + -- else + -- item:GetChild("score").text = x + -- item:GetChild("score").grayed = true + -- end + -- if room.hpOnOff == 1 and room.score_times ~= 1 or room:checkHpNonnegative() then + -- item:GetController("bei") .selectedIndex=1 + -- item:GetChild("sss").text = room.score_times + -- if(hp_info ~= nil)then + -- local round_actual_hp = d2ad(hp_info.total_hp) --// 本局实际输赢体力值 + -- total_score = round_actual_hp + -- end + -- if total_score >= 0 then + -- item:GetChild("score1").text = "+"..total_score + -- item:GetChild("score1").grayed = false + -- else + -- item:GetChild("score1").text = total_score + -- item:GetChild("score1").grayed = true + -- end + -- end + -- if #data ==3 then + -- if i ==1 then + -- if total_score >data[2].total_score and total_score >data[3].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- elseif i ==2 then + -- if total_score >data[1].total_score and total_score >data[3].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- elseif i ==3 then + -- if total_score >data[2].total_score and total_score >data[1].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- end + -- else + -- if i ==1 then + -- if total_score >data[2].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- elseif i ==2 then + -- if total_score >data[1].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- end + + -- end + -- end + + -- DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild('btn_head') + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= '' then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end +function M:getCardItem(card_1, card_2) + local _room = DataManager.CurrenRoom + if _room ~= nil and _room.change_card_display ~= nil then + return card_1 .. _room.change_card_display .. card_2 + else + return card_1 .. '1_' .. card_2 + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/fulushou/SanPaiInfoView.lua b/lua_probject/extend_project/extend/zipai/fulushou/SanPaiInfoView.lua new file mode 100644 index 00000000..2b91a117 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/SanPaiInfoView.lua @@ -0,0 +1,44 @@ +local SanPaiInfoView = {} + +local M = SanPaiInfoView + +function SanPaiInfoView.new(callBack) + setmetatable(M, {__index = BaseView}) + local self = setmetatable({}, {__index = M}) + self.class = "SanPaiInfoView" + self.callBack=callBack + self:init("ui://Main_RunBeardMaJiang/Win_SanTingView") + return self +end + +function M:init(url) + BaseWindow.init(self,url) + + self._view:GetChild("tex_message").text="是否散听?" + self._view:GetChild("btn_ok").onClick:Set( + function () + if self.callBack then + self.callBack(true) + end + self:Destroy() + end + ) + + + self._view:GetChild("btn_close").onClick:Set( + function () + if self.callBack then + self.callBack(false) + end + self:Destroy() + end + ) + + self:Show() + +end + + + + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/fulushou/main/CardCheck.lua b/lua_probject/extend_project/extend/zipai/fulushou/main/CardCheck.lua new file mode 100644 index 00000000..9b181d02 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/main/CardCheck.lua @@ -0,0 +1,1111 @@ +-- 检测牌是否存在 +local function checkCard(eventCard, cardList, num) + if num == nil then + num = 1 + end + local result = 0 + for i = 1, #cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if (result == num) then + return true + end + end + end + return false +end + +local function checkCard1(eventCard, cardList, num) + if num == nil then + num = 1 + end + local result = 0 + + for k,v in pairs(cardList) do + if k==eventCard then + result = v + if result==num then + return true + end + end + end + + return false +end + +local function GetCheckCardNum(eventCard, cardList) + local result = 0 + + for k,v in pairs(cardList) do + if k==eventCard then + result = v + return v + end + end + + return result +end + + + + +-- 移除指定数量的牌 +local function removeCard(cardList, card, count) + for i = 1, count do + list_remove(cardList, card) + end +end + +local function checkCardAndRomve(eventCard, cardList, num) + if (checkCard(eventCard, cardList, num)) then + removeCard(cardList, eventCard, num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard, cardList) + local result = 0 + for i = 1, #cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local M = { + cardList = nil, + stack = nil, + stackHuxi = nil, + cbCardMap=nil, + ting_pai = true +} + +function M:push(cardGroup) + self.stack[#self.stack + 1] = cardGroup +end +function M:pushhuxi(cardGroup) + self.stackHuxi[#self.stackHuxi + 1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack, #self.stack) + for _, card in ipairs(cardGroup) do + self.cardList[#self.cardList + 1] = card + end + table.sort(self.cardList) +end + + + + +function M:tryWin(player,room) + return self:checkWinOpList(player,player.fz_list,room) +end + + + +function M:checkWinOpList(player,opcardList,room) + local isHu=self:AnalyseChiHuCard(opcardList,room.room_config.config) + return isHu +end + + +function M:AnalyseChiHuCard(opcardList,roomConfig) + return self:AnalyseChiHuCardEx(opcardList,roomConfig) + +end + +function M:AnalyseChiHuCardEx(opcardList,roomConfig) + local tempCardList=membe_deep_clone(self.cbCardMap) + + --//变量定义 + -- List tagAnalyseItemList = new ArrayList(); + -- List wChiHuKind = new ArrayList(); + local tagAnalyseItemList={} + local wChiHuKind={} + self:AnalyseCard(tempCardList,opcardList,tagAnalyseItemList,roomConfig) + local huxi=0 + for i=1,#tagAnalyseItemList do + huxi=huxi+tagAnalyseItemList[i].huxi + end + + printlog("胡息数为=>>>",huxi) + pt(tagAnalyseItemList) + if huxi >=11 then + return true + else + return false + end + +end + + +function M:AnalyseCard(tempCardList,opCards,tagAnalyseItemList,config) + local cbCardCount=0 + for k,v in pairs(tempCardList) do + cbCardCount=cbCardCount+v + end + + if cbCardCount<1 or cbCardCount>19 then return false end + + + --List tagKindList = new ArrayList(); + local tagKindList={} + + + + --while false do + repeat + local cbLessKindItem = math.floor((cbCardCount - 1) / 3) + if cbLessKindItem+#opCards ~=6 then + break + end + + --//单吊判断 + if cbLessKindItem==0 then + if not ((cbCardCount==1) and #opCards==6) then + return false + end + + for k,v in pairs(tempCardList) do + if v==1 then + return AnalyseCardFuLuShou(cbLessKindItem,nil,k,opCards,tagAnalyseItemList,config) + end + end + + return false + + end + + --//拆分分析 + if cbCardCount>=3 then + for k,v in pairs(tempCardList) do + if v>=2 and checkCard1( math.floor(k/100)*100+4,tempCardList,1) then + local kindItem={} + kindItem.type=RB_FZTypeFLS.Peng + kindItem.card = k + kindItem.cbCardList={} + kindItem.cbCardList[1] = k + kindItem.cbCardList[2] = k + kindItem.cbCardList[3] = math.floor(k / 100) * 100 + 4 + table.insert(tagKindList,kindItem) + end + + if v>=3 then + local kindItem={} + kindItem.type=RB_FZTypeFLS.Peng + kindItem.card = k + kindItem.cbCardList={} + kindItem.cbCardList[1] = k + kindItem.cbCardList[2] = k + kindItem.cbCardList[3] = k + table.insert(tagKindList,kindItem) + end + + --//连牌判断 + if k%100>=1 and k%100<4 and v>0 then + for i=1,v do + if cardNum(k+1,self.cardList)>=i and cardNum(k+2,self.cardList)>=i and (k+1)%100~=4 and (k+2)%100~=4 then + local kindItem={} + kindItem.type=RB_FZTypeFLS.Chi + kindItem.card = k + kindItem.cbCardList={} + kindItem.cbCardList[1] = k + kindItem.cbCardList[2] = k+1 + kindItem.cbCardList[3] = k +2 + table.insert(tagKindList,kindItem) + end + + if cardNum(k+1,self.cardList)>=i and (k+1)%100~=4 and cardNum( math.floor(k/100)*100+4,self.cardList)>=i then + local kindItem={} + kindItem.type=RB_FZTypeFLS.Chi + kindItem.card = k + kindItem.cbCardList={} + kindItem.cbCardList[1] = k + kindItem.cbCardList[2] = k+1 + kindItem.cbCardList[3] = math.floor(k/100) * 100 + 4 + table.insert(tagKindList,kindItem) + end + + + if cardNum(k+2,self.cardList)>=i and (k+2)%100~=4 and cardNum( math.floor(k/100)*100+4,self.cardList)>=i then + local kindItem={} + kindItem.type=RB_FZTypeFLS.Chi + kindItem.card = k + kindItem.cbCardList={} + kindItem.cbCardList[1] = k + kindItem.cbCardList[2] = k+1 + kindItem.cbCardList[3] = math.floor(k/100) * 100 + 4 + table.insert(tagKindList,kindItem) + end + + + end + + + + end + + + + + end + + end + + + --//组合分析 + + if #tagKindList>=cbLessKindItem then + local cbIndex={} + for i=1,6 do + table.insert(cbIndex,i) + end + + --TagKindItem[] pKindItem = new TagKindItem[6]; + local pKindItem={} + + --local count = 0 + + repeat + --while true do + local cbCardMap_temp=membe_deep_clone(tempCardList) + for i=1,cbLessKindItem do + pKindItem[i]=tagKindList[i] + end + --//数量判断 + local bEnoughCard = true + for i=1,cbLessKindItem * 3 do + local num1=math.floor((i-1)/3)+1 + local num2=i % 3 + if num==0 then + num2=3 + end + local cbCardIndex=pKindItem[num1].cbCardList[num2] + if GetCheckCardNum(cbCardIndex,cbCardMap_temp)<=0 then + bEnoughCard = false + break + else + if cbCardMap_temp[cbCardIndex] then + cbCardMap_temp[cbCardIndex]=cbCardMap_temp[cbCardIndex]-1 + end + + end + + end + + + --//胡牌判断 + + if bEnoughCard==true then + local cbCardEye = 0 + for k,v in pairs(cbCardMap_temp) do + if v==1 then + cbCardEye=k + break + end + end + + if cbCardEye ~= 0 then + local result = AnalyseCardFuLuShou(cbLessKindItem, pKindItem, cbCardEye, opCards, tagAnalyseItemList, config) + if result then + return true + end + end + + end + + + --//设置索引 + if cbIndex[cbLessKindItem]==#tagKindList then + local tempi=cbLessKindItem + for i=cbLessKindItem,2,-1 do + tempi=i-1 + if (cbIndex[i-1]+1)~=cbIndex[i] then + local cbNewIndex = cbIndex[i - 1] + for j=i-1,cbLessKindItem do + cbIndex[j]=cbNewIndex+j-i+2 + end + break + + end + + + + end + + if tempi==1 then break end + + else + cbIndex[cbLessKindItem]=cbIndex[cbLessKindItem]+1 + end + + + + until(false) + --end + ---- + + + end + + + if #tagAnalyseItemList>0 then break end + + + --end + until(true) + + tagKindList={} + + + repeat + --while false do + + local cbLessKindItem = math.floor((cbCardCount - 4) / 3) + if cbLessKindItem+#opCards ~=5 then + break + end + + + --//单吊判断 + if cbLessKindItem==0 then + if not ((cbCardCount==4) and #opCards==5 )then + return false + end + + --//牌眼判断 + -- ArrayList eyeList = new ArrayList(); + -- ArrayList eyeCardList = new ArrayList(); + local eyeList={} + local eyeCardList={} + + for k,v in pairs(tempCardList) do + if v>0 then + for i=1,v do + table.insert(eyeCardList,k) + end + + end + end + + if #eyeCardList~=4 then return false end + + if math.floor(eyeCardList[1]/100)== math.floor(eyeCardList[2]/100) and math.floor(eyeCardList[3]/100)== math.floor(eyeCardList[4]/100) then + local card1=eyeCardList[1] + local card2=eyeCardList[2] + local card3=eyeCardList[3] + local card4=eyeCardList[4] + local result=AnalyseCardFuLuShouJiang(cbLessKindItem, nil, card1, card2, card3, card4, opCards, tagAnalyseItemList, config) + if result then + return true + end + end + + + if math.floor(eyeCardList[1]/100)== math.floor(eyeCardList[3]/100) and math.floor(eyeCardList[2]/100)== math.floor(eyeCardList[4]/100) then + local card1=eyeCardList[1] + local card2=eyeCardList[3] + local card3=eyeCardList[2] + local card4=eyeCardList[4] + local result=AnalyseCardFuLuShouJiang(cbLessKindItem, nil, card1, card2, card3, card4, opCards, tagAnalyseItemList, config) + if result then + return true + end + end + + if math.floor(eyeCardList[1]/100)== math.floor(eyeCardList[4]/100) and math.floor(eyeCardList[2]/100)== math.floor(eyeCardList[3]/100) then + local card1=eyeCardList[1] + local card2=eyeCardList[4] + local card3=eyeCardList[3] + local card4=eyeCardList[2] + local result=AnalyseCardFuLuShouJiang(cbLessKindItem, nil, card1, card2, card3, card4, opCards, tagAnalyseItemList, config) + if result then + return true + end + end + + + if #tagAnalyseItemList>0 then + return true + else + return false + end + + + end + + + --//拆分分析 + if cbCardCount >= 3 then + for k,v in pairs(tempCardList) do + if v>=2 and cardNum( math.floor(k / 100) * 100 + 4,self.cardList)==1 then + local kindItem={} + kindItem.type=RB_FZTypeFLS.Peng + kindItem.card = k + kindItem.cbCardList={} + kindItem.cbCardList[1] = k + kindItem.cbCardList[2] = k + kindItem.cbCardList[3] = math.floor(k / 100) * 100 + 4 + table.insert(tagKindList,kindItem) + end + + if v>=3 then + local kindItem={} + kindItem.type=RB_FZTypeFLS.Peng + kindItem.card = k + kindItem.cbCardList={} + kindItem.cbCardList[1] = k + kindItem.cbCardList[2] = k + kindItem.cbCardList[3] = k + table.insert(tagKindList,kindItem) + end + + --//连牌判断 + if k%100>=1 and k%100<=4 and v>0 then + for i=1,v do + if cardNum(k+1,self.cardList)>=i and cardNum(k+2,self.cardList)>=i and (k+1)%100~=4 and (k+2)%100~=4 then + local kindItem={} + kindItem.type=RB_FZTypeFLS.Chi + kindItem.card = k + kindItem.cbCardList={} + kindItem.cbCardList[1] = k + kindItem.cbCardList[2] = k+1 + kindItem.cbCardList[3] = k+2 + table.insert(tagKindList,kindItem) + end + + if cardNum(k+1,self.cardList)>=i and cardNum(math.floor(k/100)*100+4,self.cardList)>=i and (k+1)%100~=4 then + local kindItem={} + kindItem.type=RB_FZTypeFLS.Chi + kindItem.card = k + kindItem.cbCardList={} + kindItem.cbCardList[1] = k + kindItem.cbCardList[2] = k+1 + kindItem.cbCardList[3] = math.floor(k/100)*100+4 + table.insert(tagKindList,kindItem) + end + + if cardNum(k+2,self.cardList)>=i and cardNum(math.floor(k/100)*100+4,self.cardList)>=i and (k+2)%100~=4 then + local kindItem={} + kindItem.type=RB_FZTypeFLS.Chi + kindItem.card = k + kindItem.cbCardList={} + kindItem.cbCardList[1] = k + kindItem.cbCardList[2] = math.floor(k/100)*100+4 + kindItem.cbCardList[3] = k+2 + table.insert(tagKindList,kindItem) + end + + + + end + + end + + end + + + end + + + --//组合分析 + if #tagKindList>=cbLessKindItem then + local cbIndex={} + for i=1,5 do + table.insert(cbIndex,i-1) + end + + --TagKindItem[] pKindItem = new TagKindItem[6]; + local pKindItem={} + + repeat + --while true do + local cbCardMap_temp=membe_deep_clone(tempCardList) + for i=1,cbLessKindItem do + pKindItem[i]=tagKindList[i] + end + --//数量判断 + local bEnoughCard = true + for i=1,cbLessKindItem * 3 do + local num1=math.floor((i-1)/3)+1 + local num2=i % 3 + if num==0 then + num2=3 + end + local cbCardIndex=pKindItem[num1].cbCardList[num2] + if GetCheckCardNum(cbCardIndex,cbCardMap_temp)<=0 then + bEnoughCard = false + break + else + if cbCardMap_temp[cbCardIndex] then + cbCardMap_temp[cbCardIndex]=cbCardMap_temp[cbCardIndex]-1 + end + + end + + end + + + + --//胡牌判断 + + if bEnoughCard==true then + --//牌眼判断 + -- ArrayList eyeList = new ArrayList(); + -- ArrayList eyeCardList = new ArrayList(); + local eyeList={} + local eyeCardList={} + + for k,v in pairs(tempCardList) do + if v>0 then + for i=1,v do + table.insert(eyeCardList,k) + end + + end + end + + if #eyeCardList~=4 then return false end + + if math.floor(eyeCardList[1]/100)==math.floor(eyeCardList[2]/100) and math.floor(eyeCardList[3]/100)==math.floor(eyeCardList[4]/100) then + local card1=eyeCardList[1] + local card2=eyeCardList[2] + local card3=eyeCardList[3] + local card4=eyeCardList[4] + local result=AnalyseCardFuLuShouJiang(cbLessKindItem, nil, card1, card2, card3, card4, opCards, tagAnalyseItemList, config) + if result then + return true + end + end + + + if math.floor(eyeCardList[1]/100)==math.floor(eyeCardList[3]/100) and math.floor(eyeCardList[2]/100)==math.floor(eyeCardList[4]/100) then + local card1=eyeCardList[1] + local card2=eyeCardList[3] + local card3=eyeCardList[2] + local card4=eyeCardList[4] + local result=AnalyseCardFuLuShouJiang(cbLessKindItem, nil, card1, card2, card3, card4, opCards, tagAnalyseItemList, config) + if result then + return true + end + end + + if math.floor(eyeCardList[1]/100)==math.floor(eyeCardList[4]/100) and math.floor(eyeCardList[2]/100)==math.floor(eyeCardList[3]/100) then + local card1=eyeCardList[1] + local card2=eyeCardList[4] + local card3=eyeCardList[3] + local card4=eyeCardList[2] + local result=AnalyseCardFuLuShouJiang(cbLessKindItem, nil, card1, card2, card3, card4, opCards, tagAnalyseItemList, config) + if result then + return true + end + end + + if #tagAnalyseItemList>0 then + return true + else + return false + end + + + end + + + + --//设置索引 + if cbIndex[cbLessKindItem]==#tagKindList then + + local tempi=cbLessKindItem + for i=cbLessKindItem,2,-1 do + tempi=i-1 + if (cbIndex[i-1]+1)~=cbIndex[i] then + local cbNewIndex = cbIndex[i - 1] + for j=i-1,cbLessKindItem do + cbIndex[j]=cbNewIndex+j-i+2 + end + break + + end + + + + end + + if tempi==1 then break end + + + else + cbIndex[cbLessKindItem]=cbIndex[cbLessKindItem]+1 + end + + + + + until(false) + --end + -- + + + end + + if #tagAnalyseItemList>0 then break end + + --end + until(true) + + if #tagAnalyseItemList>0 then return true end + + return false + +end + +function M:AnalyseCardFuLuShou(cbLessKindItem,pKindItem,eyeCard,opCards,tagAnalyseItemList,config) + printlog("AnalyseCardFuLuShou===>>>") + local AnalyseItem={} + AnalyseItem.huxi=0 + AnalyseItem.cbCardEye = 0 + AnalyseItem.cbOpCard={} + AnalyseItem.cbCardEyeList={} + --//设置结果 + for i=1,#opCards do + local src_card=opCards[i] + local op_card={} + op_card.type=src_card.type + op_card.card=src_card.card + + table.insert(AnalyseItem.cbOpCard,src_card) + if src_card.type==RB_FZTypeFLS.Chi then + if IsShangDaRenFuLuShou(src_card.card) then + AnalyseItem.huxi=AnalyseItem.huxi+4 + end + elseif src_card.type==RB_FZTypeFLS.Peng then + if IsShangFu(src_card.card) then + AnalyseItem.huxi=AnalyseItem.huxi+3*4 + else + AnalyseItem.huxi=AnalyseItem.huxi+2 + end + else + if IsShangFu(src_card.card) then + AnalyseItem.huxi=AnalyseItem.huxi+4*4 + else + if config["gang_zhao_liu_xi"] then + AnalyseItem.huxi=AnalyseItem.huxi+6 + else + AnalyseItem.huxi=AnalyseItem.huxi+4 + end + end + + end + + end + + --//设置牌型 + if pKindItem then + for i=1,cbLessKindItem do + local op_card={} + op_card.type=pKindItem[i].type + op_card.card=pKindItem[i].card + table.insert(AnalyseItem.cbOpCard,op_card) + if op_card.type==RB_FZTypeFLS.Chi then + if IsShangDaRenFuLuShou(op_card.card) then + AnalyseItem.huxi=AnalyseItem.huxi+4 + end + elseif op_card.type==RB_FZTypeFLS.Peng then + if IsShangFu(op_card.card) then + AnalyseItem.huxi=AnalyseItem.huxi+3*4 + else + AnalyseItem.huxi=AnalyseItem.huxi+3 + end + else + if IsShangFu(op_card.card) then + AnalyseItem.huxi=AnalyseItem.huxi+4*4 + else + if config["gang_zhao_liu_xi"] then + AnalyseItem.huxi=AnalyseItem.huxi+6 + else + AnalyseItem.huxi=AnalyseItem.huxi+4 + end + end + + end + + end + end + + if eyeCard>0 then + AnalyseItem.cbCardEye = eyeCard + if IsShangFu(eyeCard) then + AnalyseItem.huxi=AnalyseItem.huxi+8 + elseif IsDaRenLuShou(eyeCard) then + AnalyseItem.huxi=AnalyseItem.huxi+4 + elseif eyeCard==104 or eyeCard==804 then + AnalyseItem.huxi=AnalyseItem.huxi+8 + end + end + + + --//插入结果 + table.insert(tagAnalyseItemList,AnalyseItem) + + pt(tagAnalyseItemList) + printlog("胡息---》》》",AnalyseItem.huxi) + if AnalyseItem.huxi >= 11 then + return true + end + return false + + +end + +function M:AnalyseCardFuLuShouJiang(cbLessKindItem,pKindItem,card1,card2,card3,card4,opCards,tagAnalyseItemList,config) + printlog("AnalyseCardFuLuShouJiang===>>>") + local AnalyseItem={} + AnalyseItem.huxi=0 + AnalyseItem.cbCardEye = 0 + AnalyseItem.cbOpCard={} + AnalyseItem.cbCardEyeList={} + + --//设置结果 + local diJin = false + local shangDaRenFuLuShou = false + local ban_shangDaRenFuLuShou = false + local hasKan = false + + for i=1,#opCards do + local src_card=opCards[i] + local op_card={} + op_card.type=src_card.type + op_card.card=src_card.card + + table.insert(AnalyseItem.cbOpCard,src_card) + if src_card.type==RB_FZTypeFLS.Chi then + if IsShangDaRenFuLuShou(src_card.card) then + shangDaRenFuLuShou = true + AnalyseItem.huxi=AnalyseItem.huxi+4 + end + elseif src_card.type==RB_FZTypeFLS.Peng then + if IsShangFu(src_card.card) then + hasKan = true + AnalyseItem.huxi=AnalyseItem.huxi+3*4 + else + AnalyseItem.huxi=AnalyseItem.huxi+2 + end + else + hasKan = true + if IsShangFu(src_card.card) then + AnalyseItem.huxi=AnalyseItem.huxi+4*4 + else + if config["gang_zhao_liu_xi"] then + AnalyseItem.huxi=AnalyseItem.huxi+6 + else + AnalyseItem.huxi=AnalyseItem.huxi+4 + end + end + + end + + end + + --//设置牌型 + if pKindItem then + for i=1,cbLessKindItem do + local op_card={} + op_card.type=pKindItem[i].type + op_card.card=pKindItem[i].card + table.insert(AnalyseItem.cbOpCard,op_card) + if op_card.type==RB_FZTypeFLS.Chi then + if IsShangDaRenFuLuShou(op_card.card) then + shangDaRenFuLuShou = true + AnalyseItem.huxi=AnalyseItem.huxi+4 + end + elseif op_card.type==RB_FZTypeFLS.Peng then + hasKan = true + if IsShangFu(op_card.card) then + AnalyseItem.huxi=AnalyseItem.huxi+3*4 + else + AnalyseItem.huxi=AnalyseItem.huxi+3 + end + else + hasKan = true + if IsShangFu(op_card.card) then + AnalyseItem.huxi=AnalyseItem.huxi+4*4 + else + if config["gang_zhao_liu_xi"] then + AnalyseItem.huxi=AnalyseItem.huxi+6 + else + AnalyseItem.huxi=AnalyseItem.huxi+4 + end + end + + end + + end + end + + + local eyeCard1={} + table.insert(eyeCard1,card1) + table.insert(eyeCard1,card2) + table.insert(AnalyseItem.cbCardEyeList,eyeCard1) + + + local eyeCard1={} + table.insert(eyeCard1,card3) + table.insert(eyeCard1,card4) + table.insert(AnalyseItem.cbCardEyeList,eyeCard2) + + --//一对上、福,就可以胡了 + if card1 == card2 and IsShangFu(card1) then + AnalyseItem.huxi=AnalyseItem.huxi+12 + elseif card1 == card2 and (card1 == 104 or card1 == 804) then + AnalyseItem.huxi=AnalyseItem.huxi+12 + elseif (card1 == 101 and card2 == 104 or card2 == 101 and card1 == 104) then + AnalyseItem.huxi=AnalyseItem.huxi+12 + elseif (card1 == 801 and card2 == 804 or card2 == 801 and card1 == 804) then + AnalyseItem.huxi=AnalyseItem.huxi+12 + elseif ((card1 == 101 or card2 == 101 ) and card1 ~= card2) then + ban_shangDaRenFuLuShou = true + AnalyseItem.huxi=AnalyseItem.huxi+4 + elseif ((card1 == 104 or card2 == 104 ) and card1 ~= card2) then + ban_shangDaRenFuLuShou = true + AnalyseItem.huxi=AnalyseItem.huxi+4 + elseif ((card1 == 801 or card2 == 801 ) and card1 ~= card2) then + ban_shangDaRenFuLuShou = true + AnalyseItem.huxi=AnalyseItem.huxi+4 + elseif ((card1 == 804 or card2 == 804 ) and card1 ~= card2) then + ban_shangDaRenFuLuShou = true + AnalyseItem.huxi=AnalyseItem.huxi+4 + end + + + if (card3 == card4 and IsShangFu(card3)) then + AnalyseItem.huxi=AnalyseItem.huxi+12 + elseif (card3 == card4 and (card3 == 104 or card3 == 804)) then + AnalyseItem.huxi=AnalyseItem.huxi+12 + elseif (card3 == 101 and card4 == 104 or card4 == 101 and card3 == 104) then + AnalyseItem.huxi=AnalyseItem.huxi+12 + elseif (card3 == 801 and card4 == 804 or card4 == 801 and card3 == 804) then + AnalyseItem.huxi=AnalyseItem.huxi+12 + elseif ((card3 == 101 or card4 == 101) and card3 ~= card4) then + ban_shangDaRenFuLuShou = true + AnalyseItem.huxi=AnalyseItem.huxi+4 + elseif ((card3 == 104 or card4 == 104) and card3 ~= card4) then + ban_shangDaRenFuLuShou = true + AnalyseItem.huxi=AnalyseItem.huxi+4 + elseif ((card3 == 801 or card4 == 801) and card3 ~= card4) then + ban_shangDaRenFuLuShou = true + AnalyseItem.huxi=AnalyseItem.huxi+4 + elseif ((card3 == 804 or card4 == 804) and card3 ~= card4) then + ban_shangDaRenFuLuShou = true + AnalyseItem.huxi=AnalyseItem.huxi+4 + end + + + if shangDaRenFuLuShou or ban_shangDaRenFuLuShou or hasKan then + if (card1 ~= card2 and IsDaRen(card1) and IsDaRen(card2) or card3 ~= card4 and IsDaRen(card3) and IsDaRen(card4)) then + if not diJin then + diJin = true + AnalyseItem.huxi=AnalyseItem.huxi+4 + end + + end + + if (card1 ~= card2 and IsLuShou(card1) and IsLuShou(card2) or card3 ~= card4 and IsLuShou(card3) and IsLuShou(card4)) then + if not diJin then + diJin = true + AnalyseItem.huxi=AnalyseItem.huxi+4 + end + end + + if ((card1 == card2 and not IsShangFu(card1) and card1 ~= 104 and card1 ~= 804) or + (card3 == card4 and not IsShangFu(card3) and card3 ~= 104 and card3 ~= 804)) then + if not diJin then + diJin = true + AnalyseItem.huxi=AnalyseItem.huxi+3 + end + + + elseif ((card1 ~= card2 and (( math.floor(card1 / 100) ~= 1 and math.floor(card1 / 100) ~= 8 and card1 % 100 == 4) or ( math.floor(card2 / 100) ~= 1 and math.floor(card2 / 100) ~= 8 and card2 % 100 == 4)) and not IsShangFu(card1)) or + (card3 ~= card4 and (( math.floor(card3 / 100) ~= 1 and math.floor(card3 / 100) ~= 8 and card3 % 100 == 4) or ( math.floor(card4 / 100) ~= 1 and math.floor(card4 / 100) ~= 8 and card4 % 100 == 4)) and not IsShangFu(card3))) then + + if not diJin then + diJin = true + AnalyseItem.huxi=AnalyseItem.huxi+3 + end + + end + + end + + + --//插入结果 + table.insert(tagAnalyseItemList,AnalyseItem) + + pt(tagAnalyseItemList) + printlog("胡息---》》》",AnalyseItem.huxi) + if AnalyseItem.huxi >= 11 then + + return true + end + return false + + +end + + +function M:IsShangFu(card) + if card==101 or card==801 then + return true + end + return false +end + +function M:IsDaRen(card) + if card==102 or card==103 then + return true + end + return false +end + + +function M:IsLuShou(card) + if card==802 or card==803 then + return true + end + return false +end + +function M:IsDaRenLuShou(card) + if card==102 or card==103 or card==802 or card==803 then + return true + end + return false +end + +function M:IsShangDaRen(card) + if math.floor(card/100)==1 then + return true + end + return false +end + +function M:IsFuLuShou(card) + if math.floor(card/100)==8 then + return true + end + return false +end + + +function M:IsShangDaRenFuLuShou(card) + if math.floor(card/100)==1 or math.floor(card/100)==8 then + return true + end + return false +end + + + + + + +local function init(self, player, cardInhand, addCard,room) + self.stack = {} + self.stackHuxi = {} + self.cardList = membe_deep_clone(cardInhand) + if addCard then + self.cardList[#self.cardList + 1] = addCard + end + table.sort(self.cardList) + + self.cbCardMap={} + + for i=1,#self.cardList do + if self.cbCardMap[self.cardList[i]]==nil then + self.cbCardMap[self.cardList[i]]=1 + end + local num=cardNum(self.cardList[i],self.cardList) + if num>1 then + self.cbCardMap[self.cardList[i]]=num + end + end + + --printlog("cbCardMap") + --pt(self.cbCardMap) + + return self:tryWin(player,room) +end + +function M.tingPai(player, room) + local self = setmetatable({}, {__index = M}) + local tingList = {} + local cardInhand = player.handcard_list + if not cardInhand or #cardInhand == 0 then + return tingList + end + + for k = 100, 800, 100 do + for i = 1, 4 do + local tem = k + i + printlog("听牌查询=======>>>",tem) + local result = init(self, player, cardInhand, tem,room) + if result then + printlog("胡牌值为==>>>",tem) + table.insert(tingList,tem) + end + + end + + end + + + return tingList +end + + + +function M:getHuxi(room) + if room.game_id == 77 then + return 11 + end + if room.game_id == 301 then + return 8 + end + if room.game_id == 13 or room.game_id == 14 or room.game_id == 23 then + return 15 + elseif room.game_id == 26 then + return 10 + elseif room.game_id == 29 then + if room.room_config.maxPlayers == 3 then + return 15 + else + return 9 + end + end +end + +function M:GetFzData(tem, ctype) + local huxi + if ctype == 2 then + if tem > 200 then + huxi = 6 + else + huxi = 5 + end + elseif ctype == 3 then + huxi = 3 + elseif ctype == 4 then + huxi = 3 + elseif ctype == 5 then + huxi = 3 + end + return huxi +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/fulushou/main/FZData.lua b/lua_probject/extend_project/extend/zipai/fulushou/main/FZData.lua new file mode 100644 index 00000000..75e94b3c --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/main/FZData.lua @@ -0,0 +1,44 @@ +RB_FZTypeFLS = +{ + --Chi = 1, + -- Peng = 2, + -- Pao = 3, + -- Ti = 4, + --zhao = 5, + -- HU = 6, + + Chi = 1, + Peng = 2, + Gang=3, + SGang=4, + Zhao=5, + SZhao=6, + HU = 7, +} + +local FZTipList = { + tip_map_id = nil, + tip_map_type = nil +} + +local M = FZTipList + +function M.new() + local self = {} + setmetatable(self,{__index = FZTipList}) + self.tip_map_id = {} + self.tip_map_type = {} + return self +end + +function M:AddTip(tip) + self.tip_map_id[tip.id] = tip + local tiplist = self.tip_map_type[tip.weight] + if not tiplist then + tiplist = {} + self.tip_map_type[tip.weight] = tiplist + end + tiplist[#tiplist+1] = tip +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/fulushou/main/HuTipView.lua b/lua_probject/extend_project/extend/zipai/fulushou/main/HuTipView.lua new file mode 100644 index 00000000..7b6bab67 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/main/HuTipView.lua @@ -0,0 +1,69 @@ +local HuTipView = { + _view_start_pos = nil, + _touch_start_pos = nil, +} + +local M = HuTipView + +function M.new(main_view) + local self = {} + self.class = "HuTipView" + setmetatable(self,{__index = HuTipView}) + self._main_view = main_view + self:init() + return self +end + +local function SetObjEnabled(obj, enabled) + obj.visible = enabled + obj.touchable = enabled +end +function M:OnTouchBegin(context) + self._view_start_pos = Vector2(self._view.x, self._view.y) + self._touch_start_pos = self._main_view._view:GlobalToLocal(Vector2(context.inputEvent.x, context.inputEvent.y)) +end +function M:OnTouchMove(context) + local xy = self._main_view._view:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + local dist = Vector2(xy.x - self._touch_start_pos.x, xy.y - self._touch_start_pos.y) + local posx = self._view_start_pos.x + dist.x + local posy = self._view_start_pos.y + dist.y + local max_x = self._main_view._view.width - self._view.width + local max_y = self._main_view._view.height - self._view.height + self._view.x = posx < 0 and 0 or posx > max_x and max_x or posx + self._view.y = posy < 0 and 0 or posy > max_y and max_y or posy +end + +function M:init() + self._view = UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Hu_Tip") + self._main_view._view:AddChild(self._view) + local width = self._view.width + local m_width = self._main_view._view.width + local m_height = self._main_view._view.height + -- self._view.x = 0.5 * m_width - 0.5 * width + self._view.x = 0 + self._view.y = 0.7 * m_height + SetObjEnabled(self._view, false) + self._view.onTouchBegin:Add(handler(self, self.OnTouchBegin)) + self._view.onTouchMove:Add(handler(self, self.OnTouchMove)) +end + +function M:FillData(cards) + local lst_card = self._view:GetChild("tingpai") + lst_card:RemoveChildrenToPool() + local num = #cards + if num > 0 then + if num > 4 and num < 28 then + self._view.width = 191 + ((num > 4 and 6 or num) - 3) * 38 + self._view.height = 69 + (math.ceil(num / 5) - 1) * 56 + end + for i = 1, num do + local item = lst_card:AddItemFromPool() + item:GetChild("icon").icon = "ui://Main_RunBeardMaJiang/202_1_" .. cards[i] + end + SetObjEnabled(self._view, true) + else + SetObjEnabled(self._view, false) + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/fulushou/main/PendulumRule.lua b/lua_probject/extend_project/extend/zipai/fulushou/main/PendulumRule.lua new file mode 100644 index 00000000..a3326b6a --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/main/PendulumRule.lua @@ -0,0 +1,105 @@ + +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + if num ==nil then + num =1 + end + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + end + end + if(result ==num) then + return true + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local M = { + cardList = nil, + stack = nil, +} + + +function M:tryPendulumRule() + local tempValue={} + for i=100,800,100 do + local tempWValue={} + for k=1,4 do + local tem = k + i + local count=cardNum(tem,self.cardList) + if count>0 then + removeCard(self.cardList,tem,count) + local tempFValue={} + for j=1,count do + table.insert(tempFValue,tem) + end + table.insert(tempWValue,tempFValue) + end + end + + if #tempWValue>0 then + table.insert(tempValue,tempWValue) + end + + end + return tempValue +end + + + +local function init(self,cardInhand) + self.cardList= {} + self.stack = {} + self.cardList = membe_clone(cardInhand) + table.sort(self.cardList) + --printlog("排序后的牌型==>>>") + --pt(self.cardList) + return self:tryPendulumRule() +end + +function M.GetHandCard(cardInhand) + local self = setmetatable({}, {__index = M}) + if not cardInhand or #cardInhand == 0 then + return nil + end + local HandCardList = init(self,cardInhand) + return HandCardList +end + + +return M + + + + + diff --git a/lua_probject/extend_project/extend/zipai/fulushou/main/ZPCardView.lua b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPCardView.lua new file mode 100644 index 00000000..8519259b --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPCardView.lua @@ -0,0 +1,119 @@ + + +local M = { + btn_card = nil, + card_item = 0, + Hierarchy = 0, + index_X = 0, + index_Y = 0, + isUser = false, + initPos = Vector2.zero +} + + +function M.InitCardView(card_code, index_X, index_Y, type) + -- setmetatable(M, {__index = CardView}) + local self = setmetatable({}, {__index = M}) + self._room = DataManager.CurrenRoom + self.btn_card = self:InitUI(card_code, type) + self.card_item = card_code + self.index_X = index_X + self.index_Y = index_Y + self.btn_card.data = self + + self:Init() + return self, self.btn_card +end + +function M:Init() + self.card_width = 87 + self.initPos = Vector2.zero +end + +function M:InitUI(card_code, type) + local card + if type == 0 then + card = UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Btn_Card") + self.icon = card:GetChild("icon") + self.icon.icon = self:getHandCardItem("ui://Main_RunBeardMaJiang/201_", card_code) + self.icon:SetScale(self:getCardSize(), self:getCardSize()) + card:GetChild("n6"):SetScale(self:getCardSize(), self:getCardSize()) + elseif type == 1 then + card = UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Gcm_OutCard") + self.icon = card:GetChild("icon") + if card_code == 0 then + self.icon = "ui://Main_RunBeardMaJiang/202_1_300" + else + self.icon = self:GetCardItem("ui://Main_RunBeardMaJiang/203_", card_code) + end + end + return card +end + +function M:GetCardItem(card_1, card_2) + local room = DataManager.CurrenRoom + if room.change_card_display ~= nil then + return card_1 .. room.change_card_display .. card_2 + else + return card_1 .. "2_" .. card_2 + end +end + +function M:getCardSize() + if self._room.change_card_size ~= nil then + return self._room.change_card_size + else + return 1 + end +end + +function M:getHandCardItem(card_1, card_2) + if self._room.change_card_display ~= nil then + if self._room.change_card_display == "1_" then + if self._room.change_card_size ~= nil then + self.card_width = 110 * self._room.change_card_size + else + self.card_width = 110 + end + + return card_1 .. "4_" .. card_2 + end + if self._room.change_card_size ~= nil then + self.card_width = 87 * self._room.change_card_size + else + self.card_width = 87 + end + return card_1 .. self._room.change_card_display .. card_2 + else + if self._room.change_card_size ~= nil then + self.card_width = 90 * self._room.change_card_size + else + self.card_width = 90 + end + return card_1 .. "6_" .. card_2 + end +end + +function M:UpdateKan() + self.btn_card.touchable = false + self.btn_card:GetController("Kan").selectedIndex = 1 +end + +function M:UpdateTing(isting) + self.btn_card:GetController("mark_ting").selectedIndex = isting and 1 or 0 +end + +function M:UpdateIcon() + self.icon.icon = self:getHandCardItem("ui://Main_RunBeardMaJiang/201_", self.card_item) + -- self.btn_card:TweenMove(self:GetHandCardPos(self, #CountCards), 0.02) +end + +function M:UpdateScale() + local size = self._room.change_card_size + -- card_view.btn_card:GetChild("icon").icon = self:getHandCardItem("ui://Main_RunBeardMaJiang/201_", card_view.card_item) + self.icon:SetScale(size, size) + self.btn_card:GetChild("n6"):SetScale(size, size) + -- self:getCardWidth() +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/fulushou/main/ZPChiView.lua b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPChiView.lua new file mode 100644 index 00000000..a1db6123 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPChiView.lua @@ -0,0 +1,131 @@ +local M = {} + +function M.InitChiView(gamectr, view, cardInfo) + local self = setmetatable({}, {__index = M}) + self._room = DataManager.CurrenRoom + self.class = "ChiView" + self._gamectr = gamectr + self._mainView = view + self._cardInfo = cardInfo + return self +end + +function M:UpdateChiView(list, tip_hu, callback, cardInfo) + self:ShowView(list, tip_hu, callback, cardInfo) +end + +function M:ShowView(tiplist, tip_hu, callback, cardInfo) + local _pop_tip_choice = UIPackage.CreateObject("Main_RunBeardMaJiang", "Pop_tip_choice") + local list_choose = _pop_tip_choice:GetChild("Lst_choose") + _pop_tip_choice:GetChild("dibtn").onClick:Add(function() + _pop_tip_choice:Dispose() + end) + + -- --list 去重复的 + if #tiplist == 1 then + _pop_tip_choice:GetController("bipai").selectedIndex = 3 + end + + local tip_list = membe_deep_clone(tiplist) + for i = 1, #tiplist do + for k = 1, #tip_list do + if tip_list[k].weight ~= 4 and tiplist[i].id ~= tip_list[k].id then + if tiplist[i].OpCard[1] == tip_list[k].OpCard[1] and tiplist[i].OpCard[2] == tip_list[k].OpCard[2] then + tip_list[i].weight = 4 + end + end + end + end + + list_choose:RemoveChildrenToPool() + for i = 1, #tip_list do + if tip_list[i].weight ~=4 then + local item_choose = list_choose:AddItemFromPool() + self:SetIcon(item_choose, 2, tip_list[i].OpCard[1]) + self:SetIcon(item_choose, 3, tip_list[i].OpCard[2]) + self:SetIcon(item_choose, 1, tip_list[i].card) + + item_choose.onClick:Add(function() + for k=1,list_choose.numChildren do + list_choose:GetChildAt(k-1):GetController("zhong") .selectedIndex = 0 + end + item_choose:GetController("zhong").selectedIndex = 1 + if tip_list[i].bi_list ==nil then + callback(tip_list[i].id) + self:CloseTip() + else + self.bilist={} + self._chiid = tip_list[i].id + self:CheckRatioCard(tip_list[i].bi_list,1,tip_list[i].card) + + end + end) + end + end + list_choose:ResizeToFit(#tip_list) + _pop_tip_choice:GetChild("di1").width = list_choose.width+110 + _pop_tip_choice.xy = Vector2((self._mainView.width - _pop_tip_choice.width)/2, -100) + self._mainView:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice + end + --比牌显示 + function M:CheckRatioCard(_tiplist,index,chicard,_biid) + if _biid ~=nil then + self.bilist={} + self.bilist[#self.bilist+1] = _biid + end + self._pop_tip_choice:GetController("bipai").selectedIndex = index + local Bilist_choose = self._pop_tip_choice:GetChild("Bi_Lst_choose"..index) + Bilist_choose:RemoveChildrenToPool() + for i = 1, #_tiplist do + local item = UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Comp_choose") + local item_choose = Bilist_choose:AddChild(item) + self:SetIcon(item_choose, 2, _tiplist[i].opcard[1]) + self:SetIcon(item_choose, 3, _tiplist[i].opcard[2]) + self:SetIcon(item_choose, 1, chicard) + item_choose:GetController("zhong") .selectedIndex = 0 + item_choose.onClick:Add(function() + for k=1,Bilist_choose.numChildren do + Bilist_choose:GetChildAt(k-1):GetController("zhong") .selectedIndex = 0 + end + item_choose:GetController("zhong") .selectedIndex = 1 + if _tiplist[i].bi_list ==nil then + if tip_hu then + local guo_msg = MsgWindow.new(self._root_view, "确定取消胡吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + self.bilist[#self.bilist+1] = i-1 + self._gamectr:SendAction(self._chiid,self.bilist) + guo_msg:Close() + self:CloseTip() + self._cardInfo:UpdateIsOnClick(false) + end) + guo_msg:Show() + else + self.bilist[#self.bilist+1] = i-1 + self._gamectr:SendAction(self._chiid,self.bilist) + self:CloseTip() + self._cardInfo:UpdateIsOnClick(false) + end + else + self:CheckRatioCard(_tiplist[i].bi_list,2,chicard,i-1) + end + end) + end + Bilist_choose:ResizeToFit(#_tiplist) + self._pop_tip_choice:GetChild("di"..index+1).width = Bilist_choose.width+110 + + end + + +function M:SetIcon(item, index, card) + item:GetChild("card" .. index).icon = UIPackage.GetItemURL("Main_RunBeardMaJiang", CommonFun:GetCardItem("201_", card)) +end + +function M:CloseTip() + if (self._pop_tip_choice) then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/fulushou/main/ZPFzCardView.lua b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPFzCardView.lua new file mode 100644 index 00000000..f8b60e70 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPFzCardView.lua @@ -0,0 +1,181 @@ +local M = {} + +local source_fz_03 = "ui://Main_RunBeardMaJiang/Fz_0_3" +local source_fz_04 = "ui://Main_RunBeardMaJiang/Fz_0_4" +local source_card = "ui://Main_RunBeardMaJiang/202_" + +function M:getCardItem(card_1, card_2) + local room = DataManager.CurrenRoom + if room.change_card_display ~= nil then + return card_1 .. room.change_card_display .. card_2 + else + return card_1 .. "6_" .. card_2 + end +end + +function M.InitFzView(fz,isMy,isplay,index,count) + local self = setmetatable({}, {__index = M}) + local item,fzcards + if fz.type ~= RB_FZTypeFLS.Kan then + item = UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Component1")--Extend_Poker_AHRunBeard + item:RemoveChildren(0, -1, true) + end + + -- local fzItem + if fz.type == RB_FZTypeFLS.Bi or fz.type == RB_FZTypeFLS.Chi then + fzcards = self:UpateChiBi(item,fz) + elseif fz.type == RB_FZTypeFLS.Peng then + fzcards = self:UpdatePeng(item,fz) + elseif fz.type == RB_FZTypeFLS.Wei or fz.type == RB_FZTypeFLS.ChouWei then + fzcards = self:UpdateWei(item,fz,isMy) + elseif fz.type == RB_FZTypeFLS.Gang or fz.type == RB_FZTypeFLS.SGang or fz.type == RB_FZTypeFLS.Zhao or fz.type == RB_FZTypeFLS.SZhao then + fzcards = self:UpateTi(item,fz) + --[[elseif fz.type == RB_FZTypeFLS.Pao then + fzcards = self:UpatePao(item,fz)--]] + end + + if item ~= nil and fzcards ~= nil then + self:PlayEffect(item,fzcards,isplay,index,count) + end + + return item,fzcards +end + +function M:UpateChiBi(item,fz) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_03) + local cardId1,cardId2,cardId3 + if #fz.opcard == 2 then + cardId1 = fz.card + cardId2 = fz.opcard[1] + cardId3 = fz.opcard[2] + else + cardId1 = fz.opcard[1] + cardId2 = fz.opcard[2] + cardId3 = fz.opcard[3] + end + fzcards:GetChild("card_" .. 1).icon = self:getCardItem(source_card, cardId1) + fzcards:GetController("c2").selectedIndex = 1 + fzcards:GetChild("card_" .. 2).icon = self:getCardItem(source_card, cardId2) + -- local card = fz.opcard[2] == nil and fz.opcard[1] or fz.opcard[2] + fzcards:GetChild("card_" .. 3).icon = self:getCardItem(source_card, cardId3) + fzcards.x, fzcards.y = 0, 0 + item:AddChildAt(fzcards, 0) + return fzcards +end + +function M:UpdatePeng(item,fz) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_03) + for j = 1, 3 do + fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1]) + end + fzcards.x, fzcards.y = 0, 0 + item:AddChildAt(fzcards, 0) + return fzcards +end + +function M:UpdateWei(item,fz,isMy) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_03) + --fzcards:GetController("c1").selectedIndex=1 + local room = DataManager.CurrenRoom + for j = 1, 3 do + if room.room_config.mingwei or fz.type==RB_FZTypeFLS.ChouWei or isMy then + if j == 3 then + fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1]) + else + fzcards:GetChild("card_" .. j).icon = "ui://Main_RunBeardMaJiang/202_1_300" + end + else + --未勾选明偎 + -- if isMy then + -- fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1]) + -- fzcards:GetController("c1").selectedIndex = 1 + -- else + fzcards:GetChild("card_" .. j).icon = "ui://Main_RunBeardMaJiang/202_1_300" + -- end + end + + end + fzcards.x, fzcards.y = 0, 0 + item:AddChildAt(fzcards,0) + return fzcards +end + +function M:UpateTi(item, fz,icon) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_04) + for i = 1, 4 do + if i == 4 and fz.type == RB_FZTypeFLS.Gang or fz.type == RB_FZTypeFLS.SGang or fz.type == RB_FZTypeFLS.Zhao or fz.type == RB_FZTypeFLS.SZhao then + fzcards:GetChild("card_" .. i).icon = self:getCardItem(source_card, fz.card) + else + fzcards:GetChild("card_" .. i).icon = "ui://Main_RunBeardMaJiang/202_1_300" + end + end + fzcards.x, fzcards.y = 0, 0 + -- item:AddChildAt(fzcards,0) + return fzcards +end + +function M:UpatePao(item, fz,icon) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_04) + for i = 1, 4 do + fzcards:GetChild("card_" .. i).icon = self:getCardItem(source_card, fz.opcard[1]) + end + fzcards.x, fzcards.y = 0, 0 + return fzcards +end + +function M:PlayEffect(fzitem,fzcards,isplay,index,count) + if (isplay == nil) then + isplay = false + end + if (isplay and index == count) then + local faArray = fzitem:GetChild("chiwei") + if (faArray ~= nil) then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end +end + +function M:PlayEffectOther(fzitem,fzcards, size,i,isplay,seat) + isplay = isplay == nil and false or isplay + local isAddlast = false + + local room = DataManager.CurrenRoom + if isplay and i== size then + local faArray = fzitem:GetChild("chiwei") + if room.room_config.people_num == 3 then + if (room.self_player.seat == 1) then + if (seat == 2) then + faArray = fzitem:GetChild("chiwei1") + else + faArray = fzitem:GetChild("chiwei") + end + elseif (room.self_player.seat == 2) then + if (seat == 3) then + faArray = fzitem:GetChild("chiwei1") + else + faArray = fzitem:GetChild("chiwei") + end + elseif (room.self_player.seat == 3) then + if (seat == 1) then + faArray = fzitem:GetChild("chiwei1") + else + faArray = fzitem:GetChild("chiwei") + end + end + end + + if (faArray ~= nil) then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/fulushou/main/ZPGameController.lua b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPGameController.lua new file mode 100644 index 00000000..ab5e5a19 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPGameController.lua @@ -0,0 +1,10 @@ + +local M = {} + +setmetatable(M,{__index = GameController}) + +function M:init(name) + GameController.init(self,name) +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/fulushou/main/ZPGameEvent.lua b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPGameEvent.lua new file mode 100644 index 00000000..22d92845 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPGameEvent.lua @@ -0,0 +1,22 @@ +local ZPGameEvent = { + -- 发牌 + SendCards = 'SendCards', + --发最后一张牌 + AddCard = 'AddCard', + -- 胡牌 + ZPHuCard = 'ZPHuCard', + -- 结算事件 + ZPResult1 = 'ZPResult1', + -- 大结算事件 + ZPResult2 = 'ZPResult2', + -- 转盘指向事件 + EventTurn = 'EventTurn', + OutHint = 'OutHint', --出牌tips + GetCard = 'GetCard', --摸牌 + OutCard = 'OutCard', --出牌 + FangziAction = 'FangziAction', --吃碰等操作事件 + FZTips = 'FZTips', --放子提示 + QiCard = 'QiCard' --弃牌 +} + +return ZPGameEvent diff --git a/lua_probject/extend_project/extend/zipai/fulushou/main/ZPMainView.lua b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPMainView.lua new file mode 100644 index 00000000..94aeb287 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPMainView.lua @@ -0,0 +1,400 @@ +local PlayerSelfCardInfoView = import('.ZPPlayerSelfCardInfoView') +local PlayerCardInfoView = import('.ZPPlayerCardInfoView') +local ZPSettingView = import('.ZPSettingView') +local ZPTableBG = import('.ZPTableBG') +local HuTipView = import('.HuTipView') +local ZPGameEvent = import('.ZPGameEvent') +local M = { + default_btn = false +} + +setmetatable(M, {__index = MainView}) + +local default_bg = 1 + +function M:InitView(url, isdisplay, open_social, change_card_size, qihu) + UIPackage.AddPackage('base/main_zipaimajiang/ui/Main_RunBeardMaJiang') + MainView.InitView(self, url) + self._full_offset = false + --显示背景 + ZPTableBG.LoadTableBG(default_bg, self._room.game_id, self._root_view) + self.qihu = qihu + if qihu ~= nil then + local id = ZPTableBG.GetTableBG(self._room.game_id) + if id > 3 or id <= 0 then + id = 1 + end + if self._room.score_times ~= nil and self._room.score_times > 0 then + self._view:GetChild('di_text').text =qihu .. '胡息起 ' .. self._room.score_times .. '倍' + --self._room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起 ' .. self._room.score_times .. '倍' + else + self._view:GetChild('di_text').text =qihu .. '胡息起' --self._room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起' + end + self._view:GetController('bg_state').selectedIndex = id - 1 + end + self.cd_time = 0 + self.default_btn = open_social + if isdisplay == nil then + isdisplay = false + end + local tex_round = self._view:GetChild('tex_round') + self._tex_leftTime = self._view:GetChild('time') + local remaining_card = self._view:GetChild('remaining_card') + self._tex_LeftCard = self._view:GetChild('remaining_card') + self._rightPanelView._opt = 2 + self._rightPanelView:__UpdateTime() + local rightpanel = self._view:GetChild('right_panel') + if (rightpanel ~= nil) then + self.tex_gametype = rightpanel:GetChild('tex_gametype') + if (self.tex_gametype ~= nil) then + self.tex_gametype.text = self._room.room_config:GetGameName() + end + end + self._player_card_info = {} + local _room = self._room + self._hu_tip = HuTipView.new(self) + --加载上次游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id) + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + + local _gamectr = self._gamectr + _gamectr:SendChangeTypeFace(typeface) + if typeface == 1 then + if isdisplay then + self._room.change_card_display = '7_' + else + self._room.change_card_display = '2_' + end + elseif typeface == 2 then + self._room.change_card_display = '1_' + elseif typeface == 3 then + self._room.change_card_display = '3_' + elseif typeface == 4 then + self._room.change_card_display = '8_' + end + end + -- self._view.fairyBatching = true + --加载上次游戏的手牌大小 + + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. 'cardsize_new') + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_cardsize'] + local _gamectr = self._gamectr + if typeface == 0 then + self._room.change_card_size = 1.2 + elseif typeface == 1 then + self._room.change_card_size = 1 + elseif typeface == 2 then + self._room.change_card_size = 0.8 + end + else + self._room.change_card_size = change_card_size + end + + --加载上次游戏的接收语音 + if self.default_btn then + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. 'yuyin') + local json_data1 = Utils.LoadLocalFile(user_id .. _room.game_id .. 'chupai') + local json_data2 = Utils.LoadLocalFile(user_id .. _room.game_id .. 'fangyan') + self._room.yuyin_typeface = 1 + self._room.chupai_typeface = 1 + self._room.fangyan_typeface = 1 + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + self._room.yuyin_typeface = typeface + self:SetInteractEnabled(typeface == 1 and 0 or 1) + end + if json_data1 ~= nil then + local _data = json.decode(json_data1) + local typeface = _data['game_typeface'] + self._room.chupai_typeface = typeface + end + if json_data2 ~= nil then + local _data = json.decode(json_data2) + local typeface = _data['game_typeface'] + self._room.fangyan_typeface = typeface + end + end + + local _player_card_info = self._player_card_info + for i = 1, _room.room_config.people_num do + local tem = self._view:GetChild('player_card_info' .. i) + _player_card_info[i] = self:NewPlayerCardInfoView(tem, i) + end + + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = _player_card_info[self:GetPos(p.seat)] + info:SetPlayer(p) + info:FillData() + end + + self._rightPanelView.ctr_log.selectedIndex = 0 + local list = _room.player_list + local readyNum = 0 + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + if p.ready then + readyNum = readyNum + 1 + end + end + if (_room.curren_round > 0) then + self._rightPanelView.ctr_log.selectedIndex = 0 + end + + self._ctr_action = self._view:GetController('action') + if _room.banker_seat == _room.self_player.seat and readyNum > 1 and readyNum == _room.room_config.people_num then + elseif not _room.self_player.ready then + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig then + if round>1 then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 2 + end + + else + self._ctr_action.selectedIndex = 1 + end + else + self._ctr_action.selectedIndex = 0 + end + self:ResetHandCard() + self:showBackBtnView() + + self:InitXiPai() + self:InitXiPai1() +end + +function M:InitXiPai() + self._xipaiPanel = UIPackage.CreateObjectFromURL("ui://Common/panel_handzipai02") + self._root_view:AddChild(self._xipaiPanel) + + local offset = get_offset(self._full_offset) + + self._xipaiPanel.width = GRoot.inst.width - (offset * 2) + self._xipaiPanel.height = GRoot.inst.height + self._xipaiPanel.x = offset + + self._xipaiPanel.visible=false + --self:PlayXiPai() +end + +function M:PlayXiPai(xipaiCallBack) + if self._xipaiPanel then + coroutine.start(function() + self._xipaiPanel.visible=true + self._xipaiPanel:GetTransition("XiPai"):Play() + coroutine.wait(3.5) + self._xipaiPanel.visible=false + if xipaiCallBack then + xipaiCallBack() + end + end) + + + end +end + + +function M:InitXiPai1() + self._xipaiPanel1 = UIPackage.CreateObjectFromURL("ui://Common/panel_handzipai03") + self._root_view:AddChild(self._xipaiPanel1) + + local offset = get_offset(self._full_offset) + + self._xipaiPanel1.width = GRoot.inst.width - (offset * 2) + self._xipaiPanel1.height = GRoot.inst.height + self._xipaiPanel1.x = offset + + self._xipaiPanel1.visible=false + --self:PlayXiPai() +end + +function M:PlayXiPai1(xipaiCallBack) + if self._xipaiPanel1 then + coroutine.start(function() + self._xipaiPanel1.visible=true + self._xipaiPanel1:GetTransition("XiPai"):Play() + coroutine.wait(3.5) + self._xipaiPanel1.visible=false + if xipaiCallBack then + xipaiCallBack() + end + end) + + + end +end + + +function M:NewSettingView() + local settingView = ZPSettingView.new(self._view, 2, self.default_btn) + settingView:FillBgSection( + function(url) + LoadGameBg(url, self._root_view) + end, + self._room.game_id, + default_bg, + self._room, + self.qihu + ) + return settingView +end + +function M:EventInit() + MainView.EventInit(self) +end + +function M:NewPlayerCardInfoView(view, index) + if index == 1 then + return PlayerSelfCardInfoView.new(view, self) + end + return PlayerCardInfoView.new(view, self) +end + +-- 设置 更新 手牌字体 三套 +function M:UpdateCardDisplay(index) + local _gamectr = self._gamectr + _gamectr:SendChangeTypeFace(index) + if index == 1 then + self._room.change_card_display = '2_' + elseif index == 2 then + self._room.change_card_display = '1_' + elseif index == 3 then + self._room.change_card_display = '3_' + elseif index == 4 then + self._room.change_card_display = '8_' + end + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + if p.DiceCard ~= nil and p.DiceCard ~= 0 then + info:UpdateOutCardList(p.DiceCard) + end + if p.outcard_list ~= nil and #p.outcard_list > 0 then + info:UpdateQiPai(p.outcard_list) + end + if p.fz_list ~= nil and #p.fz_list > 0 then + info:UpdateFzList(p.fz_list) + end + if p.seat == self._room.self_player.seat then + info:UpdateCardDisplay() + end + end +end + +-- 设置 更新 手牌大小 +function M:UpdateCardSize(index) + if index == 0 then + self._room.change_card_size = 1.2 + elseif index == 1 then + self._room.change_card_size = 1 + elseif index == 2 then + self._room.change_card_size = 0.8 + end + local info = self._player_card_info[1] + info:UpdateCardSize() +end + +-- 设置 更新 方言 +function M:UpdateFangyan(index) + self._room.fangyan_typeface = index +end +--刷新手牌排列 按钮 三种 排列方法 在 PendulumRule 里 +function M:ResetHandCard(...) + local btn_reset = self._view:GetChild('btn_reset') + btn_reset.visible=false + btn_reset.onClick:Set( + function(...) + if self._popEvent == false then + return + end + --加载上次的 + local index = 1 + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. 'ResetHandCard') + if json_data ~= nil then + local _data = json.decode(json_data) + index = _data['index'] + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['ResetHandCard'] = true + if index == 1 then + _data['index'] = 2 + elseif index == 2 then + _data['index'] = 3 + elseif index == 3 then + _data['index'] = 1 + end + local key = user_id .. 'ResetHandCard' + Utils.SaveLocalFile(key, json.encode(_data)) + local x = _data['index'] + local card_info = self._player_card_info[1] + card_info:InitHandCard(false) + end + ) +end + +function M:showBackBtnView() + local btn_back_lobby = self._view:GetChild('btn_back_lobby') + local btn_jiesan_lobby1 = self._view:GetChild('Btn_jiesan_lobby') + --btn_jiesan_lobby1.displayObject.gameObject:SetActive(false) + --btn_jiesan_lobby1:GetChild("n8").displayObject.gameObject:SetActive(false) + if (btn_jiesan_lobby1 ~= nil) then + btn_jiesan_lobby1.onClick:Set( + function() + if (self.cd_time > 0) then + ViewUtil.ErrorTip(nil, '您还处于解散冷却时间当中,请稍后再试') + else + self.cd_time = 30 + self._gamectr:AskDismissRoom( + function(res) + ViewUtil.ErrorTip(res.ReturnCode, '') + end + ) + self:onDisBandTimer() + end + end + ) + end +end + +--解散计时器 +function M:onDisBandTimer() + if self.cd_coroutine ~= nil then + coroutine.stop(self.cd_coroutine) + end + self.cd_coroutine = + coroutine.start( + function() + while (self.cd_time > 0) do + self.cd_time = self.cd_time - 1 + self.cd_time = math.max(0, self.cd_time) + if self.cd_time > 0 then + coroutine.wait(1) + end + end + end + ) +end + +function M:Destroy() + UIPackage.RemovePackage('base/main_zipaimajiang/ui/Main_RunBeardMaJiang') + MainView.Destroy(self) +end +return M diff --git a/lua_probject/extend_project/extend/zipai/fulushou/main/ZPPlayBackView.lua b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPPlayBackView.lua new file mode 100644 index 00000000..5633fd43 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPPlayBackView.lua @@ -0,0 +1,13 @@ +local ZPTableBG = import('.ZPTableBG') + +local M = {} + +setmetatable(M, {__index = PlayBackView}) + +function M:InitView(url) + PlayBackView.InitView(self, url) + local _view = self._view + ZPTableBG.LoadTableBG(1, self._room.game_id, self._root_view) +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/fulushou/main/ZPPlayer.lua b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPPlayer.lua new file mode 100644 index 00000000..fe112fd2 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPPlayer.lua @@ -0,0 +1,37 @@ + + +local EXPlayer ={ + -- 手牌列表 + card_list = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil, + hu_xi =0 +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 + self.hu_xi =0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/fulushou/main/ZPPlayerCardInfoView.lua b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPPlayerCardInfoView.lua new file mode 100644 index 00000000..f260d0ca --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPPlayerCardInfoView.lua @@ -0,0 +1,571 @@ +local PendulumRule = import('.PendulumRule') +AreaOderType = { + left_right = "left_right", + right_left = "right_left", + up_down = "up_down", + down_up = "down_up" +} + +local PlayerCardInfoView = { + _view = nil, + _mainView = nil, + + _mask_liangpai = nil, + _area_outcard_list = nil, + _area_handcard_list = nil, + + +} +local function NewCardView(card,cardItem,index_X,index_Y) + local self = {} + setmetatable(self,{__index = CardView}) + self.btn_card = card + self.card_item = cardItem + self.index_X = index_X + self.index_Y = index_Y + return self +end + + +local M = PlayerCardInfoView + +function M.new(view,mainView) + local self = {} + setmetatable(self, {__index = M}) + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:init() + + local view = self._view + self._room = DataManager.CurrenRoom + self._area_outcard_list = view:GetChild("area_outcard_list") + self._area_handcard_list = view:GetChild("area_handcard_list") + self._area_handcard_list:SetScale(0.5,0.5) + self._area_fz_list = view:GetChild("area_fz_list") + self._area_qipai_list = view:GetChild("windcard_list") + self._mask_liangpai = view:GetChild("mask_liangpai") + UIPackage.AddPackage("base/main_zipaimajiang/ui/Main_RunBeardMaJiang") +end + +function M:SetPlayer(p) + self._player = p +end + +function M:FillData(begin) + +end + +function M:Clear() + self._area_outcard_list:RemoveChildren(0, -1, true) + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_qipai_list:RemoveChildren(0, -1, true) + self._mask_liangpai:RemoveChildren(0, -1, true) +end + + +function M:fillCard(obj,card_type,card) + +end + + +function M:ClearOutCard() + self._area_outcard_list:RemoveChildren(0, -1, true) + +end + +--弃牌 +function M:UpdateQiPai( qi_list) + self._area_qipai_list:RemoveChildren(0,-1,true) + for i=1,#qi_list do + local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Qipai") + qicards:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeardMaJiang/202_",qi_list[i]) + self._area_qipai_list:AddChild(qicards) + end + +end + + --放字 +function M:UpdateFzList1( fz_list ) + self._area_fz_list:RemoveChildren(0,-1,true) + for i = 1,#fz_list do + local fzitem = nil + if fz_list[i].type ~= RB_FZTypeFLS.Kan then + fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Component1") + fzitem:RemoveChildren(0,-1,true) + end + if fz_list[i].type == RB_FZTypeFLS.Chi or fz_list[i].type == RB_FZTypeFLS.Bi then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Fz_0_3") + fzcards:GetController("c2").selectedIndex =1 + fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].active_card) + fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].opcard[1]) + fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].opcard[2]) + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZTypeFLS.Peng then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZTypeFLS.Wei then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeardMaJiang/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZTypeFLS.ChouWei then + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeardMaJiang/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeardMaJiang/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZTypeFLS.Zhao or fz_list[i].type == RB_FZTypeFLS.SZhao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Fz_0_4") + for j=1,4 do + local tempCard=fz_list[i].opcard[j] + if tempCard==nil then + tempCard=fz_list[i].active_card + end + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeardMaJiang/202_",tempCard) + end + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZTypeFLS.Gang or fz_list[i].type == RB_FZTypeFLS.SGang then + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Fz_0_4") + for j=1,4 do + --if j==4 then + local tempCard=fz_list[i].opcard[j] + if tempCard==nil then + tempCard=fz_list[i].active_card + end + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeardMaJiang/202_",tempCard) + --else + -- fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeardMaJiang/202_1_300" + --end + end + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + end + end +end + +--回放手牌 +function M:InitHandCard(handcard) + self._area_handcard_list:RemoveChildren(0,-1,true) + --[[local pokerList = PendulumRule.GetHandCard(handcard) + --printlog("计算牌型other==>>>") + --pt(pokerList) + self.card_lists ={} + if pokerList==nil then return end + + for i =1,#pokerList do + for j = 1, #pokerList[i] do + for k=1,#pokerList[i][j] do + local currentCardNum=#pokerList[i][j] + local card_code = pokerList[i][j][k] + local btn_card =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Btn_Card") + btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeardMaJiang/202_",card_code) + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card,4-j) + btn_card.sortingOrder=4-j + local card_view = NewCardView(btn_card,card_code,i,j) + self.card_lists[#self.card_lists+1] = card_view + end + end + end + for j=#self.card_lists,1,-1 do + local card_view = self.card_lists[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view,#pokerList) + end + + if self._player.fz_list~=nil then + for i=1,#self._player.fz_list do + if self._player.fz_list[i].type == RB_FZTypeFLS.Kan then + self:UpdateKan(self._player.fz_list[i].card) + end + end + end--]] + + local pokerList = PendulumRule.GetHandCard(handcard) + if pokerList == nil or #pokerList == 0 then + return + end + self.cards_count = #pokerList + self.card_lists = {} + + for i = 1, #pokerList do + for j = #pokerList[i],1,-1 do + for k=1,#pokerList[i][j] do + local currentCardNum=#pokerList[i][j] + local card_code = pokerList[i][j][k] + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeardMaJiang/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeardMaJiang/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n8').x=btn_card:GetChild('n8').x-25 + btn_card:GetChild('n9').x=btn_card:GetChild('n9').x-25 + btn_card:GetChild('n10').x=btn_card:GetChild('n10').x-25 + --self.card_width = self:getCardSize() + --self.card_hight = self:getCardSize() + btn_card:GetController('cardnum').selectedIndex=currentCardNum-1 + local cardNums=currentCardNum-1 + if cardNums>0 then + for n=1,cardNums do + local tempCardBtn=btn_card:GetChild('icon'..n) + tempCardBtn.icon = self:getCardItem('ui://Main_RunBeardMaJiang/201_', card_code) + tempCardBtn:SetScale(self:getCardSize(), self:getCardSize()) + + end + end + + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card, j) + btn_card.sortingOrder=j + local card_view = NewCardView(btn_card, card_code, i, j,currentCardNum) + --存牌堆 + self.card_lists[#self.card_lists + 1] = card_view + btn_card.data = card_view + end + + end + --存牌堆 + for j=1,#self.card_lists do + local card_view = self.card_lists[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view, self.cards_count) + end + end + + --self:UpdateHandCardsPos() + + +end + +function M:UpdateHandCardsPos() + --得到有 多少列 + local CountCards = {} + for i = 1, #self.card_lists do + CountCards[self.card_lists[i].index_X] = + CountCards[self.card_lists[i].index_X] == nil and 1 or CountCards[self.card_lists[i].index_X] + 1 + end + for i = #self.card_lists, 1, -1 do + local card_view = self.card_lists[i] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.old_postion = self:GetHandCardPos(card_view, #CountCards) + card_view.btn_card:TweenMove(card_view.old_postion, 0.3) + end + +end + + +function M:getCardSize() + if self._room.change_card_size ~= nil then + return 0.9--self._room.change_card_size + else + return 0.9 + end +end + + +function M:UpdateHandCards( list ) + self.card_lists = {} + self._area_handcard_list:RemoveChildren(0,-1,true) + local CountCards = {} + for i=1,#list do + CountCards[list[i].index_X]=CountCards[list[i].index_X] == nil and 1 or CountCards[list[i].index_X] + 1 + end + for i=1,#list do + local card_code = list[i].card_item + local btn_card =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Qipai") + btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeardMaJiang/202_",card_code) + local card_view = NewCardView(btn_card,card_code,list[i].index_X,list[i].index_Y) + --存牌堆 + self.card_lists[#self.card_lists+1] =card_view + end + for j=#self.card_lists,1,-1 do + local card_view = self.card_lists[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view,#CountCards) + end + +end + +--牌位置 +function M:GetHandCardPos(cards_view,cards) + local x,y = 0,0 + local card_width = 90 -- 牌的宽度 + local middle_x = self._area_handcard_list.width / 2 + local start_x = middle_x - (cards / 2 * (card_width)) + x = start_x + (card_width) * (cards_view.index_X - 1) + y = (90*cards_view.index_Y)-300 + return Vector2.New(x,y) +end + + + +function M:UpdateOutCardList(outcard) + + self._area_outcard_list:RemoveChildren(0,-1,true) + local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeardMaJiang/Gcm_OutCard") + if outcard==0 then + outcards:GetChild("icon").icon ="ui://Main_RunBeardMaJiang/203_1_300" + else + outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeardMaJiang/203_",outcard) + end + outcards.x,outcards.y = 0,0 + self._area_outcard_list:AddChild(outcards) +end + +--摸牌动画 +function M:PlayingOutCardAnima(card) + if(self._area_outcard_list ~=nil and self._area_outcard_list.numChildren>0)then + self._area_outcard_list:GetChildAt(0):GetChild("icon").icon =self:getCardItem("ui://Main_RunBeardMaJiang/202_",card) + self._view:GetTransition("t0"):Play() + end + coroutine.start(function() + coroutine.wait(0.1) + self:ClearOutCard() + end) + -- +end + + +--摆牌规则 +function M:PendulumRule(handcard) + local room = DataManager.CurrenRoom + local card_list = handcard + local card_count = #card_list + local cards_map = {} + local CountCards = {} + for i=1,#card_list do + CountCards[card_list[i]]= CountCards[card_list[i]] == nil and 1 or CountCards[card_list[i]] + 1 + end + --find4 + for k,v in pairs(CountCards) do + if (v == 4) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + --find AAa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] >= 2 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-3 + end + end + end + --find aaA + for i = 101, 110 do + if CountCards[i]~=nil and (CountCards[i] >= 2) then + if CountCards[i + 100]~=nil and (CountCards[i + 100] == 1) then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i+100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i +100] = CountCards[i +100] - 1 + card_count = card_count-3 + end + end + end + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + --find 小 2 7 10 + local counta = CountCards[102] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[110]~=nil and CountCards[102] >0 and CountCards[107] >0 and CountCards[110] >0 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cs[3]= 110 + cards_map[#cards_map+1] = cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 3 + end + end + end + + --find 大 2 7 10 + local countA = CountCards[202] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[210]~=nil and CountCards[202] >0 and CountCards[207] >0 and CountCards[210] >0 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cs[3]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 3 + end + end + end + + --find abc + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and (CountCards[i] > 0 and CountCards[i + 1] > 0 and CountCards[i + 2] > 0) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + --find ABC + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and (CountCards[i] > 0 and CountCards[i + 1] > 0 and CountCards[i + 2] > 0) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + --find Aa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] == 1 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 1; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-2 + end + end + end + + local r_count = 9 - #cards_map + local merge = false + merge = r_count0 then + self._mainView._hu_tip:FillData(tempV) + else + self._mainView._hu_tip:FillData({}) + end + end + + else + + end + + +end + + +function M:SetNotPutCard() + local tempNotPutList=DataManager.CurrenRoom.self_player.currentNotPutCardList + if tempNotPutList and #tempNotPutList>0 then + for i=1,#tempNotPutList do + self:UpdateKan(tempNotPutList[i]) + end + end +end + +--手牌 +function M:InitHandCard(isPlayAni) + self:HidePiao() + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + self.outcard_button = nil + + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + self.cor_init_poker = nil + local _room = DataManager.CurrenRoom + --得到排序好的 list + local pokerList = PendulumRule.GetHandCard(_room.self_player.handcard_list) + --printlog("计算牌型mySelf==>>>") + --pt(pokerList) + if pokerList == nil or #pokerList == 0 then + return + end + self.cards_count = #pokerList + self.card_list = {} + self._area_handcard_list:RemoveChildren(0, -1, true) + --开始发牌动画 + if isPlayAni == true then + self.cor_init_poker = + coroutine.start( + function() + self._mainView._popEvent = false + if self._mainView._rightPanelView._settingView ~= nil then + self._mainView._rightPanelView._settingView:SetBtnUpdateCardEnable(false) + end + + for i = 1, #pokerList do + local pokerListNum = 0 + for j = #pokerList[i],1,-1 do + for k=1,#pokerList[i][j] do + local currentCardNum=#pokerList[i][j] + local card_code = pokerList[i][j][k] + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeardMaJiang/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeardMaJiang/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 95 * self:getCardSize() + self.card_hight = 121 * self:getCardSize() + local x, y = 500, (j * 75) + 500 + btn_card:SetXY(x, y) + + btn_card:GetController('cardnum').selectedIndex=currentCardNum-1 + local cardNums=currentCardNum-1 + if cardNums>0 then + for n=1,cardNums do + local tempCardBtn=btn_card:GetChild('icon'..n) + tempCardBtn.icon = self:getCardItem('ui://Main_RunBeardMaJiang/201_', card_code) + tempCardBtn:SetScale(self:getCardSize(), self:getCardSize()) + + end + end + + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card, j) + btn_card.sortingOrder=j + local card_view = NewCardView(btn_card, card_code, i, j,currentCardNum) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + btn_card.data = card_view + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + btn_card.onClick:Set(self.__OnClickHandCard,self) + end + + end + + for j = 1, #self.card_list, -1 do + coroutine.wait(0.005) + if pokerListNum == #pokerList[i] then + break + end + pokerListNum = pokerListNum + 1 + local card_view = self.card_list[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, self.cards_count), 0.08) + end + + end + self:UpdateHandCardsPos() + + -------------------- + self._mainView._popEvent = true + self:UpdateIsOnClick(true) + if self._mainView._rightPanelView._settingView ~= nil then + coroutine.start( + function() + coroutine.wait(1) + self._mainView._rightPanelView._settingView:SetBtnUpdateCardEnable(true) + end + ) + end + end + ) + else + + for i = 1, #pokerList do + for j = #pokerList[i],1,-1 do + for k=1,#pokerList[i][j] do + local currentCardNum=#pokerList[i][j] + local card_code = pokerList[i][j][k] + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeardMaJiang/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeardMaJiang/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 95 * self:getCardSize() + self.card_hight = 121 * self:getCardSize() + btn_card:GetController('cardnum').selectedIndex=currentCardNum-1 + local cardNums=currentCardNum-1 + if cardNums>0 then + for n=1,cardNums do + local tempCardBtn=btn_card:GetChild('icon'..n) + tempCardBtn.icon = self:getCardItem('ui://Main_RunBeardMaJiang/201_', card_code) + tempCardBtn:SetScale(self:getCardSize(), self:getCardSize()) + + end + end + + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card,j) + btn_card.sortingOrder=j + local card_view = NewCardView(btn_card, card_code, i, j,currentCardNum) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + btn_card.data = card_view + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + btn_card.onClick:Set(self.__OnClickHandCard,self) + end + + end + --存牌堆 + for j = 1, #self.card_list do + local card_view = self.card_list[j] + card_view.btn_card.xy = self:GetHandCardPos(card_view, self.cards_count) + end + end + + self:UpdateHandCardsPos() + + + + end + + self:SetNotPutCard() +end + + + +function M:__OnClickHandCard(context) + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + if self.outcard_button then + self.outcard_button = nil + end + + local button = context.sender + + local card = button.data + + local _room = DataManager.CurrenRoom + + + + if (Utils.IsDoubleClick(context) and _room.curren_outcard_seat == _room.self_player.seat) then + + local OutCardCallBackFunc=function () + button.touchable = false + self.outcard_button = card + self:UpdateIsOnClick(false) + self._mainView:OutCard(card.card_item) + end + + local tingpaiList=DataManager.CurrenRoom.self_player.tingPaiList + local isHasTing=CheckDictionaryFromContent(card.card_item,DataManager.CurrenRoom.self_player.tingPaiList) + --printlog("是否包含有====》》》》",isHasTing) + --pt(tingpaiList) + if isHasTing==nil then isHasTing=false end + + if isHasTing==false and tingpaiList and #tingpaiList>0 then + local spCallBackFunc=function (isOP) + if isOP then + OutCardCallBackFunc() + else + local isChangeCard = false + self.outcard_button = nil + card.btn_card:GetController('cardnum').selectedIndex=card.sameNum-1 + card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeardMaJiang/201_",card.card_item) + self._area_handcard_list:AddChild(button) + if card.btn_card.sortingOrder then + card.btn_card.sortingOrder = card.order or 1 + end + + if #self.card_list == 1 then + isChangeCard = false + self:UpdateHandCardsPos() + return + end + card.btn_card.xy=card.startPos + end + end + local SPView=SanPaiInfoView.new(spCallBackFunc) + + + else + OutCardCallBackFunc() + end + + + + end + + +end + + + + +--更新手牌 +function M:UpdateHandCards(list) + self.card_list = {} + self._area_handcard_list:RemoveChildren(0, -1, true) + + self.outcard_button = nil + + local CountCards = {} + for i = 1, #list do + CountCards[list[i].index_X] = CountCards[list[i].index_X] == nil and 1 or CountCards[list[i].index_X] + 1 + end + for i = 1, #list do + local card_code = list[i].card_item + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeardMaJiang/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeardMaJiang/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 87 * self:getCardSize() + self.card_hight = 110 * self:getCardSize() + local card_view = NewCardView(btn_card, card_code, list[i].index_X, list[i].index_Y) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + btn_card.data = card_view + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + end + for j = #self.card_list, 1, -1 do + local card_view = self.card_list[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view, #CountCards) + end + if self._player.fz_list ~= nil then + for i = 1, #self._player.fz_list do + if self._player.fz_list[i].type == RB_FZTypeFLS.Kan then + self:UpdateKan(self._player.fz_list[i].card) + end + end + end + self:SetNotPutCard() +end + +-- -- +function M:onTouchBegin(context) + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + local button = context.sender + local card = button.data + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self:ShowHuTip(card.card_item) + end + card.startPos=card.btn_card.xy + printlog("拖动开始位置===>>>",card.startPos) + card.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeardMaJiang/203_', card.card_item) + -- card.btn_card.sortingOrder = 100 + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + card.btn_card.xy = Vector2.New(card.btn_card.x + 20, card.btn_card.y - 50) + card.touch_pos = xy - button.xy +end + +function M:onTouchMove(context) + local button = context.sender + local card = button.data + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + button.xy = xy - card.touch_pos +end + +--出牌提示动画 +function M:ChuPaiTiShi() + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self._view:GetController('chupai').selectedIndex = 1 + else + self._view:GetController('chupai').selectedIndex = 0 + end +end +-- 删手牌 +function M:DeleteHandCard(carditem) + local card = nil + if self.outcard_button ~= nil and carditem == self.outcard_button.card_item then + list_remove(self.card_list, self.outcard_button) + self._area_handcard_list:RemoveChild(self.outcard_button.btn_card, true) + + card = self.outcard_button + self.outcard_button = nil + else + for i = 1, #self.card_list do + local card_view = self.card_list[i] + if carditem == card_view.card_item then + card_view.btn_card.touchable = false + list_remove(self.card_list, card_view) + card = card_view + --card_view.btn_card:RemoveFromParent() + self._area_handcard_list:RemoveChild(card_view.btn_card, true) + break + end + end + end + if card ~= nil then + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + end + end + --self:UpdateHandCardsPos() +end +--更新手牌的坎 +function M:UpdateKan(card) + for i = 1, #self.card_list do + local card_view = self.card_list[i] + if card_view.card_item == card then + card_view.btn_card.touchable = false + card_view.btn_card:GetController('Kan').selectedIndex = 1 + end + end +end + +-- 手牌更新位置方法 self.card_list 里面的对象 NewCardView,index_X index_Y 就是xy序号 +function M:UpdateHandCardsPos() + --得到有 多少列 + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.old_postion = self:GetHandCardPos(card_view, #CountCards) + card_view.btn_card:TweenMove(card_view.old_postion, 0.3) + end + self:ShowHuTip() +end + +--刷新手牌字体 +function M:UpdateCardDisplay() + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + card_view.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeardMaJiang/201_', card_view.card_item) + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, #CountCards), 0.3) + end +end +--更新手牌大小 +function M:UpdateCardSize() + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + card_view.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeardMaJiang/201_', card_view.card_item) + card_view.btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + card_view.btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 99 * self:getCardSize() + self.card_hight = 121 * self:getCardSize() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, #CountCards), 0.3) + end +end + +function M:UpdateIsOnClick(isOut) + self._view.touchable = isOut +end + +-- 结束 拖拽事件 +-- 根据牌结束点的位置 判断是出牌还是调整位置 button.xy 和 牌的xy比较 +function M:__OnDragEnd(context) + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + if self.outcard_button then + self.outcard_button = nil + end + local button = context.sender + local card = button.data + -- card.btn_card.sortingOrder = 0 + local _room = DataManager.CurrenRoom + + if (button.y < -320 and _room ~= nil and _room.curren_outcard_seat == _room.self_player.seat) then + button.touchable = false + self.outcard_button = card + self:UpdateIsOnClick(false) + self._mainView:OutCard(card.card_item) + else + local isChangeCard = false + self.outcard_button = nil + card.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeardMaJiang/201_', card.card_item) + self._area_handcard_list:AddChild(button) + if #self.card_list == 1 then + isChangeCard = false + self:UpdateHandCardsPos() + return + end + + printlog("拖动结束位置为===>>>",card.startPos) + card.btn_card.xy=card.startPos + + + end +end + +--改变手牌排列发给服务器 +function M:SendChangeCard(...) + local list = {} + for i = 1, #self.card_list do + local data = {} + data.card = self.card_list[i].card_item + data.X = self.card_list[i].index_X + data.Y = self.card_list[i].index_Y + list[#list + 1] = data + end + self._mainView:ChangeCards(list) +end + +--计算手牌位置 +function M:GetHandCardPos(cards_view, cards) + local x, y = 0, 0 + local card_width = self.card_width -- 牌的宽度 + local middle_x = self._area_handcard_list.width / 2 + local start_x = middle_x - (cards / 2 * (card_width)) + x = start_x + (card_width) * (cards_view.index_X - 1) + + if self:getCardSize() == 1.2 then + --y = 90 - (85 * cards_view.index_Y) + y = (115 * cards_view.index_Y)-450 + elseif self:getCardSize() == 1 then + y = (115 * cards_view.index_Y)-450 + --printlog("Y坐标==>>>",y) + elseif self:getCardSize() == 0.8 then + -- y = 100 - (65 * cards_view.index_Y) + y = (115 * cards_view.index_Y)-450 + end + if cards_view.index_Y>1 then + --y=y-15 + end + return Vector2.New(x, y) +end + +--更新 吃碰 +function M:UpdateFzList1(fz_list) + self._area_fz_list:RemoveChildren(0, -1, true) + for i = 1, #fz_list do + local fzitem = nil + if fz_list[i].type ~= RB_FZTypeFLS.Kan then + fzitem = UIPackage.CreateObjectFromURL('ui://Main_RunBeardMaJiang/Component1') + fzitem:RemoveChildren(0, -1, true) + end + if fz_list[i].type == RB_FZTypeFLS.Chi or fz_list[i].type == RB_FZTypeFLS.Bi then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeardMaJiang/Fz_0_3') + fzcards:GetChild('card_' .. 1).icon = self:getCardItem('ui://Main_RunBeardMaJiang/202_', fz_list[i].active_card) + fzcards:GetController('c2').selectedIndex = 1 + fzcards:GetChild('card_' .. 2).icon = self:getCardItem('ui://Main_RunBeardMaJiang/202_', fz_list[i].opcard[1]) + fzcards:GetChild('card_' .. 3).icon = self:getCardItem('ui://Main_RunBeardMaJiang/202_', fz_list[i].opcard[2]) + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZTypeFLS.Peng then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeardMaJiang/Fz_0_3') + for j = 1, 3 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeardMaJiang/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZTypeFLS.Wei then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeardMaJiang/Fz_0_3') + fzcards:GetController('c1').selectedIndex = 1 + for j = 1, 3 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeardMaJiang/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZTypeFLS.ChouWei then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeardMaJiang/Fz_0_3') + fzcards:GetController('c1').selectedIndex = 1 + for j = 1, 3 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeardMaJiang/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZTypeFLS.Zhao or fz_list[i].type == RB_FZTypeFLS.SZhao or fz_list[i].type == RB_FZTypeFLS.Gang or fz_list[i].type == RB_FZTypeFLS.SGang then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeardMaJiang/Fz_0_4') + for j = 1, 4 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeardMaJiang/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + --[[elseif fz_list[i].type == RB_FZTypeFLS.Gang or fz_list[i].type == RB_FZTypeFLS.SGang then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeardMaJiang/Fz_0_4') + for j = 1, 4 do + if j == 4 then + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeardMaJiang/202_', fz_list[i].card) + else + fzcards:GetChild('card_' .. j).icon = 'ui://Main_RunBeardMaJiang/202_1_300' + end + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem)--]] + end + end +end + +function M:ClearOutCard() + self._area_outcard_list:RemoveChildren(0, -1, true) +end +--出牌 +function M:UpdateOutCardList(outcard) + self._area_outcard_list:RemoveChildren(0, -1, true) + local outcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeardMaJiang/Gcm_OutCard') + if outcard == 0 then + outcards:GetChild('icon').icon = 'ui://Main_RunBeardMaJiang/202_1_300' + else + outcards:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeardMaJiang/203_', outcard) + end + outcards.x, outcards.y = 0, 0 + self._area_outcard_list:AddChild(outcards) +end + +--弃牌 +function M:UpdateQiPai(qi_list) + self._area_qipai_list:RemoveChildren(0, -1, true) + for i = 1, #qi_list do + local qicards = UIPackage.CreateObjectFromURL('ui://Main_RunBeardMaJiang/Qipai') + qicards:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeardMaJiang/202_', qi_list[i]) + self._area_qipai_list:AddChild(qicards) + end +end + +--摸牌动画 +function M:PlayingOutCardAnima(card) + if (self._area_outcard_list ~= nil and self._area_outcard_list.numChildren > 0) then + self._area_outcard_list:GetChildAt(0):GetChild('icon').icon = self:getCardItem('ui://Main_RunBeardMaJiang/202_', card) + self._view:GetTransition('t0'):Play() + end + coroutine.start( + function() + coroutine.wait(0.1) + self:ClearOutCard() + end + ) +end + +--得到设置的牌字体 +function M:getCardItem(card_1, card_2) + --[[if self._room.change_card_display ~= nil then + return card_1 .. self._room.change_card_display .. card_2 + else + return card_1 .. '2_' .. card_2 + end--]] + return card_1 .. '1_' .. card_2 +end +--得到设置的牌大小 +function M:getCardSize() + if self._room.change_card_size ~= nil then + return 1.2--self._room.change_card_size + else + return 1.2 + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/fulushou/main/ZPProtocol.lua b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPProtocol.lua new file mode 100644 index 00000000..7c0b7ff3 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPProtocol.lua @@ -0,0 +1,36 @@ +local Protocol = { + -- 通知服务器出牌 + GAME_DIS_CARD = "611", + -- 通知服务器提示选择行为 + GAME_ACTION = "612", + -- 通知服务器手牌队形改变 + GAME_CHANGE_CARD = "613", + -- 通知服务器牌字体改变 + GAME_CHANGE_TYPEfACE = "615", + + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + -- 出牌事件 + GAME_EVT_DISCARD = "812", + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + -- action 事件 + GAME_EVT_ACTION = "815", + -- 胡牌事件 + GAME_EVT_HU = "816", + -- 结算 + GAME_EVT_RESULT1 = "817", + -- 弃牌 + GAME_EVT_QIPAI = "818", + -- 抓牌 + GAME_EVT_DRAW = "819", + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + --第二十一张牌 + GAME_EVT_ADD_CARD = "821", + +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/fulushou/main/ZPSettingView.lua b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPSettingView.lua new file mode 100644 index 00000000..76a961b5 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPSettingView.lua @@ -0,0 +1,330 @@ +local SettingView = require('Game.View.SettingView') +local ZPTableBG = import('.ZPTableBG') + +local ZPSettingView = { + -- 修改牌字体 + onEXMainCallback = nil, + -- 修改手牌大小 + onUpdataCardSizeCallback = nil, + -- 语音 + onEXVoiceCallback = nil, + -- 快速出牌 + onEXChuPaiCallback = nil, + -- 方言 + onEXFangYanCallback = nil +} +local M = ZPSettingView + +function ZPSettingView.new(blur_view, index, open_social) + setmetatable(SettingView, {__index = BaseWindow}) + setmetatable(M, {__index = SettingView}) + local self = setmetatable({}, {__index = M}) + self.class = 'ZPSettingView' + self._currenIndex = 0 + self._blur_view = blur_view + self.onCallback = event('onCallback', true) + self.stateIndex = 0 + self.cd_time = 0 + self._btn_dismiss_room_enable = false + self._close_destroy = true + self.bigSize = 1.2 + self.mediumSize = 1 + self.smallSize = 0.8 + self._full = true + self._anim_pop = 2 + self._open_social = open_social + self:init('ui://Main_RunBeardMaJiang/New_SettingWindow') + return self +end + +function M:init(url) + SettingView.init(self, url) + if DataManager.CurrenRoom == nil then + return + end + self._view = self._view:GetChild('showview') + + local view = self._view + local slider_sound = view:GetChild('slider_sound') + local slider_music = view:GetChild('slider_music') + -- local btn_music = view:GetChild('btn_music') + -- local btn_sound = view:GetChild('btn_sound') + + -- btn_music.selected = (GameApplication.Instance.MusicValue < 5 and false or true) + slider_sound.value = GameApplication.Instance.SoundValue + slider_music.value = GameApplication.Instance.MusicValue + -- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true + + slider_music.onChanged:Add( + function() + GameApplication.Instance.MusicValue = slider_music.value + -- btn_music.selected = GameApplication.Instance.MusicValue < 5 and false or true + end + ) + + slider_sound.onChanged:Add( + function() + GameApplication.Instance.SoundValue = slider_sound.value + -- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true + end + ) + + local room = DataManager.CurrenRoom + local c1 = self._view:GetController('cards') + local size = self._view:GetController('size') + if room.change_card_size ~= nil then + + if room.change_card_size == self.bigSize then + size.selectedIndex = 0 + elseif room.change_card_size == self.mediumSize then + size.selectedIndex = 1 + elseif room.change_card_size == self.smallSize then + size.selectedIndex = 2 + end + else + room.change_card_size = 0 + size.selectedIndex = 0 + end + if room.change_card_display ~= nil then + local _str = string.sub(room.change_card_display, 1, 1) + local n = tonumber(_str) + if n == 1 then + c1.selectedIndex = 1 + elseif n == 2 then + c1.selectedIndex = 0 + elseif n == 8 then + c1.selectedIndex = 3 + else + c1.selectedIndex = 2 + end + end + if self._open_social then + self._view:GetChild('n78').visible = true + self._view:GetChild('n88').visible = true + self._view:GetChild('n57').visible = true + + local yuyin = self._view:GetController('yuyin') + local chupai = self._view:GetController('chupai') + local fangyan = self._view:GetController('fangyan') + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. room.game_id .. 'yuyin') + local json_data1 = Utils.LoadLocalFile(user_id .. room.game_id .. 'chupai') + local json_data2 = Utils.LoadLocalFile(user_id .. room.game_id .. 'fangyan') + yuyin.selectedIndex = 1 + chupai.selectedIndex = 1 + room.yuyin_typeface = 1 + room.chupai_typeface = 1 + fangyan.selectedIndex = 1 + room.fangyan_typeface = 1 + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + room.yuyin_typeface = typeface + end + if json_data1 ~= nil then + local _data = json.decode(json_data1) + local typeface = _data['game_typeface'] + room.chupai_typeface = typeface + end + if json_data2 ~= nil then + local _data = json.decode(json_data2) + local typeface = _data['game_typeface'] + room.fangyan_typeface = typeface + end + if room.yuyin_typeface ~= nil then + yuyin.selectedIndex = room.yuyin_typeface + end + if room.chupai_typeface ~= nil then + chupai.selectedIndex = room.chupai_typeface + end + if room.fangyan_typeface ~= nil then + fangyan.selectedIndex = room.fangyan_typeface + end + else + --self._view:GetChild('n78').visible = false + -- self._view:GetChild('n88').visible = false + --self._view:GetChild('n57').visible = false + end + + c1.onChanged:Set( + function() + if self.onEXMainCallback then + self.onEXMainCallback(c1.selectedIndex + 1) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = c1.selectedIndex + 1 + local key = user_id .. room.game_id + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + + size.onChanged:Set( + function() + if self.onUpdataCardSizeCallback then + self.onUpdataCardSizeCallback(size.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_cardsize'] = size.selectedIndex + local key = user_id .. room.game_id .. 'cardsize_new' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + if self._open_social then + self._view:GetChild('n78').visible = false + local yuyin = self._view:GetController('yuyin') + local chupai = self._view:GetController('chupai') + local fangyan = self._view:GetController('fangyan') + yuyin.onChanged:Set( + function() + if self.onEXVoiceCallback then + room.yuyin_typeface = yuyin.selectedIndex + self.onEXVoiceCallback(yuyin.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = yuyin.selectedIndex + local key = user_id .. room.game_id .. 'yuyin' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + chupai.onChanged:Set( + function() + if self.onEXChuPaiCallback then + room.chupai_typeface = chupai.selectedIndex + self.onEXChuPaiCallback(chupai.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = chupai.selectedIndex + local key = user_id .. room.game_id .. 'chupai' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + fangyan.onChanged:Set( + function() + if self.onEXFangYanCallback then + room.fangyan_typeface = fangyan.selectedIndex + self.onEXFangYanCallback(fangyan.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = fangyan.selectedIndex + local key = user_id .. room.game_id .. 'fangyan' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + else + --self._view:GetChild('n78').visible = false + end +end + +function M:Show() + SettingView.Show(self) + self:UpdateIndex() + self:UpdateCardSizeIndex() +end +--根据存的数据改变设置里面的控制器 + +function M:UpdateIndex() + local room = DataManager.CurrenRoom + local c1 = self._view:GetController('cards') + if room.change_card_display ~= nil then + local _str = string.sub(room.change_card_display, 1, 1) + local n = tonumber(_str) + if n == 7 then + n = 2 + end + if n == 1 then + c1.selectedIndex = 1 + elseif n == 2 then + c1.selectedIndex = 0 + elseif n == 8 then + c1.selectedIndex = 3 + else + c1.selectedIndex = 2 + end + end +end +function M:UpdateCardSizeIndex() + local room = DataManager.CurrenRoom + local size = self._view:GetController('size') + if room.change_card_size ~= nil then + if room.change_card_size == self.bigSize then + size.selectedIndex = 0 + elseif room.change_card_size == self.mediumSize then + size.selectedIndex = 1 + elseif room.change_card_size == self.smallSize then + size.selectedIndex = 2 + end + else + size.selectedIndex = 0 + end +end + +function M:SetBtnUpdateCardEnable(enable) + self._view:GetChild('n37').enabled = enable + self._view:GetChild('n38').enabled = enable + self._view:GetChild('n49').enabled = enable +end + +function M:FillBgSection(cb, game_id, default_bg, room, qihu) + if (default_bg == nil) then + default_bg = 1 + end + local view = self._view + local lst_bg = view:GetChild('lst_bg') + local ctr_bg = view:GetController('bg') + for i = 1, #bg_config_zipai_majiang do + local config = bg_config_zipai_majiang[i] + local item = lst_bg:AddItemFromPool() + item.icon = config.thumb + if i > 3 then + ctr_bg:AddPage(i - 1) + end + item.onClick:Add( + function() + cb(config.url) + ctr_bg.selectedIndex = i - 1 + if qihu ~= nil then + self._blur_view:GetChild('di_text').text = room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起' + self._blur_view:GetController('bg_state').selectedIndex = i - 1 + end + end + ) + end + self._game_id = game_id + self._bg = ZPTableBG.GetTableBG(game_id) + local index = 0 + if self._bg > 0 then + lst_bg.selectedIndex = self._bg - 1 + index = lst_bg.selectedIndex + else + ctr_bg.selectedIndex = default_bg - 1 + index = ctr_bg.selectedIndex + end + if qihu ~= nil then + -- self._blur_view:GetChild('di_text').text = room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起' + if index < 3 then + self._blur_view:GetController('bg_state').selectedIndex = index + else + self._blur_view:GetController('bg_state').selectedIndex = 0 + end + end +end +function M:Destroy() + local bg_id = self._view:GetController('bg').selectedIndex + 1 + if self._bg ~= bg_id then + self._bg = bg_id + ZPTableBG.SaveTableBG(self._game_id, self._bg) + end + SettingView.Destroy(self) +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/fulushou/main/ZPTableBG.lua b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPTableBG.lua new file mode 100644 index 00000000..820ad76d --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/fulushou/main/ZPTableBG.lua @@ -0,0 +1,84 @@ +-- 记录各游戏的桌面背景 +json = require 'cjson' + +local ZPTableBG = {} + +local M = ZPTableBG + bg_config_zipai_majiang = { + {id = 1, url = "base/main_zipaimajiang/bg/bg_1", thumb = "ui://Main_RunBeardMaJiang/table_bg1"}, + {id = 2, url = "base/main_zipaimajiang/bg/bg_2", thumb = "ui://Main_RunBeardMaJiang/table_bg2"}, + {id = 3, url = "base/main_zipaimajiang/bg/bg_3", thumb = "ui://Main_RunBeardMaJiang/table_bg3"}, + -- {id = 4, url = "base/main_zipai/bg/bg_gold", thumb = "ui://Main_RunBeardMaJiang/table_bg3"}, + -- {id = 5, url = "base/main_zipai/bg/bg8", thumb = "ui://Main_RunBeardMaJiang/table_bg1"}, + -- {id = 6, url = "base/tablebg/bg/bg1", thumb = "ui://Common/b04"}, +} + +local function GetBG(data, game_id) + local bg_id = 0 + for i = 1, #data do + if data[i].game_id == game_id then + bg_id = data[i].bg_id + break + end + end + return bg_id +end +local function SetBG(data, game_id, bg_id) + local contain_key = false + for i = 1, #data do + if data[i].game_id == game_id then + contain_key = true + if data[i].bg_id ~= bg_id then + data[i].bg_id = bg_id + break + end + end + end + if not contain_key then + local _data = {} + _data.game_id = game_id + _data.bg_id = bg_id + table.insert(data, _data) + end +end + +function ZPTableBG.GetTableBG(game_id) + local id = -1 + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + local config_data = json.decode(json_data) + id = GetBG(config_data, game_id) + end + return id +end + +function ZPTableBG.LoadTableBG(id, game_id, main_view) + local bg_id = M.GetTableBG(game_id) + local index + if bg_id > 0 then + index = bg_id + else + index = id + end + + if index>3 then + -- body + index=1 + end + local url = bg_config_zipai_majiang[index].url + LoadGameBg(url, main_view) +end + +function ZPTableBG.SaveTableBG(game_id, bg_id) + local config_data + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + config_data = json.decode(json_data) + else + config_data = {} + end + SetBG(config_data, game_id, bg_id) + Utils.SaveLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code, json.encode(config_data)) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/hsrunbeard/EXGameController.lua b/lua_probject/extend_project/extend/zipai/hsrunbeard/EXGameController.lua new file mode 100644 index 00000000..de6ee1ea --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/hsrunbeard/EXGameController.lua @@ -0,0 +1,502 @@ +local RB_Protocol = import(".Protocol") +local FZTipList = require("main.zipai.FZData") +local RB_GameEvent = import(".RunBeard_GameEvent") +local M = {} + +--- Create a new HZ_GameController +function M.new() + setmetatable(M,{__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("汉寿跑胡子") + self.class = "RB_GameController" + return self +end + +function M:init(name) + GameController.init(self,name) + + self._eventmap[RB_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[RB_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[RB_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[RB_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[RB_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[RB_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + + self._eventmap[RB_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[RB_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[RB_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[RB_Protocol.GAME_EVT_QIPAI] = self.OnEventQIPAI + self._eventmap[RB_Protocol.GAME_EVT_ADD_CARD] = self.OnAddCard + self._eventmap[RB_Protocol.GAME_EVENT_XIPAI] = self.OnEventXiPai + self._eventmap[RB_Protocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim + +end + +function M:SendXiPaiAction(callBack) + local _data = {} + local _client = ControllerManager.GameNetClinet + _client:send(RB_Protocol.GAME_XIPAI, _data) + self.XiPaiCallBack=callBack +end + +function M:OnEventXiPai(evt_data) + if evt_data["result"]==0 then + if self.XiPaiCallBack then + self.XiPaiCallBack() + end + else + ViewUtil.ErrorTip(1000000,"申请洗牌失败") + end + +end + +function M:OnEventXiPaiAnim(evt_data) + printlog("洗牌动画===》》》》") + pt(evt_data) + local playeridList = evt_data["list"] + local isXiPai=false + if playeridList and #playeridList>0 then + for i=1,#playeridList do + local p = self._room:GetPlayerById(playeridList[i]) + if p== self._room.self_player then + isXiPai=true + end + end + end + + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.EventXiPai,isXiPai) + end) +end + +-- 发送出牌指令到服务器 +function M:SendOutCard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_DIS_CARD, _data) + end + +end +--GAME_CHANGE_CARD GAME_DIS_CARD +function M:SendChangeCards( card_list ) + local _data = {} + if card_list then + _data["card_list"] = card_list + else + _data["card_list"]={} + end + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + printlog("SendChangeCards=======》》》") + pt(_data) + _client:send(RB_Protocol.GAME_CHANGE_CARD, _data) + end +end + +function M:SendChangeTypeFace(TypeFace) + -- body + local _data = {} + _data["typeface"] = TypeFace + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_CHANGE_TYPEfACE, _data) + end +end + + +function M:ConformToNextGame( ) + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_EVT_CHUI) + end +end + +-- 发送放子选择到服务器 +function M:SendAction(id,num) + local _data = {} + _data["id"] = id + if num ~=nil then + _data["biid"] = num + end + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_ACTION, _data) + end +end + +function M:OnEventSendCards(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + _room.curren_round = _room.curren_round + 1 + if _room.curren_round > 0 then _room.playing = true end + + local handcards = {} + if evt_data.card_list and #evt_data.card_list>0 then + handcards = evt_data["card_list"] + else + ViewUtil.ErrorTip(100000,"发牌数据异常") + end + + local p = _room.self_player + local seat =nil + if evt_data.bank_seat then + seat = evt_data["bank_seat"] + else + ViewUtil.ErrorTip(100001,"发牌座位异常") + end + + _room.banker_seat = seat + for i=1,#_room.player_list do + _room.self_player.handcard_list ={} + _room.self_player.card_list = {} + _room.player_list[i].hand_left_count = 20 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + _room.player_list[i].outcard_list = {} + _room.player_list[i].hu_xi = 0 + end + self._cacheEvent:Enqueue(function() + _room.self_player.handcard_list=handcards + self._room.self_player.hand_left_count = #handcards + DispatchEvent(self._dispatcher,RB_GameEvent.SendCards, p) + --print("发牌结束=====打开标志") + ControllerManager.IsSendCard=true + end) +end + +function M:OnEventOutCard(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + if(seat == _room.self_player.seat) then + list_remove(_room.self_player.handcard_list,card) + end + p.DiceCard = card + p.hand_left_count = p.hand_left_count -1 + DispatchEvent(self._dispatcher,RB_GameEvent.OutCard, p,card) + end) +end + +function M:OnEventQIPAI(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + if(not p.outcard_list) then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + DispatchEvent(self._dispatcher,RB_GameEvent.QiCard, seat,card) + end) +end + +function M:OnEventTakeCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + if card ~=0 then + p.DiceCard = card + end + DispatchEvent(self._dispatcher,RB_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnAddCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local p = _room:GetPlayerBySeat(seat) + + self._cacheEvent:Enqueue(function() + p.DiceCard = 0 + p.hand_left_count = p.hand_left_count +1 + if (seat == _room.self_player.seat) then + _room.self_player.handcard_list[#_room.self_player.handcard_list+1] = card + end + DispatchEvent(self._dispatcher,RB_GameEvent.AddCard, seat, card) + end) +end + +function M:OnEventOutHint(evt_data) + self._cacheEvent:Enqueue(function() + + DispatchEvent(self._dispatcher,RB_GameEvent.OutHint) + end) + +end + +function M:OnEventTurn(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + local uid = evt_data["uid"] + for i=1,#list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + tip.bi_list = dtip["bi_list"] + if (dtip["opcard"]) then + local opcard = dtip["opcard"] + tip.OpCard = opcard + table.sort(tip.OpCard) + tip.OpCard[3] = tip.Card + end + tiplist:AddTip(tip) + + end + DispatchEvent(self._dispatcher,RB_GameEvent.FZTips, tiplist,uid) + end) +end + +function M:OnEventFzAction(evt_data) + local _room = self._room + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local ftype = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + local huxi = evt_data["hu_xi"] + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local isNeedDelHandCard =0 + p.hu_xi = huxi + local fz = {} + fz.card = card + fz.type = ftype + fz.active_card = actice_card + fz.from_seat = from_seat + fz.opcard =opcard + local remove_num = #opcard + if ftype == RB_FZType.Chi then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Bi then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + list_remove(_room.self_player.handcard_list,fz.card) + end + elseif ftype == RB_FZType.Peng then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Kan then + if (p == _room.self_player) then + if #opcard==2 then + _room.self_player.handcard_list[#_room.self_player.handcard_list+1] = card + end + p.fz_list[#p.fz_list+1] = fz + end + elseif ftype == RB_FZType.ChouWei then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,2 do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Wei then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Pao then + + if (p == _room.self_player) then + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + if p.fz_list[i].type == RB_FZType.Kan then + isNeedDelHandCard =3 + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + remove_num= 0 + p.fz_list[i].type= RB_FZType.Pao + end + end + local num =0 + for i=1,#_room.self_player.handcard_list do + if card == _room.self_player.handcard_list[i] then + num=num+1 + end + end + if num>0 then + isNeedDelHandCard =num + + for i=1,num do + list_remove(_room.self_player.handcard_list,card) + end + local isAddTi =false + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Pao + isAddTi=true + remove_num= 0 + end + end + if isAddTi==false then + p.fz_list[#p.fz_list+1] = fz + end + end + + else + local num =0 + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Pao + num=1 + remove_num= 0 + end + end + if num==0 then + p.fz_list[#p.fz_list+1] = fz + end + end + + elseif ftype == RB_FZType.Ti then + + if (p == _room.self_player) then + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + if p.fz_list[i].type == RB_FZType.Kan then + isNeedDelHandCard =3 + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + remove_num= 0 + p.fz_list[i].type= RB_FZType.Ti + end + end + local num =0 + for i=1,#_room.self_player.handcard_list do + if card == _room.self_player.handcard_list[i] then + num=num+1 + end + end + if num>0 then + isNeedDelHandCard =num + + for i=1,num do + list_remove(_room.self_player.handcard_list,card) + end + local isAddTi =false + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Ti + remove_num= 0 + isAddTi=true + end + end + if isAddTi==false then + p.fz_list[#p.fz_list+1] = fz + end + end + + else + local num =0 + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Ti + remove_num= 0 + num=1 + end + end + if num==0 then + p.fz_list[#p.fz_list+1] = fz + end + + end + + end + + + p.hand_left_count = p.hand_left_count - remove_num + if fz.type == RB_FZType.Pao or fz.type == RB_FZType.Ti then + coroutine.start(function() + coroutine.wait(0.5) + DispatchEvent(self._dispatcher,RB_GameEvent.FangziAction, fz, p,isNeedDelHandCard) + end) + else + DispatchEvent(self._dispatcher,RB_GameEvent.FangziAction, fz, p,isNeedDelHandCard) + end + + end) +end + +function M:OnEventHu(evt_data) + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + -- print(win_p.hand_left_count) + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + table.sort( win_p.card_list, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher,RB_GameEvent.ZPHuCard, evt_data["seat"],evt_data["from_seat"],cards) + end) +end + +function M:OneventResult1(evt_data) + local over = evt_data.type + --0:小结算 1:小大结算 2:大结算 + self._room.playing = false + if 0 == over then + local result = evt_data.result + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil,true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/hsrunbeard/EXGameInfo.lua b/lua_probject/extend_project/extend/zipai/hsrunbeard/EXGameInfo.lua new file mode 100644 index 00000000..c8b19643 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/hsrunbeard/EXGameInfo.lua @@ -0,0 +1,379 @@ +local EXGameInfo = {} + +local M = EXGameInfo + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = 'EXGameInfo' + UIPackage.AddPackage('extend/zipai/hsrunbeard/ui/Info_Poker_HSRunBeard') + + return self +end + +function M:FillData() + self._maxPlayer = 3 -- 默认玩家人数 + self._roundChoice = 2 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL('ui://Info_Poker_HSRunBeard/Cgm_create_room') + + + local btn_jia = self._config:GetChild('btn_jia') + local btn_jian = self._config:GetChild('btn_jian') + local btn_jia1 = self._config:GetChild('btn_jia1') + local btn_jian1 = self._config:GetChild('btn_jian1') + local btn_jia2 = self._config:GetChild('btn_jia2') + local btn_jian2 = self._config:GetChild('btn_jian2') + local fS=self._config:GetChild('btn_round8'):GetChild("title") + fS.text="1局" + fS=self._config:GetChild('btn_round16'):GetChild("title") + fS.text="8局" + btn_jia.onClick:Set( + function() + if self._config:GetController('tun').selectedIndex ~= 5 then + self._config:GetController('tun').selectedIndex = self._config:GetController('tun').selectedIndex + 1 + end + if self._config:GetController('tun').selectedIndex == 5 then + btn_jia.touchable = false + btn_jia.grayed = true + end + if self._config:GetController('tun').selectedIndex > 0 then + btn_jian.touchable = true + btn_jian.grayed = false + end + end + ) + btn_jian.onClick:Set( + function() + if self._config:GetController('tun').selectedIndex ~= 0 then + self._config:GetController('tun').selectedIndex = self._config:GetController('tun').selectedIndex - 1 + end + if self._config:GetController('tun').selectedIndex == 0 then + btn_jian.touchable = false + btn_jian.grayed = true + end + if self._config:GetController('tun').selectedIndex < 5 then + btn_jia.touchable = true + btn_jia.grayed = false + end + end + ) + btn_jia1.onClick:Set( + function() + local cur_tun = tonumber(self._config:GetChild("shu1").text) + if cur_tun < 15 then + + cur_tun = cur_tun + 1 + self._config:GetChild("shu1").text = tostring(cur_tun) + + if cur_tun == 15 then + btn_jia1.touchable = false + btn_jia1.grayed = true + else + btn_jian1.touchable = true + btn_jian1.grayed = false + end + end + end + ) + btn_jian1.onClick:Set( + function() + local cur_tun = tonumber(self._config:GetChild("shu1").text) + if cur_tun > 1 then + + cur_tun = cur_tun - 1 + self._config:GetChild("shu1").text = tostring(cur_tun) + + if cur_tun == 1 then + btn_jian1.touchable = false + btn_jian1.grayed = true + else + btn_jia1.touchable = true + btn_jia1.grayed = false + end + end + end + ) + + btn_jia2.onClick:Set( + function() + if self._config:GetController('tun').selectedIndex ~= 5 then + self._config:GetController('tun').selectedIndex = self._config:GetController('tun').selectedIndex + 1 + end + if self._config:GetController('tun').selectedIndex == 5 then + btn_jia2.touchable = false + btn_jia2.grayed = true + end + if self._config:GetController('tun').selectedIndex > 0 then + btn_jian2.touchable = true + btn_jian2.grayed = false + end + end + ) + btn_jian2.onClick:Set( + function() + if self._config:GetController('tun').selectedIndex ~= 0 then + self._config:GetController('tun').selectedIndex = self._config:GetController('tun').selectedIndex - 1 + end + if self._config:GetController('tun').selectedIndex == 0 then + btn_jian2.touchable = false + btn_jian2.grayed = true + end + if self._config:GetController('tun').selectedIndex < 5 then + btn_jia2.touchable = true + btn_jia2.grayed = false + end + end + ) + + + if oldGameVersion ==1 then + self._config:GetController("xipai").selectedIndex=0 + end + + if oldGameVersion==2 then + self._config:GetController("xipai").selectedIndex=1 + + self.xipaiValueText=self._config:GetChild('xipaifen') + self.xipaiValue=1 + + local btn_cr = self._config:GetChild('sdsrbtn') + btn_cr.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.xipaiValueText.text=value/1000 + self.xipaiValue=value/1000 + + end, 3, nil) + gniv:Show() + + + end + ) + + end + + +end +local _help_url = 'ui://Info_Poker_HSRunBeard/Com_help' +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_Poker_HSRunBeard/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_Poker_HSRunBeard/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list = {"三人玩法","二人玩法"} +function M:GetPlayList() + return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local wanfa_C = 1 + local round = _config:GetController('round').selectedIndex == 0 and 1 or 2 + local Cost = _config:GetController('Cost').selectedIndex + local tun = tonumber(_config:GetChild("shu1").text) + local fengding = _config:GetController('fengding').selectedIndex + local tuanyuan = _config:GetController('tuanyuan').selectedIndex + local hanghangxi = _config:GetController('hanghangxi').selectedIndex + local siqi = _config:GetController('siqi').selectedIndex + local shuahou = _config:GetController('shuahou').selectedIndex + local huangfan = _config:GetController('huangfan').selectedIndex + local jiaxingxing = _config:GetController('jiaxingxing').selectedIndex + local tinghu = _config:GetController('tinghu').selectedIndex + local duizifu = _config:GetController('duizifu').selectedIndex + local back = _config:GetController('Back').selectedIndex + local yuan = _config:GetController('yuan').selectedIndex + local tianhu = _config:GetController('tianhu').selectedIndex + local dihu = _config:GetController('dihu').selectedIndex + local haihu = _config:GetController('haihu').selectedIndex + local renshu = _config:GetController('play_list').selectedIndex +2 + local qupai = _config:GetController('qupai').selectedIndex + local dhdf = 0 + local _data = {} + _data['opt'] = round -- 1 2 8局 16 局 + _data['mode'] = 2 -- 1 全名堂 2 红黑点 3 多红多番 + _data['AA'] = Cost + _data['maxPlayers'] = renshu + + if wanfa_C == 0 then + _data['tun'] = tun -- 充囤 0 1 2 3 4 分别是 1 2 3 4 5 + _data['fengding'] = fengding -- 封顶 0 1 2 全名堂分别是 不封顶 100封顶 200封顶 + _data['tuanyuan'] = tuanyuan -- 大团圆 0 不选 1 选 + _data['hanghangxi'] = hanghangxi -- 行行息 0 不选 1 选 + _data['shuahou'] = shuahou -- 耍猴 0 不选 1 选 + _data['huangfan'] = huangfan -- 黄番 0 不选 1 选 + _data['jiaxingxing'] = jiaxingxing -- 假行行 0 不选 1 选 + _data['tinghu'] = tinghu -- 听胡 0 不选 1 选 + _data['siqi'] = siqi -- 四七红 0 不选 1 选 + _data['back'] = back -- 四七红 0 不选 1 选 + _data['yuan'] = yuan -- 四七红 0 不选 1 选 + elseif wanfa_C == 1 then + _data['tun'] = tun -- 充囤 0 1 2 3 4 5 分别是 0 1 2 3 4 5 + _data['fengding'] = fengding -- 封顶 0 1 2 红黑点分别是 不封顶 单局20封顶 单局 40封顶 + _data['duizifu'] = duizifu -- 对子胡 0 不选 1 选 + + _data['hh'] = _config:GetController('hh').selectedIndex + _data['dh'] = _config:GetController('dh').selectedIndex + _data['hw'] = _config:GetController('hw').selectedIndex + _data['wh'] = _config:GetController('wh').selectedIndex + _data['hd'] = _config:GetController('hd').selectedIndex + _data['wd'] = _config:GetController('wd').selectedIndex + _data['jhd'] = _config:GetController('jhd').selectedIndex + + _data['dhdf'] = dhdf + + elseif wanfa_C == 2 then + _data['tun'] = tun -- 充囤 0 1 2 3 4 5 分别是 0 1 2 3 4 5 + _data['tianhu'] = tianhu + _data['dihu'] = dihu + _data['haihu'] = haihu + _data['tinghu'] = tinghu + _data['huangfan'] = huangfan + _data['fengding'] = fengding -- 封顶 0 + end + if renshu == 2 then + _data['qupai'] = qupai + end + + local xi_pai=false + if oldGameVersion ==2 then + if _config:GetChild("xipai") then + xi_pai = _config:GetChild("xipai").selected + end + end + + _data['xi_pai'] = xi_pai + + local xi_pai_score=0 + if oldGameVersion==2 then + xi_pai_score=self.xipaiValue + end + + _data['xi_pai_score'] = xi_pai_score + + return _data +end + +function M:LoadConfigData(data) + local _config = self._config + + _config:GetController('play_list').selectedIndex = data.maxPlayers -2 + _config:GetController('round').selectedIndex = data.opt == 1 and 0 or 1 + _config:GetController('Cost').selectedIndex = data.AA + _config:GetController('renshu').selectedIndex = data.maxPlayers -2 + + data.hh = data.hh == nil and 1 or data.hh + data.dh = data.dh == nil and 1 or data.dh + data.hw = data.hw == nil and 1 or data.hw + data.wh = data.wh == nil and 1 or data.wh + data.hd = data.hd == nil and 1 or data.hd + data.wd = data.wd == nil and 1 or data.wd + data.jhd = data.jhd == nil and 1 or data.jhd + + data.dhdf = data.dhdf or 0 + + if data.mode == 1 then + _config:GetController('tun').selectedIndex = data.tun + _config:GetController('fengding').selectedIndex = data.fengding + _config:GetController('tuanyuan').selectedIndex = data.tuanyuan + _config:GetController('hanghangxi').selectedIndex = data.hanghangxi + _config:GetController('siqi').selectedIndex = data.siqi + _config:GetController('shuahou').selectedIndex = data.shuahou + _config:GetController('huangfan').selectedIndex = data.huangfan + _config:GetController('jiaxingxing').selectedIndex = data.jiaxingxing + _config:GetController('tinghu').selectedIndex = data.tinghu + _config:GetController('Back').selectedIndex = data.back + _config:GetController('yuan').selectedIndex = data.yuan + + elseif data.mode == 2 then + + _config:GetChild("shu1").text = tostring(data.tun) + + local btn_jian1 = _config:GetChild("btn_jian1") + local btn_jia1 = _config:GetChild("btn_jia1") + if data.tun == 1 then + btn_jian1.touchable = false + btn_jian1.grayed = true + else + btn_jian1.touchable = true + btn_jian1.grayed = false + end + if data.tun == 15 then + btn_jia1.touchable = false + btn_jia1.grayed = true + else + btn_jia1.touchable = true + btn_jia1.grayed = false + end + _config:GetController('fengding').selectedIndex = data.fengding + _config:GetController('duizifu').selectedIndex = data.duizifu + + _config:GetController('hh').selectedIndex = data.hh + _config:GetController('dh').selectedIndex = data.dh + _config:GetController('hw').selectedIndex = data.hw + _config:GetController('wh').selectedIndex = data.wh + _config:GetController('hd').selectedIndex = data.hd + _config:GetController('wd').selectedIndex = data.wd + _config:GetController('jhd').selectedIndex = data.jhd + + _config:GetController('dhdf').selectedIndex = data.dhdf + elseif data.mode == 3 then + + _config:GetController('haihu').selectedIndex = data.haihu + _config:GetController('tinghu').selectedIndex = data.tinghu + _config:GetController('tianhu').selectedIndex = data.tianhu + _config:GetController('dihu').selectedIndex = data.dihu + _config:GetController('huangfan').selectedIndex = data.huangfan + _config:GetController('tun').selectedIndex = data.tun + _config:GetController('fengding').selectedIndex = data.fengding + end + + if data.maxPlayers == 2 then + _config:GetController('qupai').selectedIndex = data.qupai + end + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected=data.xi_pai + end + + if oldGameVersion==2 then + self.xipaiValueText.text=data.xi_pai_score + self.xipaiValue=data.xi_pai_score + end +end + +function M:OnChangeOption(ctype) + IGameInfo.OnChangeOption(self, ctype) + + local play_list = self._config:GetController('play_list') + play_list.onChanged:Add( + function() + self._maxPlayer = play_list.selectedIndex +2 + self:ShowVariablePrice(ctype) + end + ) +end +return M diff --git a/lua_probject/extend_project/extend/zipai/hsrunbeard/EXMainView.lua b/lua_probject/extend_project/extend/zipai/hsrunbeard/EXMainView.lua new file mode 100644 index 00000000..c2cdfcf1 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/hsrunbeard/EXMainView.lua @@ -0,0 +1,1013 @@ +local SettingView = require('main.zipai.ZPSettingView') +local PlayerSelfCardInfoView = import('.PlayerSelfCardInfoView') +local PlayerCardInfoView = import('.PlayerCardInfoView') +local ZPMainView = require('main.zipai.ZPMainView') +local GameEvent = import('.RunBeard_GameEvent') +local RunBeard_ResultView = import('.RunBeard_ResultView') + +local M = {} +local Fix_Msg_Chat = { + '在搞么的,出牌撒', + '又掉线哒!', + '和你打牌太有味了', + '人呢?还搞不搞滴', + '哈哈,对不住了', + '稍等哈哈,马上就来', + '不要走,决战到天亮', + '牌打得不错嘛!', + '今朝这个方位硬是不好', + '不好意思临时有事,申请解散!' +} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M, {__index = ZPMainView}) + local self = setmetatable({}, {__index = M}) + self.class = 'RunBeard_MainView' + self._full = true + self:init() + return self +end + +function M:getCardItem(card_1, card_2) + if self._room.change_card_display ~= nil then + return card_1 .. self._room.change_card_display .. card_2 + else + return card_1 .. '2_' .. card_2 + end +end +function M:InitView(url) + local _room = self._room + self.Fix_Msg_Chat = Fix_Msg_Chat + ViewUtil.PlayMuisc('ChangDe_ZP', 'extend/zipai/hsrunbeard/sound/bg.mp3') + UIPackage.AddPackage('extend/zipai/hsrunbeard/ui/Extend_Poker_HSRunBeard') + ZPMainView.InitView(self, 'ui://Main_RunBeard/Main_' .. _room.room_config.people_num, false, false, 1.2, 15) + + self:PlayerChangeLineState() + SettingView.onEXMainCallback = handler(self, self.UpdateCardDisplay) + SettingView.onUpdataCardSizeCallback = handler(self, self.UpdateCardSize) + + for i = 1, #_room.player_list do + local p = _room.player_list[i] + local head = self._player_info[self:GetPos(p.seat)] + head:UpdateScore() + end + + if _room.playing or _room.curren_round > 0 then + self:ReloadRoom() + end + self._view:GetController('jushu').selectedIndex = 1 + self:setBtn() +end + +function M:setBtn() + local rightpanel = self._view:GetChild('right_panel') + local btn_rule = rightpanel:GetChild('btn_log') + local gcm_chat = self._view:GetChild('gcm_chat') + local _btn_chat = gcm_chat:GetChild('n1') + _btn_chat:GetChild('icon').icon = 'ui://Main_RunBeard/chat_img' + local btn_record = gcm_chat:GetChild('btn_record') + btn_record:GetChild('icon').icon = 'ui://Main_RunBeard/yuyin_img' + + if btn_rule ~= nil then + btn_rule.onClick:Set( + function() + if self.RuleView == nil or self.RuleView._is_destroy then + self.RuleView = RoomInfoView.new(self._room) + end + self.RuleView:Show() + end + ) + end + local btn_setting = self._view:GetChild('btn_setting') + btn_setting.onClick:Set( + function() + local _settingView = self:NewSettingView() + _settingView.stateIndex = (self._room.curren_round >= 1 and self._allow_dissmiss) and 2 or 1 + _settingView.cd_time = self.dismiss_room_cd_time + _settingView:Show() + + local room = DataManager.CurrenRoom + _settingView.onCallback:Add( + function(context) + local _gamectr = ControllerManager.GetController(GameController) + if (room.CurnrenState == StateType.Ready) then + _gamectr:LevelRoom( + function(response) + if (response.ReturnCode == 0) then + ViewManager.ChangeView(ViewManager.View_Lobby) + GameApplication.Instance:ShowTips('房间已解散!') + end + end + ) + else + _gamectr:AskDismissRoom( + function(res) + ViewUtil.ErrorTip(res.ReturnCode, '') + end + ) + end + end + ) + end + ) + local tex_roomid = rightpanel:GetChild('tex_roomid') + tex_roomid.text = self._room.room_id + if self._room.room_config.isHidden and self._room.room_config.isHidden == 1 then + tex_roomid.text = "000000" + end +end + +function M:NewPlayerCardInfoView(view, index) + if index == 1 then + return PlayerSelfCardInfoView.new(view, self) + end + return PlayerCardInfoView.new(view, self) +end +function M:closeTipOnTuoguan() + if self._clearingView ~= nil then + self._clearingView:Close() + end + self:__CloseTip() +end +function M:EventInit() + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _player_info = self._player_info + local _gamectr = self._gamectr + + _gamectr:AddEventListener(GameEvent.EventXiPai,function( ... ) + local arg = {...} + local currentPlayer=arg[1] + + if ( currentPlayer ) then + self._popEvent = false + local xipaiCB=function () + self._popEvent = true + end + self:PlayXiPai(xipaiCB) + else + ViewUtil.ShowModalWait(self._root_view,"等待其它玩家洗牌...") + coroutine.start(function() + coroutine.wait(4) + ViewUtil.CloseModalWait() + end) + + + end + + + end) + + _gamectr:AddEventListener( + GameEvent.SendCards, + function(...) + self._popEvent = false + self._leftcard = 1 + self._leftcard = 1 + local rightpanel = self._view:GetChild('right_panel') + local tex_round = rightpanel:GetChild('tex_round') + if tex_round ~= nil then + tex_round.text = '第 ' .. _room.curren_round .. ' 局' + end + self._view:GetChild('tex_round').text = '第 ' .. _room.curren_round .. '/' .. _room.room_config.round .. ' 局' + + self._state.selectedIndex = 1 + self:closeTipOnTuoguan() + local list = _room.player_list + for i = 1, #list do + local p = list[i] + p.hu_xi = 0 + local _info = self._player_card_info[self:GetPos(p.seat)] + _info:SetPlayer(p) + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + info._view:GetController('huxi').selectedIndex = 1 + info._view:GetChild('huxi').text = p.hu_xi + info._view:GetController('zhanji').selectedIndex = 0 + + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + if p.total_hp == nil then + p.total_hp = 0 + end + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + local card_info = self._player_card_info[1] + card_info:UpdateIsOnClick(false) + card_info:InitHandCard(true) + end + ) + + _gamectr:AddEventListener( + GameEvent.GetCard, + function(...) + local arg = {...} + local seat = arg[1] + local card = arg[2] + local _leftcard = arg[3] + self._left_time = 15 + self._tex_LeftCard.text = '剩余 ' .. _leftcard .. ' 张牌' + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateOutCardList(card, true, true, self:GetPos(seat)) + if card ~= 0 then + local p = _room:GetPlayerBySeat(seat) + self:PlaySound(p.self_user.sex, 'F_' .. card) + else + self._popEvent = false + coroutine.start( + function() + coroutine.wait(0.5) + self._popEvent = true + info:ClearOutCard() + end + ) + end + end + ) + _gamectr:AddEventListener( + GameEvent.AddCard, + function(...) + local arg = {...} + local seat = arg[1] + local card = arg[2] + self._popEvent = false + local info = self._player_card_info[self:GetPos(seat)] + coroutine.start( + function() + coroutine.wait(0.5) + if seat == self._room.self_player.seat then + info:InitHandCard(false) + end + info:ClearOutCard() + self._popEvent = true + end + ) + end + ) + + _gamectr:AddEventListener( + GameEvent.EventTurn, + function(...) + local arg = {...} + local seat = arg[1] + local list = _room.player_list + local readyNum = 0 + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 0 + end + local info = self._player_info[self:GetPos(seat)] + info._view:GetController('time').selectedIndex = 1 + end + ) + _gamectr:AddEventListener( + GameEvent.OutHint, + function(...) + _room.curren_outcard_seat = _room.self_player.seat + coroutine.start( + function() + coroutine.wait(0.5) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:ChuPaiTiShi() + end + ) + end + ) + + _gamectr:AddEventListener( + GameEvent.OutCard, + function(...) + self:__CloseTip() + self._left_time = 0 + local arg = {...} + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:PlaySound(p.self_user.sex, 'F_' .. card) + if seat == self._room.self_player.seat then + _room.curren_outcard_seat = -1 + info:DeleteHandCard(card) + info:UpdateIsOnClick(true) + info:SendChangeCard() + info:ChuPaiTiShi() + end + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 0 + end + info:UpdateOutCardList(card, true, false, self:GetPos(seat)) + if self._leftcard == 1 then + self._leftcard = 0 + for i = 1, #_room.player_list do + local p = _room.player_list[i] + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateFzList(p.fz_list, false, p.seat) + end + end + end + ) + + _gamectr:AddEventListener( + GameEvent.QiCard, + function(...) + self:__CloseTip() + self._popEvent = false + self._left_time = 0 + local arg = {...} + local seat = arg[1] + local card = arg[2] + local p = _room:GetPlayerBySeat(seat) + local info = self._player_card_info[self:GetPos(seat)] + info:PlayingOutCardAnima(p.DiceCard) + p.DiceCard = 0 + info:UpdateQiPai(p.outcard_list, true, seat) + self._popEvent = true + end + ) + _gamectr:AddEventListener( + GameEvent.FZTips, + function(...) + local arg = {...} + local _tip = arg[1] + local _uid = arg[2] + self:__FangziTip(_tip, _uid) + end + ) + + _gamectr:AddEventListener(GameEvent.FangziAction, handler(self, self.OnFangziAction)) + + _gamectr:AddEventListener( + GameEvent.ZPHuCard, + function(...) + self._left_time = 0 + self:__CloseTip() + self._popEvent = false + local arg = {...} + local w = arg[1] + local l = arg[2] + local cards = arg[3] + local info = self._player_card_info[self:GetPos(w)] + -- info:UpdateHandCard() + + local url = 'ui://Extend_Poker_HSRunBeard/别人胡' + local pNode = info._mask_liangpai + local player = _room:GetPlayerBySeat(w) + if w == _room.self_player.seat then + url = 'ui://Extend_Poker_HSRunBeard/自己胡牌' + pNode = self._view + end + self:PlaySound(player.self_user.sex, 'F_Hu') + local he = UIPackage.CreateObjectFromURL(url) + he:GetTransition('t2'):Play() + if w == _room.self_player.seat then + he:Center() + end + pNode:AddChild(he) + coroutine.start( + function() + coroutine.wait(0.7) + he:Dispose() + self._popEvent = true + end + ) + end + ) + + _gamectr:AddEventListener( + GameEvent.ZPResult1, + function(...) + self._popEvent = false + self._left_time = 0 + local arg = {...} + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local x = {} + self._hu_tip:FillData(x) + self:__CloseTip() + if self._clearingView == nil then + if liuju == true then + self._clearingView = RunBeard_ResultView.new(self._view, 1) + else + self._clearingView = RunBeard_ResultView.new(self._view) + end + end + coroutine.start( + function() + coroutine.wait(0.5) + -- if self._clearingView._is_destroy then return end + self._clearingView:Show() + if _room.curren_round ~= _room.room_config.round then + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + p.total_score = data[i].total_score + p.cur_hp = data[i]['cur_hp'] or 0 + p.total_hp = data[i]['total_hp'] or 0 + if data[i]['hp_info'] then + p.cur_hp = data[i].hp_info.cur_hp + p.total_hp = data[i].hp_info.total_hp == nil and 0 or data[i].hp_info.total_hp + info._view:GetController('zhanji').selectedIndex = 0 + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + + card_info:Clear() + info:UpdateScore() + end + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 0 + end + + for i = 1, #_room.player_list do + _room.self_player.handcard_list = {} + _room.player_list[i].DiceCard = nil + _room.player_list[i].hand_left_count = 20 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + _room.player_list[i].outcard_list = {} + _room.player_list[i].hu_xi = 0 + end + end + self._popEvent = true + end + ) + if _room.curren_round ~= _room.room_config.round then + self._clearingView:InitData( + 0, + _room, + result, + nil, + function(...) + self._state.selectedIndex = 2 + self._clearingView = nil + end + ) + end + end + ) + + _gamectr:AddEventListener( + GameEvent.ZPResult2, + function(...) + self._left_time = 0 + local arg = {...} + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + local x = {} + self._hu_tip:FillData(x) + self:__CloseTip() + self:UnmarkSelfTuoguan() + self._clearingView = RunBeard_ResultView.new() + coroutine.start( + function() + coroutine.wait(0.5) + self._clearingView:Show() + end + ) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end + ) +end + +function M:OutCard(card_item) + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card_item) +end + +--改变牌队形 +function M:ChangeCards(list) + local _gamectr = ControllerManager.GetController(GameController) + if _gamectr then + _gamectr:SendChangeCards(list) + end + +end + +function M:__FangziTip(tip, _uid) + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject('Main_RunBeard', 'Gcm_action_tips') + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + + local _lit_fanzi = _chipeng_tip:GetChild('lit_fanzi') + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + local tip_hu = false + local count = #_tlist + for k = 1, #_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + if td.type == 8 then + tip_hu = true + end + end + for k = 1, #_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + local url = 'ui://Main_RunBeard/Btn_fztip' + local btn_t = _lit_fanzi:AddItemFromPool(url) + if td.type==8 then + btn_t:GetChild("hupai").icon="ui://Main_RunBeard/201_1_" .. td.card + btn_t:GetController("hupai").selectedIndex=1 + end + btn_t.icon = 'ui://Main_RunBeard/newop_' .. td.type + btn_t.data = {tip, td, tip_hu} + btn_t.onClick:Set(self.__TipAction, self) + end + if p.hand_left_count ~= 0 then + local _btn_pass = _lit_fanzi:AddItemFromPool('ui://Main_RunBeard/Btn_pass_new') + _btn_pass.onClick:Set( + function() + if tip_hu then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + _gamectr:SendAction(_uid) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end + ) + + guo_msg:Show() + else + _gamectr:SendAction(_uid) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end + ) + end + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() + _chipeng_tip.x = _chipeng_tip.x + 200 + _chipeng_tip.y = _chipeng_tip.y - 50 +end +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local tip_hu = data[3] + local list = tip.tip_map_type[td.weight] + if (#list > 1) or td.type == 1 then + self:_ChiView( + list, + tip_hu, + function(id) + if tip_hu and td.type ~= 8 then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + _gamectr:SendAction(id) + guo_msg:Close() + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + ) + guo_msg:Show() + else + _gamectr:SendAction(id) + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + end + ) + --self._chipeng_tip.visible = false + return + end + if tip_hu and td.type ~= 8 then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + _gamectr:SendAction(td.id) + guo_msg:Close() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + if (self._chipeng_tip == nil) then + return + end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + ) + guo_msg:Show() + else + _gamectr:SendAction(td.id) + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + if (self._chipeng_tip == nil) then + return + end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end +end + +function M:_ChiView(tip_list, tip_hu, callback) + local _pop_tip_choice = UIPackage.CreateObject('Main_RunBeard', 'Pop_tip_choice') + local list_choose = _pop_tip_choice:GetChild('Lst_choose') + _pop_tip_choice:GetChild('dibtn').onClick:Add( + function() + _pop_tip_choice:Dispose() + end + ) + + list_choose:RemoveChildrenToPool() + for i = 1, #tip_list do + if tip_list[i].weight ~= 4 then + local item_choose = list_choose:AddItemFromPool() + item_choose:GetChild('card' .. 2).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', tip_list[i].OpCard[1])) + item_choose:GetChild('card' .. 3).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', tip_list[i].OpCard[2])) + item_choose:GetChild('card' .. 1).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', tip_list[i].card)) + + item_choose.onClick:Add( + function() + for k = 1, list_choose.numChildren do + list_choose:GetChildAt(k - 1):GetController('zhong').selectedIndex = 0 + end + item_choose:GetController('zhong').selectedIndex = 1 + if tip_list[i].bi_list == nil then + callback(tip_list[i].id) + else + self.bilist = {} + self._chiid = tip_list[i].id + self:CheckRatioCard(tip_list[i].bi_list, 1, tip_list[i].card) + end + end + ) + end + end + list_choose:ResizeToFit(#tip_list) + _pop_tip_choice:GetChild('di1').width = list_choose.width + 110 + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width) / 2, -100) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:CheckRatioCard(_tiplist, index, chicard, _biid, list) + if _biid ~= nil then + self.bilist = {} + self.bilist[#self.bilist + 1] = _biid + end + if self._pop_tip_choice == nil then + -- statements + return + end + self._pop_tip_choice:GetController('bipai').selectedIndex = index + local Bilist_choose = self._pop_tip_choice:GetChild('Bi_Lst_choose' .. index) + Bilist_choose:RemoveChildrenToPool() + for i = 1, #_tiplist do + local item = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Comp_choose') + local item_choose = Bilist_choose:AddChild(item) + item_choose:GetChild('card' .. 2).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', _tiplist[i].opcard[1])) + item_choose:GetChild('card' .. 3).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', _tiplist[i].opcard[2])) + item_choose:GetChild('card' .. 1).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', chicard)) + item_choose:GetController('zhong').selectedIndex = 0 + item_choose.onClick:Add( + function() + for k = 1, Bilist_choose.numChildren do + Bilist_choose:GetChildAt(k - 1):GetController('zhong').selectedIndex = 0 + end + item_choose:GetController('zhong').selectedIndex = 1 + if _tiplist[i].bi_list == nil then + if index == 1 then + self.bilist = {} + end + self.bilist[#self.bilist + 1] = i - 1 + if tip_hu then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + self._gamectr:SendAction(self._chiid, self.bilist) + guo_msg:Close() + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + ) + guo_msg:Show() + else + self._gamectr:SendAction(self._chiid, self.bilist) + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + else + self:CheckRatioCard(_tiplist[i].bi_list, 2, chicard, i - 1, #_tiplist) + end + end + ) + end + Bilist_choose:ResizeToFit(#_tiplist) + self._pop_tip_choice:GetChild('di' .. index + 1).width = Bilist_choose.width + 110 +end + +-- lua table 深拷贝 +function M:deepcopy(object) + local lookup_table = {} + local function _copy(object) + if type(object) ~= 'table' then + return object + elseif lookup_table[object] then + return lookup_table[object] + end + local new_table = {} + lookup_table[object] = new_table + for index, value in pairs(object) do + new_table[_copy(index)] = _copy(value) + end + return setmetatable(new_table, getmetatable(object)) + end + return _copy(object) +end + +function M:OnFangziAction(...) + local arg = {...} + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local num = arg[3] + if fz.type == RB_FZType.Peng or fz.type == RB_FZType.Chi or fz.type == RB_FZType.Bi then + self:__CloseTip() + end + if (player == self._room.self_player) then + local info = _player_card_info[self:GetPos(player.seat)] + info:UpdateIsOnClick(false) + end + self._popEvent = false + + local info = _player_card_info[self:GetPos(player.seat)] + info:UpdateFzList(player.fz_list, true, player.seat) --更新放子数组 + if (player == self._room.self_player) then + if fz.type == RB_FZType.Chi then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.Bi then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + info:DeleteHandCard(fz.card) + elseif fz.type == RB_FZType.Peng then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.Kan then + if #fz.opcard == 2 then + info:InitHandCard(false) + end + info:UpdateKan(fz.card) + elseif fz.type == RB_FZType.Wei then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.ChouWei then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.Pao then + if num > 0 then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + end + elseif fz.type == RB_FZType.Ti then + if num > 0 then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + end + end + coroutine.start( + function() + coroutine.wait(0.3) + if fz.type ~= RB_FZType.Kan then + info:SendChangeCard() + end + end + ) + end + if fz.type ~= RB_FZType.Kan and fz.type ~= RB_FZType.Bi then + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject('Extend_Poker_HSRunBeard', 'FzEffect') + + if fz.type == RB_FZType.Peng then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "peng") + self:PlaySound(player.self_user.sex, 'F_Peng') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'peng') + elseif fz.type == RB_FZType.Chi then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "chi") + self:PlaySound(player.self_user.sex, 'F_Chi') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'chi') + elseif fz.type == RB_FZType.Wei then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "wei") + self:PlaySound(player.self_user.sex, 'F_GuoSao') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'wei') + elseif fz.type == RB_FZType.ChouWei then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Extend_Poker_RunBeard", "chouwei") + self:PlaySound(player.self_user.sex, 'F_GuoSao') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Extend_Poker_HSRunBeard', 'chouwei') + elseif fz.type == RB_FZType.Pao then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "pao") + self:PlaySound(player.self_user.sex, 'F_KaiDuo') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'pao') + elseif fz.type == RB_FZType.Ti then + self:PlaySound(player.self_user.sex, 'F_SaoChuan') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'ti') + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "ti") + end + effect.touchable = false + effect.x, effect.y = 0, 0 + effect:GetTransition('t0'):Play() + pNode:AddChild(effect) + coroutine.start( + function() + coroutine.wait(1) + effect:Dispose() + end + ) + end + if (player == self._room.self_player) then + coroutine.start( + function() + coroutine.wait(0.5) + local info = _player_card_info[self:GetPos(player.seat)] + info:ShowHuTip() + end + ) + end + local removeOutcard = _player_card_info[self:GetPos(fz.from_seat)] + local p = self._room:GetPlayerBySeat(fz.from_seat) + if p.DiceCard ~= nil and fz.active_card == p.DiceCard then + removeOutcard:ClearOutCard() + p.DiceCard = nil + end + local list = self._room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + print(p.hu_xi) + info._view:GetChild('huxi').text = p.hu_xi + end + self._popEvent = true + coroutine.start( + function() + coroutine.wait(0.3) + local info = _player_card_info[1] + info:UpdateIsOnClick(true) + end + ) +end + +function M:ReloadRoom() + local _gamectr = self._gamectr + local room = self._room + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + end + if room.discard == 0 then + self._leftcard = 1 + else + self._leftcard = 0 + end + for i = 1, #room.player_list do + local p = room.player_list[i] + if p.seat == room.banker_seat then + local head = self._player_info[self:GetPos(p.seat)] + head:MarkBank(true) + end + if p.ready then + self._player_info[self:GetPos(p.seat)]:Ready(true) + else + self._player_info[self:GetPos(p.seat)]:Ready(false) + end + if self._state.selectedIndex == 1 then + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('huxi').selectedIndex = 1 + info._view:GetChild('huxi').text = p.hu_xi + info._view:GetController('zhanji').selectedIndex = 0 + if room.hpOnOff == 1 or room:checkHpNonnegative() then + if p.total_hp == nil then + p.total_hp = 0 + end + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateQiPai(p.outcard_list) + card_info:UpdateFzList(p.fz_list, false, p.seat) + if p.DiceCard ~= nil and p.DiceCard ~= 0 then + card_info:UpdateOutCardList(p.DiceCard) + end + if DataManager.CurrenRoom.curren_outcard_seat == p.seat then + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 1 + end + if p.seat == self._room.self_player.seat then + card_info:ChuPaiTiShi() + if + self._room.self_player.card_list ~= nil and + #self._room.self_player.handcard_list == #self._room.self_player.card_list + then + local _list = self:deepcopy(self._room.self_player.card_list) + local cards = {} + for i = 1, #_list do + cards[#cards + 1] = _list[i].card_item + end + table.sort(cards, ViewUtil.HandCardSort) + table.sort(self._room.self_player.handcard_list, ViewUtil.HandCardSort) + + local isNot = false + for i = 1, #cards do + if cards[i] ~= self._room.self_player.handcard_list[i] then + isNot = true + end + end + if isNot == true then + card_info:InitHandCard(false) + else + card_info:UpdateHandCards(self._room.self_player.card_list) + end + else + card_info:InitHandCard(false) + end + -- card_info:ChuPaiTiShi() + card_info:ShowHuTip() + for i = 1, #p.fz_list do + if p.fz_list[i].type == RB_FZType.Kan then + card_info:UpdateKan(3, p.fz_list[i].card) + end + end + end + end + + self._tex_LeftCard.text = '剩余 ' .. room.left_count .. ' 张牌' + local rightpanel = self._view:GetChild('right_panel') + local tex_round = rightpanel:GetChild('tex_round') + if tex_round ~= nil then + tex_round.text = '第 ' .. room.curren_round .. ' 局' + end + self._view:GetChild('tex_round').text = '第 ' .. room.curren_round .. '/' .. room.room_config.round .. ' 局' +end + +function M:PlayChatSound(sex, chat_index) + local sex_path = ViewUtil.Sex_Chat[sex] + local path1 = string.format('extend/zipai/hsrunbeard/sound/%s/chat_%s.mp3', sex_path, tostring(chat_index)) + ViewUtil.PlaySound('ChangDe_ZP', path1) +end + +function M:PlaySound(sex, path) + local sex_path = ViewUtil.Sex_Chat[sex] -- 1 男 2 女 + local sound_path = string.format('extend/zipai/hsrunbeard/sound/%s/%s.mp3', sex_path, path) + ViewUtil.PlaySound('ChangDe_ZP', sound_path) +end + +function M:__CloseTip() + if (self._chipeng_tip) then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if (self._pop_tip_choice) then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +function M:Destroy() + ZPMainView.Destroy(self) + UIPackage.RemovePackage('extend/zipai/hsrunbeard/ui/Extend_Poker_HSRunBeard') +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/hsrunbeard/EXPlayBackView.lua b/lua_probject/extend_project/extend/zipai/hsrunbeard/EXPlayBackView.lua new file mode 100644 index 00000000..72e9a3cf --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/hsrunbeard/EXPlayBackView.lua @@ -0,0 +1,625 @@ +local ZPPlayBackView = require('main.zipai.ZPPlayBackView') +local PlayerSelfCardInfoView = import('.PlayerSelfCardInfoView') +local PlayerCardInfoView = import('.PlayerCardInfoView') +local RunBeard_ResultView = import('.RunBeard_ResultView') +local M = {} + +local Record_Event = { + Evt_OutCard = 'OutCard', + Evt_GetCard = 'GetCard', + Evt_Action = 'Action', + Evt_ThrowCard = 'ThrowCard', + Evt_AddCard = 'AddCard', + Evt_ChangePaiXing = 'ChangePaiXing', + Evt_Win = 'Win', + Evt_result = 'result' +} + +local function tableSortNumber(a, b) + return a.card_code_number > b.card_code_number +end + +--- Create a new +function M.new() + setmetatable(M, {__index = PlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = 'PlayBackView' + self:init() + + return self +end + +function M:InitView(url) + local room = self._room + self._gamectr = ControllerManager.GetController(GameController) + UIPackage.AddPackage('base/main_zipai/ui/Main_RunBeard') + UIPackage.AddPackage('extend/zipai/hsrunbeard/ui/Extend_Poker_HSRunBeard') + ZPPlayBackView.InitView(self, 'ui://Main_RunBeard/Main_' .. room.room_config.people_num) + UpdateBeat:Add(self.OnUpdate, self) + + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. room.game_id) + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + if typeface == 1 then + room.change_card_display = '2_' + else + room.change_card_display = '1_' + end + end + self._player_card_info = {} + local _player_card_info = self._player_card_info + for i = 1, room.room_config.people_num do + local tem = self._view:GetChild('player_card_info' .. i) + self._player_card_info[i] = self:NewPlayerPokerInfoView(tem, i) + end + local rightpanel = self._view:GetChild('right_panel') + self.btn_setting = rightpanel:GetChild('btn_setting') + self.btn_setting.visible = false + + self.tex_time = rightpanel:GetChild('tex_time') + self.tex_time.visible = false + + self.gcm_xinhao = rightpanel:GetChild('gcm_xinhao') + self.gcm_xinhao.visible = false + + self.pb_batteryLevel = rightpanel:GetChild('pb_batteryLevel') + self.pb_batteryLevel.visible = false + + local tex_round_item = rightpanel:GetChild('tex_round') + if tex_round_item ~= nil then + tex_round_item.text = '第 ' .. room.curren_round .. ' 局' + end + local btn_rule = rightpanel:GetChild('btn_log') + if btn_rule ~= nil then + btn_rule.onClick:Set( + function() + if self.RuleView == nil or self.RuleView._is_destroy then + self.RuleView = RoomInfoView.new(self._room) + end + self.RuleView:Show() + end + ) + end + local tex_roomid = rightpanel:GetChild('tex_roomid') + tex_roomid.text = room.room_id + rightpanel:GetChild('tex_gametype').text = room.room_config:GetGameName() + + self._tex_round = self._view:GetChild('tex_round') + self._tex_LeftCard = self._view:GetChild('remaining_card') + self._eventmap = {} + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_ThrowCard] = self.CmdThrowCard + self._cmdmap[Record_Event.Evt_AddCard] = self.CmdAddCard + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_ChangePaiXing] = self.CmdChangePaiXing + self._cmdmap[Record_Event.Evt_result] = self.onResult +end + +function M:NewPlayerPokerInfoView(view, index) + if index == 1 then + return PlayerSelfCardInfoView.new(view, self) + end + return PlayerCardInfoView.new(view, self) +end + +function M:FillRoomData(data) + if self._win_pic then + self._win_pic:Dispose() + end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local roominfo_panel = self._view:GetChild('roominfo_panel1') + roominfo_panel:GetChild('tex_roomid').text = room.room_id + roominfo_panel:GetChild('tex_gametype').text = room.room_config:GetGameName() + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:SetPlayer(p) + if p.seat == room.self_player.seat then + card_info:UpdateIsOnClick(false) + end + local infoHand = self._player_info[self:GetPos(p.seat)] + infoHand._view:GetController('huxi').selectedIndex = 1 + infoHand._view:GetChild('huxi').text = p.hu_xi + if p.total_hp then + infoHand._view:GetController('zhanji').selectedIndex = 0 + if room.hpOnOff == 1 or room:checkHpNonnegative() then + infoHand._view:GetController('zhanji').selectedIndex = 1 + infoHand._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + infoHand:UpdateScore() + end + end + self:UpdateRound(self._room.curren_round) + self:GenerateAllStepData(data) + self:ShowStep(1) + self:UpdateStep(1) +end + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateStep(index + 1) + self:UpdateLeftCard(step.left_card) + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hu_xi = step.player_card_data[i].hu_xi + p.hand_left_count = #p.card_list + + if index == 1 then + info:Clear() + if p.total_hp then + local avHand = self._player_info[self:GetPos(p.seat)] + local room = DataManager.CurrenRoom + avHand._view:GetController('zhanji').selectedIndex = 0 + if room.hpOnOff == 1 or room:checkHpNonnegative() then + avHand._view:GetController('zhanji').selectedIndex = 1 + avHand._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + avHand:UpdateScore() + end + end + if p.hu_xi ~= nil then + local infoHand = self._player_info[self:GetPos(p.seat)] + infoHand._view:GetChild('huxi').text = p.hu_xi + end + if step.cmd == Record_Event.Evt_Action then + if p.fz_list ~= nil and #p.fz_list > 0 then + info:UpdateFzList(p.fz_list) + end + end + + if p.seat ~= self._room.self_player.seat then + info:InitHandCard(p.card_list) + else + self._room.self_player.handcard_list = p.card_list + info:InitHandCard(false) + end + if step.cmd == Record_Event.Evt_ChangePaiXing then + local _card_list = {} + for i = 1, #step.card_list do + local data = {} + data.card_item = step.card_list[i].card + data.index_X = step.card_list[i].X + data.index_Y = step.card_list[i].Y + _card_list[#_card_list + 1] = data + end + local info = self._player_card_info[self:GetPos(step.seat)] + if step.card_list[1].card ~= nil then + info:UpdateHandCards(_card_list) + else + info:UpdateHandCards(step.card_list) + end + end + if step.cmd == Record_Event.Evt_OutCard or step.cmd == Record_Event.Evt_GetCard then + if step.DiceCard ~= nil and step.DiceCard ~= 0 then + if p.seat == step.seat then + info:UpdateOutCardList(step.DiceCard) + coroutine.start( + function() + coroutine.wait(1.5) + info:ClearOutCard() + end + ) + end + end + end + if p.outcard_list ~= nil then + info:UpdateQiPai(p.outcard_list) + end + end + -- print("step.cmd ",step.cmdm,Record_Event.Evt_Win) + if step.cmd == Record_Event.Evt_result then + local _room = DataManager.CurrenRoom + local result = step.result + self._win_pic = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/胡') + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + + if result ~= nil then + if self._clearingView == nil then + self._clearingView = RunBeard_ResultView.new(self._view) + coroutine.start( + function() + coroutine.wait(0.5) + self._clearingView:Show() + end + ) + end + local data = result.data.info_list + self._clearingView:InitData( + 0, + _room, + result.data, + nil, + function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + -- p.cur_hp = data[i]['cur_hp'] or 0 + -- if data[i]['hp_info'] then + -- p.cur_hp = data[i].hp_info.cur_hp + -- end + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + if data[i]['hp_info'] then + p.total_score = d2ad(data[i].hp_info.cur_hp) + local stotal_hp = data[i].hp_info.total_hp + info._view:GetController('zhanji').selectedIndex = 0 + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(stotal_hp) + end + end + info:UpdateScore(p.total_score) + end + self._clearingView = nil + end + ) + end + else + if self._win_pic then + self._win_pic:Dispose() + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = '' + step.left_card = info.left_card + step.win = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.hu_xi = 0 + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + data.seat = cmd.seat + data.DiceCard = cmd.data.card +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + data.seat = cmd.seat + data.DiceCard = cmd.data.card +end +function M:CmdThrowCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + data.current_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + data.out_card_list = cmd.data.card + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end +function M:CmdAddCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + local _room = self._room + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card +end + +function M:onResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result = cmd.result +end + +function M:CmdChangePaiXing(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + data.card_list = cmd.data.card_list +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + local p = data.player_card_data[cmd.seat] + local fz = {} + p.hu_xi = cmd.data.hu_xi + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.active_card = cmd.data.card + fz.opcard = cmd.data.opcard + local opcard = fz.opcard + local ftype = fz.type + local card = fz.card + local remove_num = #opcard + if ftype == RB_FZType.Chi then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Bi then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + list_remove(p.card_list, fz.card) + elseif ftype == RB_FZType.Peng then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Kan then + local _room = self._room + if #opcard == 2 then + p.card_list[#p.card_list + 1] = card + end + elseif ftype == RB_FZType.ChouWei then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, 2 do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Wei then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Pao then + local num = 0 + for i = 1, #p.card_list do + if card == p.card_list[i] then + num = num + 1 + end + end + local isAddTi = false + for i = 1, #p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type = RB_FZType.Pao + isAddTi = true + end + end + if num > 0 then + for i = 1, num do + list_remove(p.card_list, card) + end + + if isAddTi == false then + p.fz_list[#p.fz_list + 1] = fz + end + end + elseif ftype == RB_FZType.Ti then + local num = 0 + for i = 1, #p.card_list do + if card == p.card_list[i] then + num = num + 1 + end + end + local isAddTi = false + for i = 1, #p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type = RB_FZType.Ti + isAddTi = true + end + end + if num > 0 then + for i = 1, num do + list_remove(p.card_list, card) + end + + if isAddTi == false then + p.fz_list[#p.fz_list + 1] = fz + end + end + end +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = '剩余 ' .. num .. ' 张牌' +end + +function M:UpdateRound(round) + self._tex_round.text = '第 ' .. round .. '/' .. self._room.room_config.round .. ' 局' +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = self:deepcopy(last_step) + step.player_card_data = {} + local card_data = step.player_card_data + for i = 1, #last_step.player_card_data do + card_data[i] = {} + card_data[i].card_list = self:deepcopy(last_step.player_card_data[i].card_list) + card_data[i].outcard_list = self:deepcopy(last_step.player_card_data[i].outcard_list) + card_data[i].fz_list = self:deepcopy(last_step.player_card_data[i].fz_list) + card_data[i].hand_left_count = #card_data[i].card_list + card_data[i].hu_xi = self:deepcopy(last_step.player_card_data[i].hu_xi) + end + self._step[#self._step + 1] = step + return step +end + +-- lua table 深拷贝 +function M:deepcopy(object) + local lookup_table = {} + local function _copy(object) + if type(object) ~= 'table' then + return object + elseif lookup_table[object] then + return lookup_table[object] + end + local new_table = {} + lookup_table[object] = new_table + for index, value in pairs(object) do + new_table[_copy(index)] = _copy(value) + end + return setmetatable(new_table, getmetatable(object)) + end + return _copy(object) +end + +function M:NextRecordPlay() + local result = PlayBackView.NextRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() +end + +function M:LastRecordPlay() + local result = PlayBackView.LastRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() +end + +function M:Play() + self:ChangeAlpha() + self:ChangePlayState(not self._play) + if not self._play then + return + end + if (self._currentStep == #self.cmdList and self._playFoward) or (self._currentStep == 0 and not self._playFoward) then + self._currentStep = 0 + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:ChangePlayState(state) + self._play = state + self:ChangeTextSpeed() + local btn_play = self._view:GetChild('panel_record'):GetChild('btn_play') + if self._play then + btn_play:GetController('state').selectedIndex = 1 + else + btn_play:GetController('state').selectedIndex = 0 + end +end + +function M:ChangeTextSpeed() + local str1 = self._play and self._speed or '' + self._view:GetChild('panel_record'):GetChild('tex_speed').text = str1 + local str2 = + not self._play and (self._playFoward and '播放暂停' or '回退暂停') or + self._playFoward and (self._speed == 1 and '播放' or '快进') or + (self._speed == 1 and '回退' or '快退') + self._view:GetChild('panel_record'):GetChild('tex_2').text = str2 + local str3 = self._play and '倍速度' or '' + self._view:GetChild('panel_record'):GetChild('tex_1').text = str3 +end + +function M:CmdLeftArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if not self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = false + self:ChangeTextSpeed() + end +end + +function M:CmdRightArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:OnUpdate() + if self._play then + if (self._currentStep == #self.cmdList and self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像结尾了,再次点击播放按钮可重新播放') + return + elseif (self._currentStep == 0 and not self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像开头了,再次点击播放按钮可重新播放') + return + end + self._timer = self._timer + Time.deltaTime + if self._timer >= 1 / self._speed then + self._timer = 0 + local step = self._playFoward and 1 or -1 + self._currentStep = self._currentStep + step + self:ShowStep(self._currentStep) + end + end +end + +function M:Destroy() + UpdateBeat:Remove(self.OnUpdate, self) + PlayBackView.Destroy(self) +end + +function M:UpdateStep(step) + self._record:GetChild('tex_step').text = '第 ' .. step .. ' / ' .. #self._step .. '步' +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/hsrunbeard/EXPlayer.lua b/lua_probject/extend_project/extend/zipai/hsrunbeard/EXPlayer.lua new file mode 100644 index 00000000..fe112fd2 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/hsrunbeard/EXPlayer.lua @@ -0,0 +1,37 @@ + + +local EXPlayer ={ + -- 手牌列表 + card_list = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil, + hu_xi =0 +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 + self.hu_xi =0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/hsrunbeard/EXRoomConfig.lua b/lua_probject/extend_project/extend/zipai/hsrunbeard/EXRoomConfig.lua new file mode 100644 index 00000000..3b13c968 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/hsrunbeard/EXRoomConfig.lua @@ -0,0 +1,222 @@ + +local M = {} + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.config=config + self.class = "RoomConfig" + self.round = config["times"] + self.mode = config["mode"] + self.tun = config["tun"] + self.fengding = config["fengding"] + self.tuanyuan = config["tuanyuan"] + self.hanghangxi = config["hanghangxi"] + self.siqi = config["siqi"] + self.shuahou = config["shuahou"] + self.huangfan = config["huangfan"] + self.jiaxingxing = config["jiaxingxing"] + self.tinghu = config["tinghu"] + self.duizifu = config["duizifu"] + self.back = config["back"] + self.yuan = config["yuan"] + self.tianhu =config["tianhu"] + self.dihu =config["dihu"] + self.haihu =config["haihu"] + self.maxPlayers = config["maxPlayers"] + self.qupai = config["qupai"] + self.isHidden = config.isHidden + + self.hh = config["hh"] or 0 + self.dh = config["dh"] or 0 + self.hw = config["hw"] or 0 + self.wh = config["wh"] or 0 + + self.hd = config["hd"] or 0 + self.wd = config["wd"] or 0 + self.jhd = config["jhd"] or 0 + + self.dhdf = config["dhdf"] or 0 + return self +end + +function M:GetDes(sp) + sp = sp or " " + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + if self.maxPlayers == 2 then + if self.qupai > 0 then + local qupai_num = self.qupai * 5 + 5 + str = str .."抽"..qupai_num.."牌" + str = str .. sp + end + end + if (self.mode==1) then + str = str .. "全名堂" + str = str .. sp + str = str .. (self.tun).."囤" + str = str .. sp + if self.fengding == 0 then + str = str .. "不封顶" + str = str .. sp + elseif self.fengding == 1 then + str = str .. "100封顶" + str = str .. sp + elseif self.fengding == 2 then + str = str .. "200封顶" + str = str .. sp + end + if self.tuanyuan == 1 then + str = str .. "大团圆" + str = str .. sp + end + if self.hanghangxi == 1 then + str = str .. "行行息" + str = str .. sp + end + if self.siqi == 1 then + str = str .. "四七红" + str = str .. sp + end + if self.shuahou == 1 then + str = str .. "耍猴" + str = str .. sp + end + if self.huangfan == 1 then + str = str .. "黄番" + str = str .. sp + end + if self.jiaxingxing == 1 then + str = str .. "假行行" + str = str .. sp + end + if self.tinghu == 1 then + str = str .. "听胡" + str = str .. sp + end + if self.back == 1 then + str = str .. "背靠背" + str = str .. sp + end + if self.yuan == 1 then + str = str .. "圆" + str = str .. sp + end + elseif (self.mode == 2 ) then + str = str .. sp + str = str .. (self.tun).."囤" + str = str .. sp + + if self.hh == 0 then + str = str .. "红胡 2" + str = str .. sp + end + + if self.dh == 0 then + str = str .. "点胡 3" + str = str .. sp + end + + if self.hw == 0 then + str = str .. "夹红 4" + str = str .. sp + end + + if self.wh == 0 then + str = str .. "乌胡 4" + str = str .. sp + end + + if self.hd == 0 then + str = str .. "红对 6" + str = str .. sp + end + + if self.wd == 0 then + str = str .. "乌对 8" + str = str .. sp + end + + if self.jhd == 0 then + str = str .. "夹红对 8" + str = str .. sp + end + + if self.dhdf == 1 then + str = str .. "多红多番" + str = str .. sp + end + -- if self.duizifu == 1 then + -- str = str .. "对子胡" + -- str = str .. sp + -- end + + -- if self.fengding == 0 then + -- str = str .. "不封顶" + -- str = str .. sp + -- elseif self.fengding == 1 then + -- str = str .. "单局20封顶" + -- str = str .. sp + -- elseif self.fengding == 2 then + -- str = str .. "单局40封顶" + -- str = str .. sp + -- end + elseif (self.mode == 3 ) then + str = str .. "多红多番" + str = str .. sp + if self.tianhu == 1 then + str = str .. "天胡" + str = str .. sp + end + if self.dihu == 1 then + str = str .. "地胡" + str = str .. sp + end + if self.haihu == 1 then + str = str .. "海湖" + str = str .. sp + end + if self.tinghu == 1 then + str = str .. "听胡" + str = str .. sp + end + if self.huangfan == 1 then + str = str .. "黄番" + str = str .. sp + end + str = str .. (self.tun).."囤" + str = str .. sp + if self.fengding == 0 then + str = str .. "不封顶" + str = str .. sp + elseif self.fengding == 1 then + str = str .. "60封顶" + str = str .. sp + elseif self.fengding == 2 then + str = str .. "80封顶" + str = str .. sp + end + end + + + str = str.sub(str,1,string.len(str)-string.len(sp)) + return str +end + +function M:GetGameName() + return self.maxPlayers .. '人汉寿跑胡子' +end + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_Poker_HSRunBeard/gamerule") + return gamerulepanel +end + + +function M:GetGameSMSize() + return 467,500 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/hsrunbeard/ExtendConfig.lua b/lua_probject/extend_project/extend/zipai/hsrunbeard/ExtendConfig.lua new file mode 100644 index 00000000..13dbf335 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/hsrunbeard/ExtendConfig.lua @@ -0,0 +1,236 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import('.EXGameInfo') +local EXMainView = import('.EXMainView') +local EXGameController = import('.EXGameController') +local EXRoomConfig = import('.EXRoomConfig') +local EXPlayBackView = import('.EXPlayBackView') +local explayer = import('.EXPlayer') +local ExtendConfig = {} + +local M = ExtendConfig + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = 'ExtendConfig' + self.extend_id = 13 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage('extend/zipai/hsrunbeard/ui/Info_Poker_HSRunBeard') + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage('extend/zipai/hsrunbeard/ui/Extend_Poker_HSRunBeard') + ResourcesManager.UnLoadGroup('HanShou_ZP') +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:FillRoomConfig(room, _config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + local reload = s2croom['reload'] + local _tableInfo = s2croom['tableInfo'] + + local _config = _tableInfo['config'] + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo['playerData'] + room.curren_round = _tableInfo['round'] + for i = 1, #playerList do + local _jp = playerList[i] + + local p = explayer.new() + p.seat = _jp['seat'] + local online = _jp['online'] + p.line_state = online + p.ready = _jp['ready'] == 1 and true or false + local pid = _jp['aid'] + if (DataManager.SelfUser.account_id == pid) then + room.self_player = p + p.self_user = DataManager.SelfUser + else + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp['nick'] + u.head_url = _jp['portrait'] + u.sex = _jp['sex'] + end + p.entrust = _jp['entrust'] + p.self_user.host_ip = _jp['ip'] + p.self_user.location = Location.new(_jp['pos'] or '') + p.cur_hp = _jp['cur_hp'] or 0 + p.total_hp = _jp['total_hp'] or 0 + if _jp['hp_info'] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + room:AddPlayer(p) + end + + -- 如果重写了player类,就需要传第二个参数 + -- self:FillPlayerData(playerList, explayer) + + if (reload) then + local _reloadInfo = s2croom['reloadInfo'] + local _hand_card = _reloadInfo['hand_card'] + local _card_list = _reloadInfo['card_list'] + local _discard = _reloadInfo['discard'] + room.discard = _discard + -- local _index = _reloadInfo["typeface"] + -- if _index ==1 then + -- room.change_card_display = "2_" + -- else + -- room.change_card_display = "1_" + -- end + room.self_player.handcard_list = _hand_card + room.self_player.card_list = {} + for i = 1, #_card_list do + local data = {} + data.card_item = _card_list[i].card + data.index_X = _card_list[i].X + data.index_Y = _card_list[i].Y + room.self_player.card_list[#room.self_player.card_list + 1] = data + end + local active_seat = _reloadInfo['active_seat'] + local bank_seat = _reloadInfo['banker_seat'] + local playing = _reloadInfo['playing'] + local _info_list = _reloadInfo['info_list'] + local last_outcard_seat = _reloadInfo['last_outcard_seat'] + + room.left_count = _reloadInfo['left_card'] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo['curren_outcard_seat'] + if active_seat ~= 0 then + local player = room:GetPlayerBySeat(active_seat) + player.DiceCard = _reloadInfo['acitve_card'] + end + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i = 1, #_info_list do + local tem = _info_list[i] + local playerid = tem['playerid'] + local p = room:GetPlayerById(playerid) + local outcard_list = tem['outcard_list'] + p.outcard_list = outcard_list + p.total_score = tem['score'] + p.hu_xi = tem['hu_xi'] + p.hand_left_count = tem['card_count'] + p.cur_hp = tem['cur_hp'] or 0 + p.total_hp = tem['total_hp'] or 0 + if tem['hp_info'] then + p.cur_hp = tem.hp_info.cur_hp + p.total_hp = tem.hp_info.total_hp + end + p.entrust = tem['entrust'] + + local opcard = tem['opcard'] + for k = 1, #opcard do + local op = opcard[k] + local fz = {} + fz.type = op['type'] + local data = {} + data[1] = op['card1'] + data[2] = op['card3'] + fz.opcard = data + fz.card = op['card2'] + fz.active_card = op['card2'] + + p.fz_list[#p.fz_list + 1] = fz + if p.seat == room.self_player.seat then + if fz.type == RB_FZType.Kan then + for i = 1, 3 do + room.self_player.handcard_list[#room.self_player.handcard_list + 1] = fz.card + end + end + end + end + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data['info'] + + local _config = _tableInfo['config'] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config['ownerid'] + local active_seat = _tableInfo['active_seat'] + local bank_seat = _tableInfo['banker_seat'] + room.left_count = _tableInfo['left_card'] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo['round'] + + local _info_list = _tableInfo['playerData'] + for i = 1, #_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp['seat'] + local online = _jp['online'] + p.line_state = online + p.ready = _jp['ready'] == 1 and true or false + local pid = _jp['aid'] + if pid == DataManager.SelfUser.account_id then + room.self_player = p + end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp['nick'] + u.head_url = _jp['portrait'] + u.sex = _jp['sex'] + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp['hand_card'] + p.hand_card = _hand_card + if room.self_player ~= nil and p.seat == room.self_player.seat then + room.self_player.handcard_list = _hand_card + end + p.total_score = _jp['score'] + p.hand_left_count = #_hand_card + p.cur_hp = _jp['cur_hp'] or 0 + p.total_hp = _jp['total_hp'] or 0 + if _jp['hp_info'] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data['cmdList'] + room.result = pd_data['result'] +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/hsrunbeard/PlayerCardInfoView.lua b/lua_probject/extend_project/extend/zipai/hsrunbeard/PlayerCardInfoView.lua new file mode 100644 index 00000000..ffd0d65e --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/hsrunbeard/PlayerCardInfoView.lua @@ -0,0 +1,267 @@ +local PlayerCardInfoView = require("main.zipai.ZPPlayerCardInfoView") + +local M = {} +function M.new(view,mainView) + + setmetatable(M, {__index = PlayerCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + + + +function M:UpdateFzList( fz_list ,ispaly,seat) + self._area_fz_list:RemoveChildren(0,-1,true) + for i = 1,#fz_list do + local fzitem = nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/ComponentNew") + if(ispaly == false)then + fzitem:RemoveChildren(0,-1,true) + end + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetController("c2").selectedIndex =1 + fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].active_card) + fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[1]) + fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[2]) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Peng then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Wei then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Pao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Ti then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + if self._mainView._leftcard ==1 and self._player.seat ~= DataManager.CurrenRoom.banker_seat then + for j=1,4 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + else + for j=1,4 do + if j==4 then + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + else + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + end + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + end + end +end + +function M:playAnim(fzitem,fzcards, size,i,ispaly,seat) + if(ispaly == nil)then + ispaly =false + end + + local isaddLast = false + if(ispaly and i == size)then --匹配最后一个牌 + local faArray= fzitem:GetChild("chiwei1") + + if(DataManager.CurrenRoom.room_config.people_num ==3)then + if(DataManager.CurrenRoom.self_player.seat == 1)then + if(seat == 2)then + faArray= fzitem:GetChild("chiwei1") + else + faArray= fzitem:GetChild("chiwei") + end + elseif(DataManager.CurrenRoom.self_player.seat == 2) then + if(seat == 3)then + faArray= fzitem:GetChild("chiwei1") + else + faArray= fzitem:GetChild("chiwei") + end + elseif(DataManager.CurrenRoom.self_player.seat == 3)then + if(seat == 1)then + faArray= fzitem:GetChild("chiwei1") + else + faArray= fzitem:GetChild("chiwei") + end + end + end + + if(faArray~=nil)then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end + if(seat~=nil)then + isaddLast = self:isAddFirst(seat) + end + if(isaddLast)then + local index_postion = 0 + self._area_fz_list:AddChildAt(fzitem,index_postion) + else + self._area_fz_list:AddChild(fzitem) + end +end + +function M:isAddFirst(seat) + local isaddLast = false + if(DataManager.CurrenRoom.room_config.people_num ==3)then + if(DataManager.CurrenRoom.self_player.seat == 1)then + if(seat == 2)then + isaddLast = true + end + elseif(DataManager.CurrenRoom.self_player.seat == 2)then + if(seat == 3)then + isaddLast = true + end + elseif(DataManager.CurrenRoom.self_player.seat == 3)then + if(seat == 1)then + isaddLast = true + end + end + elseif DataManager.CurrenRoom.room_config.people_num ==2 then + isaddLast = true + end + return isaddLast +end + +function M:PlayingOutCardAnima(card) + coroutine.start(function() + coroutine.wait(0.1) + self:ClearOutCard() + end) +end + +function M:UpdateOutCardList(outcard,isShow,isMopai,seat) + if(isShow == nil) then + isShow = false + end + if(isMopai == nil) then + isMopai = false + end + + self._area_outcard_list:RemoveChildren(0,-1,true) + local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + + if outcard==0 then + outcards:GetChild("icon").icon ="ui://Main_RunBeard/202_1_300" + else + outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/203_",outcard) + end + outcards.x,outcards.y = 0,0 + local show_di_bg = outcards:GetChild("show_di_bg") + --show_di_bg.visible = true + if(isShow)then + if outcard == 0 then + show_di_bg.visible = false + end + if(seat ~= nil and outcards~=nil)then + if(DataManager.CurrenRoom.room_config.people_num ==3)then + if(seat ==2)then + seat = 3 + elseif(seat == 3)then + seat =2 + end + elseif DataManager.CurrenRoom.room_config.people_num ==2 then + seat = 3 + end + if(isMopai)then + if outcard ~= 0 then + outcards:GetTransition("mopai"..seat):Play(function( ) + -- show_di_bg.visible = true + + end) + end + else + show_di_bg.visible = false + outcards:GetTransition("cpai"..seat):Play() + end + else + --show_di_bg.visible = true + end + else + show_di_bg.visible = false + end + self._area_outcard_list:AddChild(outcards) +end + +--弃牌 +function M:UpdateQiPai( qi_list,ispaly,seat) + self._area_qipai_list:RemoveChildren(0,-1,true) + for i=1,#qi_list do + local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + qicards:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",qi_list[i]) + if(ispaly)then + if(i == #qi_list) then + if(DataManager.CurrenRoom.room_config.people_num ==2)then + qicards:GetTransition("t0"):Play() + else + if(DataManager.CurrenRoom.self_player.seat == 1)then + if(seat == 2)then + qicards:GetTransition("t0"):Play() + else + qicards:GetTransition("t1"):Play() + end + elseif(DataManager.CurrenRoom.self_player.seat == 2)then + if(seat == 3)then + qicards:GetTransition("t0"):Play() + else + qicards:GetTransition("t1"):Play() + end + elseif(DataManager.CurrenRoom.self_player.seat == 3)then + if(seat == 1)then + qicards:GetTransition("t0"):Play() + else + qicards:GetTransition("t1"):Play() + end + else + qicards:GetTransition("t0"):Play() + end + + end + end + end + self._area_qipai_list:AddChild(qicards) + end + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/hsrunbeard/PlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/zipai/hsrunbeard/PlayerSelfCardInfoView.lua new file mode 100644 index 00000000..83ef722c --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/hsrunbeard/PlayerSelfCardInfoView.lua @@ -0,0 +1,476 @@ +local PlayerSelfCardInfoView = require("main.zipai.ZPPlayerSelfCardInfoView") +local CardCheck = require("main.zipai.CardCheck") +local M = {} +-- +function M.new(view,mainView) + setmetatable(M, {__index = PlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self._full = true + self:init() + return self +end + + +function M:onTouchBegin(context) + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + local button = context.sender + local card = button.data + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self:ShowHuTip(card.card_item) + end + card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/203_",card.card_item) + card.btn_card.sortingOrder = 100 + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + card.btn_card.xy = Vector2.New(card.btn_card.x+20 ,card.btn_card.y-50) + card.touch_pos = xy - button.xy + +end + +function M:__OnDragEnd(context) + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + if self.outcard_button then + self.outcard_button = nil + end + local button = context.sender + + local card = button.data + + local _room = DataManager.CurrenRoom + card.btn_card.sortingOrder = 0 + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + if (button.y < -380 and _room.curren_outcard_seat == _room.self_player.seat) then + button.touchable = false + self.outcard_button = card + self:UpdateIsOnClick(false) + self._mainView:OutCard(card.card_item) + else + local isChangeCard = false + self.outcard_button = nil + card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/201_",card.card_item) + self._area_handcard_list:AddChild(button) + if #self.card_list == 1 then + isChangeCard = false + self:UpdateHandCardsPos() + return + end + local CountCards = {} + for i=1,#self.card_list do + local lists = {} + if CountCards[self.card_list[i].index_X] == nil then + lists[#lists+1] = self.card_list[i] + CountCards[self.card_list[i].index_X]= lists + else + CountCards[self.card_list[i].index_X][#CountCards[self.card_list[i].index_X]+1] =self.card_list[i] + end + end + local minmark = 1 + local maxmark = #self.card_list + if card == self.card_list[1] or card == self.card_list[#self.card_list] then + if self.card_list[1].index_X == self.card_list[2].index_X then + minmark =2 + end + if self.card_list[#self.card_list].index_X == self.card_list[#self.card_list-1].index_X then + maxmark =#self.card_list-1 + end + end + if button.x+button.width/2 < self.card_list[minmark].btn_card.x and #CountCards<10 then + list_remove(self.card_list,card) + local num = 0 + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num+1 + end + end + if num ==0 then + for i=1,#self.card_list do + if self.card_list[i].index_X < card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + else + for i=1,#self.card_list do + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + card.index_X =1 + card.index_Y =1 + table.insert(self.card_list,1,card) + isChangeCard = true + elseif button.x+button.width/2 > (self.card_list[maxmark].btn_card.x +button.width) and #CountCards<10 then + list_remove(self.card_list,card) + local num = 0 + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X then + num = num+1 + end + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + end + if num ==0 then + for i=1,#self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + end + card.index_X =self.card_list[#self.card_list].index_X+1 + card.index_Y =1 + self.card_list[#self.card_list+1] =card + isChangeCard = true + else + local MoveCard = false + local MoveCardPos = 0 + local MoveCardY = 0 + for i=1,#CountCards do + local card_view = CountCards[i][1] + if card_view~=nil then + if button.x+button.width/2 > card_view.old_postion.x and button.x+button.width/2 < (card_view.old_postion.x+button.width) then + if card ~= card_view and #CountCards[i] <4 and card.index_X ~= card_view.index_X then + + MoveCardPos = i + MoveCardY = #CountCards[i]+1 + MoveCard = true + list_remove(self.card_list,card) + end + end + end + end + local MoveCardindex = 0 + -- local MoveCardY = 0 + if button.x+button.width/2 > card.old_postion.x and button.x+button.width/2 < (card.old_postion.x+button.width) then + if #CountCards[card.index_X]>1 then + for i=1,#CountCards[card.index_X] do + local _cv = CountCards[card.index_X][i] + if _cv ~= card then + if button.y+button.height/2 > _cv.btn_card.y and button.y+button.height/2 < (_cv.btn_card.y+button.height) then + --向下移動 + if ((button.y+button.height/2) +20) > (card.old_postion.y+button.height) then + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + --向上移動 + elseif ((button.y+button.height/2) -20) < card.old_postion.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + end + elseif i == #CountCards[card.index_X] and button.y+button.height/2 < _cv.btn_card.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + elseif i == 1 and button.y+button.height/2 > (_cv.btn_card.y+button.width) then + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + end + end + end + end + + end + if MoveCard ==true and MoveCardindex ==0 then + local num = 0 + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num+1 + end + end + if num ==0 then + for i=1,#self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + if MoveCardPos > card.index_X then + MoveCardPos = MoveCardPos-1 + end + end + card.index_X =MoveCardPos + card.index_Y =MoveCardY + for i=#self.card_list,1,-1 do + if MoveCardPos == self.card_list[i].index_X then + table.insert(self.card_list,(i+1),card) + break + end + end + isChangeCard = true + --上下移动 + elseif MoveCard ==true and MoveCardindex ~= 0 then + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X then + --向下移动 + if MoveCardindex == -1 then + if self.card_list[i].index_Y < card.index_Y and self.card_list[i].index_Y >= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y + 1 + + end + --向上移动 + else + if self.card_list[i].index_Y > card.index_Y and self.card_list[i].index_Y <= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + + end + end + end + end + card.index_X =MoveCardPos + card.index_Y =MoveCardY + for i=#self.card_list,1,-1 do + if MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY-1) then + table.insert(self.card_list,(i+1),card) + break + elseif MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY+1) then + table.insert(self.card_list,i,card) + break + end + end + isChangeCard = true + else + isChangeCard = false + self._area_handcard_list:AddChild(button) + end + + end + self:UpdateHandCardsPos() + if isChangeCard ==true then + self:SendChangeCard() + end + end +end + +function M:UpdateOutCardList(outcard,isShow,isMopai,seat) + if(isShow == nil) then + isShow = false + end + if(isMopai == nil) then + isMopai = false + end + self._area_outcard_list:RemoveChildren(0,-1,true) + local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + + if outcard==0 then + outcards:GetChild("icon").icon ="ui://Main_RunBeard/202_1_300" + else + outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/203_",outcard) + end + outcards.x,outcards.y = 0,0 + local show_di_bg = outcards:GetChild("show_di_bg") + -- show_di_bg.visible = true + if(isShow)then + if outcard == 0 then + show_di_bg.visible = false + end + if(seat ~= nil and outcards~=nil)then + if(isMopai)then + if outcard ~= 0 then + outcards:GetTransition("mopai"..seat):Play(function( ) + -- show_di_bg.visible = true + + end) + end + else + show_di_bg.visible = false + outcards:GetTransition("cpai"..seat):Play() + end + else + --show_di_bg.visible = true + end + else + show_di_bg.visible = false + end + self._area_outcard_list:AddChild(outcards) +end + +--弃牌 +function M:UpdateQiPai( qi_list,isplay) + self._area_qipai_list:RemoveChildren(0,-1,true) + for i=1,#qi_list do + local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + qicards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/202_",qi_list[i]) + if(isplay)then + if(i == #qi_list) then + qicards:GetTransition("t0"):Play() + end + end + self._area_qipai_list:AddChild(qicards) + end +end + +--摸牌动画 +function M:PlayingOutCardAnima( card) + coroutine.start(function() + coroutine.wait(0.1) + self:ClearOutCard() + end) +end + +function M:UpdateFzList( fz_list ,ispaly) + self._area_fz_list:RemoveChildren(0,-1,true) + for i = 1,#fz_list do + local fzitem=nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/ComponentNew") + if(ispaly == false)then + fzitem:RemoveChildren(0,-1,true) + end + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].active_card) + fzcards:GetController("c2").selectedIndex = 1 + fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[1]) + fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[2]) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Peng then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Wei then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetController("c1").selectedIndex=1 + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Pao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Ti then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + if j==4 then + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + else + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + end + end +end + + +function M:playAnim( fzitem,fzcards, size,i,ispaly ) + if(ispaly == nil)then + ispaly =false + end + if(ispaly and i == size)then + local faArray= fzitem:GetChild("chiwei") + if(faArray~=nil)then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end + self._area_fz_list:AddChild(fzitem) +end + + + --出牌提示动画 + function M:ChuPaiTiShi() + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + local chu_player = DataManager.CurrenRoom.self_player + local selfplayeTable = {} + selfplayeTable.handcard_list = chu_player.handcard_list + selfplayeTable.fz_list = chu_player.fz_list + selfplayeTable.tiCount = chu_player.tiCount + selfplayeTable.paoCount = chu_player.paoCount + selfplayeTable.hu_xi = chu_player.hu_xi + local player = membe_deep_clone(selfplayeTable) + local mark_ting= {} + for i=1,#DataManager.CurrenRoom.self_player.handcard_list do + local card = DataManager.CurrenRoom.self_player.handcard_list[i] + list_remove(player.handcard_list, card) + local _player = membe_deep_clone(player) + local tingList = CardCheck.tingPai(_player,DataManager.CurrenRoom) + local isKan = false + for j=1,#player.fz_list do + if card == player.fz_list[j].card and player.fz_list[j].type == RB_FZType.Kan then + isKan =true + end + end + if #tingList > 0 and isKan == false then + + mark_ting[#mark_ting+1] = card + end + table.insert(player.handcard_list, card) + table.sort( player.handcard_list, ViewUtil.HandCardSort) + end + -- print("ChuPaiTiShi",#mark_ting,vardump(player)) + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self._view :GetController("chupai").selectedIndex =1 + if #mark_ting>0 then + for i=1,#mark_ting do + for k=1,#self.card_list do + local card_view= self.card_list[k] + if card_view.card_item == mark_ting[i] then + card_view.btn_card:GetController("mark_ting").selectedIndex = 1 + end + end + end + end + else + self._view :GetController("chupai").selectedIndex =0 + for k=1,#self.card_list do + local card_view= self.card_list[k] + card_view.btn_card:GetController("mark_ting").selectedIndex = 0 + + end + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/hsrunbeard/Protocol.lua b/lua_probject/extend_project/extend/zipai/hsrunbeard/Protocol.lua new file mode 100644 index 00000000..f6929fad --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/hsrunbeard/Protocol.lua @@ -0,0 +1,51 @@ +local Protocol = { + + + -- 出牌 + GAME_DIS_CARD = "611", + -- 提示选择行为 + GAME_ACTION = "612", + + -- 通知服务器手牌队形改变 + GAME_CHANGE_CARD = "613", + -- 通知服务器牌字体改变 + GAME_CHANGE_TYPEfACE = "615", + + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 结算 + GAME_EVT_RESULT1 = "817", + + -- 弃牌 + GAME_EVT_QIPAI = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + --第二十一张牌 + GAME_EVT_ADD_CARD = "821", + + GAME_XIPAI = "20836", + GAME_EVENT_XIPAI = "20837", + GAME_EVENT_NOTIFY_XIPAI = "20838", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/hsrunbeard/RunBeard_GameEvent.lua b/lua_probject/extend_project/extend/zipai/hsrunbeard/RunBeard_GameEvent.lua new file mode 100644 index 00000000..ca5160d3 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/hsrunbeard/RunBeard_GameEvent.lua @@ -0,0 +1,40 @@ + +local RunBeard_GameEvent = { + -- 换座 + + -- 发牌 + SendCards = "SendCards", + + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + + EventDicelCard ="EventDicelCard", + OnEventTake = "OnEventTake", + + OnEcentRecond = "OnEcentRecond", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + QiCard = "QiCard", + AddCard = "AddCard", + + EventXiPai="EventXiPai", + + +} +return RunBeard_GameEvent diff --git a/lua_probject/extend_project/extend/zipai/hsrunbeard/RunBeard_ResultView.lua b/lua_probject/extend_project/extend/zipai/hsrunbeard/RunBeard_ResultView.lua new file mode 100644 index 00000000..bd11f47e --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/hsrunbeard/RunBeard_ResultView.lua @@ -0,0 +1,752 @@ +require('Game.View.ResultView') +local PendulumRule = require('main.zipai.PendulumRule') +local RunBeard_ResultView = {} + +local M = RunBeard_ResultView + +function RunBeard_ResultView.new(blur_view, index) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self.class = 'RunBeard_ResultView' + self._currenIndex = 0 + if index ~= 1 then + self._blur_view = blur_view + end + self._close_zone = false + + self:init('ui://Extend_Poker_HSRunBeard/clearing') + self.xiPaiCtr=self._view:GetController("xipai") + return self +end + +function M:init(url) + ResultView.init(self, url) + local btn_share = self._view:GetChild('btn_share') + btn_share.onClick:Set( + function() + ShareScreenShot() + end + ) +end + +function M:InitData(over, room, result, total_result, callback) + local _overCtr = self._view:GetController('over') + local btn_confirm = self._view:GetChild('btn_confirm') + local btn_result = self._view:GetChild('btn_showResult') + local _btnCtr = self._view:GetController('button') + local _sdkCtr = self._view:GetController('sdk') + local _icon = self._view:GetChild('win_base') + local btn_close = self._view:GetChild('btn_close') + self._view:GetChild('tex_roomnum').text = room.room_id + self._view:GetChild('tex_data').text = os.date('%Y-%m-%d %H:%M', os.time()) + + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig then + self.xiPaiCtr.selectedIndex=1 + else + self.xiPaiCtr.selectedIndex=0 + end + + local xipai=self._view:GetChild("btn_xipai") + xipai.touchable=true + xipai.onClick:Add(function() + local xiPaiCallBack=function () + xipai.touchable=false + self.xiPaiCtr.selectedIndex=0 + ViewUtil.ErrorTip(1000000,"申请洗牌成功") + end + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendXiPaiAction(xiPaiCallBack) + end) + if result and result.xipai_score then + --xipai.text="洗牌 积分x"..result.xipai_score + end + + if result ~= nil and result.liuju == true then + _icon.icon = 'ui://Main_RunBeard/liuju' + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + _overCtr.selectedIndex = 2 + + if over ~= 1 then + btn_confirm.onClick:Add( + function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:Close() + + if callback then + callback() + end + end + ) + self:AddClearItem(room, result, nil, over) + return + else + self.xiPaiCtr.selectedIndex=0 + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add( + function() + _overCtr.selectedIndex = 3 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + end + ) + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, result, total_result.info_list, over) + end + end + if over == 0 and result.liuju == false then + _icon.icon = 'ui://Main_RunBeard/jiesuan' + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + _overCtr.selectedIndex = 0 + btn_confirm.onClick:Add( + function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:Close() + + if callback then + callback() + end + end + ) + self:AddClearItem(room, result, nil, over) + elseif over == 1 and result.liuju == false then + _icon.icon = 'ui://Main_RunBeard/jiesuan' + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + _overCtr.selectedIndex = 0 + btn_result.onClick:Add( + function() + _overCtr.selectedIndex = 3 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + end + ) + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, result, total_result.info_list, over) + else + if result ~= nil then + if result.liuju == false then + _icon.icon = 'ui://Main_RunBeard/jiesuan' + over = 2 + _overCtr.selectedIndex = 3 + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, nil, total_result.info_list, over) + end + else + _icon.icon = 'ui://Main_RunBeard/jiesuan' + over = 2 + _overCtr.selectedIndex = 3 + self.xiPaiCtr.selectedIndex=0 + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, nil, total_result.info_list, over) + end + end +end + +function M:AddClearItem(room, data, total_data, over) + local n = over + 1 + local list_view1 = self._view:GetChild('player_list') + local list_view2 = self._view:GetChild('player_list_2') + + if data ~= nil and data.liuju == true then + self:FillLiuJuItemData(room, data) + if over == 1 then + self:FillItemData2(room, total_data, list_view2) + end + else + if 0 == over or 1 == over and data.liuju == false then + self:FillItemData(room, data, list_view1) + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end + end +end + +function M:GetPos(room, seat) + return ViewUtil.GetPos(room.self_player.seat, seat, room.room_config.people_num) +end +function M:FillLiuJuItemData(room, data) + local qipai_list = self._view:GetChild('qipai_listl') + local _dipaiC = self._view:GetController('qipai') + qipai_list:RemoveChildrenToPool() + if data.throw_card ~= nil and #data.throw_card > 0 then + _dipaiC.selectedIndex = 1 + local hand_card = PendulumRule.GetHandCard(data.throw_card, 3) + for k = 1, #hand_card do + local cards = qipai_list:AddItemFromPool() + for j = 1, #hand_card[k] do + cards:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + else + _dipaiC.selectedIndex = 0 + end + for i = 1, #data.info_list do + if data.info_list[i].seat ~= room.self_player.seat and #data.info_list[i].hand_card > 0 then + local card_list + if #data.info_list == 2 then + card_list = self._view:GetChild('card_list_2') + else + if self:GetPos(room, data.info_list[i].seat) == 2 then + card_list = self._view:GetChild('card_list_1') + else + card_list = self._view:GetChild('card_list_3') + end + end + + card_list:RemoveChildrenToPool() + for k = 1, #data.info_list[i].opCardList do + local fztype = data.info_list[i].opCardList[k].type + if fztype == RB_FZType.Kan then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', data.info_list[i].opCardList[k].card1) + end + end + end + local hand_card = PendulumRule.GetHandCard(data.info_list[i].hand_card, 3) + for k = 1, #hand_card do + local item = card_list:AddItemFromPool() + for j = 1, #hand_card[k] do + item:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + end + end +end + +function M:FillItemData(room, data, item) + local dipai_list = self._view:GetChild('dipai_list') + dipai_list:RemoveChildren(0, -1, true) + if data.left_card ~= nil and #data.left_card > 0 then + for i = 1, #data.left_card do + local dipais = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Qipai') + dipais:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/202_', data.left_card[i]) + dipai_list:AddChild(dipais) + end + end + local qipai_list = self._view:GetChild('qipai_list') + local _dipaiC = self._view:GetController('qipai') + qipai_list:RemoveChildrenToPool() + if data.throw_card ~= nil and #data.throw_card > 0 then + _dipaiC.selectedIndex = 1 + local hand_card = PendulumRule.GetHandCard(data.throw_card, 3) + for k = 1, #hand_card do + local cards = qipai_list:AddItemFromPool() + for j = 1, #hand_card[k] do + cards:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + else + _dipaiC.selectedIndex = 0 + end + local info_list = data.info_list + local Yes_win = false + local win_data = {} + for i = 1, #info_list do + if info_list[i].is_win == true then + Yes_win = true + win_data = info_list[i] + end + end + if win_data.seat == room.self_player.seat then + self._view:GetChild('show_win').visible = true + self._view:GetChild('show_low').visible = false + else + self._view:GetChild('show_win').visible = false + self._view:GetChild('show_low').visible = true + end + + if Yes_win == true then + local isWin_Card = true + local p = room:GetPlayerBySeat(win_data.seat) + if p.self_user.account_id == room.owner_id then + self._view:GetController('owner').selectedIndex = 1 + end + if p.seat == room.banker_seat then + self._view:GetController('bank').selectedIndex = 1 + end + self._view:GetChild('WinerName').text = p.self_user.nick_name + self._view:GetChild('chongtunshu').text = '充囤:' .. room.room_config.tun .. ' 囤' + self._view:GetChild('huxi').text = '胡息:' .. win_data.hu_xi + self._view:GetChild('tunshu').text = '基础囤数:' .. win_data.tun + self._view:GetChild('zongtunshu').text = '总囤数:' .. win_data.total_tun + if win_data.round_score >= 0 then + self._view:GetChild('score').text = '游戏分:+' .. win_data.round_score + self._view:GetChild('score').grayed = false + else + self._view:GetChild('score').text = '游戏分:' .. win_data.round_score + self._view:GetChild('score').grayed = true + end + local hp_info = win_data.hp_info + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值 + self._view:GetChild('tili_score').visible = true + self._view:GetChild('tili_title').visible = true + if (round_actual_hp > 0) then + self._view:GetChild('tili_score').text = '积分:+' .. round_actual_hp + self._view:GetChild('tili_score').grayed = false + else + self._view:GetChild('tili_score').text = '积分:' .. round_actual_hp + self._view:GetChild('tili_score').grayed = true + end + end + + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限 + if (isupper_limit) then + self._view:GetChild('yidashangxian').text = '已达上限' + else + self._view:GetChild('yidashangxian').text = '' + end + end + + local btn_head = self._view:GetChild('btn_head') + ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) + local fullname_list = self._view:GetChild('fullname_list') + fullname_list:RemoveChildren(0, -1, true) + if win_data.mingtang ~= nil and #win_data.mingtang > 0 then + for i = 1, #win_data.mingtang do + local dipais = UIPackage.CreateObjectFromURL('ui://Extend_Poker_HSRunBeard/FullName') + dipais:GetChild('n0').icon = 'ui://Extend_Poker_HSRunBeard/hu_' .. win_data.mingtang[i].mingtang + if win_data.mingtang[i].type == 1 and win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 番' + elseif win_data.mingtang[i].type == 2 and win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 囤' + elseif win_data.mingtang[i].type == 3 and win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 倍' + end + fullname_list:AddChild(dipais) + end + end + local card_list = self._view:GetChild('card_list') + card_list:RemoveChildrenToPool() + if #win_data.cardList > 0 then + for i = 1, #win_data.cardList do + -- 1 是对子 2 是三个的 + local fztype = win_data.cardList[i].type + if fztype == 1 then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '将' + cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi + cards:GetController('c1').selectedIndex = 0 + if win_data.cardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + for j = 1, 2 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card1) + end + else + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '顺' + if + win_data.cardList[i].card1 == win_data.cardList[i].card2 and + win_data.cardList[i].card1 == win_data.cardList[i].card3 + then + cards:GetChild('card_type').text = '碰' + end + cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card1) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card2) + cards:GetChild('card_3').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card3) + if isWin_Card == true then + if win_data.cardList[i].card1 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + elseif win_data.cardList[i].card2 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 2 + elseif win_data.cardList[i].card3 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 3 + end + end + end + end + end + for i = 1, #win_data.opCardList do + local fztype = win_data.opCardList[i].type + if fztype == RB_FZType.Chi then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '顺' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card2) + cards:GetChild('card_3').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card3) + if isWin_Card == true then + if win_data.opCardList[i].card1 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + elseif win_data.opCardList[i].card2 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 2 + elseif win_data.opCardList[i].card3 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 3 + end + end + elseif fztype == RB_FZType.Peng then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '碰' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + elseif fztype == RB_FZType.Kan then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '坎' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + elseif fztype == RB_FZType.Wei or fztype == RB_FZType.ChouWei then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '畏' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + elseif fztype == RB_FZType.Pao then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '跑' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 2 + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + elseif fztype == RB_FZType.Ti then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '提' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 2 + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + end + end + + if #win_data.hand_card > 0 then + for i = 1, #win_data.hand_card, 4 do + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '散' + cards:GetChild('card_huxi').text = 0 + cards:GetController('c1').selectedIndex = 2 + for j = 0, 3 do + if (i + j) <= #win_data.hand_card then + cards:GetChild('card_' .. (j + 1)).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.hand_card[i + j]) + if win_data.hand_card[i + j] == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = j + 1 + end + end + end + end + end + end + + item:RemoveChildrenToPool() + for i = 1, #info_list do + if info_list[i].is_win == false then + local player = item:AddItemFromPool() + local p = room:GetPlayerBySeat(info_list[i].seat) + if p.self_user.account_id == room.owner_id then + player:GetController('owner').selectedIndex = 1 + end + if p.seat == room.banker_seat then + player:GetController('bank').selectedIndex = 1 + end + local btn_head = player:GetChild('btn_head') + ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) + player:GetChild('playerName').text = p.self_user.nick_name + if info_list[i].round_score >= 0 then + player:GetChild('score').text = '+' .. info_list[i].round_score + player:GetChild('score').grayed = false + else + player:GetChild('score').text = info_list[i].round_score + player:GetChild('score').grayed = true + end + local hp_info = info_list[i].hp_info + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值 + player:GetChild('tili_score').visible = true + player:GetChild('tili_title').visible = true + if (round_actual_hp > 0) then + player:GetChild('tili_score').text = '+' .. round_actual_hp + player:GetChild('tili_score').grayed = false + else + player:GetChild('tili_score').text = '' .. round_actual_hp + player:GetChild('tili_score').grayed = true + end + end + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限 + if (isupper_limit) then + player:GetChild('yidashangxian').text = '已达上限' + else + player:GetChild('yidashangxian').text = '' + end + end + local card_list = player:GetChild('card_list') + card_list:RemoveChildrenToPool() + for k = 1, #info_list[i].opCardList do + local fztype = info_list[i].opCardList[k].type + if fztype == RB_FZType.Chi then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card2) + cards:GetChild('card_3').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card3) + elseif fztype == RB_FZType.Peng then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Kan then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Wei or fztype == RB_FZType.ChouWei then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Pao then + local cards = card_list:AddItemFromPool() + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Ti then + local cards = card_list:AddItemFromPool() + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + end + end + if #info_list[i].hand_card > 0 then + local hand_card = PendulumRule.GetHandCard(info_list[i].hand_card, 3) + for k = 1, #hand_card do + local cards = card_list:AddItemFromPool() + for j = 1, #hand_card[k] do + cards:GetChild('card_' .. (j)).icon = + self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + end + end + end +end + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + local p = room:GetPlayerBySeat(data[i].seat) + player_list[i].id = user.account_id + local total_score = data[i].total_score + player_list[i].hp_info = data[i].hp_info + player_list[i].score = total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + local entrust = data[i].entrust + if entrust == nil then + entrust = false + end + player_list[i].entrust = entrust + player_list[i].param = {} + local wcount = 0 + if (data[i].win_count ~= nil) then + wcount = data[i].win_count + end + local hxcount = 0 + if (data[i].total_huxi ~= nil) then + hxcount = data[i].total_huxi + end + player_list[i].param[1] = {} + player_list[i].param[1].key = '胡牌次数:' + player_list[i].param[1].value = tostring(wcount) + player_list[i].param[2] = {} + player_list[i].param[2].key = '胡息总数:' + player_list[i].param[2].value = tostring(hxcount) + end + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + self:SetGSListlineGap(5) + self:InitBigResult(room, 26) + DataManager.CurrenRoom = nil + -- list:RemoveChildrenToPool() + -- for i =1, #data do + -- local total_score = room:GetTotalScore(data[i].total_score) + -- local item = list:AddItemFromPool() + -- local p = room:GetPlayerBySeat(data[i].seat) + -- if p.self_user.account_id == room.owner_id then + -- item:GetController("owner").selectedIndex = 1 + -- end + + -- local btn_head = item:GetChild("btn_head") + -- ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) + -- item:GetChild("win_count").text = "胡牌次数:"..data[i].win_count.."次" + -- item:GetChild("total_huxi").text = "胡息总数:"..data[i].total_huxi + -- --点赞 + -- self:Click_zan(item, p.self_user.account_id) + + -- item:GetChild("name").text = p.self_user.nick_name + + -- local hp_info = data[i].hp_info + -- if(hp_info ~=nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + -- -- --体力值 + -- -- local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值 + -- local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限 + -- if(isupper_limit)then + -- item:GetChild("yidashangxian").text = "已达上限" + -- else + -- item:GetChild("yidashangxian").text = "" + -- end + -- end + -- local x = room:GetOriginScore(total_score) + -- if total_score >= 0 then + -- item:GetChild("score").text = "+"..x + -- item:GetChild("score").grayed = false + -- else + -- item:GetChild("score").text = x + -- item:GetChild("score").grayed = true + -- end + -- if room.hpOnOff == 1 and room.score_times ~= 1 or room:checkHpNonnegative() then + -- item:GetController("bei") .selectedIndex=1 + -- item:GetChild("sss").text = room.score_times + -- if(hp_info ~= nil)then + -- local round_actual_hp = d2ad(hp_info.total_hp) --// 本局实际输赢体力值 + -- total_score = round_actual_hp + -- end + -- if total_score >= 0 then + -- item:GetChild("score1").text = "+"..total_score + -- item:GetChild("score1").grayed = false + -- else + -- item:GetChild("score1").text = total_score + -- item:GetChild("score1").grayed = true + -- end + -- end + -- if #data ==3 then + -- if i ==1 then + -- if total_score >data[2].total_score and total_score >data[3].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- elseif i ==2 then + -- if total_score >data[1].total_score and total_score >data[3].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- elseif i ==3 then + -- if total_score >data[2].total_score and total_score >data[1].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- end + -- else + -- if i ==1 then + -- if total_score >data[2].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- elseif i ==2 then + -- if total_score >data[1].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- end + + -- end + -- end + + -- DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild('btn_head') + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= '' then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end +function M:getCardItem(card_1, card_2) + local _room = DataManager.CurrenRoom + if _room ~= nil and _room.change_card_display ~= nil then + return card_1 .. _room.change_card_display .. card_2 + else + return card_1 .. '2_' .. card_2 + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/runbeard/EXGameController.lua b/lua_probject/extend_project/extend/zipai/runbeard/EXGameController.lua new file mode 100644 index 00000000..9fa35c56 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/EXGameController.lua @@ -0,0 +1,535 @@ +local RB_Protocol = import(".Protocol") +local FZTipList = import(".main.FZData") +local RB_GameEvent = import(".RunBeard_GameEvent") +local M = {} + +--- Create a new HZ_GameController +function M.new() + setmetatable(M,{__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("湘潭跑胡子") + self.class = "RB_GameController" + return self +end + +function M:init(name) + GameController.init(self,name) + self._eventmap[RB_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[RB_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[RB_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[RB_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[RB_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[RB_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + + self._eventmap[RB_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[RB_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[RB_Protocol.GAME_EVT_FANGWEI] = self.OnEventFangWei + + self._eventmap[RB_Protocol.GAME_EVENT_XIPAI] = self.OnEventXiPai + self._eventmap[RB_Protocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim + + self._eventmap[RB_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[RB_Protocol.GAME_EVT_QIPAI] = self.OnEventQIPAI + self._eventmap[RB_Protocol.GAME_EVT_ADD_CARD] = self.OnAddCard + +end + +function M:SendXiPaiAction(callBack) + + local _data = {} + local _client = ControllerManager.GameNetClinet + _client:send(RB_Protocol.GAME_XIPAI, _data) + self.XiPaiCallBack=callBack +end + +function M:OnEventXiPai(evt_data) + + if evt_data["result"]==0 then + if self.XiPaiCallBack then + self.XiPaiCallBack() + end + else + ViewUtil.ErrorTip(1000000,"申请洗牌失败") + end + +end + +function M:OnEventXiPaiAnim(evt_data) + local playeridList = evt_data["list"] + local isXiPai=false + local otherisXiPai = false + if playeridList and #playeridList>0 then + for i=1,#playeridList do + local p = self._room:GetPlayerById(playeridList[i]) + if p== self._room.self_player then + isXiPai=true + else + otherisXiPai=true + end + end + end + + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.EventXiPai,isXiPai,otherisXiPai) + end) +end + +-- 发送出牌指令到服务器 +function M:SendOutCard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_DIS_CARD, _data) + end + +end +--GAME_CHANGE_CARD GAME_DIS_CARD +function M:SendChangeCards( card_list ) + local _data = {} + if card_list then + _data["card_list"] = card_list + else + _data["card_list"]={} + end + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_CHANGE_CARD, _data) + end +end + +function M:SendFangPao(card) + local _data = {} + if card then + _data["card"] = card + else + _data["card"]={} + end + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_EVT_FANGPAO, _data) + end +end + +function M:SendChangeTypeFace(TypeFace) + -- body + local _data = {} + _data["typeface"] = TypeFace + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_CHANGE_TYPEfACE, _data) + end +end + + +function M:ConformToNextGame( ) + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_EVT_CHUI) + end +end + +-- 发送放子选择到服务器 +function M:SendAction(id,num) + local _data = {} + _data["id"] = id + if num ~=nil then + _data["biid"] = num + end + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_ACTION, _data) + end +end + +function M:OnEventSendCards(evt_data) + printlog("jefe 0发牌事件===》》》") + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + _room.curren_round = _room.curren_round + 1 + if _room.curren_round > 0 then _room.playing = true end + local handcards = {} + if evt_data.card_list and #evt_data.card_list>0 then + handcards = evt_data["card_list"] + else + ViewUtil.ErrorTip(100000,"发牌数据异常") + end + + local p = _room.self_player + local seat =nil + if evt_data.bank_seat then + seat = evt_data["bank_seat"] + else + ViewUtil.ErrorTip(100001,"发牌座位异常") + end _room.banker_seat = seat + for i=1,#_room.player_list do + _room.self_player.handcard_list ={} + _room.self_player.card_list = {} + _room.player_list[i].hand_left_count = 20 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + _room.player_list[i].outcard_list = {} + _room.player_list[i].hu_xi = 0 + end + self._cacheEvent:Enqueue(function() + _room.self_player.handcard_list=handcards + self._room.self_player.hand_left_count = #handcards + DispatchEvent(self._dispatcher,RB_GameEvent.SendCards, p) + ControllerManager.IsSendCard=true + end) +end + +function M:OnEventOutCard(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + printlog("jefe OnEventOutCard>>>>",card) + -- 判断是否对方有偎 + + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + if(seat == _room.self_player.seat) then + list_remove(_room.self_player.handcard_list,card) + end + p.DiceCard = card + p.hand_left_count = p.hand_left_count -1 + DispatchEvent(self._dispatcher,RB_GameEvent.OutCard, p,card) + end) +end + +function M:OnEventQIPAI(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + if(not p.outcard_list) then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + DispatchEvent(self._dispatcher,RB_GameEvent.QiCard, seat,card) + end) +end + +function M:OnEventTakeCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + if card ~=0 then + p.DiceCard = card + end + DispatchEvent(self._dispatcher,RB_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnAddCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local p = _room:GetPlayerBySeat(seat) + + self._cacheEvent:Enqueue(function() + p.DiceCard = 0 + p.hand_left_count = p.hand_left_count +1 + if (seat == _room.self_player.seat) then + _room.self_player.handcard_list[#_room.self_player.handcard_list+1] = card + end + DispatchEvent(self._dispatcher,RB_GameEvent.AddCard, seat, card) + end) +end + +function M:OnEventOutHint(evt_data) + printlog("jefe OutHint 提示===>>>>") + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.OutHint) + end) + +end + +function M:OnEventTurn(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + local uid = evt_data["uid"] + local fptype = evt_data['fptype'] + for i=1,#list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + + -- if false then + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + tip.bi_list = dtip["bi_list"] + if (dtip["opcard"]) then + local opcard = dtip["opcard"] + tip.OpCard = opcard + table.sort(tip.OpCard) + tip.OpCard[3] = tip.Card + end + tiplist:AddTip(tip) + -- end + + end + DispatchEvent(self._dispatcher,RB_GameEvent.FZTips, tiplist,uid,fptype) + end) +end + +-- 放喂提示 +function M:OnEventFangWei(evt_data) + printlog("jefe fangwei 提示===>>>>") + pt(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.FangWei,seat,card) + end) +end + +function M:OnEventFzAction(evt_data) + printlog("jefe EventFz 操作提示===>>>>") + local _room = self._room + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local ftype = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + local huxi = evt_data["hu_xi"] + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local isNeedDelHandCard =0 + p.hu_xi = huxi + local fz = {} + fz.card = card + fz.type = ftype + fz.active_card = actice_card + fz.from_seat = from_seat + fz.opcard =opcard + local remove_num = #opcard + if ftype == RB_FZType.Chi then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Bi then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + list_remove(_room.self_player.handcard_list,fz.card) + end + elseif ftype == RB_FZType.Peng then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Kan then + if (p == _room.self_player) then + if #opcard==2 then + _room.self_player.handcard_list[#_room.self_player.handcard_list+1] = card + end + p.fz_list[#p.fz_list+1] = fz + end + elseif ftype == RB_FZType.ChouWei then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,2 do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Wei then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Pao then + + if (p == _room.self_player) then + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + if p.fz_list[i].type == RB_FZType.Kan then + isNeedDelHandCard =3 + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + remove_num= 0 + p.fz_list[i].type= RB_FZType.Pao + end + end + local num =0 + for i=1,#_room.self_player.handcard_list do + if card == _room.self_player.handcard_list[i] then + num=num+1 + end + end + if num>0 then + isNeedDelHandCard =num + + for i=1,num do + list_remove(_room.self_player.handcard_list,card) + end + local isAddTi =false + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Pao + isAddTi=true + remove_num= 0 + end + end + if isAddTi==false then + p.fz_list[#p.fz_list+1] = fz + end + end + + else + local num =0 + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Pao + num=1 + remove_num= 0 + end + end + if num==0 then + p.fz_list[#p.fz_list+1] = fz + end + end + + elseif ftype == RB_FZType.Ti then + + if (p == _room.self_player) then + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + if p.fz_list[i].type == RB_FZType.Kan then + isNeedDelHandCard =3 + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + remove_num= 0 + p.fz_list[i].type= RB_FZType.Ti + end + end + local num =0 + for i=1,#_room.self_player.handcard_list do + if card == _room.self_player.handcard_list[i] then + num=num+1 + end + end + if num>0 then + isNeedDelHandCard =num + + for i=1,num do + list_remove(_room.self_player.handcard_list,card) + end + local isAddTi =false + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Ti + remove_num= 0 + isAddTi=true + end + end + if isAddTi==false then + p.fz_list[#p.fz_list+1] = fz + end + end + + else + local num =0 + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Ti + remove_num= 0 + num=1 + end + end + if num==0 then + p.fz_list[#p.fz_list+1] = fz + end + + end + + end + + + p.hand_left_count = p.hand_left_count - remove_num + if fz.type == RB_FZType.Pao or fz.type == RB_FZType.Ti then + coroutine.start(function() + coroutine.wait(0.5) + DispatchEvent(self._dispatcher,RB_GameEvent.FangziAction, fz, p,isNeedDelHandCard) + end) + else + DispatchEvent(self._dispatcher,RB_GameEvent.FangziAction, fz, p,isNeedDelHandCard) + end + + end) +end + +function M:OnEventHu(evt_data) + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + -- print(win_p.hand_left_count) + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + table.sort( win_p.card_list, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher,RB_GameEvent.ZPHuCard, evt_data["seat"],evt_data["from_seat"],cards) + end) +end + +function M:OneventResult1(evt_data) + local over = evt_data.type + --0:小结算 1:小大结算 2:大结算 + self._room.playing = false + if 0 == over then + local result = evt_data.result + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil,true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/runbeard/EXGameInfo.lua b/lua_probject/extend_project/extend/zipai/runbeard/EXGameInfo.lua new file mode 100644 index 00000000..a6aee365 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/EXGameInfo.lua @@ -0,0 +1,394 @@ +local EXGameInfo = {} + +local M = EXGameInfo + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = 'EXGameInfo' + UIPackage.AddPackage('extend/zipai/runbeard/ui/Extend_Poker_RunBeard') + UIPackage.AddPackage('extend/zipai/runbeard/ui/Info_Poker_RunBeard') + return self +end + +function M:FillData() + self._maxPlayer = 3 -- 默认玩家人数 + self._roundChoice = 3 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL('ui://Extend_Poker_RunBeard/Cgm_create_room') + + if oldGameVersion ==1 then + --self._config:GetChild("xipai").visible=false + end + + + if oldGameVersion==2 then + self._config:GetController("xipai").selectedIndex=1 + self.xipaiValueText=self._config:GetChild('xipaifen') + self.xipaiValueText.text=1 + self.xipaiValue=1 + + self.anchouValueText=self._config:GetChild('anchoufen') + self.anchouValueText.text=1 + self.anchouValue=1 + + local btn_cr = self._config:GetChild('sdsrbtn') + btn_cr.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.xipaiValueText.text=value/1000 + self.xipaiValue=value/1000 + + end, 3, nil) + gniv:Show() + + + end + ) + + local btn_cr2 = self._config:GetChild('anchoubtn') + btn_cr2.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.anchouValueText.text=value/1000 + self.anchouValue=value/1000 + + end, 3, nil) + gniv:Show() + + + end + ) + + end + + + local btn_jia = self._config:GetChild('btn_jia') + local btn_jian = self._config:GetChild('btn_jian') + local btn_jia1 = self._config:GetChild('btn_jia1') + local btn_jian1 = self._config:GetChild('btn_jian1') + --local btn_jia2 = self._config:GetChild('btn_jia2') + local btn_jian2 = self._config:GetChild('btn_jian2') + -- local fS=self._config:GetChild('btn_round8'):GetChild("title") + -- fS.text="1局" + -- fS=self._config:GetChild('btn_round16'):GetChild("title") + -- fS.text="8局" + btn_jia.onClick:Set( + function() + if self._config:GetController('tun').selectedIndex ~= 5 then + self._config:GetController('tun').selectedIndex = self._config:GetController('tun').selectedIndex + 1 + end + if self._config:GetController('tun').selectedIndex == 5 then + btn_jia.touchable = false + btn_jia.grayed = true + end + if self._config:GetController('tun').selectedIndex > 0 then + btn_jian.touchable = true + btn_jian.grayed = false + end + end + ) + btn_jian.onClick:Set( + function() + if self._config:GetController('tun').selectedIndex ~= 0 then + self._config:GetController('tun').selectedIndex = self._config:GetController('tun').selectedIndex - 1 + end + if self._config:GetController('tun').selectedIndex == 0 then + btn_jian.touchable = false + btn_jian.grayed = true + end + if self._config:GetController('tun').selectedIndex < 5 then + btn_jia.touchable = true + btn_jia.grayed = false + end + end + ) + btn_jia1.onClick:Set( + function() + if self._config:GetController('tun').selectedIndex ~= 5 then + self._config:GetController('tun').selectedIndex = self._config:GetController('tun').selectedIndex + 1 + end + if self._config:GetController('tun').selectedIndex == 5 then + btn_jia1.touchable = false + btn_jia1.grayed = true + end + if self._config:GetController('tun').selectedIndex > 0 then + btn_jian1.touchable = true + btn_jian1.grayed = false + end + end + ) + btn_jian1.onClick:Set( + function() + if self._config:GetController('tun').selectedIndex ~= 0 then + self._config:GetController('tun').selectedIndex = self._config:GetController('tun').selectedIndex - 1 + end + if self._config:GetController('tun').selectedIndex == 0 then + btn_jian1.touchable = false + btn_jian1.grayed = true + end + if self._config:GetController('tun').selectedIndex < 5 then + btn_jia1.touchable = true + btn_jia1.grayed = false + end + end + ) + + --btn_jia2.onClick:Set( + -- function() + -- if self._config:GetController('tun').selectedIndex ~= 5 then + -- self._config:GetController('tun').selectedIndex = self._config:GetController('tun').selectedIndex + 1 + -- end + -- if self._config:GetController('tun').selectedIndex == 5 then + -- btn_jia2.touchable = false + -- btn_jia2.grayed = true + -- end + -- if self._config:GetController('tun').selectedIndex > 0 then + -- btn_jian2.touchable = true + -- btn_jian2.grayed = false + -- end + -- end + -- ) + -- btn_jian2.onClick:Set( + -- function() + -- if self._config:GetController('tun').selectedIndex ~= 0 then + -- self._config:GetController('tun').selectedIndex = self._config:GetController('tun').selectedIndex - 1 + -- end + -- if self._config:GetController('tun').selectedIndex == 0 then + -- btn_jian2.touchable = false + -- btn_jian2.grayed = true + -- end + -- if self._config:GetController('tun').selectedIndex < 5 then + -- btn_jia2.touchable = true + -- btn_jia2.grayed = false + -- end + -- end + -- ) +end +local _help_url = 'ui://Info_Poker_RunBeard/Com_help' +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_Poker_RunBeard/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_Poker_RunBeard/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +local _play_list = {"多红多番","红黑点","全名堂"} +function M:GetPlayList() + return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local wanfa_C = _config:GetController('btn_Controller').selectedIndex + local round = _config:GetController('round').selectedIndex+1 --== 0 and 1 or 2 + local Cost = _config:GetController('Cost').selectedIndex + local tun = _config:GetController('tun').selectedIndex + local fengding = _config:GetController('fengding').selectedIndex + --local choupai = _config:GetController('choupai').selectedIndex + local tuanyuan = _config:GetController('tuanyuan').selectedIndex + local hanghangxi = _config:GetController('hanghangxi').selectedIndex + local siqi = _config:GetController('siqi').selectedIndex + local shuahou = _config:GetController('shuahou').selectedIndex + local huangfan = _config:GetController('huangfan').selectedIndex + local jiaxingxing = _config:GetController('jiaxingxing').selectedIndex + local tinghu = _config:GetController('tinghu').selectedIndex + local duizifu = _config:GetController('duizifu').selectedIndex + local back = _config:GetController('Back').selectedIndex + local yuan = _config:GetController('yuan').selectedIndex + local tianhu = _config:GetController('tianhu').selectedIndex + local dihu = _config:GetController('dihu').selectedIndex + local haihu = _config:GetController('haihu').selectedIndex + local renshu = _config:GetController('renshu').selectedIndex == 0 and 2 or 3 + + local qixihu = _config:GetController('qixihu').selectedIndex --起息胡 + local weipai = _config:GetController('weipai').selectedIndex --偎牌 + local xidouble30 = _config:GetController('xidouble30').selectedIndex --30息胡翻倍 + local zimo = _config:GetController('zimo').selectedIndex --自摸加3 + local daxiaozi = _config:GetController('daxiaozi').selectedIndex --大小胡 + local hongheihu = _config:GetController('hongheihu').selectedIndex --红黑胡 + local yidianhu = _config:GetController('yidianhu').selectedIndex --一点红 + + local qupai=0 + if renshu==2 then + qupai=_config:GetController('qupai').selectedIndex + end + -- local qupai = _config:GetController('qupai').selectedIndex == 1 and true or false + local _data = {} + --wanfa_C=2 + _data['opt'] = round -- 1 2 8局 16 局 + _data['mode'] = wanfa_C + 1 -- 1 全名堂 2 红黑点 3 多红多番 + _data['AA'] = Cost + _data['maxPlayers'] = renshu + if wanfa_C == 0 then + _data['tun'] = tun -- 充囤 0 1 2 3 4 5 分别是 0 1 2 3 4 5 + _data['tianhu'] = tianhu + _data['dihu'] = dihu + _data['haihu'] = haihu + _data['tinghu'] = tinghu + _data['huangfan'] = huangfan + _data['fengding'] = fengding -- 封顶 0 + _data['qupai'] = qupai + + _data['qixihu'] = qixihu + _data['weipai'] = weipai + _data['xidouble30'] = xidouble30 + _data['zimo'] = zimo + _data['daxiaozi'] = daxiaozi + _data['hongheihu'] = hongheihu + _data['yidianhu'] = yidianhu + + elseif wanfa_C == 1 then + _data['tun'] = tun -- 充囤 0 1 2 3 4 5 分别是 0 1 2 3 4 5 + _data['fengding'] = fengding -- 封顶 0 1 2 红黑点分别是 不封顶 单局20封顶 单局 40封顶 + _data['duizifu'] = duizifu -- 对子胡 0 不选 1 选 + elseif wanfa_C == 2 then + _data['tun'] = tun -- 充囤 0 1 2 3 4 分别是 1 2 3 4 5 + _data['fengding'] = fengding -- 封顶 0 1 2 全名堂分别是 不封顶 100封顶 200封顶 + _data['tuanyuan'] = tuanyuan -- 大团圆 0 不选 1 选 + _data['hanghangxi'] = hanghangxi -- 行行息 0 不选 1 选 + _data['shuahou'] = shuahou -- 耍猴 0 不选 1 选 + _data['huangfan'] = huangfan -- 黄番 0 不选 1 选 + _data['jiaxingxing'] = jiaxingxing -- 假行行 0 不选 1 选 + _data['tinghu'] = tinghu -- 听胡 0 不选 1 选 + _data['siqi'] = siqi -- 四七红 0 不选 1 选 + _data['back'] = back -- 四七红 0 不选 1 选 + _data['yuan'] = yuan -- 四七红 0 不选 1 选 + end + -- if renshu == 2 then + -- _data['qupai'] = false + -- end + + local xi_pai=false + if oldGameVersion ==2 then + if _config:GetChild("xipai") then + xi_pai = _config:GetChild("xipai").selected + end + end + + _data['xi_pai'] = xi_pai + + local xi_pai_score=0 + local an_chou_score=0 + if oldGameVersion==2 then + xi_pai_score=self.xipaiValue + an_chou_score=self.anchouValue + end + + _data['xi_pai_score'] = xi_pai_score*1000 + _data['an_chou_score'] = an_chou_score*1000 + + return _data +end + +function M:LoadConfigData(data) + local _config = self._config + -- data.mode=3 + _config:GetController('btn_Controller').selectedIndex = data.mode - 1 + _config:GetController('round').selectedIndex = data.opt - 1 --== 1 and 0 or 1 + _config:GetController('Cost').selectedIndex = data.AA + _config:GetController('renshu').selectedIndex = data.maxPlayers == 2 and 0 or 1 + + + + if data.mode == 1 then + _config:GetController('haihu').selectedIndex = 0 + _config:GetController('tinghu').selectedIndex = 0 + _config:GetController('tianhu').selectedIndex = data.tianhu + _config:GetController('dihu').selectedIndex = 0 + _config:GetController('huangfan').selectedIndex = 0 + _config:GetController('tun').selectedIndex = data.tun + _config:GetController('fengding').selectedIndex = data.fengding + _config:GetController('qupai').selectedIndex = data.qupai + + _config:GetController('qixihu').selectedIndex = data.qixihu + _config:GetController('weipai').selectedIndex = data.weipai + _config:GetController('xidouble30').selectedIndex = data.xidouble30 + _config:GetController('zimo').selectedIndex = data.zimo + _config:GetController('daxiaozi').selectedIndex = data.daxiaozi + _config:GetController('hongheihu').selectedIndex = data.hongheihu + _config:GetController('yidianhu').selectedIndex = data.yidianhu + + elseif data.mode == 2 then + _config:GetController('tun').selectedIndex = data.tun + _config:GetController('fengding').selectedIndex = data.fengding + _config:GetController('duizifu').selectedIndex = data.duizifu + elseif data.mode == 3 then + + _config:GetController('tun').selectedIndex = data.tun + _config:GetController('fengding').selectedIndex = data.fengding + _config:GetController('tuanyuan').selectedIndex = data.tuanyuan + _config:GetController('hanghangxi').selectedIndex = data.hanghangxi + _config:GetController('siqi').selectedIndex = data.siqi + _config:GetController('shuahou').selectedIndex = data.shuahou + _config:GetController('huangfan').selectedIndex = data.huangfan + _config:GetController('jiaxingxing').selectedIndex = data.jiaxingxing + _config:GetController('tinghu').selectedIndex = data.tinghu + _config:GetController('Back').selectedIndex = data.back + _config:GetController('yuan').selectedIndex = data.yuan + end + if data.maxPlayers == 2 then + --_config:GetController('qupai').selectedIndex = data.qupai == true and 1 or 0 + end + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected=data.xi_pai + end + + + if oldGameVersion==2 then + self.xipaiValueText.text=data.xi_pai_score/1000 + self.xipaiValue=data.xi_pai_score/1000 + + self.anchouValueText.text=data.an_chou_score/1000 + self.anchouValue=data.an_chou_score/1000 + end + +end +function M:OnChangeOption(ctype) + IGameInfo.OnChangeOption(self, ctype) + local people = self._config:GetController('renshu') + people.onChanged:Set( + function() + self._maxPlayer = people.selectedIndex == 0 and 2 or 3 + self:ShowVariablePrice(ctype) + end + ) +end +return M diff --git a/lua_probject/extend_project/extend/zipai/runbeard/EXMainView.lua b/lua_probject/extend_project/extend/zipai/runbeard/EXMainView.lua new file mode 100644 index 00000000..a229415a --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/EXMainView.lua @@ -0,0 +1,1072 @@ +local SettingView = import('.main.ZPSettingView') +local PlayerSelfCardInfoView = import('.PlayerSelfCardInfoView') +local PlayerCardInfoView = import('.PlayerCardInfoView') +local ZPMainView = import('.main.ZPMainView') +local GameEvent = import('.RunBeard_GameEvent') +local RunBeard_ResultView = import('.RunBeard_ResultView') + +local M = {} +local Fix_Msg_Chat = { + '在搞么的,出牌撒', + '又掉线哒!', + '和你打牌太有味了', + '人呢?还搞不搞滴', + '哈哈,对不住了', + '稍等哈哈,马上就来', + '不要走,决战到天亮', + '牌打得不错嘛!', + '今朝这个方位硬是不好', + '不好意思临时有事,申请解散!' +} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M, {__index = ZPMainView}) + local self = setmetatable({}, {__index = M}) + self.class = 'RunBeard_MainView' + self._full = true + self:init() + return self +end + +function M:getCardItem(card_1, card_2) + if self._room.change_card_display ~= nil then + return card_1 .. self._room.change_card_display .. card_2 + else + return card_1 .. '2_' .. card_2 + end +end +function M:InitView(url) + local _room = self._room + self.Fix_Msg_Chat = Fix_Msg_Chat + ViewUtil.PlayMuisc('ChangDe_ZP', 'extend/zipai/runbeard/sound/bg.mp3') + UIPackage.AddPackage('extend/zipai/runbeard/ui/Extend_Poker_RunBeard') + ZPMainView.InitView(self, 'ui://Main_RunBeard/Main_' .. _room.room_config.people_num, false, false, 1.2, 15) + + self:PlayerChangeLineState() + SettingView.onEXMainCallback = handler(self, self.UpdateCardDisplay) + SettingView.onUpdataCardSizeCallback = handler(self, self.UpdateCardSize) + + for i = 1, #_room.player_list do + local p = _room.player_list[i] + local head = self._player_info[self:GetPos(p.seat)] + if head._tex_score then + head._tex_score.visible = true + end + head:UpdateScore() + end + + if _room.playing or _room.curren_round > 0 then + self:ReloadRoom() + end + self._view:GetController('jushu').selectedIndex = 1 + self:setBtn() +end + +function M:setBtn() + local rightpanel = self._view:GetChild('right_panel') + local btn_rule = rightpanel:GetChild('btn_log') + local gcm_chat = self._view:GetChild('gcm_chat') + local _btn_chat = gcm_chat:GetChild('n1') + _btn_chat:GetChild('icon').icon = 'ui://Main_RunBeard/chat_img' + local btn_record = gcm_chat:GetChild('btn_record') + btn_record:GetChild('icon').icon = 'ui://Main_RunBeard/yuyin_img' + + if btn_rule ~= nil then + btn_rule.onClick:Set( + function() + if self.RuleView == nil or self.RuleView._is_destroy then + self.RuleView = RoomInfoView.new(self._room) + end + self.RuleView:Show() + end + ) + end + local btn_setting = self._view:GetChild('btn_setting') + btn_setting.onClick:Set( + function() + local _settingView = self:NewSettingView() + _settingView.stateIndex = (self._room.curren_round >= 1 and self._allow_dissmiss) and 2 or 1 + _settingView.cd_time = self.dismiss_room_cd_time + _settingView:Show() + + local room = DataManager.CurrenRoom + _settingView.onCallback:Add( + function(context) + local _gamectr = ControllerManager.GetController(GameController) + if (room.CurnrenState == StateType.Ready) then + _gamectr:LevelRoom( + function(response) + if (response.ReturnCode == 0) then + ViewManager.ChangeView(ViewManager.View_Lobby) + GameApplication.Instance:ShowTips('房间已解散!') + end + end + ) + else + _gamectr:AskDismissRoom( + function(res) + ViewUtil.ErrorTip(res.ReturnCode, '') + end + ) + end + end + ) + end + ) + local tex_roomid = rightpanel:GetChild('tex_roomid') + tex_roomid.text = self._room.room_id + if self._room.room_config.isHidden and self._room.room_config.isHidden == 1 then + tex_roomid.text = "000000" + end +end + +function M:NewPlayerCardInfoView(view, index) + if index == 1 then + return PlayerSelfCardInfoView.new(view, self) + end + return PlayerCardInfoView.new(view, self) +end +function M:closeTipOnTuoguan() + if self._clearingView ~= nil then + self._clearingView:Close() + end + self:__CloseTip() +end +function M:EventInit() + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _player_info = self._player_info + local _gamectr = self._gamectr + printlog("jefe EventInit===》》》》",GameEvent.EventXiPai) + _gamectr:AddEventListener(GameEvent.EventXiPai,function( ... ) + local arg = {...} + local currentPlayer1=arg[1] + local currentPlayer2=arg[2] + printlog("jefe AddEventListener===》》》》",arg) + self._popEvent = false + if ( currentPlayer1 ) then + + local xipaiCB=function () + self._popEvent = true + end + self:PlayXiPai(xipaiCB) + + end + + + if ( currentPlayer2 ) then + --self._popEvent = false + local xipaiCB2=function () + self._popEvent = true + end + self:PlayXiPai1(xipaiCB2) + end + + + end) + + _gamectr:AddEventListener( + GameEvent.SendCards, + function(...) + self._popEvent = false + self._leftcard = 1 + self._leftcard = 1 + local rightpanel = self._view:GetChild('right_panel') + local tex_round = rightpanel:GetChild('tex_round') + if tex_round ~= nil then + tex_round.text = '第 ' .. _room.curren_round .. ' 局' + end + self._view:GetChild('tex_round').text = '第 ' .. _room.curren_round .. '/' .. _room.room_config.round .. ' 局' + + self._state.selectedIndex = 1 + self:closeTipOnTuoguan() + local list = _room.player_list + for i = 1, #list do + local p = list[i] + p.hu_xi = 0 + local _info = self._player_card_info[self:GetPos(p.seat)] + _info:SetPlayer(p) + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + info._view:GetController('huxi').selectedIndex = 1 + info._view:GetChild('huxi').text = p.hu_xi + info._view:GetController('zhanji').selectedIndex = 0 + + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + if p.total_hp == nil then + p.total_hp = 0 + end + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + local card_info = self._player_card_info[1] + card_info:UpdateIsOnClick(false) + card_info:InitHandCard(true) + end + ) + + _gamectr:AddEventListener( + GameEvent.GetCard, + function(...) + local arg = {...} + local seat = arg[1] + local card = arg[2] + local _leftcard = arg[3] + self._left_time = 15 + self._tex_LeftCard.text = '剩余 ' .. _leftcard .. ' 张牌' + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateOutCardList(card, true, true, self:GetPos(seat)) + if card ~= 0 then + local p = _room:GetPlayerBySeat(seat) + self:PlaySound(p.self_user.sex, 'F_' .. card) + else + self._popEvent = false + coroutine.start( + function() + coroutine.wait(0.5) + self._popEvent = true + info:ClearOutCard() + end + ) + end + end + ) + _gamectr:AddEventListener( + GameEvent.AddCard, + function(...) + local arg = {...} + local seat = arg[1] + local card = arg[2] + self._popEvent = false + local info = self._player_card_info[self:GetPos(seat)] + coroutine.start( + function() + coroutine.wait(0.5) + if seat == self._room.self_player.seat then + info:InitHandCard(false) + end + info:ClearOutCard() + self._popEvent = true + end + ) + end + ) + + _gamectr:AddEventListener( + GameEvent.EventTurn, + function(...) + local arg = {...} + local seat = arg[1] + local list = _room.player_list + local readyNum = 0 + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 0 + end + local info = self._player_info[self:GetPos(seat)] + info._view:GetController('time').selectedIndex = 1 + end + ) + _gamectr:AddEventListener( + GameEvent.OutHint, + function(...) + _room.curren_outcard_seat = _room.self_player.seat + printlog("jefe OutHint view>>>>",card) + coroutine.start( + function() + coroutine.wait(0.5) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:ChuPaiTiShi() + end + ) + end + ) + + _gamectr:AddEventListener( + GameEvent.FangWei, + function(...) + local arg = {...} + local seat = arg[1] + local card = arg[2] + --self:__CloseTip() + _room.curren_outcard_seat = _room.self_player.seat + local _player_card_info = self._player_card_info + -- local seat = evt_data["seat"] + --local card = evt_data["card"] + printlog("jefe FangWei view>>>>") + local p = self._room:GetPlayerBySeat(seat) + local info = self._player_card_info[self:GetPos(seat)] + local fangwei_msg = MsgWindow.new(self._root_view, '放偎之后这局将不能再吃碰,是否确定', MsgWindow.MsgMode.OkAndCancel) + local removeOutcard = self._player_card_info[1] + fangwei_msg.onOk:Add( + function() + local _gamectr = ControllerManager.GetController(GameController) + if _gamectr then + _gamectr:SendFangPao(card) + end + -- 判断是否对方有偎 + -- local p = self._room:GetPlayerBySeat(seat) + --DispatchEvent(self._dispatcher,RB_GameEvent.OutCard, p,card) + end + ) + fangwei_msg.onCancel:Add( + function(...) + -- + self:__CloseTip() + if seat == self._room.self_player.seat then + if seat == self._room.self_player.seat then + info:InitHandCard(true) + end + end + end + ) + fangwei_msg:Show() + + end + ) + + _gamectr:AddEventListener( + GameEvent.OutCard, + function(...) + self:__CloseTip() + self._left_time = 0 + local arg = {...} + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:PlaySound(p.self_user.sex, 'F_' .. card) + if seat == self._room.self_player.seat then + _room.curren_outcard_seat = -1 + info:DeleteHandCard(card) + info:UpdateIsOnClick(true) + info:SendChangeCard() + info:ChuPaiTiShi() + end + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 0 + end + info:UpdateOutCardList(card, true, false, self:GetPos(seat)) + if self._leftcard == 1 then + self._leftcard = 0 + for i = 1, #_room.player_list do + local p = _room.player_list[i] + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateFzList(p.fz_list, false, p.seat) + end + end + end + ) + + _gamectr:AddEventListener( + GameEvent.QiCard, + function(...) + self:__CloseTip() + self._popEvent = false + self._left_time = 0 + local arg = {...} + local seat = arg[1] + local card = arg[2] + local p = _room:GetPlayerBySeat(seat) + local info = self._player_card_info[self:GetPos(seat)] + info:PlayingOutCardAnima(p.DiceCard) + p.DiceCard = 0 + info:UpdateQiPai(p.outcard_list, true, seat) + self._popEvent = true + end + ) + _gamectr:AddEventListener( + GameEvent.FZTips, + function(...) + local arg = {...} + local _tip = arg[1] + local _uid = arg[2] + local _fptype = arg[3] + self:__FangziTip(_tip, _uid,_fptype) + end + ) + + _gamectr:AddEventListener(GameEvent.FangziAction, handler(self, self.OnFangziAction)) + + _gamectr:AddEventListener( + GameEvent.ZPHuCard, + function(...) + self._left_time = 0 + self:__CloseTip() + self._popEvent = false + local arg = {...} + local w = arg[1] + local l = arg[2] + local cards = arg[3] + local info = self._player_card_info[self:GetPos(w)] + -- info:UpdateHandCard() + + local url = 'ui://Extend_Poker_RunBeard/别人胡' + local pNode = info._mask_liangpai + local player = _room:GetPlayerBySeat(w) + if w == _room.self_player.seat then + url = 'ui://Extend_Poker_RunBeard/自己胡牌' + pNode = self._view + end + self:PlaySound(player.self_user.sex, 'F_Hu') + local he = UIPackage.CreateObjectFromURL(url) + he:GetTransition('t2'):Play() + if w == _room.self_player.seat then + he:Center() + end + pNode:AddChild(he) + coroutine.start( + function() + coroutine.wait(0.7) + he:Dispose() + self._popEvent = true + end + ) + end + ) + + _gamectr:AddEventListener( + GameEvent.ZPResult1, + function(...) + self._popEvent = false + self._left_time = 0 + local arg = {...} + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local x = {} + self._hu_tip:FillData(x) + self:__CloseTip() + if self._clearingView == nil then + if liuju == true then + self._clearingView = RunBeard_ResultView.new(self._view, 1) + else + self._clearingView = RunBeard_ResultView.new(self._view) + end + end + coroutine.start( + function() + coroutine.wait(0.5) + -- if self._clearingView._is_destroy then return end + self._clearingView:Show() + if _room.curren_round ~= _room.room_config.round then + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + p.total_score = data[i].total_score + p.cur_hp = data[i]['cur_hp'] or 0 + p.total_hp = data[i]['total_hp'] or 0 + if data[i]['hp_info'] then + p.cur_hp = data[i].hp_info.cur_hp + p.total_hp = data[i].hp_info.total_hp == nil and 0 or data[i].hp_info.total_hp + info._view:GetController('zhanji').selectedIndex = 0 + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + + card_info:Clear() + info:UpdateScore() + end + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 0 + end + + for i = 1, #_room.player_list do + _room.self_player.handcard_list = {} + _room.player_list[i].DiceCard = nil + _room.player_list[i].hand_left_count = 20 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + _room.player_list[i].outcard_list = {} + _room.player_list[i].hu_xi = 0 + end + end + self._popEvent = true + end + ) + if _room.curren_round ~= _room.room_config.round then + self._clearingView:InitData( + 0, + _room, + result, + nil, + function(...) + self._state.selectedIndex = 2 + self._clearingView = nil + end + ) + end + end + ) + + _gamectr:AddEventListener( + GameEvent.ZPResult2, + function(...) + self._left_time = 0 + local arg = {...} + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + local x = {} + self._hu_tip:FillData(x) + self:__CloseTip() + self:UnmarkSelfTuoguan() + self._clearingView = RunBeard_ResultView.new() + coroutine.start( + function() + coroutine.wait(0.5) + self._clearingView:Show() + end + ) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end + ) +end + +function M:OutCard(card_item) + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card_item) +end + +--改变牌队形 +function M:ChangeCards(list) + local _gamectr = ControllerManager.GetController(GameController) + if _gamectr then + _gamectr:SendChangeCards(list) + end +end + +function M:__FangziTip(tip, _uid,fptype) + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject('Main_RunBeard', 'Gcm_action_tips') + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + + printlog("jefe __FangziTip>>>>",_uid) + + + local _lit_fanzi = _chipeng_tip:GetChild('lit_fanzi') + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + local tip_hu = false + local count = #_tlist + for k = 1, #_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + if td.type == 8 then + tip_hu = true + end + end + + for k = 1, #_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + local url = 'ui://Main_RunBeard/Btn_fztip' + local btn_t = _lit_fanzi:AddItemFromPool(url) + btn_t.icon = 'ui://Main_RunBeard/newop_' .. td.type + btn_t.data = {tip, td, tip_hu} + btn_t.onClick:Set(self.__TipAction, self) + end + + if p.hand_left_count ~= 0 then + local _btn_pass = _lit_fanzi:AddItemFromPool('ui://Main_RunBeard/Btn_pass_new') + _btn_pass.onClick:Set( + function() + if tip_hu then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + _gamectr:SendAction(_uid) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end + ) + + guo_msg:Show() + else + _gamectr:SendAction(_uid) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end + ) + end + --禁止放跑 + if fptype == 1 and tip_hu == false then + _gamectr:SendAction(_uid) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + else + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() + _chipeng_tip.x = _chipeng_tip.x + 200 + _chipeng_tip.y = _chipeng_tip.y - 50 + end +end +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local tip_hu = data[3] + local list = tip.tip_map_type[td.weight] + if (#list > 1) or td.type == 1 then + self:_ChiView( + list, + tip_hu, + function(id) + if tip_hu and td.type ~= 8 then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + _gamectr:SendAction(id) + guo_msg:Close() + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + ) + guo_msg:Show() + else + _gamectr:SendAction(id) + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + end + ) + --self._chipeng_tip.visible = false + return + end + if tip_hu and td.type ~= 8 then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + _gamectr:SendAction(td.id) + guo_msg:Close() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + if (self._chipeng_tip == nil) then + return + end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + ) + guo_msg:Show() + else + _gamectr:SendAction(td.id) + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + if (self._chipeng_tip == nil) then + return + end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end +end + +function M:_ChiView(tip_list, tip_hu, callback) + local _pop_tip_choice = UIPackage.CreateObject('Main_RunBeard', 'Pop_tip_choice') + local list_choose = _pop_tip_choice:GetChild('Lst_choose') + _pop_tip_choice:GetChild('dibtn').onClick:Add( + function() + _pop_tip_choice:Dispose() + end + ) + + list_choose:RemoveChildrenToPool() + for i = 1, #tip_list do + if tip_list[i].weight ~= 4 then + local item_choose = list_choose:AddItemFromPool() + item_choose:GetChild('card' .. 2).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', tip_list[i].OpCard[1])) + item_choose:GetChild('card' .. 3).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', tip_list[i].OpCard[2])) + item_choose:GetChild('card' .. 1).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', tip_list[i].card)) + + item_choose.onClick:Add( + function() + for k = 1, list_choose.numChildren do + list_choose:GetChildAt(k - 1):GetController('zhong').selectedIndex = 0 + end + item_choose:GetController('zhong').selectedIndex = 1 + if tip_list[i].bi_list == nil then + callback(tip_list[i].id) + else + self.bilist = {} + self._chiid = tip_list[i].id + self:CheckRatioCard(tip_list[i].bi_list, 1, tip_list[i].card) + end + end + ) + end + end + list_choose:ResizeToFit(#tip_list) + _pop_tip_choice:GetChild('di1').width = list_choose.width + 110 + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width) / 2, -100) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:CheckRatioCard(_tiplist, index, chicard, _biid, list) + if _biid ~= nil then + self.bilist = {} + self.bilist[#self.bilist + 1] = _biid + end + if self._pop_tip_choice == nil then + -- statements + return + end + self._pop_tip_choice:GetController('bipai').selectedIndex = index + local Bilist_choose = self._pop_tip_choice:GetChild('Bi_Lst_choose' .. index) + Bilist_choose:RemoveChildrenToPool() + for i = 1, #_tiplist do + local item = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Comp_choose') + local item_choose = Bilist_choose:AddChild(item) + item_choose:GetChild('card' .. 2).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', _tiplist[i].opcard[1])) + item_choose:GetChild('card' .. 3).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', _tiplist[i].opcard[2])) + item_choose:GetChild('card' .. 1).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', chicard)) + item_choose:GetController('zhong').selectedIndex = 0 + item_choose.onClick:Add( + function() + for k = 1, Bilist_choose.numChildren do + Bilist_choose:GetChildAt(k - 1):GetController('zhong').selectedIndex = 0 + end + item_choose:GetController('zhong').selectedIndex = 1 + if _tiplist[i].bi_list == nil then + if index == 1 then + self.bilist = {} + end + self.bilist[#self.bilist + 1] = i - 1 + if tip_hu then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + self._gamectr:SendAction(self._chiid, self.bilist) + guo_msg:Close() + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + ) + guo_msg:Show() + else + self._gamectr:SendAction(self._chiid, self.bilist) + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + else + self:CheckRatioCard(_tiplist[i].bi_list, 2, chicard, i - 1, #_tiplist) + end + end + ) + end + Bilist_choose:ResizeToFit(#_tiplist) + self._pop_tip_choice:GetChild('di' .. index + 1).width = Bilist_choose.width + 110 +end + +-- lua table 深拷贝 +function M:deepcopy(object) + local lookup_table = {} + local function _copy(object) + if type(object) ~= 'table' then + return object + elseif lookup_table[object] then + return lookup_table[object] + end + local new_table = {} + lookup_table[object] = new_table + for index, value in pairs(object) do + new_table[_copy(index)] = _copy(value) + end + return setmetatable(new_table, getmetatable(object)) + end + return _copy(object) +end + +function M:OnFangziAction(...) + local arg = {...} + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local num = arg[3] + if fz.type == RB_FZType.Peng or fz.type == RB_FZType.Chi or fz.type == RB_FZType.Bi then + self:__CloseTip() + end + if (player == self._room.self_player) then + local info = _player_card_info[self:GetPos(player.seat)] + info:UpdateIsOnClick(false) + end + self._popEvent = false + + local info = _player_card_info[self:GetPos(player.seat)] + info:UpdateFzList(player.fz_list, true, player.seat) --更新放子数组 + if (player == self._room.self_player) then + if fz.type == RB_FZType.Chi then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.Bi then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + info:DeleteHandCard(fz.card) + elseif fz.type == RB_FZType.Peng then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.Kan then + if #fz.opcard == 2 then + info:InitHandCard(false) + end + info:UpdateKan(fz.card) + elseif fz.type == RB_FZType.Wei then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.ChouWei then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.Pao then + if num > 0 then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + end + elseif fz.type == RB_FZType.Ti then + if num > 0 then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + end + end + coroutine.start( + function() + coroutine.wait(0.3) + if fz.type ~= RB_FZType.Kan then + info:SendChangeCard() + end + end + ) + end + -- if false then + if fz.type ~= RB_FZType.Kan and fz.type ~= RB_FZType.Bi then + printlog("jefe self RB_FZType 2=======") + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject('Extend_Poker_RunBeard', 'FzEffect') + + if fz.type == RB_FZType.Peng then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "peng") + self:PlaySound(player.self_user.sex, 'F_Peng') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'peng') + elseif fz.type == RB_FZType.Chi then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "chi") + self:PlaySound(player.self_user.sex, 'F_Chi') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'chi') + elseif fz.type == RB_FZType.Wei then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "wei") + self:PlaySound(player.self_user.sex, 'F_GuoSao') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'wei') + elseif fz.type == RB_FZType.ChouWei then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Extend_Poker_RunBeard", "chouwei") + self:PlaySound(player.self_user.sex, 'F_GuoSao') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Extend_Poker_RunBeard', 'chouwei') + elseif fz.type == RB_FZType.Pao then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "pao") + self:PlaySound(player.self_user.sex, 'F_KaiDuo') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'pao') + elseif fz.type == RB_FZType.Ti then + self:PlaySound(player.self_user.sex, 'F_SaoChuan') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'ti') + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "ti") + end + effect.touchable = false + effect.x, effect.y = 0, 0 + effect:GetTransition('t0'):Play() + pNode:AddChild(effect) + coroutine.start( + function() + coroutine.wait(1) + effect:Dispose() + end + ) + end + if (player == self._room.self_player) then + coroutine.start( + function() + coroutine.wait(0.5) + local info = _player_card_info[self:GetPos(player.seat)] + info:ShowHuTip() + end + ) + end + local removeOutcard = _player_card_info[self:GetPos(fz.from_seat)] + local p = self._room:GetPlayerBySeat(fz.from_seat) + if p.DiceCard ~= nil and fz.active_card == p.DiceCard then + removeOutcard:ClearOutCard() + p.DiceCard = nil + end + local list = self._room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetChild('huxi').text = p.hu_xi + end + self._popEvent = true + coroutine.start( + function() + coroutine.wait(0.3) + local info = _player_card_info[1] + info:UpdateIsOnClick(true) + end + ) +end + +function M:ReloadRoom() + local _gamectr = self._gamectr + local room = self._room + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + end + if room.discard == 0 then + self._leftcard = 1 + else + self._leftcard = 0 + end + for i = 1, #room.player_list do + local p = room.player_list[i] + if p.seat == room.banker_seat then + local head = self._player_info[self:GetPos(p.seat)] + head:MarkBank(true) + end + if p.ready then + self._player_info[self:GetPos(p.seat)]:Ready(true) + else + self._player_info[self:GetPos(p.seat)]:Ready(false) + end + if self._state.selectedIndex == 1 then + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('huxi').selectedIndex = 1 + info._view:GetChild('huxi').text = p.hu_xi + info._view:GetController('zhanji').selectedIndex = 0 + if room.hpOnOff == 1 or room:checkHpNonnegative() then + if p.total_hp == nil then + p.total_hp = 0 + end + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateQiPai(p.outcard_list) + card_info:UpdateFzList(p.fz_list, false, p.seat) + if p.DiceCard ~= nil and p.DiceCard ~= 0 then + card_info:UpdateOutCardList(p.DiceCard) + end + if DataManager.CurrenRoom.curren_outcard_seat == p.seat then + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 1 + end + if p.seat == self._room.self_player.seat then + card_info:ChuPaiTiShi() + if + self._room.self_player.card_list ~= nil and + #self._room.self_player.handcard_list == #self._room.self_player.card_list + then + local _list = self:deepcopy(self._room.self_player.card_list) + local cards = {} + for i = 1, #_list do + cards[#cards + 1] = _list[i].card_item + end + table.sort(cards, ViewUtil.HandCardSort) + table.sort(self._room.self_player.handcard_list, ViewUtil.HandCardSort) + + local isNot = false + for i = 1, #cards do + if cards[i] ~= self._room.self_player.handcard_list[i] then + isNot = true + end + end + if isNot == true then + card_info:InitHandCard(false) + else + card_info:UpdateHandCards(self._room.self_player.card_list) + end + else + card_info:InitHandCard(false) + end + -- card_info:ChuPaiTiShi() + card_info:ShowHuTip() + for i = 1, #p.fz_list do + if p.fz_list[i].type == RB_FZType.Kan then + card_info:UpdateKan(3, p.fz_list[i].card) + end + end + end + end + + self._tex_LeftCard.text = '剩余 ' .. room.left_count .. ' 张牌' + local rightpanel = self._view:GetChild('right_panel') + local tex_round = rightpanel:GetChild('tex_round') + if tex_round ~= nil then + tex_round.text = '第 ' .. room.curren_round .. ' 局' + end + self._view:GetChild('tex_round').text = '第 ' .. room.curren_round .. '/' .. room.room_config.round .. ' 局' +end + +function M:PlayChatSound(sex, chat_index) + local sex_path = ViewUtil.Sex_Chat[sex] + local path1 = string.format('extend/zipai/runbeard/sound/%s/chat_%s.mp3', sex_path, tostring(chat_index)) + ViewUtil.PlaySound('ChangDe_ZP', path1) +end + +function M:PlaySound(sex, path) + local sex_path = ViewUtil.Sex_Chat[sex] -- 1 男 2 女 + local sound_path = string.format('extend/zipai/runbeard/sound/%s/%s.mp3', sex_path, path) + ViewUtil.PlaySound('ChangDe_ZP', sound_path) +end + +function M:__CloseTip() + if (self._chipeng_tip) then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if (self._pop_tip_choice) then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +function M:Destroy() + ZPMainView.Destroy(self) + UIPackage.RemovePackage('extend/zipai/runbeard/ui/Extend_Poker_RunBeard') +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/runbeard/EXPlayBackView.lua b/lua_probject/extend_project/extend/zipai/runbeard/EXPlayBackView.lua new file mode 100644 index 00000000..a6fe3209 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/EXPlayBackView.lua @@ -0,0 +1,662 @@ +local ZPPlayBackView = require('main.zipai.ZPPlayBackView') +local PlayerSelfCardInfoView = import('.PlayerSelfCardInfoView') +local PlayerCardInfoView = import('.PlayerCardInfoView') +local RunBeard_ResultView = import('.RunBeard_ResultView') +local M = {} + +local Record_Event = { + Evt_OutCard = 'OutCard', + Evt_GetCard = 'GetCard', + Evt_Action = 'Action', + Evt_ThrowCard = 'ThrowCard', + Evt_AddCard = 'AddCard', + Evt_ChangePaiXing = 'ChangePaiXing', + Evt_Win = 'Win', + Evt_result = 'result' +} + +local function tableSortNumber(a, b) + return a.card_code_number > b.card_code_number +end + +--- Create a new +function M.new() + setmetatable(M, {__index = PlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = 'PlayBackView' + self:init() + + return self +end + +function M:InitView(url) + local room = self._room + self._gamectr = ControllerManager.GetController(GameController) + UIPackage.AddPackage('base/main_zipai/ui/Main_RunBeard') + UIPackage.AddPackage('extend/zipai/runbeard/ui/Extend_Poker_RunBeard') + ZPPlayBackView.InitView(self, 'ui://Main_RunBeard/Main_' .. room.room_config.people_num) + UpdateBeat:Add(self.OnUpdate, self) + + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. room.game_id) + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + if typeface == 1 then + room.change_card_display = '2_' + else + room.change_card_display = '1_' + end + end + self._player_card_info = {} + local _player_card_info = self._player_card_info + for i = 1, room.room_config.people_num do + local tem = self._view:GetChild('player_card_info' .. i) + self._player_card_info[i] = self:NewPlayerPokerInfoView(tem, i) + end + local rightpanel = self._view:GetChild('right_panel') + self.btn_setting = rightpanel:GetChild('btn_setting') + self.btn_setting.visible = false + + self.tex_time = rightpanel:GetChild('tex_time') + self.tex_time.visible = false + + self.gcm_xinhao = rightpanel:GetChild('gcm_xinhao') + self.gcm_xinhao.visible = false + + self.pb_batteryLevel = rightpanel:GetChild('pb_batteryLevel') + self.pb_batteryLevel.visible = false + + local tex_round_item = rightpanel:GetChild('tex_round') + if tex_round_item ~= nil then + tex_round_item.text = '第 ' .. room.curren_round .. ' 局' + end + local btn_rule = rightpanel:GetChild('btn_log') + if btn_rule ~= nil then + btn_rule.onClick:Set( + function() + if self.RuleView == nil or self.RuleView._is_destroy then + self.RuleView = RoomInfoView.new(self._room) + end + self.RuleView:Show() + end + ) + end + local tex_roomid = rightpanel:GetChild('tex_roomid') + tex_roomid.text = room.room_id + rightpanel:GetChild('tex_gametype').text = room.room_config:GetGameName() + + self._tex_round = self._view:GetChild('tex_round') + self._tex_LeftCard = self._view:GetChild('remaining_card') + self._eventmap = {} + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_ThrowCard] = self.CmdThrowCard + self._cmdmap[Record_Event.Evt_AddCard] = self.CmdAddCard + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_ChangePaiXing] = self.CmdChangePaiXing + self._cmdmap[Record_Event.Evt_result] = self.onResult +end + +function M:NewPlayerPokerInfoView(view, index) + if index == 1 then + return PlayerSelfCardInfoView.new(view, self) + end + return PlayerCardInfoView.new(view, self) +end + +function M:FillRoomData(data) + if self._win_pic then + self._win_pic:Dispose() + end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local roominfo_panel = self._view:GetChild('roominfo_panel1') + roominfo_panel:GetChild('tex_roomid').text = room.room_id + roominfo_panel:GetChild('tex_gametype').text = room.room_config:GetGameName() + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:SetPlayer(p) + if p.seat == room.self_player.seat then + card_info:UpdateIsOnClick(false) + end + local infoHand = self._player_info[self:GetPos(p.seat)] + infoHand._view:GetController('huxi').selectedIndex = 1 + infoHand._view:GetChild('huxi').text = p.hu_xi + if p.total_hp then + infoHand._view:GetController('zhanji').selectedIndex = 0 + if room.hpOnOff == 1 or room:checkHpNonnegative() then + infoHand._view:GetController('zhanji').selectedIndex = 1 + infoHand._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + infoHand:UpdateScore() + end + end + self.CheckServerErrorList={} + self:UpdateRound(self._room.curren_round) + self:GenerateAllStepData(data) + self:ShowStep(1) + self:UpdateStep(1) +end + + + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateStep(index + 1) + self:UpdateLeftCard(step.left_card) + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hu_xi = step.player_card_data[i].hu_xi + p.hand_left_count = #p.card_list + + if index == 1 then + info:Clear() + if p.total_hp then + local avHand = self._player_info[self:GetPos(p.seat)] + local room = DataManager.CurrenRoom + avHand._view:GetController('zhanji').selectedIndex = 0 + if room.hpOnOff == 1 or room:checkHpNonnegative() then + avHand._view:GetController('zhanji').selectedIndex = 1 + avHand._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + avHand:UpdateScore() + end + end + if p.hu_xi ~= nil then + local infoHand = self._player_info[self:GetPos(p.seat)] + infoHand._view:GetChild('huxi').text = p.hu_xi + end + if step.cmd == Record_Event.Evt_Action then + if p.fz_list ~= nil and #p.fz_list > 0 then + info:UpdateFzList(p.fz_list) + end + end + + if index>1 then + for k,v in pairs(self.CheckServerErrorList) do + --printlog("k===>>>",k) + --printlog("v===>>>",v) + --printlog(k,index) + --pt(p.card_list) + if tonumber(index+1)>tonumber(k) then + list_remove(p.card_list,v) + end + + end + end + + + + if p.seat ~= self._room.self_player.seat then + info:InitHandCard(p.card_list) + else + self._room.self_player.handcard_list = p.card_list + info:InitHandCard(false) + end + + + + + --if p.seat == self._room.self_player.seat then + --[[if step.cmd == Record_Event.Evt_ChangePaiXing then + local _card_list = {} + for i = 1, #step.card_list do + local data = {} + data.card_item = step.card_list[i].card + data.index_X = step.card_list[i].X + data.index_Y = step.card_list[i].Y + _card_list[#_card_list + 1] = data + end + local info = self._player_card_info[self:GetPos(step.seat)] + if step.card_list[1].card ~= nil then + info:UpdateHandCards(_card_list) + else + info:UpdateHandCards(step.card_list) + end + end--]] + --end + + if step.cmd == Record_Event.Evt_OutCard or step.cmd == Record_Event.Evt_GetCard then + if step.DiceCard ~= nil and step.DiceCard ~= 0 then + if p.seat == step.seat then + info:UpdateOutCardList(step.DiceCard) + coroutine.start( + function() + coroutine.wait(1.5) + info:ClearOutCard() + end + ) + end + end + end + if p.outcard_list ~= nil then + info:UpdateQiPai(p.outcard_list) + end + end + -- print("step.cmd ",step.cmdm,Record_Event.Evt_Win) + if step.cmd == Record_Event.Evt_result then + local _room = DataManager.CurrenRoom + local result = step.result + self._win_pic = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/胡') + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + + if result ~= nil then + if self._clearingView == nil then + self._clearingView = RunBeard_ResultView.new(self._view) + coroutine.start( + function() + coroutine.wait(0.5) + self._clearingView:Show() + end + ) + end + local data = result.data.info_list + self._clearingView:InitData( + 0, + _room, + result.data, + nil, + function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + -- p.cur_hp = data[i]['cur_hp'] or 0 + -- if data[i]['hp_info'] then + -- p.cur_hp = data[i].hp_info.cur_hp + -- end + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + if data[i]['hp_info'] then + p.total_score = d2ad(data[i].hp_info.cur_hp) + local stotal_hp = data[i].hp_info.total_hp + info._view:GetController('zhanji').selectedIndex = 0 + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(stotal_hp) + end + end + info:UpdateScore(p.total_score) + end + self._clearingView = nil + end + ) + end + else + if self._win_pic then + self._win_pic:Dispose() + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + --pt(cmdList) + self._step = {} + local step = {} + local info = data.info + --pt(info) + step.cmd = '' + step.left_card = info.left_card + step.win = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.hu_xi = 0 + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + data.seat = cmd.seat + data.DiceCard = cmd.data.card +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + data.seat = cmd.seat + data.DiceCard = cmd.data.card +end +function M:CmdThrowCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + data.current_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + data.out_card_list = cmd.data.card + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end +function M:CmdAddCard(cmd, index) + --printlog("CmdAddCard======>>>",index,cmd.data.card) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + local _room = self._room + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card + --pt(u.card_list) +end + +function M:onResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result = cmd.result +end + +function M:CmdChangePaiXing(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + data.card_list = cmd.data.card_list +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + local p = data.player_card_data[cmd.seat] + local fz = {} + p.hu_xi = cmd.data.hu_xi + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.active_card = cmd.data.card + fz.opcard = cmd.data.opcard + local opcard = fz.opcard + local ftype = fz.type + local card = fz.card + local remove_num = #opcard + if ftype == RB_FZType.Chi then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Bi then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + list_remove(p.card_list, fz.card) + elseif ftype == RB_FZType.Peng then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Kan then + local _room = self._room + if #opcard == 2 then + p.card_list[#p.card_list + 1] = card + end + elseif ftype == RB_FZType.ChouWei then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, 2 do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Wei then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Pao then + local num = 0 + for i = 1, #p.card_list do + if card == p.card_list[i] then + num = num + 1 + end + end + local isAddTi = false + for i = 1, #p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type = RB_FZType.Pao + isAddTi = true + end + end + if num > 0 then + for i = 1, num do + list_remove(p.card_list, card) + end + + if isAddTi == false then + p.fz_list[#p.fz_list + 1] = fz + end + end + elseif ftype == RB_FZType.Ti then + local num = 0 + for i = 1, #p.card_list do + if card == p.card_list[i] then + num = num + 1 + end + end + --table.insert(self.CheckServerErrorList,card) + if self.CheckServerErrorList==nil then + self.CheckServerErrorList={} + end + self.CheckServerErrorList[index]=card + local isAddTi = false + for i = 1, #p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type = RB_FZType.Ti + isAddTi = true + end + end + if num > 0 then + for i = 1, num do + list_remove(p.card_list, card) + end + + if isAddTi == false then + p.fz_list[#p.fz_list + 1] = fz + end + end + end +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = '剩余 ' .. num .. ' 张牌' +end + +function M:UpdateRound(round) + self._tex_round.text = '第 ' .. round .. '/' .. self._room.room_config.round .. ' 局' +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = self:deepcopy(last_step) + step.player_card_data = {} + local card_data = step.player_card_data + for i = 1, #last_step.player_card_data do + card_data[i] = {} + card_data[i].card_list = self:deepcopy(last_step.player_card_data[i].card_list) + card_data[i].outcard_list = self:deepcopy(last_step.player_card_data[i].outcard_list) + card_data[i].fz_list = self:deepcopy(last_step.player_card_data[i].fz_list) + card_data[i].hand_left_count = #card_data[i].card_list + card_data[i].hu_xi = self:deepcopy(last_step.player_card_data[i].hu_xi) + end + --pt(card_data) + self._step[#self._step + 1] = step + return step +end + +-- lua table 深拷贝 +function M:deepcopy(object) + local lookup_table = {} + local function _copy(object) + if type(object) ~= 'table' then + return object + elseif lookup_table[object] then + return lookup_table[object] + end + local new_table = {} + lookup_table[object] = new_table + for index, value in pairs(object) do + new_table[_copy(index)] = _copy(value) + end + return setmetatable(new_table, getmetatable(object)) + end + return _copy(object) +end + +function M:NextRecordPlay() + printlog("NextRecordPlay") + local result = PlayBackView.NextRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() +end + +function M:LastRecordPlay() + printlog("LastRecordPlay") + local result = PlayBackView.LastRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() +end + +function M:Play() + self:ChangeAlpha() + self:ChangePlayState(not self._play) + if not self._play then + return + end + if (self._currentStep == #self.cmdList and self._playFoward) or (self._currentStep == 0 and not self._playFoward) then + self._currentStep = 0 + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:ChangePlayState(state) + self._play = state + self:ChangeTextSpeed() + local btn_play = self._view:GetChild('panel_record'):GetChild('btn_play') + if self._play then + btn_play:GetController('state').selectedIndex = 1 + else + btn_play:GetController('state').selectedIndex = 0 + end +end + +function M:ChangeTextSpeed() + local str1 = self._play and self._speed or '' + self._view:GetChild('panel_record'):GetChild('tex_speed').text = str1 + local str2 = + not self._play and (self._playFoward and '播放暂停' or '回退暂停') or + self._playFoward and (self._speed == 1 and '播放' or '快进') or + (self._speed == 1 and '回退' or '快退') + self._view:GetChild('panel_record'):GetChild('tex_2').text = str2 + local str3 = self._play and '倍速度' or '' + self._view:GetChild('panel_record'):GetChild('tex_1').text = str3 +end + +function M:CmdLeftArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if not self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = false + self:ChangeTextSpeed() + end +end + +function M:CmdRightArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:OnUpdate() + if self._play then + if (self._currentStep == #self.cmdList and self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像结尾了,再次点击播放按钮可重新播放') + return + elseif (self._currentStep == 0 and not self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像开头了,再次点击播放按钮可重新播放') + return + end + self._timer = self._timer + Time.deltaTime + if self._timer >= 1 / self._speed then + self._timer = 0 + local step = self._playFoward and 1 or -1 + self._currentStep = self._currentStep + step + self:ShowStep(self._currentStep) + end + end +end + +function M:Destroy() + UpdateBeat:Remove(self.OnUpdate, self) + PlayBackView.Destroy(self) +end + +function M:UpdateStep(step) + self._record:GetChild('tex_step').text = '第 ' .. step .. ' / ' .. #self._step .. '步' +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/runbeard/EXPlayer.lua b/lua_probject/extend_project/extend/zipai/runbeard/EXPlayer.lua new file mode 100644 index 00000000..fe112fd2 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/EXPlayer.lua @@ -0,0 +1,37 @@ + + +local EXPlayer ={ + -- 手牌列表 + card_list = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil, + hu_xi =0 +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 + self.hu_xi =0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/runbeard/EXRoomConfig.lua b/lua_probject/extend_project/extend/zipai/runbeard/EXRoomConfig.lua new file mode 100644 index 00000000..709455e2 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/EXRoomConfig.lua @@ -0,0 +1,192 @@ + +local M = {} + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) + self.config=config + self.class = "RoomConfig" + self.round = config["times"] + self.mode = config["mode"] + self.tun = config["tun"] + self.fengding = config["fengding"] + self.tuanyuan = config["tuanyuan"] + self.hanghangxi = config["hanghangxi"] + self.siqi = config["siqi"] + self.shuahou = config["shuahou"] + self.huangfan = config["huangfan"] + self.jiaxingxing = config["jiaxingxing"] + self.tinghu = config["tinghu"] + self.duizifu = config["duizifu"] + self.back = config["back"] + self.yuan = config["yuan"] + self.tianhu =config["tianhu"] + self.dihu =config["dihu"] + self.haihu =config["haihu"] + self.maxPlayers = config["maxPlayers"] + self.qupai = config["qupai"] + self.isHidden = config.isHidden + + + self.qixihu =config["qixihu"] + self.weipai =config["weipai"] + self.xidouble30 =config["xidouble30"] + self.zimo =config["zimo"] + self.daxiaozi =config["daxiaozi"] + self.hongheihu =config["hongheihu"] + self.yidianhu =config["yidianhu"] + + return self +end + +function M:GetDes(sp) + sp = sp or " " + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + if self.maxPlayers == 2 then + if self.qupai then + str = str .."去牌" + str = str .. sp + end + end + if (self.mode==3) then + str = str .. "全名堂" + str = str .. sp + str = str .. (self.tun).."囤" + str = str .. sp + if self.fengding == 0 then + str = str .. "不封顶" + str = str .. sp + elseif self.fengding == 1 then + str = str .. "100封顶" + str = str .. sp + elseif self.fengding == 2 then + str = str .. "200封顶" + str = str .. sp + elseif self.fengding == 3 then + str = str .. "300封顶" + str = str .. sp + elseif self.fengding == 4 then + str = str .. "500封顶" + str = str .. sp + elseif self.fengding == 5 then + str = str .. "1000封顶" + str = str .. sp + end + if self.tuanyuan == 1 then + str = str .. "大团圆" + str = str .. sp + end + if self.hanghangxi == 1 then + str = str .. "行行息" + str = str .. sp + end + if self.siqi == 1 then + str = str .. "四七红" + str = str .. sp + end + if self.shuahou == 1 then + str = str .. "耍猴" + str = str .. sp + end + if self.huangfan == 1 then + str = str .. "黄番" + str = str .. sp + end + if self.jiaxingxing == 1 then + str = str .. "假行行" + str = str .. sp + end + if self.tinghu == 1 then + str = str .. "听胡" + str = str .. sp + end + if self.back == 1 then + str = str .. "背靠背" + str = str .. sp + end + if self.yuan == 1 then + str = str .. "圆" + str = str .. sp + end + elseif (self.mode == 2 ) then + str = str .. "红黑点" + str = str .. sp + str = str .. (self.tun).."囤" + str = str .. sp + if self.duizifu == 1 then + str = str .. "对子胡" + str = str .. sp + end + if self.fengding == 0 then + str = str .. "不封顶" + str = str .. sp + elseif self.fengding == 1 then + str = str .. "单局20封顶" + str = str .. sp + elseif self.fengding == 2 then + str = str .. "单局40封顶" + str = str .. sp + end + elseif (self.mode == 1 ) then + str = str .. "跑胡子 十五息起胡 一息一囤 明偎 天地胡 30胡翻倍 大小字 碰碰胡 一点胡 红黑胡" + str = str .. sp + -- if self.tianhu == 1 then + -- str = str .. "天胡" + -- str = str .. sp + -- end + -- if self.dihu == 1 then + -- str = str .. "地胡" + -- str = str .. sp + -- end + -- if self.haihu == 1 then + -- str = str .. "海湖" + -- str = str .. sp + -- end + -- if self.tinghu == 1 then + -- str = str .. "听胡" + -- str = str .. sp + -- end + -- if self.huangfan == 1 then + -- str = str .. "黄番" + -- str = str .. sp + -- end + + -- str = str .. (self.tun).."囤" + str = str .. sp + if self.fengding == 0 then + str = str .. "不封顶" + str = str .. sp + elseif self.fengding == 1 then + str = str .. "60封顶" + str = str .. sp + elseif self.fengding == 2 then + str = str .. "80封顶" + str = str .. sp + end + end + + + str = str.sub(str,1,string.len(str)-string.len(sp)) + return str +end + +function M:GetGameName() + if self.mode == 3 then + return self.maxPlayers .. "人全名堂" + elseif self.mode == 2 then + return self.maxPlayers .. "人红黑点" + elseif self.mode == 1 then + return self.maxPlayers .. "人湘潭跑胡子" + end + return self.maxPlayers .. "人常德跑胡子" +end + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunBeard/gamerule") + return gamerulepanel +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/runbeard/ExtendConfig.lua b/lua_probject/extend_project/extend/zipai/runbeard/ExtendConfig.lua new file mode 100644 index 00000000..6221d077 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/ExtendConfig.lua @@ -0,0 +1,237 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import('.EXGameInfo') +local EXMainView = import('.EXMainView') +local EXGameController = import('.EXGameController') +local EXRoomConfig = import('.EXRoomConfig') +local EXPlayBackView = import('.EXPlayBackView') +local explayer = import('.EXPlayer') +local ExtendConfig = {} + +local M = ExtendConfig + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = 'ExtendConfig' + self.extend_id = 13 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage('extend/zipai/runbeard/ui/Info_Poker_RunBeard') + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage('extend/zipai/runbeard/ui/Extend_Poker_RunBeard') + ResourcesManager.UnLoadGroup('ChangDe_ZP') +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:FillRoomConfig(room, _config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + local room = DataManager.CurrenRoom + local reload = s2croom['reload'] + local _tableInfo = s2croom['tableInfo'] + + local _config = _tableInfo['config'] + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo['playerData'] + room.curren_round = _tableInfo['round'] + for i = 1, #playerList do + local _jp = playerList[i] + + local p = explayer.new() + p.seat = _jp['seat'] + local online = _jp['online'] + p.line_state = online + p.ready = _jp['ready'] == 1 and true or false + local pid = _jp['aid'] + if (DataManager.SelfUser.account_id == pid) then + room.self_player = p + p.self_user = DataManager.SelfUser + else + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp['nick'] + u.head_url = _jp['portrait'] + u.sex = _jp['sex'] + end + p.entrust = _jp['entrust'] + p.self_user.host_ip = _jp['ip'] + p.self_user.location = Location.new(_jp['pos'] or '') + p.cur_hp = _jp['cur_hp'] or 0 + p.total_hp = _jp['total_hp'] or 0 + if _jp['hp_info'] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + room:AddPlayer(p) + end + + -- 如果重写了player类,就需要传第二个参数 + -- self:FillPlayerData(playerList, explayer) + + if (reload) then + local _reloadInfo = s2croom['reloadInfo'] + local _hand_card = _reloadInfo['hand_card'] + local _card_list = _reloadInfo['card_list'] + local _discard = _reloadInfo['discard'] + room.discard = _discard + -- local _index = _reloadInfo["typeface"] + -- if _index ==1 then + -- room.change_card_display = "2_" + -- else + -- room.change_card_display = "1_" + -- end + room.self_player.handcard_list = _hand_card + room.self_player.card_list = {} + for i = 1, #_card_list do + local data = {} + data.card_item = _card_list[i].card + data.index_X = _card_list[i].X + data.index_Y = _card_list[i].Y + room.self_player.card_list[#room.self_player.card_list + 1] = data + end + local active_seat = _reloadInfo['active_seat'] + local bank_seat = _reloadInfo['banker_seat'] + local playing = _reloadInfo['playing'] + local _info_list = _reloadInfo['info_list'] + local last_outcard_seat = _reloadInfo['last_outcard_seat'] + + room.left_count = _reloadInfo['left_card'] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo['curren_outcard_seat'] + if active_seat ~= 0 then + local player = room:GetPlayerBySeat(active_seat) + player.DiceCard = _reloadInfo['acitve_card'] + end + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i = 1, #_info_list do + local tem = _info_list[i] + local playerid = tem['playerid'] + local p = room:GetPlayerById(playerid) + local outcard_list = tem['outcard_list'] + p.outcard_list = outcard_list + p.total_score = tem['score'] + p.hu_xi = tem['hu_xi'] + p.hand_left_count = tem['card_count'] + p.cur_hp = tem['cur_hp'] or 0 + p.total_hp = tem['total_hp'] or 0 + if tem['hp_info'] then + p.cur_hp = tem.hp_info.cur_hp + p.total_hp = tem.hp_info.total_hp + end + p.entrust = tem['entrust'] + + local opcard = tem['opcard'] + for k = 1, #opcard do + local op = opcard[k] + local fz = {} + fz.type = op['type'] + local data = {} + data[1] = op['card1'] + data[2] = op['card3'] + fz.opcard = data + fz.card = op['card2'] + fz.active_card = op['card2'] + + p.fz_list[#p.fz_list + 1] = fz + if p.seat == room.self_player.seat then + if fz.type == RB_FZType.Kan then + for i = 1, 3 do + room.self_player.handcard_list[#room.self_player.handcard_list + 1] = fz.card + end + end + end + end + pt(p) + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data['info'] + + local _config = _tableInfo['config'] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config['ownerid'] + local active_seat = _tableInfo['active_seat'] + local bank_seat = _tableInfo['banker_seat'] + room.left_count = _tableInfo['left_card'] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo['round'] + + local _info_list = _tableInfo['playerData'] + for i = 1, #_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp['seat'] + local online = _jp['online'] + p.line_state = online + p.ready = _jp['ready'] == 1 and true or false + local pid = _jp['aid'] + if pid == DataManager.SelfUser.account_id then + room.self_player = p + end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp['nick'] + u.head_url = _jp['portrait'] + u.sex = _jp['sex'] + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp['hand_card'] + p.hand_card = _hand_card + if room.self_player ~= nil and p.seat == room.self_player.seat then + room.self_player.handcard_list = _hand_card + end + p.total_score = _jp['score'] + p.hand_left_count = #_hand_card + p.cur_hp = _jp['cur_hp'] or 0 + p.total_hp = _jp['total_hp'] or 0 + if _jp['hp_info'] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data['cmdList'] + room.result = pd_data['result'] +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/runbeard/PlayerCardInfoView.lua b/lua_probject/extend_project/extend/zipai/runbeard/PlayerCardInfoView.lua new file mode 100644 index 00000000..35feb31e --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/PlayerCardInfoView.lua @@ -0,0 +1,269 @@ +local PlayerCardInfoView = require("main.zipai.ZPPlayerCardInfoView") +---- 对方上面的牌 +local M = {} +function M.new(view,mainView) + + setmetatable(M, {__index = PlayerCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + + + +function M:UpdateFzList( fz_list ,ispaly,seat) + + self._area_fz_list:RemoveChildren(0,-1,true) + for i = 1,#fz_list do + local fzitem = nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/ComponentNew") + if(ispaly == false)then + fzitem:RemoveChildren(0,-1,true) + end + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetController("c2").selectedIndex =1 + fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].active_card) + fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[1]) + fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[2]) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Peng then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Wei then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card)--jefe + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Pao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Ti then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + if self._mainView._leftcard ==1 and self._player.seat ~= DataManager.CurrenRoom.banker_seat then + for j=1,4 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + else + for j=1,4 do + if j==4 then + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + else + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + end + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + end + end +end + +function M:playAnim(fzitem,fzcards, size,i,ispaly,seat) + if(ispaly == nil)then + ispaly =false + end + + local isaddLast = false + if(ispaly and i == size)then --匹配最后一个牌 + local faArray= fzitem:GetChild("chiwei1") + + if(DataManager.CurrenRoom.room_config.people_num ==3)then + if(DataManager.CurrenRoom.self_player.seat == 1)then + if(seat == 2)then + faArray= fzitem:GetChild("chiwei1") + else + faArray= fzitem:GetChild("chiwei") + end + elseif(DataManager.CurrenRoom.self_player.seat == 2) then + if(seat == 3)then + faArray= fzitem:GetChild("chiwei1") + else + faArray= fzitem:GetChild("chiwei") + end + elseif(DataManager.CurrenRoom.self_player.seat == 3)then + if(seat == 1)then + faArray= fzitem:GetChild("chiwei1") + else + faArray= fzitem:GetChild("chiwei") + end + end + end + + if(faArray~=nil)then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end + if(seat~=nil)then + isaddLast = self:isAddFirst(seat) + end + if(isaddLast)then + local index_postion = 0 + self._area_fz_list:AddChildAt(fzitem,index_postion) + else + self._area_fz_list:AddChild(fzitem) + end +end + +function M:isAddFirst(seat) + local isaddLast = false + if(DataManager.CurrenRoom.room_config.people_num ==3)then + if(DataManager.CurrenRoom.self_player.seat == 1)then + if(seat == 2)then + isaddLast = true + end + elseif(DataManager.CurrenRoom.self_player.seat == 2)then + if(seat == 3)then + isaddLast = true + end + elseif(DataManager.CurrenRoom.self_player.seat == 3)then + if(seat == 1)then + isaddLast = true + end + end + elseif DataManager.CurrenRoom.room_config.people_num ==2 then + isaddLast = true + end + return isaddLast +end + +function M:PlayingOutCardAnima(card) + coroutine.start(function() + coroutine.wait(0.1) + self:ClearOutCard() + end) +end + +function M:UpdateOutCardList(outcard,isShow,isMopai,seat) + if(isShow == nil) then + isShow = false + end + if(isMopai == nil) then + isMopai = false + end + + self._area_outcard_list:RemoveChildren(0,-1,true) + local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + + if outcard==0 then + outcards:GetChild("icon").icon ="ui://Main_RunBeard/202_1_300" + else + outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/203_",outcard) + end + outcards.x,outcards.y = 0,0 + local show_di_bg = outcards:GetChild("show_di_bg") + -- show_di_bg.visible = true + if(isShow)then + if outcard == 0 then + show_di_bg.visible = false + end + if(seat ~= nil and outcards~=nil)then + if(DataManager.CurrenRoom.room_config.people_num ==3)then + if(seat ==2)then + seat = 3 + elseif(seat == 3)then + seat =2 + end + elseif DataManager.CurrenRoom.room_config.people_num ==2 then + seat = 3 + end + if(isMopai)then + if outcard ~= 0 then + outcards:GetTransition("mopai"..seat):Play(function( ) + -- show_di_bg.visible = true + + end) + end + else + show_di_bg.visible = false + outcards:GetTransition("cpai"..seat):Play() + end + else + -- show_di_bg.visible = true + end + else + show_di_bg.visible = false + end + self._area_outcard_list:AddChild(outcards) +end + +--弃牌 +function M:UpdateQiPai( qi_list,ispaly,seat) + self._area_qipai_list:RemoveChildren(0,-1,true) + for i=1,#qi_list do + local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + qicards:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",qi_list[i]) + if(ispaly)then + if(i == #qi_list) then + if(DataManager.CurrenRoom.room_config.people_num ==2)then + qicards:GetTransition("t0"):Play() + else + if(DataManager.CurrenRoom.self_player.seat == 1)then + if(seat == 2)then + qicards:GetTransition("t0"):Play() + else + qicards:GetTransition("t1"):Play() + end + elseif(DataManager.CurrenRoom.self_player.seat == 2)then + if(seat == 3)then + qicards:GetTransition("t0"):Play() + else + qicards:GetTransition("t1"):Play() + end + elseif(DataManager.CurrenRoom.self_player.seat == 3)then + if(seat == 1)then + qicards:GetTransition("t0"):Play() + else + qicards:GetTransition("t1"):Play() + end + else + qicards:GetTransition("t0"):Play() + end + + end + end + end + self._area_qipai_list:AddChild(qicards) + end + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/runbeard/PlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/zipai/runbeard/PlayerSelfCardInfoView.lua new file mode 100644 index 00000000..584a2e9d --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/PlayerSelfCardInfoView.lua @@ -0,0 +1,483 @@ +local PlayerSelfCardInfoView = require("main.zipai.ZPPlayerSelfCardInfoView") +local CardCheck = require("main.zipai.CardCheck") +local M = {} +-- +function M.new(view,mainView) + setmetatable(M, {__index = PlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self._full = true + self:init() + return self +end + + +function M:onTouchBegin(context) + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + local button = context.sender + local card = button.data + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self:ShowHuTip(card.card_item) + end + card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/203_",card.card_item) + card.btn_card.sortingOrder = 100 + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + card.btn_card.xy = Vector2.New(card.btn_card.x+20 ,card.btn_card.y-50) + card.touch_pos = xy - button.xy + +end + +function M:__OnDragEnd(context) + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + if self.outcard_button then + self.outcard_button = nil + end + local button = context.sender + + local card = button.data + + local _room = DataManager.CurrenRoom + card.btn_card.sortingOrder = 0 + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + if (button.y < -380 and _room.curren_outcard_seat == _room.self_player.seat) then + button.touchable = false + self.outcard_button = card + self:UpdateIsOnClick(false) + self._mainView:OutCard(card.card_item) + else + local isChangeCard = false + self.outcard_button = nil + card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/201_",card.card_item) + self._area_handcard_list:AddChild(button) + if #self.card_list == 1 then + isChangeCard = false + self:UpdateHandCardsPos() + return + end + local CountCards = {} + for i=1,#self.card_list do + local lists = {} + if CountCards[self.card_list[i].index_X] == nil then + lists[#lists+1] = self.card_list[i] + CountCards[self.card_list[i].index_X]= lists + else + CountCards[self.card_list[i].index_X][#CountCards[self.card_list[i].index_X]+1] =self.card_list[i] + end + end + local minmark = 1 + local maxmark = #self.card_list + if card == self.card_list[1] or card == self.card_list[#self.card_list] then + if self.card_list[1].index_X == self.card_list[2].index_X then + minmark =2 + end + if self.card_list[#self.card_list].index_X == self.card_list[#self.card_list-1].index_X then + maxmark =#self.card_list-1 + end + end + if button.x+button.width/2 < self.card_list[minmark].btn_card.x and #CountCards<10 then + list_remove(self.card_list,card) + local num = 0 + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num+1 + end + end + if num ==0 then + for i=1,#self.card_list do + if self.card_list[i].index_X < card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + else + for i=1,#self.card_list do + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + card.index_X =1 + card.index_Y =1 + table.insert(self.card_list,1,card) + isChangeCard = true + elseif button.x+button.width/2 > (self.card_list[maxmark].btn_card.x +button.width) and #CountCards<10 then + list_remove(self.card_list,card) + local num = 0 + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X then + num = num+1 + end + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + end + if num ==0 then + for i=1,#self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + end + card.index_X =self.card_list[#self.card_list].index_X+1 + card.index_Y =1 + self.card_list[#self.card_list+1] =card + isChangeCard = true + else + local MoveCard = false + local MoveCardPos = 0 + local MoveCardY = 0 + for i=1,#CountCards do + local card_view = CountCards[i][1] + if card_view~=nil then + if button.x+button.width/2 > card_view.old_postion.x and button.x+button.width/2 < (card_view.old_postion.x+button.width) then + if card ~= card_view and #CountCards[i] <4 and card.index_X ~= card_view.index_X then + + MoveCardPos = i + MoveCardY = #CountCards[i]+1 + MoveCard = true + list_remove(self.card_list,card) + end + end + end + end + local MoveCardindex = 0 + -- local MoveCardY = 0 + if button.x+button.width/2 > card.old_postion.x and button.x+button.width/2 < (card.old_postion.x+button.width) then + if #CountCards[card.index_X]>1 then + for i=1,#CountCards[card.index_X] do + local _cv = CountCards[card.index_X][i] + if _cv ~= card then + if button.y+button.height/2 > _cv.btn_card.y and button.y+button.height/2 < (_cv.btn_card.y+button.height) then + --向下移動 + if ((button.y+button.height/2) +20) > (card.old_postion.y+button.height) then + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + --向上移動 + elseif ((button.y+button.height/2) -20) < card.old_postion.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + end + elseif i == #CountCards[card.index_X] and button.y+button.height/2 < _cv.btn_card.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + elseif i == 1 and button.y+button.height/2 > (_cv.btn_card.y+button.width) then + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + end + end + end + end + + end + if MoveCard ==true and MoveCardindex ==0 then + local num = 0 + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num+1 + end + end + if num ==0 then + for i=1,#self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + if MoveCardPos > card.index_X then + MoveCardPos = MoveCardPos-1 + end + end + card.index_X =MoveCardPos + card.index_Y =MoveCardY + for i=#self.card_list,1,-1 do + if MoveCardPos == self.card_list[i].index_X then + table.insert(self.card_list,(i+1),card) + break + end + end + isChangeCard = true + --上下移动 + elseif MoveCard ==true and MoveCardindex ~= 0 then + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X then + --向下移动 + if MoveCardindex == -1 then + if self.card_list[i].index_Y < card.index_Y and self.card_list[i].index_Y >= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y + 1 + + end + --向上移动 + else + if self.card_list[i].index_Y > card.index_Y and self.card_list[i].index_Y <= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + + end + end + end + end + card.index_X =MoveCardPos + card.index_Y =MoveCardY + for i=#self.card_list,1,-1 do + if MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY-1) then + table.insert(self.card_list,(i+1),card) + break + elseif MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY+1) then + table.insert(self.card_list,i,card) + break + end + end + isChangeCard = true + else + isChangeCard = false + self._area_handcard_list:AddChild(button) + end + + end + self:UpdateHandCardsPos() + if isChangeCard ==true then + self:SendChangeCard() + end + end +end + +function M:UpdateOutCardList(outcard,isShow,isMopai,seat) + if(isShow == nil) then + isShow = false + end + if(isMopai == nil) then + isMopai = false + end + self._area_outcard_list:RemoveChildren(0,-1,true) + local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + + if outcard==0 then + outcards:GetChild("icon").icon ="ui://Main_RunBeard/202_1_300" + else + outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/203_",outcard) + end + outcards.x,outcards.y = 0,0 + local show_di_bg = outcards:GetChild("show_di_bg") + --show_di_bg.visible = true + if(isShow)then + if outcard == 0 then + show_di_bg.visible = false + end + if(seat ~= nil and outcards~=nil)then + if(isMopai)then + if outcard ~= 0 then + outcards:GetTransition("mopai"..seat):Play(function( ) + -- show_di_bg.visible = true + + end) + end + else + show_di_bg.visible = false + outcards:GetTransition("cpai"..seat):Play() + end + else + --show_di_bg.visible = true + end + else + show_di_bg.visible = false + end + self._area_outcard_list:AddChild(outcards) +end + +--弃牌 +function M:UpdateQiPai( qi_list,isplay) + self._area_qipai_list:RemoveChildren(0,-1,true) + for i=1,#qi_list do + local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + qicards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/202_",qi_list[i]) + if(isplay)then + if(i == #qi_list) then + qicards:GetTransition("t0"):Play() + end + end + self._area_qipai_list:AddChild(qicards) + end +end + +--摸牌动画 +function M:PlayingOutCardAnima( card) + coroutine.start(function() + coroutine.wait(0.1) + self:ClearOutCard() + end) +end + +function M:UpdateFzList( fz_list ,ispaly) + printlog("jefe self UpdateFzList 2=======") + self._area_fz_list:RemoveChildren(0,-1,true) + + printlog("jefe self false UpdateFzList =======") + for i = 1,#fz_list do + local fzitem=nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/ComponentNew") + if(ispaly == false)then + fzitem:RemoveChildren(0,-1,true) + end + end + printlog("jefe self false RB_FZType UpdateFzList =======") + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].active_card) + fzcards:GetController("c2").selectedIndex = 1 + fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[1]) + fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[2]) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Peng then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Wei then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetController("c1").selectedIndex=1 + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Pao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Ti then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + if j==4 then + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + else + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + end + end + + +end + + +function M:playAnim( fzitem,fzcards, size,i,ispaly ) + if(ispaly == nil)then + ispaly =false + end + printlog("jefe self playAnim 2=======") + if(ispaly and i == size)then + local faArray= fzitem:GetChild("chiwei") + if(faArray~=nil)then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end + self._area_fz_list:AddChild(fzitem) +end + + + --出牌提示动画 + function M:ChuPaiTiShi() + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + local chu_player = DataManager.CurrenRoom.self_player + local selfplayeTable = {} + selfplayeTable.handcard_list = chu_player.handcard_list + selfplayeTable.fz_list = chu_player.fz_list + selfplayeTable.tiCount = chu_player.tiCount + selfplayeTable.paoCount = chu_player.paoCount + selfplayeTable.hu_xi = chu_player.hu_xi + local player = membe_deep_clone(selfplayeTable) + local mark_ting= {} + for i=1,#DataManager.CurrenRoom.self_player.handcard_list do + local card = DataManager.CurrenRoom.self_player.handcard_list[i] + list_remove(player.handcard_list, card) + local _player = membe_deep_clone(player) + local tingList = CardCheck.tingPai(_player,DataManager.CurrenRoom) + local isKan = false + for j=1,#player.fz_list do + if card == player.fz_list[j].card and player.fz_list[j].type == RB_FZType.Kan then + isKan =true + end + end + if #tingList > 0 and isKan == false then + + mark_ting[#mark_ting+1] = card + end + table.insert(player.handcard_list, card) + table.sort( player.handcard_list, ViewUtil.HandCardSort) + end + -- print("ChuPaiTiShi",#mark_ting,vardump(player)) + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self._view :GetController("chupai").selectedIndex =1 + if #mark_ting>0 then + for i=1,#mark_ting do + for k=1,#self.card_list do + local card_view= self.card_list[k] + if card_view.card_item == mark_ting[i] then + card_view.btn_card:GetController("mark_ting").selectedIndex = 1 + end + end + end + end + else + self._view :GetController("chupai").selectedIndex =0 + for k=1,#self.card_list do + local card_view= self.card_list[k] + card_view.btn_card:GetController("mark_ting").selectedIndex = 0 + + end + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/runbeard/Protocol.lua b/lua_probject/extend_project/extend/zipai/runbeard/Protocol.lua new file mode 100644 index 00000000..25e302e4 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/Protocol.lua @@ -0,0 +1,58 @@ +local Protocol = { + + + -- 出牌 + GAME_DIS_CARD = "611", + + -- 提示选择行为 + GAME_ACTION = "612", + + -- 通知服务器手牌队形改变 + GAME_CHANGE_CARD = "613", + -- 通知服务器牌字体改变 + GAME_CHANGE_TYPEfACE = "615", + + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 放喂提示事件 + GAME_EVT_FANGWEI = "822", + + -- 放跑 + GAME_EVT_FANGPAO = "823", + + -- 结算 + GAME_EVT_RESULT1 = "817", + + -- 弃牌 + GAME_EVT_QIPAI = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + --第二十一张牌 + GAME_EVT_ADD_CARD = "821", + + GAME_XIPAI = "20836", + GAME_EVENT_XIPAI = "20837", + GAME_EVENT_NOTIFY_XIPAI = "20838", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/runbeard/RunBeard_GameEvent.lua b/lua_probject/extend_project/extend/zipai/runbeard/RunBeard_GameEvent.lua new file mode 100644 index 00000000..c8731fb9 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/RunBeard_GameEvent.lua @@ -0,0 +1,41 @@ + +local RunBeard_GameEvent = { + -- 换座 + + -- 发牌 + SendCards = "SendCards", + + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + + EventDicelCard ="EventDicelCard", + OnEventTake = "OnEventTake", + + OnEcentRecond = "OnEcentRecond", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + QiCard = "QiCard", + AddCard = "AddCard", + + EventXiPai="EventXiPai", + + FangWei = "FangWei", + +} +return RunBeard_GameEvent diff --git a/lua_probject/extend_project/extend/zipai/runbeard/RunBeard_ResultView.lua b/lua_probject/extend_project/extend/zipai/runbeard/RunBeard_ResultView.lua new file mode 100644 index 00000000..9cfd5a91 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/RunBeard_ResultView.lua @@ -0,0 +1,752 @@ +require('Game.View.ResultView') +local PendulumRule = require('main.zipai.PendulumRule') +local RunBeard_ResultView = {} + +local M = RunBeard_ResultView + +function RunBeard_ResultView.new(blur_view, index) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self.class = 'RunBeard_ResultView' + self._currenIndex = 0 + if index ~= 1 then + self._blur_view = blur_view + end + self._close_zone = false + + self:init('ui://Extend_Poker_RunBeard/clearing') + self.xiPaiCtr=self._view:GetController("xipai") + return self +end + +function M:init(url) + ResultView.init(self, url) + local btn_share = self._view:GetChild('btn_share') + btn_share.onClick:Set( + function() + ShareScreenShot() + end + ) +end + +function M:InitData(over, room, result, total_result, callback) + local _overCtr = self._view:GetController('over') + local btn_confirm = self._view:GetChild('btn_confirm') + local btn_result = self._view:GetChild('btn_showResult') + local _btnCtr = self._view:GetController('button') + local _sdkCtr = self._view:GetController('sdk') + local _icon = self._view:GetChild('win_base') + local btn_close = self._view:GetChild('btn_close') + self._view:GetChild('tex_roomnum').text = room.room_id + self._view:GetChild('tex_data').text = os.date('%Y-%m-%d %H:%M', os.time()) + + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig then + self.xiPaiCtr.selectedIndex=1 + else + self.xiPaiCtr.selectedIndex=0 + end + + local xipai=self._view:GetChild("btn_xipai") + xipai.touchable=true + xipai.onClick:Add(function() + local xiPaiCallBack=function () + xipai.touchable=false + self.xiPaiCtr.selectedIndex=0 + ViewUtil.ErrorTip(1000000,"申请洗牌成功") + end + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendXiPaiAction(xiPaiCallBack) + end) + if result and result.xipai_score then + xipai.text="洗牌 积分x"..result.xipai_score + end + + if result ~= nil and result.liuju == true then + _icon.icon = 'ui://Main_RunBeard/liuju' + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + _overCtr.selectedIndex = 2 + + if over ~= 1 then + btn_confirm.onClick:Add( + function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:Close() + + if callback then + callback() + end + end + ) + self:AddClearItem(room, result, nil, over) + return + else + self.xiPaiCtr.selectedIndex=0 + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add( + function() + _overCtr.selectedIndex = 3 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + end + ) + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, result, total_result.info_list, over) + end + end + if over == 0 and result.liuju == false then + _icon.icon = 'ui://Main_RunBeard/jiesuan' + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + _overCtr.selectedIndex = 0 + btn_confirm.onClick:Add( + function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:Close() + + if callback then + callback() + end + end + ) + self:AddClearItem(room, result, nil, over) + elseif over == 1 and result.liuju == false then + _icon.icon = 'ui://Main_RunBeard/jiesuan' + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + _overCtr.selectedIndex = 0 + btn_result.onClick:Add( + function() + _overCtr.selectedIndex = 3 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + end + ) + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, result, total_result.info_list, over) + else + if result ~= nil then + if result.liuju == false then + _icon.icon = 'ui://Main_RunBeard/jiesuan' + over = 2 + _overCtr.selectedIndex = 3 + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, nil, total_result.info_list, over) + end + else + _icon.icon = 'ui://Main_RunBeard/jiesuan' + over = 2 + _overCtr.selectedIndex = 3 + self.xiPaiCtr.selectedIndex=0 + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, nil, total_result.info_list, over) + end + end +end + +function M:AddClearItem(room, data, total_data, over) + local n = over + 1 + local list_view1 = self._view:GetChild('player_list') + local list_view2 = self._view:GetChild('player_list_2') + + if data ~= nil and data.liuju == true then + self:FillLiuJuItemData(room, data) + if over == 1 then + self:FillItemData2(room, total_data, list_view2) + end + else + if 0 == over or 1 == over and data.liuju == false then + self:FillItemData(room, data, list_view1) + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end + end +end + +function M:GetPos(room, seat) + return ViewUtil.GetPos(room.self_player.seat, seat, room.room_config.people_num) +end +function M:FillLiuJuItemData(room, data) + local qipai_list = self._view:GetChild('qipai_listl') + local _dipaiC = self._view:GetController('qipai') + qipai_list:RemoveChildrenToPool() + if data.throw_card ~= nil and #data.throw_card > 0 then + _dipaiC.selectedIndex = 1 + local hand_card = PendulumRule.GetHandCard(data.throw_card, 3) + for k = 1, #hand_card do + local cards = qipai_list:AddItemFromPool() + for j = 1, #hand_card[k] do + cards:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + else + _dipaiC.selectedIndex = 0 + end + for i = 1, #data.info_list do + if data.info_list[i].seat ~= room.self_player.seat and #data.info_list[i].hand_card > 0 then + local card_list + if #data.info_list == 2 then + card_list = self._view:GetChild('card_list_2') + else + if self:GetPos(room, data.info_list[i].seat) == 2 then + card_list = self._view:GetChild('card_list_1') + else + card_list = self._view:GetChild('card_list_3') + end + end + + card_list:RemoveChildrenToPool() + for k = 1, #data.info_list[i].opCardList do + local fztype = data.info_list[i].opCardList[k].type + if fztype == RB_FZType.Kan then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', data.info_list[i].opCardList[k].card1) + end + end + end + local hand_card = PendulumRule.GetHandCard(data.info_list[i].hand_card, 3) + for k = 1, #hand_card do + local item = card_list:AddItemFromPool() + for j = 1, #hand_card[k] do + item:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + end + end +end + +function M:FillItemData(room, data, item) + local dipai_list = self._view:GetChild('dipai_list') + dipai_list:RemoveChildren(0, -1, true) + if data.left_card ~= nil and #data.left_card > 0 then + for i = 1, #data.left_card do + local dipais = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Qipai') + dipais:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/202_', data.left_card[i]) + dipai_list:AddChild(dipais) + end + end + local qipai_list = self._view:GetChild('qipai_list') + local _dipaiC = self._view:GetController('qipai') + qipai_list:RemoveChildrenToPool() + if data.throw_card ~= nil and #data.throw_card > 0 then + _dipaiC.selectedIndex = 1 + local hand_card = PendulumRule.GetHandCard(data.throw_card, 3) + for k = 1, #hand_card do + local cards = qipai_list:AddItemFromPool() + for j = 1, #hand_card[k] do + cards:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + else + _dipaiC.selectedIndex = 0 + end + local info_list = data.info_list + local Yes_win = false + local win_data = {} + for i = 1, #info_list do + if info_list[i].is_win == true then + Yes_win = true + win_data = info_list[i] + end + end + if win_data.seat == room.self_player.seat then + self._view:GetChild('show_win').visible = true + self._view:GetChild('show_low').visible = false + else + self._view:GetChild('show_win').visible = false + self._view:GetChild('show_low').visible = true + end + + if Yes_win == true then + local isWin_Card = true + local p = room:GetPlayerBySeat(win_data.seat) + if p.self_user.account_id == room.owner_id then + self._view:GetController('owner').selectedIndex = 1 + end + if p.seat == room.banker_seat then + self._view:GetController('bank').selectedIndex = 1 + end + self._view:GetChild('WinerName').text = p.self_user.nick_name + --self._view:GetChild('chongtunshu').text = '充囤:' .. room.room_config.tun .. ' 囤' + self._view:GetChild('huxi').text = '胡息:' .. win_data.hu_xi + self._view:GetChild('tunshu').text = '基础囤数:' .. win_data.tun + self._view:GetChild('zongtunshu').text = '总囤数:' .. win_data.total_tun + if win_data.round_score >= 0 then + self._view:GetChild('score').text = '游戏分:+' .. win_data.round_score + self._view:GetChild('score').grayed = false + else + self._view:GetChild('score').text = '游戏分:' .. win_data.round_score + self._view:GetChild('score').grayed = true + end + local hp_info = win_data.hp_info + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值 + self._view:GetChild('tili_score').visible = true + self._view:GetChild('tili_title').visible = true + if (round_actual_hp > 0) then + self._view:GetChild('tili_score').text = '积分:+' .. round_actual_hp + self._view:GetChild('tili_score').grayed = false + else + self._view:GetChild('tili_score').text = '积分:' .. round_actual_hp + self._view:GetChild('tili_score').grayed = true + end + end + + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限 + if (isupper_limit) then + self._view:GetChild('yidashangxian').text = '已达上限' + else + self._view:GetChild('yidashangxian').text = '' + end + end + + local btn_head = self._view:GetChild('btn_head') + ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) + local fullname_list = self._view:GetChild('fullname_list') + fullname_list:RemoveChildren(0, -1, true) + if win_data.mingtang ~= nil and #win_data.mingtang > 0 then + for i = 1, #win_data.mingtang do + local dipais = UIPackage.CreateObjectFromURL('ui://Extend_Poker_RunBeard/FullName') + dipais:GetChild('n0').icon = 'ui://Extend_Poker_RunBeard/hu_' .. win_data.mingtang[i].mingtang + if win_data.mingtang[i].type == 1 and win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 番' + elseif win_data.mingtang[i].type == 2 and win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 囤' + elseif win_data.mingtang[i].type == 3 and win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 倍' + end + fullname_list:AddChild(dipais) + end + end + local card_list = self._view:GetChild('card_list') + card_list:RemoveChildrenToPool() + if #win_data.cardList > 0 then + for i = 1, #win_data.cardList do + -- 1 是对子 2 是三个的 + local fztype = win_data.cardList[i].type + if fztype == 1 then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '将' + cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi + cards:GetController('c1').selectedIndex = 0 + if win_data.cardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + for j = 1, 2 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card1) + end + else + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '顺' + if + win_data.cardList[i].card1 == win_data.cardList[i].card2 and + win_data.cardList[i].card1 == win_data.cardList[i].card3 + then + cards:GetChild('card_type').text = '碰' + end + cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card1) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card2) + cards:GetChild('card_3').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card3) + if isWin_Card == true then + if win_data.cardList[i].card1 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + elseif win_data.cardList[i].card2 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 2 + elseif win_data.cardList[i].card3 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 3 + end + end + end + end + end + for i = 1, #win_data.opCardList do + local fztype = win_data.opCardList[i].type + if fztype == RB_FZType.Chi then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '顺' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card2) + cards:GetChild('card_3').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card3) + if isWin_Card == true then + if win_data.opCardList[i].card1 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + elseif win_data.opCardList[i].card2 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 2 + elseif win_data.opCardList[i].card3 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 3 + end + end + elseif fztype == RB_FZType.Peng then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '碰' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + elseif fztype == RB_FZType.Kan then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '坎' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + elseif fztype == RB_FZType.Wei or fztype == RB_FZType.ChouWei then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '畏' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + elseif fztype == RB_FZType.Pao then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '跑' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 2 + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + elseif fztype == RB_FZType.Ti then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '提' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 2 + if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + end + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + end + end + + if #win_data.hand_card > 0 then + for i = 1, #win_data.hand_card, 4 do + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '散' + cards:GetChild('card_huxi').text = 0 + cards:GetController('c1').selectedIndex = 2 + for j = 0, 3 do + if (i + j) <= #win_data.hand_card then + cards:GetChild('card_' .. (j + 1)).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.hand_card[i + j]) + if win_data.hand_card[i + j] == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = j + 1 + end + end + end + end + end + end + + item:RemoveChildrenToPool() + for i = 1, #info_list do + if info_list[i].is_win == false then + local player = item:AddItemFromPool() + local p = room:GetPlayerBySeat(info_list[i].seat) + if p.self_user.account_id == room.owner_id then + player:GetController('owner').selectedIndex = 1 + end + if p.seat == room.banker_seat then + player:GetController('bank').selectedIndex = 1 + end + local btn_head = player:GetChild('btn_head') + ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) + player:GetChild('playerName').text = p.self_user.nick_name + if info_list[i].round_score >= 0 then + player:GetChild('score').text = '+' .. info_list[i].round_score + player:GetChild('score').grayed = false + else + player:GetChild('score').text = info_list[i].round_score + player:GetChild('score').grayed = true + end + local hp_info = info_list[i].hp_info + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值 + player:GetChild('tili_score').visible = true + player:GetChild('tili_title').visible = true + if (round_actual_hp > 0) then + player:GetChild('tili_score').text = '+' .. round_actual_hp + player:GetChild('tili_score').grayed = false + else + player:GetChild('tili_score').text = '' .. round_actual_hp + player:GetChild('tili_score').grayed = true + end + end + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限 + if (isupper_limit) then + player:GetChild('yidashangxian').text = '已达上限' + else + player:GetChild('yidashangxian').text = '' + end + end + local card_list = player:GetChild('card_list') + card_list:RemoveChildrenToPool() + for k = 1, #info_list[i].opCardList do + local fztype = info_list[i].opCardList[k].type + if fztype == RB_FZType.Chi then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card2) + cards:GetChild('card_3').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card3) + elseif fztype == RB_FZType.Peng then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Kan then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Wei or fztype == RB_FZType.ChouWei then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Pao then + local cards = card_list:AddItemFromPool() + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Ti then + local cards = card_list:AddItemFromPool() + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + end + end + if #info_list[i].hand_card > 0 then + local hand_card = PendulumRule.GetHandCard(info_list[i].hand_card, 3) + for k = 1, #hand_card do + local cards = card_list:AddItemFromPool() + for j = 1, #hand_card[k] do + cards:GetChild('card_' .. (j)).icon = + self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + end + end + end +end + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + local p = room:GetPlayerBySeat(data[i].seat) + player_list[i].id = user.account_id + local total_score = data[i].total_score + player_list[i].hp_info = data[i].hp_info + player_list[i].score = total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + local entrust = data[i].entrust + if entrust == nil then + entrust = false + end + player_list[i].entrust = entrust + player_list[i].param = {} + local wcount = 0 + if (data[i].win_count ~= nil) then + wcount = data[i].win_count + end + local hxcount = 0 + if (data[i].total_huxi ~= nil) then + hxcount = data[i].total_huxi + end + player_list[i].param[1] = {} + player_list[i].param[1].key = '胡牌次数:' + player_list[i].param[1].value = tostring(wcount) + player_list[i].param[2] = {} + player_list[i].param[2].key = '胡息总数:' + player_list[i].param[2].value = tostring(hxcount) + end + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + self:SetGSListlineGap(5) + self:InitBigResult(room, 26) + DataManager.CurrenRoom = nil + -- list:RemoveChildrenToPool() + -- for i =1, #data do + -- local total_score = room:GetTotalScore(data[i].total_score) + -- local item = list:AddItemFromPool() + -- local p = room:GetPlayerBySeat(data[i].seat) + -- if p.self_user.account_id == room.owner_id then + -- item:GetController("owner").selectedIndex = 1 + -- end + + -- local btn_head = item:GetChild("btn_head") + -- ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) + -- item:GetChild("win_count").text = "胡牌次数:"..data[i].win_count.."次" + -- item:GetChild("total_huxi").text = "胡息总数:"..data[i].total_huxi + -- --点赞 + -- self:Click_zan(item, p.self_user.account_id) + + -- item:GetChild("name").text = p.self_user.nick_name + + -- local hp_info = data[i].hp_info + -- if(hp_info ~=nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + -- -- --体力值 + -- -- local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值 + -- local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限 + -- if(isupper_limit)then + -- item:GetChild("yidashangxian").text = "已达上限" + -- else + -- item:GetChild("yidashangxian").text = "" + -- end + -- end + -- local x = room:GetOriginScore(total_score) + -- if total_score >= 0 then + -- item:GetChild("score").text = "+"..x + -- item:GetChild("score").grayed = false + -- else + -- item:GetChild("score").text = x + -- item:GetChild("score").grayed = true + -- end + -- if room.hpOnOff == 1 and room.score_times ~= 1 or room:checkHpNonnegative() then + -- item:GetController("bei") .selectedIndex=1 + -- item:GetChild("sss").text = room.score_times + -- if(hp_info ~= nil)then + -- local round_actual_hp = d2ad(hp_info.total_hp) --// 本局实际输赢体力值 + -- total_score = round_actual_hp + -- end + -- if total_score >= 0 then + -- item:GetChild("score1").text = "+"..total_score + -- item:GetChild("score1").grayed = false + -- else + -- item:GetChild("score1").text = total_score + -- item:GetChild("score1").grayed = true + -- end + -- end + -- if #data ==3 then + -- if i ==1 then + -- if total_score >data[2].total_score and total_score >data[3].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- elseif i ==2 then + -- if total_score >data[1].total_score and total_score >data[3].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- elseif i ==3 then + -- if total_score >data[2].total_score and total_score >data[1].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- end + -- else + -- if i ==1 then + -- if total_score >data[2].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- elseif i ==2 then + -- if total_score >data[1].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- end + + -- end + -- end + + -- DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild('btn_head') + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= '' then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end +function M:getCardItem(card_1, card_2) + local _room = DataManager.CurrenRoom + if _room ~= nil and _room.change_card_display ~= nil then + return card_1 .. _room.change_card_display .. card_2 + else + return card_1 .. '2_' .. card_2 + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/runbeard/main/CardCheck.lua b/lua_probject/extend_project/extend/zipai/runbeard/main/CardCheck.lua new file mode 100644 index 00000000..2757ceba --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/main/CardCheck.lua @@ -0,0 +1,635 @@ +-- 检测牌是否存在 +local function checkCard(eventCard, cardList, num) + if num == nil then + num = 1 + end + local result = 0 + for i = 1, #cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if (result == num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card, count) + for i = 1, count do + list_remove(cardList, card) + end +end + +local function checkCardAndRomve(eventCard, cardList, num) + if (checkCard(eventCard, cardList, num)) then + removeCard(cardList, eventCard, num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard, cardList) + local result = 0 + for i = 1, #cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + stackHuxi = nil +} + +function M:push(cardGroup) + self.stack[#self.stack + 1] = cardGroup +end +function M:pushhuxi(cardGroup) + self.stackHuxi[#self.stackHuxi + 1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack, #self.stack) + for _, card in ipairs(cardGroup) do + self.cardList[#self.cardList + 1] = card + end + table.sort(self.cardList) +end +-- 顺子 +function M:tryShunzi1(card, player) + if card < 300 and card % 100 > 8 then + return false + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + removeCard(self.cardList, card, 1) + local cardGroup = {card, card + 1, card + 2} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + return true + end + return false +end + + +-- 2 7 10 +function M:tryShunzi3(card, player) + if card % 100 == 2 then + if (checkCard(card + 5, self.cardList, 1)) and (checkCard(card + 8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 5, 1) + removeCard(self.cardList, card + 8, 1) + local cardGroup = {card, card + 5, card + 8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + return true + end + end + return false +end + + +-- 坎 +function M:tryKezi(card, player) + if (checkCard(card, self.cardList, 3)) then + removeCard(self.cardList, card, 3) + local cardGroup = {card, card, card} + self:push(cardGroup) + local _huxi = 1 + if self.drawCard~=card then + --printlog("tryKezi====>>>",self.drawCard,card) + _huxi = 3 + end + self:pushhuxi(_huxi) + return true + end + return false +end + + + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (checkCard(card, self.cardList, 2)) then + removeCard(self.cardList, card, 2) + local cardGroup = {card, card} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + elseif (checkCard(card, self.cardList, 1)) then + if card % 100 <=9 then + if (checkCard(card+1, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+1, 1) + local cardGroup = {card, card+1} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + end + + if card % 100 <=8 then + if (checkCard(card+2, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+2, 1) + local cardGroup = {card, card+2} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + end + + if card % 100 >=2 then + if (checkCard(card-1, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-1, 1) + local cardGroup = {card, card-1} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + end + + if card % 100 >=3 then + if (checkCard(card-2, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-2, 1) + local cardGroup = {card, card-2} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + end + + if card % 100 ==2 then + if (checkCard(card+5, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+5, 1) + local cardGroup = {card, card+5} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card+8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+8, 1) + local cardGroup = {card, card+8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + + if card % 100 ==7 then + if (checkCard(card-5, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-5, 1) + local cardGroup = {card, card-5} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card+3, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+3, 1) + local cardGroup = {card, card+3} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + if card % 100 ==10 then + if (checkCard(card-8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-8, 1) + local cardGroup = {card, card-8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card-3, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-3, 1) + local cardGroup = {card, card-3} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + + end + + return false +end + + +function M:tryPair2(card) + if (self.pair_count > 0) then + return false + end + + if (checkCard(card, self.cardList, 1)) then + if card % 100 ==2 then + if (checkCard(card+5, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+5, 1) + local cardGroup = {card, card+5} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card+8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+8, 1) + local cardGroup = {card, card+8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + + if card % 100 ==7 then + if (checkCard(card-5, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-5, 1) + local cardGroup = {card, card-5} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card+3, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+3, 1) + local cardGroup = {card, card+3} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + if card % 100 ==10 then + if (checkCard(card-8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-8, 1) + local cardGroup = {card, card-8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card-3, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-3, 1) + local cardGroup = {card, card-3} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + + end + + return false +end + + + +function M:tryWin(player) + + if #self.cardList == 0 then + if (self.pair_count == 1) then + return true + elseif self.pair_count == 2 and #self.stack==2 then + local tempPList={} + for i=1,#self.stack do + local card1=self.stack[i][1] + local card2=self.stack[i][2] + table.insert(tempPList,card1) + table.insert(tempPList,card2) + end + + if #tempPList~=4 then return false end + + table.sort(tempPList) + + if tempPList[1]==tempPList[2]+1 and tempPList[2]==tempPList[3]+1 and tempPList[3]==tempPList[4]+1 then + return true + end + + end + + return false + end + + + local activeCard = 0 + for i = 1, #self.cardList do + if (self.cardList[i] == 201 or self.cardList[i] == 202) then + activeCard = self.cardList[i] + break + end + end + if (activeCard == 0) then + activeCard = self.cardList[1] + end + + if (activeCard % 100 == 1) then + if self:tryShunzi1(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + if self:tryKezi(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair2(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + elseif activeCard % 100 == 2 then + if self:tryShunzi3(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + if self:tryKezi(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair2(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryShunzi1(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + else + if self:tryKezi(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair2(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + + if self:tryShunzi1(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + end + return false +end + +local function init(self, player, cardInhand, addCard) + self.stack = {} + self.stackHuxi = {} + self.pair_count = 0 + self.kong_count = 0 + self.drawCard=0 + self.cardList = membe_clone(cardInhand) + if addCard == nil then + self.kong_count = 1 + else + self.kong_count = 0 + self.cardList[#self.cardList + 1] = addCard + self.drawCard=addCard + end + table.sort(self.cardList) + return self:tryWin(player) +end + +function M.tingPai(player, room) + local self = setmetatable({}, {__index = M}) + local tingList = {} + local cardInhand = player.handcard_list + if not cardInhand or #cardInhand == 0 then + return tingList + end + local kan_huxi = 0 + local kan_cards = {} + for j = 1, #player.fz_list do + for i = 1, #cardInhand do + if cardInhand[i] == player.fz_list[j].active_card and player.fz_list[j].type == 3 then + kan_cards[#kan_cards + 1] = cardInhand[i] + break + end + end + end + if #kan_cards > 0 then + for i = 1, #kan_cards do + kan_huxi = kan_huxi + 3 + removeCard(cardInhand, kan_cards[i], 3) + end + end + player.tiCount = 0 + player.paoCount = 0 + + + for k = 100, 200, 100 do + for i = 1, 10 do + local tem = k + i + local result = init(self, player, cardInhand, tem) + if result then + --printlog("是否胡牌===>>>",tem) + end + + local num = 0 + for k = 1, #self.stackHuxi do + num = num + self.stackHuxi[k] + end + + if result then + local num1 = 0 + --pt(self.stackHuxi) + for k = 1, #self.stackHuxi do + num1 = num1 + self.stackHuxi[k] + --printlog(self.stackHuxi[k]) + end + --printlog("胡息数量===>>>",player.hu_xi,num1,kan_huxi) + if (player.hu_xi + num1 + kan_huxi) >= (self:getHuxi(room)-1) then + tingList[#tingList + 1] = tem + end + end + + + + end + end + return tingList +end + +function M:getHuxi(room) + if room.game_id == 301 then + return 8 + end + if room.game_id == 13 or room.game_id == 14 or room.game_id == 23 then + return 15 + elseif room.game_id == 26 then + return 10 + elseif room.game_id == 29 then + if room.room_config.maxPlayers == 3 then + return 15 + else + return 9 + end + end +end + +function M:GetFzData(tem, ctype) + local huxi + + if ctype == 1 then + huxi=1 + elseif ctype == 2 then + huxi=1 + elseif ctype == 3 then + huxi = 3 + elseif ctype == 4 then + huxi = 3 + elseif ctype == 5 then + huxi = 3 + elseif ctype == 7 then + huxi = 5 + end + return huxi +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/runbeard/main/FZData.lua b/lua_probject/extend_project/extend/zipai/runbeard/main/FZData.lua new file mode 100644 index 00000000..e5bb09cd --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/main/FZData.lua @@ -0,0 +1,45 @@ +RB_FZType = +{ + Chi = 1, + Peng = 2, + Kan = 3, + Wei = 4, + ChouWei=5, + Pao = 6, + Ti = 7, + HU = 8, + Bi = 9, + PengPao =10, + WeiPao =11, + WeiTi =12, + KanTi =13, + DuiZi = 14, + zhao = 15, +} + +local FZTipList = { + tip_map_id = nil, + tip_map_type = nil +} + +local M = FZTipList + +function M.new() + local self = {} + setmetatable(self,{__index = FZTipList}) + self.tip_map_id = {} + self.tip_map_type = {} + return self +end + +function M:AddTip(tip) + self.tip_map_id[tip.id] = tip + local tiplist = self.tip_map_type[tip.weight] + if not tiplist then + tiplist = {} + self.tip_map_type[tip.weight] = tiplist + end + tiplist[#tiplist+1] = tip +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/runbeard/main/HuTipView.lua b/lua_probject/extend_project/extend/zipai/runbeard/main/HuTipView.lua new file mode 100644 index 00000000..d6e6e97b --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/main/HuTipView.lua @@ -0,0 +1,69 @@ +local HuTipView = { + _view_start_pos = nil, + _touch_start_pos = nil, +} + +local M = HuTipView + +function M.new(main_view) + local self = {} + self.class = "HuTipView" + setmetatable(self,{__index = HuTipView}) + self._main_view = main_view + self:init() + return self +end + +local function SetObjEnabled(obj, enabled) + obj.visible = enabled + obj.touchable = enabled +end +function M:OnTouchBegin(context) + self._view_start_pos = Vector2(self._view.x, self._view.y) + self._touch_start_pos = self._main_view._view:GlobalToLocal(Vector2(context.inputEvent.x, context.inputEvent.y)) +end +function M:OnTouchMove(context) + local xy = self._main_view._view:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + local dist = Vector2(xy.x - self._touch_start_pos.x, xy.y - self._touch_start_pos.y) + local posx = self._view_start_pos.x + dist.x + local posy = self._view_start_pos.y + dist.y + local max_x = self._main_view._view.width - self._view.width + local max_y = self._main_view._view.height - self._view.height + self._view.x = posx < 0 and 0 or posx > max_x and max_x or posx + self._view.y = posy < 0 and 0 or posy > max_y and max_y or posy +end + +function M:init() + self._view = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Hu_Tip") + self._main_view._view:AddChild(self._view) + local width = self._view.width + local m_width = self._main_view._view.width + local m_height = self._main_view._view.height + -- self._view.x = 0.5 * m_width - 0.5 * width + self._view.x = 0 + self._view.y = 0.7 * m_height + SetObjEnabled(self._view, false) + self._view.onTouchBegin:Add(handler(self, self.OnTouchBegin)) + self._view.onTouchMove:Add(handler(self, self.OnTouchMove)) +end + +function M:FillData(cards) + local lst_card = self._view:GetChild("tingpai") + lst_card:RemoveChildrenToPool() + local num = #cards + if num > 0 then + if num > 4 and num < 28 then + self._view.width = 191 + ((num > 4 and 6 or num) - 3) * 38 + self._view.height = 69 + (math.ceil(num / 5) - 1) * 56 + end + for i = 1, num do + local item = lst_card:AddItemFromPool() + item:GetChild("icon").icon = "ui://Main_RunBeard/202_1_" .. cards[i] + end + SetObjEnabled(self._view, true) + else + SetObjEnabled(self._view, false) + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/runbeard/main/PendulumRule.lua b/lua_probject/extend_project/extend/zipai/runbeard/main/PendulumRule.lua new file mode 100644 index 00000000..8f6b21cc --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/main/PendulumRule.lua @@ -0,0 +1,1177 @@ + +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + if num ==nil then + num =1 + end + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + end + end + if(result ==num) then + return true + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local M = { + cardList = nil, + stack = nil, +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + self.cardList[#self.cardList + 1] = card + end + table.sort(self.cardList) +end + +function M:tryShunzi1(card,type1 ) + if card < 300 and card % 100 > 8 then + return false + end + if (checkCard(card, self.cardList)) and (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card+1,1) + removeCard(self.cardList,card+2,1) + removeCard(self.cardList,card,1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end +function M:tryShunzi2( card ,type1) + if card -card%100 == 100 then + if self:tryShunzi1(card+100,0) or self:tryShunzi3(card+100,0) then + return false + end + if checkCard(card+100,self.cardList,1) and checkCard(card,self.cardList,2) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,2) + removeCard(self.cardList,card+100,1) + local cardGroup = {card,card,card+100} + self:push(cardGroup) + return true + end + if (checkCard(card+100,self.cardList,2)) and (checkCard(card,self.cardList,1)) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+100,2) + local cardGroup = {card+100,card+100,card} + self:push(cardGroup) + return true + end + else + if self:tryShunzi1(card-100) or self:tryShunzi3(card-100) then + return false + end + if (checkCard(card-100,self.cardList,1)) and checkCard(card,self.cardList,2) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,2) + removeCard(self.cardList,card-100,1) + local cardGroup = {card,card,card-100} + self:push(cardGroup) + return true + end + if (checkCard(card-100,self.cardList,2)) and checkCard(card,self.cardList,1) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card-100,2) + local cardGroup = {card-100,card-100,card} + self:push(cardGroup) + return true + end + end + return false +end +function M:tryShunzi3( card,type1 ) + if card % 100 == 2 then + if (checkCard(card, self.cardList, 1)) and (checkCard(card+5, self.cardList, 1)) and (checkCard(card+8, self.cardList, 1)) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+5,1) + removeCard(self.cardList,card+8,1) + local cardGroup = {card,card+5,card+8} + self:push(cardGroup) + return true + + end + return false + end + return false +end + +function M:tryKezi(card) + if (checkCard(card, self.cardList, 3)) then + removeCard(self.cardList,card,3) + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryTi(card) + if (checkCard(card, self.cardList, 4)) then + removeCard(self.cardList,card,4) + local cardGroup = {card,card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (checkCard(card, self.cardList, 2)) then + removeCard(self.cardList,card,2) + local cardGroup = {card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryShunzi4( card ) + if card -card%100 == 100 then + if self:tryShunzi1(card+100,0) or self:tryShunzi3(card+100,0) or self:tryShunzi5(card+100,0) then + return false + end + if checkCard(card+100,self.cardList,1) and checkCard(card,self.cardList,1) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+100,1) + local cardGroup = {card,card+100} + self:push(cardGroup) + return true + end + if (checkCard(card+100,self.cardList,1)) and (checkCard(card,self.cardList,1)) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+100,1) + local cardGroup = {card,card+100} + self:push(cardGroup) + return true + end + else + if self:tryShunzi1(card-100,0) or self:tryShunzi3(card-100,0) or self:tryShunzi5(card-100,0) then + return false + end + if (checkCard(card-100,self.cardList,1)) and checkCard(card,self.cardList,1) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card-100,1) + local cardGroup = {card-100,card} + self:push(cardGroup) + return true + end + if (checkCard(card-100,self.cardList,1)) and checkCard(card,self.cardList,1) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card-100,1) + local cardGroup = {card,card-100} + self:push(cardGroup) + return true + end + end + return false +end +function M:tryShunzi5( card ,type1) + if card % 100 == 2 then + if (checkCard(card, self.cardList, 1)) and (checkCard(card+5, self.cardList, 1)) then + if self:tryShunzi2(card+5,0) or self:tryShunzi1(card+5,0) then + return false + end + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+5,1) + local cardGroup = {card,card+5} + self:push(cardGroup) + return true + end + if (checkCard(card, self.cardList, 1)) and (checkCard(card+8, self.cardList, 1)) then + if self:tryShunzi2(card+8,0) or self:tryShunzi1(card+8,0) then + return false + end + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+8,1) + local cardGroup = {card,card+8} + self:push(cardGroup) + return true + end + elseif card % 100 == 7 then + if (checkCard(card, self.cardList, 1)) and (checkCard(card+3, self.cardList, 1)) then + if self:tryShunzi2(card+3,0) or self:tryShunzi1(card+3,0) then + return false + end + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+3,1) + local cardGroup = {card,card+3} + self:push(cardGroup) + return true + end + end + return false +end + +function M:tryMenzi1( card ) + + if (checkCard(card, self.cardList, 1)) and (checkCard(card+1, self.cardList, 1)) then + if self:tryShunzi2(card+1,0) or self:tryShunzi1(card+1,0) or self:tryShunzi3(card+1,0) then + return false + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+1,1) + local cardGroup = {card,card+1} + self:push(cardGroup) + return true + end + if (checkCard(card, self.cardList, 1)) and (checkCard(card+2, self.cardList, 1)) then + if self:tryShunzi2(card+2,0) or self:tryShunzi1(card+2,0) or self:tryShunzi3(card+2,0) then + return false + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+2,1) + local cardGroup = {card,card+2} + self:push(cardGroup) + return true + end + + return false +end + +function M:tryOneCard(card) + if (checkCard(card, self.cardList, 1)) then + removeCard(self.cardList,card,1) + local cardGroup = {card} + self:push(cardGroup) + return true + end + return false +end + -- 摆牌规则 先四后三 对子 顺子 单个 +function M:tryPendulumRule() + for i=1,10 do + for k=100,200,100 do + local tem = k + i + local x = true + if x and self:tryTi(tem) then + x =false + end + if x and self:tryKezi(tem) then + x =false + end + if x and self:tryShunzi2(tem) then + x =false + end + if x and self:tryPair(tem) then + x =false + end + if x and self:tryShunzi3(tem) then + x =false + end + if x and self:tryShunzi1(tem) then + x =false + end + if x and self:tryShunzi5(tem) then + x =false + end + if x and self:tryShunzi4(tem) then + x =false + end + if x and self:tryMenzi1(tem) then + x =false + end + if x and self:tryOneCard(tem) then + x =false + end + end + end + if #self.stack >10 then + --变成10列--这里牌多了也不会报错了 + local removeitem = 0 + local card = 0 + for i=#self.stack,1,-1 do + if #self.stack[i] == 1 and removeitem ==0 then + removeitem = i + card = self.stack[i][1] + list_remove(self.stack[i],self.stack[i][1]) + end + end + if card ~= 0 then + list_remove(self.stack,self.stack[removeitem]) + for i=#self.stack,1,-1 do + if #self.stack[i] >0 and #self.stack[i] <3 then + self.stack[i][#self.stack[i] +1] = card + break + end + end + end + end + return self.stack +end + + + + +--摆牌规则 优先胡息 +function M:tryPendulumRule2() + local card_count = #self.cardList + local cards_map = {} + local CountCards = {} + for i=1,#self.cardList do + CountCards[self.cardList[i]]= CountCards[self.cardList[i]] == nil and 1 or CountCards[self.cardList[i]] + 1 + end + --pt(self.cardList) + --printlog("摆牌规则 优先胡息====》》》") + --pt(CountCards) + + + --find4 + for k,v in pairs(CountCards) do + if (v == 4 and k<200) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3 and k<200) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2 and k<200) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + + + + + --find 小 2 7 10 + local counta = CountCards[102] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[110]~=nil and CountCards[102] >0 and CountCards[107] >0 and CountCards[110] >0 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cs[3]= 110 + cards_map[#cards_map+1] = cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 3 + end + end + end + + + --find 小 123 + local counta = CountCards[101] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[101]~=nil and CountCards[102]~=nil and CountCards[103]~=nil and CountCards[101] >0 and CountCards[102] >0 and CountCards[103] >0 then + local cs = {} + cs[1]= 101 + cs[2]= 102 + cs[3]= 103 + cards_map[#cards_map+1] = cs + CountCards[101] = CountCards[101]-1 + CountCards[102] = CountCards[102]-1 + CountCards[103] = CountCards[103]-1 + card_count = card_count - 3 + end + end + end + + + --find abc + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] == CountCards[i + 1] and CountCards[i] == CountCards[i + 2] then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + + + + + --find ab + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + + + + + --find 小 2 7 两个 + for i=101,110 do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[102] ==1 and CountCards[107] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[102]~=nil and CountCards[110]~=nil and CountCards[102] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[107]~=nil and CountCards[110]~=nil and CountCards[107] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 107 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + local tempCardList={} + for i = 101, 110 do + if CountCards[i]~=nil and (CountCards[i] == 1) then + table.insert(tempCardList,i) + CountCards[i]=CountCards[i]-1 + end + end + + + local cs={} + local count=1 + for i=1,#tempCardList do + --[[if i%3==1 then + cs[count]={} + end + + table.insert(cs[count],tempCardList[i]) + + if i%3==0 then + count=count+1 + end--]] + + local cst={} + table.insert(cst,tempCardList[i]) + table.insert(cs,cst) + + end + + for i=1 , #cs do + cards_map[#cards_map+1]=cs[i] + card_count =card_count- #cs[i] + end + + + ----------------------------- + --find4 + for k,v in pairs(CountCards) do + if (v == 4 and k>200) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3 and k>200) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2 and k>200) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + + --find 大 2 7 10 + local countA = CountCards[202] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[210]~=nil and CountCards[202] >0 and CountCards[207] >0 and CountCards[210] >0 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cs[3]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 3 + end + end + end + + --find 大 123 + local countA = CountCards[201] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[201]~=nil and CountCards[202]~=nil and CountCards[203]~=nil and CountCards[201] >0 and CountCards[202] >0 and CountCards[203] >0 then + local cs = {} + cs[1]= 201 + cs[2]= 202 + cs[3]= 203 + cards_map[#cards_map+1]=cs + CountCards[201] = CountCards[201]-1 + CountCards[202] = CountCards[202]-1 + CountCards[203] = CountCards[203]-1 + card_count = card_count - 3 + end + end + end + + --find ABC + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] == CountCards[i + 1] and CountCards[i] == CountCards[i + 2] then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + + --[[ --find AAa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] >= 2 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-3; + end + end + end + + --find Aa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] == 1 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 1; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-2 + end + end + end --]] + + --find AB + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + --find 大 2 7 两个 + for i=201,210 do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[202] ==1 and CountCards[207] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + card_count = card_count - 2 + end + end + + + for i=201,210 do + if CountCards[202]~=nil and CountCards[210]~=nil and CountCards[202] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + for i=201,210 do + if CountCards[207]~=nil and CountCards[210]~=nil and CountCards[207] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 207 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + + + -------------------- + + + + + local singleList = {} + --find else + for k,v in pairs(CountCards) do + if (v == 1) then + singleList[#singleList+1] = k + CountCards[k] = CountCards[k] -1 + + end + end + + for i=1,#singleList do + local cs={} + table.insert(cs,singleList[i]) + cards_map[#cards_map + 1]= cs + end + + --[[local index = 3 + for i=1,#singleList,index do + local cs ={} + cs[#cs+1] = singleList[i] + if i < #singleList then cs[#cs+1] = singleList[i+1] end + if i < #singleList - 1 then cs[#cs+1] = singleList[i+2] end + cards_map[#cards_map + 1]=cs + end--]] + --变成9列--这里牌多了也不会报错了 + --[[for i=9 ,1,-1 do + for j = #cards_map , 9,-1 do + if #cards_map[i] < 3 then + cards_map[i][#cards_map[i]+1] = cards_map[j][1] + list_remove(cards_map[j],cards_map[j][1]) + end + end + end--]] + + --pt(cards_map) + --printlog("11111111111111111111") + local mapCount=#cards_map + if mapCount>12 then + local tempCardMpList1={} + local tempCardMpList2={} + local tempCardMpList3={} + for i=1,mapCount do + if #cards_map[i]>=2 then + table.insert(tempCardMpList1,cards_map[i]) + else + if cards_map[i][1]<200 then + table.insert(tempCardMpList2,cards_map[i][1]) + elseif cards_map[i][1]>200 then + table.insert(tempCardMpList3,cards_map[i][1]) + end + end + end + + --pt(tempCardMpList1) + --pt(tempCardMpList2) + --pt(tempCardMpList3) + + local cs={} + local count=1 + for i=1,#tempCardMpList2 do + if i%3==1 then + cs[count]={} + end + + table.insert(cs[count],tempCardMpList2[i]) + + if i%3==0 then + count=count+1 + end + + end + + for i=1 , #cs do + tempCardMpList1[#tempCardMpList1+1]=cs[i] + end + + + local cs={} + local count=1 + for i=1,#tempCardMpList3 do + if i%3==1 then + cs[count]={} + end + + table.insert(cs[count],tempCardMpList3[i]) + + if i%3==0 then + count=count+1 + end + + end + + for i=1 , #cs do + tempCardMpList1[#tempCardMpList1+1]=cs[i] + end + + + cards_map=tempCardMpList1 + end + + table.sort(cards_map, ViewUtil.HandCardSort3) + --pt(cards_map) + return cards_map + +end + + +--摆牌规则 优先顺子 -AAa- 对子 - 单牌 +function M:tryPendulumRule3() + local card_count = #self.cardList + local cards_map = {} + local CountCards = {} + for i=1,#self.cardList do + CountCards[self.cardList[i]]= CountCards[self.cardList[i]] == nil and 1 or CountCards[self.cardList[i]] + 1 + end + --find4 + for k,v in pairs(CountCards) do + if (v == 4) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + --find abc + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] >0 and CountCards[i + 1]>0 and CountCards[i + 2]>0 then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + --find ABC + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] >0 and CountCards[i + 1]>0 and CountCards[i + 2]>0 then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + --find 大 2 7 10 + local countA = CountCards[202] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[210]~=nil and CountCards[202] >0 and CountCards[207] >0 and CountCards[210] >0 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cs[3]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 3 + end + end + end + + --find 小 2 7 10 + local counta = CountCards[102] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[110]~=nil and CountCards[102] >0 and CountCards[107] >0 and CountCards[110] >0 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cs[3]= 110 + cards_map[#cards_map+1] = cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 3 + end + end + end + + --find AAa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] >= 2 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-3; + end + end + end + --find aaA + for i = 101, 110 do + if CountCards[i]~=nil and (CountCards[i] >= 2) then + if CountCards[i + 100]~=nil and (CountCards[i + 100] == 1) then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i+100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i +100] = CountCards[i +100] - 1 + card_count = card_count-3; + end + end + end + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + --find Aa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] == 1 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 1; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-2 + end + end + end + --find ab + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + --find AB + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + --find 大 2 7 两个 + for i=201,210 do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[202] ==1 and CountCards[207] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + card_count = card_count - 2 + end + end + + for i=201,210 do + if CountCards[202]~=nil and CountCards[210]~=nil and CountCards[202] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + for i=201,210 do + if CountCards[207]~=nil and CountCards[210]~=nil and CountCards[207] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 207 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + --find 小 2 7 两个 + for i=101,110 do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[102] ==1 and CountCards[107] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[102]~=nil and CountCards[110]~=nil and CountCards[102] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[107]~=nil and CountCards[110]~=nil and CountCards[107] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 107 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + local singleList = {} + --find else + for k,v in pairs(CountCards) do + if (v == 1) then + singleList[#singleList+1] = k + CountCards[k] = CountCards[k] -1 + + end + end + local index = 3 + for i=1,#singleList,index do + local cs ={} + cs[#cs+1] = singleList[i] + if i < #singleList then cs[#cs+1] = singleList[i+1] end + if i < #singleList - 1 then cs[#cs+1] = singleList[i+2] end + cards_map[#cards_map + 1]=cs + end + --变成9列--这里牌多了也不会报错了 + for i=10 ,1,-1 do + for j = #cards_map , 10,-1 do + if #cards_map[i] < 3 then + cards_map[i][#cards_map[i]+1] = cards_map[j][1] + list_remove(cards_map[j],cards_map[j][1]) + end + end + end + + return cards_map + +end + +local function init(self,cardInhand,index) + self.cardList= {} + self.stack = {} + self.cardList = membe_clone(cardInhand) + table.sort(self.cardList) + if index== nil or index ==0 then + return self:tryPendulumRule2() + elseif index == 1 then + return self:tryPendulumRule() + elseif index == 2 then + return self:tryPendulumRule2() + elseif index == 3 then + return self:tryPendulumRule3() + end +end + +function M.GetHandCard(cardInhand,index) + local self = setmetatable({}, {__index = M}) + if not cardInhand or #cardInhand == 0 then + return nil + end + local HandCardList = init(self,cardInhand,index) + return HandCardList +end + + +return M + + + + + diff --git a/lua_probject/extend_project/extend/zipai/runbeard/main/ZPCardView.lua b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPCardView.lua new file mode 100644 index 00000000..2c24f342 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPCardView.lua @@ -0,0 +1,119 @@ + + +local M = { + btn_card = nil, + card_item = 0, + Hierarchy = 0, + index_X = 0, + index_Y = 0, + isUser = false, + initPos = Vector2.zero +} + + +function M.InitCardView(card_code, index_X, index_Y, type) + -- setmetatable(M, {__index = CardView}) + local self = setmetatable({}, {__index = M}) + self._room = DataManager.CurrenRoom + self.btn_card = self:InitUI(card_code, type) + self.card_item = card_code + self.index_X = index_X + self.index_Y = index_Y + self.btn_card.data = self + + self:Init() + return self, self.btn_card +end + +function M:Init() + self.card_width = 87 + self.initPos = Vector2.zero +end + +function M:InitUI(card_code, type) + local card + if type == 0 then + card = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Btn_Card") + self.icon = card:GetChild("icon") + self.icon.icon = self:getHandCardItem("ui://Main_RunBeard/201_", card_code) + self.icon:SetScale(self:getCardSize(), self:getCardSize()) + card:GetChild("n6"):SetScale(self:getCardSize(), self:getCardSize()) + elseif type == 1 then + card = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + self.icon = card:GetChild("icon") + if card_code == 0 then + self.icon = "ui://Main_RunBeard/202_1_300" + else + self.icon = self:GetCardItem("ui://Main_RunBeard/203_", card_code) + end + end + return card +end + +function M:GetCardItem(card_1, card_2) + local room = DataManager.CurrenRoom + if room.change_card_display ~= nil then + return card_1 .. room.change_card_display .. card_2 + else + return card_1 .. "2_" .. card_2 + end +end + +function M:getCardSize() + if self._room.change_card_size ~= nil then + return self._room.change_card_size + else + return 1 + end +end + +function M:getHandCardItem(card_1, card_2) + if self._room.change_card_display ~= nil then + if self._room.change_card_display == "1_" then + if self._room.change_card_size ~= nil then + self.card_width = 94 * self._room.change_card_size + else + self.card_width = 94 + end + + return card_1 .. "4_" .. card_2 + end + if self._room.change_card_size ~= nil then + self.card_width = 87 * self._room.change_card_size + else + self.card_width = 87 + end + return card_1 .. self._room.change_card_display .. card_2 + else + if self._room.change_card_size ~= nil then + self.card_width = 90 * self._room.change_card_size + else + self.card_width = 90 + end + return card_1 .. "6_" .. card_2 + end +end + +function M:UpdateKan() + self.btn_card.touchable = false + self.btn_card:GetController("Kan").selectedIndex = 1 +end + +function M:UpdateTing(isting) + self.btn_card:GetController("mark_ting").selectedIndex = isting and 1 or 0 +end + +function M:UpdateIcon() + self.icon.icon = self:getHandCardItem("ui://Main_RunBeard/201_", self.card_item) + -- self.btn_card:TweenMove(self:GetHandCardPos(self, #CountCards), 0.02) +end + +function M:UpdateScale() + local size = self._room.change_card_size + -- card_view.btn_card:GetChild("icon").icon = self:getHandCardItem("ui://Main_RunBeard/201_", card_view.card_item) + self.icon:SetScale(size, size) + self.btn_card:GetChild("n6"):SetScale(size, size) + -- self:getCardWidth() +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/runbeard/main/ZPChiView.lua b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPChiView.lua new file mode 100644 index 00000000..66b171b5 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPChiView.lua @@ -0,0 +1,131 @@ +local M = {} + +function M.InitChiView(gamectr, view, cardInfo) + local self = setmetatable({}, {__index = M}) + self._room = DataManager.CurrenRoom + self.class = "ChiView" + self._gamectr = gamectr + self._mainView = view + self._cardInfo = cardInfo + return self +end + +function M:UpdateChiView(list, tip_hu, callback, cardInfo) + self:ShowView(list, tip_hu, callback, cardInfo) +end + +function M:ShowView(tiplist, tip_hu, callback, cardInfo) + local _pop_tip_choice = UIPackage.CreateObject("Main_RunBeard", "Pop_tip_choice") + local list_choose = _pop_tip_choice:GetChild("Lst_choose") + _pop_tip_choice:GetChild("dibtn").onClick:Add(function() + _pop_tip_choice:Dispose() + end) + + -- --list 去重复的 + if #tiplist == 1 then + _pop_tip_choice:GetController("bipai").selectedIndex = 3 + end + + local tip_list = membe_deep_clone(tiplist) + for i = 1, #tiplist do + for k = 1, #tip_list do + if tip_list[k].weight ~= 4 and tiplist[i].id ~= tip_list[k].id then + if tiplist[i].OpCard[1] == tip_list[k].OpCard[1] and tiplist[i].OpCard[2] == tip_list[k].OpCard[2] then + tip_list[i].weight = 4 + end + end + end + end + + list_choose:RemoveChildrenToPool() + for i = 1, #tip_list do + if tip_list[i].weight ~=4 then + local item_choose = list_choose:AddItemFromPool() + self:SetIcon(item_choose, 2, tip_list[i].OpCard[1]) + self:SetIcon(item_choose, 3, tip_list[i].OpCard[2]) + self:SetIcon(item_choose, 1, tip_list[i].card) + + item_choose.onClick:Add(function() + for k=1,list_choose.numChildren do + list_choose:GetChildAt(k-1):GetController("zhong") .selectedIndex = 0 + end + item_choose:GetController("zhong").selectedIndex = 1 + if tip_list[i].bi_list ==nil then + callback(tip_list[i].id) + self:CloseTip() + else + self.bilist={} + self._chiid = tip_list[i].id + self:CheckRatioCard(tip_list[i].bi_list,1,tip_list[i].card) + + end + end) + end + end + list_choose:ResizeToFit(#tip_list) + _pop_tip_choice:GetChild("di1").width = list_choose.width+110 + _pop_tip_choice.xy = Vector2((self._mainView.width - _pop_tip_choice.width)/2, -100) + self._mainView:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice + end + --比牌显示 + function M:CheckRatioCard(_tiplist,index,chicard,_biid) + if _biid ~=nil then + self.bilist={} + self.bilist[#self.bilist+1] = _biid + end + self._pop_tip_choice:GetController("bipai").selectedIndex = index + local Bilist_choose = self._pop_tip_choice:GetChild("Bi_Lst_choose"..index) + Bilist_choose:RemoveChildrenToPool() + for i = 1, #_tiplist do + local item = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Comp_choose") + local item_choose = Bilist_choose:AddChild(item) + self:SetIcon(item_choose, 2, _tiplist[i].opcard[1]) + self:SetIcon(item_choose, 3, _tiplist[i].opcard[2]) + self:SetIcon(item_choose, 1, chicard) + item_choose:GetController("zhong") .selectedIndex = 0 + item_choose.onClick:Add(function() + for k=1,Bilist_choose.numChildren do + Bilist_choose:GetChildAt(k-1):GetController("zhong") .selectedIndex = 0 + end + item_choose:GetController("zhong") .selectedIndex = 1 + if _tiplist[i].bi_list ==nil then + if tip_hu then + local guo_msg = MsgWindow.new(self._root_view, "确定取消胡吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + self.bilist[#self.bilist+1] = i-1 + self._gamectr:SendAction(self._chiid,self.bilist) + guo_msg:Close() + self:CloseTip() + self._cardInfo:UpdateIsOnClick(false) + end) + guo_msg:Show() + else + self.bilist[#self.bilist+1] = i-1 + self._gamectr:SendAction(self._chiid,self.bilist) + self:CloseTip() + self._cardInfo:UpdateIsOnClick(false) + end + else + self:CheckRatioCard(_tiplist[i].bi_list,2,chicard,i-1) + end + end) + end + Bilist_choose:ResizeToFit(#_tiplist) + self._pop_tip_choice:GetChild("di"..index+1).width = Bilist_choose.width+110 + + end + + +function M:SetIcon(item, index, card) + item:GetChild("card" .. index).icon = UIPackage.GetItemURL("Main_RunBeard", CommonFun:GetCardItem("201_", card)) +end + +function M:CloseTip() + if (self._pop_tip_choice) then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/runbeard/main/ZPFzCardView.lua b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPFzCardView.lua new file mode 100644 index 00000000..13c794e0 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPFzCardView.lua @@ -0,0 +1,182 @@ +local M = {} + +local source_fz_03 = "ui://Main_RunBeard/Fz_0_3" +local source_fz_04 = "ui://Main_RunBeard/Fz_0_4" +local source_card = "ui://Main_RunBeard/202_" + +function M:getCardItem(card_1, card_2) + local room = DataManager.CurrenRoom + if room.change_card_display ~= nil then + return card_1 .. room.change_card_display .. card_2 + else + return card_1 .. "6_" .. card_2 + end +end + +function M.InitFzView(fz,isMy,isplay,index,count) + printlog("jefe InitFzView>>>") + local self = setmetatable({}, {__index = M}) + local item,fzcards + if fz.type ~= RB_FZType.Kan then + item = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Component1")--Extend_Poker_AHRunBeard + item:RemoveChildren(0, -1, true) + end + + -- local fzItem + if fz.type == RB_FZType.Bi or fz.type == RB_FZType.Chi then + fzcards = self:UpateChiBi(item,fz) + elseif fz.type == RB_FZType.Peng then + fzcards = self:UpdatePeng(item,fz) + elseif fz.type == RB_FZType.Wei or fz.type == RB_FZType.ChouWei then + fzcards = self:UpdateWei(item,fz,isMy) + elseif fz.type == RB_FZType.Ti then + fzcards = self:UpateTi(item,fz) + elseif fz.type == RB_FZType.Pao then + fzcards = self:UpatePao(item,fz) + end + + if item ~= nil and fzcards ~= nil then + self:PlayEffect(item,fzcards,isplay,index,count) + end + + return item,fzcards +end + +function M:UpateChiBi(item,fz) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_03) + local cardId1,cardId2,cardId3 + if #fz.opcard == 2 then + cardId1 = fz.card + cardId2 = fz.opcard[1] + cardId3 = fz.opcard[2] + else + cardId1 = fz.opcard[1] + cardId2 = fz.opcard[2] + cardId3 = fz.opcard[3] + end + fzcards:GetChild("card_" .. 1).icon = self:getCardItem(source_card, cardId1) + fzcards:GetController("c2").selectedIndex = 1 + fzcards:GetChild("card_" .. 2).icon = self:getCardItem(source_card, cardId2) + -- local card = fz.opcard[2] == nil and fz.opcard[1] or fz.opcard[2] + fzcards:GetChild("card_" .. 3).icon = self:getCardItem(source_card, cardId3) + fzcards.x, fzcards.y = 0, 0 + item:AddChildAt(fzcards, 0) + return fzcards +end + +function M:UpdatePeng(item,fz) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_03) + for j = 1, 3 do + fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1]) + end + fzcards.x, fzcards.y = 0, 0 + item:AddChildAt(fzcards, 0) + return fzcards +end + +function M:UpdateWei(item,fz,isMy) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_03) + --fzcards:GetController("c1").selectedIndex=1 + local room = DataManager.CurrenRoom + for j = 1, 3 do + if room.room_config.mingwei or fz.type==RB_FZType.ChouWei or isMy then + if j == 3 then + fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1]) + else + fzcards:GetChild("card_" .. j).icon = "ui://Main_RunBeard/202_1_300" + end + else + --未勾选明偎 + -- if isMy then + -- fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1]) + -- fzcards:GetController("c1").selectedIndex = 1 + -- else + fzcards:GetChild("card_" .. j).icon = "ui://Main_RunBeard/202_1_300" + -- end + end + + end + fzcards.x, fzcards.y = 0, 0 + item:AddChildAt(fzcards,0) + return fzcards +end + +function M:UpateTi(item, fz,icon) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_04) + for i = 1, 4 do + if i == 4 and fz.type == RB_FZType.Ti then + fzcards:GetChild("card_" .. i).icon = self:getCardItem(source_card, fz.card) + else + fzcards:GetChild("card_" .. i).icon = "ui://Main_RunBeard/202_1_300" + end + end + fzcards.x, fzcards.y = 0, 0 + -- item:AddChildAt(fzcards,0) + return fzcards +end + +function M:UpatePao(item, fz,icon) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_04) + for i = 1, 4 do + fzcards:GetChild("card_" .. i).icon = self:getCardItem(source_card, fz.opcard[1]) + end + fzcards.x, fzcards.y = 0, 0 + return fzcards +end + +function M:PlayEffect(fzitem,fzcards,isplay,index,count) + if (isplay == nil) then + isplay = false + end + if (isplay and index == count) then + local faArray = fzitem:GetChild("chiwei") + if (faArray ~= nil) then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end +end + +function M:PlayEffectOther(fzitem,fzcards, size,i,isplay,seat) + isplay = isplay == nil and false or isplay + local isAddlast = false + + local room = DataManager.CurrenRoom + if isplay and i== size then + local faArray = fzitem:GetChild("chiwei") + if room.room_config.people_num == 3 then + if (room.self_player.seat == 1) then + if (seat == 2) then + faArray = fzitem:GetChild("chiwei1") + else + faArray = fzitem:GetChild("chiwei") + end + elseif (room.self_player.seat == 2) then + if (seat == 3) then + faArray = fzitem:GetChild("chiwei1") + else + faArray = fzitem:GetChild("chiwei") + end + elseif (room.self_player.seat == 3) then + if (seat == 1) then + faArray = fzitem:GetChild("chiwei1") + else + faArray = fzitem:GetChild("chiwei") + end + end + end + + if (faArray ~= nil) then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/runbeard/main/ZPGameController.lua b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPGameController.lua new file mode 100644 index 00000000..ab5e5a19 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPGameController.lua @@ -0,0 +1,10 @@ + +local M = {} + +setmetatable(M,{__index = GameController}) + +function M:init(name) + GameController.init(self,name) +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/runbeard/main/ZPGameEvent.lua b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPGameEvent.lua new file mode 100644 index 00000000..1cacd2ec --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPGameEvent.lua @@ -0,0 +1,23 @@ +local ZPGameEvent = { + -- 发牌 + SendCards = 'SendCards', + --发最后一张牌 + AddCard = 'AddCard', + -- 胡牌 + ZPHuCard = 'ZPHuCard', + -- 结算事件 + ZPResult1 = 'ZPResult1', + -- 大结算事件 + ZPResult2 = 'ZPResult2', + -- 转盘指向事件 + EventTurn = 'EventTurn', + OutHint = 'OutHint', --出牌tips + GetCard = 'GetCard', --摸牌 + OutCard = 'OutCard', --出牌 + FangziAction = 'FangziAction', --吃碰等操作事件 + FZTips = 'FZTips', --放子提示 + QiCard = 'QiCard', --弃牌 + FangWei = 'FangWei' +} + +return ZPGameEvent diff --git a/lua_probject/extend_project/extend/zipai/runbeard/main/ZPMainView.lua b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPMainView.lua new file mode 100644 index 00000000..63c81958 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPMainView.lua @@ -0,0 +1,403 @@ +local PlayerSelfCardInfoView = import('.ZPPlayerSelfCardInfoView') +local PlayerCardInfoView = import('.ZPPlayerCardInfoView') +local ZPSettingView = import('.ZPSettingView') +local ZPTableBG = import('.ZPTableBG') +local HuTipView = import('.HuTipView') +local ZPGameEvent = import('.ZPGameEvent') +local M = { + default_btn = false +} + +setmetatable(M, {__index = MainView}) + +local default_bg = 1 + +function M:InitView(url, isdisplay, open_social, change_card_size, qihu) + UIPackage.AddPackage('base/main_zipai/ui/Main_RunBeard') + MainView.InitView(self, url) + self._full_offset = false + --显示背景 + ZPTableBG.LoadTableBG(default_bg, self._room.game_id, self._root_view) + self.qihu = qihu + if qihu ~= nil then + local id = ZPTableBG.GetTableBG(self._room.game_id) + if id > 3 or id <= 0 then + id = 1 + end + if self._room.score_times ~= nil and self._room.score_times > 0 then + self._view:GetChild('di_text').text = + self._room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起 ' .. self._room.score_times .. '倍' + else + self._view:GetChild('di_text').text = self._room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起' + end + + self._view:GetController('bg_state').selectedIndex = id - 1 + end + self.cd_time = 0 + self.default_btn = open_social + if isdisplay == nil then + isdisplay = false + end + local tex_round = self._view:GetChild('tex_round') + self._tex_leftTime = self._view:GetChild('time') + local remaining_card = self._view:GetChild('remaining_card') + self._tex_LeftCard = self._view:GetChild('remaining_card') + self._rightPanelView._opt = 2 + self._rightPanelView:__UpdateTime() + local rightpanel = self._view:GetChild('right_panel') + if (rightpanel ~= nil) then + self.tex_gametype = rightpanel:GetChild('tex_gametype') + if (self.tex_gametype ~= nil) then + self.tex_gametype.text = self._room.room_config:GetGameName() + end + end + self._player_card_info = {} + local _room = self._room + self._hu_tip = HuTipView.new(self) + --加载上次游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id) + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + + local _gamectr = self._gamectr + _gamectr:SendChangeTypeFace(typeface) + if typeface == 1 then + if isdisplay then + self._room.change_card_display = '7_' + else + self._room.change_card_display = '2_' + end + elseif typeface == 2 then + self._room.change_card_display = '1_' + elseif typeface == 3 then + self._room.change_card_display = '3_' + elseif typeface == 4 then + self._room.change_card_display = '8_' + end + end + -- self._view.fairyBatching = true + --加载上次游戏的手牌大小 + + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. 'cardsize_new') + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_cardsize'] + local _gamectr = self._gamectr + if typeface == 0 then + self._room.change_card_size = 1.2 + elseif typeface == 1 then + self._room.change_card_size = 1 + elseif typeface == 2 then + self._room.change_card_size = 0.8 + end + else + self._room.change_card_size = change_card_size + end + + --加载上次游戏的接收语音 + if self.default_btn then + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. 'yuyin') + local json_data1 = Utils.LoadLocalFile(user_id .. _room.game_id .. 'chupai') + local json_data2 = Utils.LoadLocalFile(user_id .. _room.game_id .. 'fangyan') + self._room.yuyin_typeface = 1 + self._room.chupai_typeface = 1 + self._room.fangyan_typeface = 1 + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + self._room.yuyin_typeface = typeface + self:SetInteractEnabled(typeface == 1 and 0 or 1) + end + if json_data1 ~= nil then + local _data = json.decode(json_data1) + local typeface = _data['game_typeface'] + self._room.chupai_typeface = typeface + end + if json_data2 ~= nil then + local _data = json.decode(json_data2) + local typeface = _data['game_typeface'] + self._room.fangyan_typeface = typeface + end + end + + local _player_card_info = self._player_card_info + for i = 1, _room.room_config.people_num do + local tem = self._view:GetChild('player_card_info' .. i) + _player_card_info[i] = self:NewPlayerCardInfoView(tem, i) + end + + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = _player_card_info[self:GetPos(p.seat)] + info:SetPlayer(p) + info:FillData() + end + + self._rightPanelView.ctr_log.selectedIndex = 0 + local list = _room.player_list + local readyNum = 0 + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + if p.ready then + readyNum = readyNum + 1 + end + end + if (_room.curren_round > 0) then + self._rightPanelView.ctr_log.selectedIndex = 0 + end + + self._ctr_action = self._view:GetController('action') + if _room.banker_seat == _room.self_player.seat and readyNum > 1 and readyNum == _room.room_config.people_num then + elseif not _room.self_player.ready then + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig then + if round>1 then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 2 + end + + else + self._ctr_action.selectedIndex = 1 + end + + + else + self._ctr_action.selectedIndex = 0 + end + + self:ResetHandCard() + self:showBackBtnView() + self:InitXiPai() + self:InitXiPai1() +end + +function M:InitXiPai() + self._xipaiPanel = UIPackage.CreateObjectFromURL("ui://Common/panel_handzipai02") + self._root_view:AddChild(self._xipaiPanel) + + local offset = get_offset(self._full_offset) + + self._xipaiPanel.width = GRoot.inst.width - (offset * 2) + self._xipaiPanel.height = GRoot.inst.height + self._xipaiPanel.x = offset + + self._xipaiPanel.visible=false + --self:PlayXiPai() +end + +function M:PlayXiPai(xipaiCallBack) + if self._xipaiPanel then + coroutine.start(function() + self._xipaiPanel.visible=true + self._xipaiPanel:GetTransition("XiPai"):Play() + coroutine.wait(3.5) + self._xipaiPanel.visible=false + if xipaiCallBack then + xipaiCallBack() + end + end) + + + end +end + +function M:InitXiPai1() + self._xipaiPanel1 = UIPackage.CreateObjectFromURL("ui://Common/panel_handzipai03") + self._root_view:AddChild(self._xipaiPanel1) + + local offset = get_offset(self._full_offset) + + self._xipaiPanel1.width = GRoot.inst.width - (offset * 2) + self._xipaiPanel1.height = GRoot.inst.height + self._xipaiPanel1.x = offset + + self._xipaiPanel1.visible=false + --self:PlayXiPai() +end + +function M:PlayXiPai1(xipaiCallBack) + if self._xipaiPanel1 then + coroutine.start(function() + self._xipaiPanel1.visible=true + self._xipaiPanel1:GetTransition("XiPai"):Play() + coroutine.wait(3.5) + self._xipaiPanel1.visible=false + if xipaiCallBack then + xipaiCallBack() + end + end) + + + end +end + + +function M:NewSettingView(cardIndex) + local settingView = ZPSettingView.new(self._view, 2, self.default_btn,cardIndex) + settingView:FillBgSection( + function(url) + LoadGameBg(url, self._root_view) + end, + self._room.game_id, + default_bg, + self._room, + self.qihu + ) + return settingView +end + +function M:EventInit() + MainView.EventInit(self) +end + +function M:NewPlayerCardInfoView(view, index) + if index == 1 then + return PlayerSelfCardInfoView.new(view, self) + end + return PlayerCardInfoView.new(view, self) +end + +-- 设置 更新 手牌字体 三套 +function M:UpdateCardDisplay(index) + local _gamectr = self._gamectr + _gamectr:SendChangeTypeFace(index) + if index == 1 then + self._room.change_card_display = '2_' + elseif index == 2 then + self._room.change_card_display = '1_' + elseif index == 3 then + self._room.change_card_display = '3_' + elseif index == 4 then + self._room.change_card_display = '8_' + end + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + if p.DiceCard ~= nil and p.DiceCard ~= 0 then + info:UpdateOutCardList(p.DiceCard) + end + if p.outcard_list ~= nil and #p.outcard_list > 0 then + info:UpdateQiPai(p.outcard_list) + end + if p.fz_list ~= nil and #p.fz_list > 0 then + info:UpdateFzList(p.fz_list) + end + if p.seat == self._room.self_player.seat then + info:UpdateCardDisplay() + end + end +end + +-- 设置 更新 手牌大小 +function M:UpdateCardSize(index) + if index == 0 then + self._room.change_card_size = 1.2 + elseif index == 1 then + self._room.change_card_size = 1 + elseif index == 2 then + self._room.change_card_size = 0.8 + end + local info = self._player_card_info[1] + info:UpdateCardSize() +end + +-- 设置 更新 方言 +function M:UpdateFangyan(index) + self._room.fangyan_typeface = index +end +--刷新手牌排列 按钮 三种 排列方法 在 PendulumRule 里 +function M:ResetHandCard(...) + local btn_reset = self._view:GetChild('btn_reset') + --btn_reset.visible=false + btn_reset.onClick:Set( + function(...) + if self._popEvent == false then + return + end + --加载上次的 + local index = 1 + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. 'ResetHandCard') + if json_data ~= nil then + local _data = json.decode(json_data) + index = _data['index'] + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['ResetHandCard'] = true + if index == 1 then + _data['index'] = 2 + elseif index == 2 then + _data['index'] = 3 + elseif index == 3 then + _data['index'] = 1 + end + local key = user_id .. 'ResetHandCard' + Utils.SaveLocalFile(key, json.encode(_data)) + local x = _data['index'] + local card_info = self._player_card_info[1] + --printlog("1111111111111111111111111",x) + card_info:InitHandCard(false, x) + end + ) +end + +function M:showBackBtnView() + local btn_back_lobby = self._view:GetChild('btn_back_lobby') + local btn_jiesan_lobby1 = self._view:GetChild('Btn_jiesan_lobby') + --btn_jiesan_lobby1.displayObject.gameObject:SetActive(false) + --btn_jiesan_lobby1:GetChild("n8").displayObject.gameObject:SetActive(false) + if (btn_jiesan_lobby1 ~= nil) then + btn_jiesan_lobby1.onClick:Set( + function() + if (self.cd_time > 0) then + ViewUtil.ErrorTip(nil, '您还处于解散冷却时间当中,请稍后再试') + else + self.cd_time = 30 + self._gamectr:AskDismissRoom( + function(res) + ViewUtil.ErrorTip(res.ReturnCode, '') + end + ) + self:onDisBandTimer() + end + end + ) + end +end + +--解散计时器 +function M:onDisBandTimer() + if self.cd_coroutine ~= nil then + coroutine.stop(self.cd_coroutine) + end + self.cd_coroutine = + coroutine.start( + function() + while (self.cd_time > 0) do + self.cd_time = self.cd_time - 1 + self.cd_time = math.max(0, self.cd_time) + if self.cd_time > 0 then + coroutine.wait(1) + end + end + end + ) +end + +function M:Destroy() + UIPackage.RemovePackage('base/main_zipai/ui/Main_RunBeard') + MainView.Destroy(self) +end +return M diff --git a/lua_probject/extend_project/extend/zipai/runbeard/main/ZPPlayBackView.lua b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPPlayBackView.lua new file mode 100644 index 00000000..5633fd43 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPPlayBackView.lua @@ -0,0 +1,13 @@ +local ZPTableBG = import('.ZPTableBG') + +local M = {} + +setmetatable(M, {__index = PlayBackView}) + +function M:InitView(url) + PlayBackView.InitView(self, url) + local _view = self._view + ZPTableBG.LoadTableBG(1, self._room.game_id, self._root_view) +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/runbeard/main/ZPPlayer.lua b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPPlayer.lua new file mode 100644 index 00000000..fe112fd2 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPPlayer.lua @@ -0,0 +1,37 @@ + + +local EXPlayer ={ + -- 手牌列表 + card_list = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil, + hu_xi =0 +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 + self.hu_xi =0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/runbeard/main/ZPPlayerCardInfoView.lua b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPPlayerCardInfoView.lua new file mode 100644 index 00000000..dfab2634 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPPlayerCardInfoView.lua @@ -0,0 +1,476 @@ +local PendulumRule = import('.PendulumRule') +AreaOderType = { + left_right = "left_right", + right_left = "right_left", + up_down = "up_down", + down_up = "down_up" +} + +local PlayerCardInfoView = { + _view = nil, + _mainView = nil, + + _mask_liangpai = nil, + _area_outcard_list = nil, + _area_handcard_list = nil, + + +} +local function NewCardView(card,cardItem,index_X,index_Y) + local self = {} + setmetatable(self,{__index = CardView}) + self.btn_card = card + self.card_item = cardItem + self.index_X = index_X + self.index_Y = index_Y + return self +end + + +local M = PlayerCardInfoView + +function M.new(view,mainView) + local self = {} + setmetatable(self, {__index = M}) + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:init() + + local view = self._view + self._room = DataManager.CurrenRoom + self._area_outcard_list = view:GetChild("area_outcard_list") + self._area_handcard_list = view:GetChild("area_handcard_list") + self._area_fz_list = view:GetChild("area_fz_list") + self._area_qipai_list = view:GetChild("windcard_list") + self._mask_liangpai = view:GetChild("mask_liangpai") + UIPackage.AddPackage("base/main_zipai/ui/Main_RunBeard") +end + +function M:SetPlayer(p) + self._player = p +end + +function M:FillData(begin) + +end + +function M:Clear() + self._area_outcard_list:RemoveChildren(0, -1, true) + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_qipai_list:RemoveChildren(0, -1, true) + self._mask_liangpai:RemoveChildren(0, -1, true) +end + + +function M:fillCard(obj,card_type,card) + +end + + +function M:ClearOutCard() + self._area_outcard_list:RemoveChildren(0, -1, true) + +end + +--弃牌 +function M:UpdateQiPai( qi_list) + self._area_qipai_list:RemoveChildren(0,-1,true) + for i=1,#qi_list do + local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + qicards:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",qi_list[i]) + self._area_qipai_list:AddChild(qicards) + end + +end + + --放字 +function M:UpdateFzList( fz_list ) + printlog("jefe UpdateFzList=======") + pt(fz_list) + self._area_fz_list:RemoveChildren(0,-1,true) + for i = 1,#fz_list do + local fzitem = nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Component1") + fzitem:RemoveChildren(0,-1,true) + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetController("c2").selectedIndex =1 + fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].active_card) + fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[1]) + fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[2]) + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Peng then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Wei then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Pao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Ti then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + if j==4 then + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + else + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + end + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + end + end +end + +--回放手牌 +function M:InitHandCard(handcard) + self._area_handcard_list:RemoveChildren(0,-1,true) + local pokerList =PendulumRule.GetHandCard(handcard) --self:PendulumRule(handcard) + self.card_lists ={} + for i =1,#pokerList do + for j =1,#pokerList[i] do + local card_code = pokerList[i][j] + local btn_card =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",card_code) + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card,5-j) + local card_view = NewCardView(btn_card,card_code,i,j) + self.card_lists[#self.card_lists+1] = card_view + end + end + for j=#self.card_lists,1,-1 do + local card_view = self.card_lists[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view,#pokerList) + end + + if self._player.fz_list~=nil then + for i=1,#self._player.fz_list do + if self._player.fz_list[i].type == RB_FZType.Kan then + self:UpdateKan(self._player.fz_list[i].card) + end + end + end +end + + + +function M:UpdateHandCards( list ) + self.card_lists = {} + self._area_handcard_list:RemoveChildren(0,-1,true) + local CountCards = {} + for i=1,#list do + CountCards[list[i].index_X]=CountCards[list[i].index_X] == nil and 1 or CountCards[list[i].index_X] + 1 + end + for i=1,#list do + local card_code = list[i].card_item + local btn_card =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",card_code) + local card_view = NewCardView(btn_card,card_code,list[i].index_X,list[i].index_Y) + --存牌堆 + self.card_lists[#self.card_lists+1] =card_view + end + for j=#self.card_lists,1,-1 do + local card_view = self.card_lists[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view,#CountCards) + end + +end + +--牌位置 +function M:GetHandCardPos(cards_view,cards) + local x,y = 0,0 + local card_width = 42 -- 牌的宽度 + local middle_x = self._area_handcard_list.width / 2 + local start_x = middle_x - (cards / 2 * (card_width)) + x = start_x + (card_width) * (cards_view.index_X - 1) + y = 0 - (42*cards_view.index_Y) + return Vector2.New(x,y) +end + + + +function M:UpdateOutCardList(outcard) + + self._area_outcard_list:RemoveChildren(0,-1,true) + local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + if outcard==0 then + outcards:GetChild("icon").icon ="ui://Main_RunBeard/201_1_300" + else + outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/203_",outcard) + end + outcards.x,outcards.y = 0,0 + self._area_outcard_list:AddChild(outcards) +end + +--摸牌动画 +function M:PlayingOutCardAnima(card) + if(self._area_outcard_list ~=nil and self._area_outcard_list.numChildren>0)then + self._area_outcard_list:GetChildAt(0):GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/202_",card) + self._view:GetTransition("t0"):Play() + end + coroutine.start(function() + coroutine.wait(0.1) + self:ClearOutCard() + end) + -- +end + + +--摆牌规则 +function M:PendulumRule(handcard) + local room = DataManager.CurrenRoom + local card_list = handcard + local card_count = #card_list + local cards_map = {} + local CountCards = {} + for i=1,#card_list do + CountCards[card_list[i]]= CountCards[card_list[i]] == nil and 1 or CountCards[card_list[i]] + 1 + end + --find4 + for k,v in pairs(CountCards) do + if (v == 4) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + --find AAa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] >= 2 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-3 + end + end + end + --find aaA + for i = 101, 110 do + if CountCards[i]~=nil and (CountCards[i] >= 2) then + if CountCards[i + 100]~=nil and (CountCards[i + 100] == 1) then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i+100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i +100] = CountCards[i +100] - 1 + card_count = card_count-3 + end + end + end + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + --find 小 2 7 10 + local counta = CountCards[102] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[110]~=nil and CountCards[102] >0 and CountCards[107] >0 and CountCards[110] >0 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cs[3]= 110 + cards_map[#cards_map+1] = cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 3 + end + end + end + + --find 大 2 7 10 + local countA = CountCards[202] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[210]~=nil and CountCards[202] >0 and CountCards[207] >0 and CountCards[210] >0 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cs[3]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 3 + end + end + end + + --find abc + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and (CountCards[i] > 0 and CountCards[i + 1] > 0 and CountCards[i + 2] > 0) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + --find ABC + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and (CountCards[i] > 0 and CountCards[i + 1] > 0 and CountCards[i + 2] > 0) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + --find Aa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] == 1 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 1; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-2 + end + end + end + + local r_count = 9 - #cards_map + local merge = false + merge = r_count0 then + for i=1,#tempNotPutList do + self:UpdateKan(tempNotPutList[i]) + end + end +end + +--手牌 +function M:InitHandCard(isPlayAni, index) + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + self.outcard_button = nil + + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + self.cor_init_poker = nil + local _room = DataManager.CurrenRoom + --得到排序好的 list + local pokerList = PendulumRule.GetHandCard(_room.self_player.handcard_list, index) + if pokerList == nil or #pokerList == 0 then + return + end + self.cards_count = #pokerList + self.card_list = {} + self._area_handcard_list:RemoveChildren(0, -1, true) + --开始发牌动画 + if isPlayAni == true then + self.cor_init_poker = + coroutine.start( + function() + self._mainView._popEvent = false + if self._mainView._rightPanelView._settingView ~= nil then + self._mainView._rightPanelView._settingView:SetBtnUpdateCardEnable(false) + end + for i = 1, #pokerList do + local pokerListNum = 0 + for j = 1, #pokerList[i] do + local card_code = pokerList[i][j] + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 95 * self:getCardSize() + self.card_hight = 123 * self:getCardSize() + local x, y = 500, (j * 85) - 500 + btn_card:SetXY(x, y) + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card, 5 - j) + local card_view = NewCardView(btn_card, card_code, i, j) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + btn_card.data = card_view + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + end + for j = #self.card_list, 1, -1 do + coroutine.wait(0.005) + if pokerListNum == #pokerList[i] then + break + end + pokerListNum = pokerListNum + 1 + local card_view = self.card_list[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, self.cards_count), 0.08) + end + end + self:UpdateHandCardsPos() + self._mainView._popEvent = true + self:UpdateIsOnClick(true) + if self._mainView._rightPanelView._settingView ~= nil then + coroutine.start( + function() + coroutine.wait(1) + self._mainView._rightPanelView._settingView:SetBtnUpdateCardEnable(true) + end + ) + end + end + ) + else + --没有发牌动画 + for i = 1, #pokerList do + for j = 1, #pokerList[i] do + local card_code = pokerList[i][j] + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 95 * self:getCardSize() + self.card_hight = 123 * self:getCardSize() + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card, 5 - j) + local card_view = NewCardView(btn_card, card_code, i, j) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + btn_card.data = card_view + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + end + --存牌堆 + for j = 1, #self.card_list do + local card_view = self.card_list[j] + card_view.btn_card.xy = self:GetHandCardPos(card_view, self.cards_count) + end + end + if self._player.fz_list ~= nil then + for i = 1, #self._player.fz_list do + if self._player.fz_list[i].type == RB_FZType.Kan then + self:UpdateKan(self._player.fz_list[i].card) + end + end + end + self:UpdateHandCardsPos() + end + + self:SetNotPutCard() +end +--更新手牌 +function M:UpdateHandCards(list) + self.card_list = {} + self._area_handcard_list:RemoveChildren(0, -1, true) + + self.outcard_button = nil + + local CountCards = {} + for i = 1, #list do + CountCards[list[i].index_X] = CountCards[list[i].index_X] == nil and 1 or CountCards[list[i].index_X] + 1 + end + for i = 1, #list do + local card_code = list[i].card_item + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 87 * self:getCardSize() + self.card_hight = 110 * self:getCardSize() + local card_view = NewCardView(btn_card, card_code, list[i].index_X, list[i].index_Y) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + btn_card.data = card_view + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + end + for j = #self.card_list, 1, -1 do + local card_view = self.card_list[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view, #CountCards) + end + if self._player.fz_list ~= nil then + for i = 1, #self._player.fz_list do + if self._player.fz_list[i].type == RB_FZType.Kan then + self:UpdateKan(self._player.fz_list[i].card) + end + end + end + self:SetNotPutCard() +end + +-- -- +function M:onTouchBegin(context) + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + local button = context.sender + local card = button.data + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self:ShowHuTip(card.card_item) + end + card.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/203_', card.card_item) + -- card.btn_card.sortingOrder = 100 + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + card.btn_card.xy = Vector2.New(card.btn_card.x + 20, card.btn_card.y - 50) + card.touch_pos = xy - button.xy +end + +function M:onTouchMove(context) + local button = context.sender + local card = button.data + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + button.xy = xy - card.touch_pos +end + +--出牌提示动画 +function M:ChuPaiTiShi() + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self._view:GetController('chupai').selectedIndex = 1 + else + self._view:GetController('chupai').selectedIndex = 0 + end +end +-- 删手牌 +function M:DeleteHandCard(carditem) + local card = nil + if self.outcard_button ~= nil and carditem == self.outcard_button.card_item then + list_remove(self.card_list, self.outcard_button) + self._area_handcard_list:RemoveChild(self.outcard_button.btn_card, true) + + card = self.outcard_button + self.outcard_button = nil + else + for i = 1, #self.card_list do + local card_view = self.card_list[i] + if carditem == card_view.card_item then + card_view.btn_card.touchable = false + list_remove(self.card_list, card_view) + card = card_view + --card_view.btn_card:RemoveFromParent() + self._area_handcard_list:RemoveChild(card_view.btn_card, true) + break + end + end + end + if card ~= nil then + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + end + end + self:UpdateHandCardsPos() +end +--更新手牌的坎 +function M:UpdateKan(card) + for i = 1, #self.card_list do + local card_view = self.card_list[i] + if card_view.card_item == card then + --card_view.btn_card.touchable = false + card_view.btn_card:GetController('Kan').selectedIndex = 1 + end + end +end + +-- 手牌更新位置方法 self.card_list 里面的对象 NewCardView,index_X index_Y 就是xy序号 +function M:UpdateHandCardsPos() + --得到有 多少列 + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.old_postion = self:GetHandCardPos(card_view, #CountCards) + card_view.btn_card:TweenMove(card_view.old_postion, 0.3) + end + self:ShowHuTip() +end + +--刷新手牌字体 +function M:UpdateCardDisplay() + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + card_view.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_view.card_item) + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, #CountCards), 0.3) + end +end +--更新手牌大小 +function M:UpdateCardSize() + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + card_view.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_view.card_item) + card_view.btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + card_view.btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 87 * self:getCardSize() + self.card_hight = 110 * self:getCardSize() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, #CountCards), 0.3) + end +end + +function M:UpdateIsOnClick(isOut) + self._view.touchable = isOut +end + +-- 结束 拖拽事件 +-- 根据牌结束点的位置 判断是出牌还是调整位置 button.xy 和 牌的xy比较 +function M:__OnDragEnd(context) + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + if self.outcard_button then + self.outcard_button = nil + end + local button = context.sender + local card = button.data + -- card.btn_card.sortingOrder = 0 + local _room = DataManager.CurrenRoom + + if (button.y < -320 and _room ~= nil and _room.curren_outcard_seat == _room.self_player.seat) then + button.touchable = false + self.outcard_button = card + self:UpdateIsOnClick(false) + self._mainView:OutCard(card.card_item) + else + local isChangeCard = false + self.outcard_button = nil + card.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card.card_item) + self._area_handcard_list:AddChild(button) + if #self.card_list == 1 then + isChangeCard = false + self:UpdateHandCardsPos() + return + end + local CountCards = {} + for i = 1, #self.card_list do + local lists = {} + if CountCards[self.card_list[i].index_X] == nil then + lists[#lists + 1] = self.card_list[i] + CountCards[self.card_list[i].index_X] = lists + else + CountCards[self.card_list[i].index_X][#CountCards[self.card_list[i].index_X] + 1] = self.card_list[i] + end + end + local minmark = 1 + local maxmark = #self.card_list + if card == self.card_list[1] or card == self.card_list[#self.card_list] then + if self.card_list[1].index_X == self.card_list[2].index_X then + minmark = 2 + end + if self.card_list[#self.card_list].index_X == self.card_list[#self.card_list - 1].index_X then + maxmark = #self.card_list - 1 + end + end + --位置x小于第一张牌 放第一排 + if button.x + button.width / 2 < self.card_list[minmark].btn_card.x and #CountCards < 10 then + --位置大于最后一张牌 放最后一排 + list_remove(self.card_list, card) + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X < card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + else + for i = 1, #self.card_list do + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + card.index_X = 1 + card.index_Y = 1 + table.insert(self.card_list, 1, card) + isChangeCard = true + elseif button.x + button.width / 2 > (self.card_list[maxmark].btn_card.x + button.width) and #CountCards < 10 then + list_remove(self.card_list, card) + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + end + card.index_X = self.card_list[#self.card_list].index_X + 1 + card.index_Y = 1 + self.card_list[#self.card_list + 1] = card + isChangeCard = true + else + --放已有的牌堆上 判断放第几列 + local MoveCard = false + local MoveCardPos = 0 + local MoveCardY = 0 + for i = 1, #CountCards do + local card_view = CountCards[i][1] + if card_view ~= nil then + if + button.x + button.width / 2 > card_view.old_postion.x and + button.x + button.width / 2 < (card_view.old_postion.x + button.width) + then + if card ~= card_view and #CountCards[i] < 4 and card.index_X ~= card_view.index_X then + MoveCardPos = i + MoveCardY = #CountCards[i] + 1 + MoveCard = true + list_remove(self.card_list, card) + end + end + end + end + local MoveCardindex = 0 + -- local MoveCardY = 0 + if + button.x + button.width / 2 > card.old_postion.x and + button.x + button.width / 2 < (card.old_postion.x + button.width) + then + if #CountCards[card.index_X] > 1 then + for i = 1, #CountCards[card.index_X] do + local _cv = CountCards[card.index_X][i] + if _cv ~= card then + if + button.y + button.height / 2 > _cv.btn_card.y and + button.y + button.height / 2 < (_cv.btn_card.y + button.height) + then + --向下移動 + if ((button.y + button.height / 2) + 20) > (card.old_postion.y + button.height) then + --向上移動 + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + elseif ((button.y + button.height / 2) - 20) < card.old_postion.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + end + elseif i == #CountCards[card.index_X] and button.y + button.height / 2 < _cv.btn_card.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + elseif i == 1 and button.y + button.height / 2 > (_cv.btn_card.y + button.width) then + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + end + end + end + end + end + if MoveCard == true and MoveCardindex == 0 then + --上下移动 + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + if MoveCardPos > card.index_X then + MoveCardPos = MoveCardPos - 1 + end + end + card.index_X = MoveCardPos + card.index_Y = MoveCardY + for i = #self.card_list, 1, -1 do + if MoveCardPos == self.card_list[i].index_X then + table.insert(self.card_list, (i + 1), card) + break + end + end + isChangeCard = true + elseif MoveCard == true and MoveCardindex ~= 0 then + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X then + --向下移动 + if MoveCardindex == -1 then + --向上移动 + if self.card_list[i].index_Y < card.index_Y and self.card_list[i].index_Y >= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y + 1 + end + else + if self.card_list[i].index_Y > card.index_Y and self.card_list[i].index_Y <= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + end + end + end + card.index_X = MoveCardPos + card.index_Y = MoveCardY + for i = #self.card_list, 1, -1 do + if MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY - 1) then + table.insert(self.card_list, (i + 1), card) + break + elseif MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY + 1) then + table.insert(self.card_list, i, card) + break + end + end + isChangeCard = true + else + isChangeCard = false + self._area_handcard_list:AddChild(button) + end + end + self:UpdateHandCardsPos() + --每次改变手牌排列发给服务器 重连 回放需要用 --回放需要没次改变都要显示 + if isChangeCard == true then + self:SendChangeCard() + end + end +end + +--改变手牌排列发给服务器 +function M:SendChangeCard(...) + local list = {} + for i = 1, #self.card_list do + local data = {} + data.card = self.card_list[i].card_item + data.X = self.card_list[i].index_X + data.Y = self.card_list[i].index_Y + list[#list + 1] = data + end + self._mainView:ChangeCards(list) +end + +--计算手牌位置 +function M:GetHandCardPos(cards_view, cards) + local x, y = 0, 0 + local card_width = self.card_width -- 牌的宽度 + local middle_x = self._area_handcard_list.width / 2 + local start_x = middle_x - (cards / 2 * (card_width)) + x = start_x + (card_width) * (cards_view.index_X - 1) + + if self:getCardSize() == 1 then + y = 90 - (85 * cards_view.index_Y) + elseif self:getCardSize() == 1.2 then + y = 70 - (110 * cards_view.index_Y) + elseif self:getCardSize() == 0.8 then + y = 100 - (65 * cards_view.index_Y) + end + return Vector2.New(x, y) +end + +--更新 吃碰 +function M:UpdateFzList(fz_list) + printlog("jefe self UpdateFzList=======") + pt(fz_list) + self._area_fz_list:RemoveChildren(0, -1, true) + for i = 1, #fz_list do + local fzitem = nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Component1') + fzitem:RemoveChildren(0, -1, true) + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + fzcards:GetChild('card_' .. 1).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].active_card) + fzcards:GetController('c2').selectedIndex = 1 + fzcards:GetChild('card_' .. 2).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].opcard[1]) + fzcards:GetChild('card_' .. 3).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].opcard[2]) + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Peng then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + for j = 1, 3 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Wei then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + fzcards:GetController('c1').selectedIndex = 1 + for j = 1, 3 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + fzcards:GetController('c1').selectedIndex = 1 + for j = 1, 3 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Pao then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_4') + for j = 1, 4 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Ti then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_4') + for j = 1, 4 do + if j == 4 then + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + else + fzcards:GetChild('card_' .. j).icon = 'ui://Main_RunBeard/202_1_300' + end + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + end + end +end + +function M:ClearOutCard() + self._area_outcard_list:RemoveChildren(0, -1, true) +end +--出牌 +function M:UpdateOutCardList(outcard) + self._area_outcard_list:RemoveChildren(0, -1, true) + local outcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Gcm_OutCard') + if outcard == 0 then + outcards:GetChild('icon').icon = 'ui://Main_RunBeard/201_1_300' + else + outcards:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/203_', outcard) + end + outcards.x, outcards.y = 0, 0 + self._area_outcard_list:AddChild(outcards) +end + +--弃牌 +function M:UpdateQiPai(qi_list) + self._area_qipai_list:RemoveChildren(0, -1, true) + for i = 1, #qi_list do + local qicards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Qipai') + qicards:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/202_', qi_list[i]) + self._area_qipai_list:AddChild(qicards) + end +end + +--摸牌动画 +function M:PlayingOutCardAnima(card) + if (self._area_outcard_list ~= nil and self._area_outcard_list.numChildren > 0) then + self._area_outcard_list:GetChildAt(0):GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/202_', card) + self._view:GetTransition('t0'):Play() + end + coroutine.start( + function() + coroutine.wait(0.1) + self:ClearOutCard() + end + ) +end + +--得到设置的牌字体 +function M:getCardItem(card_1, card_2) + if self._room.change_card_display ~= nil then + --printlog("===========",self._room.change_card_display) + return card_1 .. self._room.change_card_display .. card_2 + else + return card_1 .. '2_' .. card_2 + end +end +--得到设置的牌大小 +function M:getCardSize() + if self._room.change_card_size ~= nil then + return self._room.change_card_size + else + return 1 + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/runbeard/main/ZPProtocol.lua b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPProtocol.lua new file mode 100644 index 00000000..7c0b7ff3 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPProtocol.lua @@ -0,0 +1,36 @@ +local Protocol = { + -- 通知服务器出牌 + GAME_DIS_CARD = "611", + -- 通知服务器提示选择行为 + GAME_ACTION = "612", + -- 通知服务器手牌队形改变 + GAME_CHANGE_CARD = "613", + -- 通知服务器牌字体改变 + GAME_CHANGE_TYPEfACE = "615", + + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + -- 出牌事件 + GAME_EVT_DISCARD = "812", + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + -- action 事件 + GAME_EVT_ACTION = "815", + -- 胡牌事件 + GAME_EVT_HU = "816", + -- 结算 + GAME_EVT_RESULT1 = "817", + -- 弃牌 + GAME_EVT_QIPAI = "818", + -- 抓牌 + GAME_EVT_DRAW = "819", + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + --第二十一张牌 + GAME_EVT_ADD_CARD = "821", + +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/runbeard/main/ZPSettingView.lua b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPSettingView.lua new file mode 100644 index 00000000..58080559 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPSettingView.lua @@ -0,0 +1,336 @@ +local SettingView = require('Game.View.SettingView') +local ZPTableBG = import('.ZPTableBG') + +local ZPSettingView = { + -- 修改牌字体 + onEXMainCallback = nil, + -- 修改手牌大小 + onUpdataCardSizeCallback = nil, + -- 语音 + onEXVoiceCallback = nil, + -- 快速出牌 + onEXChuPaiCallback = nil, + -- 方言 + onEXFangYanCallback = nil +} +local M = ZPSettingView + +function ZPSettingView.new(blur_view, index, open_social,cardIndex) + setmetatable(SettingView, {__index = BaseWindow}) + setmetatable(M, {__index = SettingView}) + local self = setmetatable({}, {__index = M}) + self.class = 'ZPSettingView' + self._currenIndex = 0 + self._blur_view = blur_view + self.onCallback = event('onCallback', true) + self.stateIndex = 0 + self.cd_time = 0 + self._btn_dismiss_room_enable = false + self._close_destroy = true + self.bigSize = 1.2 + self.mediumSize = 1 + self.smallSize = 0.8 + self._full = true + self._anim_pop = 2 + self._open_social = open_social + self._cardType=cardIndex + self:init('ui://Main_RunBeard/New_SettingWindow') + return self +end + +function M:init(url) + SettingView.init(self, url) + if DataManager.CurrenRoom == nil then + return + end + self._view = self._view:GetChild('showview') + + local view = self._view + local slider_sound = view:GetChild('slider_sound') + local slider_music = view:GetChild('slider_music') + -- local btn_music = view:GetChild('btn_music') + -- local btn_sound = view:GetChild('btn_sound') + + -- btn_music.selected = (GameApplication.Instance.MusicValue < 5 and false or true) + slider_sound.value = GameApplication.Instance.SoundValue + slider_music.value = GameApplication.Instance.MusicValue + -- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true + + slider_music.onChanged:Add( + function() + GameApplication.Instance.MusicValue = slider_music.value + -- btn_music.selected = GameApplication.Instance.MusicValue < 5 and false or true + end + ) + + slider_sound.onChanged:Add( + function() + GameApplication.Instance.SoundValue = slider_sound.value + -- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true + end + ) + + local room = DataManager.CurrenRoom + local c1 = self._view:GetController('cards') + if self._cardType then + c1.selectedIndex = self._cardType + end + + local size = self._view:GetController('size') + if room.change_card_size ~= nil then + + if room.change_card_size == self.bigSize then + size.selectedIndex = 0 + elseif room.change_card_size == self.mediumSize then + size.selectedIndex = 1 + elseif room.change_card_size == self.smallSize then + size.selectedIndex = 2 + end + else + room.change_card_size = 0 + size.selectedIndex = 0 + end + printlog("room.change_card_display===>>>",room.change_card_display) + if room.change_card_display ~= nil then + local _str = string.sub(room.change_card_display, 1, 1) + local n = tonumber(_str) + if n == 1 then + c1.selectedIndex = 1 + elseif n == 2 then + c1.selectedIndex = 0 + elseif n == 8 then + c1.selectedIndex = 3 + else + c1.selectedIndex = 2 + end + end + if self._open_social then + self._view:GetChild('n78').visible = true + self._view:GetChild('n88').visible = true + self._view:GetChild('n57').visible = true + + local yuyin = self._view:GetController('yuyin') + local chupai = self._view:GetController('chupai') + local fangyan = self._view:GetController('fangyan') + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. room.game_id .. 'yuyin') + local json_data1 = Utils.LoadLocalFile(user_id .. room.game_id .. 'chupai') + local json_data2 = Utils.LoadLocalFile(user_id .. room.game_id .. 'fangyan') + yuyin.selectedIndex = 1 + chupai.selectedIndex = 1 + room.yuyin_typeface = 1 + room.chupai_typeface = 1 + fangyan.selectedIndex = 1 + room.fangyan_typeface = 1 + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + room.yuyin_typeface = typeface + end + if json_data1 ~= nil then + local _data = json.decode(json_data1) + local typeface = _data['game_typeface'] + room.chupai_typeface = typeface + end + if json_data2 ~= nil then + local _data = json.decode(json_data2) + local typeface = _data['game_typeface'] + room.fangyan_typeface = typeface + end + if room.yuyin_typeface ~= nil then + yuyin.selectedIndex = room.yuyin_typeface + end + if room.chupai_typeface ~= nil then + chupai.selectedIndex = room.chupai_typeface + end + if room.fangyan_typeface ~= nil then + fangyan.selectedIndex = room.fangyan_typeface + end + else + self._view:GetChild('n78').visible = false + self._view:GetChild('n88').visible = false + self._view:GetChild('n57').visible = false + end + + c1.onChanged:Set( + function() + if self.onEXMainCallback then + self.onEXMainCallback(c1.selectedIndex + 1) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = c1.selectedIndex + 1 + local key = user_id .. room.game_id + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + + size.onChanged:Set( + function() + if self.onUpdataCardSizeCallback then + self.onUpdataCardSizeCallback(size.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_cardsize'] = size.selectedIndex + local key = user_id .. room.game_id .. 'cardsize_new' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + if self._open_social then + self._view:GetChild('n78').visible = false + local yuyin = self._view:GetController('yuyin') + local chupai = self._view:GetController('chupai') + local fangyan = self._view:GetController('fangyan') + yuyin.onChanged:Set( + function() + if self.onEXVoiceCallback then + room.yuyin_typeface = yuyin.selectedIndex + self.onEXVoiceCallback(yuyin.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = yuyin.selectedIndex + local key = user_id .. room.game_id .. 'yuyin' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + chupai.onChanged:Set( + function() + if self.onEXChuPaiCallback then + room.chupai_typeface = chupai.selectedIndex + self.onEXChuPaiCallback(chupai.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = chupai.selectedIndex + local key = user_id .. room.game_id .. 'chupai' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + fangyan.onChanged:Set( + function() + if self.onEXFangYanCallback then + room.fangyan_typeface = fangyan.selectedIndex + self.onEXFangYanCallback(fangyan.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = fangyan.selectedIndex + local key = user_id .. room.game_id .. 'fangyan' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + else + self._view:GetChild('n78').visible = false + end +end + +function M:Show() + SettingView.Show(self) + self:UpdateIndex() + self:UpdateCardSizeIndex() +end +--根据存的数据改变设置里面的控制器 + +function M:UpdateIndex() + local room = DataManager.CurrenRoom + local c1 = self._view:GetController('cards') + if room.change_card_display ~= nil then + local _str = string.sub(room.change_card_display, 1, 1) + local n = tonumber(_str) + if n == 7 then + n = 2 + end + if n == 1 then + c1.selectedIndex = 1 + elseif n == 2 then + c1.selectedIndex = 0 + elseif n == 8 then + c1.selectedIndex = 3 + else + c1.selectedIndex = 2 + end + end +end +function M:UpdateCardSizeIndex() + local room = DataManager.CurrenRoom + local size = self._view:GetController('size') + if room.change_card_size ~= nil then + if room.change_card_size == self.bigSize then + size.selectedIndex = 0 + elseif room.change_card_size == self.mediumSize then + size.selectedIndex = 1 + elseif room.change_card_size == self.smallSize then + size.selectedIndex = 2 + end + else + size.selectedIndex = 0 + end +end + +function M:SetBtnUpdateCardEnable(enable) + self._view:GetChild('n37').enabled = enable + self._view:GetChild('n38').enabled = enable + self._view:GetChild('n49').enabled = enable +end + +function M:FillBgSection(cb, game_id, default_bg, room, qihu) + if (default_bg == nil) then + default_bg = 1 + end + local view = self._view + local lst_bg = view:GetChild('lst_bg') + local ctr_bg = view:GetController('bg') + for i = 1, #bg_config_zipai do + local config = bg_config_zipai[i] + local item = lst_bg:AddItemFromPool() + item.icon = config.thumb + if i > 3 then + ctr_bg:AddPage(i - 1) + end + item.onClick:Add( + function() + cb(config.url) + ctr_bg.selectedIndex = i - 1 + if qihu ~= nil then + -- self._blur_view:GetChild('di_text').text = room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起' + self._blur_view:GetController('bg_state').selectedIndex = i - 1 + end + end + ) + end + self._game_id = game_id + self._bg = ZPTableBG.GetTableBG(game_id) + local index = 0 + if self._bg > 0 then + lst_bg.selectedIndex = self._bg - 1 + index = lst_bg.selectedIndex + else + ctr_bg.selectedIndex = default_bg - 1 + index = ctr_bg.selectedIndex + end + if qihu ~= nil then + -- self._blur_view:GetChild('di_text').text = room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起' + if index < 3 then + self._blur_view:GetController('bg_state').selectedIndex = index + else + self._blur_view:GetController('bg_state').selectedIndex = 0 + end + end +end +function M:Destroy() + local bg_id = self._view:GetController('bg').selectedIndex + 1 + if self._bg ~= bg_id then + self._bg = bg_id + ZPTableBG.SaveTableBG(self._game_id, self._bg) + end + SettingView.Destroy(self) +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/runbeard/main/ZPTableBG.lua b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPTableBG.lua new file mode 100644 index 00000000..e11083ee --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/runbeard/main/ZPTableBG.lua @@ -0,0 +1,84 @@ +-- 记录各游戏的桌面背景 +json = require 'cjson' + +local ZPTableBG = {} + +local M = ZPTableBG + bg_config_zipai = { + {id = 1, url = "base/main_zipai/bg/bg_1", thumb = "ui://Main_RunBeard/table_bg1"}, + {id = 2, url = "base/main_zipai/bg/bg_2", thumb = "ui://Main_RunBeard/table_bg2"}, + {id = 3, url = "base/main_zipai/bg/bg_3", thumb = "ui://Main_RunBeard/table_bg3"}, + -- {id = 4, url = "base/main_zipai/bg/bg_gold", thumb = "ui://Main_RunBeard/table_bg3"}, + -- {id = 5, url = "base/main_zipai/bg/bg8", thumb = "ui://Main_RunBeard/table_bg1"}, + -- {id = 6, url = "base/tablebg/bg/bg1", thumb = "ui://Common/b04"}, +} + +local function GetBG(data, game_id) + local bg_id = 0 + for i = 1, #data do + if data[i].game_id == game_id then + bg_id = data[i].bg_id + break + end + end + return bg_id +end +local function SetBG(data, game_id, bg_id) + local contain_key = false + for i = 1, #data do + if data[i].game_id == game_id then + contain_key = true + if data[i].bg_id ~= bg_id then + data[i].bg_id = bg_id + break + end + end + end + if not contain_key then + local _data = {} + _data.game_id = game_id + _data.bg_id = bg_id + table.insert(data, _data) + end +end + +function ZPTableBG.GetTableBG(game_id) + local id = -1 + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + local config_data = json.decode(json_data) + id = GetBG(config_data, game_id) + end + return id +end + +function ZPTableBG.LoadTableBG(id, game_id, main_view) + local bg_id = M.GetTableBG(game_id) + local index + if bg_id > 0 then + index = bg_id + else + index = id + end + + if index>3 then + -- body + index=1 + end + local url = bg_config_zipai[index].url + LoadGameBg(url, main_view) +end + +function ZPTableBG.SaveTableBG(game_id, bg_id) + local config_data + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + config_data = json.decode(json_data) + else + config_data = {} + end + SetBG(config_data, game_id, bg_id) + Utils.SaveLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code, json.encode(config_data)) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXGameController.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXGameController.lua new file mode 100644 index 00000000..4e3bfa11 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXGameController.lua @@ -0,0 +1,565 @@ +local RB_Protocol = import(".Protocol") +local FZTipList = import(".main.FZData") +local RB_GameEvent = import(".RunBeard_GameEvent") +local M = {} + +--- Create a new HZ_GameController +function M.new() + setmetatable(M,{__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("汉寿跑胡子") + self.class = "RB_GameController" + return self +end + +function M:init(name) + GameController.init(self,name) + + self._eventmap[RB_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[RB_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[RB_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[RB_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[RB_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[RB_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + + self._eventmap[RB_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[RB_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[RB_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[RB_Protocol.GAME_EVT_QIPAI] = self.OnEventQIPAI + self._eventmap[RB_Protocol.GAME_EVT_ADD_CARD] = self.OnAddCard + + self._eventmap[RB_Protocol.GAME_EVT_Piao_Tip] = self.OnPiaoTip + self._eventmap[RB_Protocol.GAME_EVT_Piao_Action] = self.OnPiaoAction + self._eventmap[RB_Protocol.GAME_EVENT_XIPAI] = self.OnEventXiPai + self._eventmap[RB_Protocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim + +end + + +function M:SendXiPaiAction(callBack) + local _data = {} + local _client = ControllerManager.GameNetClinet + _client:send(RB_Protocol.GAME_XIPAI, _data) + self.XiPaiCallBack=callBack +end + +function M:OnEventXiPai(evt_data) + if evt_data["result"]==0 then + if self.XiPaiCallBack then + self.XiPaiCallBack() + end + else + ViewUtil.ErrorTip(1000000,"申请洗牌失败") + end + +end + + +function M:OnEventXiPaiAnim(evt_data) + printlog("洗牌动画===》》》》") + pt(evt_data) + local playeridList = evt_data["list"] + local my_isXiPai=false + local other_isXiPai=false + if playeridList and #playeridList>0 then + for i=1,#playeridList do + local p = self._room:GetPlayerById(playeridList[i]) + if p== self._room.self_player then + my_isXiPai=true + else + other_isXiPai=true + end + end + end + + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.EventXiPai,my_isXiPai,other_isXiPai) + end) +end + + +-- 发送出牌指令到服务器 +function M:SendOutCard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_DIS_CARD, _data) + end + +end +--GAME_CHANGE_CARD GAME_DIS_CARD +function M:SendChangeCards( card_list ) + local _data = {} + if card_list then + _data["card_list"] = card_list + else + _data["card_list"]={} + end + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_CHANGE_CARD, _data) + end +end + +function M:SendChangeTypeFace(TypeFace) + -- body + local _data = {} + _data["typeface"] = TypeFace + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_CHANGE_TYPEfACE, _data) + end +end + + +function M:ConformToNextGame( ) + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_EVT_CHUI) + end +end + +-- 发送放子选择到服务器 +function M:SendAction(id,num) + local _data = {} + _data["id"] = id + if num ~=nil then + _data["biid"] = num + end + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_ACTION, _data) + end +end + + +function M:SendPiao(piao,callBack) + local _data = {} + _data["id"] = piao + local _client = ControllerManager.GameNetClinet + _client:send(RB_Protocol.GAME_EVT_Send_Piao, _data) + self.PiaoTipsCallBack=callBack +end + + +function M:OnPiaoTip(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local piao = evt_data["piao"] + local reload = evt_data["reload"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, RB_GameEvent.OnPiaoTips, piao,reload) + ControllerManager.IsSendCard=true + end + ) +end + +function M:OnPiaoAction(evt_data) + local seat = evt_data["seat"] + local piao = evt_data["piao"] + if seat==DataManager.CurrenRoom.self_player.seat then + if self.PiaoTipsCallBack then + self.PiaoTipsCallBack() + self.PiaoTipsCallBack=nil + end + end + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, RB_GameEvent.OnPiaoAction, seat,piao) + end + ) +end + + +function M:OnEventSendCards(evt_data) + printlog("发牌事件===》》》") + pt(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + _room.self_player.currentNotPutCardList={} + _room.curren_round = _room.curren_round + 1 + if _room.curren_round > 0 then _room.playing = true end + + local handcards = {} + if evt_data.card_list and #evt_data.card_list>0 then + handcards = evt_data["card_list"] + else + ViewUtil.ErrorTip(100000,"发牌数据异常") + end + + local p = _room.self_player + local seat =nil + if evt_data.bank_seat then + seat = evt_data["bank_seat"] + else + ViewUtil.ErrorTip(100001,"发牌座位异常") + end + + _room.banker_seat = seat + for i=1,#_room.player_list do + _room.self_player.handcard_list ={} + _room.self_player.card_list = {} + _room.player_list[i].hand_left_count = 20 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + _room.player_list[i].outcard_list = {} + _room.player_list[i].hu_xi = 0 + end + self._cacheEvent:Enqueue(function() + _room.self_player.handcard_list=handcards + self._room.self_player.hand_left_count = #handcards + DispatchEvent(self._dispatcher,RB_GameEvent.SendCards, p) + --print("发牌结束=====打开标志") + ControllerManager.IsSendCard=true + end) +end + +function M:OnEventOutCard(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + if(seat == _room.self_player.seat) then + list_remove(_room.self_player.handcard_list,card) + end + p.DiceCard = card + p.hand_left_count = p.hand_left_count -1 + DispatchEvent(self._dispatcher,RB_GameEvent.OutCard, p,card) + end) +end + +function M:OnEventQIPAI(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + if(not p.outcard_list) then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + DispatchEvent(self._dispatcher,RB_GameEvent.QiCard, seat,card) + end) +end + +function M:OnEventTakeCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + if card ~=0 then + p.DiceCard = card + end + DispatchEvent(self._dispatcher,RB_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnAddCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local p = _room:GetPlayerBySeat(seat) + + self._cacheEvent:Enqueue(function() + p.DiceCard = 0 + p.hand_left_count = p.hand_left_count +1 + if (seat == _room.self_player.seat) then + _room.self_player.handcard_list[#_room.self_player.handcard_list+1] = card + end + DispatchEvent(self._dispatcher,RB_GameEvent.AddCard, seat, card) + end) +end + +function M:OnEventOutHint(evt_data) + printlog("出牌提示事件===》》》") + pt(evt_data) + self._cacheEvent:Enqueue(function() + + DispatchEvent(self._dispatcher,RB_GameEvent.OutHint) + end) + +end + +function M:OnEventTurn(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + printlog("放子提示事件===》》》") + pt(evt_data) + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + local uid = evt_data["uid"] + for i=1,#list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + tip.bi_list = dtip["bi_list"] + if (dtip["opcard"]) then + local opcard = dtip["opcard"] + tip.OpCard = opcard + table.sort(tip.OpCard) + tip.OpCard[3] = tip.Card + end + tiplist:AddTip(tip) + + end + DispatchEvent(self._dispatcher,RB_GameEvent.FZTips, tiplist,uid) + end) +end + +function M:OnEventFzAction(evt_data) + printlog("放子行为提示事件===》》》") + pt(evt_data) + local _room = self._room + _room.self_player.currentNotPutCardList=evt_data["notput"] + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local ftype = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + local huxi = evt_data["hu_xi"] + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local isNeedDelHandCard =0 + p.hu_xi = huxi + local fz = {} + fz.card = card + fz.type = ftype + fz.active_card = actice_card + fz.from_seat = from_seat + fz.opcard =opcard + local remove_num = #opcard + if ftype == RB_FZType.Chi then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Bi then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + list_remove(_room.self_player.handcard_list,fz.card) + end + elseif ftype == RB_FZType.Peng then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Kan then + if (p == _room.self_player) then + if #opcard==2 then + _room.self_player.handcard_list[#_room.self_player.handcard_list+1] = card + end + p.fz_list[#p.fz_list+1] = fz + end + elseif ftype == RB_FZType.ChouWei then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,2 do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Wei then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Pao then + + if (p == _room.self_player) then + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + if p.fz_list[i].type == RB_FZType.Kan then + isNeedDelHandCard =3 + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + remove_num= 0 + p.fz_list[i].type= RB_FZType.Pao + end + end + local num =0 + for i=1,#_room.self_player.handcard_list do + if card == _room.self_player.handcard_list[i] then + num=num+1 + end + end + if num>0 then + isNeedDelHandCard =num + + for i=1,num do + list_remove(_room.self_player.handcard_list,card) + end + local isAddTi =false + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Pao + isAddTi=true + remove_num= 0 + end + end + if isAddTi==false then + p.fz_list[#p.fz_list+1] = fz + end + end + + else + local num =0 + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Pao + num=1 + remove_num= 0 + end + end + if num==0 then + p.fz_list[#p.fz_list+1] = fz + end + end + + elseif ftype == RB_FZType.Ti then + + if (p == _room.self_player) then + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + if p.fz_list[i].type == RB_FZType.Kan then + isNeedDelHandCard =3 + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + remove_num= 0 + p.fz_list[i].type= RB_FZType.Ti + end + end + local num =0 + for i=1,#_room.self_player.handcard_list do + if card == _room.self_player.handcard_list[i] then + num=num+1 + end + end + if num>0 then + isNeedDelHandCard =num + + for i=1,num do + list_remove(_room.self_player.handcard_list,card) + end + local isAddTi =false + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Ti + remove_num= 0 + isAddTi=true + end + end + if isAddTi==false then + p.fz_list[#p.fz_list+1] = fz + end + end + + else + local num =0 + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Ti + remove_num= 0 + num=1 + end + end + if num==0 then + p.fz_list[#p.fz_list+1] = fz + end + + end + + end + + + p.hand_left_count = p.hand_left_count - remove_num + --[[if fz.type == RB_FZType.Pao or fz.type == RB_FZType.Ti then + coroutine.start(function() + coroutine.wait(0.5) + DispatchEvent(self._dispatcher,RB_GameEvent.FangziAction, fz, p,isNeedDelHandCard) + end) + else + DispatchEvent(self._dispatcher,RB_GameEvent.FangziAction, fz, p,isNeedDelHandCard) + end--]] + DispatchEvent(self._dispatcher,RB_GameEvent.FangziAction, fz, p,isNeedDelHandCard) + + end) +end + +function M:OnEventHu(evt_data) + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + -- print(win_p.hand_left_count) + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + table.sort( win_p.card_list, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher,RB_GameEvent.ZPHuCard, evt_data["seat"],evt_data["from_seat"],cards) + end) +end + +function M:OneventResult1(evt_data) + printlog("结算=============>>>") + pt(evt_data) + local over = evt_data.type + --0:小结算 1:小大结算 2:大结算 + self._room.playing = false + if 0 == over then + local result = evt_data.result + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil,true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXGameInfo.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXGameInfo.lua new file mode 100644 index 00000000..2e5ef647 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXGameInfo.lua @@ -0,0 +1,204 @@ +local EXGameInfo = {} + +local M = EXGameInfo + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = 'EXGameInfo' + UIPackage.AddPackage('extend/zipai/yueyangwaihuzi/ui/Info_Poker_YueYangWHZ') + return self +end + +function M:FillData() + self._maxPlayer = 3 -- 默认玩家人数 + self._roundChoice = 2 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL('ui://Info_Poker_YueYangWHZ/Cgm_create_room') + + if oldGameVersion ==1 then + self._config:GetController("xipai").selectedIndex=0 + end + + if oldGameVersion==2 then + self._config:GetController("xipai").selectedIndex=1 + + self.xipaiValueText=self._config:GetChild('xipaifen') + self.xipaiValueText.text=1 + self.xipaiValue=1 + + self.anchouValueText=self._config:GetChild('anchoufen') + self.anchouValueText.text=1 + self.anchouValue=1 + + local btn_cr = self._config:GetChild('sdsrbtn') + btn_cr.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.xipaiValueText.text=value/1000 + self.xipaiValue=value/1000 + + end, 3, nil) + gniv:Show() + + + end + ) + + + local btn_cr2 = self._config:GetChild('anchoubtn') + btn_cr2.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.anchouValueText.text=value/1000 + self.anchouValue=value/1000 + + end, 3, nil) + gniv:Show() + + + end + ) + end + +end +local _help_url = 'ui://Info_Poker_YueYangWHZ/Com_help' +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_Poker_YueYangWHZ/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_Poker_YueYangWHZ/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +--local _play_list = {"三人玩法","二人玩法"} +function M:GetPlayList() + --return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController('round').selectedIndex == 0 and 1 or 2 + local renshu = _config:GetController('play_list').selectedIndex +2 + + local kawai=_config:GetController('kawai').selectedIndex + local piao=_config:GetController('piao').selectedIndex + local first_rand_zhuang=_config:GetChild('suijizhuang').selected and true or false + local zhuang_di_hu=_config:GetController('zdihu').selectedIndex + local hao_config=_config:GetController('hao').selectedIndex + local hao_jiabei=_config:GetController('jiabei').selectedIndex + local ming_tang=_config:GetController('mingtang').selectedIndex + local qupai=0 + if renshu==2 then + qupai=_config:GetController('qupai').selectedIndex + end + + local _data = {} + _data['opt'] = round -- 1 2 8局 16 局 + _data['maxPlayers'] = renshu + _data['kawai'] = kawai + _data['piao'] = piao + _data['zhuang_di_hu'] = zhuang_di_hu + _data['hao_config'] = hao_config + _data['hao_jiabei'] = hao_jiabei + _data['ming_tang'] = ming_tang + _data['first_rand_zhuang'] = first_rand_zhuang + _data['qupai'] = qupai + + local xi_pai=false + if oldGameVersion ==2 then + if _config:GetChild("xipai") then + xi_pai = _config:GetChild("xipai").selected + end + end + _data['xi_pai'] = xi_pai + + local xi_pai_score=0 + local an_chou_score=0 + + if oldGameVersion==2 then + xi_pai_score=self.xipaiValue + an_chou_score=self.anchouValue + end + + _data['xi_pai_score'] = xi_pai_score*1000 + _data['an_chou_score'] = an_chou_score*1000 + + return _data +end + +function M:LoadConfigData(data) + local _config = self._config + + _config:GetController('play_list').selectedIndex = data.maxPlayers -2 + _config:GetController('round').selectedIndex = data.opt == 1 and 0 or 1 + _config:GetController('kawai').selectedIndex=data.kawai + _config:GetController('piao').selectedIndex=data.piao + _config:GetChild('suijizhuang').selected =data.first_rand_zhuang + _config:GetController('zdihu').selectedIndex=data.zhuang_di_hu + _config:GetController('hao').selectedIndex=data.hao_config + _config:GetController('jiabei').selectedIndex=data.hao_jiabei + _config:GetController('mingtang').selectedIndex=data.ming_tang + _config:GetController('qupai').selectedIndex=data.qupai + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected=data.xi_pai + end + + if oldGameVersion==2 then + self.xipaiValueText.text=data.xi_pai_score/1000 + self.xipaiValue=data.xi_pai_score/1000 + + self.anchouValueText.text=data.an_chou_score/1000 + self.anchouValue=data.an_chou_score/1000 + end + +end + +function M:OnChangeOption(ctype) + IGameInfo.OnChangeOption(self, ctype) + + local play_list = self._config:GetController('play_list') + play_list.onChanged:Add( + function() + self._maxPlayer = play_list.selectedIndex +2 + self:ShowVariablePrice(ctype) + end + ) +end +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXMainView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXMainView.lua new file mode 100644 index 00000000..6915bd49 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXMainView.lua @@ -0,0 +1,1102 @@ +local SettingView = import('.main.ZPSettingView') +local PlayerSelfCardInfoView = import('.PlayerSelfCardInfoView') +local PlayerCardInfoView = import('.PlayerCardInfoView') +local ZPMainView = import('.main.ZPMainView') +local GameEvent = import('.RunBeard_GameEvent') +local RunBeard_ResultView = import('.RunBeard_ResultView') +local PlayerInfoView = import(".EXPlayerInfoView") + +local M = {} +local Fix_Msg_Chat = { + '在搞么的,出牌撒', + '又掉线哒!', + '和你打牌太有味了', + '人呢?还搞不搞滴', + '哈哈,对不住了', + '稍等哈哈,马上就来', + '不要走,决战到天亮', + '牌打得不错嘛!', + '今朝这个方位硬是不好', + '不好意思临时有事,申请解散!' +} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M, {__index = ZPMainView}) + local self = setmetatable({}, {__index = M}) + self.class = 'RunBeard_MainView' + self._full = true + self:init() + return self +end + +function M:getCardItem(card_1, card_2) + if self._room.change_card_display ~= nil then + return card_1 .. self._room.change_card_display .. card_2 + else + return card_1 .. '2_' .. card_2 + end +end +function M:InitView(url) + local _room = self._room + self.Fix_Msg_Chat = Fix_Msg_Chat + ViewUtil.PlayMuisc('YueYang_ZP', 'extend/zipai/yueyangwaihuzi/sound/bg.mp3') + UIPackage.AddPackage('extend/zipai/yueyangwaihuzi/ui/Extend_Poker_YueYangWHZ') + ZPMainView.InitView(self, 'ui://Main_RunBeard/Main_' .. _room.room_config.people_num, false, false, 1.2, 8) + + self:PlayerChangeLineState() + SettingView.onEXMainCallback = handler(self, self.UpdateCardDisplay) + SettingView.onUpdataCardSizeCallback = handler(self, self.UpdateCardSize) + + if DataManager.CurrenRoom.change_card_display==nil then + self:UpdateCardDisplay(2) + end + for i = 1, #_room.player_list do + local p = _room.player_list[i] + local head = self._player_info[self:GetPos(p.seat)] + head:UpdateScore() + end + + if _room.playing or _room.curren_round > 0 then + self:ReloadRoom() + end + self._view:GetController('jushu').selectedIndex = 1 + self:setBtn() +end + +function M:setBtn() + local rightpanel = self._view:GetChild('right_panel') + local btn_rule = rightpanel:GetChild('btn_log') + local gcm_chat = self._view:GetChild('gcm_chat') + local _btn_chat = gcm_chat:GetChild('n1') + _btn_chat:GetChild('icon').icon = 'ui://Main_RunBeard/chat_img' + local btn_record = gcm_chat:GetChild('btn_record') + btn_record:GetChild('icon').icon = 'ui://Main_RunBeard/yuyin_img' + + if btn_rule ~= nil then + btn_rule.onClick:Set( + function() + if self.RuleView == nil or self.RuleView._is_destroy then + self.RuleView = RoomInfoView.new(self._room) + end + self.RuleView:Show() + end + ) + end + local btn_setting = self._view:GetChild('btn_setting') + btn_setting.onClick:Set( + function() + local _settingView = self:NewSettingView(1) + _settingView.stateIndex = (self._room.curren_round >= 1 and self._allow_dissmiss) and 2 or 1 + _settingView.cd_time = self.dismiss_room_cd_time + _settingView:Show() + + local room = DataManager.CurrenRoom + _settingView.onCallback:Add( + function(context) + local _gamectr = ControllerManager.GetController(GameController) + if (room.CurnrenState == StateType.Ready) then + _gamectr:LevelRoom( + function(response) + if (response.ReturnCode == 0) then + ViewManager.ChangeView(ViewManager.View_Lobby) + GameApplication.Instance:ShowTips('房间已解散!') + end + end + ) + else + _gamectr:AskDismissRoom( + function(res) + ViewUtil.ErrorTip(res.ReturnCode, '') + end + ) + end + end + ) + end + ) + local tex_roomid = rightpanel:GetChild('tex_roomid') + tex_roomid.text = self._room.room_id + if self._room.room_config.isHidden and self._room.room_config.isHidden == 1 then + tex_roomid.text = "000000" + end +end + +function M:InitPlayerInfoView() + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem,self) + tem.visible = false + end +end + + +function M:NewPlayerCardInfoView(view, index) + if index == 1 then + return PlayerSelfCardInfoView.new(view, self) + end + return PlayerCardInfoView.new(view, self) +end +function M:closeTipOnTuoguan() + if self._clearingView ~= nil then + self._clearingView:Close() + end + self:__CloseTip() +end +function M:EventInit() + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _player_info = self._player_info + local _gamectr = self._gamectr + + _gamectr:AddEventListener(GameEvent.EventXiPai,function( ... ) + local arg = {...} + local currentPlayer1=arg[1] + local currentPlayer2=arg[2] + self._popEvent = false + if ( currentPlayer1 ) then + + local xipaiCB=function () + self._popEvent = true + end + self:PlayXiPai(xipaiCB) + + end + + + if ( currentPlayer2 ) then + --self._popEvent = false + local xipaiCB2=function () + self._popEvent = true + end + self:PlayXiPai1(xipaiCB2) + end + + + end) + + _gamectr:AddEventListener(GameEvent.OnPiaoTips, function(...) + local arg = {...} + local piao = arg[1] + local reload = arg[2] + if reload==0 then + --self._popEvent = false + self._leftcard = 1 + self._leftcard = 1 + local rightpanel = self._view:GetChild('right_panel') + local tex_round = rightpanel:GetChild('tex_round') + if tex_round ~= nil then + tex_round.text = '第 ' .. _room.curren_round .. ' 局' + end + self._view:GetChild('tex_round').text = '第 ' .. _room.curren_round .. '/' .. _room.room_config.round .. ' 局' + + self._state.selectedIndex = 1 + self:closeTipOnTuoguan() + local list = _room.player_list + for i = 1, #list do + local p = list[i] + p.hu_xi = 0 + local _info = self._player_card_info[self:GetPos(p.seat)] + _info:SetPlayer(p) + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + info:UpdatePiao(-1) + info._view:GetController('huxi').selectedIndex = 1 + info._view:GetChild('huxi').text = p.hu_xi + info._view:GetController('zhanji').selectedIndex = 0 + + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + if p.total_hp == nil then + p.total_hp = 0 + end + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + + end + --local card_info = self._player_card_info[1] + --card_info:UpdateIsOnClick(false) + --card_info:InitHandCard(true) + printlog("飘分提示==>>>") + + self._player_card_info[1]:ShowPiao(piao) + end) + + + _gamectr:AddEventListener(GameEvent.OnPiaoAction, function(...) + local arg = {...} + local seat = arg[1] + local piao = arg[2] + local head_info = self._player_info[self:GetPos(seat)] + head_info:UpdatePiao(piao) + end) + + _gamectr:AddEventListener( + GameEvent.SendCards, + function(...) + self._popEvent = false + self._leftcard = 1 + self._leftcard = 1 + local rightpanel = self._view:GetChild('right_panel') + local tex_round = rightpanel:GetChild('tex_round') + if tex_round ~= nil then + tex_round.text = '第 ' .. _room.curren_round .. ' 局' + end + self._view:GetChild('tex_round').text = '第 ' .. _room.curren_round .. '/' .. _room.room_config.round .. ' 局' + + self._state.selectedIndex = 1 + self:closeTipOnTuoguan() + local list = _room.player_list + for i = 1, #list do + local p = list[i] + p.hu_xi = 0 + local _info = self._player_card_info[self:GetPos(p.seat)] + _info:SetPlayer(p) + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + info._view:GetController('huxi').selectedIndex = 1 + info._view:GetChild('huxi').text = p.hu_xi + info._view:GetController('zhanji').selectedIndex = 0 + + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + if p.total_hp == nil then + p.total_hp = 0 + end + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + local card_info = self._player_card_info[1] + card_info:UpdateIsOnClick(false) + card_info:InitHandCard(true) + end + ) + + _gamectr:AddEventListener( + GameEvent.GetCard, + function(...) + local arg = {...} + local seat = arg[1] + local card = arg[2] + local _leftcard = arg[3] + self._left_time = 15 + self._tex_LeftCard.text = '剩余 ' .. _leftcard .. ' 张牌' + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateOutCardList(card, true, true, self:GetPos(seat)) + if card ~= 0 then + local p = _room:GetPlayerBySeat(seat) + self:PlaySound(p.self_user.sex, 'F_' .. card) + else + self._popEvent = false + coroutine.start( + function() + coroutine.wait(0.5) + self._popEvent = true + info:ClearOutCard() + end + ) + end + end + ) + _gamectr:AddEventListener( + GameEvent.AddCard, + function(...) + local arg = {...} + local seat = arg[1] + local card = arg[2] + self._popEvent = false + local info = self._player_card_info[self:GetPos(seat)] + coroutine.start( + function() + coroutine.wait(0.5) + if seat == self._room.self_player.seat then + info:InitHandCard(false) + end + info:ClearOutCard() + self._popEvent = true + end + ) + end + ) + + _gamectr:AddEventListener( + GameEvent.EventTurn, + function(...) + local arg = {...} + local seat = arg[1] + local list = _room.player_list + local readyNum = 0 + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 0 + end + local info = self._player_info[self:GetPos(seat)] + info._view:GetController('time').selectedIndex = 1 + end + ) + _gamectr:AddEventListener( + GameEvent.OutHint, + function(...) + _room.curren_outcard_seat = _room.self_player.seat + coroutine.start( + function() + coroutine.wait(0.5) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:ChuPaiTiShi() + end + ) + end + ) + + _gamectr:AddEventListener( + GameEvent.OutCard, + function(...) + self:__CloseTip() + self._left_time = 0 + local arg = {...} + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:PlaySound(p.self_user.sex, 'F_' .. card) + if seat == self._room.self_player.seat then + _room.curren_outcard_seat = -1 + info:DeleteHandCard(card) + info:UpdateIsOnClick(true) + info:SendChangeCard() + info:ChuPaiTiShi() + end + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 0 + end + info:UpdateOutCardList(card, true, false, self:GetPos(seat)) + if self._leftcard == 1 then + self._leftcard = 0 + for i = 1, #_room.player_list do + local p = _room.player_list[i] + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateFzList(p.fz_list, false, p.seat) + end + end + end + ) + + _gamectr:AddEventListener( + GameEvent.QiCard, + function(...) + self:__CloseTip() + self._popEvent = false + self._left_time = 0 + local arg = {...} + local seat = arg[1] + local card = arg[2] + local p = _room:GetPlayerBySeat(seat) + local info = self._player_card_info[self:GetPos(seat)] + info:PlayingOutCardAnima(p.DiceCard) + p.DiceCard = 0 + info:UpdateQiPai(p.outcard_list, true, seat) + self._popEvent = true + end + ) + _gamectr:AddEventListener( + GameEvent.FZTips, + function(...) + local arg = {...} + local _tip = arg[1] + local _uid = arg[2] + self:__FangziTip(_tip, _uid) + end + ) + + _gamectr:AddEventListener(GameEvent.FangziAction, handler(self, self.OnFangziAction)) + + _gamectr:AddEventListener( + GameEvent.ZPHuCard, + function(...) + self._left_time = 0 + self:__CloseTip() + self._popEvent = false + local arg = {...} + local w = arg[1] + local l = arg[2] + local cards = arg[3] + local info = self._player_card_info[self:GetPos(w)] + -- info:UpdateHandCard() + + local url = 'ui://Extend_Poker_YueYangWHZ/别人胡' + local pNode = info._mask_liangpai + local player = _room:GetPlayerBySeat(w) + if w == _room.self_player.seat then + url = 'ui://Extend_Poker_YueYangWHZ/自己胡牌' + pNode = self._view + end + self:PlaySound(player.self_user.sex, 'F_Hu') + local he = UIPackage.CreateObjectFromURL(url) + he:GetTransition('t2'):Play() + if w == _room.self_player.seat then + he:Center() + end + pNode:AddChild(he) + coroutine.start( + function() + coroutine.wait(0.7) + he:Dispose() + self._popEvent = true + end + ) + end + ) + + _gamectr:AddEventListener( + GameEvent.ZPResult1, + function(...) + self._popEvent = false + self._left_time = 0 + local arg = {...} + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local x = {} + self._hu_tip:FillData(x) + self:__CloseTip() + if self._clearingView == nil then + if liuju == true then + self._clearingView = RunBeard_ResultView.new(self._view, 1) + else + self._clearingView = RunBeard_ResultView.new(self._view) + end + end + coroutine.start( + function() + coroutine.wait(0.5) + -- if self._clearingView._is_destroy then return end + self._clearingView:Show() + if _room.curren_round ~= _room.room_config.round then + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + p.total_score = data[i].total_score + p.cur_hp = data[i]['cur_hp'] or 0 + p.total_hp = data[i]['total_hp'] or 0 + if data[i]['hp_info'] then + p.cur_hp = data[i].hp_info.cur_hp + p.total_hp = data[i].hp_info.total_hp == nil and 0 or data[i].hp_info.total_hp + info._view:GetController('zhanji').selectedIndex = 0 + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + + card_info:Clear() + info:UpdateScore() + end + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 0 + end + + for i = 1, #_room.player_list do + _room.self_player.handcard_list = {} + _room.player_list[i].DiceCard = nil + _room.player_list[i].hand_left_count = 20 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + _room.player_list[i].outcard_list = {} + _room.player_list[i].hu_xi = 0 + end + end + self._popEvent = true + end + ) + if _room.curren_round ~= _room.room_config.round then + self._clearingView:InitData( + 0, + _room, + result, + nil, + function(...) + self._state.selectedIndex = 2 + self._clearingView = nil + end + ) + end + end + ) + + _gamectr:AddEventListener( + GameEvent.ZPResult2, + function(...) + self._left_time = 0 + local arg = {...} + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + local x = {} + self._hu_tip:FillData(x) + self:__CloseTip() + self:UnmarkSelfTuoguan() + self._clearingView = RunBeard_ResultView.new() + coroutine.start( + function() + coroutine.wait(0.5) + self._clearingView:Show() + end + ) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end + ) +end + +function M:OutCard(card_item) + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card_item) +end + +--改变牌队形 +function M:ChangeCards(list) + local _gamectr = ControllerManager.GetController(GameController) + if _gamectr then + _gamectr:SendChangeCards(list) + end +end + +function M:__FangziTip(tip, _uid) + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject('Main_RunBeard', 'Gcm_action_tips') + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + + local _lit_fanzi = _chipeng_tip:GetChild('lit_fanzi') + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + local tip_hu = false + local count = #_tlist + for k = 1, #_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + if td.type == 8 then + tip_hu = true + end + end + for k = 1, #_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + local url = 'ui://Main_RunBeard/Btn_fztip' + local btn_t = _lit_fanzi:AddItemFromPool(url) + if td.type==8 then + btn_t:GetChild("hupai").icon="ui://Main_RunBeard/201_1_" .. td.card + btn_t:GetController("hupai").selectedIndex=1 + end + btn_t.icon = 'ui://Main_RunBeard/newop_' .. td.type + btn_t.data = {tip, td, tip_hu} + btn_t.onClick:Set(self.__TipAction, self) + end + if p.hand_left_count ~= 0 then + local _btn_pass = _lit_fanzi:AddItemFromPool('ui://Main_RunBeard/Btn_pass_new') + _btn_pass.onClick:Set( + function() + if tip_hu then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + _gamectr:SendAction(_uid) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end + ) + + guo_msg:Show() + else + _gamectr:SendAction(_uid) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end + ) + end + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() + _chipeng_tip.x = _chipeng_tip.x + 200 + _chipeng_tip.y = _chipeng_tip.y - 50 +end +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local tip_hu = data[3] + local list = tip.tip_map_type[td.weight] + if (#list > 1) or td.type == 1 then + self:_ChiView( + list, + tip_hu, + function(id) + if tip_hu and td.type ~= 8 then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + _gamectr:SendAction(id) + guo_msg:Close() + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + ) + guo_msg:Show() + else + _gamectr:SendAction(id) + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + end + ) + --self._chipeng_tip.visible = false + return + end + if tip_hu and td.type ~= 8 then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + _gamectr:SendAction(td.id) + guo_msg:Close() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + if (self._chipeng_tip == nil) then + return + end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + ) + guo_msg:Show() + else + _gamectr:SendAction(td.id) + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + if (self._chipeng_tip == nil) then + return + end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end +end + +function M:_ChiView(tip_list, tip_hu, callback) + local _pop_tip_choice = UIPackage.CreateObject('Main_RunBeard', 'Pop_tip_choice') + local list_choose = _pop_tip_choice:GetChild('Lst_choose') + _pop_tip_choice:GetChild('dibtn').onClick:Add( + function() + _pop_tip_choice:Dispose() + end + ) + + list_choose:RemoveChildrenToPool() + for i = 1, #tip_list do + if tip_list[i].weight ~= 4 then + local item_choose = list_choose:AddItemFromPool() + item_choose:GetChild('card' .. 2).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', tip_list[i].OpCard[1])) + item_choose:GetChild('card' .. 3).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', tip_list[i].OpCard[2])) + item_choose:GetChild('card' .. 1).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', tip_list[i].card)) + + item_choose.onClick:Add( + function() + for k = 1, list_choose.numChildren do + list_choose:GetChildAt(k - 1):GetController('zhong').selectedIndex = 0 + end + item_choose:GetController('zhong').selectedIndex = 1 + if tip_list[i].bi_list == nil then + callback(tip_list[i].id) + else + self.bilist = {} + self._chiid = tip_list[i].id + self:CheckRatioCard(tip_list[i].bi_list, 1, tip_list[i].card) + end + end + ) + end + end + list_choose:ResizeToFit(#tip_list) + _pop_tip_choice:GetChild('di1').width = list_choose.width + 110 + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width) / 2, -100) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:CheckRatioCard(_tiplist, index, chicard, _biid, list) + if _biid ~= nil then + self.bilist = {} + self.bilist[#self.bilist + 1] = _biid + end + if self._pop_tip_choice == nil then + -- statements + return + end + self._pop_tip_choice:GetController('bipai').selectedIndex = index + local Bilist_choose = self._pop_tip_choice:GetChild('Bi_Lst_choose' .. index) + Bilist_choose:RemoveChildrenToPool() + for i = 1, #_tiplist do + local item = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Comp_choose') + local item_choose = Bilist_choose:AddChild(item) + item_choose:GetChild('card' .. 2).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', _tiplist[i].opcard[1])) + item_choose:GetChild('card' .. 3).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', _tiplist[i].opcard[2])) + item_choose:GetChild('card' .. 1).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', chicard)) + item_choose:GetController('zhong').selectedIndex = 0 + item_choose.onClick:Add( + function() + for k = 1, Bilist_choose.numChildren do + Bilist_choose:GetChildAt(k - 1):GetController('zhong').selectedIndex = 0 + end + item_choose:GetController('zhong').selectedIndex = 1 + if _tiplist[i].bi_list == nil then + if index == 1 then + self.bilist = {} + end + self.bilist[#self.bilist + 1] = i - 1 + if tip_hu then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + self._gamectr:SendAction(self._chiid, self.bilist) + guo_msg:Close() + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + ) + guo_msg:Show() + else + self._gamectr:SendAction(self._chiid, self.bilist) + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + else + self:CheckRatioCard(_tiplist[i].bi_list, 2, chicard, i - 1, #_tiplist) + end + end + ) + end + Bilist_choose:ResizeToFit(#_tiplist) + self._pop_tip_choice:GetChild('di' .. index + 1).width = Bilist_choose.width + 110 +end + +-- lua table 深拷贝 +function M:deepcopy(object) + local lookup_table = {} + local function _copy(object) + if type(object) ~= 'table' then + return object + elseif lookup_table[object] then + return lookup_table[object] + end + local new_table = {} + lookup_table[object] = new_table + for index, value in pairs(object) do + new_table[_copy(index)] = _copy(value) + end + return setmetatable(new_table, getmetatable(object)) + end + return _copy(object) +end + +function M:OnFangziAction(...) + local arg = {...} + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local num = arg[3] + --if fz.type == RB_FZType.Peng or fz.type == RB_FZType.Chi or fz.type == RB_FZType.Bi then + self:__CloseTip() + --end + if (player == self._room.self_player) then + local info = _player_card_info[self:GetPos(player.seat)] + info:UpdateIsOnClick(false) + end + self._popEvent = false + + local info = _player_card_info[self:GetPos(player.seat)] + info:UpdateFzList(player.fz_list, true, player.seat) --更新放子数组 + if (player == self._room.self_player) then + if fz.type == RB_FZType.Chi then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.Bi then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + info:DeleteHandCard(fz.card) + elseif fz.type == RB_FZType.Peng then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.Kan then + if #fz.opcard == 2 then + info:InitHandCard(false) + end + info:UpdateKan(fz.card) + elseif fz.type == RB_FZType.Wei then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.ChouWei then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.Pao then + if num > 0 then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + end + elseif fz.type == RB_FZType.Ti then + if num > 0 then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + end + end + coroutine.start( + function() + coroutine.wait(0.3) + if fz.type ~= RB_FZType.Kan then + info:SendChangeCard() + end + end + ) + end + if fz.type ~= RB_FZType.Kan and fz.type ~= RB_FZType.Bi then + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject('Extend_Poker_YueYangWHZ', 'FzEffect') + + if fz.type == RB_FZType.Peng then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "peng") + self:PlaySound(player.self_user.sex, 'F_Peng') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'peng') + elseif fz.type == RB_FZType.Chi then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "chi") + self:PlaySound(player.self_user.sex, 'F_Chi') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'chi') + elseif fz.type == RB_FZType.Wei then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "wei") + self:PlaySound(player.self_user.sex, 'F_Wai') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'wai') + elseif fz.type == RB_FZType.ChouWei then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Extend_Poker_RunBeard", "chouwei") + self:PlaySound(player.self_user.sex, 'F_Wai') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Extend_Poker_YueYangWHZ', 'chouwei') + elseif fz.type == RB_FZType.Pao then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "pao") + self:PlaySound(player.self_user.sex, 'F_KaiDuo') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'pao') + elseif fz.type == RB_FZType.Ti then + self:PlaySound(player.self_user.sex, 'F_SaoChuan') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'ti') + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "ti") + end + effect.touchable = false + effect.x, effect.y = 0, 0 + effect:GetTransition('t0'):Play() + pNode:AddChild(effect) + coroutine.start( + function() + coroutine.wait(1) + effect:Dispose() + end + ) + end + if (player == self._room.self_player) then + coroutine.start( + function() + coroutine.wait(0.5) + local info = _player_card_info[self:GetPos(player.seat)] + info:ShowHuTip() + end + ) + end + local removeOutcard = _player_card_info[self:GetPos(fz.from_seat)] + local p = self._room:GetPlayerBySeat(fz.from_seat) + if p.DiceCard ~= nil and fz.active_card == p.DiceCard then + removeOutcard:ClearOutCard() + p.DiceCard = nil + end + local list = self._room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + --print(p.hu_xi) + info._view:GetChild('huxi').text = p.hu_xi + end + + if player == self._room.self_player then + local info = _player_card_info[self:GetPos(player.seat)] + info:SetNotPutCard() + end + + self._popEvent = true + coroutine.start( + function() + coroutine.wait(0.15) + local info = _player_card_info[1] + info:UpdateIsOnClick(true) + end + ) +end + +function M:ReloadRoom() + local _gamectr = self._gamectr + local room = self._room + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + end + if room.discard == 0 then + self._leftcard = 1 + else + self._leftcard = 0 + end + for i = 1, #room.player_list do + local p = room.player_list[i] + if p.seat == room.banker_seat then + local head = self._player_info[self:GetPos(p.seat)] + head:MarkBank(true) + end + if p.ready then + self._player_info[self:GetPos(p.seat)]:Ready(true) + else + self._player_info[self:GetPos(p.seat)]:Ready(false) + end + + --if p.piao then + -- self._player_info[self:GetPos(p.seat)]:UpdatePiao(-1) + --else + self._player_info[self:GetPos(p.seat)]:UpdatePiao(p.piao) + --end + + if self._state.selectedIndex == 1 then + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('huxi').selectedIndex = 1 + info._view:GetChild('huxi').text = p.hu_xi + info._view:GetController('zhanji').selectedIndex = 0 + if room.hpOnOff == 1 or room:checkHpNonnegative() then + if p.total_hp == nil then + p.total_hp = 0 + end + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateQiPai(p.outcard_list) + card_info:UpdateFzList(p.fz_list, false, p.seat) + if p.DiceCard ~= nil and p.DiceCard ~= 0 then + card_info:UpdateOutCardList(p.DiceCard) + end + if DataManager.CurrenRoom.curren_outcard_seat == p.seat then + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 1 + end + if p.seat == self._room.self_player.seat then + card_info:ChuPaiTiShi() + if + self._room.self_player.card_list ~= nil and + #self._room.self_player.handcard_list == #self._room.self_player.card_list + then + local _list = self:deepcopy(self._room.self_player.card_list) + local cards = {} + for i = 1, #_list do + cards[#cards + 1] = _list[i].card_item + end + table.sort(cards, ViewUtil.HandCardSort) + table.sort(self._room.self_player.handcard_list, ViewUtil.HandCardSort) + + local isNot = false + for i = 1, #cards do + if cards[i] ~= self._room.self_player.handcard_list[i] then + isNot = true + end + end + if isNot == true then + card_info:InitHandCard(false) + else + card_info:UpdateHandCards(self._room.self_player.card_list) + end + else + card_info:InitHandCard(false) + end + -- card_info:ChuPaiTiShi() + card_info:ShowHuTip() + for i = 1, #p.fz_list do + if p.fz_list[i].type == RB_FZType.Kan then + card_info:UpdateKan(3, p.fz_list[i].card) + end + end + end + end + + self._tex_LeftCard.text = '剩余 ' .. room.left_count .. ' 张牌' + local rightpanel = self._view:GetChild('right_panel') + local tex_round = rightpanel:GetChild('tex_round') + if tex_round ~= nil then + tex_round.text = '第 ' .. room.curren_round .. ' 局' + end + self._view:GetChild('tex_round').text = '第 ' .. room.curren_round .. '/' .. room.room_config.round .. ' 局' +end + +function M:PlayChatSound(sex, chat_index) + local sex_path = ViewUtil.Sex_Chat[sex] + local path1 = string.format('extend/zipai/yueyangwaihuzi/sound/%s/chat_%s.mp3', sex_path, tostring(chat_index)) + ViewUtil.PlaySound('YueYang_ZP', path1) +end + +function M:PlaySound(sex, path) + local sex_path = ViewUtil.Sex_Chat[1] -- 1 男 2 女 + local sound_path = string.format('extend/zipai/yueyangwaihuzi/sound/%s/%s.mp3', sex_path, path) + ViewUtil.PlaySound('YueYang_ZP', sound_path) +end + +function M:__CloseTip() + if (self._chipeng_tip) then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if (self._pop_tip_choice) then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +function M:Destroy() + ZPMainView.Destroy(self) + UIPackage.RemovePackage('extend/zipai/yueyangwaihuzi/ui/Extend_Poker_YueYangWHZ') +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXPlayBackView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXPlayBackView.lua new file mode 100644 index 00000000..4371e666 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXPlayBackView.lua @@ -0,0 +1,627 @@ +local ZPPlayBackView = import('.main.ZPPlayBackView') +local PlayerSelfCardInfoView = import('.PlayerSelfCardInfoView') +local PlayerCardInfoView = import('.PlayerCardInfoView') +local RunBeard_ResultView = import('.RunBeard_ResultView') +local M = {} + +local Record_Event = { + Evt_OutCard = 'OutCard', + Evt_GetCard = 'GetCard', + Evt_Action = 'Action', + Evt_ThrowCard = 'ThrowCard', + Evt_AddCard = 'AddCard', + Evt_ChangePaiXing = 'ChangePaiXing', + Evt_Win = 'Win', + Evt_result = 'result' +} + +local function tableSortNumber(a, b) + return a.card_code_number > b.card_code_number +end + +--- Create a new +function M.new() + setmetatable(M, {__index = PlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = 'PlayBackView' + self:init() + + return self +end + +function M:InitView(url) + local room = self._room + self._gamectr = ControllerManager.GetController(GameController) + UIPackage.AddPackage('base/main_zipai/ui/Main_RunBeard') + UIPackage.AddPackage('extend/zipai/yueyangwaihuzi/ui/Extend_Poker_YueYangWHZ') + ZPPlayBackView.InitView(self, 'ui://Main_RunBeard/Main_' .. room.room_config.people_num) + UpdateBeat:Add(self.OnUpdate, self) + + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. room.game_id) + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + if typeface == 1 then + room.change_card_display = '2_' + else + room.change_card_display = '1_' + end + end + self._player_card_info = {} + local _player_card_info = self._player_card_info + for i = 1, room.room_config.people_num do + local tem = self._view:GetChild('player_card_info' .. i) + self._player_card_info[i] = self:NewPlayerPokerInfoView(tem, i) + end + local rightpanel = self._view:GetChild('right_panel') + self.btn_setting = rightpanel:GetChild('btn_setting') + self.btn_setting.visible = false + + self.tex_time = rightpanel:GetChild('tex_time') + self.tex_time.visible = false + + self.gcm_xinhao = rightpanel:GetChild('gcm_xinhao') + self.gcm_xinhao.visible = false + + self.pb_batteryLevel = rightpanel:GetChild('pb_batteryLevel') + self.pb_batteryLevel.visible = false + + local tex_round_item = rightpanel:GetChild('tex_round') + if tex_round_item ~= nil then + tex_round_item.text = '第 ' .. room.curren_round .. ' 局' + end + local btn_rule = rightpanel:GetChild('btn_log') + if btn_rule ~= nil then + btn_rule.onClick:Set( + function() + if self.RuleView == nil or self.RuleView._is_destroy then + self.RuleView = RoomInfoView.new(self._room) + end + self.RuleView:Show() + end + ) + end + local tex_roomid = rightpanel:GetChild('tex_roomid') + tex_roomid.text = room.room_id + rightpanel:GetChild('tex_gametype').text = room.room_config:GetGameName() + + self._tex_round = self._view:GetChild('tex_round') + self._tex_LeftCard = self._view:GetChild('remaining_card') + self._eventmap = {} + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_ThrowCard] = self.CmdThrowCard + self._cmdmap[Record_Event.Evt_AddCard] = self.CmdAddCard + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_ChangePaiXing] = self.CmdChangePaiXing + self._cmdmap[Record_Event.Evt_result] = self.onResult +end + +function M:NewPlayerPokerInfoView(view, index) + if index == 1 then + return PlayerSelfCardInfoView.new(view, self) + end + return PlayerCardInfoView.new(view, self) +end + +function M:FillRoomData(data) + if self._win_pic then + self._win_pic:Dispose() + end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local roominfo_panel = self._view:GetChild('roominfo_panel1') + roominfo_panel:GetChild('tex_roomid').text = room.room_id + roominfo_panel:GetChild('tex_gametype').text = room.room_config:GetGameName() + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:SetPlayer(p) + if p.seat == room.self_player.seat then + card_info:UpdateIsOnClick(false) + end + local infoHand = self._player_info[self:GetPos(p.seat)] + infoHand._view:GetController('huxi').selectedIndex = 1 + infoHand._view:GetChild('huxi').text = p.hu_xi + if p.total_hp then + infoHand._view:GetController('zhanji').selectedIndex = 0 + if room.hpOnOff == 1 or room:checkHpNonnegative() then + infoHand._view:GetController('zhanji').selectedIndex = 1 + infoHand._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + infoHand:UpdateScore() + end + end + self:UpdateRound(self._room.curren_round) + self:GenerateAllStepData(data) + self:ShowStep(1) + self:UpdateStep(1) +end + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateStep(index + 1) + self:UpdateLeftCard(step.left_card) + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hu_xi = step.player_card_data[i].hu_xi + p.hand_left_count = #p.card_list + + if index == 1 then + info:Clear() + if p.total_hp then + local avHand = self._player_info[self:GetPos(p.seat)] + local room = DataManager.CurrenRoom + avHand._view:GetController('zhanji').selectedIndex = 0 + if room.hpOnOff == 1 or room:checkHpNonnegative() then + avHand._view:GetController('zhanji').selectedIndex = 1 + avHand._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + avHand:UpdateScore() + end + end + if p.hu_xi ~= nil then + local infoHand = self._player_info[self:GetPos(p.seat)] + infoHand._view:GetChild('huxi').text = p.hu_xi + end + if step.cmd == Record_Event.Evt_Action then + if p.fz_list ~= nil and #p.fz_list > 0 then + info:UpdateFzList(p.fz_list) + end + end + + if p.seat ~= self._room.self_player.seat then + info:InitHandCard(p.card_list) + else + self._room.self_player.handcard_list = p.card_list + info:InitHandCard(false) + end + + --[[if step.cmd == Record_Event.Evt_ChangePaiXing then + local _card_list = {} + for i = 1, #step.card_list do + local data = {} + data.card_item = step.card_list[i].card + data.index_X = step.card_list[i].X + data.index_Y = step.card_list[i].Y + _card_list[#_card_list + 1] = data + end + local info = self._player_card_info[self:GetPos(step.seat)] + if step.card_list[1].card ~= nil then + info:UpdateHandCards(_card_list) + else + info:UpdateHandCards(step.card_list) + end + end--]] + + if step.cmd == Record_Event.Evt_OutCard or step.cmd == Record_Event.Evt_GetCard then + if step.DiceCard ~= nil and step.DiceCard ~= 0 then + if p.seat == step.seat then + info:UpdateOutCardList(step.DiceCard) + coroutine.start( + function() + coroutine.wait(1.5) + info:ClearOutCard() + end + ) + end + end + end + if p.outcard_list ~= nil then + info:UpdateQiPai(p.outcard_list) + end + end + -- print("step.cmd ",step.cmdm,Record_Event.Evt_Win) + if step.cmd == Record_Event.Evt_result then + --[[local _room = DataManager.CurrenRoom + local result = step.result + self._win_pic = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/胡') + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + + if result ~= nil then + if self._clearingView == nil then + self._clearingView = RunBeard_ResultView.new(self._view) + coroutine.start( + function() + coroutine.wait(0.5) + self._clearingView:Show() + end + ) + end + local data = result.data.info_list + self._clearingView:InitData( + 0, + _room, + result.data, + nil, + function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + -- p.cur_hp = data[i]['cur_hp'] or 0 + -- if data[i]['hp_info'] then + -- p.cur_hp = data[i].hp_info.cur_hp + -- end + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + if data[i]['hp_info'] then + p.total_score = d2ad(data[i].hp_info.cur_hp) + local stotal_hp = data[i].hp_info.total_hp + info._view:GetController('zhanji').selectedIndex = 0 + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(stotal_hp) + end + end + info:UpdateScore(p.total_score) + end + self._clearingView = nil + end + ) + end--]] + else + if self._win_pic then + self._win_pic:Dispose() + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = '' + step.left_card = info.left_card + step.win = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.hu_xi = 0 + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + data.seat = cmd.seat + data.DiceCard = cmd.data.card +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + data.seat = cmd.seat + data.DiceCard = cmd.data.card +end +function M:CmdThrowCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + data.current_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + data.out_card_list = cmd.data.card + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end +function M:CmdAddCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + local _room = self._room + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card +end + +function M:onResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result = cmd.result +end + +function M:CmdChangePaiXing(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + data.card_list = cmd.data.card_list +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + local p = data.player_card_data[cmd.seat] + local fz = {} + p.hu_xi = cmd.data.hu_xi + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.active_card = cmd.data.card + fz.opcard = cmd.data.opcard + local opcard = fz.opcard + local ftype = fz.type + local card = fz.card + local remove_num = #opcard + if ftype == RB_FZType.Chi then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Bi then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + list_remove(p.card_list, fz.card) + elseif ftype == RB_FZType.Peng then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Kan then + local _room = self._room + if #opcard == 2 then + p.card_list[#p.card_list + 1] = card + end + elseif ftype == RB_FZType.ChouWei then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, 2 do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Wei then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Pao then + local num = 0 + for i = 1, #p.card_list do + if card == p.card_list[i] then + num = num + 1 + end + end + local isAddTi = false + for i = 1, #p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type = RB_FZType.Pao + isAddTi = true + end + end + if num > 0 then + for i = 1, num do + list_remove(p.card_list, card) + end + + if isAddTi == false then + p.fz_list[#p.fz_list + 1] = fz + end + end + elseif ftype == RB_FZType.Ti then + local num = 0 + for i = 1, #p.card_list do + if card == p.card_list[i] then + num = num + 1 + end + end + local isAddTi = false + for i = 1, #p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type = RB_FZType.Ti + isAddTi = true + end + end + if num > 0 then + for i = 1, num do + list_remove(p.card_list, card) + end + + if isAddTi == false then + p.fz_list[#p.fz_list + 1] = fz + end + end + end +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = '剩余 ' .. num .. ' 张牌' +end + +function M:UpdateRound(round) + self._tex_round.text = '第 ' .. round .. '/' .. self._room.room_config.round .. ' 局' +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = self:deepcopy(last_step) + step.player_card_data = {} + local card_data = step.player_card_data + for i = 1, #last_step.player_card_data do + card_data[i] = {} + card_data[i].card_list = self:deepcopy(last_step.player_card_data[i].card_list) + card_data[i].outcard_list = self:deepcopy(last_step.player_card_data[i].outcard_list) + card_data[i].fz_list = self:deepcopy(last_step.player_card_data[i].fz_list) + card_data[i].hand_left_count = #card_data[i].card_list + card_data[i].hu_xi = self:deepcopy(last_step.player_card_data[i].hu_xi) + end + self._step[#self._step + 1] = step + return step +end + +-- lua table 深拷贝 +function M:deepcopy(object) + local lookup_table = {} + local function _copy(object) + if type(object) ~= 'table' then + return object + elseif lookup_table[object] then + return lookup_table[object] + end + local new_table = {} + lookup_table[object] = new_table + for index, value in pairs(object) do + new_table[_copy(index)] = _copy(value) + end + return setmetatable(new_table, getmetatable(object)) + end + return _copy(object) +end + +function M:NextRecordPlay() + local result = PlayBackView.NextRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() +end + +function M:LastRecordPlay() + local result = PlayBackView.LastRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() +end + +function M:Play() + self:ChangeAlpha() + self:ChangePlayState(not self._play) + if not self._play then + return + end + if (self._currentStep == #self.cmdList and self._playFoward) or (self._currentStep == 0 and not self._playFoward) then + self._currentStep = 0 + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:ChangePlayState(state) + self._play = state + self:ChangeTextSpeed() + local btn_play = self._view:GetChild('panel_record'):GetChild('btn_play') + if self._play then + btn_play:GetController('state').selectedIndex = 1 + else + btn_play:GetController('state').selectedIndex = 0 + end +end + +function M:ChangeTextSpeed() + local str1 = self._play and self._speed or '' + self._view:GetChild('panel_record'):GetChild('tex_speed').text = str1 + local str2 = + not self._play and (self._playFoward and '播放暂停' or '回退暂停') or + self._playFoward and (self._speed == 1 and '播放' or '快进') or + (self._speed == 1 and '回退' or '快退') + self._view:GetChild('panel_record'):GetChild('tex_2').text = str2 + local str3 = self._play and '倍速度' or '' + self._view:GetChild('panel_record'):GetChild('tex_1').text = str3 +end + +function M:CmdLeftArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if not self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = false + self:ChangeTextSpeed() + end +end + +function M:CmdRightArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:OnUpdate() + if self._play then + if (self._currentStep == #self.cmdList and self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像结尾了,再次点击播放按钮可重新播放') + return + elseif (self._currentStep == 0 and not self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像开头了,再次点击播放按钮可重新播放') + return + end + self._timer = self._timer + Time.deltaTime + if self._timer >= 1 / self._speed then + self._timer = 0 + local step = self._playFoward and 1 or -1 + self._currentStep = self._currentStep + step + self:ShowStep(self._currentStep) + end + end +end + +function M:Destroy() + UpdateBeat:Remove(self.OnUpdate, self) + PlayBackView.Destroy(self) +end + +function M:UpdateStep(step) + self._record:GetChild('tex_step').text = '第 ' .. step .. ' / ' .. #self._step .. '步' +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXPlayer.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXPlayer.lua new file mode 100644 index 00000000..fe112fd2 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXPlayer.lua @@ -0,0 +1,37 @@ + + +local EXPlayer ={ + -- 手牌列表 + card_list = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil, + hu_xi =0 +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 + self.hu_xi =0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXPlayerInfoView.lua new file mode 100644 index 00000000..7d32adea --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXPlayerInfoView.lua @@ -0,0 +1,52 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + + +--[[function M:FillData(player) + + + PlayerInfoView.FillData(self, player) + if player.cur_hp ~= nil then + self:UpdateScore(d2ad(player.cur_hp)) + else + local rt = 1 + if self._main_view._room.hpOnOff == 1 then + rt = self._main_view._room.score_times + end + self:UpdateScore(player.total_score * rt) + end + + +end--]] + +function M:UpdatePiao(piao) + + if piao == nil or piao == -1 then + self._view:GetChild("piao").text = "" + elseif piao == 0 then + self._view:GetChild("piao").text = "不飘" + elseif piao == 1 then + self._view:GetChild("piao").text = "飘1分" + elseif piao == 2 then + self._view:GetChild("piao").text = "飘2分" + elseif piao == 3 then + self._view:GetChild("piao").text = "飘3分" + elseif piao == 5 then + self._view:GetChild("piao").text = "飘5分" + elseif piao == 8 then + self._view:GetChild("piao").text = "飘8分" + end +end + + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXRoomConfig.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXRoomConfig.lua new file mode 100644 index 00000000..bd98fbf4 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/EXRoomConfig.lua @@ -0,0 +1,506 @@ + +local M = {} + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) +self.config=config + self.class = "RoomConfig" + self.round = config["times"] + self.mode = config["mode"] + self.tun = config["tun"] + self.fengding = config["fengding"] + self.tuanyuan = config["tuanyuan"] + self.hanghangxi = config["hanghangxi"] + self.siqi = config["siqi"] + self.shuahou = config["shuahou"] + self.huangfan = config["huangfan"] + self.jiaxingxing = config["jiaxingxing"] + self.tinghu = config["tinghu"] + self.duizifu = config["duizifu"] + self.back = config["back"] + self.yuan = config["yuan"] + self.tianhu =config["tianhu"] + self.dihu =config["dihu"] + self.haihu =config["haihu"] + self.maxPlayers = config["maxPlayers"] + self.qupai = config["qupai"] + self.isHidden = config.isHidden + + self.hh = config["hh"] or 0 + self.dh = config["dh"] or 0 + self.hw = config["hw"] or 0 + self.wh = config["wh"] or 0 + + self.hd = config["hd"] or 0 + self.wd = config["wd"] or 0 + self.jhd = config["jhd"] or 0 + + self.dhdf = config["dhdf"] or 0 + return self +end + +--[[function M:GetDes(sp) + sp = sp or " " + local count=0 + local str = self.round and self.round .. "局" .. " " or "" + str = str .. RoomConfig.GetDes(self, sp).."\n" + + + if self.config["kawai"]==0 then + str = str .."卡歪" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + tr = str .."不卡歪" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["first_rand_zhuang"] then + str = str .."首局随机庄" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["zhuang_di_hu"]==0 then + str = str .."庄家地胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + tr = str .."庄家不地胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["hao_config"]==0 then + str = str .."豪123" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + tr = str .."豪234" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["hao_jiabei"]==0 then + str = str .."-不加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["hao_jiabei"]==1 then + str = str .."低于10分加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["hao_jiabei"]==2 then + str = str .."低于20分加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["hao_jiabei"]==3 then + str = str .."低于30分加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["hao_jiabei"]==4 then + str = str .."低于40分加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["hao_jiabei"]==5 then + str = str .."低于50分加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["ming_tang"]==0 then + str = str .."名堂60/80/100" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str .."名堂80/100/120" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["piao"]==0 then + str = str .."不飘" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["piao"]==1 then + str = str .."飘123" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["piao"]==2 then + str = str .."飘235" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["piao"]==3 then + str = str .."飘258" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["qupai"]==0 then + str = str .."不抽" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["piao"]==1 then + str = str .."抽10" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["piao"]==2 then + str = str .."抽19" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + return str +end--]] + + +function M:GetDes(sp) + + sp = sp or " " + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + + if self.config["kawai"]==0 then + str = str .."卡歪" + str = str ..sp + + else + str = str .."不卡歪" + str = str ..sp + end + + + if self.config["first_rand_zhuang"] then + str = str .."首局随机庄" + str = str .. sp + end + + if self.config["zhuang_di_hu"]==0 then + str = str .."庄家地胡" + str = str ..sp + + else + str = str .."庄家不地胡" + str = str ..sp + + end + + --printlog("1111111111111111111111111",self.config["hao_config"]) + if self.config["hao_config"]==0 then + str = str .."豪123" + + str = str ..sp + + else + str = str .."豪234" + + str = str ..sp + end + + if self.config["hao_jiabei"]==0 then + str = str .."-不加倍" + + str = str ..sp + + elseif self.config["hao_jiabei"]==1 then + str = str .."低于10分加倍" + + str = str ..sp + + elseif self.config["hao_jiabei"]==2 then + str = str .."低于20分加倍" + + str = str ..sp + + elseif self.config["hao_jiabei"]==3 then + str = str .."低于30分加倍" + + str = str ..sp + + elseif self.config["hao_jiabei"]==4 then + str = str .."低于40分加倍" + + str = str ..sp + + elseif self.config["hao_jiabei"]==5 then + str = str .."低于50分加倍" + + str = str ..sp + + end + + if self.config["ming_tang"]==0 then + str = str .."名堂60/80/100" + + str = str ..sp + + else + str = str .."名堂80/100/120" + + str = str ..sp + + end + + + if self.config["piao"]==0 then + str = str .."不飘" + + str = str ..sp + + elseif self.config["piao"]==1 then + str = str .."飘123" + str = str ..sp + + elseif self.config["piao"]==2 then + str = str .."飘235" + str = str ..sp + + elseif self.config["piao"]==3 then + str = str .."飘258" + + str = str ..sp + + end + + + if self.config["qupai"]==0 then + str = str .."不抽" + + str = str ..sp + + elseif self.config["piao"]==1 then + str = str .."抽10" + + str = str ..sp + + elseif self.config["piao"]==2 then + str = str .."抽19" + + str = str ..sp + + end + + return str +end + + +function M:GetGameName() + return self.maxPlayers .. '人岳阳歪胡子' +end + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_Poker_YueYangWHZ/gamerule") + return gamerulepanel +end + + +function M:GetGameSMSize() + return 467,500 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/ExtendConfig.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/ExtendConfig.lua new file mode 100644 index 00000000..38176923 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/ExtendConfig.lua @@ -0,0 +1,241 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import('.EXGameInfo') +local EXMainView = import('.EXMainView') +local EXGameController = import('.EXGameController') +local EXRoomConfig = import('.EXRoomConfig') +local EXPlayBackView = import('.EXPlayBackView') +local explayer = import('.EXPlayer') +local ExtendConfig = {} + +local M = ExtendConfig + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = 'ExtendConfig' + self.extend_id = 13 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage('extend/zipai/yueyangwaihuzi/ui/Info_Poker_YueYangWHZ') + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage('extend/zipai/yueyangwaihuzi/ui/Extend_Poker_YueYangWHZ') + ResourcesManager.UnLoadGroup('YueYang_ZP') +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:FillRoomConfig(room, _config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + printlog("初始化数据===>>>") + pt(s2croom) + local room = DataManager.CurrenRoom + local reload = s2croom['reload'] + local _tableInfo = s2croom['tableInfo'] + + local _config = _tableInfo['config'] + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo['playerData'] + room.curren_round = _tableInfo['round'] + for i = 1, #playerList do + local _jp = playerList[i] + + local p = explayer.new() + p.seat = _jp['seat'] + local online = _jp['online'] + p.line_state = online + p.ready = _jp['ready'] == 1 and true or false + --p.piao=_jp['piao'] + local pid = _jp['aid'] + if (DataManager.SelfUser.account_id == pid) then + room.self_player = p + p.self_user = DataManager.SelfUser + else + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp['nick'] + u.head_url = _jp['portrait'] + u.sex = _jp['sex'] + end + p.entrust = _jp['entrust'] + p.self_user.host_ip = _jp['ip'] + p.self_user.location = Location.new(_jp['pos'] or '') + p.cur_hp = _jp['cur_hp'] or 0 + p.total_hp = _jp['total_hp'] or 0 + if _jp['hp_info'] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + room:AddPlayer(p) + end + + -- 如果重写了player类,就需要传第二个参数 + -- self:FillPlayerData(playerList, explayer) + + if (reload) then + local _reloadInfo = s2croom['reloadInfo'] + room.self_player.currentNotPutCardList=_reloadInfo['notput'] + local _hand_card = _reloadInfo['hand_card'] + local _card_list = _reloadInfo['card_list'] + local _discard = _reloadInfo['discard'] + room.discard = _discard + -- local _index = _reloadInfo["typeface"] + -- if _index ==1 then + -- room.change_card_display = "2_" + -- else + -- room.change_card_display = "1_" + -- end + room.self_player.handcard_list = _hand_card + room.self_player.card_list = {} + for i = 1, #_card_list do + local data = {} + data.card_item = _card_list[i].card + data.index_X = _card_list[i].X + data.index_Y = _card_list[i].Y + room.self_player.card_list[#room.self_player.card_list + 1] = data + end + local active_seat = _reloadInfo['active_seat'] + local bank_seat = _reloadInfo['banker_seat'] + local playing = _reloadInfo['playing'] + local _info_list = _reloadInfo['info_list'] + local last_outcard_seat = _reloadInfo['last_outcard_seat'] + + room.left_count = _reloadInfo['left_card'] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo['curren_outcard_seat'] + if active_seat ~= 0 then + local player = room:GetPlayerBySeat(active_seat) + player.DiceCard = _reloadInfo['acitve_card'] + end + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i = 1, #_info_list do + local tem = _info_list[i] + local playerid = tem['playerid'] + local p = room:GetPlayerById(playerid) + local outcard_list = tem['outcard_list'] + p.outcard_list = outcard_list + p.total_score = tem['score'] + p.hu_xi = tem['hu_xi'] + p.hand_left_count = tem['card_count'] + p.cur_hp = tem['cur_hp'] or 0 + p.total_hp = tem['total_hp'] or 0 + if tem['hp_info'] then + p.cur_hp = tem.hp_info.cur_hp + p.total_hp = tem.hp_info.total_hp + end + p.entrust = tem['entrust'] + p.piao=tem['piao'] + local opcard = tem['opcard'] + for k = 1, #opcard do + local op = opcard[k] + local fz = {} + fz.type = op['type'] + local data = {} + data[1] = op['card1'] + data[2] = op['card3'] + fz.opcard = data + fz.card = op['card2'] + fz.active_card = op['card2'] + + p.fz_list[#p.fz_list + 1] = fz + if p.seat == room.self_player.seat then + if fz.type == RB_FZType.Kan then + for i = 1, 3 do + room.self_player.handcard_list[#room.self_player.handcard_list + 1] = fz.card + end + end + end + end + pt(p) + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data['info'] + + local _config = _tableInfo['config'] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config['ownerid'] + local active_seat = _tableInfo['active_seat'] + local bank_seat = _tableInfo['banker_seat'] + room.left_count = _tableInfo['left_card'] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo['round'] + + local _info_list = _tableInfo['playerData'] + for i = 1, #_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp['seat'] + local online = _jp['online'] + p.line_state = online + p.ready = _jp['ready'] == 1 and true or false + local pid = _jp['aid'] + if pid == DataManager.SelfUser.account_id then + room.self_player = p + end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp['nick'] + u.head_url = _jp['portrait'] + u.sex = _jp['sex'] + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp['hand_card'] + p.hand_card = _hand_card + if room.self_player ~= nil and p.seat == room.self_player.seat then + room.self_player.handcard_list = _hand_card + end + p.total_score = _jp['score'] + p.hand_left_count = #_hand_card + p.cur_hp = _jp['cur_hp'] or 0 + p.total_hp = _jp['total_hp'] or 0 + if _jp['hp_info'] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data['cmdList'] + room.result = pd_data['result'] +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/PlayerCardInfoView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/PlayerCardInfoView.lua new file mode 100644 index 00000000..2a3b48b6 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/PlayerCardInfoView.lua @@ -0,0 +1,268 @@ +local PlayerCardInfoView = import(".main.ZPPlayerCardInfoView") + +local M = {} +function M.new(view,mainView) + + setmetatable(M, {__index = PlayerCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + + + +function M:UpdateFzList( fz_list ,ispaly,seat) + self._area_fz_list:RemoveChildren(0,-1,true) + for i = 1,#fz_list do + local fzitem = nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/ComponentNew") + if(ispaly == false)then + fzitem:RemoveChildren(0,-1,true) + end + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetController("c2").selectedIndex =1 + fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].active_card) + fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[1]) + fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[2]) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Peng then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Wei then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Pao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Ti then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + if self._mainView._leftcard ==1 and self._player.seat ~= DataManager.CurrenRoom.banker_seat then + for j=1,4 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + else + for j=1,4 do + if j==4 then + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + else + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + end + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + end + end +end + +function M:playAnim(fzitem,fzcards, size,i,ispaly,seat) + if(ispaly == nil)then + ispaly =false + end + + local isaddLast = false + if(ispaly and i == size)then --匹配最后一个牌 + local faArray= fzitem:GetChild("chiwei1") + + if(DataManager.CurrenRoom.room_config.people_num ==3)then + if(DataManager.CurrenRoom.self_player.seat == 1)then + if(seat == 2)then + faArray= fzitem:GetChild("chiwei1") + else + faArray= fzitem:GetChild("chiwei") + end + elseif(DataManager.CurrenRoom.self_player.seat == 2) then + if(seat == 3)then + faArray= fzitem:GetChild("chiwei1") + else + faArray= fzitem:GetChild("chiwei") + end + elseif(DataManager.CurrenRoom.self_player.seat == 3)then + if(seat == 1)then + faArray= fzitem:GetChild("chiwei1") + else + faArray= fzitem:GetChild("chiwei") + end + end + end + + if(faArray~=nil)then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end + if(seat~=nil)then + isaddLast = self:isAddFirst(seat) + end + if(isaddLast)then + local index_postion = 0 + self._area_fz_list:AddChildAt(fzitem,index_postion) + else + self._area_fz_list:AddChild(fzitem) + end +end + +function M:isAddFirst(seat) + local isaddLast = false + if(DataManager.CurrenRoom.room_config.people_num ==3)then + if(DataManager.CurrenRoom.self_player.seat == 1)then + if(seat == 2)then + isaddLast = true + end + elseif(DataManager.CurrenRoom.self_player.seat == 2)then + if(seat == 3)then + isaddLast = true + end + elseif(DataManager.CurrenRoom.self_player.seat == 3)then + if(seat == 1)then + isaddLast = true + end + end + elseif DataManager.CurrenRoom.room_config.people_num ==2 then + isaddLast = true + end + return isaddLast +end + +function M:PlayingOutCardAnima(card) + coroutine.start(function() + coroutine.wait(0.1) + self:ClearOutCard() + end) +end + +function M:UpdateOutCardList(outcard,isShow,isMopai,seat) + if(isShow == nil) then + isShow = false + end + if(isMopai == nil) then + isMopai = false + end + + self._area_outcard_list:RemoveChildren(0,-1,true) + local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + + if outcard==0 then + outcards:GetChild("icon").icon ="ui://Main_RunBeard/202_1_300" + else + outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/203_",outcard) + end + outcards.x,outcards.y = 0,0 + local show_di_bg = outcards:GetChild("show_di_bg") + --show_di_bg.visible = true + if(isShow)then + if outcard == 0 then + show_di_bg.visible = false + end + if(seat ~= nil and outcards~=nil)then + if(DataManager.CurrenRoom.room_config.people_num ==3)then + if(seat ==2)then + seat = 3 + elseif(seat == 3)then + seat =2 + end + elseif DataManager.CurrenRoom.room_config.people_num ==2 then + seat = 3 + end + if(isMopai)then + if outcard ~= 0 then + outcards:GetTransition("mopai"..seat):Play(function( ) + -- show_di_bg.visible = true + + end) + end + else + show_di_bg.visible = false + outcards:GetTransition("cpai"..seat):Play() + end + else + --show_di_bg.visible = true + end + else + show_di_bg.visible = false + end + self._area_outcard_list:AddChild(outcards) +end + +--弃牌 +function M:UpdateQiPai( qi_list,ispaly,seat) + self._area_qipai_list:RemoveChildren(0,-1,true) + for i=1,#qi_list do + local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + qicards:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",qi_list[i]) + if(ispaly)then + if(i == #qi_list) then + if(DataManager.CurrenRoom.room_config.people_num ==2)then + qicards:GetTransition("t0"):Play() + else + if(DataManager.CurrenRoom.self_player.seat == 1)then + if(seat == 2)then + qicards:GetTransition("t0"):Play() + else + qicards:GetTransition("t1"):Play() + end + elseif(DataManager.CurrenRoom.self_player.seat == 2)then + if(seat == 3)then + qicards:GetTransition("t0"):Play() + else + qicards:GetTransition("t1"):Play() + end + elseif(DataManager.CurrenRoom.self_player.seat == 3)then + if(seat == 1)then + qicards:GetTransition("t0"):Play() + else + qicards:GetTransition("t1"):Play() + end + else + qicards:GetTransition("t0"):Play() + end + + end + end + end + self._area_qipai_list:AddChild(qicards) + end + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/PlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/PlayerSelfCardInfoView.lua new file mode 100644 index 00000000..22462dbb --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/PlayerSelfCardInfoView.lua @@ -0,0 +1,503 @@ +local PlayerSelfCardInfoView = import(".main.ZPPlayerSelfCardInfoView") +local CardCheck = import(".main.CardCheck") +local M = {} +-- +function M.new(view,mainView) + setmetatable(M, {__index = PlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self._full = true + self:init() + return self +end + + +function M:onTouchBegin(context) + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + local button = context.sender + local card = button.data + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self:ShowHuTip(card.card_item) + end + card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/203_",card.card_item) + card.btn_card.sortingOrder = 100 + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + card.btn_card.xy = Vector2.New(card.btn_card.x+20 ,card.btn_card.y-50) + card.touch_pos = xy - button.xy + +end + +function M:ClearMpList(mpList) + local tempList={} + for k,v in pairs(mpList) do + if #v>0 then + table.insert(tempList,v) + end + end + + return tempList +end + +function M:__OnDragEnd(context) + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + if self.outcard_button then + self.outcard_button = nil + end + local button = context.sender + + local card = button.data + + local _room = DataManager.CurrenRoom + card.btn_card.sortingOrder = 0 + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + local currentCtrS=IsHasDictionary(card.card_item,DataManager.CurrenRoom.self_player.currentNotPutCardList) + if currentCtrS==nil then currentCtrS=false end + if (button.y < -380 and _room.curren_outcard_seat == _room.self_player.seat) and currentCtrS==false then + button.touchable = false + self.outcard_button = card + self:UpdateIsOnClick(false) + self._mainView:OutCard(card.card_item) + else + local isChangeCard = false + self.outcard_button = nil + card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/201_",card.card_item) + self._area_handcard_list:AddChild(button) + if #self.card_list == 1 then + isChangeCard = false + self:UpdateHandCardsPos() + return + end + local CountCards = {} + for i=1,#self.card_list do + local lists = {} + if CountCards[self.card_list[i].index_X] == nil then + lists[#lists+1] = self.card_list[i] + CountCards[self.card_list[i].index_X]= lists + else + CountCards[self.card_list[i].index_X][#CountCards[self.card_list[i].index_X]+1] =self.card_list[i] + end + end + + CountCards=self:ClearMpList(CountCards) + + local minmark = 1 + local maxmark = #self.card_list + if card == self.card_list[1] or card == self.card_list[#self.card_list] then + if self.card_list[1].index_X == self.card_list[2].index_X then + minmark =2 + end + if self.card_list[#self.card_list].index_X == self.card_list[#self.card_list-1].index_X then + maxmark =#self.card_list-1 + end + end + if button.x+button.width/2 < self.card_list[minmark].btn_card.x and #CountCards<12 then + list_remove(self.card_list,card) + local num = 0 + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num+1 + end + end + if num ==0 then + for i=1,#self.card_list do + if self.card_list[i].index_X < card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + else + for i=1,#self.card_list do + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + card.index_X =1 + card.index_Y =1 + table.insert(self.card_list,1,card) + isChangeCard = true + elseif button.x+button.width/2 > (self.card_list[maxmark].btn_card.x +button.width) and #CountCards<12 then + list_remove(self.card_list,card) + local num = 0 + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X then + num = num+1 + end + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + end + if num ==0 then + for i=1,#self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + end + card.index_X =self.card_list[#self.card_list].index_X+1 + card.index_Y =1 + self.card_list[#self.card_list+1] =card + isChangeCard = true + else + local MoveCard = false + local MoveCardPos = 0 + local MoveCardY = 0 + for i=1,#CountCards do + if CountCards[i] then + local card_view = CountCards[i][1] + if card_view~=nil then + if button.x+button.width/2 > card_view.old_postion.x and button.x+button.width/2 < (card_view.old_postion.x+button.width) then + if card ~= card_view and #CountCards[i] <4 and card.index_X ~= card_view.index_X then + + MoveCardPos = i + MoveCardY = #CountCards[i]+1 + MoveCard = true + list_remove(self.card_list,card) + end + end + end + end + + end + local MoveCardindex = 0 + -- local MoveCardY = 0 + if button.x+button.width/2 > card.old_postion.x and button.x+button.width/2 < (card.old_postion.x+button.width) then + if #CountCards[card.index_X]>1 then + for i=1,#CountCards[card.index_X] do + local _cv = CountCards[card.index_X][i] + if _cv ~= card then + if button.y+button.height/2 > _cv.btn_card.y and button.y+button.height/2 < (_cv.btn_card.y+button.height) then + --向下移動 + if ((button.y+button.height/2) +20) > (card.old_postion.y+button.height) then + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + --向上移動 + elseif ((button.y+button.height/2) -20) < card.old_postion.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + end + elseif i == #CountCards[card.index_X] and button.y+button.height/2 < _cv.btn_card.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + elseif i == 1 and button.y+button.height/2 > (_cv.btn_card.y+button.width) then + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + end + end + end + end + + end + if MoveCard ==true and MoveCardindex ==0 then + local num = 0 + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num+1 + end + end + if num ==0 then + for i=1,#self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + if MoveCardPos > card.index_X then + MoveCardPos = MoveCardPos-1 + end + end + card.index_X =MoveCardPos + card.index_Y =MoveCardY + for i=#self.card_list,1,-1 do + if MoveCardPos == self.card_list[i].index_X then + table.insert(self.card_list,(i+1),card) + break + end + end + isChangeCard = true + --上下移动 + elseif MoveCard ==true and MoveCardindex ~= 0 then + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X then + --向下移动 + if MoveCardindex == -1 then + if self.card_list[i].index_Y < card.index_Y and self.card_list[i].index_Y >= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y + 1 + + end + --向上移动 + else + if self.card_list[i].index_Y > card.index_Y and self.card_list[i].index_Y <= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + + end + end + end + end + card.index_X =MoveCardPos + card.index_Y =MoveCardY + for i=#self.card_list,1,-1 do + if MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY-1) then + table.insert(self.card_list,(i+1),card) + break + elseif MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY+1) then + table.insert(self.card_list,i,card) + break + end + end + isChangeCard = true + else + isChangeCard = false + self._area_handcard_list:AddChild(button) + end + + end + self:UpdateHandCardsPos() + if isChangeCard ==true then + self:SendChangeCard() + end + end +end + +function M:UpdateOutCardList(outcard,isShow,isMopai,seat) + if(isShow == nil) then + isShow = false + end + if(isMopai == nil) then + isMopai = false + end + self._area_outcard_list:RemoveChildren(0,-1,true) + local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + + if outcard==0 then + outcards:GetChild("icon").icon ="ui://Main_RunBeard/202_1_300" + else + outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/203_",outcard) + end + outcards.x,outcards.y = 0,0 + local show_di_bg = outcards:GetChild("show_di_bg") + -- show_di_bg.visible = true + if(isShow)then + if outcard == 0 then + show_di_bg.visible = false + end + if(seat ~= nil and outcards~=nil)then + if(isMopai)then + if outcard ~= 0 then + outcards:GetTransition("mopai"..seat):Play(function( ) + -- show_di_bg.visible = true + + end) + end + else + show_di_bg.visible = false + outcards:GetTransition("cpai"..seat):Play() + end + else + --show_di_bg.visible = true + end + else + show_di_bg.visible = false + end + self._area_outcard_list:AddChild(outcards) +end + +--弃牌 +function M:UpdateQiPai( qi_list,isplay) + self._area_qipai_list:RemoveChildren(0,-1,true) + for i=1,#qi_list do + local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + qicards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/202_",qi_list[i]) + if(isplay)then + if(i == #qi_list) then + qicards:GetTransition("t0"):Play() + end + end + self._area_qipai_list:AddChild(qicards) + end +end + +--摸牌动画 +function M:PlayingOutCardAnima( card) + coroutine.start(function() + coroutine.wait(0.1) + self:ClearOutCard() + end) +end + +function M:UpdateFzList( fz_list ,ispaly) + self._area_fz_list:RemoveChildren(0,-1,true) + for i = 1,#fz_list do + local fzitem=nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/ComponentNew") + if(ispaly == false)then + fzitem:RemoveChildren(0,-1,true) + end + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].active_card) + fzcards:GetController("c2").selectedIndex = 1 + fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[1]) + fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[2]) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Peng then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Wei then + + --[[ local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetController("c1").selectedIndex=1 + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly)--]] + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Pao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Ti then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + if j==4 then + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + else + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + end + end +end + + +function M:playAnim( fzitem,fzcards, size,i,ispaly ) + if(ispaly == nil)then + ispaly =false + end + if(ispaly and i == size)then + local faArray= fzitem:GetChild("chiwei") + if(faArray~=nil)then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end + self._area_fz_list:AddChild(fzitem) +end + + + --出牌提示动画 + function M:ChuPaiTiShi() + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + local chu_player = DataManager.CurrenRoom.self_player + local selfplayeTable = {} + selfplayeTable.handcard_list = chu_player.handcard_list + selfplayeTable.fz_list = chu_player.fz_list + selfplayeTable.tiCount = chu_player.tiCount + selfplayeTable.paoCount = chu_player.paoCount + selfplayeTable.hu_xi = chu_player.hu_xi + local player = membe_deep_clone(selfplayeTable) + local mark_ting= {} + for i=1,#DataManager.CurrenRoom.self_player.handcard_list do + local card = DataManager.CurrenRoom.self_player.handcard_list[i] + list_remove(player.handcard_list, card) + local _player = membe_deep_clone(player) + local tingList = CardCheck.tingPai(_player,DataManager.CurrenRoom) + local isKan = false + for j=1,#player.fz_list do + if card == player.fz_list[j].card and player.fz_list[j].type == RB_FZType.Kan then + isKan =true + end + end + if #tingList > 0 and isKan == false then + + mark_ting[#mark_ting+1] = card + end + table.insert(player.handcard_list, card) + table.sort( player.handcard_list, ViewUtil.HandCardSort) + end + -- print("ChuPaiTiShi",#mark_ting) + --pt(mark_ting) + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self._view :GetController("chupai").selectedIndex =1 + if #mark_ting>0 then + for i=1,#mark_ting do + for k=1,#self.card_list do + local card_view= self.card_list[k] + if card_view.card_item == mark_ting[i] then + card_view.btn_card:GetController("mark_ting").selectedIndex = 1 + end + end + end + end + else + self._view :GetController("chupai").selectedIndex =0 + for k=1,#self.card_list do + local card_view= self.card_list[k] + card_view.btn_card:GetController("mark_ting").selectedIndex = 0 + + end + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/Protocol.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/Protocol.lua new file mode 100644 index 00000000..cf0df3be --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/Protocol.lua @@ -0,0 +1,55 @@ +local Protocol = { + + + -- 出牌 + GAME_DIS_CARD = "611", + -- 提示选择行为 + GAME_ACTION = "612", + + -- 通知服务器手牌队形改变 + GAME_CHANGE_CARD = "613", + -- 通知服务器牌字体改变 + GAME_CHANGE_TYPEfACE = "615", + + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 结算 + GAME_EVT_RESULT1 = "817", + + -- 弃牌 + GAME_EVT_QIPAI = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + --第二十一张牌 + GAME_EVT_ADD_CARD = "821", + + GAME_EVT_Send_Piao = "1015", + GAME_EVT_Piao_Tip = "2031", + GAME_EVT_Piao_Action = "2032", + + GAME_XIPAI = "20836", + GAME_EVENT_XIPAI = "20837", + GAME_EVENT_NOTIFY_XIPAI = "20838", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/RunBeard_GameEvent.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/RunBeard_GameEvent.lua new file mode 100644 index 00000000..3af8734d --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/RunBeard_GameEvent.lua @@ -0,0 +1,41 @@ + +local RunBeard_GameEvent = { + -- 换座 + + -- 发牌 + SendCards = "SendCards", + + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + + EventDicelCard ="EventDicelCard", + OnEventTake = "OnEventTake", + + OnEcentRecond = "OnEcentRecond", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + QiCard = "QiCard", + AddCard = "AddCard", + + OnPiaoTips="OnPiaoTips", + OnPiaoAction="OnPiaoAction", + EventXiPai="EventXiPai", + +} +return RunBeard_GameEvent diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/RunBeard_ResultView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/RunBeard_ResultView.lua new file mode 100644 index 00000000..9f58e592 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/RunBeard_ResultView.lua @@ -0,0 +1,823 @@ +require('Game.View.ResultView') +local PendulumRule = import('.main.PendulumRule') +local RunBeard_ResultView = {} + +local M = RunBeard_ResultView + +function RunBeard_ResultView.new(blur_view, index) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self.class = 'RunBeard_ResultView' + self._currenIndex = 0 + if index ~= 1 then + self._blur_view = blur_view + end + self._close_zone = false + + self:init('ui://Extend_Poker_YueYangWHZ/clearing') + self.xiPaiCtr=self._view:GetController("xipai") + return self +end + +function M:init(url) + ResultView.init(self, url) + local btn_share = self._view:GetChild('btn_share') + btn_share.onClick:Set( + function() + ShareScreenShot() + end + ) +end + +function M:InitData(over, room, result, total_result, callback) + local _overCtr = self._view:GetController('over') + local btn_confirm = self._view:GetChild('btn_confirm') + local btn_result = self._view:GetChild('btn_showResult') + local _btnCtr = self._view:GetController('button') + local _sdkCtr = self._view:GetController('sdk') + local _icon = self._view:GetChild('win_base') + local btn_close = self._view:GetChild('btn_close') + self._view:GetChild('tex_roomnum').text = room.room_id + self._view:GetChild('tex_data').text = os.date('%Y-%m-%d %H:%M', os.time()) + + + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig and round>1 then + self.xiPaiCtr.selectedIndex=1 + else + self.xiPaiCtr.selectedIndex=0 + end + + local xipai=self._view:GetChild("btn_xipai") + xipai.touchable=true + xipai.onClick:Add(function() + local xiPaiCallBack=function () + xipai.touchable=false + self.xiPaiCtr.selectedIndex=0 + ViewUtil.ErrorTip(1000000,"申请洗牌成功") + end + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendXiPaiAction(xiPaiCallBack) + end) + if result and result.xipai_score then + --xipai.text="洗牌 积分x"..result.xipai_score + end + + + if result ~= nil and result.liuju == true then + _icon.icon = 'ui://Main_RunBeard/liuju' + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + _overCtr.selectedIndex = 2 + + if over ~= 1 then + btn_confirm.onClick:Add( + function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:Close() + + if callback then + callback() + end + end + ) + self:AddClearItem(room, result, nil, over) + return + else + self.xiPaiCtr.selectedIndex=0 + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add( + function() + _overCtr.selectedIndex = 3 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + end + ) + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, result, total_result.info_list, over) + end + end + + if over == 0 and result.liuju == false then + _icon.icon = 'ui://Main_RunBeard/jiesuan' + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + _overCtr.selectedIndex = 0 + btn_confirm.onClick:Add( + function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:Close() + + if callback then + callback() + end + end + ) + self:AddClearItem(room, result, nil, over) + elseif over == 1 and result.liuju == false then + _icon.icon = 'ui://Main_RunBeard/jiesuan' + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + _overCtr.selectedIndex = 0 + btn_result.onClick:Add( + function() + _overCtr.selectedIndex = 3 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + end + ) + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, result, total_result.info_list, over) + else + if result ~= nil then + if result.liuju == false then + _icon.icon = 'ui://Main_RunBeard/jiesuan' + over = 2 + _overCtr.selectedIndex = 3 + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, nil, total_result.info_list, over) + end + else + _icon.icon = 'ui://Main_RunBeard/jiesuan' + over = 2 + _overCtr.selectedIndex = 3 + self.xiPaiCtr.selectedIndex=0 + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, nil, total_result.info_list, over) + end + end +end + +function M:AddClearItem(room, data, total_data, over) + local n = over + 1 + local list_view1 = self._view:GetChild('player_list') + local list_view2 = self._view:GetChild('player_list_2') + + if data ~= nil and data.liuju == true then + self:FillLiuJuItemData(room, data) + if over == 1 then + self:FillItemData2(room, total_data, list_view2) + end + else + if 0 == over or 1 == over and data.liuju == false then + self:FillItemData(room, data, list_view1) + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end + end +end + +function M:GetPos(room, seat) + return ViewUtil.GetPos(room.self_player.seat, seat, room.room_config.people_num) +end +function M:FillLiuJuItemData(room, data) + local qipai_list = self._view:GetChild('qipai_listl') + local _dipaiC = self._view:GetController('qipai') + qipai_list:RemoveChildrenToPool() + if data.throw_card ~= nil and #data.throw_card > 0 then + _dipaiC.selectedIndex = 1 + local hand_card = PendulumRule.GetHandCard(data.throw_card, 3) + for k = 1, #hand_card do + local cards = qipai_list:AddItemFromPool() + for j = 1, #hand_card[k] do + cards:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + else + _dipaiC.selectedIndex = 0 + end + for i = 1, #data.info_list do + if data.info_list[i].seat ~= room.self_player.seat and #data.info_list[i].hand_card > 0 then + local card_list + if #data.info_list == 2 then + card_list = self._view:GetChild('card_list_2') + else + if self:GetPos(room, data.info_list[i].seat) == 2 then + card_list = self._view:GetChild('card_list_1') + else + card_list = self._view:GetChild('card_list_3') + end + end + + card_list:RemoveChildrenToPool() + for k = 1, #data.info_list[i].opCardList do + local fztype = data.info_list[i].opCardList[k].type + if fztype == RB_FZType.Kan then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', data.info_list[i].opCardList[k].card1) + end + end + end + local hand_card = PendulumRule.GetHandCard(data.info_list[i].hand_card, 3) + for k = 1, #hand_card do + local item = card_list:AddItemFromPool() + for j = 1, #hand_card[k] do + item:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + end + end +end + +local haoNameList={"散毫","清溜","内毫","外毫"} +local huxiList={40,30,20,10} +function M:FillItemData(room, data, item) + local dipai_list = self._view:GetChild('dipai_list') + dipai_list:RemoveChildren(0, -1, true) + if data.left_card ~= nil and #data.left_card > 0 then + for i = 1, #data.left_card do + local dipais = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Qipai') + dipais:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/202_', data.left_card[i]) + dipai_list:AddChild(dipais) + end + end + local qipai_list = self._view:GetChild('qipai_list') + local _dipaiC = self._view:GetController('qipai') + qipai_list:RemoveChildrenToPool() + if data.throw_card ~= nil and #data.throw_card > 0 then + _dipaiC.selectedIndex = 1 + local hand_card = PendulumRule.GetHandCard(data.throw_card, 3) + for k = 1, #hand_card do + local cards = qipai_list:AddItemFromPool() + for j = 1, #hand_card[k] do + cards:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + else + _dipaiC.selectedIndex = 0 + end + local info_list = data.info_list + local Yes_win = false + local win_data = {} + for i = 1, #info_list do + if info_list[i].is_win == true then + Yes_win = true + win_data = info_list[i] + end + end + --printlog("win_data===>>>") + --pt(win_data) + if win_data.seat == room.self_player.seat then + self._view:GetChild('show_win').visible = true + self._view:GetChild('show_low').visible = false + else + self._view:GetChild('show_win').visible = false + self._view:GetChild('show_low').visible = true + end + + if Yes_win == true then + local isWin_Card = true + local p = room:GetPlayerBySeat(win_data.seat) + if p.self_user.account_id == room.owner_id then + self._view:GetController('owner').selectedIndex = 1 + end + if p.seat == room.banker_seat then + self._view:GetController('bank').selectedIndex = 1 + end + self._view:GetChild('WinerName').text = p.self_user.nick_name + --self._view:GetChild('chongtunshu').text = '充囤:' .. room.room_config.tun .. ' 囤' + self._view:GetChild('huxi').text = '胡息:' .. win_data.hu_xi + --self._view:GetChild('tunshu').text = '基础囤数:' .. win_data.tun + --self._view:GetChild('zongtunshu').text = '总囤数:' .. win_data.total_tun + if win_data.round_score >= 0 then + self._view:GetChild('score').text = '游戏分:+' .. win_data.round_score + self._view:GetChild('score').grayed = false + else + self._view:GetChild('score').text = '游戏分:' .. win_data.round_score + self._view:GetChild('score').grayed = true + end + local hp_info = win_data.hp_info + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值 + self._view:GetChild('tili_score').visible = true + self._view:GetChild('tili_title').visible = true + if (round_actual_hp > 0) then + self._view:GetChild('tili_score').text = '积分:+' .. round_actual_hp + self._view:GetChild('tili_score').grayed = false + else + self._view:GetChild('tili_score').text = '积分:' .. round_actual_hp + self._view:GetChild('tili_score').grayed = true + end + end + + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限 + if (isupper_limit) then + self._view:GetChild('yidashangxian').text = '已达上限' + else + self._view:GetChild('yidashangxian').text = '' + end + end + + local btn_head = self._view:GetChild('btn_head') + ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) + local fullname_list = self._view:GetChild('fullname_list') + fullname_list:RemoveChildren(0, -1, true) + if win_data.mingtang ~= nil and #win_data.mingtang > 0 then + for i = 1, #win_data.mingtang do + local dipais = UIPackage.CreateObjectFromURL('ui://Extend_Poker_YueYangWHZ/FullName') + dipais:GetChild('n0').icon = 'ui://Extend_Poker_YueYangWHZ/hu_' .. win_data.mingtang[i].mingtang + --[[if win_data.mingtang[i].type == 1 and win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 番' + elseif win_data.mingtang[i].type == 2 and win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 囤' + elseif win_data.mingtang[i].type == 3 and win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 倍' + end--]] + if win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. '胡息' + end + fullname_list:AddChild(dipais) + end + end + local card_list = self._view:GetChild('card_list') + card_list:RemoveChildrenToPool() + if #win_data.cardList > 0 then + for i = 1, #win_data.cardList do + -- 1 是对子 2 是三个的 + local fztype = win_data.cardList[i].type + if fztype == 1 then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '将' + cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi + cards:GetController('c1').selectedIndex = 0 + if win_data.cardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi+1 + end + for j = 1, 2 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i]['card'..j]) + end + else + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '顺' + if + win_data.cardList[i].card1 == win_data.cardList[i].card2 and + win_data.cardList[i].card1 == win_data.cardList[i].card3 + then + cards:GetChild('card_type').text = '碰' + end + if fztype == 4 then + cards:GetChild('card_type').text = '歪' + end + cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card1) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card2) + cards:GetChild('card_3').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card3) + if isWin_Card == true then + if win_data.cardList[i].card1 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi+1 + elseif win_data.cardList[i].card2 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 2 + cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi+1 + elseif win_data.cardList[i].card3 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 3 + cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi+1 + end + + end + end + end + end + for i = 1, #win_data.opCardList do + local fztype = win_data.opCardList[i].type + if fztype == RB_FZType.Chi then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '顺' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card2) + cards:GetChild('card_3').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card3) + --[[if isWin_Card == true then + if win_data.opCardList[i].card1 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1 + elseif win_data.opCardList[i].card2 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 2 + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1 + elseif win_data.opCardList[i].card3 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 3 + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1 + end + + end--]] + elseif fztype == RB_FZType.Peng then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '碰' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + --[[if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1 + end--]] + elseif fztype == RB_FZType.Kan then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '坎' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + --[[if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1 + end--]] + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + elseif fztype == RB_FZType.Wei or fztype == RB_FZType.ChouWei then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '歪' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + --[[ if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1 + end--]] + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + elseif fztype == RB_FZType.Pao then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '跑' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 2 + --[[if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1 + end--]] + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + elseif fztype == RB_FZType.Ti then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '溜' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 2 + --[[if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1 + end--]] + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + end + end + + if #win_data.hand_card > 0 then + for i = 1, #win_data.hand_card, 4 do + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '散' + cards:GetChild('card_huxi').text = 0 + cards:GetController('c1').selectedIndex = 2 + for j = 0, 3 do + if (i + j) <= #win_data.hand_card then + cards:GetChild('card_' .. (j + 1)).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.hand_card[i + j]) + if win_data.hand_card[i + j] == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = j + 1 + cards:GetChild('card_huxi').text = 1 + end + end + end + end + end + + + if win_data.haoList and #win_data.haoList then + local tempHaoList={} + for i=1,#win_data.haoList do + if win_data.haoList[i].hao>0 then + if tempHaoList[win_data.haoList[i].hao]==nil then + tempHaoList[win_data.haoList[i].hao]={} + end + table.insert(tempHaoList[win_data.haoList[i].hao],win_data.haoList[i]) + + end + end + + + for k,v in pairs(tempHaoList) do + local count=#v + printlog(count) + if count<5 then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = haoNameList[tonumber(k)] + local haoNum=huxiList[tonumber(k)] + if DataManager.CurrenRoom.room_config.config.hao_config and DataManager.CurrenRoom.room_config.config.hao_config==1 then + haoNum=(haoNum+10)*count + else + haoNum=(haoNum)*count + end + cards:GetChild('card_huxi').text = haoNum + cards:GetController('c1').selectedIndex = 2 + for i=1,count do + cards:GetChild('card_' .. i).icon = + self:getCardItem('ui://Main_RunBeard/201_', v[i].hao_card) + end + + + end + end + + + + end + + end + + item:RemoveChildrenToPool() + for i = 1, #info_list do + if info_list[i].is_win == false then + local player = item:AddItemFromPool() + local p = room:GetPlayerBySeat(info_list[i].seat) + if p.self_user.account_id == room.owner_id then + player:GetController('owner').selectedIndex = 1 + end + if p.seat == room.banker_seat then + player:GetController('bank').selectedIndex = 1 + end + local btn_head = player:GetChild('btn_head') + ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) + player:GetChild('playerName').text = p.self_user.nick_name + if info_list[i].round_score >= 0 then + player:GetChild('score').text = '+' .. info_list[i].round_score + player:GetChild('score').grayed = false + else + player:GetChild('score').text = info_list[i].round_score + player:GetChild('score').grayed = true + end + local hp_info = info_list[i].hp_info + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值 + player:GetChild('tili_score').visible = true + player:GetChild('tili_title').visible = true + if (round_actual_hp > 0) then + player:GetChild('tili_score').text = '+' .. round_actual_hp + player:GetChild('tili_score').grayed = false + else + player:GetChild('tili_score').text = '' .. round_actual_hp + player:GetChild('tili_score').grayed = true + end + end + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限 + if (isupper_limit) then + player:GetChild('yidashangxian').text = '已达上限' + else + player:GetChild('yidashangxian').text = '' + end + end + local card_list = player:GetChild('card_list') + card_list:RemoveChildrenToPool() + for k = 1, #info_list[i].opCardList do + local fztype = info_list[i].opCardList[k].type + if fztype == RB_FZType.Chi then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card2) + cards:GetChild('card_3').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card3) + elseif fztype == RB_FZType.Peng then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Kan then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Wei or fztype == RB_FZType.ChouWei then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Pao then + local cards = card_list:AddItemFromPool() + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Ti then + local cards = card_list:AddItemFromPool() + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + end + end + if #info_list[i].hand_card > 0 then + local hand_card = PendulumRule.GetHandCard(info_list[i].hand_card, 3) + for k = 1, #hand_card do + local cards = card_list:AddItemFromPool() + for j = 1, #hand_card[k] do + cards:GetChild('card_' .. (j)).icon = + self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + end + end + end +end + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + local p = room:GetPlayerBySeat(data[i].seat) + player_list[i].id = user.account_id + local total_score = data[i].total_score + player_list[i].hp_info = data[i].hp_info + player_list[i].score = total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + local entrust = data[i].entrust + if entrust == nil then + entrust = false + end + player_list[i].entrust = entrust + player_list[i].param = {} + local wcount = 0 + if (data[i].win_count ~= nil) then + wcount = data[i].win_count + end + local hxcount = 0 + if (data[i].total_huxi ~= nil) then + hxcount = data[i].total_huxi + end + player_list[i].param[1] = {} + player_list[i].param[1].key = '胡牌次数:' + player_list[i].param[1].value = tostring(wcount) + player_list[i].param[2] = {} + player_list[i].param[2].key = '胡息总数:' + player_list[i].param[2].value = tostring(hxcount) + end + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + self:SetGSListlineGap(5) + self:InitBigResult(room, 26) + DataManager.CurrenRoom = nil + -- list:RemoveChildrenToPool() + -- for i =1, #data do + -- local total_score = room:GetTotalScore(data[i].total_score) + -- local item = list:AddItemFromPool() + -- local p = room:GetPlayerBySeat(data[i].seat) + -- if p.self_user.account_id == room.owner_id then + -- item:GetController("owner").selectedIndex = 1 + -- end + + -- local btn_head = item:GetChild("btn_head") + -- ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) + -- item:GetChild("win_count").text = "胡牌次数:"..data[i].win_count.."次" + -- item:GetChild("total_huxi").text = "胡息总数:"..data[i].total_huxi + -- --点赞 + -- self:Click_zan(item, p.self_user.account_id) + + -- item:GetChild("name").text = p.self_user.nick_name + + -- local hp_info = data[i].hp_info + -- if(hp_info ~=nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + -- -- --体力值 + -- -- local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值 + -- local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限 + -- if(isupper_limit)then + -- item:GetChild("yidashangxian").text = "已达上限" + -- else + -- item:GetChild("yidashangxian").text = "" + -- end + -- end + -- local x = room:GetOriginScore(total_score) + -- if total_score >= 0 then + -- item:GetChild("score").text = "+"..x + -- item:GetChild("score").grayed = false + -- else + -- item:GetChild("score").text = x + -- item:GetChild("score").grayed = true + -- end + -- if room.hpOnOff == 1 and room.score_times ~= 1 or room:checkHpNonnegative() then + -- item:GetController("bei") .selectedIndex=1 + -- item:GetChild("sss").text = room.score_times + -- if(hp_info ~= nil)then + -- local round_actual_hp = d2ad(hp_info.total_hp) --// 本局实际输赢体力值 + -- total_score = round_actual_hp + -- end + -- if total_score >= 0 then + -- item:GetChild("score1").text = "+"..total_score + -- item:GetChild("score1").grayed = false + -- else + -- item:GetChild("score1").text = total_score + -- item:GetChild("score1").grayed = true + -- end + -- end + -- if #data ==3 then + -- if i ==1 then + -- if total_score >data[2].total_score and total_score >data[3].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- elseif i ==2 then + -- if total_score >data[1].total_score and total_score >data[3].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- elseif i ==3 then + -- if total_score >data[2].total_score and total_score >data[1].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- end + -- else + -- if i ==1 then + -- if total_score >data[2].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- elseif i ==2 then + -- if total_score >data[1].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- end + + -- end + -- end + + -- DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild('btn_head') + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= '' then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end +function M:getCardItem(card_1, card_2) + local _room = DataManager.CurrenRoom + if _room ~= nil and _room.change_card_display ~= nil then + return card_1 .. _room.change_card_display .. card_2 + else + return card_1 .. '2_' .. card_2 + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/CardCheck.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/CardCheck.lua new file mode 100644 index 00000000..eca6fda3 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/CardCheck.lua @@ -0,0 +1,648 @@ +-- 检测牌是否存在 +local function checkCard(eventCard, cardList, num) + if num == nil then + num = 1 + end + local result = 0 + for i = 1, #cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if (result == num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card, count) + for i = 1, count do + list_remove(cardList, card) + end +end + +local function checkCardAndRomve(eventCard, cardList, num) + if (checkCard(eventCard, cardList, num)) then + removeCard(cardList, eventCard, num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard, cardList) + local result = 0 + for i = 1, #cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + stackHuxi = nil +} + +function M:push(cardGroup) + self.stack[#self.stack + 1] = cardGroup +end +function M:pushhuxi(cardGroup) + self.stackHuxi[#self.stackHuxi + 1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack, #self.stack) + for _, card in ipairs(cardGroup) do + self.cardList[#self.cardList + 1] = card + end + table.sort(self.cardList) +end +-- 顺子 +function M:tryShunzi1(card, player) + if card < 300 and card % 100 > 8 then + return false + end + if card == 106 then + printlog("jefesc:",card) + pt(self.cardList) + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + removeCard(self.cardList, card, 1) + local cardGroup = {card, card + 1, card + 2} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + return true + end + return false +end + + +-- 2 7 10 +function M:tryShunzi3(card, player) + if card % 100 == 2 then + if (checkCard(card + 5, self.cardList, 1)) and (checkCard(card + 8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 5, 1) + removeCard(self.cardList, card + 8, 1) + local cardGroup = {card, card + 5, card + 8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + return true + end + end + return false +end + + +-- 坎 +function M:tryKezi(card, player) + if (checkCard(card, self.cardList, 3)) then + removeCard(self.cardList, card, 3) + local cardGroup = {card, card, card} + self:push(cardGroup) + local _huxi = 1 + if self.drawCard~=card then + --printlog("tryKezi====>>>",self.drawCard,card) + _huxi = 3 + end + self:pushhuxi(_huxi) + return true + end + return false +end + + + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (checkCard(card, self.cardList, 2)) then + removeCard(self.cardList, card, 2) + local cardGroup = {card, card} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + elseif (checkCard(card, self.cardList, 1)) then + if card % 100 <=9 then + if (checkCard(card+1, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+1, 1) + local cardGroup = {card, card+1} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + end + + if card % 100 <=8 then + if (checkCard(card+2, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+2, 1) + local cardGroup = {card, card+2} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + end + + if card % 100 >=2 then + if (checkCard(card-1, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-1, 1) + local cardGroup = {card, card-1} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + end + + if card % 100 >=3 then + if (checkCard(card-2, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-2, 1) + local cardGroup = {card, card-2} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + end + + if card % 100 ==2 then + if (checkCard(card+5, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+5, 1) + local cardGroup = {card, card+5} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card+8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+8, 1) + local cardGroup = {card, card+8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + + if card % 100 ==7 then + if (checkCard(card-5, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-5, 1) + local cardGroup = {card, card-5} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card+3, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+3, 1) + local cardGroup = {card, card+3} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + if card % 100 ==10 then + if (checkCard(card-8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-8, 1) + local cardGroup = {card, card-8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card-3, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-3, 1) + local cardGroup = {card, card-3} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + + end + + return false +end + + +function M:tryPair2(card) + if (self.pair_count > 0) then + return false + end + + if (checkCard(card, self.cardList, 1)) then + if card % 100 ==2 then + if (checkCard(card+5, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+5, 1) + local cardGroup = {card, card+5} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card+8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+8, 1) + local cardGroup = {card, card+8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + + if card % 100 ==7 then + if (checkCard(card-5, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-5, 1) + local cardGroup = {card, card-5} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card+3, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+3, 1) + local cardGroup = {card, card+3} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + if card % 100 ==10 then + if (checkCard(card-8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-8, 1) + local cardGroup = {card, card-8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card-3, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-3, 1) + local cardGroup = {card, card-3} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + + end + + return false +end + + + +function M:tryWin(player) + + if #self.cardList == 0 then + if (self.pair_count == 1) then + return true + elseif self.pair_count == 2 and #self.stack==2 then + local tempPList={} + for i=1,#self.stack do + local card1=self.stack[i][1] + local card2=self.stack[i][2] + table.insert(tempPList,card1) + table.insert(tempPList,card2) + end + + if #tempPList~=4 then return false end + + table.sort(tempPList) + + if tempPList[1]==tempPList[2]+1 and tempPList[2]==tempPList[3]+1 and tempPList[3]==tempPList[4]+1 then + return true + end + + end + + return false + end + + + local activeCard = 0 + for i = 1, #self.cardList do + if (self.cardList[i] == 201 or self.cardList[i] == 202) then + activeCard = self.cardList[i] + break + end + end + if (activeCard == 0) then + activeCard = self.cardList[1] + end + + if (activeCard % 100 == 1) then + if self:tryShunzi1(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + if self:tryKezi(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair2(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + elseif activeCard % 100 == 2 then + if self:tryShunzi3(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + if self:tryKezi(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair2(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryShunzi1(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + else + + + if self:tryKezi(activeCard, player) then + + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair(activeCard) then + + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair2(activeCard) then + + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + + if self:tryShunzi1(activeCard, player) then + + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + end + return false +end + +local function init(self, player, cardInhand, addCard) + self.stack = {} + self.stackHuxi = {} + self.pair_count = 0 + self.kong_count = 0 + self.drawCard=0 + self.cardList = membe_clone(cardInhand) + if addCard == nil then + self.kong_count = 1 + else + self.kong_count = 0 + self.cardList[#self.cardList + 1] = addCard + self.drawCard=addCard + end + table.sort(self.cardList) + return self:tryWin(player) +end + +function M.tingPai(player, room) + local self = setmetatable({}, {__index = M}) + local tingList = {} + local cardInhand = player.handcard_list + if not cardInhand or #cardInhand == 0 then + return tingList + end + local kan_huxi = 0 + local kan_cards = {} + for j = 1, #player.fz_list do + for i = 1, #cardInhand do + if cardInhand[i] == player.fz_list[j].active_card and player.fz_list[j].type == 3 then + kan_cards[#kan_cards + 1] = cardInhand[i] + break + end + end + end + if #kan_cards > 0 then + for i = 1, #kan_cards do + kan_huxi = kan_huxi + 3 + removeCard(cardInhand, kan_cards[i], 3) + end + end + player.tiCount = 0 + player.paoCount = 0 + + + for k = 100, 200, 100 do + for i = 1, 10 do + local tem = k + i + local result = init(self, player, cardInhand, tem) + if result then + --printlog("是否胡牌===>>>",tem) + end + + local num = 0 + for k = 1, #self.stackHuxi do + num = num + self.stackHuxi[k] + end + + if result then + local num1 = 0 + --pt(self.stackHuxi) + for k = 1, #self.stackHuxi do + num1 = num1 + self.stackHuxi[k] + --printlog(self.stackHuxi[k]) + end + --printlog("胡息数量===>>>",player.hu_xi,num1,kan_huxi) + if (player.hu_xi + num1 + kan_huxi) >= (self:getHuxi(room)-1) then + tingList[#tingList + 1] = tem + end + end + + + + end + end + printlog("jefe2:") + pt(tingList) + return tingList +end + +function M:getHuxi(room) + if room.game_id == 301 then + return 8 + end + if room.game_id == 13 or room.game_id == 14 or room.game_id == 23 then + return 15 + elseif room.game_id == 26 then + return 10 + elseif room.game_id == 29 then + if room.room_config.maxPlayers == 3 then + return 15 + else + return 9 + end + end +end + +function M:GetFzData(tem, ctype) + local huxi + + if ctype == 1 then + huxi=1 + elseif ctype == 2 then + huxi=1 + elseif ctype == 3 then + huxi = 3 + elseif ctype == 4 then + huxi = 3 + elseif ctype == 5 then + huxi = 3 + elseif ctype == 7 then + huxi = 5 + end + return huxi +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/FZData.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/FZData.lua new file mode 100644 index 00000000..e5bb09cd --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/FZData.lua @@ -0,0 +1,45 @@ +RB_FZType = +{ + Chi = 1, + Peng = 2, + Kan = 3, + Wei = 4, + ChouWei=5, + Pao = 6, + Ti = 7, + HU = 8, + Bi = 9, + PengPao =10, + WeiPao =11, + WeiTi =12, + KanTi =13, + DuiZi = 14, + zhao = 15, +} + +local FZTipList = { + tip_map_id = nil, + tip_map_type = nil +} + +local M = FZTipList + +function M.new() + local self = {} + setmetatable(self,{__index = FZTipList}) + self.tip_map_id = {} + self.tip_map_type = {} + return self +end + +function M:AddTip(tip) + self.tip_map_id[tip.id] = tip + local tiplist = self.tip_map_type[tip.weight] + if not tiplist then + tiplist = {} + self.tip_map_type[tip.weight] = tiplist + end + tiplist[#tiplist+1] = tip +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/HuTipView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/HuTipView.lua new file mode 100644 index 00000000..d6e6e97b --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/HuTipView.lua @@ -0,0 +1,69 @@ +local HuTipView = { + _view_start_pos = nil, + _touch_start_pos = nil, +} + +local M = HuTipView + +function M.new(main_view) + local self = {} + self.class = "HuTipView" + setmetatable(self,{__index = HuTipView}) + self._main_view = main_view + self:init() + return self +end + +local function SetObjEnabled(obj, enabled) + obj.visible = enabled + obj.touchable = enabled +end +function M:OnTouchBegin(context) + self._view_start_pos = Vector2(self._view.x, self._view.y) + self._touch_start_pos = self._main_view._view:GlobalToLocal(Vector2(context.inputEvent.x, context.inputEvent.y)) +end +function M:OnTouchMove(context) + local xy = self._main_view._view:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + local dist = Vector2(xy.x - self._touch_start_pos.x, xy.y - self._touch_start_pos.y) + local posx = self._view_start_pos.x + dist.x + local posy = self._view_start_pos.y + dist.y + local max_x = self._main_view._view.width - self._view.width + local max_y = self._main_view._view.height - self._view.height + self._view.x = posx < 0 and 0 or posx > max_x and max_x or posx + self._view.y = posy < 0 and 0 or posy > max_y and max_y or posy +end + +function M:init() + self._view = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Hu_Tip") + self._main_view._view:AddChild(self._view) + local width = self._view.width + local m_width = self._main_view._view.width + local m_height = self._main_view._view.height + -- self._view.x = 0.5 * m_width - 0.5 * width + self._view.x = 0 + self._view.y = 0.7 * m_height + SetObjEnabled(self._view, false) + self._view.onTouchBegin:Add(handler(self, self.OnTouchBegin)) + self._view.onTouchMove:Add(handler(self, self.OnTouchMove)) +end + +function M:FillData(cards) + local lst_card = self._view:GetChild("tingpai") + lst_card:RemoveChildrenToPool() + local num = #cards + if num > 0 then + if num > 4 and num < 28 then + self._view.width = 191 + ((num > 4 and 6 or num) - 3) * 38 + self._view.height = 69 + (math.ceil(num / 5) - 1) * 56 + end + for i = 1, num do + local item = lst_card:AddItemFromPool() + item:GetChild("icon").icon = "ui://Main_RunBeard/202_1_" .. cards[i] + end + SetObjEnabled(self._view, true) + else + SetObjEnabled(self._view, false) + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/PendulumRule.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/PendulumRule.lua new file mode 100644 index 00000000..8f6b21cc --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/PendulumRule.lua @@ -0,0 +1,1177 @@ + +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + if num ==nil then + num =1 + end + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + end + end + if(result ==num) then + return true + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local M = { + cardList = nil, + stack = nil, +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + self.cardList[#self.cardList + 1] = card + end + table.sort(self.cardList) +end + +function M:tryShunzi1(card,type1 ) + if card < 300 and card % 100 > 8 then + return false + end + if (checkCard(card, self.cardList)) and (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card+1,1) + removeCard(self.cardList,card+2,1) + removeCard(self.cardList,card,1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end +function M:tryShunzi2( card ,type1) + if card -card%100 == 100 then + if self:tryShunzi1(card+100,0) or self:tryShunzi3(card+100,0) then + return false + end + if checkCard(card+100,self.cardList,1) and checkCard(card,self.cardList,2) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,2) + removeCard(self.cardList,card+100,1) + local cardGroup = {card,card,card+100} + self:push(cardGroup) + return true + end + if (checkCard(card+100,self.cardList,2)) and (checkCard(card,self.cardList,1)) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+100,2) + local cardGroup = {card+100,card+100,card} + self:push(cardGroup) + return true + end + else + if self:tryShunzi1(card-100) or self:tryShunzi3(card-100) then + return false + end + if (checkCard(card-100,self.cardList,1)) and checkCard(card,self.cardList,2) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,2) + removeCard(self.cardList,card-100,1) + local cardGroup = {card,card,card-100} + self:push(cardGroup) + return true + end + if (checkCard(card-100,self.cardList,2)) and checkCard(card,self.cardList,1) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card-100,2) + local cardGroup = {card-100,card-100,card} + self:push(cardGroup) + return true + end + end + return false +end +function M:tryShunzi3( card,type1 ) + if card % 100 == 2 then + if (checkCard(card, self.cardList, 1)) and (checkCard(card+5, self.cardList, 1)) and (checkCard(card+8, self.cardList, 1)) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+5,1) + removeCard(self.cardList,card+8,1) + local cardGroup = {card,card+5,card+8} + self:push(cardGroup) + return true + + end + return false + end + return false +end + +function M:tryKezi(card) + if (checkCard(card, self.cardList, 3)) then + removeCard(self.cardList,card,3) + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryTi(card) + if (checkCard(card, self.cardList, 4)) then + removeCard(self.cardList,card,4) + local cardGroup = {card,card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (checkCard(card, self.cardList, 2)) then + removeCard(self.cardList,card,2) + local cardGroup = {card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryShunzi4( card ) + if card -card%100 == 100 then + if self:tryShunzi1(card+100,0) or self:tryShunzi3(card+100,0) or self:tryShunzi5(card+100,0) then + return false + end + if checkCard(card+100,self.cardList,1) and checkCard(card,self.cardList,1) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+100,1) + local cardGroup = {card,card+100} + self:push(cardGroup) + return true + end + if (checkCard(card+100,self.cardList,1)) and (checkCard(card,self.cardList,1)) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+100,1) + local cardGroup = {card,card+100} + self:push(cardGroup) + return true + end + else + if self:tryShunzi1(card-100,0) or self:tryShunzi3(card-100,0) or self:tryShunzi5(card-100,0) then + return false + end + if (checkCard(card-100,self.cardList,1)) and checkCard(card,self.cardList,1) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card-100,1) + local cardGroup = {card-100,card} + self:push(cardGroup) + return true + end + if (checkCard(card-100,self.cardList,1)) and checkCard(card,self.cardList,1) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card-100,1) + local cardGroup = {card,card-100} + self:push(cardGroup) + return true + end + end + return false +end +function M:tryShunzi5( card ,type1) + if card % 100 == 2 then + if (checkCard(card, self.cardList, 1)) and (checkCard(card+5, self.cardList, 1)) then + if self:tryShunzi2(card+5,0) or self:tryShunzi1(card+5,0) then + return false + end + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+5,1) + local cardGroup = {card,card+5} + self:push(cardGroup) + return true + end + if (checkCard(card, self.cardList, 1)) and (checkCard(card+8, self.cardList, 1)) then + if self:tryShunzi2(card+8,0) or self:tryShunzi1(card+8,0) then + return false + end + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+8,1) + local cardGroup = {card,card+8} + self:push(cardGroup) + return true + end + elseif card % 100 == 7 then + if (checkCard(card, self.cardList, 1)) and (checkCard(card+3, self.cardList, 1)) then + if self:tryShunzi2(card+3,0) or self:tryShunzi1(card+3,0) then + return false + end + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+3,1) + local cardGroup = {card,card+3} + self:push(cardGroup) + return true + end + end + return false +end + +function M:tryMenzi1( card ) + + if (checkCard(card, self.cardList, 1)) and (checkCard(card+1, self.cardList, 1)) then + if self:tryShunzi2(card+1,0) or self:tryShunzi1(card+1,0) or self:tryShunzi3(card+1,0) then + return false + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+1,1) + local cardGroup = {card,card+1} + self:push(cardGroup) + return true + end + if (checkCard(card, self.cardList, 1)) and (checkCard(card+2, self.cardList, 1)) then + if self:tryShunzi2(card+2,0) or self:tryShunzi1(card+2,0) or self:tryShunzi3(card+2,0) then + return false + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+2,1) + local cardGroup = {card,card+2} + self:push(cardGroup) + return true + end + + return false +end + +function M:tryOneCard(card) + if (checkCard(card, self.cardList, 1)) then + removeCard(self.cardList,card,1) + local cardGroup = {card} + self:push(cardGroup) + return true + end + return false +end + -- 摆牌规则 先四后三 对子 顺子 单个 +function M:tryPendulumRule() + for i=1,10 do + for k=100,200,100 do + local tem = k + i + local x = true + if x and self:tryTi(tem) then + x =false + end + if x and self:tryKezi(tem) then + x =false + end + if x and self:tryShunzi2(tem) then + x =false + end + if x and self:tryPair(tem) then + x =false + end + if x and self:tryShunzi3(tem) then + x =false + end + if x and self:tryShunzi1(tem) then + x =false + end + if x and self:tryShunzi5(tem) then + x =false + end + if x and self:tryShunzi4(tem) then + x =false + end + if x and self:tryMenzi1(tem) then + x =false + end + if x and self:tryOneCard(tem) then + x =false + end + end + end + if #self.stack >10 then + --变成10列--这里牌多了也不会报错了 + local removeitem = 0 + local card = 0 + for i=#self.stack,1,-1 do + if #self.stack[i] == 1 and removeitem ==0 then + removeitem = i + card = self.stack[i][1] + list_remove(self.stack[i],self.stack[i][1]) + end + end + if card ~= 0 then + list_remove(self.stack,self.stack[removeitem]) + for i=#self.stack,1,-1 do + if #self.stack[i] >0 and #self.stack[i] <3 then + self.stack[i][#self.stack[i] +1] = card + break + end + end + end + end + return self.stack +end + + + + +--摆牌规则 优先胡息 +function M:tryPendulumRule2() + local card_count = #self.cardList + local cards_map = {} + local CountCards = {} + for i=1,#self.cardList do + CountCards[self.cardList[i]]= CountCards[self.cardList[i]] == nil and 1 or CountCards[self.cardList[i]] + 1 + end + --pt(self.cardList) + --printlog("摆牌规则 优先胡息====》》》") + --pt(CountCards) + + + --find4 + for k,v in pairs(CountCards) do + if (v == 4 and k<200) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3 and k<200) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2 and k<200) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + + + + + --find 小 2 7 10 + local counta = CountCards[102] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[110]~=nil and CountCards[102] >0 and CountCards[107] >0 and CountCards[110] >0 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cs[3]= 110 + cards_map[#cards_map+1] = cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 3 + end + end + end + + + --find 小 123 + local counta = CountCards[101] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[101]~=nil and CountCards[102]~=nil and CountCards[103]~=nil and CountCards[101] >0 and CountCards[102] >0 and CountCards[103] >0 then + local cs = {} + cs[1]= 101 + cs[2]= 102 + cs[3]= 103 + cards_map[#cards_map+1] = cs + CountCards[101] = CountCards[101]-1 + CountCards[102] = CountCards[102]-1 + CountCards[103] = CountCards[103]-1 + card_count = card_count - 3 + end + end + end + + + --find abc + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] == CountCards[i + 1] and CountCards[i] == CountCards[i + 2] then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + + + + + --find ab + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + + + + + --find 小 2 7 两个 + for i=101,110 do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[102] ==1 and CountCards[107] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[102]~=nil and CountCards[110]~=nil and CountCards[102] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[107]~=nil and CountCards[110]~=nil and CountCards[107] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 107 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + local tempCardList={} + for i = 101, 110 do + if CountCards[i]~=nil and (CountCards[i] == 1) then + table.insert(tempCardList,i) + CountCards[i]=CountCards[i]-1 + end + end + + + local cs={} + local count=1 + for i=1,#tempCardList do + --[[if i%3==1 then + cs[count]={} + end + + table.insert(cs[count],tempCardList[i]) + + if i%3==0 then + count=count+1 + end--]] + + local cst={} + table.insert(cst,tempCardList[i]) + table.insert(cs,cst) + + end + + for i=1 , #cs do + cards_map[#cards_map+1]=cs[i] + card_count =card_count- #cs[i] + end + + + ----------------------------- + --find4 + for k,v in pairs(CountCards) do + if (v == 4 and k>200) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3 and k>200) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2 and k>200) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + + --find 大 2 7 10 + local countA = CountCards[202] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[210]~=nil and CountCards[202] >0 and CountCards[207] >0 and CountCards[210] >0 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cs[3]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 3 + end + end + end + + --find 大 123 + local countA = CountCards[201] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[201]~=nil and CountCards[202]~=nil and CountCards[203]~=nil and CountCards[201] >0 and CountCards[202] >0 and CountCards[203] >0 then + local cs = {} + cs[1]= 201 + cs[2]= 202 + cs[3]= 203 + cards_map[#cards_map+1]=cs + CountCards[201] = CountCards[201]-1 + CountCards[202] = CountCards[202]-1 + CountCards[203] = CountCards[203]-1 + card_count = card_count - 3 + end + end + end + + --find ABC + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] == CountCards[i + 1] and CountCards[i] == CountCards[i + 2] then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + + --[[ --find AAa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] >= 2 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-3; + end + end + end + + --find Aa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] == 1 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 1; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-2 + end + end + end --]] + + --find AB + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + --find 大 2 7 两个 + for i=201,210 do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[202] ==1 and CountCards[207] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + card_count = card_count - 2 + end + end + + + for i=201,210 do + if CountCards[202]~=nil and CountCards[210]~=nil and CountCards[202] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + for i=201,210 do + if CountCards[207]~=nil and CountCards[210]~=nil and CountCards[207] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 207 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + + + -------------------- + + + + + local singleList = {} + --find else + for k,v in pairs(CountCards) do + if (v == 1) then + singleList[#singleList+1] = k + CountCards[k] = CountCards[k] -1 + + end + end + + for i=1,#singleList do + local cs={} + table.insert(cs,singleList[i]) + cards_map[#cards_map + 1]= cs + end + + --[[local index = 3 + for i=1,#singleList,index do + local cs ={} + cs[#cs+1] = singleList[i] + if i < #singleList then cs[#cs+1] = singleList[i+1] end + if i < #singleList - 1 then cs[#cs+1] = singleList[i+2] end + cards_map[#cards_map + 1]=cs + end--]] + --变成9列--这里牌多了也不会报错了 + --[[for i=9 ,1,-1 do + for j = #cards_map , 9,-1 do + if #cards_map[i] < 3 then + cards_map[i][#cards_map[i]+1] = cards_map[j][1] + list_remove(cards_map[j],cards_map[j][1]) + end + end + end--]] + + --pt(cards_map) + --printlog("11111111111111111111") + local mapCount=#cards_map + if mapCount>12 then + local tempCardMpList1={} + local tempCardMpList2={} + local tempCardMpList3={} + for i=1,mapCount do + if #cards_map[i]>=2 then + table.insert(tempCardMpList1,cards_map[i]) + else + if cards_map[i][1]<200 then + table.insert(tempCardMpList2,cards_map[i][1]) + elseif cards_map[i][1]>200 then + table.insert(tempCardMpList3,cards_map[i][1]) + end + end + end + + --pt(tempCardMpList1) + --pt(tempCardMpList2) + --pt(tempCardMpList3) + + local cs={} + local count=1 + for i=1,#tempCardMpList2 do + if i%3==1 then + cs[count]={} + end + + table.insert(cs[count],tempCardMpList2[i]) + + if i%3==0 then + count=count+1 + end + + end + + for i=1 , #cs do + tempCardMpList1[#tempCardMpList1+1]=cs[i] + end + + + local cs={} + local count=1 + for i=1,#tempCardMpList3 do + if i%3==1 then + cs[count]={} + end + + table.insert(cs[count],tempCardMpList3[i]) + + if i%3==0 then + count=count+1 + end + + end + + for i=1 , #cs do + tempCardMpList1[#tempCardMpList1+1]=cs[i] + end + + + cards_map=tempCardMpList1 + end + + table.sort(cards_map, ViewUtil.HandCardSort3) + --pt(cards_map) + return cards_map + +end + + +--摆牌规则 优先顺子 -AAa- 对子 - 单牌 +function M:tryPendulumRule3() + local card_count = #self.cardList + local cards_map = {} + local CountCards = {} + for i=1,#self.cardList do + CountCards[self.cardList[i]]= CountCards[self.cardList[i]] == nil and 1 or CountCards[self.cardList[i]] + 1 + end + --find4 + for k,v in pairs(CountCards) do + if (v == 4) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + --find abc + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] >0 and CountCards[i + 1]>0 and CountCards[i + 2]>0 then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + --find ABC + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] >0 and CountCards[i + 1]>0 and CountCards[i + 2]>0 then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + --find 大 2 7 10 + local countA = CountCards[202] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[210]~=nil and CountCards[202] >0 and CountCards[207] >0 and CountCards[210] >0 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cs[3]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 3 + end + end + end + + --find 小 2 7 10 + local counta = CountCards[102] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[110]~=nil and CountCards[102] >0 and CountCards[107] >0 and CountCards[110] >0 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cs[3]= 110 + cards_map[#cards_map+1] = cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 3 + end + end + end + + --find AAa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] >= 2 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-3; + end + end + end + --find aaA + for i = 101, 110 do + if CountCards[i]~=nil and (CountCards[i] >= 2) then + if CountCards[i + 100]~=nil and (CountCards[i + 100] == 1) then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i+100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i +100] = CountCards[i +100] - 1 + card_count = card_count-3; + end + end + end + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + --find Aa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] == 1 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 1; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-2 + end + end + end + --find ab + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + --find AB + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + --find 大 2 7 两个 + for i=201,210 do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[202] ==1 and CountCards[207] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + card_count = card_count - 2 + end + end + + for i=201,210 do + if CountCards[202]~=nil and CountCards[210]~=nil and CountCards[202] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + for i=201,210 do + if CountCards[207]~=nil and CountCards[210]~=nil and CountCards[207] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 207 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + --find 小 2 7 两个 + for i=101,110 do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[102] ==1 and CountCards[107] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[102]~=nil and CountCards[110]~=nil and CountCards[102] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[107]~=nil and CountCards[110]~=nil and CountCards[107] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 107 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + local singleList = {} + --find else + for k,v in pairs(CountCards) do + if (v == 1) then + singleList[#singleList+1] = k + CountCards[k] = CountCards[k] -1 + + end + end + local index = 3 + for i=1,#singleList,index do + local cs ={} + cs[#cs+1] = singleList[i] + if i < #singleList then cs[#cs+1] = singleList[i+1] end + if i < #singleList - 1 then cs[#cs+1] = singleList[i+2] end + cards_map[#cards_map + 1]=cs + end + --变成9列--这里牌多了也不会报错了 + for i=10 ,1,-1 do + for j = #cards_map , 10,-1 do + if #cards_map[i] < 3 then + cards_map[i][#cards_map[i]+1] = cards_map[j][1] + list_remove(cards_map[j],cards_map[j][1]) + end + end + end + + return cards_map + +end + +local function init(self,cardInhand,index) + self.cardList= {} + self.stack = {} + self.cardList = membe_clone(cardInhand) + table.sort(self.cardList) + if index== nil or index ==0 then + return self:tryPendulumRule2() + elseif index == 1 then + return self:tryPendulumRule() + elseif index == 2 then + return self:tryPendulumRule2() + elseif index == 3 then + return self:tryPendulumRule3() + end +end + +function M.GetHandCard(cardInhand,index) + local self = setmetatable({}, {__index = M}) + if not cardInhand or #cardInhand == 0 then + return nil + end + local HandCardList = init(self,cardInhand,index) + return HandCardList +end + + +return M + + + + + diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPCardView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPCardView.lua new file mode 100644 index 00000000..2c24f342 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPCardView.lua @@ -0,0 +1,119 @@ + + +local M = { + btn_card = nil, + card_item = 0, + Hierarchy = 0, + index_X = 0, + index_Y = 0, + isUser = false, + initPos = Vector2.zero +} + + +function M.InitCardView(card_code, index_X, index_Y, type) + -- setmetatable(M, {__index = CardView}) + local self = setmetatable({}, {__index = M}) + self._room = DataManager.CurrenRoom + self.btn_card = self:InitUI(card_code, type) + self.card_item = card_code + self.index_X = index_X + self.index_Y = index_Y + self.btn_card.data = self + + self:Init() + return self, self.btn_card +end + +function M:Init() + self.card_width = 87 + self.initPos = Vector2.zero +end + +function M:InitUI(card_code, type) + local card + if type == 0 then + card = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Btn_Card") + self.icon = card:GetChild("icon") + self.icon.icon = self:getHandCardItem("ui://Main_RunBeard/201_", card_code) + self.icon:SetScale(self:getCardSize(), self:getCardSize()) + card:GetChild("n6"):SetScale(self:getCardSize(), self:getCardSize()) + elseif type == 1 then + card = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + self.icon = card:GetChild("icon") + if card_code == 0 then + self.icon = "ui://Main_RunBeard/202_1_300" + else + self.icon = self:GetCardItem("ui://Main_RunBeard/203_", card_code) + end + end + return card +end + +function M:GetCardItem(card_1, card_2) + local room = DataManager.CurrenRoom + if room.change_card_display ~= nil then + return card_1 .. room.change_card_display .. card_2 + else + return card_1 .. "2_" .. card_2 + end +end + +function M:getCardSize() + if self._room.change_card_size ~= nil then + return self._room.change_card_size + else + return 1 + end +end + +function M:getHandCardItem(card_1, card_2) + if self._room.change_card_display ~= nil then + if self._room.change_card_display == "1_" then + if self._room.change_card_size ~= nil then + self.card_width = 94 * self._room.change_card_size + else + self.card_width = 94 + end + + return card_1 .. "4_" .. card_2 + end + if self._room.change_card_size ~= nil then + self.card_width = 87 * self._room.change_card_size + else + self.card_width = 87 + end + return card_1 .. self._room.change_card_display .. card_2 + else + if self._room.change_card_size ~= nil then + self.card_width = 90 * self._room.change_card_size + else + self.card_width = 90 + end + return card_1 .. "6_" .. card_2 + end +end + +function M:UpdateKan() + self.btn_card.touchable = false + self.btn_card:GetController("Kan").selectedIndex = 1 +end + +function M:UpdateTing(isting) + self.btn_card:GetController("mark_ting").selectedIndex = isting and 1 or 0 +end + +function M:UpdateIcon() + self.icon.icon = self:getHandCardItem("ui://Main_RunBeard/201_", self.card_item) + -- self.btn_card:TweenMove(self:GetHandCardPos(self, #CountCards), 0.02) +end + +function M:UpdateScale() + local size = self._room.change_card_size + -- card_view.btn_card:GetChild("icon").icon = self:getHandCardItem("ui://Main_RunBeard/201_", card_view.card_item) + self.icon:SetScale(size, size) + self.btn_card:GetChild("n6"):SetScale(size, size) + -- self:getCardWidth() +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPChiView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPChiView.lua new file mode 100644 index 00000000..66b171b5 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPChiView.lua @@ -0,0 +1,131 @@ +local M = {} + +function M.InitChiView(gamectr, view, cardInfo) + local self = setmetatable({}, {__index = M}) + self._room = DataManager.CurrenRoom + self.class = "ChiView" + self._gamectr = gamectr + self._mainView = view + self._cardInfo = cardInfo + return self +end + +function M:UpdateChiView(list, tip_hu, callback, cardInfo) + self:ShowView(list, tip_hu, callback, cardInfo) +end + +function M:ShowView(tiplist, tip_hu, callback, cardInfo) + local _pop_tip_choice = UIPackage.CreateObject("Main_RunBeard", "Pop_tip_choice") + local list_choose = _pop_tip_choice:GetChild("Lst_choose") + _pop_tip_choice:GetChild("dibtn").onClick:Add(function() + _pop_tip_choice:Dispose() + end) + + -- --list 去重复的 + if #tiplist == 1 then + _pop_tip_choice:GetController("bipai").selectedIndex = 3 + end + + local tip_list = membe_deep_clone(tiplist) + for i = 1, #tiplist do + for k = 1, #tip_list do + if tip_list[k].weight ~= 4 and tiplist[i].id ~= tip_list[k].id then + if tiplist[i].OpCard[1] == tip_list[k].OpCard[1] and tiplist[i].OpCard[2] == tip_list[k].OpCard[2] then + tip_list[i].weight = 4 + end + end + end + end + + list_choose:RemoveChildrenToPool() + for i = 1, #tip_list do + if tip_list[i].weight ~=4 then + local item_choose = list_choose:AddItemFromPool() + self:SetIcon(item_choose, 2, tip_list[i].OpCard[1]) + self:SetIcon(item_choose, 3, tip_list[i].OpCard[2]) + self:SetIcon(item_choose, 1, tip_list[i].card) + + item_choose.onClick:Add(function() + for k=1,list_choose.numChildren do + list_choose:GetChildAt(k-1):GetController("zhong") .selectedIndex = 0 + end + item_choose:GetController("zhong").selectedIndex = 1 + if tip_list[i].bi_list ==nil then + callback(tip_list[i].id) + self:CloseTip() + else + self.bilist={} + self._chiid = tip_list[i].id + self:CheckRatioCard(tip_list[i].bi_list,1,tip_list[i].card) + + end + end) + end + end + list_choose:ResizeToFit(#tip_list) + _pop_tip_choice:GetChild("di1").width = list_choose.width+110 + _pop_tip_choice.xy = Vector2((self._mainView.width - _pop_tip_choice.width)/2, -100) + self._mainView:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice + end + --比牌显示 + function M:CheckRatioCard(_tiplist,index,chicard,_biid) + if _biid ~=nil then + self.bilist={} + self.bilist[#self.bilist+1] = _biid + end + self._pop_tip_choice:GetController("bipai").selectedIndex = index + local Bilist_choose = self._pop_tip_choice:GetChild("Bi_Lst_choose"..index) + Bilist_choose:RemoveChildrenToPool() + for i = 1, #_tiplist do + local item = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Comp_choose") + local item_choose = Bilist_choose:AddChild(item) + self:SetIcon(item_choose, 2, _tiplist[i].opcard[1]) + self:SetIcon(item_choose, 3, _tiplist[i].opcard[2]) + self:SetIcon(item_choose, 1, chicard) + item_choose:GetController("zhong") .selectedIndex = 0 + item_choose.onClick:Add(function() + for k=1,Bilist_choose.numChildren do + Bilist_choose:GetChildAt(k-1):GetController("zhong") .selectedIndex = 0 + end + item_choose:GetController("zhong") .selectedIndex = 1 + if _tiplist[i].bi_list ==nil then + if tip_hu then + local guo_msg = MsgWindow.new(self._root_view, "确定取消胡吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + self.bilist[#self.bilist+1] = i-1 + self._gamectr:SendAction(self._chiid,self.bilist) + guo_msg:Close() + self:CloseTip() + self._cardInfo:UpdateIsOnClick(false) + end) + guo_msg:Show() + else + self.bilist[#self.bilist+1] = i-1 + self._gamectr:SendAction(self._chiid,self.bilist) + self:CloseTip() + self._cardInfo:UpdateIsOnClick(false) + end + else + self:CheckRatioCard(_tiplist[i].bi_list,2,chicard,i-1) + end + end) + end + Bilist_choose:ResizeToFit(#_tiplist) + self._pop_tip_choice:GetChild("di"..index+1).width = Bilist_choose.width+110 + + end + + +function M:SetIcon(item, index, card) + item:GetChild("card" .. index).icon = UIPackage.GetItemURL("Main_RunBeard", CommonFun:GetCardItem("201_", card)) +end + +function M:CloseTip() + if (self._pop_tip_choice) then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPFzCardView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPFzCardView.lua new file mode 100644 index 00000000..1f64ef41 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPFzCardView.lua @@ -0,0 +1,181 @@ +local M = {} + +local source_fz_03 = "ui://Main_RunBeard/Fz_0_3" +local source_fz_04 = "ui://Main_RunBeard/Fz_0_4" +local source_card = "ui://Main_RunBeard/202_" + +function M:getCardItem(card_1, card_2) + local room = DataManager.CurrenRoom + if room.change_card_display ~= nil then + return card_1 .. room.change_card_display .. card_2 + else + return card_1 .. "6_" .. card_2 + end +end + +function M.InitFzView(fz,isMy,isplay,index,count) + local self = setmetatable({}, {__index = M}) + local item,fzcards + if fz.type ~= RB_FZType.Kan then + item = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Component1")--Extend_Poker_AHRunBeard + item:RemoveChildren(0, -1, true) + end + + -- local fzItem + if fz.type == RB_FZType.Bi or fz.type == RB_FZType.Chi then + fzcards = self:UpateChiBi(item,fz) + elseif fz.type == RB_FZType.Peng then + fzcards = self:UpdatePeng(item,fz) + elseif fz.type == RB_FZType.Wei or fz.type == RB_FZType.ChouWei then + fzcards = self:UpdateWei(item,fz,isMy) + elseif fz.type == RB_FZType.Ti then + fzcards = self:UpateTi(item,fz) + elseif fz.type == RB_FZType.Pao then + fzcards = self:UpatePao(item,fz) + end + + if item ~= nil and fzcards ~= nil then + self:PlayEffect(item,fzcards,isplay,index,count) + end + + return item,fzcards +end + +function M:UpateChiBi(item,fz) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_03) + local cardId1,cardId2,cardId3 + if #fz.opcard == 2 then + cardId1 = fz.card + cardId2 = fz.opcard[1] + cardId3 = fz.opcard[2] + else + cardId1 = fz.opcard[1] + cardId2 = fz.opcard[2] + cardId3 = fz.opcard[3] + end + fzcards:GetChild("card_" .. 1).icon = self:getCardItem(source_card, cardId1) + fzcards:GetController("c2").selectedIndex = 1 + fzcards:GetChild("card_" .. 2).icon = self:getCardItem(source_card, cardId2) + -- local card = fz.opcard[2] == nil and fz.opcard[1] or fz.opcard[2] + fzcards:GetChild("card_" .. 3).icon = self:getCardItem(source_card, cardId3) + fzcards.x, fzcards.y = 0, 0 + item:AddChildAt(fzcards, 0) + return fzcards +end + +function M:UpdatePeng(item,fz) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_03) + for j = 1, 3 do + fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1]) + end + fzcards.x, fzcards.y = 0, 0 + item:AddChildAt(fzcards, 0) + return fzcards +end + +function M:UpdateWei(item,fz,isMy) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_03) + --fzcards:GetController("c1").selectedIndex=1 + local room = DataManager.CurrenRoom + for j = 1, 3 do + if room.room_config.mingwei or fz.type==RB_FZType.ChouWei or isMy then + if j == 3 then + fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1]) + else + fzcards:GetChild("card_" .. j).icon = "ui://Main_RunBeard/202_1_300" + end + else + --未勾选明偎 + -- if isMy then + -- fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1]) + -- fzcards:GetController("c1").selectedIndex = 1 + -- else + fzcards:GetChild("card_" .. j).icon = "ui://Main_RunBeard/202_1_300" + -- end + end + + end + fzcards.x, fzcards.y = 0, 0 + item:AddChildAt(fzcards,0) + return fzcards +end + +function M:UpateTi(item, fz,icon) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_04) + for i = 1, 4 do + if i == 4 and fz.type == RB_FZType.Ti then + fzcards:GetChild("card_" .. i).icon = self:getCardItem(source_card, fz.card) + else + fzcards:GetChild("card_" .. i).icon = "ui://Main_RunBeard/202_1_300" + end + end + fzcards.x, fzcards.y = 0, 0 + -- item:AddChildAt(fzcards,0) + return fzcards +end + +function M:UpatePao(item, fz,icon) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_04) + for i = 1, 4 do + fzcards:GetChild("card_" .. i).icon = self:getCardItem(source_card, fz.opcard[1]) + end + fzcards.x, fzcards.y = 0, 0 + return fzcards +end + +function M:PlayEffect(fzitem,fzcards,isplay,index,count) + if (isplay == nil) then + isplay = false + end + if (isplay and index == count) then + local faArray = fzitem:GetChild("chiwei") + if (faArray ~= nil) then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end +end + +function M:PlayEffectOther(fzitem,fzcards, size,i,isplay,seat) + isplay = isplay == nil and false or isplay + local isAddlast = false + + local room = DataManager.CurrenRoom + if isplay and i== size then + local faArray = fzitem:GetChild("chiwei") + if room.room_config.people_num == 3 then + if (room.self_player.seat == 1) then + if (seat == 2) then + faArray = fzitem:GetChild("chiwei1") + else + faArray = fzitem:GetChild("chiwei") + end + elseif (room.self_player.seat == 2) then + if (seat == 3) then + faArray = fzitem:GetChild("chiwei1") + else + faArray = fzitem:GetChild("chiwei") + end + elseif (room.self_player.seat == 3) then + if (seat == 1) then + faArray = fzitem:GetChild("chiwei1") + else + faArray = fzitem:GetChild("chiwei") + end + end + end + + if (faArray ~= nil) then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPGameController.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPGameController.lua new file mode 100644 index 00000000..ab5e5a19 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPGameController.lua @@ -0,0 +1,10 @@ + +local M = {} + +setmetatable(M,{__index = GameController}) + +function M:init(name) + GameController.init(self,name) +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPGameEvent.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPGameEvent.lua new file mode 100644 index 00000000..22d92845 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPGameEvent.lua @@ -0,0 +1,22 @@ +local ZPGameEvent = { + -- 发牌 + SendCards = 'SendCards', + --发最后一张牌 + AddCard = 'AddCard', + -- 胡牌 + ZPHuCard = 'ZPHuCard', + -- 结算事件 + ZPResult1 = 'ZPResult1', + -- 大结算事件 + ZPResult2 = 'ZPResult2', + -- 转盘指向事件 + EventTurn = 'EventTurn', + OutHint = 'OutHint', --出牌tips + GetCard = 'GetCard', --摸牌 + OutCard = 'OutCard', --出牌 + FangziAction = 'FangziAction', --吃碰等操作事件 + FZTips = 'FZTips', --放子提示 + QiCard = 'QiCard' --弃牌 +} + +return ZPGameEvent diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPMainView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPMainView.lua new file mode 100644 index 00000000..9b22561d --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPMainView.lua @@ -0,0 +1,401 @@ +local PlayerSelfCardInfoView = import('.ZPPlayerSelfCardInfoView') +local PlayerCardInfoView = import('.ZPPlayerCardInfoView') +local ZPSettingView = import('.ZPSettingView') +local ZPTableBG = import('.ZPTableBG') +local HuTipView = import('.HuTipView') +local ZPGameEvent = import('.ZPGameEvent') +local M = { + default_btn = false +} + +setmetatable(M, {__index = MainView}) + +local default_bg = 1 + +function M:InitView(url, isdisplay, open_social, change_card_size, qihu) + UIPackage.AddPackage('base/main_zipai/ui/Main_RunBeard') + MainView.InitView(self, url) + self._full_offset = false + --显示背景 + ZPTableBG.LoadTableBG(default_bg, self._room.game_id, self._root_view) + self.qihu = qihu + if qihu ~= nil then + local id = ZPTableBG.GetTableBG(self._room.game_id) + if id > 3 or id <= 0 then + id = 1 + end + if self._room.score_times ~= nil and self._room.score_times > 0 then + self._view:GetChild('di_text').text = + self._room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起 ' .. self._room.score_times .. '倍' + else + self._view:GetChild('di_text').text = self._room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起' + end + self._view:GetController('bg_state').selectedIndex = id - 1 + end + self.cd_time = 0 + self.default_btn = open_social + if isdisplay == nil then + isdisplay = false + end + local tex_round = self._view:GetChild('tex_round') + self._tex_leftTime = self._view:GetChild('time') + local remaining_card = self._view:GetChild('remaining_card') + self._tex_LeftCard = self._view:GetChild('remaining_card') + self._rightPanelView._opt = 2 + self._rightPanelView:__UpdateTime() + local rightpanel = self._view:GetChild('right_panel') + if (rightpanel ~= nil) then + self.tex_gametype = rightpanel:GetChild('tex_gametype') + if (self.tex_gametype ~= nil) then + self.tex_gametype.text = self._room.room_config:GetGameName() + end + end + self._player_card_info = {} + local _room = self._room + self._hu_tip = HuTipView.new(self) + --加载上次游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id) + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + + local _gamectr = self._gamectr + _gamectr:SendChangeTypeFace(typeface) + if typeface == 1 then + if isdisplay then + self._room.change_card_display = '7_' + else + self._room.change_card_display = '2_' + end + elseif typeface == 2 then + self._room.change_card_display = '1_' + elseif typeface == 3 then + self._room.change_card_display = '3_' + elseif typeface == 4 then + self._room.change_card_display = '8_' + end + end + -- self._view.fairyBatching = true + --加载上次游戏的手牌大小 + + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. 'cardsize_new') + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_cardsize'] + local _gamectr = self._gamectr + if typeface == 0 then + self._room.change_card_size = 1.2 + elseif typeface == 1 then + self._room.change_card_size = 1 + elseif typeface == 2 then + self._room.change_card_size = 0.8 + end + else + self._room.change_card_size = change_card_size + end + + --加载上次游戏的接收语音 + if self.default_btn then + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. 'yuyin') + local json_data1 = Utils.LoadLocalFile(user_id .. _room.game_id .. 'chupai') + local json_data2 = Utils.LoadLocalFile(user_id .. _room.game_id .. 'fangyan') + self._room.yuyin_typeface = 1 + self._room.chupai_typeface = 1 + self._room.fangyan_typeface = 1 + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + self._room.yuyin_typeface = typeface + self:SetInteractEnabled(typeface == 1 and 0 or 1) + end + if json_data1 ~= nil then + local _data = json.decode(json_data1) + local typeface = _data['game_typeface'] + self._room.chupai_typeface = typeface + end + if json_data2 ~= nil then + local _data = json.decode(json_data2) + local typeface = _data['game_typeface'] + self._room.fangyan_typeface = typeface + end + end + + local _player_card_info = self._player_card_info + for i = 1, _room.room_config.people_num do + local tem = self._view:GetChild('player_card_info' .. i) + _player_card_info[i] = self:NewPlayerCardInfoView(tem, i) + end + + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = _player_card_info[self:GetPos(p.seat)] + info:SetPlayer(p) + info:FillData() + end + + self._rightPanelView.ctr_log.selectedIndex = 0 + local list = _room.player_list + local readyNum = 0 + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + if p.ready then + readyNum = readyNum + 1 + end + end + if (_room.curren_round > 0) then + self._rightPanelView.ctr_log.selectedIndex = 0 + end + + self._ctr_action = self._view:GetController('action') + if _room.banker_seat == _room.self_player.seat and readyNum > 1 and readyNum == _room.room_config.people_num then + elseif not _room.self_player.ready then + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig then + if round>1 then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 2 + end + + else + self._ctr_action.selectedIndex = 1 + end + + + else + self._ctr_action.selectedIndex = 0 + end + self:ResetHandCard() + self:showBackBtnView() + self:InitXiPai() + self:InitXiPai1() +end + +function M:InitXiPai() + self._xipaiPanel = UIPackage.CreateObjectFromURL("ui://Common/panel_handzipai02") + self._root_view:AddChild(self._xipaiPanel) + + local offset = get_offset(self._full_offset) + + self._xipaiPanel.width = GRoot.inst.width - (offset * 2) + self._xipaiPanel.height = GRoot.inst.height + self._xipaiPanel.x = offset + + self._xipaiPanel.visible=false + --self:PlayXiPai() +end + +function M:PlayXiPai(xipaiCallBack) + if self._xipaiPanel then + coroutine.start(function() + self._xipaiPanel.visible=true + self._xipaiPanel:GetTransition("XiPai"):Play() + coroutine.wait(3.5) + self._xipaiPanel.visible=false + if xipaiCallBack then + xipaiCallBack() + end + end) + + + end +end + +function M:InitXiPai1() + self._xipaiPanel1 = UIPackage.CreateObjectFromURL("ui://Common/panel_handzipai03") + self._root_view:AddChild(self._xipaiPanel1) + + local offset = get_offset(self._full_offset) + + self._xipaiPanel1.width = GRoot.inst.width - (offset * 2) + self._xipaiPanel1.height = GRoot.inst.height + self._xipaiPanel1.x = offset + + self._xipaiPanel1.visible=false + --self:PlayXiPai() +end + +function M:PlayXiPai1(xipaiCallBack) + if self._xipaiPanel1 then + coroutine.start(function() + self._xipaiPanel1.visible=true + self._xipaiPanel1:GetTransition("XiPai"):Play() + coroutine.wait(3.5) + self._xipaiPanel1.visible=false + if xipaiCallBack then + xipaiCallBack() + end + end) + + + end +end + + +function M:NewSettingView(cardIndex) + local settingView = ZPSettingView.new(self._view, 2, self.default_btn,cardIndex) + settingView:FillBgSection( + function(url) + LoadGameBg(url, self._root_view) + end, + self._room.game_id, + default_bg, + self._room, + self.qihu + ) + return settingView +end + +function M:EventInit() + MainView.EventInit(self) +end + +function M:NewPlayerCardInfoView(view, index) + if index == 1 then + return PlayerSelfCardInfoView.new(view, self) + end + return PlayerCardInfoView.new(view, self) +end + +-- 设置 更新 手牌字体 三套 +function M:UpdateCardDisplay(index) + local _gamectr = self._gamectr + _gamectr:SendChangeTypeFace(index) + if index == 1 then + self._room.change_card_display = '2_' + elseif index == 2 then + self._room.change_card_display = '1_' + elseif index == 3 then + self._room.change_card_display = '3_' + elseif index == 4 then + self._room.change_card_display = '8_' + end + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + if p.DiceCard ~= nil and p.DiceCard ~= 0 then + info:UpdateOutCardList(p.DiceCard) + end + if p.outcard_list ~= nil and #p.outcard_list > 0 then + info:UpdateQiPai(p.outcard_list) + end + if p.fz_list ~= nil and #p.fz_list > 0 then + info:UpdateFzList(p.fz_list) + end + if p.seat == self._room.self_player.seat then + info:UpdateCardDisplay() + end + end +end + +-- 设置 更新 手牌大小 +function M:UpdateCardSize(index) + if index == 0 then + self._room.change_card_size = 1.2 + elseif index == 1 then + self._room.change_card_size = 1 + elseif index == 2 then + self._room.change_card_size = 0.8 + end + local info = self._player_card_info[1] + info:UpdateCardSize() +end + +-- 设置 更新 方言 +function M:UpdateFangyan(index) + self._room.fangyan_typeface = index +end +--刷新手牌排列 按钮 三种 排列方法 在 PendulumRule 里 +function M:ResetHandCard(...) + local btn_reset = self._view:GetChild('btn_reset') + btn_reset.visible=false + btn_reset.onClick:Set( + function(...) + if self._popEvent == false then + return + end + --加载上次的 + local index = 1 + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. 'ResetHandCard') + if json_data ~= nil then + local _data = json.decode(json_data) + index = _data['index'] + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['ResetHandCard'] = true + if index == 1 then + _data['index'] = 2 + elseif index == 2 then + _data['index'] = 3 + elseif index == 3 then + _data['index'] = 1 + end + local key = user_id .. 'ResetHandCard' + Utils.SaveLocalFile(key, json.encode(_data)) + local x = _data['index'] + local card_info = self._player_card_info[1] + --printlog("1111111111111111111111111",x) + card_info:InitHandCard(false, x) + end + ) +end + +function M:showBackBtnView() + local btn_back_lobby = self._view:GetChild('btn_back_lobby') + local btn_jiesan_lobby1 = self._view:GetChild('Btn_jiesan_lobby') + --btn_jiesan_lobby1.displayObject.gameObject:SetActive(false) + --btn_jiesan_lobby1:GetChild("n8").displayObject.gameObject:SetActive(false) + if (btn_jiesan_lobby1 ~= nil) then + btn_jiesan_lobby1.onClick:Set( + function() + if (self.cd_time > 0) then + ViewUtil.ErrorTip(nil, '您还处于解散冷却时间当中,请稍后再试') + else + self.cd_time = 30 + self._gamectr:AskDismissRoom( + function(res) + ViewUtil.ErrorTip(res.ReturnCode, '') + end + ) + self:onDisBandTimer() + end + end + ) + end +end + +--解散计时器 +function M:onDisBandTimer() + if self.cd_coroutine ~= nil then + coroutine.stop(self.cd_coroutine) + end + self.cd_coroutine = + coroutine.start( + function() + while (self.cd_time > 0) do + self.cd_time = self.cd_time - 1 + self.cd_time = math.max(0, self.cd_time) + if self.cd_time > 0 then + coroutine.wait(1) + end + end + end + ) +end + +function M:Destroy() + UIPackage.RemovePackage('base/main_zipai/ui/Main_RunBeard') + MainView.Destroy(self) +end +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPPlayBackView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPPlayBackView.lua new file mode 100644 index 00000000..5633fd43 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPPlayBackView.lua @@ -0,0 +1,13 @@ +local ZPTableBG = import('.ZPTableBG') + +local M = {} + +setmetatable(M, {__index = PlayBackView}) + +function M:InitView(url) + PlayBackView.InitView(self, url) + local _view = self._view + ZPTableBG.LoadTableBG(1, self._room.game_id, self._root_view) +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPPlayer.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPPlayer.lua new file mode 100644 index 00000000..fe112fd2 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPPlayer.lua @@ -0,0 +1,37 @@ + + +local EXPlayer ={ + -- 手牌列表 + card_list = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil, + hu_xi =0 +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 + self.hu_xi =0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPPlayerCardInfoView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPPlayerCardInfoView.lua new file mode 100644 index 00000000..3139e761 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPPlayerCardInfoView.lua @@ -0,0 +1,476 @@ +local PendulumRule = import('.PendulumRule') +AreaOderType = { + left_right = "left_right", + right_left = "right_left", + up_down = "up_down", + down_up = "down_up" +} + +local PlayerCardInfoView = { + _view = nil, + _mainView = nil, + + _mask_liangpai = nil, + _area_outcard_list = nil, + _area_handcard_list = nil, + + +} +local function NewCardView(card,cardItem,index_X,index_Y) + local self = {} + setmetatable(self,{__index = CardView}) + self.btn_card = card + self.card_item = cardItem + self.index_X = index_X + self.index_Y = index_Y + return self +end + + +local M = PlayerCardInfoView + +function M.new(view,mainView) + local self = {} + setmetatable(self, {__index = M}) + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:init() + + local view = self._view + self._room = DataManager.CurrenRoom + self._area_outcard_list = view:GetChild("area_outcard_list") + self._area_handcard_list = view:GetChild("area_handcard_list") + self._area_fz_list = view:GetChild("area_fz_list") + self._area_qipai_list = view:GetChild("windcard_list") + self._mask_liangpai = view:GetChild("mask_liangpai") + UIPackage.AddPackage("base/main_zipai/ui/Main_RunBeard") +end + +function M:SetPlayer(p) + self._player = p +end + +function M:FillData(begin) + +end + +function M:Clear() + self._area_outcard_list:RemoveChildren(0, -1, true) + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_qipai_list:RemoveChildren(0, -1, true) + self._mask_liangpai:RemoveChildren(0, -1, true) +end + + +function M:fillCard(obj,card_type,card) + +end + + +function M:ClearOutCard() + self._area_outcard_list:RemoveChildren(0, -1, true) + +end + +--弃牌 +function M:UpdateQiPai( qi_list) + self._area_qipai_list:RemoveChildren(0,-1,true) + for i=1,#qi_list do + local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + qicards:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",qi_list[i]) + self._area_qipai_list:AddChild(qicards) + end + +end + + --放字 +function M:UpdateFzList( fz_list ) + printlog("UpdateFzList=======") + pt(fz_list) + self._area_fz_list:RemoveChildren(0,-1,true) + for i = 1,#fz_list do + local fzitem = nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Component1") + fzitem:RemoveChildren(0,-1,true) + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetController("c2").selectedIndex =1 + fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].active_card) + fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[1]) + fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[2]) + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Peng then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Wei then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Pao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Ti then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + if j==4 then + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + else + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + end + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + end + end +end + +--回放手牌 +function M:InitHandCard(handcard) + self._area_handcard_list:RemoveChildren(0,-1,true) + local pokerList =PendulumRule.GetHandCard(handcard) --self:PendulumRule(handcard) + self.card_lists ={} + for i =1,#pokerList do + for j =1,#pokerList[i] do + local card_code = pokerList[i][j] + local btn_card =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",card_code) + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card,5-j) + local card_view = NewCardView(btn_card,card_code,i,j) + self.card_lists[#self.card_lists+1] = card_view + end + end + for j=#self.card_lists,1,-1 do + local card_view = self.card_lists[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view,#pokerList) + end + + if self._player.fz_list~=nil then + for i=1,#self._player.fz_list do + if self._player.fz_list[i].type == RB_FZType.Kan then + self:UpdateKan(self._player.fz_list[i].card) + end + end + end +end + + + +function M:UpdateHandCards( list ) + self.card_lists = {} + self._area_handcard_list:RemoveChildren(0,-1,true) + local CountCards = {} + for i=1,#list do + CountCards[list[i].index_X]=CountCards[list[i].index_X] == nil and 1 or CountCards[list[i].index_X] + 1 + end + for i=1,#list do + local card_code = list[i].card_item + local btn_card =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",card_code) + local card_view = NewCardView(btn_card,card_code,list[i].index_X,list[i].index_Y) + --存牌堆 + self.card_lists[#self.card_lists+1] =card_view + end + for j=#self.card_lists,1,-1 do + local card_view = self.card_lists[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view,#CountCards) + end + +end + +--牌位置 +function M:GetHandCardPos(cards_view,cards) + local x,y = 0,0 + local card_width = 42 -- 牌的宽度 + local middle_x = self._area_handcard_list.width / 2 + local start_x = middle_x - (cards / 2 * (card_width)) + x = start_x + (card_width) * (cards_view.index_X - 1) + y = 0 - (42*cards_view.index_Y) + return Vector2.New(x,y) +end + + + +function M:UpdateOutCardList(outcard) + + self._area_outcard_list:RemoveChildren(0,-1,true) + local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + if outcard==0 then + outcards:GetChild("icon").icon ="ui://Main_RunBeard/201_1_300" + else + outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/203_",outcard) + end + outcards.x,outcards.y = 0,0 + self._area_outcard_list:AddChild(outcards) +end + +--摸牌动画 +function M:PlayingOutCardAnima(card) + if(self._area_outcard_list ~=nil and self._area_outcard_list.numChildren>0)then + self._area_outcard_list:GetChildAt(0):GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/202_",card) + self._view:GetTransition("t0"):Play() + end + coroutine.start(function() + coroutine.wait(0.1) + self:ClearOutCard() + end) + -- +end + + +--摆牌规则 +function M:PendulumRule(handcard) + local room = DataManager.CurrenRoom + local card_list = handcard + local card_count = #card_list + local cards_map = {} + local CountCards = {} + for i=1,#card_list do + CountCards[card_list[i]]= CountCards[card_list[i]] == nil and 1 or CountCards[card_list[i]] + 1 + end + --find4 + for k,v in pairs(CountCards) do + if (v == 4) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + --find AAa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] >= 2 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-3 + end + end + end + --find aaA + for i = 101, 110 do + if CountCards[i]~=nil and (CountCards[i] >= 2) then + if CountCards[i + 100]~=nil and (CountCards[i + 100] == 1) then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i+100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i +100] = CountCards[i +100] - 1 + card_count = card_count-3 + end + end + end + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + --find 小 2 7 10 + local counta = CountCards[102] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[110]~=nil and CountCards[102] >0 and CountCards[107] >0 and CountCards[110] >0 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cs[3]= 110 + cards_map[#cards_map+1] = cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 3 + end + end + end + + --find 大 2 7 10 + local countA = CountCards[202] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[210]~=nil and CountCards[202] >0 and CountCards[207] >0 and CountCards[210] >0 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cs[3]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 3 + end + end + end + + --find abc + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and (CountCards[i] > 0 and CountCards[i + 1] > 0 and CountCards[i + 2] > 0) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + --find ABC + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and (CountCards[i] > 0 and CountCards[i + 1] > 0 and CountCards[i + 2] > 0) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + --find Aa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] == 1 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 1; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-2 + end + end + end + + local r_count = 9 - #cards_map + local merge = false + merge = r_count0 then + for i=1,#tempNotPutList do + self:UpdateKan(tempNotPutList[i]) + end + end +end + +--手牌 +function M:InitHandCard(isPlayAni, index) + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + self.outcard_button = nil + + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + self.cor_init_poker = nil + local _room = DataManager.CurrenRoom + --得到排序好的 list + local pokerList = PendulumRule.GetHandCard(_room.self_player.handcard_list, index) + if pokerList == nil or #pokerList == 0 then + return + end + self.cards_count = #pokerList + self.card_list = {} + self._area_handcard_list:RemoveChildren(0, -1, true) + --开始发牌动画 + if isPlayAni == true then + self.cor_init_poker = + coroutine.start( + function() + self._mainView._popEvent = false + if self._mainView._rightPanelView._settingView ~= nil then + self._mainView._rightPanelView._settingView:SetBtnUpdateCardEnable(false) + end + for i = 1, #pokerList do + local pokerListNum = 0 + for j = 1, #pokerList[i] do + local card_code = pokerList[i][j] + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 95 * self:getCardSize() + self.card_hight = 123 * self:getCardSize() + local x, y = 500, (j * 85) - 500 + btn_card:SetXY(x, y) + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card, 5 - j) + local card_view = NewCardView(btn_card, card_code, i, j) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + btn_card.data = card_view + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + end + for j = #self.card_list, 1, -1 do + coroutine.wait(0.005) + if pokerListNum == #pokerList[i] then + break + end + pokerListNum = pokerListNum + 1 + local card_view = self.card_list[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, self.cards_count), 0.08) + end + end + self:UpdateHandCardsPos() + self._mainView._popEvent = true + self:UpdateIsOnClick(true) + if self._mainView._rightPanelView._settingView ~= nil then + coroutine.start( + function() + coroutine.wait(1) + self._mainView._rightPanelView._settingView:SetBtnUpdateCardEnable(true) + end + ) + end + end + ) + else + --没有发牌动画 + for i = 1, #pokerList do + for j = 1, #pokerList[i] do + local card_code = pokerList[i][j] + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 95 * self:getCardSize() + self.card_hight = 123 * self:getCardSize() + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card, 5 - j) + local card_view = NewCardView(btn_card, card_code, i, j) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + btn_card.data = card_view + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + end + --存牌堆 + for j = 1, #self.card_list do + local card_view = self.card_list[j] + card_view.btn_card.xy = self:GetHandCardPos(card_view, self.cards_count) + end + end + if self._player.fz_list ~= nil then + for i = 1, #self._player.fz_list do + if self._player.fz_list[i].type == RB_FZType.Kan then + self:UpdateKan(self._player.fz_list[i].card) + end + end + end + self:UpdateHandCardsPos() + end + + self:SetNotPutCard() +end +--更新手牌 +function M:UpdateHandCards(list) + self.card_list = {} + self._area_handcard_list:RemoveChildren(0, -1, true) + + self.outcard_button = nil + + local CountCards = {} + for i = 1, #list do + CountCards[list[i].index_X] = CountCards[list[i].index_X] == nil and 1 or CountCards[list[i].index_X] + 1 + end + for i = 1, #list do + local card_code = list[i].card_item + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 87 * self:getCardSize() + self.card_hight = 110 * self:getCardSize() + local card_view = NewCardView(btn_card, card_code, list[i].index_X, list[i].index_Y) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + btn_card.data = card_view + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + end + for j = #self.card_list, 1, -1 do + local card_view = self.card_list[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view, #CountCards) + end + if self._player.fz_list ~= nil then + for i = 1, #self._player.fz_list do + if self._player.fz_list[i].type == RB_FZType.Kan then + self:UpdateKan(self._player.fz_list[i].card) + end + end + end + self:SetNotPutCard() +end + +-- -- +function M:onTouchBegin(context) + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + local button = context.sender + local card = button.data + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self:ShowHuTip(card.card_item) + end + card.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/203_', card.card_item) + -- card.btn_card.sortingOrder = 100 + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + card.btn_card.xy = Vector2.New(card.btn_card.x + 20, card.btn_card.y - 50) + card.touch_pos = xy - button.xy +end + +function M:onTouchMove(context) + local button = context.sender + local card = button.data + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + button.xy = xy - card.touch_pos +end + +--出牌提示动画 +function M:ChuPaiTiShi() + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self._view:GetController('chupai').selectedIndex = 1 + else + self._view:GetController('chupai').selectedIndex = 0 + end +end +-- 删手牌 +function M:DeleteHandCard(carditem) + local card = nil + if self.outcard_button ~= nil and carditem == self.outcard_button.card_item then + list_remove(self.card_list, self.outcard_button) + self._area_handcard_list:RemoveChild(self.outcard_button.btn_card, true) + + card = self.outcard_button + self.outcard_button = nil + else + for i = 1, #self.card_list do + local card_view = self.card_list[i] + if carditem == card_view.card_item then + card_view.btn_card.touchable = false + list_remove(self.card_list, card_view) + card = card_view + --card_view.btn_card:RemoveFromParent() + self._area_handcard_list:RemoveChild(card_view.btn_card, true) + break + end + end + end + if card ~= nil then + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + end + end + self:UpdateHandCardsPos() +end +--更新手牌的坎 +function M:UpdateKan(card) + for i = 1, #self.card_list do + local card_view = self.card_list[i] + if card_view.card_item == card then + --card_view.btn_card.touchable = false + card_view.btn_card:GetController('Kan').selectedIndex = 1 + end + end +end + +-- 手牌更新位置方法 self.card_list 里面的对象 NewCardView,index_X index_Y 就是xy序号 +function M:UpdateHandCardsPos() + --得到有 多少列 + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.old_postion = self:GetHandCardPos(card_view, #CountCards) + card_view.btn_card:TweenMove(card_view.old_postion, 0.3) + end + self:ShowHuTip() +end + +--刷新手牌字体 +function M:UpdateCardDisplay() + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + card_view.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_view.card_item) + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, #CountCards), 0.3) + end +end +--更新手牌大小 +function M:UpdateCardSize() + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + card_view.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_view.card_item) + card_view.btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + card_view.btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 87 * self:getCardSize() + self.card_hight = 110 * self:getCardSize() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, #CountCards), 0.3) + end +end + +function M:UpdateIsOnClick(isOut) + self._view.touchable = isOut +end + +-- 结束 拖拽事件 +-- 根据牌结束点的位置 判断是出牌还是调整位置 button.xy 和 牌的xy比较 +function M:__OnDragEnd(context) + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + if self.outcard_button then + self.outcard_button = nil + end + local button = context.sender + local card = button.data + -- card.btn_card.sortingOrder = 0 + local _room = DataManager.CurrenRoom + + if (button.y < -320 and _room ~= nil and _room.curren_outcard_seat == _room.self_player.seat) then + button.touchable = false + self.outcard_button = card + self:UpdateIsOnClick(false) + self._mainView:OutCard(card.card_item) + else + local isChangeCard = false + self.outcard_button = nil + card.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card.card_item) + self._area_handcard_list:AddChild(button) + if #self.card_list == 1 then + isChangeCard = false + self:UpdateHandCardsPos() + return + end + local CountCards = {} + for i = 1, #self.card_list do + local lists = {} + if CountCards[self.card_list[i].index_X] == nil then + lists[#lists + 1] = self.card_list[i] + CountCards[self.card_list[i].index_X] = lists + else + CountCards[self.card_list[i].index_X][#CountCards[self.card_list[i].index_X] + 1] = self.card_list[i] + end + end + local minmark = 1 + local maxmark = #self.card_list + if card == self.card_list[1] or card == self.card_list[#self.card_list] then + if self.card_list[1].index_X == self.card_list[2].index_X then + minmark = 2 + end + if self.card_list[#self.card_list].index_X == self.card_list[#self.card_list - 1].index_X then + maxmark = #self.card_list - 1 + end + end + --位置x小于第一张牌 放第一排 + if button.x + button.width / 2 < self.card_list[minmark].btn_card.x and #CountCards < 10 then + --位置大于最后一张牌 放最后一排 + list_remove(self.card_list, card) + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X < card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + else + for i = 1, #self.card_list do + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + card.index_X = 1 + card.index_Y = 1 + table.insert(self.card_list, 1, card) + isChangeCard = true + elseif button.x + button.width / 2 > (self.card_list[maxmark].btn_card.x + button.width) and #CountCards < 10 then + list_remove(self.card_list, card) + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + end + card.index_X = self.card_list[#self.card_list].index_X + 1 + card.index_Y = 1 + self.card_list[#self.card_list + 1] = card + isChangeCard = true + else + --放已有的牌堆上 判断放第几列 + local MoveCard = false + local MoveCardPos = 0 + local MoveCardY = 0 + for i = 1, #CountCards do + local card_view = CountCards[i][1] + if card_view ~= nil then + if + button.x + button.width / 2 > card_view.old_postion.x and + button.x + button.width / 2 < (card_view.old_postion.x + button.width) + then + if card ~= card_view and #CountCards[i] < 4 and card.index_X ~= card_view.index_X then + MoveCardPos = i + MoveCardY = #CountCards[i] + 1 + MoveCard = true + list_remove(self.card_list, card) + end + end + end + end + local MoveCardindex = 0 + -- local MoveCardY = 0 + if + button.x + button.width / 2 > card.old_postion.x and + button.x + button.width / 2 < (card.old_postion.x + button.width) + then + if #CountCards[card.index_X] > 1 then + for i = 1, #CountCards[card.index_X] do + local _cv = CountCards[card.index_X][i] + if _cv ~= card then + if + button.y + button.height / 2 > _cv.btn_card.y and + button.y + button.height / 2 < (_cv.btn_card.y + button.height) + then + --向下移動 + if ((button.y + button.height / 2) + 20) > (card.old_postion.y + button.height) then + --向上移動 + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + elseif ((button.y + button.height / 2) - 20) < card.old_postion.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + end + elseif i == #CountCards[card.index_X] and button.y + button.height / 2 < _cv.btn_card.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + elseif i == 1 and button.y + button.height / 2 > (_cv.btn_card.y + button.width) then + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + end + end + end + end + end + if MoveCard == true and MoveCardindex == 0 then + --上下移动 + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + if MoveCardPos > card.index_X then + MoveCardPos = MoveCardPos - 1 + end + end + card.index_X = MoveCardPos + card.index_Y = MoveCardY + for i = #self.card_list, 1, -1 do + if MoveCardPos == self.card_list[i].index_X then + table.insert(self.card_list, (i + 1), card) + break + end + end + isChangeCard = true + elseif MoveCard == true and MoveCardindex ~= 0 then + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X then + --向下移动 + if MoveCardindex == -1 then + --向上移动 + if self.card_list[i].index_Y < card.index_Y and self.card_list[i].index_Y >= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y + 1 + end + else + if self.card_list[i].index_Y > card.index_Y and self.card_list[i].index_Y <= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + end + end + end + card.index_X = MoveCardPos + card.index_Y = MoveCardY + for i = #self.card_list, 1, -1 do + if MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY - 1) then + table.insert(self.card_list, (i + 1), card) + break + elseif MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY + 1) then + table.insert(self.card_list, i, card) + break + end + end + isChangeCard = true + else + isChangeCard = false + self._area_handcard_list:AddChild(button) + end + end + self:UpdateHandCardsPos() + --每次改变手牌排列发给服务器 重连 回放需要用 --回放需要没次改变都要显示 + if isChangeCard == true then + self:SendChangeCard() + end + end +end + +--改变手牌排列发给服务器 +function M:SendChangeCard(...) + local list = {} + for i = 1, #self.card_list do + local data = {} + data.card = self.card_list[i].card_item + data.X = self.card_list[i].index_X + data.Y = self.card_list[i].index_Y + list[#list + 1] = data + end + self._mainView:ChangeCards(list) +end + +--计算手牌位置 +function M:GetHandCardPos(cards_view, cards) + local x, y = 0, 0 + local card_width = self.card_width -- 牌的宽度 + local middle_x = self._area_handcard_list.width / 2 + local start_x = middle_x - (cards / 2 * (card_width)) + x = start_x + (card_width) * (cards_view.index_X - 1) + + if self:getCardSize() == 1 then + y = 90 - (85 * cards_view.index_Y) + elseif self:getCardSize() == 1.2 then + y = 70 - (110 * cards_view.index_Y) + elseif self:getCardSize() == 0.8 then + y = 100 - (65 * cards_view.index_Y) + end + return Vector2.New(x, y) +end + +--更新 吃碰 +function M:UpdateFzList(fz_list) + printlog("UpdateFzList=======") + pt(fz_list) + self._area_fz_list:RemoveChildren(0, -1, true) + for i = 1, #fz_list do + local fzitem = nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Component1') + fzitem:RemoveChildren(0, -1, true) + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + fzcards:GetChild('card_' .. 1).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].active_card) + fzcards:GetController('c2').selectedIndex = 1 + fzcards:GetChild('card_' .. 2).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].opcard[1]) + fzcards:GetChild('card_' .. 3).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].opcard[2]) + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Peng then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + for j = 1, 3 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Wei then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + fzcards:GetController('c1').selectedIndex = 1 + for j = 1, 3 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + fzcards:GetController('c1').selectedIndex = 1 + for j = 1, 3 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Pao then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_4') + for j = 1, 4 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Ti then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_4') + for j = 1, 4 do + if j == 4 then + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + else + fzcards:GetChild('card_' .. j).icon = 'ui://Main_RunBeard/202_1_300' + end + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + end + end +end + +function M:ClearOutCard() + self._area_outcard_list:RemoveChildren(0, -1, true) +end +--出牌 +function M:UpdateOutCardList(outcard) + self._area_outcard_list:RemoveChildren(0, -1, true) + local outcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Gcm_OutCard') + if outcard == 0 then + outcards:GetChild('icon').icon = 'ui://Main_RunBeard/201_1_300' + else + outcards:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/203_', outcard) + end + outcards.x, outcards.y = 0, 0 + self._area_outcard_list:AddChild(outcards) +end + +--弃牌 +function M:UpdateQiPai(qi_list) + self._area_qipai_list:RemoveChildren(0, -1, true) + for i = 1, #qi_list do + local qicards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Qipai') + qicards:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/202_', qi_list[i]) + self._area_qipai_list:AddChild(qicards) + end +end + +--摸牌动画 +function M:PlayingOutCardAnima(card) + if (self._area_outcard_list ~= nil and self._area_outcard_list.numChildren > 0) then + self._area_outcard_list:GetChildAt(0):GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/202_', card) + self._view:GetTransition('t0'):Play() + end + coroutine.start( + function() + coroutine.wait(0.1) + self:ClearOutCard() + end + ) +end + +--得到设置的牌字体 +function M:getCardItem(card_1, card_2) + if self._room.change_card_display ~= nil then + --printlog("===========",self._room.change_card_display) + return card_1 .. self._room.change_card_display .. card_2 + else + return card_1 .. '2_' .. card_2 + end +end +--得到设置的牌大小 +function M:getCardSize() + if self._room.change_card_size ~= nil then + return self._room.change_card_size + else + return 1 + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPProtocol.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPProtocol.lua new file mode 100644 index 00000000..7c0b7ff3 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPProtocol.lua @@ -0,0 +1,36 @@ +local Protocol = { + -- 通知服务器出牌 + GAME_DIS_CARD = "611", + -- 通知服务器提示选择行为 + GAME_ACTION = "612", + -- 通知服务器手牌队形改变 + GAME_CHANGE_CARD = "613", + -- 通知服务器牌字体改变 + GAME_CHANGE_TYPEfACE = "615", + + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + -- 出牌事件 + GAME_EVT_DISCARD = "812", + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + -- action 事件 + GAME_EVT_ACTION = "815", + -- 胡牌事件 + GAME_EVT_HU = "816", + -- 结算 + GAME_EVT_RESULT1 = "817", + -- 弃牌 + GAME_EVT_QIPAI = "818", + -- 抓牌 + GAME_EVT_DRAW = "819", + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + --第二十一张牌 + GAME_EVT_ADD_CARD = "821", + +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPSettingView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPSettingView.lua new file mode 100644 index 00000000..58080559 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPSettingView.lua @@ -0,0 +1,336 @@ +local SettingView = require('Game.View.SettingView') +local ZPTableBG = import('.ZPTableBG') + +local ZPSettingView = { + -- 修改牌字体 + onEXMainCallback = nil, + -- 修改手牌大小 + onUpdataCardSizeCallback = nil, + -- 语音 + onEXVoiceCallback = nil, + -- 快速出牌 + onEXChuPaiCallback = nil, + -- 方言 + onEXFangYanCallback = nil +} +local M = ZPSettingView + +function ZPSettingView.new(blur_view, index, open_social,cardIndex) + setmetatable(SettingView, {__index = BaseWindow}) + setmetatable(M, {__index = SettingView}) + local self = setmetatable({}, {__index = M}) + self.class = 'ZPSettingView' + self._currenIndex = 0 + self._blur_view = blur_view + self.onCallback = event('onCallback', true) + self.stateIndex = 0 + self.cd_time = 0 + self._btn_dismiss_room_enable = false + self._close_destroy = true + self.bigSize = 1.2 + self.mediumSize = 1 + self.smallSize = 0.8 + self._full = true + self._anim_pop = 2 + self._open_social = open_social + self._cardType=cardIndex + self:init('ui://Main_RunBeard/New_SettingWindow') + return self +end + +function M:init(url) + SettingView.init(self, url) + if DataManager.CurrenRoom == nil then + return + end + self._view = self._view:GetChild('showview') + + local view = self._view + local slider_sound = view:GetChild('slider_sound') + local slider_music = view:GetChild('slider_music') + -- local btn_music = view:GetChild('btn_music') + -- local btn_sound = view:GetChild('btn_sound') + + -- btn_music.selected = (GameApplication.Instance.MusicValue < 5 and false or true) + slider_sound.value = GameApplication.Instance.SoundValue + slider_music.value = GameApplication.Instance.MusicValue + -- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true + + slider_music.onChanged:Add( + function() + GameApplication.Instance.MusicValue = slider_music.value + -- btn_music.selected = GameApplication.Instance.MusicValue < 5 and false or true + end + ) + + slider_sound.onChanged:Add( + function() + GameApplication.Instance.SoundValue = slider_sound.value + -- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true + end + ) + + local room = DataManager.CurrenRoom + local c1 = self._view:GetController('cards') + if self._cardType then + c1.selectedIndex = self._cardType + end + + local size = self._view:GetController('size') + if room.change_card_size ~= nil then + + if room.change_card_size == self.bigSize then + size.selectedIndex = 0 + elseif room.change_card_size == self.mediumSize then + size.selectedIndex = 1 + elseif room.change_card_size == self.smallSize then + size.selectedIndex = 2 + end + else + room.change_card_size = 0 + size.selectedIndex = 0 + end + printlog("room.change_card_display===>>>",room.change_card_display) + if room.change_card_display ~= nil then + local _str = string.sub(room.change_card_display, 1, 1) + local n = tonumber(_str) + if n == 1 then + c1.selectedIndex = 1 + elseif n == 2 then + c1.selectedIndex = 0 + elseif n == 8 then + c1.selectedIndex = 3 + else + c1.selectedIndex = 2 + end + end + if self._open_social then + self._view:GetChild('n78').visible = true + self._view:GetChild('n88').visible = true + self._view:GetChild('n57').visible = true + + local yuyin = self._view:GetController('yuyin') + local chupai = self._view:GetController('chupai') + local fangyan = self._view:GetController('fangyan') + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. room.game_id .. 'yuyin') + local json_data1 = Utils.LoadLocalFile(user_id .. room.game_id .. 'chupai') + local json_data2 = Utils.LoadLocalFile(user_id .. room.game_id .. 'fangyan') + yuyin.selectedIndex = 1 + chupai.selectedIndex = 1 + room.yuyin_typeface = 1 + room.chupai_typeface = 1 + fangyan.selectedIndex = 1 + room.fangyan_typeface = 1 + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + room.yuyin_typeface = typeface + end + if json_data1 ~= nil then + local _data = json.decode(json_data1) + local typeface = _data['game_typeface'] + room.chupai_typeface = typeface + end + if json_data2 ~= nil then + local _data = json.decode(json_data2) + local typeface = _data['game_typeface'] + room.fangyan_typeface = typeface + end + if room.yuyin_typeface ~= nil then + yuyin.selectedIndex = room.yuyin_typeface + end + if room.chupai_typeface ~= nil then + chupai.selectedIndex = room.chupai_typeface + end + if room.fangyan_typeface ~= nil then + fangyan.selectedIndex = room.fangyan_typeface + end + else + self._view:GetChild('n78').visible = false + self._view:GetChild('n88').visible = false + self._view:GetChild('n57').visible = false + end + + c1.onChanged:Set( + function() + if self.onEXMainCallback then + self.onEXMainCallback(c1.selectedIndex + 1) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = c1.selectedIndex + 1 + local key = user_id .. room.game_id + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + + size.onChanged:Set( + function() + if self.onUpdataCardSizeCallback then + self.onUpdataCardSizeCallback(size.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_cardsize'] = size.selectedIndex + local key = user_id .. room.game_id .. 'cardsize_new' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + if self._open_social then + self._view:GetChild('n78').visible = false + local yuyin = self._view:GetController('yuyin') + local chupai = self._view:GetController('chupai') + local fangyan = self._view:GetController('fangyan') + yuyin.onChanged:Set( + function() + if self.onEXVoiceCallback then + room.yuyin_typeface = yuyin.selectedIndex + self.onEXVoiceCallback(yuyin.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = yuyin.selectedIndex + local key = user_id .. room.game_id .. 'yuyin' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + chupai.onChanged:Set( + function() + if self.onEXChuPaiCallback then + room.chupai_typeface = chupai.selectedIndex + self.onEXChuPaiCallback(chupai.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = chupai.selectedIndex + local key = user_id .. room.game_id .. 'chupai' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + fangyan.onChanged:Set( + function() + if self.onEXFangYanCallback then + room.fangyan_typeface = fangyan.selectedIndex + self.onEXFangYanCallback(fangyan.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = fangyan.selectedIndex + local key = user_id .. room.game_id .. 'fangyan' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + else + self._view:GetChild('n78').visible = false + end +end + +function M:Show() + SettingView.Show(self) + self:UpdateIndex() + self:UpdateCardSizeIndex() +end +--根据存的数据改变设置里面的控制器 + +function M:UpdateIndex() + local room = DataManager.CurrenRoom + local c1 = self._view:GetController('cards') + if room.change_card_display ~= nil then + local _str = string.sub(room.change_card_display, 1, 1) + local n = tonumber(_str) + if n == 7 then + n = 2 + end + if n == 1 then + c1.selectedIndex = 1 + elseif n == 2 then + c1.selectedIndex = 0 + elseif n == 8 then + c1.selectedIndex = 3 + else + c1.selectedIndex = 2 + end + end +end +function M:UpdateCardSizeIndex() + local room = DataManager.CurrenRoom + local size = self._view:GetController('size') + if room.change_card_size ~= nil then + if room.change_card_size == self.bigSize then + size.selectedIndex = 0 + elseif room.change_card_size == self.mediumSize then + size.selectedIndex = 1 + elseif room.change_card_size == self.smallSize then + size.selectedIndex = 2 + end + else + size.selectedIndex = 0 + end +end + +function M:SetBtnUpdateCardEnable(enable) + self._view:GetChild('n37').enabled = enable + self._view:GetChild('n38').enabled = enable + self._view:GetChild('n49').enabled = enable +end + +function M:FillBgSection(cb, game_id, default_bg, room, qihu) + if (default_bg == nil) then + default_bg = 1 + end + local view = self._view + local lst_bg = view:GetChild('lst_bg') + local ctr_bg = view:GetController('bg') + for i = 1, #bg_config_zipai do + local config = bg_config_zipai[i] + local item = lst_bg:AddItemFromPool() + item.icon = config.thumb + if i > 3 then + ctr_bg:AddPage(i - 1) + end + item.onClick:Add( + function() + cb(config.url) + ctr_bg.selectedIndex = i - 1 + if qihu ~= nil then + -- self._blur_view:GetChild('di_text').text = room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起' + self._blur_view:GetController('bg_state').selectedIndex = i - 1 + end + end + ) + end + self._game_id = game_id + self._bg = ZPTableBG.GetTableBG(game_id) + local index = 0 + if self._bg > 0 then + lst_bg.selectedIndex = self._bg - 1 + index = lst_bg.selectedIndex + else + ctr_bg.selectedIndex = default_bg - 1 + index = ctr_bg.selectedIndex + end + if qihu ~= nil then + -- self._blur_view:GetChild('di_text').text = room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起' + if index < 3 then + self._blur_view:GetController('bg_state').selectedIndex = index + else + self._blur_view:GetController('bg_state').selectedIndex = 0 + end + end +end +function M:Destroy() + local bg_id = self._view:GetController('bg').selectedIndex + 1 + if self._bg ~= bg_id then + self._bg = bg_id + ZPTableBG.SaveTableBG(self._game_id, self._bg) + end + SettingView.Destroy(self) +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPTableBG.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPTableBG.lua new file mode 100644 index 00000000..e11083ee --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi/main/ZPTableBG.lua @@ -0,0 +1,84 @@ +-- 记录各游戏的桌面背景 +json = require 'cjson' + +local ZPTableBG = {} + +local M = ZPTableBG + bg_config_zipai = { + {id = 1, url = "base/main_zipai/bg/bg_1", thumb = "ui://Main_RunBeard/table_bg1"}, + {id = 2, url = "base/main_zipai/bg/bg_2", thumb = "ui://Main_RunBeard/table_bg2"}, + {id = 3, url = "base/main_zipai/bg/bg_3", thumb = "ui://Main_RunBeard/table_bg3"}, + -- {id = 4, url = "base/main_zipai/bg/bg_gold", thumb = "ui://Main_RunBeard/table_bg3"}, + -- {id = 5, url = "base/main_zipai/bg/bg8", thumb = "ui://Main_RunBeard/table_bg1"}, + -- {id = 6, url = "base/tablebg/bg/bg1", thumb = "ui://Common/b04"}, +} + +local function GetBG(data, game_id) + local bg_id = 0 + for i = 1, #data do + if data[i].game_id == game_id then + bg_id = data[i].bg_id + break + end + end + return bg_id +end +local function SetBG(data, game_id, bg_id) + local contain_key = false + for i = 1, #data do + if data[i].game_id == game_id then + contain_key = true + if data[i].bg_id ~= bg_id then + data[i].bg_id = bg_id + break + end + end + end + if not contain_key then + local _data = {} + _data.game_id = game_id + _data.bg_id = bg_id + table.insert(data, _data) + end +end + +function ZPTableBG.GetTableBG(game_id) + local id = -1 + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + local config_data = json.decode(json_data) + id = GetBG(config_data, game_id) + end + return id +end + +function ZPTableBG.LoadTableBG(id, game_id, main_view) + local bg_id = M.GetTableBG(game_id) + local index + if bg_id > 0 then + index = bg_id + else + index = id + end + + if index>3 then + -- body + index=1 + end + local url = bg_config_zipai[index].url + LoadGameBg(url, main_view) +end + +function ZPTableBG.SaveTableBG(game_id, bg_id) + local config_data + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + config_data = json.decode(json_data) + else + config_data = {} + end + SetBG(config_data, game_id, bg_id) + Utils.SaveLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code, json.encode(config_data)) +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXGameController.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXGameController.lua new file mode 100644 index 00000000..aa8327d3 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXGameController.lua @@ -0,0 +1,566 @@ +local RB_Protocol = import(".Protocol") +local FZTipList = import(".main.FZData") +local RB_GameEvent = import(".RunBeard_GameEvent") +local M = {} + +--- Create a new HZ_GameController +function M.new() + setmetatable(M,{__index = GameController}) + local self = setmetatable({}, {__index = M}) + self:init("汉寿跑胡子") + self.class = "RB_GameController" + return self +end + +function M:init(name) + GameController.init(self,name) + + self._eventmap[RB_Protocol.GAME_EVT_PLAYER_DEAL] = self.OnEventSendCards + self._eventmap[RB_Protocol.GAME_EVT_CHANGE_ACTIVE_PLAYER] = self.OnEventTurn + + self._eventmap[RB_Protocol.GAME_EVT_DRAW] = self.OnEventTakeCard + self._eventmap[RB_Protocol.GAME_EVT_DISCARD_TIP] = self.OnEventOutHint + self._eventmap[RB_Protocol.GAME_EVT_DISCARD] = self.OnEventOutCard + + self._eventmap[RB_Protocol.GAME_EVT_FZTIPS] = self.OnEventFzTips + + self._eventmap[RB_Protocol.GAME_EVT_ACTION] = self.OnEventFzAction + + self._eventmap[RB_Protocol.GAME_EVT_HU] = self.OnEventHu + + self._eventmap[RB_Protocol.GAME_EVT_RESULT1] = self.OneventResult1 + self._eventmap[RB_Protocol.GAME_EVT_QIPAI] = self.OnEventQIPAI + self._eventmap[RB_Protocol.GAME_EVT_ADD_CARD] = self.OnAddCard + + self._eventmap[RB_Protocol.GAME_EVT_Piao_Tip] = self.OnPiaoTip + self._eventmap[RB_Protocol.GAME_EVT_Piao_Action] = self.OnPiaoAction + self._eventmap[RB_Protocol.GAME_EVENT_XIPAI] = self.OnEventXiPai + self._eventmap[RB_Protocol.GAME_EVENT_NOTIFY_XIPAI] = self.OnEventXiPaiAnim + +end + + +function M:SendXiPaiAction(callBack) + printlog("jefe SendXiPaiAction===》》》》") + local _data = {} + local _client = ControllerManager.GameNetClinet + _client:send(RB_Protocol.GAME_XIPAI, _data) + self.XiPaiCallBack=callBack +end + +function M:OnEventXiPai(evt_data) + if evt_data["result"]==0 then + if self.XiPaiCallBack then + self.XiPaiCallBack() + end + else + ViewUtil.ErrorTip(1000000,"申请洗牌失败") + end + +end + + +function M:OnEventXiPaiAnim(evt_data) + printlog("jefe 洗牌动画===》》》》") + pt(evt_data) + local playeridList = evt_data["list"] + local my_isXiPai=false + local other_isXiPai=false + if playeridList and #playeridList>0 then + for i=1,#playeridList do + local p = self._room:GetPlayerById(playeridList[i]) + if p== self._room.self_player then + my_isXiPai=true + else + other_isXiPai=true + end + end + end + + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.EventXiPai,my_isXiPai,other_isXiPai) + end) +end + + +-- 发送出牌指令到服务器 +function M:SendOutCard(card) + local _data = {} + _data["card"] = card + local _room = self._room + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_DIS_CARD, _data) + end + +end +--GAME_CHANGE_CARD GAME_DIS_CARD +function M:SendChangeCards( card_list ) + local _data = {} + if card_list then + _data["card_list"] = card_list + else + _data["card_list"]={} + end + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_CHANGE_CARD, _data) + end +end + +function M:SendChangeTypeFace(TypeFace) + -- body + local _data = {} + _data["typeface"] = TypeFace + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_CHANGE_TYPEfACE, _data) + end +end + + +function M:ConformToNextGame( ) + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_EVT_CHUI) + end +end + +-- 发送放子选择到服务器 +function M:SendAction(id,num) + local _data = {} + _data["id"] = id + if num ~=nil then + _data["biid"] = num + end + local _client = ControllerManager.GameNetClinet + if _client ~= nil then + _client:send(RB_Protocol.GAME_ACTION, _data) + end +end + + +function M:SendPiao(piao,callBack) + local _data = {} + _data["id"] = piao + local _client = ControllerManager.GameNetClinet + _client:send(RB_Protocol.GAME_EVT_Send_Piao, _data) + self.PiaoTipsCallBack=callBack +end + + +function M:OnPiaoTip(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local piao = evt_data["piao"] + local reload = evt_data["reload"] + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, RB_GameEvent.OnPiaoTips, piao,reload) + ControllerManager.IsSendCard=true + end + ) +end + +function M:OnPiaoAction(evt_data) + local seat = evt_data["seat"] + local piao = evt_data["piao"] + if seat==DataManager.CurrenRoom.self_player.seat then + if self.PiaoTipsCallBack then + self.PiaoTipsCallBack() + self.PiaoTipsCallBack=nil + end + end + self._cacheEvent:Enqueue( + function() + DispatchEvent(self._dispatcher, RB_GameEvent.OnPiaoAction, seat,piao) + end + ) +end + + +function M:OnEventSendCards(evt_data) + printlog("jefe 发牌事件===》》》") + pt(evt_data) + if ViewManager.GetCurrenView().dview_class == LobbyView then + self:ReturnToRoom() + return + end + + local _room = self._room + _room.self_player.currentNotPutCardList={} + _room.curren_round = _room.curren_round + 1 + if _room.curren_round > 0 then _room.playing = true end + + local handcards = {} + if evt_data.card_list and #evt_data.card_list>0 then + handcards = evt_data["card_list"] + else + ViewUtil.ErrorTip(100000,"发牌数据异常") + end + + local p = _room.self_player + local seat =nil + if evt_data.bank_seat then + seat = evt_data["bank_seat"] + else + ViewUtil.ErrorTip(100001,"发牌座位异常") + end + + _room.banker_seat = seat + for i=1,#_room.player_list do + _room.self_player.handcard_list ={} + _room.self_player.card_list = {} + _room.player_list[i].hand_left_count = 20 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + _room.player_list[i].outcard_list = {} + _room.player_list[i].hu_xi = 0 + end + self._cacheEvent:Enqueue(function() + _room.self_player.handcard_list=handcards + self._room.self_player.hand_left_count = #handcards + DispatchEvent(self._dispatcher,RB_GameEvent.SendCards, p) + --print("发牌结束=====打开标志") + ControllerManager.IsSendCard=true + end) +end + +function M:OnEventOutCard(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + if(seat == _room.self_player.seat) then + list_remove(_room.self_player.handcard_list,card) + end + p.DiceCard = card + p.hand_left_count = p.hand_left_count -1 + DispatchEvent(self._dispatcher,RB_GameEvent.OutCard, p,card) + end) +end + +function M:OnEventQIPAI(evt_data) + local seat = evt_data["seat"] + local card = evt_data["card"] + local p = self._room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + local _room = self._room + if(not p.outcard_list) then p.outcard_list = {} end + p.outcard_list[#p.outcard_list+1] = card + DispatchEvent(self._dispatcher,RB_GameEvent.QiCard, seat,card) + end) +end + +function M:OnEventTakeCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local left_count = evt_data["left_count"] + local p = _room:GetPlayerBySeat(seat) + self._cacheEvent:Enqueue(function() + if card ~=0 then + p.DiceCard = card + end + DispatchEvent(self._dispatcher,RB_GameEvent.GetCard, seat, card, left_count) + end) +end + +function M:OnAddCard(evt_data) + local _room = self._room + local seat = evt_data["seat"] + local card = evt_data["card"] + local p = _room:GetPlayerBySeat(seat) + + self._cacheEvent:Enqueue(function() + p.DiceCard = 0 + p.hand_left_count = p.hand_left_count +1 + if (seat == _room.self_player.seat) then + _room.self_player.handcard_list[#_room.self_player.handcard_list+1] = card + end + DispatchEvent(self._dispatcher,RB_GameEvent.AddCard, seat, card) + end) +end + +function M:OnEventOutHint(evt_data) + printlog("出牌提示事件===》》》") + pt(evt_data) + self._cacheEvent:Enqueue(function() + + DispatchEvent(self._dispatcher,RB_GameEvent.OutHint) + end) + +end + +function M:OnEventTurn(evt_data) + local seat = evt_data["seat"] + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.EventTurn, seat) + end) +end + +function M:OnEventFzTips(evt_data) + printlog("放子提示事件===》》》") + pt(evt_data) + self._cacheEvent:Enqueue(function() + local tiplist = FZTipList.new() + local list = evt_data["tip_list"] + local uid = evt_data["uid"] + for i=1,#list do + local dtip = list[i] + local tip = {} + tip.id = dtip["id"] + tip.weight = dtip["weight"] + tip.card = dtip["card"] + tip.type = dtip["type"] + tip.bi_list = dtip["bi_list"] + if (dtip["opcard"]) then + local opcard = dtip["opcard"] + tip.OpCard = opcard + table.sort(tip.OpCard) + tip.OpCard[3] = tip.Card + end + tiplist:AddTip(tip) + + end + DispatchEvent(self._dispatcher,RB_GameEvent.FZTips, tiplist,uid) + end) +end + +function M:OnEventFzAction(evt_data) + printlog("放子行为提示事件===》》》") + pt(evt_data) + local _room = self._room + _room.self_player.currentNotPutCardList=evt_data["notput"] + local playerid = evt_data["playerid"] + local card = evt_data["card"] + local actice_card = evt_data["active_card"] + local ftype = evt_data["type"] + local from_seat = evt_data["from_seat"] + local opcard = evt_data["opcard"] + local huxi = evt_data["hu_xi"] + local p = _room:GetPlayerById(playerid) + self._cacheEvent:Enqueue(function() + local isNeedDelHandCard =0 + p.hu_xi = huxi + local fz = {} + fz.card = card + fz.type = ftype + fz.active_card = actice_card + fz.from_seat = from_seat + fz.opcard =opcard + local remove_num = #opcard + if ftype == RB_FZType.Chi then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Bi then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + list_remove(_room.self_player.handcard_list,fz.card) + end + elseif ftype == RB_FZType.Peng then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Kan then + if (p == _room.self_player) then + if #opcard==2 then + _room.self_player.handcard_list[#_room.self_player.handcard_list+1] = card + end + p.fz_list[#p.fz_list+1] = fz + end + elseif ftype == RB_FZType.ChouWei then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,2 do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Wei then + p.fz_list[#p.fz_list+1] = fz + if (p == _room.self_player) then + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + elseif ftype == RB_FZType.Pao then + + if (p == _room.self_player) then + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + if p.fz_list[i].type == RB_FZType.Kan then + isNeedDelHandCard =3 + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + remove_num= 0 + p.fz_list[i].type= RB_FZType.Pao + end + end + local num =0 + for i=1,#_room.self_player.handcard_list do + if card == _room.self_player.handcard_list[i] then + num=num+1 + end + end + if num>0 then + isNeedDelHandCard =num + + for i=1,num do + list_remove(_room.self_player.handcard_list,card) + end + local isAddTi =false + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Pao + isAddTi=true + remove_num= 0 + end + end + if isAddTi==false then + p.fz_list[#p.fz_list+1] = fz + end + end + + else + local num =0 + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Pao + num=1 + remove_num= 0 + end + end + if num==0 then + p.fz_list[#p.fz_list+1] = fz + end + end + + elseif ftype == RB_FZType.Ti then + + if (p == _room.self_player) then + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + if p.fz_list[i].type == RB_FZType.Kan then + isNeedDelHandCard =3 + for i=1,remove_num do + list_remove(_room.self_player.handcard_list,opcard[i]) + end + end + remove_num= 0 + p.fz_list[i].type= RB_FZType.Ti + end + end + local num =0 + for i=1,#_room.self_player.handcard_list do + if card == _room.self_player.handcard_list[i] then + num=num+1 + end + end + if num>0 then + isNeedDelHandCard =num + + for i=1,num do + list_remove(_room.self_player.handcard_list,card) + end + local isAddTi =false + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Ti + remove_num= 0 + isAddTi=true + end + end + if isAddTi==false then + p.fz_list[#p.fz_list+1] = fz + end + end + + else + local num =0 + for i=1,#p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type= RB_FZType.Ti + remove_num= 0 + num=1 + end + end + if num==0 then + p.fz_list[#p.fz_list+1] = fz + end + + end + + end + + + p.hand_left_count = p.hand_left_count - remove_num + --[[if fz.type == RB_FZType.Pao or fz.type == RB_FZType.Ti then + coroutine.start(function() + coroutine.wait(0.5) + DispatchEvent(self._dispatcher,RB_GameEvent.FangziAction, fz, p,isNeedDelHandCard) + end) + else + DispatchEvent(self._dispatcher,RB_GameEvent.FangziAction, fz, p,isNeedDelHandCard) + end--]] + DispatchEvent(self._dispatcher,RB_GameEvent.FangziAction, fz, p,isNeedDelHandCard) + + end) +end + +function M:OnEventHu(evt_data) + local cards = evt_data["card"] + local win_p = self._room:GetPlayerBySeat(evt_data["seat"]) + local lose_p = self._room:GetPlayerBySeat(evt_data["from_seat"]) + -- print(win_p.hand_left_count) + + self._cacheEvent:Enqueue(function() + win_p.card_list = cards + table.sort( win_p.card_list, ViewUtil.HandCardSort) + DispatchEvent(self._dispatcher,RB_GameEvent.ZPHuCard, evt_data["seat"],evt_data["from_seat"],cards) + end) +end + +function M:OneventResult1(evt_data) + printlog("结算=============>>>") + pt(evt_data) + local over = evt_data.type + --0:小结算 1:小大结算 2:大结算 + self._room.playing = false + if 0 == over then + local result = evt_data.result + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + p.hand_left_count = 0 + p.outcard_list = {} + end + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.ZPResult1, result); + end) + elseif 1 == over or 2 == over then + DataManager.CurrenRoom.Over = true + ControllerManager.SetGameNetClient(nil,true) + local total_result = evt_data.total_result + local result = evt_data.result + self._cacheEvent:Enqueue(function() + DispatchEvent(self._dispatcher,RB_GameEvent.ZPResult2, result, total_result, over); + end) + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXGameInfo.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXGameInfo.lua new file mode 100644 index 00000000..6e1b0011 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXGameInfo.lua @@ -0,0 +1,163 @@ +local EXGameInfo = {} + +local M = EXGameInfo + +function EXGameInfo.new(blur_view) + setmetatable(M, {__index = IGameInfo}) + local self = setmetatable({}, {__index = M}) + self.class = 'EXGameInfo' + UIPackage.AddPackage('extend/zipai/yueyangwaihuzi/ui/Info_Poker_YueYangWHZ') + return self +end + +function M:FillData() + self._maxPlayer = 3 -- 默认玩家人数 + self._roundChoice = 2 -- 回合选项数 + self._config = UIPackage.CreateObjectFromURL('ui://Info_Poker_YueYangWHZ/Cgm_create_room') + + if oldGameVersion ==1 then + self._config:GetController("xipai").selectedIndex=0 + end + + if oldGameVersion==2 then + self._config:GetController("xipai").selectedIndex=1 + + self.xipaiValueText=self._config:GetChild('xipaifen') + self.xipaiValue=1 + + local btn_cr = self._config:GetChild('sdsrbtn') + btn_cr.onClick:Set( + function() + + local gniv = GroupNumberInputView_Game.new(nil, function(num) + + local value = limit + if otype == 1 then + value = value + ad2d(num) + elseif otype == - 1 then + value = value - ad2d(num) + else + value = ad2d(num) + end + + if value < 0 then + ViewUtil.ErrorTip(1,"输入数据异常!") + end + + self.xipaiValueText.text=value/1000 + self.xipaiValue=value/1000 + + end, 3, nil) + gniv:Show() + + + end + ) + + end + +end +local _help_url = 'ui://Info_Poker_YueYangWHZ/Com_help' +function M:GetHelpUrl() + return _help_url +end + +local _icon_url = "ui://Info_Poker_YueYangWHZ/icon" +function M:GetIconUrl() + return _icon_url +end + +local _icon_url1 = "ui://Info_Poker_YueYangWHZ/icon1" +function M:GetIconUrl1() + return _icon_url1 +end + +--local _play_list = {"三人玩法","二人玩法"} +function M:GetPlayList() + --return _play_list +end + +function M:SelectedConfigData() + local _config = self._config + local round = _config:GetController('round').selectedIndex == 0 and 1 or 2 + local renshu = _config:GetController('play_list').selectedIndex +2 + + local kawai=_config:GetController('kawai').selectedIndex + local piao=_config:GetController('piao').selectedIndex + local first_rand_zhuang=_config:GetChild('suijizhuang').selected and true or false + local zhuang_di_hu=_config:GetController('zdihu').selectedIndex + local hao_config=_config:GetController('hao').selectedIndex + local hao_jiabei=_config:GetController('jiabei').selectedIndex + local ming_tang=_config:GetController('mingtang').selectedIndex + local qupai=0 + if renshu==2 then + qupai=_config:GetController('qupai').selectedIndex + end + + local _data = {} + _data['opt'] = round -- 1 2 8局 16 局 + _data['maxPlayers'] = renshu + _data['kawai'] = kawai + _data['piao'] = piao + _data['zhuang_di_hu'] = zhuang_di_hu + _data['hao_config'] = hao_config + _data['hao_jiabei'] = hao_jiabei + _data['ming_tang'] = ming_tang + _data['first_rand_zhuang'] = first_rand_zhuang + _data['qupai'] = qupai + + local xi_pai=false + if oldGameVersion ==2 then + if _config:GetChild("xipai") then + xi_pai = _config:GetChild("xipai").selected + end + end + _data['xi_pai'] = xi_pai + + local xi_pai_score=0 + if oldGameVersion==2 then + xi_pai_score=self.xipaiValue + end + + _data['xi_pai_score'] = xi_pai_score + + return _data +end + +function M:LoadConfigData(data) + local _config = self._config + + _config:GetController('play_list').selectedIndex = data.maxPlayers -2 + _config:GetController('round').selectedIndex = data.opt == 1 and 0 or 1 + _config:GetController('kawai').selectedIndex=data.kawai + _config:GetController('piao').selectedIndex=data.piao + _config:GetChild('suijizhuang').selected =data.first_rand_zhuang + _config:GetController('zdihu').selectedIndex=data.zhuang_di_hu + _config:GetController('hao').selectedIndex=data.hao_config + _config:GetController('jiabei').selectedIndex=data.hao_jiabei + _config:GetController('mingtang').selectedIndex=data.ming_tang + _config:GetController('qupai').selectedIndex=data.qupai + + if _config:GetChild("xipai") then + _config:GetChild("xipai").selected=data.xi_pai + end + + if oldGameVersion==2 then + self.xipaiValueText.text=data.xi_pai_score + self.xipaiValue=data.xi_pai_score + end + +end + +function M:OnChangeOption(ctype) + IGameInfo.OnChangeOption(self, ctype) + + local play_list = self._config:GetController('play_list') + play_list.onChanged:Add( + function() + self._maxPlayer = play_list.selectedIndex +2 + self:ShowVariablePrice(ctype) + end + ) +end +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXMainView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXMainView.lua new file mode 100644 index 00000000..6915bd49 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXMainView.lua @@ -0,0 +1,1102 @@ +local SettingView = import('.main.ZPSettingView') +local PlayerSelfCardInfoView = import('.PlayerSelfCardInfoView') +local PlayerCardInfoView = import('.PlayerCardInfoView') +local ZPMainView = import('.main.ZPMainView') +local GameEvent = import('.RunBeard_GameEvent') +local RunBeard_ResultView = import('.RunBeard_ResultView') +local PlayerInfoView = import(".EXPlayerInfoView") + +local M = {} +local Fix_Msg_Chat = { + '在搞么的,出牌撒', + '又掉线哒!', + '和你打牌太有味了', + '人呢?还搞不搞滴', + '哈哈,对不住了', + '稍等哈哈,马上就来', + '不要走,决战到天亮', + '牌打得不错嘛!', + '今朝这个方位硬是不好', + '不好意思临时有事,申请解散!' +} + +--- Create a new ZZ_MainView +function M.new() + setmetatable(M, {__index = ZPMainView}) + local self = setmetatable({}, {__index = M}) + self.class = 'RunBeard_MainView' + self._full = true + self:init() + return self +end + +function M:getCardItem(card_1, card_2) + if self._room.change_card_display ~= nil then + return card_1 .. self._room.change_card_display .. card_2 + else + return card_1 .. '2_' .. card_2 + end +end +function M:InitView(url) + local _room = self._room + self.Fix_Msg_Chat = Fix_Msg_Chat + ViewUtil.PlayMuisc('YueYang_ZP', 'extend/zipai/yueyangwaihuzi/sound/bg.mp3') + UIPackage.AddPackage('extend/zipai/yueyangwaihuzi/ui/Extend_Poker_YueYangWHZ') + ZPMainView.InitView(self, 'ui://Main_RunBeard/Main_' .. _room.room_config.people_num, false, false, 1.2, 8) + + self:PlayerChangeLineState() + SettingView.onEXMainCallback = handler(self, self.UpdateCardDisplay) + SettingView.onUpdataCardSizeCallback = handler(self, self.UpdateCardSize) + + if DataManager.CurrenRoom.change_card_display==nil then + self:UpdateCardDisplay(2) + end + for i = 1, #_room.player_list do + local p = _room.player_list[i] + local head = self._player_info[self:GetPos(p.seat)] + head:UpdateScore() + end + + if _room.playing or _room.curren_round > 0 then + self:ReloadRoom() + end + self._view:GetController('jushu').selectedIndex = 1 + self:setBtn() +end + +function M:setBtn() + local rightpanel = self._view:GetChild('right_panel') + local btn_rule = rightpanel:GetChild('btn_log') + local gcm_chat = self._view:GetChild('gcm_chat') + local _btn_chat = gcm_chat:GetChild('n1') + _btn_chat:GetChild('icon').icon = 'ui://Main_RunBeard/chat_img' + local btn_record = gcm_chat:GetChild('btn_record') + btn_record:GetChild('icon').icon = 'ui://Main_RunBeard/yuyin_img' + + if btn_rule ~= nil then + btn_rule.onClick:Set( + function() + if self.RuleView == nil or self.RuleView._is_destroy then + self.RuleView = RoomInfoView.new(self._room) + end + self.RuleView:Show() + end + ) + end + local btn_setting = self._view:GetChild('btn_setting') + btn_setting.onClick:Set( + function() + local _settingView = self:NewSettingView(1) + _settingView.stateIndex = (self._room.curren_round >= 1 and self._allow_dissmiss) and 2 or 1 + _settingView.cd_time = self.dismiss_room_cd_time + _settingView:Show() + + local room = DataManager.CurrenRoom + _settingView.onCallback:Add( + function(context) + local _gamectr = ControllerManager.GetController(GameController) + if (room.CurnrenState == StateType.Ready) then + _gamectr:LevelRoom( + function(response) + if (response.ReturnCode == 0) then + ViewManager.ChangeView(ViewManager.View_Lobby) + GameApplication.Instance:ShowTips('房间已解散!') + end + end + ) + else + _gamectr:AskDismissRoom( + function(res) + ViewUtil.ErrorTip(res.ReturnCode, '') + end + ) + end + end + ) + end + ) + local tex_roomid = rightpanel:GetChild('tex_roomid') + tex_roomid.text = self._room.room_id + if self._room.room_config.isHidden and self._room.room_config.isHidden == 1 then + tex_roomid.text = "000000" + end +end + +function M:InitPlayerInfoView() + self._player_info = {} + local _player_info = self._player_info + for i = 1, self._room.room_config.people_num do + local tem = self._view:GetChild("player_info" .. i) + _player_info[i] = PlayerInfoView.new(tem,self) + tem.visible = false + end +end + + +function M:NewPlayerCardInfoView(view, index) + if index == 1 then + return PlayerSelfCardInfoView.new(view, self) + end + return PlayerCardInfoView.new(view, self) +end +function M:closeTipOnTuoguan() + if self._clearingView ~= nil then + self._clearingView:Close() + end + self:__CloseTip() +end +function M:EventInit() + MainView.EventInit(self) + local _room = self._room + local _view = self._view + local _player_info = self._player_info + local _gamectr = self._gamectr + + _gamectr:AddEventListener(GameEvent.EventXiPai,function( ... ) + local arg = {...} + local currentPlayer1=arg[1] + local currentPlayer2=arg[2] + self._popEvent = false + if ( currentPlayer1 ) then + + local xipaiCB=function () + self._popEvent = true + end + self:PlayXiPai(xipaiCB) + + end + + + if ( currentPlayer2 ) then + --self._popEvent = false + local xipaiCB2=function () + self._popEvent = true + end + self:PlayXiPai1(xipaiCB2) + end + + + end) + + _gamectr:AddEventListener(GameEvent.OnPiaoTips, function(...) + local arg = {...} + local piao = arg[1] + local reload = arg[2] + if reload==0 then + --self._popEvent = false + self._leftcard = 1 + self._leftcard = 1 + local rightpanel = self._view:GetChild('right_panel') + local tex_round = rightpanel:GetChild('tex_round') + if tex_round ~= nil then + tex_round.text = '第 ' .. _room.curren_round .. ' 局' + end + self._view:GetChild('tex_round').text = '第 ' .. _room.curren_round .. '/' .. _room.room_config.round .. ' 局' + + self._state.selectedIndex = 1 + self:closeTipOnTuoguan() + local list = _room.player_list + for i = 1, #list do + local p = list[i] + p.hu_xi = 0 + local _info = self._player_card_info[self:GetPos(p.seat)] + _info:SetPlayer(p) + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + info:UpdatePiao(-1) + info._view:GetController('huxi').selectedIndex = 1 + info._view:GetChild('huxi').text = p.hu_xi + info._view:GetController('zhanji').selectedIndex = 0 + + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + if p.total_hp == nil then + p.total_hp = 0 + end + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + + end + --local card_info = self._player_card_info[1] + --card_info:UpdateIsOnClick(false) + --card_info:InitHandCard(true) + printlog("飘分提示==>>>") + + self._player_card_info[1]:ShowPiao(piao) + end) + + + _gamectr:AddEventListener(GameEvent.OnPiaoAction, function(...) + local arg = {...} + local seat = arg[1] + local piao = arg[2] + local head_info = self._player_info[self:GetPos(seat)] + head_info:UpdatePiao(piao) + end) + + _gamectr:AddEventListener( + GameEvent.SendCards, + function(...) + self._popEvent = false + self._leftcard = 1 + self._leftcard = 1 + local rightpanel = self._view:GetChild('right_panel') + local tex_round = rightpanel:GetChild('tex_round') + if tex_round ~= nil then + tex_round.text = '第 ' .. _room.curren_round .. ' 局' + end + self._view:GetChild('tex_round').text = '第 ' .. _room.curren_round .. '/' .. _room.room_config.round .. ' 局' + + self._state.selectedIndex = 1 + self:closeTipOnTuoguan() + local list = _room.player_list + for i = 1, #list do + local p = list[i] + p.hu_xi = 0 + local _info = self._player_card_info[self:GetPos(p.seat)] + _info:SetPlayer(p) + local info = self._player_info[self:GetPos(p.seat)] + info:FillData(p) + info:MarkBank(p.seat == _room.banker_seat) + info:Ready(false) + info._view:GetController('huxi').selectedIndex = 1 + info._view:GetChild('huxi').text = p.hu_xi + info._view:GetController('zhanji').selectedIndex = 0 + + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + if p.total_hp == nil then + p.total_hp = 0 + end + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + local card_info = self._player_card_info[1] + card_info:UpdateIsOnClick(false) + card_info:InitHandCard(true) + end + ) + + _gamectr:AddEventListener( + GameEvent.GetCard, + function(...) + local arg = {...} + local seat = arg[1] + local card = arg[2] + local _leftcard = arg[3] + self._left_time = 15 + self._tex_LeftCard.text = '剩余 ' .. _leftcard .. ' 张牌' + local info = self._player_card_info[self:GetPos(seat)] + info:UpdateOutCardList(card, true, true, self:GetPos(seat)) + if card ~= 0 then + local p = _room:GetPlayerBySeat(seat) + self:PlaySound(p.self_user.sex, 'F_' .. card) + else + self._popEvent = false + coroutine.start( + function() + coroutine.wait(0.5) + self._popEvent = true + info:ClearOutCard() + end + ) + end + end + ) + _gamectr:AddEventListener( + GameEvent.AddCard, + function(...) + local arg = {...} + local seat = arg[1] + local card = arg[2] + self._popEvent = false + local info = self._player_card_info[self:GetPos(seat)] + coroutine.start( + function() + coroutine.wait(0.5) + if seat == self._room.self_player.seat then + info:InitHandCard(false) + end + info:ClearOutCard() + self._popEvent = true + end + ) + end + ) + + _gamectr:AddEventListener( + GameEvent.EventTurn, + function(...) + local arg = {...} + local seat = arg[1] + local list = _room.player_list + local readyNum = 0 + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 0 + end + local info = self._player_info[self:GetPos(seat)] + info._view:GetController('time').selectedIndex = 1 + end + ) + _gamectr:AddEventListener( + GameEvent.OutHint, + function(...) + _room.curren_outcard_seat = _room.self_player.seat + coroutine.start( + function() + coroutine.wait(0.5) + local info = self._player_card_info[self:GetPos(_room.self_player.seat)] + info:ChuPaiTiShi() + end + ) + end + ) + + _gamectr:AddEventListener( + GameEvent.OutCard, + function(...) + self:__CloseTip() + self._left_time = 0 + local arg = {...} + local p = arg[1] + local card = arg[2] + local seat = p.seat + local info = self._player_card_info[self:GetPos(seat)] + self:PlaySound(p.self_user.sex, 'F_' .. card) + if seat == self._room.self_player.seat then + _room.curren_outcard_seat = -1 + info:DeleteHandCard(card) + info:UpdateIsOnClick(true) + info:SendChangeCard() + info:ChuPaiTiShi() + end + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 0 + end + info:UpdateOutCardList(card, true, false, self:GetPos(seat)) + if self._leftcard == 1 then + self._leftcard = 0 + for i = 1, #_room.player_list do + local p = _room.player_list[i] + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateFzList(p.fz_list, false, p.seat) + end + end + end + ) + + _gamectr:AddEventListener( + GameEvent.QiCard, + function(...) + self:__CloseTip() + self._popEvent = false + self._left_time = 0 + local arg = {...} + local seat = arg[1] + local card = arg[2] + local p = _room:GetPlayerBySeat(seat) + local info = self._player_card_info[self:GetPos(seat)] + info:PlayingOutCardAnima(p.DiceCard) + p.DiceCard = 0 + info:UpdateQiPai(p.outcard_list, true, seat) + self._popEvent = true + end + ) + _gamectr:AddEventListener( + GameEvent.FZTips, + function(...) + local arg = {...} + local _tip = arg[1] + local _uid = arg[2] + self:__FangziTip(_tip, _uid) + end + ) + + _gamectr:AddEventListener(GameEvent.FangziAction, handler(self, self.OnFangziAction)) + + _gamectr:AddEventListener( + GameEvent.ZPHuCard, + function(...) + self._left_time = 0 + self:__CloseTip() + self._popEvent = false + local arg = {...} + local w = arg[1] + local l = arg[2] + local cards = arg[3] + local info = self._player_card_info[self:GetPos(w)] + -- info:UpdateHandCard() + + local url = 'ui://Extend_Poker_YueYangWHZ/别人胡' + local pNode = info._mask_liangpai + local player = _room:GetPlayerBySeat(w) + if w == _room.self_player.seat then + url = 'ui://Extend_Poker_YueYangWHZ/自己胡牌' + pNode = self._view + end + self:PlaySound(player.self_user.sex, 'F_Hu') + local he = UIPackage.CreateObjectFromURL(url) + he:GetTransition('t2'):Play() + if w == _room.self_player.seat then + he:Center() + end + pNode:AddChild(he) + coroutine.start( + function() + coroutine.wait(0.7) + he:Dispose() + self._popEvent = true + end + ) + end + ) + + _gamectr:AddEventListener( + GameEvent.ZPResult1, + function(...) + self._popEvent = false + self._left_time = 0 + local arg = {...} + local result = arg[1] + local liuju = result.liuju + local data = result.info_list + local x = {} + self._hu_tip:FillData(x) + self:__CloseTip() + if self._clearingView == nil then + if liuju == true then + self._clearingView = RunBeard_ResultView.new(self._view, 1) + else + self._clearingView = RunBeard_ResultView.new(self._view) + end + end + coroutine.start( + function() + coroutine.wait(0.5) + -- if self._clearingView._is_destroy then return end + self._clearingView:Show() + if _room.curren_round ~= _room.room_config.round then + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + p.total_score = data[i].total_score + p.cur_hp = data[i]['cur_hp'] or 0 + p.total_hp = data[i]['total_hp'] or 0 + if data[i]['hp_info'] then + p.cur_hp = data[i].hp_info.cur_hp + p.total_hp = data[i].hp_info.total_hp == nil and 0 or data[i].hp_info.total_hp + info._view:GetController('zhanji').selectedIndex = 0 + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + + card_info:Clear() + info:UpdateScore() + end + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 0 + end + + for i = 1, #_room.player_list do + _room.self_player.handcard_list = {} + _room.player_list[i].DiceCard = nil + _room.player_list[i].hand_left_count = 20 + _room.player_list[i].fz_list = {} + _room.player_list[i].card_list = {} + _room.player_list[i].outcard_list = {} + _room.player_list[i].hu_xi = 0 + end + end + self._popEvent = true + end + ) + if _room.curren_round ~= _room.room_config.round then + self._clearingView:InitData( + 0, + _room, + result, + nil, + function(...) + self._state.selectedIndex = 2 + self._clearingView = nil + end + ) + end + end + ) + + _gamectr:AddEventListener( + GameEvent.ZPResult2, + function(...) + self._left_time = 0 + local arg = {...} + local total_result = arg[2] + local result = arg[1] + local over = arg[3] + local x = {} + self._hu_tip:FillData(x) + self:__CloseTip() + self:UnmarkSelfTuoguan() + self._clearingView = RunBeard_ResultView.new() + coroutine.start( + function() + coroutine.wait(0.5) + self._clearingView:Show() + end + ) + self._clearingView:InitData(over, _room, result, total_result) + ControllerManager.ChangeController(LoddyController) + end + ) +end + +function M:OutCard(card_item) + local _gamectr = ControllerManager.GetController(GameController) + self._room.curren_outcard_seat = -1 + _gamectr:SendOutCard(card_item) +end + +--改变牌队形 +function M:ChangeCards(list) + local _gamectr = ControllerManager.GetController(GameController) + if _gamectr then + _gamectr:SendChangeCards(list) + end +end + +function M:__FangziTip(tip, _uid) + local _gamectr = self._gamectr + local _chipeng_tip = UIPackage.CreateObject('Main_RunBeard', 'Gcm_action_tips') + self._chipeng_tip = _chipeng_tip + local p = self._room.self_player + + local _lit_fanzi = _chipeng_tip:GetChild('lit_fanzi') + _lit_fanzi:RemoveChildrenToPool() + local _tlist = table.keys(tip.tip_map_type) + local tip_hu = false + local count = #_tlist + for k = 1, #_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + if td.type == 8 then + tip_hu = true + end + end + for k = 1, #_tlist do + local td = tip.tip_map_type[_tlist[k]][1] + local url = 'ui://Main_RunBeard/Btn_fztip' + local btn_t = _lit_fanzi:AddItemFromPool(url) + if td.type==8 then + btn_t:GetChild("hupai").icon="ui://Main_RunBeard/201_1_" .. td.card + btn_t:GetController("hupai").selectedIndex=1 + end + btn_t.icon = 'ui://Main_RunBeard/newop_' .. td.type + btn_t.data = {tip, td, tip_hu} + btn_t.onClick:Set(self.__TipAction, self) + end + if p.hand_left_count ~= 0 then + local _btn_pass = _lit_fanzi:AddItemFromPool('ui://Main_RunBeard/Btn_pass_new') + _btn_pass.onClick:Set( + function() + if tip_hu then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + _gamectr:SendAction(_uid) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + guo_msg:Close() + end + ) + + guo_msg:Show() + else + _gamectr:SendAction(_uid) + _chipeng_tip:Dispose() + self._chipeng_tip = nil + end + end + ) + end + + self._view:AddChild(_chipeng_tip) + _chipeng_tip:Center() + _chipeng_tip.x = _chipeng_tip.x + 200 + _chipeng_tip.y = _chipeng_tip.y - 50 +end +function M:__TipAction(context) + local data = context.sender.data + local _gamectr = self._gamectr + local tip = data[1] + local td = data[2] + local tip_hu = data[3] + local list = tip.tip_map_type[td.weight] + if (#list > 1) or td.type == 1 then + self:_ChiView( + list, + tip_hu, + function(id) + if tip_hu and td.type ~= 8 then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + _gamectr:SendAction(id) + guo_msg:Close() + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + ) + guo_msg:Show() + else + _gamectr:SendAction(id) + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + end + ) + --self._chipeng_tip.visible = false + return + end + if tip_hu and td.type ~= 8 then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + _gamectr:SendAction(td.id) + guo_msg:Close() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + if (self._chipeng_tip == nil) then + return + end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + ) + guo_msg:Show() + else + _gamectr:SendAction(td.id) + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + if (self._chipeng_tip == nil) then + return + end + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end +end + +function M:_ChiView(tip_list, tip_hu, callback) + local _pop_tip_choice = UIPackage.CreateObject('Main_RunBeard', 'Pop_tip_choice') + local list_choose = _pop_tip_choice:GetChild('Lst_choose') + _pop_tip_choice:GetChild('dibtn').onClick:Add( + function() + _pop_tip_choice:Dispose() + end + ) + + list_choose:RemoveChildrenToPool() + for i = 1, #tip_list do + if tip_list[i].weight ~= 4 then + local item_choose = list_choose:AddItemFromPool() + item_choose:GetChild('card' .. 2).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', tip_list[i].OpCard[1])) + item_choose:GetChild('card' .. 3).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', tip_list[i].OpCard[2])) + item_choose:GetChild('card' .. 1).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', tip_list[i].card)) + + item_choose.onClick:Add( + function() + for k = 1, list_choose.numChildren do + list_choose:GetChildAt(k - 1):GetController('zhong').selectedIndex = 0 + end + item_choose:GetController('zhong').selectedIndex = 1 + if tip_list[i].bi_list == nil then + callback(tip_list[i].id) + else + self.bilist = {} + self._chiid = tip_list[i].id + self:CheckRatioCard(tip_list[i].bi_list, 1, tip_list[i].card) + end + end + ) + end + end + list_choose:ResizeToFit(#tip_list) + _pop_tip_choice:GetChild('di1').width = list_choose.width + 110 + _pop_tip_choice.xy = Vector2((self._view.width - _pop_tip_choice.width) / 2, -100) + self._view:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice +end + +function M:CheckRatioCard(_tiplist, index, chicard, _biid, list) + if _biid ~= nil then + self.bilist = {} + self.bilist[#self.bilist + 1] = _biid + end + if self._pop_tip_choice == nil then + -- statements + return + end + self._pop_tip_choice:GetController('bipai').selectedIndex = index + local Bilist_choose = self._pop_tip_choice:GetChild('Bi_Lst_choose' .. index) + Bilist_choose:RemoveChildrenToPool() + for i = 1, #_tiplist do + local item = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Comp_choose') + local item_choose = Bilist_choose:AddChild(item) + item_choose:GetChild('card' .. 2).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', _tiplist[i].opcard[1])) + item_choose:GetChild('card' .. 3).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', _tiplist[i].opcard[2])) + item_choose:GetChild('card' .. 1).icon = + UIPackage.GetItemURL('Main_RunBeard', self:getCardItem('201_', chicard)) + item_choose:GetController('zhong').selectedIndex = 0 + item_choose.onClick:Add( + function() + for k = 1, Bilist_choose.numChildren do + Bilist_choose:GetChildAt(k - 1):GetController('zhong').selectedIndex = 0 + end + item_choose:GetController('zhong').selectedIndex = 1 + if _tiplist[i].bi_list == nil then + if index == 1 then + self.bilist = {} + end + self.bilist[#self.bilist + 1] = i - 1 + if tip_hu then + local guo_msg = MsgWindow.new(self._root_view, '确定取消胡吗?', MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add( + function() + self._gamectr:SendAction(self._chiid, self.bilist) + guo_msg:Close() + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + ) + guo_msg:Show() + else + self._gamectr:SendAction(self._chiid, self.bilist) + self:__CloseTip() + local info = self._player_card_info[1] + info:UpdateIsOnClick(false) + end + else + self:CheckRatioCard(_tiplist[i].bi_list, 2, chicard, i - 1, #_tiplist) + end + end + ) + end + Bilist_choose:ResizeToFit(#_tiplist) + self._pop_tip_choice:GetChild('di' .. index + 1).width = Bilist_choose.width + 110 +end + +-- lua table 深拷贝 +function M:deepcopy(object) + local lookup_table = {} + local function _copy(object) + if type(object) ~= 'table' then + return object + elseif lookup_table[object] then + return lookup_table[object] + end + local new_table = {} + lookup_table[object] = new_table + for index, value in pairs(object) do + new_table[_copy(index)] = _copy(value) + end + return setmetatable(new_table, getmetatable(object)) + end + return _copy(object) +end + +function M:OnFangziAction(...) + local arg = {...} + local _player_card_info = self._player_card_info + local fz = arg[1] + local player = arg[2] + local num = arg[3] + --if fz.type == RB_FZType.Peng or fz.type == RB_FZType.Chi or fz.type == RB_FZType.Bi then + self:__CloseTip() + --end + if (player == self._room.self_player) then + local info = _player_card_info[self:GetPos(player.seat)] + info:UpdateIsOnClick(false) + end + self._popEvent = false + + local info = _player_card_info[self:GetPos(player.seat)] + info:UpdateFzList(player.fz_list, true, player.seat) --更新放子数组 + if (player == self._room.self_player) then + if fz.type == RB_FZType.Chi then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.Bi then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + info:DeleteHandCard(fz.card) + elseif fz.type == RB_FZType.Peng then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.Kan then + if #fz.opcard == 2 then + info:InitHandCard(false) + end + info:UpdateKan(fz.card) + elseif fz.type == RB_FZType.Wei then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.ChouWei then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + elseif fz.type == RB_FZType.Pao then + if num > 0 then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + end + elseif fz.type == RB_FZType.Ti then + if num > 0 then + for i = 1, #fz.opcard do + info:DeleteHandCard(fz.opcard[i]) + end + end + end + coroutine.start( + function() + coroutine.wait(0.3) + if fz.type ~= RB_FZType.Kan then + info:SendChangeCard() + end + end + ) + end + if fz.type ~= RB_FZType.Kan and fz.type ~= RB_FZType.Bi then + local info = _player_card_info[self:GetPos(player.seat)] + local pNode = info._mask_liangpai + local effect = UIPackage.CreateObject('Extend_Poker_YueYangWHZ', 'FzEffect') + + if fz.type == RB_FZType.Peng then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "peng") + self:PlaySound(player.self_user.sex, 'F_Peng') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'peng') + elseif fz.type == RB_FZType.Chi then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "chi") + self:PlaySound(player.self_user.sex, 'F_Chi') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'chi') + elseif fz.type == RB_FZType.Wei then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "wei") + self:PlaySound(player.self_user.sex, 'F_Wai') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'wai') + elseif fz.type == RB_FZType.ChouWei then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Extend_Poker_RunBeard", "chouwei") + self:PlaySound(player.self_user.sex, 'F_Wai') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Extend_Poker_YueYangWHZ', 'chouwei') + elseif fz.type == RB_FZType.Pao then + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "pao") + self:PlaySound(player.self_user.sex, 'F_KaiDuo') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'pao') + elseif fz.type == RB_FZType.Ti then + self:PlaySound(player.self_user.sex, 'F_SaoChuan') + effect:GetChild('icon1').icon = UIPackage.GetItemURL('Main_RunBeard', 'ti') + -- effect:GetChild("icon2").icon = UIPackage.GetItemURL("Main_RunBeard", "ti") + end + effect.touchable = false + effect.x, effect.y = 0, 0 + effect:GetTransition('t0'):Play() + pNode:AddChild(effect) + coroutine.start( + function() + coroutine.wait(1) + effect:Dispose() + end + ) + end + if (player == self._room.self_player) then + coroutine.start( + function() + coroutine.wait(0.5) + local info = _player_card_info[self:GetPos(player.seat)] + info:ShowHuTip() + end + ) + end + local removeOutcard = _player_card_info[self:GetPos(fz.from_seat)] + local p = self._room:GetPlayerBySeat(fz.from_seat) + if p.DiceCard ~= nil and fz.active_card == p.DiceCard then + removeOutcard:ClearOutCard() + p.DiceCard = nil + end + local list = self._room.player_list + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + --print(p.hu_xi) + info._view:GetChild('huxi').text = p.hu_xi + end + + if player == self._room.self_player then + local info = _player_card_info[self:GetPos(player.seat)] + info:SetNotPutCard() + end + + self._popEvent = true + coroutine.start( + function() + coroutine.wait(0.15) + local info = _player_card_info[1] + info:UpdateIsOnClick(true) + end + ) +end + +function M:ReloadRoom() + local _gamectr = self._gamectr + local room = self._room + if not room.playing then + self._state.selectedIndex = 2 + else + self._state.selectedIndex = 1 + end + if room.discard == 0 then + self._leftcard = 1 + else + self._leftcard = 0 + end + for i = 1, #room.player_list do + local p = room.player_list[i] + if p.seat == room.banker_seat then + local head = self._player_info[self:GetPos(p.seat)] + head:MarkBank(true) + end + if p.ready then + self._player_info[self:GetPos(p.seat)]:Ready(true) + else + self._player_info[self:GetPos(p.seat)]:Ready(false) + end + + --if p.piao then + -- self._player_info[self:GetPos(p.seat)]:UpdatePiao(-1) + --else + self._player_info[self:GetPos(p.seat)]:UpdatePiao(p.piao) + --end + + if self._state.selectedIndex == 1 then + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('huxi').selectedIndex = 1 + info._view:GetChild('huxi').text = p.hu_xi + info._view:GetController('zhanji').selectedIndex = 0 + if room.hpOnOff == 1 or room:checkHpNonnegative() then + if p.total_hp == nil then + p.total_hp = 0 + end + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + end + + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:UpdateQiPai(p.outcard_list) + card_info:UpdateFzList(p.fz_list, false, p.seat) + if p.DiceCard ~= nil and p.DiceCard ~= 0 then + card_info:UpdateOutCardList(p.DiceCard) + end + if DataManager.CurrenRoom.curren_outcard_seat == p.seat then + local info = self._player_info[self:GetPos(p.seat)] + info._view:GetController('time').selectedIndex = 1 + end + if p.seat == self._room.self_player.seat then + card_info:ChuPaiTiShi() + if + self._room.self_player.card_list ~= nil and + #self._room.self_player.handcard_list == #self._room.self_player.card_list + then + local _list = self:deepcopy(self._room.self_player.card_list) + local cards = {} + for i = 1, #_list do + cards[#cards + 1] = _list[i].card_item + end + table.sort(cards, ViewUtil.HandCardSort) + table.sort(self._room.self_player.handcard_list, ViewUtil.HandCardSort) + + local isNot = false + for i = 1, #cards do + if cards[i] ~= self._room.self_player.handcard_list[i] then + isNot = true + end + end + if isNot == true then + card_info:InitHandCard(false) + else + card_info:UpdateHandCards(self._room.self_player.card_list) + end + else + card_info:InitHandCard(false) + end + -- card_info:ChuPaiTiShi() + card_info:ShowHuTip() + for i = 1, #p.fz_list do + if p.fz_list[i].type == RB_FZType.Kan then + card_info:UpdateKan(3, p.fz_list[i].card) + end + end + end + end + + self._tex_LeftCard.text = '剩余 ' .. room.left_count .. ' 张牌' + local rightpanel = self._view:GetChild('right_panel') + local tex_round = rightpanel:GetChild('tex_round') + if tex_round ~= nil then + tex_round.text = '第 ' .. room.curren_round .. ' 局' + end + self._view:GetChild('tex_round').text = '第 ' .. room.curren_round .. '/' .. room.room_config.round .. ' 局' +end + +function M:PlayChatSound(sex, chat_index) + local sex_path = ViewUtil.Sex_Chat[sex] + local path1 = string.format('extend/zipai/yueyangwaihuzi/sound/%s/chat_%s.mp3', sex_path, tostring(chat_index)) + ViewUtil.PlaySound('YueYang_ZP', path1) +end + +function M:PlaySound(sex, path) + local sex_path = ViewUtil.Sex_Chat[1] -- 1 男 2 女 + local sound_path = string.format('extend/zipai/yueyangwaihuzi/sound/%s/%s.mp3', sex_path, path) + ViewUtil.PlaySound('YueYang_ZP', sound_path) +end + +function M:__CloseTip() + if (self._chipeng_tip) then + self._chipeng_tip:Dispose() + self._chipeng_tip = nil + end + if (self._pop_tip_choice) then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +function M:Destroy() + ZPMainView.Destroy(self) + UIPackage.RemovePackage('extend/zipai/yueyangwaihuzi/ui/Extend_Poker_YueYangWHZ') +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXPlayBackView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXPlayBackView.lua new file mode 100644 index 00000000..4371e666 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXPlayBackView.lua @@ -0,0 +1,627 @@ +local ZPPlayBackView = import('.main.ZPPlayBackView') +local PlayerSelfCardInfoView = import('.PlayerSelfCardInfoView') +local PlayerCardInfoView = import('.PlayerCardInfoView') +local RunBeard_ResultView = import('.RunBeard_ResultView') +local M = {} + +local Record_Event = { + Evt_OutCard = 'OutCard', + Evt_GetCard = 'GetCard', + Evt_Action = 'Action', + Evt_ThrowCard = 'ThrowCard', + Evt_AddCard = 'AddCard', + Evt_ChangePaiXing = 'ChangePaiXing', + Evt_Win = 'Win', + Evt_result = 'result' +} + +local function tableSortNumber(a, b) + return a.card_code_number > b.card_code_number +end + +--- Create a new +function M.new() + setmetatable(M, {__index = PlayBackView}) + local self = setmetatable({}, {__index = M}) + self.class = 'PlayBackView' + self:init() + + return self +end + +function M:InitView(url) + local room = self._room + self._gamectr = ControllerManager.GetController(GameController) + UIPackage.AddPackage('base/main_zipai/ui/Main_RunBeard') + UIPackage.AddPackage('extend/zipai/yueyangwaihuzi/ui/Extend_Poker_YueYangWHZ') + ZPPlayBackView.InitView(self, 'ui://Main_RunBeard/Main_' .. room.room_config.people_num) + UpdateBeat:Add(self.OnUpdate, self) + + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. room.game_id) + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + if typeface == 1 then + room.change_card_display = '2_' + else + room.change_card_display = '1_' + end + end + self._player_card_info = {} + local _player_card_info = self._player_card_info + for i = 1, room.room_config.people_num do + local tem = self._view:GetChild('player_card_info' .. i) + self._player_card_info[i] = self:NewPlayerPokerInfoView(tem, i) + end + local rightpanel = self._view:GetChild('right_panel') + self.btn_setting = rightpanel:GetChild('btn_setting') + self.btn_setting.visible = false + + self.tex_time = rightpanel:GetChild('tex_time') + self.tex_time.visible = false + + self.gcm_xinhao = rightpanel:GetChild('gcm_xinhao') + self.gcm_xinhao.visible = false + + self.pb_batteryLevel = rightpanel:GetChild('pb_batteryLevel') + self.pb_batteryLevel.visible = false + + local tex_round_item = rightpanel:GetChild('tex_round') + if tex_round_item ~= nil then + tex_round_item.text = '第 ' .. room.curren_round .. ' 局' + end + local btn_rule = rightpanel:GetChild('btn_log') + if btn_rule ~= nil then + btn_rule.onClick:Set( + function() + if self.RuleView == nil or self.RuleView._is_destroy then + self.RuleView = RoomInfoView.new(self._room) + end + self.RuleView:Show() + end + ) + end + local tex_roomid = rightpanel:GetChild('tex_roomid') + tex_roomid.text = room.room_id + rightpanel:GetChild('tex_gametype').text = room.room_config:GetGameName() + + self._tex_round = self._view:GetChild('tex_round') + self._tex_LeftCard = self._view:GetChild('remaining_card') + self._eventmap = {} + self._cmdmap = {} + self._cmdmap[Record_Event.Evt_OutCard] = self.CmdOutCard + self._cmdmap[Record_Event.Evt_GetCard] = self.CmdGetCard + self._cmdmap[Record_Event.Evt_Action] = self.CmdAction + self._cmdmap[Record_Event.Evt_ThrowCard] = self.CmdThrowCard + self._cmdmap[Record_Event.Evt_AddCard] = self.CmdAddCard + self._cmdmap[Record_Event.Evt_Win] = self.CmdWin + self._cmdmap[Record_Event.Evt_ChangePaiXing] = self.CmdChangePaiXing + self._cmdmap[Record_Event.Evt_result] = self.onResult +end + +function M:NewPlayerPokerInfoView(view, index) + if index == 1 then + return PlayerSelfCardInfoView.new(view, self) + end + return PlayerCardInfoView.new(view, self) +end + +function M:FillRoomData(data) + if self._win_pic then + self._win_pic:Dispose() + end + self._currentStep = 0 + local room = DataManager.CurrenRoom + local _player_card_info = self._player_card_info + local roominfo_panel = self._view:GetChild('roominfo_panel1') + roominfo_panel:GetChild('tex_roomid').text = room.room_id + roominfo_panel:GetChild('tex_gametype').text = room.room_config:GetGameName() + for i = 1, #room.player_list do + local p = room.player_list[i] + local card_info = _player_card_info[self:GetPos(p.seat)] + card_info:Clear() + card_info:SetPlayer(p) + if p.seat == room.self_player.seat then + card_info:UpdateIsOnClick(false) + end + local infoHand = self._player_info[self:GetPos(p.seat)] + infoHand._view:GetController('huxi').selectedIndex = 1 + infoHand._view:GetChild('huxi').text = p.hu_xi + if p.total_hp then + infoHand._view:GetController('zhanji').selectedIndex = 0 + if room.hpOnOff == 1 or room:checkHpNonnegative() then + infoHand._view:GetController('zhanji').selectedIndex = 1 + infoHand._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + infoHand:UpdateScore() + end + end + self:UpdateRound(self._room.curren_round) + self:GenerateAllStepData(data) + self:ShowStep(1) + self:UpdateStep(1) +end + +function M:ShowStep(index) + local step = self._step[index + 1] + self:UpdateStep(index + 1) + self:UpdateLeftCard(step.left_card) + for i = 1, #step.player_card_data do + local p = self._room:GetPlayerBySeat(i) + local info = self._player_card_info[self:GetPos(i)] + p.card_list = step.player_card_data[i].card_list + p.outcard_list = step.player_card_data[i].outcard_list + p.fz_list = step.player_card_data[i].fz_list + p.hu_xi = step.player_card_data[i].hu_xi + p.hand_left_count = #p.card_list + + if index == 1 then + info:Clear() + if p.total_hp then + local avHand = self._player_info[self:GetPos(p.seat)] + local room = DataManager.CurrenRoom + avHand._view:GetController('zhanji').selectedIndex = 0 + if room.hpOnOff == 1 or room:checkHpNonnegative() then + avHand._view:GetController('zhanji').selectedIndex = 1 + avHand._view:GetChild('tex_jifen').text = d2ad(p.total_hp) + end + avHand:UpdateScore() + end + end + if p.hu_xi ~= nil then + local infoHand = self._player_info[self:GetPos(p.seat)] + infoHand._view:GetChild('huxi').text = p.hu_xi + end + if step.cmd == Record_Event.Evt_Action then + if p.fz_list ~= nil and #p.fz_list > 0 then + info:UpdateFzList(p.fz_list) + end + end + + if p.seat ~= self._room.self_player.seat then + info:InitHandCard(p.card_list) + else + self._room.self_player.handcard_list = p.card_list + info:InitHandCard(false) + end + + --[[if step.cmd == Record_Event.Evt_ChangePaiXing then + local _card_list = {} + for i = 1, #step.card_list do + local data = {} + data.card_item = step.card_list[i].card + data.index_X = step.card_list[i].X + data.index_Y = step.card_list[i].Y + _card_list[#_card_list + 1] = data + end + local info = self._player_card_info[self:GetPos(step.seat)] + if step.card_list[1].card ~= nil then + info:UpdateHandCards(_card_list) + else + info:UpdateHandCards(step.card_list) + end + end--]] + + if step.cmd == Record_Event.Evt_OutCard or step.cmd == Record_Event.Evt_GetCard then + if step.DiceCard ~= nil and step.DiceCard ~= 0 then + if p.seat == step.seat then + info:UpdateOutCardList(step.DiceCard) + coroutine.start( + function() + coroutine.wait(1.5) + info:ClearOutCard() + end + ) + end + end + end + if p.outcard_list ~= nil then + info:UpdateQiPai(p.outcard_list) + end + end + -- print("step.cmd ",step.cmdm,Record_Event.Evt_Win) + if step.cmd == Record_Event.Evt_result then + --[[local _room = DataManager.CurrenRoom + local result = step.result + self._win_pic = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/胡') + local info = self._player_card_info[self:GetPos(step.win)] + info._mask_liangpai:AddChild(self._win_pic) + self._win_pic:Center() + + if result ~= nil then + if self._clearingView == nil then + self._clearingView = RunBeard_ResultView.new(self._view) + coroutine.start( + function() + coroutine.wait(0.5) + self._clearingView:Show() + end + ) + end + local data = result.data.info_list + self._clearingView:InitData( + 0, + _room, + result.data, + nil, + function(...) + for i = 1, #data do + local p = _room:GetPlayerBySeat(data[i].seat) + p.total_score = data[i].total_score + -- p.cur_hp = data[i]['cur_hp'] or 0 + -- if data[i]['hp_info'] then + -- p.cur_hp = data[i].hp_info.cur_hp + -- end + local card_info = self._player_card_info[self:GetPos(p.seat)] + local info = self._player_info[self:GetPos(p.seat)] + card_info:Clear() + if data[i]['hp_info'] then + p.total_score = d2ad(data[i].hp_info.cur_hp) + local stotal_hp = data[i].hp_info.total_hp + info._view:GetController('zhanji').selectedIndex = 0 + if _room.hpOnOff == 1 or _room:checkHpNonnegative() then + info._view:GetController('zhanji').selectedIndex = 1 + info._view:GetChild('tex_jifen').text = d2ad(stotal_hp) + end + end + info:UpdateScore(p.total_score) + end + self._clearingView = nil + end + ) + end--]] + else + if self._win_pic then + self._win_pic:Dispose() + end + end +end + +function M:GenerateAllStepData(data) + local cmdList = self.cmdList + self._step = {} + local step = {} + local info = data.info + step.cmd = '' + step.left_card = info.left_card + step.win = 0 + + step.player_card_data = {} + for i = 1, #self._room.player_list do + local p = info.playerData[i] + local u = {} + u.seat = p.seat + u.card_list = p.hand_card + u.hand_left_count = #u.card_list + u.fz_list = {} + u.outcard_list = {} + u.hu_xi = 0 + step.player_card_data[u.seat] = u + end + self._step[#self._step + 1] = step + + for i = 1, #cmdList do + local tem = cmdList[i] + self._cmdmap[tem.cmd](self, tem, i) + end +end + +function M:CmdOutCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.current_out_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + list_remove(u.card_list, cmd.data.card) + data.seat = cmd.seat + data.DiceCard = cmd.data.card +end + +function M:CmdGetCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.left_card = cmd.data.left_count + local u = data.player_card_data[cmd.seat] + data.seat = cmd.seat + data.DiceCard = cmd.data.card +end +function M:CmdThrowCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + data.current_seat = cmd.seat + local u = data.player_card_data[cmd.seat] + data.out_card_list = cmd.data.card + u.outcard_list[#u.outcard_list + 1] = cmd.data.card +end +function M:CmdAddCard(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + local _room = self._room + local u = data.player_card_data[cmd.seat] + u.card_list[#u.card_list + 1] = cmd.data.card +end + +function M:onResult(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.result = cmd.result +end + +function M:CmdChangePaiXing(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + data.card_list = cmd.data.card_list +end + +function M:CmdAction(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.seat = cmd.seat + local p = data.player_card_data[cmd.seat] + local fz = {} + p.hu_xi = cmd.data.hu_xi + fz.type = cmd.data.type + fz.card = cmd.data.card + fz.active_card = cmd.data.card + fz.opcard = cmd.data.opcard + local opcard = fz.opcard + local ftype = fz.type + local card = fz.card + local remove_num = #opcard + if ftype == RB_FZType.Chi then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Bi then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + list_remove(p.card_list, fz.card) + elseif ftype == RB_FZType.Peng then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Kan then + local _room = self._room + if #opcard == 2 then + p.card_list[#p.card_list + 1] = card + end + elseif ftype == RB_FZType.ChouWei then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, 2 do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Wei then + p.fz_list[#p.fz_list + 1] = fz + for i = 1, remove_num do + list_remove(p.card_list, opcard[i]) + end + elseif ftype == RB_FZType.Pao then + local num = 0 + for i = 1, #p.card_list do + if card == p.card_list[i] then + num = num + 1 + end + end + local isAddTi = false + for i = 1, #p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type = RB_FZType.Pao + isAddTi = true + end + end + if num > 0 then + for i = 1, num do + list_remove(p.card_list, card) + end + + if isAddTi == false then + p.fz_list[#p.fz_list + 1] = fz + end + end + elseif ftype == RB_FZType.Ti then + local num = 0 + for i = 1, #p.card_list do + if card == p.card_list[i] then + num = num + 1 + end + end + local isAddTi = false + for i = 1, #p.fz_list do + if p.fz_list[i].card == card then + p.fz_list[i].type = RB_FZType.Ti + isAddTi = true + end + end + if num > 0 then + for i = 1, num do + list_remove(p.card_list, card) + end + + if isAddTi == false then + p.fz_list[#p.fz_list + 1] = fz + end + end + end +end + +function M:CmdWin(cmd, index) + local data = self:CopyLastStep(index) + data.cmd = cmd.cmd + data.win = cmd.seat +end + +function M:UpdateLeftCard(num) + self._tex_LeftCard.text = '剩余 ' .. num .. ' 张牌' +end + +function M:UpdateRound(round) + self._tex_round.text = '第 ' .. round .. '/' .. self._room.room_config.round .. ' 局' +end + +function M:CopyLastStep(index) + local step = {} + local last_step = self._step[index] + step = self:deepcopy(last_step) + step.player_card_data = {} + local card_data = step.player_card_data + for i = 1, #last_step.player_card_data do + card_data[i] = {} + card_data[i].card_list = self:deepcopy(last_step.player_card_data[i].card_list) + card_data[i].outcard_list = self:deepcopy(last_step.player_card_data[i].outcard_list) + card_data[i].fz_list = self:deepcopy(last_step.player_card_data[i].fz_list) + card_data[i].hand_left_count = #card_data[i].card_list + card_data[i].hu_xi = self:deepcopy(last_step.player_card_data[i].hu_xi) + end + self._step[#self._step + 1] = step + return step +end + +-- lua table 深拷贝 +function M:deepcopy(object) + local lookup_table = {} + local function _copy(object) + if type(object) ~= 'table' then + return object + elseif lookup_table[object] then + return lookup_table[object] + end + local new_table = {} + lookup_table[object] = new_table + for index, value in pairs(object) do + new_table[_copy(index)] = _copy(value) + end + return setmetatable(new_table, getmetatable(object)) + end + return _copy(object) +end + +function M:NextRecordPlay() + local result = PlayBackView.NextRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() +end + +function M:LastRecordPlay() + local result = PlayBackView.LastRecordPlay(self) + if not result then + return + end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() +end + +function M:Play() + self:ChangeAlpha() + self:ChangePlayState(not self._play) + if not self._play then + return + end + if (self._currentStep == #self.cmdList and self._playFoward) or (self._currentStep == 0 and not self._playFoward) then + self._currentStep = 0 + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:ChangePlayState(state) + self._play = state + self:ChangeTextSpeed() + local btn_play = self._view:GetChild('panel_record'):GetChild('btn_play') + if self._play then + btn_play:GetController('state').selectedIndex = 1 + else + btn_play:GetController('state').selectedIndex = 0 + end +end + +function M:ChangeTextSpeed() + local str1 = self._play and self._speed or '' + self._view:GetChild('panel_record'):GetChild('tex_speed').text = str1 + local str2 = + not self._play and (self._playFoward and '播放暂停' or '回退暂停') or + self._playFoward and (self._speed == 1 and '播放' or '快进') or + (self._speed == 1 and '回退' or '快退') + self._view:GetChild('panel_record'):GetChild('tex_2').text = str2 + local str3 = self._play and '倍速度' or '' + self._view:GetChild('panel_record'):GetChild('tex_1').text = str3 +end + +function M:CmdLeftArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if not self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = false + self:ChangeTextSpeed() + end +end + +function M:CmdRightArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:OnUpdate() + if self._play then + if (self._currentStep == #self.cmdList and self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像结尾了,再次点击播放按钮可重新播放') + return + elseif (self._currentStep == 0 and not self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil, '当前已是录像开头了,再次点击播放按钮可重新播放') + return + end + self._timer = self._timer + Time.deltaTime + if self._timer >= 1 / self._speed then + self._timer = 0 + local step = self._playFoward and 1 or -1 + self._currentStep = self._currentStep + step + self:ShowStep(self._currentStep) + end + end +end + +function M:Destroy() + UpdateBeat:Remove(self.OnUpdate, self) + PlayBackView.Destroy(self) +end + +function M:UpdateStep(step) + self._record:GetChild('tex_step').text = '第 ' .. step .. ' / ' .. #self._step .. '步' +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXPlayer.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXPlayer.lua new file mode 100644 index 00000000..fe112fd2 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXPlayer.lua @@ -0,0 +1,37 @@ + + +local EXPlayer ={ + -- 手牌列表 + card_list = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil, + hu_xi =0 +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 + self.hu_xi =0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXPlayerInfoView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXPlayerInfoView.lua new file mode 100644 index 00000000..7d32adea --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXPlayerInfoView.lua @@ -0,0 +1,52 @@ +local PlayerInfoView = require("Game.View.PlayerInfoView") + +local M = {} + +function M.new(view, mainView) + setmetatable(M, {__index = PlayerInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._main_view = mainView + self:init() + return self +end + + +--[[function M:FillData(player) + + + PlayerInfoView.FillData(self, player) + if player.cur_hp ~= nil then + self:UpdateScore(d2ad(player.cur_hp)) + else + local rt = 1 + if self._main_view._room.hpOnOff == 1 then + rt = self._main_view._room.score_times + end + self:UpdateScore(player.total_score * rt) + end + + +end--]] + +function M:UpdatePiao(piao) + + if piao == nil or piao == -1 then + self._view:GetChild("piao").text = "" + elseif piao == 0 then + self._view:GetChild("piao").text = "不飘" + elseif piao == 1 then + self._view:GetChild("piao").text = "飘1分" + elseif piao == 2 then + self._view:GetChild("piao").text = "飘2分" + elseif piao == 3 then + self._view:GetChild("piao").text = "飘3分" + elseif piao == 5 then + self._view:GetChild("piao").text = "飘5分" + elseif piao == 8 then + self._view:GetChild("piao").text = "飘8分" + end +end + + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXRoomConfig.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXRoomConfig.lua new file mode 100644 index 00000000..bd98fbf4 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/EXRoomConfig.lua @@ -0,0 +1,506 @@ + +local M = {} + +--- Create a new RoomConfig +function M.new(config) + setmetatable(M,{__index = RoomConfig}) + local self = setmetatable({}, {__index = M}) + RoomConfig.init(self,config) +self.config=config + self.class = "RoomConfig" + self.round = config["times"] + self.mode = config["mode"] + self.tun = config["tun"] + self.fengding = config["fengding"] + self.tuanyuan = config["tuanyuan"] + self.hanghangxi = config["hanghangxi"] + self.siqi = config["siqi"] + self.shuahou = config["shuahou"] + self.huangfan = config["huangfan"] + self.jiaxingxing = config["jiaxingxing"] + self.tinghu = config["tinghu"] + self.duizifu = config["duizifu"] + self.back = config["back"] + self.yuan = config["yuan"] + self.tianhu =config["tianhu"] + self.dihu =config["dihu"] + self.haihu =config["haihu"] + self.maxPlayers = config["maxPlayers"] + self.qupai = config["qupai"] + self.isHidden = config.isHidden + + self.hh = config["hh"] or 0 + self.dh = config["dh"] or 0 + self.hw = config["hw"] or 0 + self.wh = config["wh"] or 0 + + self.hd = config["hd"] or 0 + self.wd = config["wd"] or 0 + self.jhd = config["jhd"] or 0 + + self.dhdf = config["dhdf"] or 0 + return self +end + +--[[function M:GetDes(sp) + sp = sp or " " + local count=0 + local str = self.round and self.round .. "局" .. " " or "" + str = str .. RoomConfig.GetDes(self, sp).."\n" + + + if self.config["kawai"]==0 then + str = str .."卡歪" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + tr = str .."不卡歪" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=3 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["first_rand_zhuang"] then + str = str .."首局随机庄" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["zhuang_di_hu"]==0 then + str = str .."庄家地胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + tr = str .."庄家不地胡" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=1 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["hao_config"]==0 then + str = str .."豪123" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + tr = str .."豪234" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["hao_jiabei"]==0 then + str = str .."-不加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=2 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["hao_jiabei"]==1 then + str = str .."低于10分加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["hao_jiabei"]==2 then + str = str .."低于20分加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["hao_jiabei"]==3 then + str = str .."低于30分加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["hao_jiabei"]==4 then + str = str .."低于40分加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["hao_jiabei"]==5 then + str = str .."低于50分加倍" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + if self.config["ming_tang"]==0 then + str = str .."名堂60/80/100" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + else + str = str .."名堂80/100/120" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=0 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["piao"]==0 then + str = str .."不飘" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["piao"]==1 then + str = str .."飘123" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["piao"]==2 then + str = str .."飘235" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["piao"]==3 then + str = str .."飘258" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + + if self.config["qupai"]==0 then + str = str .."不抽" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["piao"]==1 then + str = str .."抽10" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + elseif self.config["piao"]==2 then + str = str .."抽19" + count=count+1 + if count%2==0 then + str = str .."\n" + else + sp1="" + local strL=4 + for i=1,strL do + sp1=sp1.." " + end + str = str .. sp1..sp + end + end + + return str +end--]] + + +function M:GetDes(sp) + + sp = sp or " " + local str = self.round and self.round .. "局" .. sp or "" + str = str .. RoomConfig.GetDes(self, sp) + + if self.config["kawai"]==0 then + str = str .."卡歪" + str = str ..sp + + else + str = str .."不卡歪" + str = str ..sp + end + + + if self.config["first_rand_zhuang"] then + str = str .."首局随机庄" + str = str .. sp + end + + if self.config["zhuang_di_hu"]==0 then + str = str .."庄家地胡" + str = str ..sp + + else + str = str .."庄家不地胡" + str = str ..sp + + end + + --printlog("1111111111111111111111111",self.config["hao_config"]) + if self.config["hao_config"]==0 then + str = str .."豪123" + + str = str ..sp + + else + str = str .."豪234" + + str = str ..sp + end + + if self.config["hao_jiabei"]==0 then + str = str .."-不加倍" + + str = str ..sp + + elseif self.config["hao_jiabei"]==1 then + str = str .."低于10分加倍" + + str = str ..sp + + elseif self.config["hao_jiabei"]==2 then + str = str .."低于20分加倍" + + str = str ..sp + + elseif self.config["hao_jiabei"]==3 then + str = str .."低于30分加倍" + + str = str ..sp + + elseif self.config["hao_jiabei"]==4 then + str = str .."低于40分加倍" + + str = str ..sp + + elseif self.config["hao_jiabei"]==5 then + str = str .."低于50分加倍" + + str = str ..sp + + end + + if self.config["ming_tang"]==0 then + str = str .."名堂60/80/100" + + str = str ..sp + + else + str = str .."名堂80/100/120" + + str = str ..sp + + end + + + if self.config["piao"]==0 then + str = str .."不飘" + + str = str ..sp + + elseif self.config["piao"]==1 then + str = str .."飘123" + str = str ..sp + + elseif self.config["piao"]==2 then + str = str .."飘235" + str = str ..sp + + elseif self.config["piao"]==3 then + str = str .."飘258" + + str = str ..sp + + end + + + if self.config["qupai"]==0 then + str = str .."不抽" + + str = str ..sp + + elseif self.config["piao"]==1 then + str = str .."抽10" + + str = str ..sp + + elseif self.config["piao"]==2 then + str = str .."抽19" + + str = str ..sp + + end + + return str +end + + +function M:GetGameName() + return self.maxPlayers .. '人岳阳歪胡子' +end + +function M:GetGameJS() + local gamerulepanel= UIPackage.CreateObjectFromURL("ui://Extend_Poker_YueYangWHZ/gamerule") + return gamerulepanel +end + + +function M:GetGameSMSize() + return 467,500 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/ExtendConfig.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/ExtendConfig.lua new file mode 100644 index 00000000..38176923 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/ExtendConfig.lua @@ -0,0 +1,241 @@ +local EXTEND_MODEL_NAME = ... + +local EXGameInfo = import('.EXGameInfo') +local EXMainView = import('.EXMainView') +local EXGameController = import('.EXGameController') +local EXRoomConfig = import('.EXRoomConfig') +local EXPlayBackView = import('.EXPlayBackView') +local explayer = import('.EXPlayer') +local ExtendConfig = {} + +local M = ExtendConfig + +function ExtendConfig.new() + setmetatable(M, {__index = IExtendConfig}) + local self = setmetatable({}, {__index = M}) + self.class = 'ExtendConfig' + self.extend_id = 13 + self._viewMap = {} + self._viewMap[ViewManager.View_Main] = EXMainView + self._viewMap[ViewManager.View_PlayBack] = EXPlayBackView + return self +end + +--卸载资源 +function M:UnAllAssets() + UIPackage.RemovePackage('extend/zipai/yueyangwaihuzi/ui/Info_Poker_YueYangWHZ') + self:UnAssets() +end + +--卸载资源 +function M:UnAssets() + UIPackage.RemovePackage('extend/zipai/yueyangwaihuzi/ui/Extend_Poker_YueYangWHZ') + ResourcesManager.UnLoadGroup('YueYang_ZP') +end + +local _gameInfo = nil +function M:GetGameInfo() + if not _gameInfo then + _gameInfo = EXGameInfo.new() + end + return _gameInfo +end + +local _ctr_game = nil +function M:GetGameController() + if _ctr_game == nil then + _ctr_game = EXGameController.new() + end + return _ctr_game +end + +function M:FillRoomConfig(room, _config) + room.room_config = EXRoomConfig.new(_config) +end + +function M:FillRoomData(s2croom) + printlog("初始化数据===>>>") + pt(s2croom) + local room = DataManager.CurrenRoom + local reload = s2croom['reload'] + local _tableInfo = s2croom['tableInfo'] + + local _config = _tableInfo['config'] + room.room_config = EXRoomConfig.new(_config) + + local playerList = _tableInfo['playerData'] + room.curren_round = _tableInfo['round'] + for i = 1, #playerList do + local _jp = playerList[i] + + local p = explayer.new() + p.seat = _jp['seat'] + local online = _jp['online'] + p.line_state = online + p.ready = _jp['ready'] == 1 and true or false + --p.piao=_jp['piao'] + local pid = _jp['aid'] + if (DataManager.SelfUser.account_id == pid) then + room.self_player = p + p.self_user = DataManager.SelfUser + else + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp['nick'] + u.head_url = _jp['portrait'] + u.sex = _jp['sex'] + end + p.entrust = _jp['entrust'] + p.self_user.host_ip = _jp['ip'] + p.self_user.location = Location.new(_jp['pos'] or '') + p.cur_hp = _jp['cur_hp'] or 0 + p.total_hp = _jp['total_hp'] or 0 + if _jp['hp_info'] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + room:AddPlayer(p) + end + + -- 如果重写了player类,就需要传第二个参数 + -- self:FillPlayerData(playerList, explayer) + + if (reload) then + local _reloadInfo = s2croom['reloadInfo'] + room.self_player.currentNotPutCardList=_reloadInfo['notput'] + local _hand_card = _reloadInfo['hand_card'] + local _card_list = _reloadInfo['card_list'] + local _discard = _reloadInfo['discard'] + room.discard = _discard + -- local _index = _reloadInfo["typeface"] + -- if _index ==1 then + -- room.change_card_display = "2_" + -- else + -- room.change_card_display = "1_" + -- end + room.self_player.handcard_list = _hand_card + room.self_player.card_list = {} + for i = 1, #_card_list do + local data = {} + data.card_item = _card_list[i].card + data.index_X = _card_list[i].X + data.index_Y = _card_list[i].Y + room.self_player.card_list[#room.self_player.card_list + 1] = data + end + local active_seat = _reloadInfo['active_seat'] + local bank_seat = _reloadInfo['banker_seat'] + local playing = _reloadInfo['playing'] + local _info_list = _reloadInfo['info_list'] + local last_outcard_seat = _reloadInfo['last_outcard_seat'] + + room.left_count = _reloadInfo['left_card'] + room.banker_seat = bank_seat + room.curren_outcard_seat = _reloadInfo['curren_outcard_seat'] + if active_seat ~= 0 then + local player = room:GetPlayerBySeat(active_seat) + player.DiceCard = _reloadInfo['acitve_card'] + end + room.last_outcard_seat = last_outcard_seat + room.playing = playing + for i = 1, #_info_list do + local tem = _info_list[i] + local playerid = tem['playerid'] + local p = room:GetPlayerById(playerid) + local outcard_list = tem['outcard_list'] + p.outcard_list = outcard_list + p.total_score = tem['score'] + p.hu_xi = tem['hu_xi'] + p.hand_left_count = tem['card_count'] + p.cur_hp = tem['cur_hp'] or 0 + p.total_hp = tem['total_hp'] or 0 + if tem['hp_info'] then + p.cur_hp = tem.hp_info.cur_hp + p.total_hp = tem.hp_info.total_hp + end + p.entrust = tem['entrust'] + p.piao=tem['piao'] + local opcard = tem['opcard'] + for k = 1, #opcard do + local op = opcard[k] + local fz = {} + fz.type = op['type'] + local data = {} + data[1] = op['card1'] + data[2] = op['card3'] + fz.opcard = data + fz.card = op['card2'] + fz.active_card = op['card2'] + + p.fz_list[#p.fz_list + 1] = fz + if p.seat == room.self_player.seat then + if fz.type == RB_FZType.Kan then + for i = 1, 3 do + room.self_player.handcard_list[#room.self_player.handcard_list + 1] = fz.card + end + end + end + end + pt(p) + if not playing and room.curren_round > 0 then + self.GetGameController():PlayerReady() + end + end + end +end + +function M:FillPlayBackData(pd_data) + local room = DataManager.CurrenRoom + local _tableInfo = pd_data['info'] + + local _config = _tableInfo['config'] + room.room_id = _tableInfo.roomid + room.room_config = EXRoomConfig.new(_config) + room.owner_id = _config['ownerid'] + local active_seat = _tableInfo['active_seat'] + local bank_seat = _tableInfo['banker_seat'] + room.left_count = _tableInfo['left_card'] + room.banker_seat = bank_seat + room.curren_turn_seat = active_seat + room.curren_round = _tableInfo['round'] + + local _info_list = _tableInfo['playerData'] + for i = 1, #_info_list do + local _jp = _info_list[i] + local p = room:NewPlayer() + p.seat = _jp['seat'] + local online = _jp['online'] + p.line_state = online + p.ready = _jp['ready'] == 1 and true or false + local pid = _jp['aid'] + if pid == DataManager.SelfUser.account_id then + room.self_player = p + end + local u = User.new() + u.account_id = pid + p.self_user = u + u.nick_name = _jp['nick'] + u.head_url = _jp['portrait'] + u.sex = _jp['sex'] + p.self_user.host_ip = p.self_user.host_ip + local _hand_card = _jp['hand_card'] + p.hand_card = _hand_card + if room.self_player ~= nil and p.seat == room.self_player.seat then + room.self_player.handcard_list = _hand_card + end + p.total_score = _jp['score'] + p.hand_left_count = #_hand_card + p.cur_hp = _jp['cur_hp'] or 0 + p.total_hp = _jp['total_hp'] or 0 + if _jp['hp_info'] then + p.cur_hp = _jp.hp_info.cur_hp + p.total_hp = _jp.hp_info.total_hp + end + + room:AddPlayer(p) + end + room.cmdList = pd_data['cmdList'] + room.result = pd_data['result'] +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/PlayerCardInfoView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/PlayerCardInfoView.lua new file mode 100644 index 00000000..2a3b48b6 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/PlayerCardInfoView.lua @@ -0,0 +1,268 @@ +local PlayerCardInfoView = import(".main.ZPPlayerCardInfoView") + +local M = {} +function M.new(view,mainView) + + setmetatable(M, {__index = PlayerCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerCardInfoView" + self._view = view + self._mainView = mainView + self:init() + return self +end + + + +function M:UpdateFzList( fz_list ,ispaly,seat) + self._area_fz_list:RemoveChildren(0,-1,true) + for i = 1,#fz_list do + local fzitem = nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/ComponentNew") + if(ispaly == false)then + fzitem:RemoveChildren(0,-1,true) + end + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetController("c2").selectedIndex =1 + fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].active_card) + fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[1]) + fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[2]) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Peng then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Wei then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Pao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + + elseif fz_list[i].type == RB_FZType.Ti then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + if self._mainView._leftcard ==1 and self._player.seat ~= DataManager.CurrenRoom.banker_seat then + for j=1,4 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + else + for j=1,4 do + if j==4 then + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + else + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + end + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly,seat) + end + end +end + +function M:playAnim(fzitem,fzcards, size,i,ispaly,seat) + if(ispaly == nil)then + ispaly =false + end + + local isaddLast = false + if(ispaly and i == size)then --匹配最后一个牌 + local faArray= fzitem:GetChild("chiwei1") + + if(DataManager.CurrenRoom.room_config.people_num ==3)then + if(DataManager.CurrenRoom.self_player.seat == 1)then + if(seat == 2)then + faArray= fzitem:GetChild("chiwei1") + else + faArray= fzitem:GetChild("chiwei") + end + elseif(DataManager.CurrenRoom.self_player.seat == 2) then + if(seat == 3)then + faArray= fzitem:GetChild("chiwei1") + else + faArray= fzitem:GetChild("chiwei") + end + elseif(DataManager.CurrenRoom.self_player.seat == 3)then + if(seat == 1)then + faArray= fzitem:GetChild("chiwei1") + else + faArray= fzitem:GetChild("chiwei") + end + end + end + + if(faArray~=nil)then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end + if(seat~=nil)then + isaddLast = self:isAddFirst(seat) + end + if(isaddLast)then + local index_postion = 0 + self._area_fz_list:AddChildAt(fzitem,index_postion) + else + self._area_fz_list:AddChild(fzitem) + end +end + +function M:isAddFirst(seat) + local isaddLast = false + if(DataManager.CurrenRoom.room_config.people_num ==3)then + if(DataManager.CurrenRoom.self_player.seat == 1)then + if(seat == 2)then + isaddLast = true + end + elseif(DataManager.CurrenRoom.self_player.seat == 2)then + if(seat == 3)then + isaddLast = true + end + elseif(DataManager.CurrenRoom.self_player.seat == 3)then + if(seat == 1)then + isaddLast = true + end + end + elseif DataManager.CurrenRoom.room_config.people_num ==2 then + isaddLast = true + end + return isaddLast +end + +function M:PlayingOutCardAnima(card) + coroutine.start(function() + coroutine.wait(0.1) + self:ClearOutCard() + end) +end + +function M:UpdateOutCardList(outcard,isShow,isMopai,seat) + if(isShow == nil) then + isShow = false + end + if(isMopai == nil) then + isMopai = false + end + + self._area_outcard_list:RemoveChildren(0,-1,true) + local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + + if outcard==0 then + outcards:GetChild("icon").icon ="ui://Main_RunBeard/202_1_300" + else + outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/203_",outcard) + end + outcards.x,outcards.y = 0,0 + local show_di_bg = outcards:GetChild("show_di_bg") + --show_di_bg.visible = true + if(isShow)then + if outcard == 0 then + show_di_bg.visible = false + end + if(seat ~= nil and outcards~=nil)then + if(DataManager.CurrenRoom.room_config.people_num ==3)then + if(seat ==2)then + seat = 3 + elseif(seat == 3)then + seat =2 + end + elseif DataManager.CurrenRoom.room_config.people_num ==2 then + seat = 3 + end + if(isMopai)then + if outcard ~= 0 then + outcards:GetTransition("mopai"..seat):Play(function( ) + -- show_di_bg.visible = true + + end) + end + else + show_di_bg.visible = false + outcards:GetTransition("cpai"..seat):Play() + end + else + --show_di_bg.visible = true + end + else + show_di_bg.visible = false + end + self._area_outcard_list:AddChild(outcards) +end + +--弃牌 +function M:UpdateQiPai( qi_list,ispaly,seat) + self._area_qipai_list:RemoveChildren(0,-1,true) + for i=1,#qi_list do + local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + qicards:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",qi_list[i]) + if(ispaly)then + if(i == #qi_list) then + if(DataManager.CurrenRoom.room_config.people_num ==2)then + qicards:GetTransition("t0"):Play() + else + if(DataManager.CurrenRoom.self_player.seat == 1)then + if(seat == 2)then + qicards:GetTransition("t0"):Play() + else + qicards:GetTransition("t1"):Play() + end + elseif(DataManager.CurrenRoom.self_player.seat == 2)then + if(seat == 3)then + qicards:GetTransition("t0"):Play() + else + qicards:GetTransition("t1"):Play() + end + elseif(DataManager.CurrenRoom.self_player.seat == 3)then + if(seat == 1)then + qicards:GetTransition("t0"):Play() + else + qicards:GetTransition("t1"):Play() + end + else + qicards:GetTransition("t0"):Play() + end + + end + end + end + self._area_qipai_list:AddChild(qicards) + end + +end +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/PlayerSelfCardInfoView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/PlayerSelfCardInfoView.lua new file mode 100644 index 00000000..2bd0e0e5 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/PlayerSelfCardInfoView.lua @@ -0,0 +1,506 @@ +local PlayerSelfCardInfoView = import(".main.ZPPlayerSelfCardInfoView") +local CardCheck = import(".main.CardCheck") +local M = {} +-- +function M.new(view,mainView) + setmetatable(M, {__index = PlayerSelfCardInfoView}) + local self = setmetatable({},{__index = M}) + self.class = "PlayerSelfCardInfoView" + self._view = view + self._mainView = mainView + self._full = true + self:init() + return self +end + + +function M:onTouchBegin(context) + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + local button = context.sender + local card = button.data + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self:ShowHuTip(card.card_item) + end + card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/203_",card.card_item) + card.btn_card.sortingOrder = 100 + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + card.btn_card.xy = Vector2.New(card.btn_card.x+20 ,card.btn_card.y-50) + card.touch_pos = xy - button.xy + +end + +function M:ClearMpList(mpList) + local tempList={} + for k,v in pairs(mpList) do + if #v>0 then + table.insert(tempList,v) + end + end + + return tempList +end + +function M:__OnDragEnd(context) + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + if self.outcard_button then + self.outcard_button = nil + end + local button = context.sender + + local card = button.data + + local _room = DataManager.CurrenRoom + card.btn_card.sortingOrder = 0 + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + local currentCtrS=IsHasDictionary(card.card_item,DataManager.CurrenRoom.self_player.currentNotPutCardList) + if currentCtrS==nil then currentCtrS=false end + if (button.y < -380 and _room.curren_outcard_seat == _room.self_player.seat) and currentCtrS==false then + button.touchable = false + self.outcard_button = card + self:UpdateIsOnClick(false) + self._mainView:OutCard(card.card_item) + else + local isChangeCard = false + self.outcard_button = nil + card.btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/201_",card.card_item) + self._area_handcard_list:AddChild(button) + if #self.card_list == 1 then + isChangeCard = false + self:UpdateHandCardsPos() + return + end + local CountCards = {} + for i=1,#self.card_list do + local lists = {} + if CountCards[self.card_list[i].index_X] == nil then + lists[#lists+1] = self.card_list[i] + CountCards[self.card_list[i].index_X]= lists + else + CountCards[self.card_list[i].index_X][#CountCards[self.card_list[i].index_X]+1] =self.card_list[i] + end + end + + CountCards=self:ClearMpList(CountCards) + + local minmark = 1 + local maxmark = #self.card_list + if card == self.card_list[1] or card == self.card_list[#self.card_list] then + if self.card_list[1].index_X == self.card_list[2].index_X then + minmark =2 + end + if self.card_list[#self.card_list].index_X == self.card_list[#self.card_list-1].index_X then + maxmark =#self.card_list-1 + end + end + if button.x+button.width/2 < self.card_list[minmark].btn_card.x and #CountCards<12 then + list_remove(self.card_list,card) + local num = 0 + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num+1 + end + end + if num ==0 then + for i=1,#self.card_list do + if self.card_list[i].index_X < card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + else + for i=1,#self.card_list do + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + card.index_X =1 + card.index_Y =1 + table.insert(self.card_list,1,card) + isChangeCard = true + elseif button.x+button.width/2 > (self.card_list[maxmark].btn_card.x +button.width) and #CountCards<12 then + list_remove(self.card_list,card) + local num = 0 + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X then + num = num+1 + end + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + end + if num ==0 then + for i=1,#self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + end + card.index_X =self.card_list[#self.card_list].index_X+1 + card.index_Y =1 + self.card_list[#self.card_list+1] =card + isChangeCard = true + else + local MoveCard = false + local MoveCardPos = 0 + local MoveCardY = 0 + for i=1,#CountCards do + if CountCards[i] then + local card_view = CountCards[i][1] + if card_view~=nil then + if button.x+button.width/2 > card_view.old_postion.x and button.x+button.width/2 < (card_view.old_postion.x+button.width) then + if card ~= card_view and #CountCards[i] <4 and card.index_X ~= card_view.index_X then + + MoveCardPos = i + MoveCardY = #CountCards[i]+1 + MoveCard = true + list_remove(self.card_list,card) + end + end + end + end + + end + local MoveCardindex = 0 + -- local MoveCardY = 0 + if button.x+button.width/2 > card.old_postion.x and button.x+button.width/2 < (card.old_postion.x+button.width) then + if #CountCards[card.index_X]>1 then + for i=1,#CountCards[card.index_X] do + local _cv = CountCards[card.index_X][i] + if _cv ~= card then + if button.y+button.height/2 > _cv.btn_card.y and button.y+button.height/2 < (_cv.btn_card.y+button.height) then + --向下移動 + if ((button.y+button.height/2) +20) > (card.old_postion.y+button.height) then + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + --向上移動 + elseif ((button.y+button.height/2) -20) < card.old_postion.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + end + elseif i == #CountCards[card.index_X] and button.y+button.height/2 < _cv.btn_card.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + elseif i == 1 and button.y+button.height/2 > (_cv.btn_card.y+button.width) then + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list,card) + end + end + end + end + + end + if MoveCard ==true and MoveCardindex ==0 then + local num = 0 + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num+1 + end + end + if num ==0 then + for i=1,#self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + if MoveCardPos > card.index_X then + MoveCardPos = MoveCardPos-1 + end + end + card.index_X =MoveCardPos + card.index_Y =MoveCardY + for i=#self.card_list,1,-1 do + if MoveCardPos == self.card_list[i].index_X then + table.insert(self.card_list,(i+1),card) + break + end + end + isChangeCard = true + --上下移动 + elseif MoveCard ==true and MoveCardindex ~= 0 then + for i=1,#self.card_list do + if card.index_X == self.card_list[i].index_X then + --向下移动 + if MoveCardindex == -1 then + if self.card_list[i].index_Y < card.index_Y and self.card_list[i].index_Y >= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y + 1 + + end + --向上移动 + else + if self.card_list[i].index_Y > card.index_Y and self.card_list[i].index_Y <= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + + end + end + end + end + card.index_X =MoveCardPos + card.index_Y =MoveCardY + for i=#self.card_list,1,-1 do + if MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY-1) then + table.insert(self.card_list,(i+1),card) + break + elseif MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY+1) then + table.insert(self.card_list,i,card) + break + end + end + isChangeCard = true + else + isChangeCard = false + self._area_handcard_list:AddChild(button) + end + + end + self:UpdateHandCardsPos() + if isChangeCard ==true then + self:SendChangeCard() + end + end +end + +function M:UpdateOutCardList(outcard,isShow,isMopai,seat) + if(isShow == nil) then + isShow = false + end + if(isMopai == nil) then + isMopai = false + end + self._area_outcard_list:RemoveChildren(0,-1,true) + local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + + if outcard==0 then + outcards:GetChild("icon").icon ="ui://Main_RunBeard/202_1_300" + else + outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/203_",outcard) + end + outcards.x,outcards.y = 0,0 + local show_di_bg = outcards:GetChild("show_di_bg") + -- show_di_bg.visible = true + if(isShow)then + if outcard == 0 then + show_di_bg.visible = false + end + if(seat ~= nil and outcards~=nil)then + if(isMopai)then + if outcard ~= 0 then + outcards:GetTransition("mopai"..seat):Play(function( ) + -- show_di_bg.visible = true + + end) + end + else + show_di_bg.visible = false + outcards:GetTransition("cpai"..seat):Play() + end + else + --show_di_bg.visible = true + end + else + show_di_bg.visible = false + end + self._area_outcard_list:AddChild(outcards) +end + +--弃牌 +function M:UpdateQiPai( qi_list,isplay) + self._area_qipai_list:RemoveChildren(0,-1,true) + for i=1,#qi_list do + local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + qicards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/202_",qi_list[i]) + if(isplay)then + if(i == #qi_list) then + qicards:GetTransition("t0"):Play() + end + end + self._area_qipai_list:AddChild(qicards) + end +end + +--摸牌动画 +function M:PlayingOutCardAnima( card) + coroutine.start(function() + coroutine.wait(0.1) + self:ClearOutCard() + end) +end + +function M:UpdateFzList( fz_list ,ispaly) + + self._area_fz_list:RemoveChildren(0,-1,true) + for i = 1,#fz_list do + printlog("jefe UpdateFzList>>>",fz_list[i].type) + local fzitem=nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/ComponentNew") + if(ispaly == false)then + fzitem:RemoveChildren(0,-1,true) + end + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].active_card) + fzcards:GetController("c2").selectedIndex = 1 + fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[1]) + fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[2]) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Peng then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Wei then + + --[[ local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetController("c1").selectedIndex=1 + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly)--]] + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Pao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + elseif fz_list[i].type == RB_FZType.Ti then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + if j==4 then + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + else + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + end + fzcards.x,fzcards.y = 0,0 + self:playAnim(fzitem,fzcards,#fz_list,i,ispaly) + + end + end +end + + +function M:playAnim( fzitem,fzcards, size,i,ispaly ) + if(ispaly == nil)then + ispaly =false + end + printlog("jefe playAnim>>>",fzcards,size,i) + if(ispaly and i == size)then + local faArray= fzitem:GetChild("chiwei") + if(faArray~=nil)then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end + self._area_fz_list:AddChild(fzitem) +end + + + --出牌提示动画 + function M:ChuPaiTiShi() + if DataManager.CurrenRoom ==nil or DataManager.CurrenRoom.self_player ==nil then + return + end + local chu_player = DataManager.CurrenRoom.self_player + local selfplayeTable = {} + selfplayeTable.handcard_list = chu_player.handcard_list + selfplayeTable.fz_list = chu_player.fz_list + selfplayeTable.tiCount = chu_player.tiCount + selfplayeTable.paoCount = chu_player.paoCount + selfplayeTable.hu_xi = chu_player.hu_xi + local player = membe_deep_clone(selfplayeTable) + local mark_ting= {} + for i=1,#DataManager.CurrenRoom.self_player.handcard_list do + local card = DataManager.CurrenRoom.self_player.handcard_list[i] + list_remove(player.handcard_list, card) + local _player = membe_deep_clone(player) + local tingList = CardCheck.tingPai(_player,DataManager.CurrenRoom) + local isKan = false + for j=1,#player.fz_list do + if card == player.fz_list[j].card and player.fz_list[j].type == RB_FZType.Kan then + isKan =true + end + end + if #tingList > 0 and isKan == false then + + mark_ting[#mark_ting+1] = card + end + table.insert(player.handcard_list, card) + table.sort( player.handcard_list, ViewUtil.HandCardSort) + end + -- print("ChuPaiTiShi",#mark_ting) + --pt(mark_ting) + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self._view :GetController("chupai").selectedIndex =1 + if #mark_ting>0 then + for i=1,#mark_ting do + for k=1,#self.card_list do + local card_view= self.card_list[k] + if card_view.card_item == mark_ting[i] then + card_view.btn_card:GetController("mark_ting").selectedIndex = 1 + end + end + end + end + else + self._view :GetController("chupai").selectedIndex =0 + for k=1,#self.card_list do + local card_view= self.card_list[k] + card_view.btn_card:GetController("mark_ting").selectedIndex = 0 + + end + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/Protocol.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/Protocol.lua new file mode 100644 index 00000000..cf0df3be --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/Protocol.lua @@ -0,0 +1,55 @@ +local Protocol = { + + + -- 出牌 + GAME_DIS_CARD = "611", + -- 提示选择行为 + GAME_ACTION = "612", + + -- 通知服务器手牌队形改变 + GAME_CHANGE_CARD = "613", + -- 通知服务器牌字体改变 + GAME_CHANGE_TYPEfACE = "615", + + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + + -- 出牌事件 + GAME_EVT_DISCARD = "812", + + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + + -- action 事件 + GAME_EVT_ACTION = "815", + + -- 胡牌事件 + GAME_EVT_HU = "816", + + -- 结算 + GAME_EVT_RESULT1 = "817", + + -- 弃牌 + GAME_EVT_QIPAI = "818", + + -- 抓牌 + GAME_EVT_DRAW = "819", + + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + --第二十一张牌 + GAME_EVT_ADD_CARD = "821", + + GAME_EVT_Send_Piao = "1015", + GAME_EVT_Piao_Tip = "2031", + GAME_EVT_Piao_Action = "2032", + + GAME_XIPAI = "20836", + GAME_EVENT_XIPAI = "20837", + GAME_EVENT_NOTIFY_XIPAI = "20838", +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/RunBeard_GameEvent.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/RunBeard_GameEvent.lua new file mode 100644 index 00000000..3af8734d --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/RunBeard_GameEvent.lua @@ -0,0 +1,41 @@ + +local RunBeard_GameEvent = { + -- 换座 + + -- 发牌 + SendCards = "SendCards", + + -- 胡牌 + ZPHuCard = "ZPHuCard", + -- 结算事件 + ZPResult1 = "ZPResult1", + -- 大结算事件 + ZPResult2 = "ZPResult2", + + + EventDicelCard ="EventDicelCard", + OnEventTake = "OnEventTake", + + OnEcentRecond = "OnEcentRecond", + + EventTurn = "EventTurn", + + OutHint = "OutHint", + + + GetCard = "GetCard", + + OutCard = "OutCard", + + FangziAction = "FangziAction", + + FZTips = "FZTips", + QiCard = "QiCard", + AddCard = "AddCard", + + OnPiaoTips="OnPiaoTips", + OnPiaoAction="OnPiaoAction", + EventXiPai="EventXiPai", + +} +return RunBeard_GameEvent diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/RunBeard_ResultView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/RunBeard_ResultView.lua new file mode 100644 index 00000000..5312e8e3 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/RunBeard_ResultView.lua @@ -0,0 +1,820 @@ +require('Game.View.ResultView') +local PendulumRule = import('.main.PendulumRule') +local RunBeard_ResultView = {} + +local M = RunBeard_ResultView + +function RunBeard_ResultView.new(blur_view, index) + setmetatable(M, {__index = ResultView}) + local self = setmetatable({}, {__index = M}) + self.class = 'RunBeard_ResultView' + self._currenIndex = 0 + if index ~= 1 then + self._blur_view = blur_view + end + self._close_zone = false + + self:init('ui://Extend_Poker_YueYangWHZ/clearing') + self.xiPaiCtr=self._view:GetController("xipai") + return self +end + +function M:init(url) + ResultView.init(self, url) + local btn_share = self._view:GetChild('btn_share') + btn_share.onClick:Set( + function() + ShareScreenShot() + end + ) +end + +function M:InitData(over, room, result, total_result, callback) + local _overCtr = self._view:GetController('over') + local btn_confirm = self._view:GetChild('btn_confirm') + local btn_result = self._view:GetChild('btn_showResult') + local _btnCtr = self._view:GetController('button') + local _sdkCtr = self._view:GetController('sdk') + local _icon = self._view:GetChild('win_base') + local btn_close = self._view:GetChild('btn_close') + self._view:GetChild('tex_roomnum').text = room.room_id + self._view:GetChild('tex_data').text = os.date('%Y-%m-%d %H:%M', os.time()) + + + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig and round>1 then + self.xiPaiCtr.selectedIndex=1 + else + self.xiPaiCtr.selectedIndex=0 + end + + local xipai=self._view:GetChild("btn_xipai") + xipai.touchable=true + xipai.onClick:Add(function() + local xiPaiCallBack=function () + xipai.touchable=false + self.xiPaiCtr.selectedIndex=0 + ViewUtil.ErrorTip(1000000,"申请洗牌成功") + end + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:SendXiPaiAction(xiPaiCallBack) + end) + if result and result.xipai_score then + --xipai.text="洗牌 积分x"..result.xipai_score + end + + + if result ~= nil and result.liuju == true then + _icon.icon = 'ui://Main_RunBeard/liuju' + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + _overCtr.selectedIndex = 2 + + if over ~= 1 then + btn_confirm.onClick:Add( + function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:Close() + + if callback then + callback() + end + end + ) + self:AddClearItem(room, result, nil, over) + return + else + self.xiPaiCtr.selectedIndex=0 + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + btn_result.onClick:Add( + function() + _overCtr.selectedIndex = 3 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + end + ) + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, result, total_result.info_list, over) + end + end + + if over == 0 and result.liuju == false then + _icon.icon = 'ui://Main_RunBeard/jiesuan' + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 1 + _overCtr.selectedIndex = 0 + btn_confirm.onClick:Add( + function() + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:PlayerReady() + self:Close() + + if callback then + callback() + end + end + ) + self:AddClearItem(room, result, nil, over) + elseif over == 1 and result.liuju == false then + _icon.icon = 'ui://Main_RunBeard/jiesuan' + _btnCtr.selectedIndex = 1 + _sdkCtr.selectedIndex = 1 + _overCtr.selectedIndex = 0 + btn_result.onClick:Add( + function() + _overCtr.selectedIndex = 3 + _btnCtr.selectedIndex = 0 + _sdkCtr.selectedIndex = 0 + end + ) + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, result, total_result.info_list, over) + else + if result ~= nil then + if result.liuju == false then + _icon.icon = 'ui://Main_RunBeard/jiesuan' + over = 2 + _overCtr.selectedIndex = 3 + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, nil, total_result.info_list, over) + end + else + _icon.icon = 'ui://Main_RunBeard/jiesuan' + over = 2 + _overCtr.selectedIndex = 3 + self.xiPaiCtr.selectedIndex=0 + btn_close.onClick:Add( + function() + ViewManager.ChangeView(ViewManager.View_Lobby) + end + ) + self:AddClearItem(room, nil, total_result.info_list, over) + end + end +end + +function M:AddClearItem(room, data, total_data, over) + local n = over + 1 + local list_view1 = self._view:GetChild('player_list') + local list_view2 = self._view:GetChild('player_list_2') + + if data ~= nil and data.liuju == true then + self:FillLiuJuItemData(room, data) + if over == 1 then + self:FillItemData2(room, total_data, list_view2) + end + else + if 0 == over or 1 == over and data.liuju == false then + self:FillItemData(room, data, list_view1) + if 1 == over then + self:FillItemData2(room, total_data, list_view2) + end + elseif 2 == over then + self:FillItemData2(room, total_data, list_view2) + end + end +end + +function M:GetPos(room, seat) + return ViewUtil.GetPos(room.self_player.seat, seat, room.room_config.people_num) +end +function M:FillLiuJuItemData(room, data) + local qipai_list = self._view:GetChild('qipai_listl') + local _dipaiC = self._view:GetController('qipai') + qipai_list:RemoveChildrenToPool() + if data.throw_card ~= nil and #data.throw_card > 0 then + _dipaiC.selectedIndex = 1 + local hand_card = PendulumRule.GetHandCard(data.throw_card, 3) + for k = 1, #hand_card do + local cards = qipai_list:AddItemFromPool() + for j = 1, #hand_card[k] do + cards:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + else + _dipaiC.selectedIndex = 0 + end + for i = 1, #data.info_list do + if data.info_list[i].seat ~= room.self_player.seat and #data.info_list[i].hand_card > 0 then + local card_list + if #data.info_list == 2 then + card_list = self._view:GetChild('card_list_2') + else + if self:GetPos(room, data.info_list[i].seat) == 2 then + card_list = self._view:GetChild('card_list_1') + else + card_list = self._view:GetChild('card_list_3') + end + end + + card_list:RemoveChildrenToPool() + for k = 1, #data.info_list[i].opCardList do + local fztype = data.info_list[i].opCardList[k].type + if fztype == RB_FZType.Kan then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', data.info_list[i].opCardList[k].card1) + end + end + end + local hand_card = PendulumRule.GetHandCard(data.info_list[i].hand_card, 3) + for k = 1, #hand_card do + local item = card_list:AddItemFromPool() + for j = 1, #hand_card[k] do + item:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + end + end +end + +local haoNameList={"散毫","清溜","内毫","外毫"} +local huxiList={40,30,20,10} +function M:FillItemData(room, data, item) + local dipai_list = self._view:GetChild('dipai_list') + dipai_list:RemoveChildren(0, -1, true) + if data.left_card ~= nil and #data.left_card > 0 then + for i = 1, #data.left_card do + local dipais = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Qipai') + dipais:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/202_', data.left_card[i]) + dipai_list:AddChild(dipais) + end + end + local qipai_list = self._view:GetChild('qipai_list') + local _dipaiC = self._view:GetController('qipai') + qipai_list:RemoveChildrenToPool() + if data.throw_card ~= nil and #data.throw_card > 0 then + _dipaiC.selectedIndex = 1 + local hand_card = PendulumRule.GetHandCard(data.throw_card, 3) + for k = 1, #hand_card do + local cards = qipai_list:AddItemFromPool() + for j = 1, #hand_card[k] do + cards:GetChild('card_' .. (j)).icon = self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + else + _dipaiC.selectedIndex = 0 + end + local info_list = data.info_list + local Yes_win = false + local win_data = {} + for i = 1, #info_list do + if info_list[i].is_win == true then + Yes_win = true + win_data = info_list[i] + end + end + --printlog("win_data===>>>") + --pt(win_data) + if win_data.seat == room.self_player.seat then + self._view:GetChild('show_win').visible = true + self._view:GetChild('show_low').visible = false + else + self._view:GetChild('show_win').visible = false + self._view:GetChild('show_low').visible = true + end + + if Yes_win == true then + local isWin_Card = true + local p = room:GetPlayerBySeat(win_data.seat) + if p.self_user.account_id == room.owner_id then + self._view:GetController('owner').selectedIndex = 1 + end + if p.seat == room.banker_seat then + self._view:GetController('bank').selectedIndex = 1 + end + self._view:GetChild('WinerName').text = p.self_user.nick_name + --self._view:GetChild('chongtunshu').text = '充囤:' .. room.room_config.tun .. ' 囤' + self._view:GetChild('huxi').text = '胡息:' .. win_data.hu_xi + --self._view:GetChild('tunshu').text = '基础囤数:' .. win_data.tun + --self._view:GetChild('zongtunshu').text = '总囤数:' .. win_data.total_tun + if win_data.round_score >= 0 then + self._view:GetChild('score').text = '游戏分:+' .. win_data.round_score + self._view:GetChild('score').grayed = false + else + self._view:GetChild('score').text = '游戏分:' .. win_data.round_score + self._view:GetChild('score').grayed = true + end + local hp_info = win_data.hp_info + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值 + self._view:GetChild('tili_score').visible = true + self._view:GetChild('tili_title').visible = true + if (round_actual_hp > 0) then + self._view:GetChild('tili_score').text = '积分:+' .. round_actual_hp + self._view:GetChild('tili_score').grayed = false + else + self._view:GetChild('tili_score').text = '积分:' .. round_actual_hp + self._view:GetChild('tili_score').grayed = true + end + end + + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限 + if (isupper_limit) then + self._view:GetChild('yidashangxian').text = '已达上限' + else + self._view:GetChild('yidashangxian').text = '' + end + end + + local btn_head = self._view:GetChild('btn_head') + ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) + local fullname_list = self._view:GetChild('fullname_list') + fullname_list:RemoveChildren(0, -1, true) + if win_data.mingtang ~= nil and #win_data.mingtang > 0 then + for i = 1, #win_data.mingtang do + local dipais = UIPackage.CreateObjectFromURL('ui://Extend_Poker_YueYangWHZ/FullName') + dipais:GetChild('n0').icon = 'ui://Extend_Poker_YueYangWHZ/hu_' .. win_data.mingtang[i].mingtang + --[[if win_data.mingtang[i].type == 1 and win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 番' + elseif win_data.mingtang[i].type == 2 and win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 囤' + elseif win_data.mingtang[i].type == 3 and win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. ' 倍' + end--]] + if win_data.mingtang[i].score ~= 0 then + dipais:GetChild('n2').text = win_data.mingtang[i].score .. '胡息' + end + fullname_list:AddChild(dipais) + end + end + local card_list = self._view:GetChild('card_list') + card_list:RemoveChildrenToPool() + if #win_data.cardList > 0 then + for i = 1, #win_data.cardList do + -- 1 是对子 2 是三个的 + local fztype = win_data.cardList[i].type + if fztype == 1 then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '将' + cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi + cards:GetController('c1').selectedIndex = 0 + if win_data.cardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi+1 + end + for j = 1, 2 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i]['card'..j]) + end + else + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '顺' + if + win_data.cardList[i].card1 == win_data.cardList[i].card2 and + win_data.cardList[i].card1 == win_data.cardList[i].card3 + then + cards:GetChild('card_type').text = '碰' + end + cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card1) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card2) + cards:GetChild('card_3').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.cardList[i].card3) + if isWin_Card == true then + if win_data.cardList[i].card1 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi+1 + elseif win_data.cardList[i].card2 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 2 + cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi+1 + elseif win_data.cardList[i].card3 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 3 + cards:GetChild('card_huxi').text = win_data.cardList[i].hu_xi+1 + end + + end + end + end + end + for i = 1, #win_data.opCardList do + local fztype = win_data.opCardList[i].type + if fztype == RB_FZType.Chi then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '顺' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card2) + cards:GetChild('card_3').icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card3) + --[[if isWin_Card == true then + if win_data.opCardList[i].card1 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1 + elseif win_data.opCardList[i].card2 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 2 + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1 + elseif win_data.opCardList[i].card3 == win_data.win_card then + isWin_Card = false + cards:GetController('hu').selectedIndex = 3 + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1 + end + + end--]] + elseif fztype == RB_FZType.Peng then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '碰' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + --[[if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1 + end--]] + elseif fztype == RB_FZType.Kan then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '坎' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + --[[if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1 + end--]] + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + elseif fztype == RB_FZType.Wei or fztype == RB_FZType.ChouWei then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '歪' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 1 + --[[ if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1 + end--]] + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + elseif fztype == RB_FZType.Pao then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '跑' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 2 + --[[if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1 + end--]] + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + elseif fztype == RB_FZType.Ti then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '溜' + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi + cards:GetController('c1').selectedIndex = 2 + --[[if win_data.opCardList[i].card1 == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = 1 + cards:GetChild('card_huxi').text = win_data.opCardList[i].hu_xi+1 + end--]] + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.opCardList[i].card1) + end + end + end + + if #win_data.hand_card > 0 then + for i = 1, #win_data.hand_card, 4 do + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = '散' + cards:GetChild('card_huxi').text = 0 + cards:GetController('c1').selectedIndex = 2 + for j = 0, 3 do + if (i + j) <= #win_data.hand_card then + cards:GetChild('card_' .. (j + 1)).icon = + self:getCardItem('ui://Main_RunBeard/201_', win_data.hand_card[i + j]) + if win_data.hand_card[i + j] == win_data.win_card and isWin_Card == true then + isWin_Card = false + cards:GetController('hu').selectedIndex = j + 1 + cards:GetChild('card_huxi').text = 1 + end + end + end + end + end + + + if win_data.haoList and #win_data.haoList then + local tempHaoList={} + for i=1,#win_data.haoList do + if win_data.haoList[i].hao>0 then + if tempHaoList[win_data.haoList[i].hao]==nil then + tempHaoList[win_data.haoList[i].hao]={} + end + table.insert(tempHaoList[win_data.haoList[i].hao],win_data.haoList[i]) + + end + end + + + for k,v in pairs(tempHaoList) do + local count=#v + printlog(count) + if count<5 then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_type').text = haoNameList[tonumber(k)] + local haoNum=huxiList[tonumber(k)] + if DataManager.CurrenRoom.room_config.config.hao_config and DataManager.CurrenRoom.room_config.config.hao_config==1 then + haoNum=(haoNum+10)*count + else + haoNum=(haoNum)*count + end + cards:GetChild('card_huxi').text = haoNum + cards:GetController('c1').selectedIndex = 2 + for i=1,count do + cards:GetChild('card_' .. i).icon = + self:getCardItem('ui://Main_RunBeard/201_', v[i].hao_card) + end + + + end + end + + + + end + + end + + item:RemoveChildrenToPool() + for i = 1, #info_list do + if info_list[i].is_win == false then + local player = item:AddItemFromPool() + local p = room:GetPlayerBySeat(info_list[i].seat) + if p.self_user.account_id == room.owner_id then + player:GetController('owner').selectedIndex = 1 + end + if p.seat == room.banker_seat then + player:GetController('bank').selectedIndex = 1 + end + local btn_head = player:GetChild('btn_head') + ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) + player:GetChild('playerName').text = p.self_user.nick_name + if info_list[i].round_score >= 0 then + player:GetChild('score').text = '+' .. info_list[i].round_score + player:GetChild('score').grayed = false + else + player:GetChild('score').text = info_list[i].round_score + player:GetChild('score').grayed = true + end + local hp_info = info_list[i].hp_info + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值 + player:GetChild('tili_score').visible = true + player:GetChild('tili_title').visible = true + if (round_actual_hp > 0) then + player:GetChild('tili_score').text = '+' .. round_actual_hp + player:GetChild('tili_score').grayed = false + else + player:GetChild('tili_score').text = '' .. round_actual_hp + player:GetChild('tili_score').grayed = true + end + end + if (hp_info ~= nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限 + if (isupper_limit) then + player:GetChild('yidashangxian').text = '已达上限' + else + player:GetChild('yidashangxian').text = '' + end + end + local card_list = player:GetChild('card_list') + card_list:RemoveChildrenToPool() + for k = 1, #info_list[i].opCardList do + local fztype = info_list[i].opCardList[k].type + if fztype == RB_FZType.Chi then + local cards = card_list:AddItemFromPool() + cards:GetChild('card_1').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + cards:GetChild('card_2').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card2) + cards:GetChild('card_3').icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card3) + elseif fztype == RB_FZType.Peng then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Kan then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Wei or fztype == RB_FZType.ChouWei then + local cards = card_list:AddItemFromPool() + for j = 1, 3 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Pao then + local cards = card_list:AddItemFromPool() + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + elseif fztype == RB_FZType.Ti then + local cards = card_list:AddItemFromPool() + for j = 1, 4 do + cards:GetChild('card_' .. j).icon = + self:getCardItem('ui://Main_RunBeard/202_', info_list[i].opCardList[k].card1) + end + end + end + if #info_list[i].hand_card > 0 then + local hand_card = PendulumRule.GetHandCard(info_list[i].hand_card, 3) + for k = 1, #hand_card do + local cards = card_list:AddItemFromPool() + for j = 1, #hand_card[k] do + cards:GetChild('card_' .. (j)).icon = + self:getCardItem('ui://Main_RunBeard/202_', hand_card[k][j]) + end + end + end + end + end +end + +function M:FillItemData2(room, data, list) + -- 赋值result_info,聊天室分享需要 + local player_list = {} + for i = 1, #data do + player_list[i] = {} + local user = room:GetPlayerBySeat(data[i].seat).self_user + local p = room:GetPlayerBySeat(data[i].seat) + player_list[i].id = user.account_id + local total_score = data[i].total_score + player_list[i].hp_info = data[i].hp_info + player_list[i].score = total_score + player_list[i].house = room.owner_id == player_list[i].id and 1 or 0 + player_list[i].nick = user.nick_name + player_list[i].head_url = user.head_url + local entrust = data[i].entrust + if entrust == nil then + entrust = false + end + player_list[i].entrust = entrust + player_list[i].param = {} + local wcount = 0 + if (data[i].win_count ~= nil) then + wcount = data[i].win_count + end + local hxcount = 0 + if (data[i].total_huxi ~= nil) then + hxcount = data[i].total_huxi + end + player_list[i].param[1] = {} + player_list[i].param[1].key = '胡牌次数:' + player_list[i].param[1].value = tostring(wcount) + player_list[i].param[2] = {} + player_list[i].param[2].key = '胡息总数:' + player_list[i].param[2].value = tostring(hxcount) + end + local round = room.room_config.round + self:GenerateRoomResultInfo(round, room.room_config:GetGameName(), room.room_id, room.create_time, player_list) + self:SetGSListlineGap(5) + self:InitBigResult(room, 26) + DataManager.CurrenRoom = nil + -- list:RemoveChildrenToPool() + -- for i =1, #data do + -- local total_score = room:GetTotalScore(data[i].total_score) + -- local item = list:AddItemFromPool() + -- local p = room:GetPlayerBySeat(data[i].seat) + -- if p.self_user.account_id == room.owner_id then + -- item:GetController("owner").selectedIndex = 1 + -- end + + -- local btn_head = item:GetChild("btn_head") + -- ImageLoad.Load(p.self_user.head_url, btn_head._iconObject) + -- item:GetChild("win_count").text = "胡牌次数:"..data[i].win_count.."次" + -- item:GetChild("total_huxi").text = "胡息总数:"..data[i].total_huxi + -- --点赞 + -- self:Click_zan(item, p.self_user.account_id) + + -- item:GetChild("name").text = p.self_user.nick_name + + -- local hp_info = data[i].hp_info + -- if(hp_info ~=nil and room.hpOnOff == 1 or room:checkHpNonnegative()) then + -- -- --体力值 + -- -- local round_actual_hp = d2ad(hp_info.round_actual_hp) --// 本局实际输赢体力值 + -- local isupper_limit = hp_info.upper_limit -- // 输赢是否已达上限 + -- if(isupper_limit)then + -- item:GetChild("yidashangxian").text = "已达上限" + -- else + -- item:GetChild("yidashangxian").text = "" + -- end + -- end + -- local x = room:GetOriginScore(total_score) + -- if total_score >= 0 then + -- item:GetChild("score").text = "+"..x + -- item:GetChild("score").grayed = false + -- else + -- item:GetChild("score").text = x + -- item:GetChild("score").grayed = true + -- end + -- if room.hpOnOff == 1 and room.score_times ~= 1 or room:checkHpNonnegative() then + -- item:GetController("bei") .selectedIndex=1 + -- item:GetChild("sss").text = room.score_times + -- if(hp_info ~= nil)then + -- local round_actual_hp = d2ad(hp_info.total_hp) --// 本局实际输赢体力值 + -- total_score = round_actual_hp + -- end + -- if total_score >= 0 then + -- item:GetChild("score1").text = "+"..total_score + -- item:GetChild("score1").grayed = false + -- else + -- item:GetChild("score1").text = total_score + -- item:GetChild("score1").grayed = true + -- end + -- end + -- if #data ==3 then + -- if i ==1 then + -- if total_score >data[2].total_score and total_score >data[3].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- elseif i ==2 then + -- if total_score >data[1].total_score and total_score >data[3].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- elseif i ==3 then + -- if total_score >data[2].total_score and total_score >data[1].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- end + -- else + -- if i ==1 then + -- if total_score >data[2].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- elseif i ==2 then + -- if total_score >data[1].total_score then + -- item:GetController("winer") .selectedIndex=1 + -- end + -- end + + -- end + -- end + + -- DataManager.CurrenRoom = nil +end + +function M:LoadHead(p, room) + local btn_head = self._view:GetChild('btn_head') + for i = 1, #room.player_list do + local player = room.player_list[i] + if p.seat == player.seat and player.self_user.head_url ~= '' then + ImageLoad.Load(player.self_user.head_url, btn_head.icon) + end + end +end +function M:getCardItem(card_1, card_2) + local _room = DataManager.CurrenRoom + if _room ~= nil and _room.change_card_display ~= nil then + return card_1 .. _room.change_card_display .. card_2 + else + return card_1 .. '2_' .. card_2 + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/CardCheck.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/CardCheck.lua new file mode 100644 index 00000000..2757ceba --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/CardCheck.lua @@ -0,0 +1,635 @@ +-- 检测牌是否存在 +local function checkCard(eventCard, cardList, num) + if num == nil then + num = 1 + end + local result = 0 + for i = 1, #cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if (result == num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card, count) + for i = 1, count do + list_remove(cardList, card) + end +end + +local function checkCardAndRomve(eventCard, cardList, num) + if (checkCard(eventCard, cardList, num)) then + removeCard(cardList, eventCard, num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard, cardList) + local result = 0 + for i = 1, #cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + stackHuxi = nil +} + +function M:push(cardGroup) + self.stack[#self.stack + 1] = cardGroup +end +function M:pushhuxi(cardGroup) + self.stackHuxi[#self.stackHuxi + 1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack, #self.stack) + for _, card in ipairs(cardGroup) do + self.cardList[#self.cardList + 1] = card + end + table.sort(self.cardList) +end +-- 顺子 +function M:tryShunzi1(card, player) + if card < 300 and card % 100 > 8 then + return false + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + removeCard(self.cardList, card, 1) + local cardGroup = {card, card + 1, card + 2} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + return true + end + return false +end + + +-- 2 7 10 +function M:tryShunzi3(card, player) + if card % 100 == 2 then + if (checkCard(card + 5, self.cardList, 1)) and (checkCard(card + 8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 5, 1) + removeCard(self.cardList, card + 8, 1) + local cardGroup = {card, card + 5, card + 8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + return true + end + end + return false +end + + +-- 坎 +function M:tryKezi(card, player) + if (checkCard(card, self.cardList, 3)) then + removeCard(self.cardList, card, 3) + local cardGroup = {card, card, card} + self:push(cardGroup) + local _huxi = 1 + if self.drawCard~=card then + --printlog("tryKezi====>>>",self.drawCard,card) + _huxi = 3 + end + self:pushhuxi(_huxi) + return true + end + return false +end + + + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (checkCard(card, self.cardList, 2)) then + removeCard(self.cardList, card, 2) + local cardGroup = {card, card} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + elseif (checkCard(card, self.cardList, 1)) then + if card % 100 <=9 then + if (checkCard(card+1, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+1, 1) + local cardGroup = {card, card+1} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + end + + if card % 100 <=8 then + if (checkCard(card+2, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+2, 1) + local cardGroup = {card, card+2} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + end + + if card % 100 >=2 then + if (checkCard(card-1, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-1, 1) + local cardGroup = {card, card-1} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + end + + if card % 100 >=3 then + if (checkCard(card-2, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-2, 1) + local cardGroup = {card, card-2} + self:push(cardGroup) + local _huxi = 0 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + end + + if card % 100 ==2 then + if (checkCard(card+5, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+5, 1) + local cardGroup = {card, card+5} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card+8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+8, 1) + local cardGroup = {card, card+8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + + if card % 100 ==7 then + if (checkCard(card-5, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-5, 1) + local cardGroup = {card, card-5} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card+3, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+3, 1) + local cardGroup = {card, card+3} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + if card % 100 ==10 then + if (checkCard(card-8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-8, 1) + local cardGroup = {card, card-8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card-3, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-3, 1) + local cardGroup = {card, card-3} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + + end + + return false +end + + +function M:tryPair2(card) + if (self.pair_count > 0) then + return false + end + + if (checkCard(card, self.cardList, 1)) then + if card % 100 ==2 then + if (checkCard(card+5, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+5, 1) + local cardGroup = {card, card+5} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card+8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+8, 1) + local cardGroup = {card, card+8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + + if card % 100 ==7 then + if (checkCard(card-5, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-5, 1) + local cardGroup = {card, card-5} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card+3, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card+3, 1) + local cardGroup = {card, card+3} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + if card % 100 ==10 then + if (checkCard(card-8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-8, 1) + local cardGroup = {card, card-8} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + if (checkCard(card-3, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card-3, 1) + local cardGroup = {card, card-3} + self:push(cardGroup) + local _huxi = 1 + self:pushhuxi(_huxi) + self.pair_count = 1 + return true + end + + + end + + + end + + return false +end + + + +function M:tryWin(player) + + if #self.cardList == 0 then + if (self.pair_count == 1) then + return true + elseif self.pair_count == 2 and #self.stack==2 then + local tempPList={} + for i=1,#self.stack do + local card1=self.stack[i][1] + local card2=self.stack[i][2] + table.insert(tempPList,card1) + table.insert(tempPList,card2) + end + + if #tempPList~=4 then return false end + + table.sort(tempPList) + + if tempPList[1]==tempPList[2]+1 and tempPList[2]==tempPList[3]+1 and tempPList[3]==tempPList[4]+1 then + return true + end + + end + + return false + end + + + local activeCard = 0 + for i = 1, #self.cardList do + if (self.cardList[i] == 201 or self.cardList[i] == 202) then + activeCard = self.cardList[i] + break + end + end + if (activeCard == 0) then + activeCard = self.cardList[1] + end + + if (activeCard % 100 == 1) then + if self:tryShunzi1(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + if self:tryKezi(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair2(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + elseif activeCard % 100 == 2 then + if self:tryShunzi3(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + if self:tryKezi(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair2(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryShunzi1(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + else + if self:tryKezi(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + if self:tryPair2(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + + + if self:tryShunzi1(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + end + return false +end + +local function init(self, player, cardInhand, addCard) + self.stack = {} + self.stackHuxi = {} + self.pair_count = 0 + self.kong_count = 0 + self.drawCard=0 + self.cardList = membe_clone(cardInhand) + if addCard == nil then + self.kong_count = 1 + else + self.kong_count = 0 + self.cardList[#self.cardList + 1] = addCard + self.drawCard=addCard + end + table.sort(self.cardList) + return self:tryWin(player) +end + +function M.tingPai(player, room) + local self = setmetatable({}, {__index = M}) + local tingList = {} + local cardInhand = player.handcard_list + if not cardInhand or #cardInhand == 0 then + return tingList + end + local kan_huxi = 0 + local kan_cards = {} + for j = 1, #player.fz_list do + for i = 1, #cardInhand do + if cardInhand[i] == player.fz_list[j].active_card and player.fz_list[j].type == 3 then + kan_cards[#kan_cards + 1] = cardInhand[i] + break + end + end + end + if #kan_cards > 0 then + for i = 1, #kan_cards do + kan_huxi = kan_huxi + 3 + removeCard(cardInhand, kan_cards[i], 3) + end + end + player.tiCount = 0 + player.paoCount = 0 + + + for k = 100, 200, 100 do + for i = 1, 10 do + local tem = k + i + local result = init(self, player, cardInhand, tem) + if result then + --printlog("是否胡牌===>>>",tem) + end + + local num = 0 + for k = 1, #self.stackHuxi do + num = num + self.stackHuxi[k] + end + + if result then + local num1 = 0 + --pt(self.stackHuxi) + for k = 1, #self.stackHuxi do + num1 = num1 + self.stackHuxi[k] + --printlog(self.stackHuxi[k]) + end + --printlog("胡息数量===>>>",player.hu_xi,num1,kan_huxi) + if (player.hu_xi + num1 + kan_huxi) >= (self:getHuxi(room)-1) then + tingList[#tingList + 1] = tem + end + end + + + + end + end + return tingList +end + +function M:getHuxi(room) + if room.game_id == 301 then + return 8 + end + if room.game_id == 13 or room.game_id == 14 or room.game_id == 23 then + return 15 + elseif room.game_id == 26 then + return 10 + elseif room.game_id == 29 then + if room.room_config.maxPlayers == 3 then + return 15 + else + return 9 + end + end +end + +function M:GetFzData(tem, ctype) + local huxi + + if ctype == 1 then + huxi=1 + elseif ctype == 2 then + huxi=1 + elseif ctype == 3 then + huxi = 3 + elseif ctype == 4 then + huxi = 3 + elseif ctype == 5 then + huxi = 3 + elseif ctype == 7 then + huxi = 5 + end + return huxi +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/FZData.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/FZData.lua new file mode 100644 index 00000000..e5bb09cd --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/FZData.lua @@ -0,0 +1,45 @@ +RB_FZType = +{ + Chi = 1, + Peng = 2, + Kan = 3, + Wei = 4, + ChouWei=5, + Pao = 6, + Ti = 7, + HU = 8, + Bi = 9, + PengPao =10, + WeiPao =11, + WeiTi =12, + KanTi =13, + DuiZi = 14, + zhao = 15, +} + +local FZTipList = { + tip_map_id = nil, + tip_map_type = nil +} + +local M = FZTipList + +function M.new() + local self = {} + setmetatable(self,{__index = FZTipList}) + self.tip_map_id = {} + self.tip_map_type = {} + return self +end + +function M:AddTip(tip) + self.tip_map_id[tip.id] = tip + local tiplist = self.tip_map_type[tip.weight] + if not tiplist then + tiplist = {} + self.tip_map_type[tip.weight] = tiplist + end + tiplist[#tiplist+1] = tip +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/HuTipView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/HuTipView.lua new file mode 100644 index 00000000..d6e6e97b --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/HuTipView.lua @@ -0,0 +1,69 @@ +local HuTipView = { + _view_start_pos = nil, + _touch_start_pos = nil, +} + +local M = HuTipView + +function M.new(main_view) + local self = {} + self.class = "HuTipView" + setmetatable(self,{__index = HuTipView}) + self._main_view = main_view + self:init() + return self +end + +local function SetObjEnabled(obj, enabled) + obj.visible = enabled + obj.touchable = enabled +end +function M:OnTouchBegin(context) + self._view_start_pos = Vector2(self._view.x, self._view.y) + self._touch_start_pos = self._main_view._view:GlobalToLocal(Vector2(context.inputEvent.x, context.inputEvent.y)) +end +function M:OnTouchMove(context) + local xy = self._main_view._view:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + local dist = Vector2(xy.x - self._touch_start_pos.x, xy.y - self._touch_start_pos.y) + local posx = self._view_start_pos.x + dist.x + local posy = self._view_start_pos.y + dist.y + local max_x = self._main_view._view.width - self._view.width + local max_y = self._main_view._view.height - self._view.height + self._view.x = posx < 0 and 0 or posx > max_x and max_x or posx + self._view.y = posy < 0 and 0 or posy > max_y and max_y or posy +end + +function M:init() + self._view = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Hu_Tip") + self._main_view._view:AddChild(self._view) + local width = self._view.width + local m_width = self._main_view._view.width + local m_height = self._main_view._view.height + -- self._view.x = 0.5 * m_width - 0.5 * width + self._view.x = 0 + self._view.y = 0.7 * m_height + SetObjEnabled(self._view, false) + self._view.onTouchBegin:Add(handler(self, self.OnTouchBegin)) + self._view.onTouchMove:Add(handler(self, self.OnTouchMove)) +end + +function M:FillData(cards) + local lst_card = self._view:GetChild("tingpai") + lst_card:RemoveChildrenToPool() + local num = #cards + if num > 0 then + if num > 4 and num < 28 then + self._view.width = 191 + ((num > 4 and 6 or num) - 3) * 38 + self._view.height = 69 + (math.ceil(num / 5) - 1) * 56 + end + for i = 1, num do + local item = lst_card:AddItemFromPool() + item:GetChild("icon").icon = "ui://Main_RunBeard/202_1_" .. cards[i] + end + SetObjEnabled(self._view, true) + else + SetObjEnabled(self._view, false) + end +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/PendulumRule.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/PendulumRule.lua new file mode 100644 index 00000000..8f6b21cc --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/PendulumRule.lua @@ -0,0 +1,1177 @@ + +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + if num ==nil then + num =1 + end + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + end + end + if(result ==num) then + return true + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local M = { + cardList = nil, + stack = nil, +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + self.cardList[#self.cardList + 1] = card + end + table.sort(self.cardList) +end + +function M:tryShunzi1(card,type1 ) + if card < 300 and card % 100 > 8 then + return false + end + if (checkCard(card, self.cardList)) and (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card+1,1) + removeCard(self.cardList,card+2,1) + removeCard(self.cardList,card,1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end +function M:tryShunzi2( card ,type1) + if card -card%100 == 100 then + if self:tryShunzi1(card+100,0) or self:tryShunzi3(card+100,0) then + return false + end + if checkCard(card+100,self.cardList,1) and checkCard(card,self.cardList,2) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,2) + removeCard(self.cardList,card+100,1) + local cardGroup = {card,card,card+100} + self:push(cardGroup) + return true + end + if (checkCard(card+100,self.cardList,2)) and (checkCard(card,self.cardList,1)) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+100,2) + local cardGroup = {card+100,card+100,card} + self:push(cardGroup) + return true + end + else + if self:tryShunzi1(card-100) or self:tryShunzi3(card-100) then + return false + end + if (checkCard(card-100,self.cardList,1)) and checkCard(card,self.cardList,2) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,2) + removeCard(self.cardList,card-100,1) + local cardGroup = {card,card,card-100} + self:push(cardGroup) + return true + end + if (checkCard(card-100,self.cardList,2)) and checkCard(card,self.cardList,1) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card-100,2) + local cardGroup = {card-100,card-100,card} + self:push(cardGroup) + return true + end + end + return false +end +function M:tryShunzi3( card,type1 ) + if card % 100 == 2 then + if (checkCard(card, self.cardList, 1)) and (checkCard(card+5, self.cardList, 1)) and (checkCard(card+8, self.cardList, 1)) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+5,1) + removeCard(self.cardList,card+8,1) + local cardGroup = {card,card+5,card+8} + self:push(cardGroup) + return true + + end + return false + end + return false +end + +function M:tryKezi(card) + if (checkCard(card, self.cardList, 3)) then + removeCard(self.cardList,card,3) + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryTi(card) + if (checkCard(card, self.cardList, 4)) then + removeCard(self.cardList,card,4) + local cardGroup = {card,card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (checkCard(card, self.cardList, 2)) then + removeCard(self.cardList,card,2) + local cardGroup = {card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryShunzi4( card ) + if card -card%100 == 100 then + if self:tryShunzi1(card+100,0) or self:tryShunzi3(card+100,0) or self:tryShunzi5(card+100,0) then + return false + end + if checkCard(card+100,self.cardList,1) and checkCard(card,self.cardList,1) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+100,1) + local cardGroup = {card,card+100} + self:push(cardGroup) + return true + end + if (checkCard(card+100,self.cardList,1)) and (checkCard(card,self.cardList,1)) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+100,1) + local cardGroup = {card,card+100} + self:push(cardGroup) + return true + end + else + if self:tryShunzi1(card-100,0) or self:tryShunzi3(card-100,0) or self:tryShunzi5(card-100,0) then + return false + end + if (checkCard(card-100,self.cardList,1)) and checkCard(card,self.cardList,1) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card-100,1) + local cardGroup = {card-100,card} + self:push(cardGroup) + return true + end + if (checkCard(card-100,self.cardList,1)) and checkCard(card,self.cardList,1) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card-100,1) + local cardGroup = {card,card-100} + self:push(cardGroup) + return true + end + end + return false +end +function M:tryShunzi5( card ,type1) + if card % 100 == 2 then + if (checkCard(card, self.cardList, 1)) and (checkCard(card+5, self.cardList, 1)) then + if self:tryShunzi2(card+5,0) or self:tryShunzi1(card+5,0) then + return false + end + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+5,1) + local cardGroup = {card,card+5} + self:push(cardGroup) + return true + end + if (checkCard(card, self.cardList, 1)) and (checkCard(card+8, self.cardList, 1)) then + if self:tryShunzi2(card+8,0) or self:tryShunzi1(card+8,0) then + return false + end + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+8,1) + local cardGroup = {card,card+8} + self:push(cardGroup) + return true + end + elseif card % 100 == 7 then + if (checkCard(card, self.cardList, 1)) and (checkCard(card+3, self.cardList, 1)) then + if self:tryShunzi2(card+3,0) or self:tryShunzi1(card+3,0) then + return false + end + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+3,1) + local cardGroup = {card,card+3} + self:push(cardGroup) + return true + end + end + return false +end + +function M:tryMenzi1( card ) + + if (checkCard(card, self.cardList, 1)) and (checkCard(card+1, self.cardList, 1)) then + if self:tryShunzi2(card+1,0) or self:tryShunzi1(card+1,0) or self:tryShunzi3(card+1,0) then + return false + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+1,1) + local cardGroup = {card,card+1} + self:push(cardGroup) + return true + end + if (checkCard(card, self.cardList, 1)) and (checkCard(card+2, self.cardList, 1)) then + if self:tryShunzi2(card+2,0) or self:tryShunzi1(card+2,0) or self:tryShunzi3(card+2,0) then + return false + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+2,1) + local cardGroup = {card,card+2} + self:push(cardGroup) + return true + end + + return false +end + +function M:tryOneCard(card) + if (checkCard(card, self.cardList, 1)) then + removeCard(self.cardList,card,1) + local cardGroup = {card} + self:push(cardGroup) + return true + end + return false +end + -- 摆牌规则 先四后三 对子 顺子 单个 +function M:tryPendulumRule() + for i=1,10 do + for k=100,200,100 do + local tem = k + i + local x = true + if x and self:tryTi(tem) then + x =false + end + if x and self:tryKezi(tem) then + x =false + end + if x and self:tryShunzi2(tem) then + x =false + end + if x and self:tryPair(tem) then + x =false + end + if x and self:tryShunzi3(tem) then + x =false + end + if x and self:tryShunzi1(tem) then + x =false + end + if x and self:tryShunzi5(tem) then + x =false + end + if x and self:tryShunzi4(tem) then + x =false + end + if x and self:tryMenzi1(tem) then + x =false + end + if x and self:tryOneCard(tem) then + x =false + end + end + end + if #self.stack >10 then + --变成10列--这里牌多了也不会报错了 + local removeitem = 0 + local card = 0 + for i=#self.stack,1,-1 do + if #self.stack[i] == 1 and removeitem ==0 then + removeitem = i + card = self.stack[i][1] + list_remove(self.stack[i],self.stack[i][1]) + end + end + if card ~= 0 then + list_remove(self.stack,self.stack[removeitem]) + for i=#self.stack,1,-1 do + if #self.stack[i] >0 and #self.stack[i] <3 then + self.stack[i][#self.stack[i] +1] = card + break + end + end + end + end + return self.stack +end + + + + +--摆牌规则 优先胡息 +function M:tryPendulumRule2() + local card_count = #self.cardList + local cards_map = {} + local CountCards = {} + for i=1,#self.cardList do + CountCards[self.cardList[i]]= CountCards[self.cardList[i]] == nil and 1 or CountCards[self.cardList[i]] + 1 + end + --pt(self.cardList) + --printlog("摆牌规则 优先胡息====》》》") + --pt(CountCards) + + + --find4 + for k,v in pairs(CountCards) do + if (v == 4 and k<200) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3 and k<200) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2 and k<200) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + + + + + --find 小 2 7 10 + local counta = CountCards[102] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[110]~=nil and CountCards[102] >0 and CountCards[107] >0 and CountCards[110] >0 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cs[3]= 110 + cards_map[#cards_map+1] = cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 3 + end + end + end + + + --find 小 123 + local counta = CountCards[101] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[101]~=nil and CountCards[102]~=nil and CountCards[103]~=nil and CountCards[101] >0 and CountCards[102] >0 and CountCards[103] >0 then + local cs = {} + cs[1]= 101 + cs[2]= 102 + cs[3]= 103 + cards_map[#cards_map+1] = cs + CountCards[101] = CountCards[101]-1 + CountCards[102] = CountCards[102]-1 + CountCards[103] = CountCards[103]-1 + card_count = card_count - 3 + end + end + end + + + --find abc + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] == CountCards[i + 1] and CountCards[i] == CountCards[i + 2] then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + + + + + --find ab + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + + + + + --find 小 2 7 两个 + for i=101,110 do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[102] ==1 and CountCards[107] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[102]~=nil and CountCards[110]~=nil and CountCards[102] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[107]~=nil and CountCards[110]~=nil and CountCards[107] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 107 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + local tempCardList={} + for i = 101, 110 do + if CountCards[i]~=nil and (CountCards[i] == 1) then + table.insert(tempCardList,i) + CountCards[i]=CountCards[i]-1 + end + end + + + local cs={} + local count=1 + for i=1,#tempCardList do + --[[if i%3==1 then + cs[count]={} + end + + table.insert(cs[count],tempCardList[i]) + + if i%3==0 then + count=count+1 + end--]] + + local cst={} + table.insert(cst,tempCardList[i]) + table.insert(cs,cst) + + end + + for i=1 , #cs do + cards_map[#cards_map+1]=cs[i] + card_count =card_count- #cs[i] + end + + + ----------------------------- + --find4 + for k,v in pairs(CountCards) do + if (v == 4 and k>200) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3 and k>200) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2 and k>200) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + + --find 大 2 7 10 + local countA = CountCards[202] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[210]~=nil and CountCards[202] >0 and CountCards[207] >0 and CountCards[210] >0 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cs[3]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 3 + end + end + end + + --find 大 123 + local countA = CountCards[201] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[201]~=nil and CountCards[202]~=nil and CountCards[203]~=nil and CountCards[201] >0 and CountCards[202] >0 and CountCards[203] >0 then + local cs = {} + cs[1]= 201 + cs[2]= 202 + cs[3]= 203 + cards_map[#cards_map+1]=cs + CountCards[201] = CountCards[201]-1 + CountCards[202] = CountCards[202]-1 + CountCards[203] = CountCards[203]-1 + card_count = card_count - 3 + end + end + end + + --find ABC + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] == CountCards[i + 1] and CountCards[i] == CountCards[i + 2] then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + + --[[ --find AAa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] >= 2 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-3; + end + end + end + + --find Aa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] == 1 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 1; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-2 + end + end + end --]] + + --find AB + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + --find 大 2 7 两个 + for i=201,210 do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[202] ==1 and CountCards[207] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + card_count = card_count - 2 + end + end + + + for i=201,210 do + if CountCards[202]~=nil and CountCards[210]~=nil and CountCards[202] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + for i=201,210 do + if CountCards[207]~=nil and CountCards[210]~=nil and CountCards[207] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 207 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + + + -------------------- + + + + + local singleList = {} + --find else + for k,v in pairs(CountCards) do + if (v == 1) then + singleList[#singleList+1] = k + CountCards[k] = CountCards[k] -1 + + end + end + + for i=1,#singleList do + local cs={} + table.insert(cs,singleList[i]) + cards_map[#cards_map + 1]= cs + end + + --[[local index = 3 + for i=1,#singleList,index do + local cs ={} + cs[#cs+1] = singleList[i] + if i < #singleList then cs[#cs+1] = singleList[i+1] end + if i < #singleList - 1 then cs[#cs+1] = singleList[i+2] end + cards_map[#cards_map + 1]=cs + end--]] + --变成9列--这里牌多了也不会报错了 + --[[for i=9 ,1,-1 do + for j = #cards_map , 9,-1 do + if #cards_map[i] < 3 then + cards_map[i][#cards_map[i]+1] = cards_map[j][1] + list_remove(cards_map[j],cards_map[j][1]) + end + end + end--]] + + --pt(cards_map) + --printlog("11111111111111111111") + local mapCount=#cards_map + if mapCount>12 then + local tempCardMpList1={} + local tempCardMpList2={} + local tempCardMpList3={} + for i=1,mapCount do + if #cards_map[i]>=2 then + table.insert(tempCardMpList1,cards_map[i]) + else + if cards_map[i][1]<200 then + table.insert(tempCardMpList2,cards_map[i][1]) + elseif cards_map[i][1]>200 then + table.insert(tempCardMpList3,cards_map[i][1]) + end + end + end + + --pt(tempCardMpList1) + --pt(tempCardMpList2) + --pt(tempCardMpList3) + + local cs={} + local count=1 + for i=1,#tempCardMpList2 do + if i%3==1 then + cs[count]={} + end + + table.insert(cs[count],tempCardMpList2[i]) + + if i%3==0 then + count=count+1 + end + + end + + for i=1 , #cs do + tempCardMpList1[#tempCardMpList1+1]=cs[i] + end + + + local cs={} + local count=1 + for i=1,#tempCardMpList3 do + if i%3==1 then + cs[count]={} + end + + table.insert(cs[count],tempCardMpList3[i]) + + if i%3==0 then + count=count+1 + end + + end + + for i=1 , #cs do + tempCardMpList1[#tempCardMpList1+1]=cs[i] + end + + + cards_map=tempCardMpList1 + end + + table.sort(cards_map, ViewUtil.HandCardSort3) + --pt(cards_map) + return cards_map + +end + + +--摆牌规则 优先顺子 -AAa- 对子 - 单牌 +function M:tryPendulumRule3() + local card_count = #self.cardList + local cards_map = {} + local CountCards = {} + for i=1,#self.cardList do + CountCards[self.cardList[i]]= CountCards[self.cardList[i]] == nil and 1 or CountCards[self.cardList[i]] + 1 + end + --find4 + for k,v in pairs(CountCards) do + if (v == 4) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + --find abc + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] >0 and CountCards[i + 1]>0 and CountCards[i + 2]>0 then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + --find ABC + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] >0 and CountCards[i + 1]>0 and CountCards[i + 2]>0 then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + --find 大 2 7 10 + local countA = CountCards[202] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[210]~=nil and CountCards[202] >0 and CountCards[207] >0 and CountCards[210] >0 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cs[3]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 3 + end + end + end + + --find 小 2 7 10 + local counta = CountCards[102] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[110]~=nil and CountCards[102] >0 and CountCards[107] >0 and CountCards[110] >0 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cs[3]= 110 + cards_map[#cards_map+1] = cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 3 + end + end + end + + --find AAa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] >= 2 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-3; + end + end + end + --find aaA + for i = 101, 110 do + if CountCards[i]~=nil and (CountCards[i] >= 2) then + if CountCards[i + 100]~=nil and (CountCards[i + 100] == 1) then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i+100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i +100] = CountCards[i +100] - 1 + card_count = card_count-3; + end + end + end + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + --find Aa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] == 1 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 1; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-2 + end + end + end + --find ab + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + --find AB + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + --find 大 2 7 两个 + for i=201,210 do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[202] ==1 and CountCards[207] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + card_count = card_count - 2 + end + end + + for i=201,210 do + if CountCards[202]~=nil and CountCards[210]~=nil and CountCards[202] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + for i=201,210 do + if CountCards[207]~=nil and CountCards[210]~=nil and CountCards[207] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 207 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + --find 小 2 7 两个 + for i=101,110 do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[102] ==1 and CountCards[107] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[102]~=nil and CountCards[110]~=nil and CountCards[102] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[107]~=nil and CountCards[110]~=nil and CountCards[107] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 107 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + local singleList = {} + --find else + for k,v in pairs(CountCards) do + if (v == 1) then + singleList[#singleList+1] = k + CountCards[k] = CountCards[k] -1 + + end + end + local index = 3 + for i=1,#singleList,index do + local cs ={} + cs[#cs+1] = singleList[i] + if i < #singleList then cs[#cs+1] = singleList[i+1] end + if i < #singleList - 1 then cs[#cs+1] = singleList[i+2] end + cards_map[#cards_map + 1]=cs + end + --变成9列--这里牌多了也不会报错了 + for i=10 ,1,-1 do + for j = #cards_map , 10,-1 do + if #cards_map[i] < 3 then + cards_map[i][#cards_map[i]+1] = cards_map[j][1] + list_remove(cards_map[j],cards_map[j][1]) + end + end + end + + return cards_map + +end + +local function init(self,cardInhand,index) + self.cardList= {} + self.stack = {} + self.cardList = membe_clone(cardInhand) + table.sort(self.cardList) + if index== nil or index ==0 then + return self:tryPendulumRule2() + elseif index == 1 then + return self:tryPendulumRule() + elseif index == 2 then + return self:tryPendulumRule2() + elseif index == 3 then + return self:tryPendulumRule3() + end +end + +function M.GetHandCard(cardInhand,index) + local self = setmetatable({}, {__index = M}) + if not cardInhand or #cardInhand == 0 then + return nil + end + local HandCardList = init(self,cardInhand,index) + return HandCardList +end + + +return M + + + + + diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPCardView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPCardView.lua new file mode 100644 index 00000000..2c24f342 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPCardView.lua @@ -0,0 +1,119 @@ + + +local M = { + btn_card = nil, + card_item = 0, + Hierarchy = 0, + index_X = 0, + index_Y = 0, + isUser = false, + initPos = Vector2.zero +} + + +function M.InitCardView(card_code, index_X, index_Y, type) + -- setmetatable(M, {__index = CardView}) + local self = setmetatable({}, {__index = M}) + self._room = DataManager.CurrenRoom + self.btn_card = self:InitUI(card_code, type) + self.card_item = card_code + self.index_X = index_X + self.index_Y = index_Y + self.btn_card.data = self + + self:Init() + return self, self.btn_card +end + +function M:Init() + self.card_width = 87 + self.initPos = Vector2.zero +end + +function M:InitUI(card_code, type) + local card + if type == 0 then + card = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Btn_Card") + self.icon = card:GetChild("icon") + self.icon.icon = self:getHandCardItem("ui://Main_RunBeard/201_", card_code) + self.icon:SetScale(self:getCardSize(), self:getCardSize()) + card:GetChild("n6"):SetScale(self:getCardSize(), self:getCardSize()) + elseif type == 1 then + card = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + self.icon = card:GetChild("icon") + if card_code == 0 then + self.icon = "ui://Main_RunBeard/202_1_300" + else + self.icon = self:GetCardItem("ui://Main_RunBeard/203_", card_code) + end + end + return card +end + +function M:GetCardItem(card_1, card_2) + local room = DataManager.CurrenRoom + if room.change_card_display ~= nil then + return card_1 .. room.change_card_display .. card_2 + else + return card_1 .. "2_" .. card_2 + end +end + +function M:getCardSize() + if self._room.change_card_size ~= nil then + return self._room.change_card_size + else + return 1 + end +end + +function M:getHandCardItem(card_1, card_2) + if self._room.change_card_display ~= nil then + if self._room.change_card_display == "1_" then + if self._room.change_card_size ~= nil then + self.card_width = 94 * self._room.change_card_size + else + self.card_width = 94 + end + + return card_1 .. "4_" .. card_2 + end + if self._room.change_card_size ~= nil then + self.card_width = 87 * self._room.change_card_size + else + self.card_width = 87 + end + return card_1 .. self._room.change_card_display .. card_2 + else + if self._room.change_card_size ~= nil then + self.card_width = 90 * self._room.change_card_size + else + self.card_width = 90 + end + return card_1 .. "6_" .. card_2 + end +end + +function M:UpdateKan() + self.btn_card.touchable = false + self.btn_card:GetController("Kan").selectedIndex = 1 +end + +function M:UpdateTing(isting) + self.btn_card:GetController("mark_ting").selectedIndex = isting and 1 or 0 +end + +function M:UpdateIcon() + self.icon.icon = self:getHandCardItem("ui://Main_RunBeard/201_", self.card_item) + -- self.btn_card:TweenMove(self:GetHandCardPos(self, #CountCards), 0.02) +end + +function M:UpdateScale() + local size = self._room.change_card_size + -- card_view.btn_card:GetChild("icon").icon = self:getHandCardItem("ui://Main_RunBeard/201_", card_view.card_item) + self.icon:SetScale(size, size) + self.btn_card:GetChild("n6"):SetScale(size, size) + -- self:getCardWidth() +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPChiView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPChiView.lua new file mode 100644 index 00000000..66b171b5 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPChiView.lua @@ -0,0 +1,131 @@ +local M = {} + +function M.InitChiView(gamectr, view, cardInfo) + local self = setmetatable({}, {__index = M}) + self._room = DataManager.CurrenRoom + self.class = "ChiView" + self._gamectr = gamectr + self._mainView = view + self._cardInfo = cardInfo + return self +end + +function M:UpdateChiView(list, tip_hu, callback, cardInfo) + self:ShowView(list, tip_hu, callback, cardInfo) +end + +function M:ShowView(tiplist, tip_hu, callback, cardInfo) + local _pop_tip_choice = UIPackage.CreateObject("Main_RunBeard", "Pop_tip_choice") + local list_choose = _pop_tip_choice:GetChild("Lst_choose") + _pop_tip_choice:GetChild("dibtn").onClick:Add(function() + _pop_tip_choice:Dispose() + end) + + -- --list 去重复的 + if #tiplist == 1 then + _pop_tip_choice:GetController("bipai").selectedIndex = 3 + end + + local tip_list = membe_deep_clone(tiplist) + for i = 1, #tiplist do + for k = 1, #tip_list do + if tip_list[k].weight ~= 4 and tiplist[i].id ~= tip_list[k].id then + if tiplist[i].OpCard[1] == tip_list[k].OpCard[1] and tiplist[i].OpCard[2] == tip_list[k].OpCard[2] then + tip_list[i].weight = 4 + end + end + end + end + + list_choose:RemoveChildrenToPool() + for i = 1, #tip_list do + if tip_list[i].weight ~=4 then + local item_choose = list_choose:AddItemFromPool() + self:SetIcon(item_choose, 2, tip_list[i].OpCard[1]) + self:SetIcon(item_choose, 3, tip_list[i].OpCard[2]) + self:SetIcon(item_choose, 1, tip_list[i].card) + + item_choose.onClick:Add(function() + for k=1,list_choose.numChildren do + list_choose:GetChildAt(k-1):GetController("zhong") .selectedIndex = 0 + end + item_choose:GetController("zhong").selectedIndex = 1 + if tip_list[i].bi_list ==nil then + callback(tip_list[i].id) + self:CloseTip() + else + self.bilist={} + self._chiid = tip_list[i].id + self:CheckRatioCard(tip_list[i].bi_list,1,tip_list[i].card) + + end + end) + end + end + list_choose:ResizeToFit(#tip_list) + _pop_tip_choice:GetChild("di1").width = list_choose.width+110 + _pop_tip_choice.xy = Vector2((self._mainView.width - _pop_tip_choice.width)/2, -100) + self._mainView:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice + end + --比牌显示 + function M:CheckRatioCard(_tiplist,index,chicard,_biid) + if _biid ~=nil then + self.bilist={} + self.bilist[#self.bilist+1] = _biid + end + self._pop_tip_choice:GetController("bipai").selectedIndex = index + local Bilist_choose = self._pop_tip_choice:GetChild("Bi_Lst_choose"..index) + Bilist_choose:RemoveChildrenToPool() + for i = 1, #_tiplist do + local item = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Comp_choose") + local item_choose = Bilist_choose:AddChild(item) + self:SetIcon(item_choose, 2, _tiplist[i].opcard[1]) + self:SetIcon(item_choose, 3, _tiplist[i].opcard[2]) + self:SetIcon(item_choose, 1, chicard) + item_choose:GetController("zhong") .selectedIndex = 0 + item_choose.onClick:Add(function() + for k=1,Bilist_choose.numChildren do + Bilist_choose:GetChildAt(k-1):GetController("zhong") .selectedIndex = 0 + end + item_choose:GetController("zhong") .selectedIndex = 1 + if _tiplist[i].bi_list ==nil then + if tip_hu then + local guo_msg = MsgWindow.new(self._root_view, "确定取消胡吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + self.bilist[#self.bilist+1] = i-1 + self._gamectr:SendAction(self._chiid,self.bilist) + guo_msg:Close() + self:CloseTip() + self._cardInfo:UpdateIsOnClick(false) + end) + guo_msg:Show() + else + self.bilist[#self.bilist+1] = i-1 + self._gamectr:SendAction(self._chiid,self.bilist) + self:CloseTip() + self._cardInfo:UpdateIsOnClick(false) + end + else + self:CheckRatioCard(_tiplist[i].bi_list,2,chicard,i-1) + end + end) + end + Bilist_choose:ResizeToFit(#_tiplist) + self._pop_tip_choice:GetChild("di"..index+1).width = Bilist_choose.width+110 + + end + + +function M:SetIcon(item, index, card) + item:GetChild("card" .. index).icon = UIPackage.GetItemURL("Main_RunBeard", CommonFun:GetCardItem("201_", card)) +end + +function M:CloseTip() + if (self._pop_tip_choice) then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPFzCardView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPFzCardView.lua new file mode 100644 index 00000000..a195fd1a --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPFzCardView.lua @@ -0,0 +1,182 @@ +local M = {} + +local source_fz_03 = "ui://Main_RunBeard/Fz_0_3" +local source_fz_04 = "ui://Main_RunBeard/Fz_0_4" +local source_card = "ui://Main_RunBeard/202_" + +function M:getCardItem(card_1, card_2) + local room = DataManager.CurrenRoom + if room.change_card_display ~= nil then + return card_1 .. room.change_card_display .. card_2 + else + return card_1 .. "6_" .. card_2 + end +end + +function M.InitFzView(fz,isMy,isplay,index,count) + local self = setmetatable({}, {__index = M}) + local item,fzcards + if fz.type ~= RB_FZType.Kan then + item = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Component1")--Extend_Poker_AHRunBeard + item:RemoveChildren(0, -1, true) + end + printlog("jefe InitFzView===》》》》") + -- local fzItem + if fz.type == RB_FZType.Bi or fz.type == RB_FZType.Chi then + fzcards = self:UpateChiBi(item,fz) + elseif fz.type == RB_FZType.Peng then + fzcards = self:UpdatePeng(item,fz) + elseif fz.type == RB_FZType.Wei or fz.type == RB_FZType.ChouWei then + fzcards = self:UpdateWei(item,fz,isMy) + elseif fz.type == RB_FZType.Ti then + fzcards = self:UpateTi(item,fz) + elseif fz.type == RB_FZType.Pao then + fzcards = self:UpatePao(item,fz) + end + + if item ~= nil and fzcards ~= nil then + self:PlayEffect(item,fzcards,isplay,index,count) + end + + return item,fzcards +end + +function M:UpateChiBi(item,fz) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_03) + local cardId1,cardId2,cardId3 + if #fz.opcard == 2 then + cardId1 = fz.card + cardId2 = fz.opcard[1] + cardId3 = fz.opcard[2] + else + cardId1 = fz.opcard[1] + cardId2 = fz.opcard[2] + cardId3 = fz.opcard[3] + end + fzcards:GetChild("card_" .. 1).icon = self:getCardItem(source_card, cardId1) + fzcards:GetController("c2").selectedIndex = 1 + fzcards:GetChild("card_" .. 2).icon = self:getCardItem(source_card, cardId2) + -- local card = fz.opcard[2] == nil and fz.opcard[1] or fz.opcard[2] + fzcards:GetChild("card_" .. 3).icon = self:getCardItem(source_card, cardId3) + fzcards.x, fzcards.y = 0, 0 + item:AddChildAt(fzcards, 0) + return fzcards +end + +function M:UpdatePeng(item,fz) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_03) + for j = 1, 3 do + fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1]) + end + fzcards.x, fzcards.y = 0, 0 + item:AddChildAt(fzcards, 0) + return fzcards +end + +function M:UpdateWei(item,fz,isMy) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_03) + --fzcards:GetController("c1").selectedIndex=1 + printlog("jefe chouwei ===》》》》") + local room = DataManager.CurrenRoom + for j = 1, 3 do + if room.room_config.mingwei or fz.type==RB_FZType.ChouWei or isMy then + if j == 3 then + fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1]) + else + fzcards:GetChild("card_" .. j).icon = "ui://Main_RunBeard/202_1_300" + end + else + --未勾选明偎 + -- if isMy then + -- fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1]) + -- fzcards:GetController("c1").selectedIndex = 1 + -- else + fzcards:GetChild("card_" .. j).icon = "ui://Main_RunBeard/202_1_300" + -- end + end + + end + fzcards.x, fzcards.y = 0, 0 + item:AddChildAt(fzcards,0) + return fzcards +end + +function M:UpateTi(item, fz,icon) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_04) + for i = 1, 4 do + if i == 4 and fz.type == RB_FZType.Ti then + fzcards:GetChild("card_" .. i).icon = self:getCardItem(source_card, fz.card) + else + fzcards:GetChild("card_" .. i).icon = "ui://Main_RunBeard/202_1_300" + end + end + fzcards.x, fzcards.y = 0, 0 + -- item:AddChildAt(fzcards,0) + return fzcards +end + +function M:UpatePao(item, fz,icon) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_04) + for i = 1, 4 do + fzcards:GetChild("card_" .. i).icon = self:getCardItem(source_card, fz.opcard[1]) + end + fzcards.x, fzcards.y = 0, 0 + return fzcards +end + +function M:PlayEffect(fzitem,fzcards,isplay,index,count) + if (isplay == nil) then + isplay = false + end + if (isplay and index == count) then + local faArray = fzitem:GetChild("chiwei") + if (faArray ~= nil) then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end +end + +function M:PlayEffectOther(fzitem,fzcards, size,i,isplay,seat) + isplay = isplay == nil and false or isplay + local isAddlast = false + + local room = DataManager.CurrenRoom + if isplay and i== size then + local faArray = fzitem:GetChild("chiwei") + if room.room_config.people_num == 3 then + if (room.self_player.seat == 1) then + if (seat == 2) then + faArray = fzitem:GetChild("chiwei1") + else + faArray = fzitem:GetChild("chiwei") + end + elseif (room.self_player.seat == 2) then + if (seat == 3) then + faArray = fzitem:GetChild("chiwei1") + else + faArray = fzitem:GetChild("chiwei") + end + elseif (room.self_player.seat == 3) then + if (seat == 1) then + faArray = fzitem:GetChild("chiwei1") + else + faArray = fzitem:GetChild("chiwei") + end + end + end + + if (faArray ~= nil) then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPGameController.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPGameController.lua new file mode 100644 index 00000000..ab5e5a19 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPGameController.lua @@ -0,0 +1,10 @@ + +local M = {} + +setmetatable(M,{__index = GameController}) + +function M:init(name) + GameController.init(self,name) +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPGameEvent.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPGameEvent.lua new file mode 100644 index 00000000..22d92845 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPGameEvent.lua @@ -0,0 +1,22 @@ +local ZPGameEvent = { + -- 发牌 + SendCards = 'SendCards', + --发最后一张牌 + AddCard = 'AddCard', + -- 胡牌 + ZPHuCard = 'ZPHuCard', + -- 结算事件 + ZPResult1 = 'ZPResult1', + -- 大结算事件 + ZPResult2 = 'ZPResult2', + -- 转盘指向事件 + EventTurn = 'EventTurn', + OutHint = 'OutHint', --出牌tips + GetCard = 'GetCard', --摸牌 + OutCard = 'OutCard', --出牌 + FangziAction = 'FangziAction', --吃碰等操作事件 + FZTips = 'FZTips', --放子提示 + QiCard = 'QiCard' --弃牌 +} + +return ZPGameEvent diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPMainView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPMainView.lua new file mode 100644 index 00000000..8f55bc57 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPMainView.lua @@ -0,0 +1,402 @@ +local PlayerSelfCardInfoView = import('.ZPPlayerSelfCardInfoView') +local PlayerCardInfoView = import('.ZPPlayerCardInfoView') +local ZPSettingView = import('.ZPSettingView') +local ZPTableBG = import('.ZPTableBG') +local HuTipView = import('.HuTipView') +local ZPGameEvent = import('.ZPGameEvent') +local M = { + default_btn = false +} + +setmetatable(M, {__index = MainView}) + +local default_bg = 1 + +function M:InitView(url, isdisplay, open_social, change_card_size, qihu) + UIPackage.AddPackage('base/main_zipai/ui/Main_RunBeard') + MainView.InitView(self, url) + self._full_offset = false + --显示背景 + ZPTableBG.LoadTableBG(default_bg, self._room.game_id, self._root_view) + self.qihu = qihu + if qihu ~= nil then + local id = ZPTableBG.GetTableBG(self._room.game_id) + if id > 3 or id <= 0 then + id = 1 + end + if self._room.score_times ~= nil and self._room.score_times > 0 then + self._view:GetChild('di_text').text = + self._room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起 ' .. self._room.score_times .. '倍' + else + self._view:GetChild('di_text').text = self._room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起' + end + self._view:GetController('bg_state').selectedIndex = id - 1 + end + self.cd_time = 0 + self.default_btn = open_social + if isdisplay == nil then + isdisplay = false + end + local tex_round = self._view:GetChild('tex_round') + self._tex_leftTime = self._view:GetChild('time') + local remaining_card = self._view:GetChild('remaining_card') + self._tex_LeftCard = self._view:GetChild('remaining_card') + self._rightPanelView._opt = 2 + self._rightPanelView:__UpdateTime() + local rightpanel = self._view:GetChild('right_panel') + if (rightpanel ~= nil) then + self.tex_gametype = rightpanel:GetChild('tex_gametype') + if (self.tex_gametype ~= nil) then + self.tex_gametype.text = self._room.room_config:GetGameName() + end + end + self._player_card_info = {} + local _room = self._room + self._hu_tip = HuTipView.new(self) + --加载上次游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id) + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + + local _gamectr = self._gamectr + _gamectr:SendChangeTypeFace(typeface) + if typeface == 1 then + if isdisplay then + self._room.change_card_display = '7_' + else + self._room.change_card_display = '2_' + end + elseif typeface == 2 then + self._room.change_card_display = '1_' + elseif typeface == 3 then + self._room.change_card_display = '3_' + elseif typeface == 4 then + self._room.change_card_display = '8_' + end + end + -- self._view.fairyBatching = true + --加载上次游戏的手牌大小 + + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. 'cardsize_new') + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_cardsize'] + local _gamectr = self._gamectr + if typeface == 0 then + self._room.change_card_size = 1.2 + elseif typeface == 1 then + self._room.change_card_size = 1 + elseif typeface == 2 then + self._room.change_card_size = 0.8 + end + else + self._room.change_card_size = change_card_size + end + + --加载上次游戏的接收语音 + if self.default_btn then + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. 'yuyin') + local json_data1 = Utils.LoadLocalFile(user_id .. _room.game_id .. 'chupai') + local json_data2 = Utils.LoadLocalFile(user_id .. _room.game_id .. 'fangyan') + self._room.yuyin_typeface = 1 + self._room.chupai_typeface = 1 + self._room.fangyan_typeface = 1 + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + self._room.yuyin_typeface = typeface + self:SetInteractEnabled(typeface == 1 and 0 or 1) + end + if json_data1 ~= nil then + local _data = json.decode(json_data1) + local typeface = _data['game_typeface'] + self._room.chupai_typeface = typeface + end + if json_data2 ~= nil then + local _data = json.decode(json_data2) + local typeface = _data['game_typeface'] + self._room.fangyan_typeface = typeface + end + end + + local _player_card_info = self._player_card_info + for i = 1, _room.room_config.people_num do + local tem = self._view:GetChild('player_card_info' .. i) + _player_card_info[i] = self:NewPlayerCardInfoView(tem, i) + end + + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = _player_card_info[self:GetPos(p.seat)] + info:SetPlayer(p) + info:FillData() + end + + self._rightPanelView.ctr_log.selectedIndex = 0 + local list = _room.player_list + local readyNum = 0 + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + if p.ready then + readyNum = readyNum + 1 + end + end + if (_room.curren_round > 0) then + self._rightPanelView.ctr_log.selectedIndex = 0 + end + + self._ctr_action = self._view:GetController('action') + if _room.banker_seat == _room.self_player.seat and readyNum > 1 and readyNum == _room.room_config.people_num then + elseif not _room.self_player.ready then + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig then + if round>1 then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 2 + end + + else + self._ctr_action.selectedIndex = 1 + end + + + else + self._ctr_action.selectedIndex = 0 + end + + self:ResetHandCard() + self:showBackBtnView() + self:InitXiPai() + self:InitXiPai1() +end + +function M:InitXiPai() + self._xipaiPanel = UIPackage.CreateObjectFromURL("ui://Common/panel_handzipai02") + self._root_view:AddChild(self._xipaiPanel) + + local offset = get_offset(self._full_offset) + + self._xipaiPanel.width = GRoot.inst.width - (offset * 2) + self._xipaiPanel.height = GRoot.inst.height + self._xipaiPanel.x = offset + + self._xipaiPanel.visible=false + --self:PlayXiPai() +end + +function M:PlayXiPai(xipaiCallBack) + if self._xipaiPanel then + coroutine.start(function() + self._xipaiPanel.visible=true + self._xipaiPanel:GetTransition("XiPai"):Play() + coroutine.wait(3.5) + self._xipaiPanel.visible=false + if xipaiCallBack then + xipaiCallBack() + end + end) + + + end +end + +function M:InitXiPai1() + self._xipaiPanel1 = UIPackage.CreateObjectFromURL("ui://Common/panel_handzipai03") + self._root_view:AddChild(self._xipaiPanel1) + + local offset = get_offset(self._full_offset) + + self._xipaiPanel1.width = GRoot.inst.width - (offset * 2) + self._xipaiPanel1.height = GRoot.inst.height + self._xipaiPanel1.x = offset + + self._xipaiPanel1.visible=false + --self:PlayXiPai() +end + +function M:PlayXiPai1(xipaiCallBack) + if self._xipaiPanel1 then + coroutine.start(function() + self._xipaiPanel1.visible=true + self._xipaiPanel1:GetTransition("XiPai"):Play() + coroutine.wait(3.5) + self._xipaiPanel1.visible=false + if xipaiCallBack then + xipaiCallBack() + end + end) + + + end +end + + +function M:NewSettingView(cardIndex) + local settingView = ZPSettingView.new(self._view, 2, self.default_btn,cardIndex) + settingView:FillBgSection( + function(url) + LoadGameBg(url, self._root_view) + end, + self._room.game_id, + default_bg, + self._room, + self.qihu + ) + return settingView +end + +function M:EventInit() + MainView.EventInit(self) +end + +function M:NewPlayerCardInfoView(view, index) + if index == 1 then + return PlayerSelfCardInfoView.new(view, self) + end + return PlayerCardInfoView.new(view, self) +end + +-- 设置 更新 手牌字体 三套 +function M:UpdateCardDisplay(index) + local _gamectr = self._gamectr + _gamectr:SendChangeTypeFace(index) + if index == 1 then + self._room.change_card_display = '2_' + elseif index == 2 then + self._room.change_card_display = '1_' + elseif index == 3 then + self._room.change_card_display = '3_' + elseif index == 4 then + self._room.change_card_display = '8_' + end + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + if p.DiceCard ~= nil and p.DiceCard ~= 0 then + info:UpdateOutCardList(p.DiceCard) + end + if p.outcard_list ~= nil and #p.outcard_list > 0 then + info:UpdateQiPai(p.outcard_list) + end + if p.fz_list ~= nil and #p.fz_list > 0 then + info:UpdateFzList(p.fz_list) + end + if p.seat == self._room.self_player.seat then + info:UpdateCardDisplay() + end + end +end + +-- 设置 更新 手牌大小 +function M:UpdateCardSize(index) + if index == 0 then + self._room.change_card_size = 1.2 + elseif index == 1 then + self._room.change_card_size = 1 + elseif index == 2 then + self._room.change_card_size = 0.8 + end + local info = self._player_card_info[1] + info:UpdateCardSize() +end + +-- 设置 更新 方言 +function M:UpdateFangyan(index) + self._room.fangyan_typeface = index +end +--刷新手牌排列 按钮 三种 排列方法 在 PendulumRule 里 +function M:ResetHandCard(...) + local btn_reset = self._view:GetChild('btn_reset') + --btn_reset.visible=false + btn_reset.onClick:Set( + function(...) + if self._popEvent == false then + return + end + --加载上次的 + local index = 1 + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. 'ResetHandCard') + if json_data ~= nil then + local _data = json.decode(json_data) + index = _data['index'] + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['ResetHandCard'] = true + if index == 1 then + _data['index'] = 2 + elseif index == 2 then + _data['index'] = 3 + elseif index == 3 then + _data['index'] = 1 + end + local key = user_id .. 'ResetHandCard' + Utils.SaveLocalFile(key, json.encode(_data)) + local x = _data['index'] + local card_info = self._player_card_info[1] + --printlog("1111111111111111111111111",x) + card_info:InitHandCard(false, x) + end + ) +end + +function M:showBackBtnView() + local btn_back_lobby = self._view:GetChild('btn_back_lobby') + local btn_jiesan_lobby1 = self._view:GetChild('Btn_jiesan_lobby') + --btn_jiesan_lobby1.displayObject.gameObject:SetActive(false) + --btn_jiesan_lobby1:GetChild("n8").displayObject.gameObject:SetActive(false) + if (btn_jiesan_lobby1 ~= nil) then + btn_jiesan_lobby1.onClick:Set( + function() + if (self.cd_time > 0) then + ViewUtil.ErrorTip(nil, '您还处于解散冷却时间当中,请稍后再试') + else + self.cd_time = 30 + self._gamectr:AskDismissRoom( + function(res) + ViewUtil.ErrorTip(res.ReturnCode, '') + end + ) + self:onDisBandTimer() + end + end + ) + end +end + +--解散计时器 +function M:onDisBandTimer() + if self.cd_coroutine ~= nil then + coroutine.stop(self.cd_coroutine) + end + self.cd_coroutine = + coroutine.start( + function() + while (self.cd_time > 0) do + self.cd_time = self.cd_time - 1 + self.cd_time = math.max(0, self.cd_time) + if self.cd_time > 0 then + coroutine.wait(1) + end + end + end + ) +end + +function M:Destroy() + UIPackage.RemovePackage('base/main_zipai/ui/Main_RunBeard') + MainView.Destroy(self) +end +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPPlayBackView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPPlayBackView.lua new file mode 100644 index 00000000..5633fd43 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPPlayBackView.lua @@ -0,0 +1,13 @@ +local ZPTableBG = import('.ZPTableBG') + +local M = {} + +setmetatable(M, {__index = PlayBackView}) + +function M:InitView(url) + PlayBackView.InitView(self, url) + local _view = self._view + ZPTableBG.LoadTableBG(1, self._room.game_id, self._root_view) +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPPlayer.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPPlayer.lua new file mode 100644 index 00000000..fe112fd2 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPPlayer.lua @@ -0,0 +1,37 @@ + + +local EXPlayer ={ + -- 手牌列表 + card_list = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil, + hu_xi =0 +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 + self.hu_xi =0 +end + +return M \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPPlayerCardInfoView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPPlayerCardInfoView.lua new file mode 100644 index 00000000..3139e761 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPPlayerCardInfoView.lua @@ -0,0 +1,476 @@ +local PendulumRule = import('.PendulumRule') +AreaOderType = { + left_right = "left_right", + right_left = "right_left", + up_down = "up_down", + down_up = "down_up" +} + +local PlayerCardInfoView = { + _view = nil, + _mainView = nil, + + _mask_liangpai = nil, + _area_outcard_list = nil, + _area_handcard_list = nil, + + +} +local function NewCardView(card,cardItem,index_X,index_Y) + local self = {} + setmetatable(self,{__index = CardView}) + self.btn_card = card + self.card_item = cardItem + self.index_X = index_X + self.index_Y = index_Y + return self +end + + +local M = PlayerCardInfoView + +function M.new(view,mainView) + local self = {} + setmetatable(self, {__index = M}) + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:init() + + local view = self._view + self._room = DataManager.CurrenRoom + self._area_outcard_list = view:GetChild("area_outcard_list") + self._area_handcard_list = view:GetChild("area_handcard_list") + self._area_fz_list = view:GetChild("area_fz_list") + self._area_qipai_list = view:GetChild("windcard_list") + self._mask_liangpai = view:GetChild("mask_liangpai") + UIPackage.AddPackage("base/main_zipai/ui/Main_RunBeard") +end + +function M:SetPlayer(p) + self._player = p +end + +function M:FillData(begin) + +end + +function M:Clear() + self._area_outcard_list:RemoveChildren(0, -1, true) + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_qipai_list:RemoveChildren(0, -1, true) + self._mask_liangpai:RemoveChildren(0, -1, true) +end + + +function M:fillCard(obj,card_type,card) + +end + + +function M:ClearOutCard() + self._area_outcard_list:RemoveChildren(0, -1, true) + +end + +--弃牌 +function M:UpdateQiPai( qi_list) + self._area_qipai_list:RemoveChildren(0,-1,true) + for i=1,#qi_list do + local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + qicards:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",qi_list[i]) + self._area_qipai_list:AddChild(qicards) + end + +end + + --放字 +function M:UpdateFzList( fz_list ) + printlog("UpdateFzList=======") + pt(fz_list) + self._area_fz_list:RemoveChildren(0,-1,true) + for i = 1,#fz_list do + local fzitem = nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Component1") + fzitem:RemoveChildren(0,-1,true) + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetController("c2").selectedIndex =1 + fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].active_card) + fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[1]) + fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[2]) + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Peng then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Wei then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Pao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Ti then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + if j==4 then + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + else + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + end + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + end + end +end + +--回放手牌 +function M:InitHandCard(handcard) + self._area_handcard_list:RemoveChildren(0,-1,true) + local pokerList =PendulumRule.GetHandCard(handcard) --self:PendulumRule(handcard) + self.card_lists ={} + for i =1,#pokerList do + for j =1,#pokerList[i] do + local card_code = pokerList[i][j] + local btn_card =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",card_code) + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card,5-j) + local card_view = NewCardView(btn_card,card_code,i,j) + self.card_lists[#self.card_lists+1] = card_view + end + end + for j=#self.card_lists,1,-1 do + local card_view = self.card_lists[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view,#pokerList) + end + + if self._player.fz_list~=nil then + for i=1,#self._player.fz_list do + if self._player.fz_list[i].type == RB_FZType.Kan then + self:UpdateKan(self._player.fz_list[i].card) + end + end + end +end + + + +function M:UpdateHandCards( list ) + self.card_lists = {} + self._area_handcard_list:RemoveChildren(0,-1,true) + local CountCards = {} + for i=1,#list do + CountCards[list[i].index_X]=CountCards[list[i].index_X] == nil and 1 or CountCards[list[i].index_X] + 1 + end + for i=1,#list do + local card_code = list[i].card_item + local btn_card =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",card_code) + local card_view = NewCardView(btn_card,card_code,list[i].index_X,list[i].index_Y) + --存牌堆 + self.card_lists[#self.card_lists+1] =card_view + end + for j=#self.card_lists,1,-1 do + local card_view = self.card_lists[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view,#CountCards) + end + +end + +--牌位置 +function M:GetHandCardPos(cards_view,cards) + local x,y = 0,0 + local card_width = 42 -- 牌的宽度 + local middle_x = self._area_handcard_list.width / 2 + local start_x = middle_x - (cards / 2 * (card_width)) + x = start_x + (card_width) * (cards_view.index_X - 1) + y = 0 - (42*cards_view.index_Y) + return Vector2.New(x,y) +end + + + +function M:UpdateOutCardList(outcard) + + self._area_outcard_list:RemoveChildren(0,-1,true) + local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + if outcard==0 then + outcards:GetChild("icon").icon ="ui://Main_RunBeard/201_1_300" + else + outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/203_",outcard) + end + outcards.x,outcards.y = 0,0 + self._area_outcard_list:AddChild(outcards) +end + +--摸牌动画 +function M:PlayingOutCardAnima(card) + if(self._area_outcard_list ~=nil and self._area_outcard_list.numChildren>0)then + self._area_outcard_list:GetChildAt(0):GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/202_",card) + self._view:GetTransition("t0"):Play() + end + coroutine.start(function() + coroutine.wait(0.1) + self:ClearOutCard() + end) + -- +end + + +--摆牌规则 +function M:PendulumRule(handcard) + local room = DataManager.CurrenRoom + local card_list = handcard + local card_count = #card_list + local cards_map = {} + local CountCards = {} + for i=1,#card_list do + CountCards[card_list[i]]= CountCards[card_list[i]] == nil and 1 or CountCards[card_list[i]] + 1 + end + --find4 + for k,v in pairs(CountCards) do + if (v == 4) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + --find AAa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] >= 2 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-3 + end + end + end + --find aaA + for i = 101, 110 do + if CountCards[i]~=nil and (CountCards[i] >= 2) then + if CountCards[i + 100]~=nil and (CountCards[i + 100] == 1) then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i+100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i +100] = CountCards[i +100] - 1 + card_count = card_count-3 + end + end + end + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + --find 小 2 7 10 + local counta = CountCards[102] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[110]~=nil and CountCards[102] >0 and CountCards[107] >0 and CountCards[110] >0 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cs[3]= 110 + cards_map[#cards_map+1] = cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 3 + end + end + end + + --find 大 2 7 10 + local countA = CountCards[202] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[210]~=nil and CountCards[202] >0 and CountCards[207] >0 and CountCards[210] >0 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cs[3]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 3 + end + end + end + + --find abc + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and (CountCards[i] > 0 and CountCards[i + 1] > 0 and CountCards[i + 2] > 0) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + --find ABC + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and (CountCards[i] > 0 and CountCards[i + 1] > 0 and CountCards[i + 2] > 0) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + --find Aa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] == 1 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 1; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-2 + end + end + end + + local r_count = 9 - #cards_map + local merge = false + merge = r_count0 then + for i=1,#tempNotPutList do + self:UpdateKan(tempNotPutList[i]) + end + end +end + +--手牌 +function M:InitHandCard(isPlayAni, index) + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + self.outcard_button = nil + + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + self.cor_init_poker = nil + local _room = DataManager.CurrenRoom + --得到排序好的 list + local pokerList = PendulumRule.GetHandCard(_room.self_player.handcard_list, index) + if pokerList == nil or #pokerList == 0 then + return + end + self.cards_count = #pokerList + self.card_list = {} + self._area_handcard_list:RemoveChildren(0, -1, true) + --开始发牌动画 + if isPlayAni == true then + self.cor_init_poker = + coroutine.start( + function() + self._mainView._popEvent = false + if self._mainView._rightPanelView._settingView ~= nil then + self._mainView._rightPanelView._settingView:SetBtnUpdateCardEnable(false) + end + for i = 1, #pokerList do + local pokerListNum = 0 + for j = 1, #pokerList[i] do + local card_code = pokerList[i][j] + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 95 * self:getCardSize() + self.card_hight = 123 * self:getCardSize() + local x, y = 500, (j * 85) - 500 + btn_card:SetXY(x, y) + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card, 5 - j) + local card_view = NewCardView(btn_card, card_code, i, j) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + btn_card.data = card_view + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + end + for j = #self.card_list, 1, -1 do + coroutine.wait(0.005) + if pokerListNum == #pokerList[i] then + break + end + pokerListNum = pokerListNum + 1 + local card_view = self.card_list[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, self.cards_count), 0.08) + end + end + self:UpdateHandCardsPos() + self._mainView._popEvent = true + self:UpdateIsOnClick(true) + if self._mainView._rightPanelView._settingView ~= nil then + coroutine.start( + function() + coroutine.wait(1) + self._mainView._rightPanelView._settingView:SetBtnUpdateCardEnable(true) + end + ) + end + end + ) + else + --没有发牌动画 + for i = 1, #pokerList do + for j = 1, #pokerList[i] do + local card_code = pokerList[i][j] + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 95 * self:getCardSize() + self.card_hight = 123 * self:getCardSize() + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card, 5 - j) + local card_view = NewCardView(btn_card, card_code, i, j) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + btn_card.data = card_view + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + end + --存牌堆 + for j = 1, #self.card_list do + local card_view = self.card_list[j] + card_view.btn_card.xy = self:GetHandCardPos(card_view, self.cards_count) + end + end + if self._player.fz_list ~= nil then + for i = 1, #self._player.fz_list do + if self._player.fz_list[i].type == RB_FZType.Kan then + self:UpdateKan(self._player.fz_list[i].card) + end + end + end + self:UpdateHandCardsPos() + end + + self:SetNotPutCard() +end +--更新手牌 +function M:UpdateHandCards(list) + self.card_list = {} + self._area_handcard_list:RemoveChildren(0, -1, true) + + self.outcard_button = nil + + local CountCards = {} + for i = 1, #list do + CountCards[list[i].index_X] = CountCards[list[i].index_X] == nil and 1 or CountCards[list[i].index_X] + 1 + end + for i = 1, #list do + local card_code = list[i].card_item + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 87 * self:getCardSize() + self.card_hight = 110 * self:getCardSize() + local card_view = NewCardView(btn_card, card_code, list[i].index_X, list[i].index_Y) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + btn_card.data = card_view + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + end + for j = #self.card_list, 1, -1 do + local card_view = self.card_list[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view, #CountCards) + end + if self._player.fz_list ~= nil then + for i = 1, #self._player.fz_list do + if self._player.fz_list[i].type == RB_FZType.Kan then + self:UpdateKan(self._player.fz_list[i].card) + end + end + end + self:SetNotPutCard() +end + +-- -- +function M:onTouchBegin(context) + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + local button = context.sender + local card = button.data + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self:ShowHuTip(card.card_item) + end + card.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/203_', card.card_item) + -- card.btn_card.sortingOrder = 100 + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + card.btn_card.xy = Vector2.New(card.btn_card.x + 20, card.btn_card.y - 50) + card.touch_pos = xy - button.xy +end + +function M:onTouchMove(context) + local button = context.sender + local card = button.data + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + button.xy = xy - card.touch_pos +end + +--出牌提示动画 +function M:ChuPaiTiShi() + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self._view:GetController('chupai').selectedIndex = 1 + else + self._view:GetController('chupai').selectedIndex = 0 + end +end +-- 删手牌 +function M:DeleteHandCard(carditem) + local card = nil + if self.outcard_button ~= nil and carditem == self.outcard_button.card_item then + list_remove(self.card_list, self.outcard_button) + self._area_handcard_list:RemoveChild(self.outcard_button.btn_card, true) + + card = self.outcard_button + self.outcard_button = nil + else + for i = 1, #self.card_list do + local card_view = self.card_list[i] + if carditem == card_view.card_item then + card_view.btn_card.touchable = false + list_remove(self.card_list, card_view) + card = card_view + --card_view.btn_card:RemoveFromParent() + self._area_handcard_list:RemoveChild(card_view.btn_card, true) + break + end + end + end + if card ~= nil then + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + end + end + self:UpdateHandCardsPos() +end +--更新手牌的坎 +function M:UpdateKan(card) + for i = 1, #self.card_list do + local card_view = self.card_list[i] + if card_view.card_item == card then + --card_view.btn_card.touchable = false + card_view.btn_card:GetController('Kan').selectedIndex = 1 + end + end +end + +-- 手牌更新位置方法 self.card_list 里面的对象 NewCardView,index_X index_Y 就是xy序号 +function M:UpdateHandCardsPos() + --得到有 多少列 + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.old_postion = self:GetHandCardPos(card_view, #CountCards) + card_view.btn_card:TweenMove(card_view.old_postion, 0.3) + end + self:ShowHuTip() +end + +--刷新手牌字体 +function M:UpdateCardDisplay() + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + card_view.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_view.card_item) + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, #CountCards), 0.3) + end +end +--更新手牌大小 +function M:UpdateCardSize() + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + card_view.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_view.card_item) + card_view.btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + card_view.btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 87 * self:getCardSize() + self.card_hight = 110 * self:getCardSize() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, #CountCards), 0.3) + end +end + +function M:UpdateIsOnClick(isOut) + self._view.touchable = isOut +end + +-- 结束 拖拽事件 +-- 根据牌结束点的位置 判断是出牌还是调整位置 button.xy 和 牌的xy比较 +function M:__OnDragEnd(context) + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + if self.outcard_button then + self.outcard_button = nil + end + local button = context.sender + local card = button.data + -- card.btn_card.sortingOrder = 0 + local _room = DataManager.CurrenRoom + + if (button.y < -320 and _room ~= nil and _room.curren_outcard_seat == _room.self_player.seat) then + button.touchable = false + self.outcard_button = card + self:UpdateIsOnClick(false) + self._mainView:OutCard(card.card_item) + else + local isChangeCard = false + self.outcard_button = nil + card.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card.card_item) + self._area_handcard_list:AddChild(button) + if #self.card_list == 1 then + isChangeCard = false + self:UpdateHandCardsPos() + return + end + local CountCards = {} + for i = 1, #self.card_list do + local lists = {} + if CountCards[self.card_list[i].index_X] == nil then + lists[#lists + 1] = self.card_list[i] + CountCards[self.card_list[i].index_X] = lists + else + CountCards[self.card_list[i].index_X][#CountCards[self.card_list[i].index_X] + 1] = self.card_list[i] + end + end + local minmark = 1 + local maxmark = #self.card_list + if card == self.card_list[1] or card == self.card_list[#self.card_list] then + if self.card_list[1].index_X == self.card_list[2].index_X then + minmark = 2 + end + if self.card_list[#self.card_list].index_X == self.card_list[#self.card_list - 1].index_X then + maxmark = #self.card_list - 1 + end + end + --位置x小于第一张牌 放第一排 + if button.x + button.width / 2 < self.card_list[minmark].btn_card.x and #CountCards < 10 then + --位置大于最后一张牌 放最后一排 + list_remove(self.card_list, card) + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X < card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + else + for i = 1, #self.card_list do + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + card.index_X = 1 + card.index_Y = 1 + table.insert(self.card_list, 1, card) + isChangeCard = true + elseif button.x + button.width / 2 > (self.card_list[maxmark].btn_card.x + button.width) and #CountCards < 10 then + list_remove(self.card_list, card) + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + end + card.index_X = self.card_list[#self.card_list].index_X + 1 + card.index_Y = 1 + self.card_list[#self.card_list + 1] = card + isChangeCard = true + else + --放已有的牌堆上 判断放第几列 + local MoveCard = false + local MoveCardPos = 0 + local MoveCardY = 0 + for i = 1, #CountCards do + local card_view = CountCards[i][1] + if card_view ~= nil then + if + button.x + button.width / 2 > card_view.old_postion.x and + button.x + button.width / 2 < (card_view.old_postion.x + button.width) + then + if card ~= card_view and #CountCards[i] < 4 and card.index_X ~= card_view.index_X then + MoveCardPos = i + MoveCardY = #CountCards[i] + 1 + MoveCard = true + list_remove(self.card_list, card) + end + end + end + end + local MoveCardindex = 0 + -- local MoveCardY = 0 + if + button.x + button.width / 2 > card.old_postion.x and + button.x + button.width / 2 < (card.old_postion.x + button.width) + then + if #CountCards[card.index_X] > 1 then + for i = 1, #CountCards[card.index_X] do + local _cv = CountCards[card.index_X][i] + if _cv ~= card then + if + button.y + button.height / 2 > _cv.btn_card.y and + button.y + button.height / 2 < (_cv.btn_card.y + button.height) + then + --向下移動 + if ((button.y + button.height / 2) + 20) > (card.old_postion.y + button.height) then + --向上移動 + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + elseif ((button.y + button.height / 2) - 20) < card.old_postion.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + end + elseif i == #CountCards[card.index_X] and button.y + button.height / 2 < _cv.btn_card.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + elseif i == 1 and button.y + button.height / 2 > (_cv.btn_card.y + button.width) then + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + end + end + end + end + end + if MoveCard == true and MoveCardindex == 0 then + --上下移动 + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + if MoveCardPos > card.index_X then + MoveCardPos = MoveCardPos - 1 + end + end + card.index_X = MoveCardPos + card.index_Y = MoveCardY + for i = #self.card_list, 1, -1 do + if MoveCardPos == self.card_list[i].index_X then + table.insert(self.card_list, (i + 1), card) + break + end + end + isChangeCard = true + elseif MoveCard == true and MoveCardindex ~= 0 then + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X then + --向下移动 + if MoveCardindex == -1 then + --向上移动 + if self.card_list[i].index_Y < card.index_Y and self.card_list[i].index_Y >= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y + 1 + end + else + if self.card_list[i].index_Y > card.index_Y and self.card_list[i].index_Y <= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + end + end + end + card.index_X = MoveCardPos + card.index_Y = MoveCardY + for i = #self.card_list, 1, -1 do + if MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY - 1) then + table.insert(self.card_list, (i + 1), card) + break + elseif MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY + 1) then + table.insert(self.card_list, i, card) + break + end + end + isChangeCard = true + else + isChangeCard = false + self._area_handcard_list:AddChild(button) + end + end + self:UpdateHandCardsPos() + --每次改变手牌排列发给服务器 重连 回放需要用 --回放需要没次改变都要显示 + if isChangeCard == true then + self:SendChangeCard() + end + end +end + +--改变手牌排列发给服务器 +function M:SendChangeCard(...) + local list = {} + for i = 1, #self.card_list do + local data = {} + data.card = self.card_list[i].card_item + data.X = self.card_list[i].index_X + data.Y = self.card_list[i].index_Y + list[#list + 1] = data + end + self._mainView:ChangeCards(list) +end + +--计算手牌位置 +function M:GetHandCardPos(cards_view, cards) + local x, y = 0, 0 + local card_width = self.card_width -- 牌的宽度 + local middle_x = self._area_handcard_list.width / 2 + local start_x = middle_x - (cards / 2 * (card_width)) + x = start_x + (card_width) * (cards_view.index_X - 1) + + if self:getCardSize() == 1 then + y = 90 - (85 * cards_view.index_Y) + elseif self:getCardSize() == 1.2 then + y = 70 - (110 * cards_view.index_Y) + elseif self:getCardSize() == 0.8 then + y = 100 - (65 * cards_view.index_Y) + end + return Vector2.New(x, y) +end + +--更新 吃碰 +function M:UpdateFzList(fz_list) + printlog("UpdateFzList=======") + pt(fz_list) + self._area_fz_list:RemoveChildren(0, -1, true) + for i = 1, #fz_list do + local fzitem = nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Component1') + fzitem:RemoveChildren(0, -1, true) + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + fzcards:GetChild('card_' .. 1).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].active_card) + fzcards:GetController('c2').selectedIndex = 1 + fzcards:GetChild('card_' .. 2).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].opcard[1]) + fzcards:GetChild('card_' .. 3).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].opcard[2]) + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Peng then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + for j = 1, 3 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Wei then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + fzcards:GetController('c1').selectedIndex = 1 + for j = 1, 3 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + fzcards:GetController('c1').selectedIndex = 1 + for j = 1, 3 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Pao then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_4') + for j = 1, 4 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Ti then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_4') + for j = 1, 4 do + if j == 4 then + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + else + fzcards:GetChild('card_' .. j).icon = 'ui://Main_RunBeard/202_1_300' + end + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + end + end +end + +function M:ClearOutCard() + self._area_outcard_list:RemoveChildren(0, -1, true) +end +--出牌 +function M:UpdateOutCardList(outcard) + self._area_outcard_list:RemoveChildren(0, -1, true) + local outcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Gcm_OutCard') + if outcard == 0 then + outcards:GetChild('icon').icon = 'ui://Main_RunBeard/201_1_300' + else + outcards:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/203_', outcard) + end + outcards.x, outcards.y = 0, 0 + self._area_outcard_list:AddChild(outcards) +end + +--弃牌 +function M:UpdateQiPai(qi_list) + self._area_qipai_list:RemoveChildren(0, -1, true) + for i = 1, #qi_list do + local qicards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Qipai') + qicards:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/202_', qi_list[i]) + self._area_qipai_list:AddChild(qicards) + end +end + +--摸牌动画 +function M:PlayingOutCardAnima(card) + if (self._area_outcard_list ~= nil and self._area_outcard_list.numChildren > 0) then + self._area_outcard_list:GetChildAt(0):GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/202_', card) + self._view:GetTransition('t0'):Play() + end + coroutine.start( + function() + coroutine.wait(0.1) + self:ClearOutCard() + end + ) +end + +--得到设置的牌字体 +function M:getCardItem(card_1, card_2) + if self._room.change_card_display ~= nil then + --printlog("===========",self._room.change_card_display) + return card_1 .. self._room.change_card_display .. card_2 + else + return card_1 .. '2_' .. card_2 + end +end +--得到设置的牌大小 +function M:getCardSize() + if self._room.change_card_size ~= nil then + return self._room.change_card_size + else + return 1 + end +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPProtocol.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPProtocol.lua new file mode 100644 index 00000000..7c0b7ff3 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPProtocol.lua @@ -0,0 +1,36 @@ +local Protocol = { + -- 通知服务器出牌 + GAME_DIS_CARD = "611", + -- 通知服务器提示选择行为 + GAME_ACTION = "612", + -- 通知服务器手牌队形改变 + GAME_CHANGE_CARD = "613", + -- 通知服务器牌字体改变 + GAME_CHANGE_TYPEfACE = "615", + + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + -- 出牌事件 + GAME_EVT_DISCARD = "812", + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + -- action 事件 + GAME_EVT_ACTION = "815", + -- 胡牌事件 + GAME_EVT_HU = "816", + -- 结算 + GAME_EVT_RESULT1 = "817", + -- 弃牌 + GAME_EVT_QIPAI = "818", + -- 抓牌 + GAME_EVT_DRAW = "819", + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + --第二十一张牌 + GAME_EVT_ADD_CARD = "821", + +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPSettingView.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPSettingView.lua new file mode 100644 index 00000000..58080559 --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPSettingView.lua @@ -0,0 +1,336 @@ +local SettingView = require('Game.View.SettingView') +local ZPTableBG = import('.ZPTableBG') + +local ZPSettingView = { + -- 修改牌字体 + onEXMainCallback = nil, + -- 修改手牌大小 + onUpdataCardSizeCallback = nil, + -- 语音 + onEXVoiceCallback = nil, + -- 快速出牌 + onEXChuPaiCallback = nil, + -- 方言 + onEXFangYanCallback = nil +} +local M = ZPSettingView + +function ZPSettingView.new(blur_view, index, open_social,cardIndex) + setmetatable(SettingView, {__index = BaseWindow}) + setmetatable(M, {__index = SettingView}) + local self = setmetatable({}, {__index = M}) + self.class = 'ZPSettingView' + self._currenIndex = 0 + self._blur_view = blur_view + self.onCallback = event('onCallback', true) + self.stateIndex = 0 + self.cd_time = 0 + self._btn_dismiss_room_enable = false + self._close_destroy = true + self.bigSize = 1.2 + self.mediumSize = 1 + self.smallSize = 0.8 + self._full = true + self._anim_pop = 2 + self._open_social = open_social + self._cardType=cardIndex + self:init('ui://Main_RunBeard/New_SettingWindow') + return self +end + +function M:init(url) + SettingView.init(self, url) + if DataManager.CurrenRoom == nil then + return + end + self._view = self._view:GetChild('showview') + + local view = self._view + local slider_sound = view:GetChild('slider_sound') + local slider_music = view:GetChild('slider_music') + -- local btn_music = view:GetChild('btn_music') + -- local btn_sound = view:GetChild('btn_sound') + + -- btn_music.selected = (GameApplication.Instance.MusicValue < 5 and false or true) + slider_sound.value = GameApplication.Instance.SoundValue + slider_music.value = GameApplication.Instance.MusicValue + -- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true + + slider_music.onChanged:Add( + function() + GameApplication.Instance.MusicValue = slider_music.value + -- btn_music.selected = GameApplication.Instance.MusicValue < 5 and false or true + end + ) + + slider_sound.onChanged:Add( + function() + GameApplication.Instance.SoundValue = slider_sound.value + -- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true + end + ) + + local room = DataManager.CurrenRoom + local c1 = self._view:GetController('cards') + if self._cardType then + c1.selectedIndex = self._cardType + end + + local size = self._view:GetController('size') + if room.change_card_size ~= nil then + + if room.change_card_size == self.bigSize then + size.selectedIndex = 0 + elseif room.change_card_size == self.mediumSize then + size.selectedIndex = 1 + elseif room.change_card_size == self.smallSize then + size.selectedIndex = 2 + end + else + room.change_card_size = 0 + size.selectedIndex = 0 + end + printlog("room.change_card_display===>>>",room.change_card_display) + if room.change_card_display ~= nil then + local _str = string.sub(room.change_card_display, 1, 1) + local n = tonumber(_str) + if n == 1 then + c1.selectedIndex = 1 + elseif n == 2 then + c1.selectedIndex = 0 + elseif n == 8 then + c1.selectedIndex = 3 + else + c1.selectedIndex = 2 + end + end + if self._open_social then + self._view:GetChild('n78').visible = true + self._view:GetChild('n88').visible = true + self._view:GetChild('n57').visible = true + + local yuyin = self._view:GetController('yuyin') + local chupai = self._view:GetController('chupai') + local fangyan = self._view:GetController('fangyan') + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. room.game_id .. 'yuyin') + local json_data1 = Utils.LoadLocalFile(user_id .. room.game_id .. 'chupai') + local json_data2 = Utils.LoadLocalFile(user_id .. room.game_id .. 'fangyan') + yuyin.selectedIndex = 1 + chupai.selectedIndex = 1 + room.yuyin_typeface = 1 + room.chupai_typeface = 1 + fangyan.selectedIndex = 1 + room.fangyan_typeface = 1 + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + room.yuyin_typeface = typeface + end + if json_data1 ~= nil then + local _data = json.decode(json_data1) + local typeface = _data['game_typeface'] + room.chupai_typeface = typeface + end + if json_data2 ~= nil then + local _data = json.decode(json_data2) + local typeface = _data['game_typeface'] + room.fangyan_typeface = typeface + end + if room.yuyin_typeface ~= nil then + yuyin.selectedIndex = room.yuyin_typeface + end + if room.chupai_typeface ~= nil then + chupai.selectedIndex = room.chupai_typeface + end + if room.fangyan_typeface ~= nil then + fangyan.selectedIndex = room.fangyan_typeface + end + else + self._view:GetChild('n78').visible = false + self._view:GetChild('n88').visible = false + self._view:GetChild('n57').visible = false + end + + c1.onChanged:Set( + function() + if self.onEXMainCallback then + self.onEXMainCallback(c1.selectedIndex + 1) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = c1.selectedIndex + 1 + local key = user_id .. room.game_id + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + + size.onChanged:Set( + function() + if self.onUpdataCardSizeCallback then + self.onUpdataCardSizeCallback(size.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_cardsize'] = size.selectedIndex + local key = user_id .. room.game_id .. 'cardsize_new' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + if self._open_social then + self._view:GetChild('n78').visible = false + local yuyin = self._view:GetController('yuyin') + local chupai = self._view:GetController('chupai') + local fangyan = self._view:GetController('fangyan') + yuyin.onChanged:Set( + function() + if self.onEXVoiceCallback then + room.yuyin_typeface = yuyin.selectedIndex + self.onEXVoiceCallback(yuyin.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = yuyin.selectedIndex + local key = user_id .. room.game_id .. 'yuyin' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + chupai.onChanged:Set( + function() + if self.onEXChuPaiCallback then + room.chupai_typeface = chupai.selectedIndex + self.onEXChuPaiCallback(chupai.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = chupai.selectedIndex + local key = user_id .. room.game_id .. 'chupai' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + fangyan.onChanged:Set( + function() + if self.onEXFangYanCallback then + room.fangyan_typeface = fangyan.selectedIndex + self.onEXFangYanCallback(fangyan.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = fangyan.selectedIndex + local key = user_id .. room.game_id .. 'fangyan' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + else + self._view:GetChild('n78').visible = false + end +end + +function M:Show() + SettingView.Show(self) + self:UpdateIndex() + self:UpdateCardSizeIndex() +end +--根据存的数据改变设置里面的控制器 + +function M:UpdateIndex() + local room = DataManager.CurrenRoom + local c1 = self._view:GetController('cards') + if room.change_card_display ~= nil then + local _str = string.sub(room.change_card_display, 1, 1) + local n = tonumber(_str) + if n == 7 then + n = 2 + end + if n == 1 then + c1.selectedIndex = 1 + elseif n == 2 then + c1.selectedIndex = 0 + elseif n == 8 then + c1.selectedIndex = 3 + else + c1.selectedIndex = 2 + end + end +end +function M:UpdateCardSizeIndex() + local room = DataManager.CurrenRoom + local size = self._view:GetController('size') + if room.change_card_size ~= nil then + if room.change_card_size == self.bigSize then + size.selectedIndex = 0 + elseif room.change_card_size == self.mediumSize then + size.selectedIndex = 1 + elseif room.change_card_size == self.smallSize then + size.selectedIndex = 2 + end + else + size.selectedIndex = 0 + end +end + +function M:SetBtnUpdateCardEnable(enable) + self._view:GetChild('n37').enabled = enable + self._view:GetChild('n38').enabled = enable + self._view:GetChild('n49').enabled = enable +end + +function M:FillBgSection(cb, game_id, default_bg, room, qihu) + if (default_bg == nil) then + default_bg = 1 + end + local view = self._view + local lst_bg = view:GetChild('lst_bg') + local ctr_bg = view:GetController('bg') + for i = 1, #bg_config_zipai do + local config = bg_config_zipai[i] + local item = lst_bg:AddItemFromPool() + item.icon = config.thumb + if i > 3 then + ctr_bg:AddPage(i - 1) + end + item.onClick:Add( + function() + cb(config.url) + ctr_bg.selectedIndex = i - 1 + if qihu ~= nil then + -- self._blur_view:GetChild('di_text').text = room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起' + self._blur_view:GetController('bg_state').selectedIndex = i - 1 + end + end + ) + end + self._game_id = game_id + self._bg = ZPTableBG.GetTableBG(game_id) + local index = 0 + if self._bg > 0 then + lst_bg.selectedIndex = self._bg - 1 + index = lst_bg.selectedIndex + else + ctr_bg.selectedIndex = default_bg - 1 + index = ctr_bg.selectedIndex + end + if qihu ~= nil then + -- self._blur_view:GetChild('di_text').text = room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起' + if index < 3 then + self._blur_view:GetController('bg_state').selectedIndex = index + else + self._blur_view:GetController('bg_state').selectedIndex = 0 + end + end +end +function M:Destroy() + local bg_id = self._view:GetController('bg').selectedIndex + 1 + if self._bg ~= bg_id then + self._bg = bg_id + ZPTableBG.SaveTableBG(self._game_id, self._bg) + end + SettingView.Destroy(self) +end + +return M diff --git a/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPTableBG.lua b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPTableBG.lua new file mode 100644 index 00000000..e11083ee --- /dev/null +++ b/lua_probject/extend_project/extend/zipai/yueyangwaihuzi_bak/main/ZPTableBG.lua @@ -0,0 +1,84 @@ +-- 记录各游戏的桌面背景 +json = require 'cjson' + +local ZPTableBG = {} + +local M = ZPTableBG + bg_config_zipai = { + {id = 1, url = "base/main_zipai/bg/bg_1", thumb = "ui://Main_RunBeard/table_bg1"}, + {id = 2, url = "base/main_zipai/bg/bg_2", thumb = "ui://Main_RunBeard/table_bg2"}, + {id = 3, url = "base/main_zipai/bg/bg_3", thumb = "ui://Main_RunBeard/table_bg3"}, + -- {id = 4, url = "base/main_zipai/bg/bg_gold", thumb = "ui://Main_RunBeard/table_bg3"}, + -- {id = 5, url = "base/main_zipai/bg/bg8", thumb = "ui://Main_RunBeard/table_bg1"}, + -- {id = 6, url = "base/tablebg/bg/bg1", thumb = "ui://Common/b04"}, +} + +local function GetBG(data, game_id) + local bg_id = 0 + for i = 1, #data do + if data[i].game_id == game_id then + bg_id = data[i].bg_id + break + end + end + return bg_id +end +local function SetBG(data, game_id, bg_id) + local contain_key = false + for i = 1, #data do + if data[i].game_id == game_id then + contain_key = true + if data[i].bg_id ~= bg_id then + data[i].bg_id = bg_id + break + end + end + end + if not contain_key then + local _data = {} + _data.game_id = game_id + _data.bg_id = bg_id + table.insert(data, _data) + end +end + +function ZPTableBG.GetTableBG(game_id) + local id = -1 + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + local config_data = json.decode(json_data) + id = GetBG(config_data, game_id) + end + return id +end + +function ZPTableBG.LoadTableBG(id, game_id, main_view) + local bg_id = M.GetTableBG(game_id) + local index + if bg_id > 0 then + index = bg_id + else + index = id + end + + if index>3 then + -- body + index=1 + end + local url = bg_config_zipai[index].url + LoadGameBg(url, main_view) +end + +function ZPTableBG.SaveTableBG(game_id, bg_id) + local config_data + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + config_data = json.decode(json_data) + else + config_data = {} + end + SetBG(config_data, game_id, bg_id) + Utils.SaveLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code, json.encode(config_data)) +end + +return M \ No newline at end of file diff --git a/lua_probject/main_project/.vscode/settings.json b/lua_probject/main_project/.vscode/settings.json new file mode 100644 index 00000000..0cce13b6 --- /dev/null +++ b/lua_probject/main_project/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "editor.snippetSuggestions": "bottom" +} \ No newline at end of file diff --git a/lua_probject/main_project/main/majiang/FZData.lua b/lua_probject/main_project/main/majiang/FZData.lua new file mode 100644 index 00000000..451358bc --- /dev/null +++ b/lua_probject/main_project/main/majiang/FZData.lua @@ -0,0 +1,70 @@ +--放子数据对象 +--author:-- + +--[[ +--数据字段参考 + +local FZData = { + -- 放子类型 + type = TX_FZType.Chi, + -- 吃的牌 + card = 0, + -- 激活牌 + active_card = 0, + -- + from_seat = 0, + +} + + +local FZTip = { + --提示ID + id = 0, + --权重 + weight = 0, + --类型 + type = 0, + --牌 + card = 0, + --手牌吃牌组 + op_card = nil +} + +]]-- + +FZType = +{ + Chi = 1, + Peng = 2, + Gang = 3, + Gang_An = 4, + Gang_Peng = 5, + HU = 6, +} + +local FZTipList = { + tip_map_id = nil, + tip_map_type = nil +} + +local M = FZTipList + +function M.new() + local self = {} + setmetatable(self,{__index = FZTipList}) + self.tip_map_id = {} + self.tip_map_type = {} + return self +end + +function M:AddTip(tip) + self.tip_map_id[tip.id] = tip + local tiplist = self.tip_map_type[tip.weight] + if not tiplist then + tiplist = {} + self.tip_map_type[tip.weight] = tiplist + end + tiplist[#tiplist+1] = tip +end + +return M \ No newline at end of file diff --git a/lua_probject/main_project/main/majiang/HuTipView.lua b/lua_probject/main_project/main/majiang/HuTipView.lua new file mode 100644 index 00000000..372c55ca --- /dev/null +++ b/lua_probject/main_project/main/majiang/HuTipView.lua @@ -0,0 +1,118 @@ +local HuTipView = { + _view_start_pos = nil, + _touch_start_pos = nil, +} + +local M = HuTipView + +function M.new(main_view) + local self = {} + self.class = "HuTipView" + setmetatable(self,{__index = HuTipView}) + self._main_view = main_view + self:init() + return self +end + +local function SetObjEnabled(obj, enabled) + obj.visible = enabled + obj.touchable = enabled +end +function M:OnTouchBegin(context) + self._view_start_pos = Vector2(self._view.x, self._view.y) + self._touch_start_pos = self._main_view._view:GlobalToLocal(Vector2(context.inputEvent.x, context.inputEvent.y)) +end +function M:OnTouchMove(context) + local xy = self._main_view._view:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + local dist = Vector2(xy.x - self._touch_start_pos.x, xy.y - self._touch_start_pos.y) + local posx = self._view_start_pos.x + dist.x + local posy = self._view_start_pos.y + dist.y + local max_x = self._main_view._view.width - self._view.width + local max_y = self._main_view._view.height - self._view.height + self._view.x = posx < 0 and 0 or posx > max_x and max_x or posx + self._view.y = posy < 0 and 0 or posy > max_y and max_y or posy +end + +function M:init() + self._view = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Hu_tip") + self._main_view._view:AddChild(self._view) + local width = self._view.width + local m_width = self._main_view._view.width + local m_height = self._main_view._view.height + -- 初始位置 + self._view.x = 0 + self._view.y = 0.675 * m_height + SetObjEnabled(self._view, false) + self._view.onTouchBegin:Add(handler(self, self.OnTouchBegin)) + self._view.onTouchMove:Add(handler(self, self.OnTouchMove)) +end + +-- function M:FillData(cards) +-- local lst_card = self._view:GetChild("lst_card") +-- lst_card:RemoveChildrenToPool() +-- local num = #cards +-- if num > 0 then +-- if num > 3 and num <= 28 then +-- self._view.width = 191 + ((num > 7 and 7 or num) - 3) * 38 +-- self._view.height = 69 + (math.ceil(num / 7) - 1) * 56 +-- else +-- self._view.width = 191 +-- self._view.height = 69 +-- end +-- for i = 1, num do +-- local item = lst_card:AddItemFromPool() +-- item:GetChild("icon").icon = "ui://Main_Majiang/202_" .. cards[i] +-- end +-- SetObjEnabled(self._view, true) +-- else +-- SetObjEnabled(self._view, false) +-- end +-- end + +function M:FillData(cards, posX) + -- local btn_showtip = self._main_view._view:GetChild("btn_showtip") + local lst_card = self._view:GetChild("lst_card") + lst_card:RemoveChildrenToPool() + local num = #cards + if num > 0 then + local o_width = 192 + local i_width = 93 + local column_gap = 43 + lst_card.columnGap = column_gap + if num > 1 then + self._view.width = o_width + (num - 1) * i_width + else + self._view.width = o_width + end + local count = 0 + for i = 1, num do + local item = lst_card:AddItemFromPool() + local card = cards[i] + item:GetChild("icon").icon = "ui://Main_Majiang/" .. self:GetPrefix() .. "201_" .. card + local left_num = self._main_view:CountCardLeftNum(card) + local tex_num = item:GetChild("tex_num") + tex_num.text = left_num .. "张" + tex_num.visible = true + count = count + left_num + end + self._view:GetChild("tex_num").text = count + if posX then + if posX + self._view.width > 1300 then + posX = 1300 - self._view.width + end + self._view.x = posX + SetObjEnabled(self._view, true) + else + -- self._view.x = self._main_view._view.width * 0.2 - self._view.width * 0.5 + SetObjEnabled(self._view, true) + end + else + SetObjEnabled(self._view, false) + end +end + +function M:GetPrefix() + return get_majiang_prefix(DataManager.CurrenRoom.game_id) +end + +return M \ No newline at end of file diff --git a/lua_probject/main_project/main/majiang/MJChange3d.lua b/lua_probject/main_project/main/majiang/MJChange3d.lua new file mode 100644 index 00000000..16d8fca6 --- /dev/null +++ b/lua_probject/main_project/main/majiang/MJChange3d.lua @@ -0,0 +1,100 @@ +local MJSettingViewNew = import '.MJSettingViewNew' +local TableBG = import '.MJTableBG' + +local MJChange3d = {} +local M = MJChange3d + + +function M.new(blur_view) + setmetatable(M, {__index = BaseWindow}) + local self = setmetatable({}, {__index = M}) + self.class = "MJChange3d" + + self._blur_view = blur_view + self.onChangeCard3d = event("onCallback",true) + + self:init("ui://Main_Majiang/change3d") + + return self +end + +local function GetNewerFlag(data, game_id) + local bRet = true + for i = 1, #data do + if data[i].game_id == game_id then + if data[i].bNewer ~= nil then + bRet = data[i].bNewer + end + break + end + end + return bRet +end + +local function SetNewer(data, game_id) + + local contain_key = false + for i = 1, #data do + if data[i].game_id == game_id then + contain_key = true + data[i].bNewer = false + end + end + + if not contain_key then + local _data = {} + _data.game_id = game_id + _data.bNewer = false + table.insert(data, _data) + end +end + +function M:IsNewer(game_id) + local bRet = true + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + local config_data = json.decode(json_data) + bRet = GetNewerFlag(config_data, game_id) + end + + return bRet +end + + +function M:SaveNewer(game_id) + local config_data + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + config_data = json.decode(json_data) + else + config_data = {} + end + SetNewer(config_data, game_id, bg_id) + Utils.SaveLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code, json.encode(config_data)) + +end + + +function M:init(url) + + BaseWindow.init(self,url) + + local view = self._view + + local btn_confirm = view:GetChild("btn_confirm") + btn_confirm.onClick:Set(function() + + local n3d = view:GetController("3d").selectedIndex + if n3d == 1 then + if self.onChangeCard3d then + + MJSettingViewNew:Change3DMode() + self.onChangeCard3d(TableBG.GetBGConfig()[4].url) + end + end + + self:Destroy() + end) +end + +return M \ No newline at end of file diff --git a/lua_probject/main_project/main/majiang/MJGameController.lua b/lua_probject/main_project/main/majiang/MJGameController.lua new file mode 100644 index 00000000..9b90ddcc --- /dev/null +++ b/lua_probject/main_project/main/majiang/MJGameController.lua @@ -0,0 +1,12 @@ + +local M = {} + +setmetatable(M,{__index = GameController}) + +function M:init(name) + GameController.init(self,name) +end + + + +return M diff --git a/lua_probject/main_project/main/majiang/MJMainRightPanelView.lua b/lua_probject/main_project/main/majiang/MJMainRightPanelView.lua new file mode 100644 index 00000000..7311d0ee --- /dev/null +++ b/lua_probject/main_project/main/majiang/MJMainRightPanelView.lua @@ -0,0 +1,101 @@ +local PlayerDistanceView = import("Game.View.PlayerDistanceView") +local MainRightPanelView = require("Game.View.MainRightPanelView") +local MJMainRightPanelView = { + -- 查看记录 + onLogCallback = nil +} + +local M = MJMainRightPanelView + + +local function __init(self,mainView,view) + + local right_panel = view + + local btn_setting = right_panel:GetChild("btn_setting") + btn_setting.onClick:Set(function() + + + local _settingView = mainView:NewSettingView() + _settingView.stateIndex = (mainView._room.curren_round >= 1 and mainView._allow_dissmiss) and 2 or 1 + _settingView.cd_time = mainView.dismiss_room_cd_time + _settingView:Show() + + local room = DataManager.CurrenRoom + _settingView.onCallback:Add(function(context) + local _gamectr = ControllerManager.GetController(GameController) + if (room.CurnrenState == StateType.Ready) then + _gamectr:LevelRoom(function(response) + if (response.ReturnCode == 0) then + ViewManager.ChangeView(ViewManager.View_Lobby) + GameApplication.Instance:ShowTips("房间已解散!") + end + end) + else + + if mainView.dismiss_room_cd_time > 0 then + GameApplication.Instance:ShowTips("您还处于解散冷却时间当中,请稍后重试!") + else + _gamectr:AskDismissRoom() + end + end + end) + end) + + self._tex_data = right_panel:GetChild("tex_data") + self._tex_time = right_panel:GetChild("tex_time") + self._pb_batteryLevel = right_panel:GetChild("pb_batteryLevel") + self._xinhao = right_panel:GetController("xinhao") + self.ctr_xh = right_panel:GetChild("gcm_xinhao"):GetController("c1") + self.ctr_wifi = right_panel:GetChild("gcm_wifi"):GetController("c1") + self._tex_ping = right_panel:GetChild("gcm_xinhao"):GetChild("n7") + + self.ctr_log = right_panel:GetController("log") + local btn_log = right_panel:GetChild("btn_log") + btn_log.onClick:Set(function() + if self.onLogCallback then + self.onLogCallback() + end + end) + + self._total_time = 0 + self:__UpdateTime() +end + + +--- Create a new MainRightPanelView +function MJMainRightPanelView.new(mainView,view) + setmetatable(M, {__index = MainRightPanelView}) + local self = setmetatable({}, {__index = M}) + self.class = "MJMainRightPanelView" + __init(self,mainView,view) + return self +end + + + +function M:__UpdateTime() + self._tex_data.text = os.date("%Y-%m-%d") + self._tex_time.text = os.date("%H:%M") + if Application.platform == RuntimePlatform.IPhonePlayer or Application.platform == RuntimePlatform.Android then + self._pb_batteryLevel.value = GameApplication.Instance:GetBatteryLevel() + end + + local NetworkReachability = UnityEngine.NetworkReachability + local _client = ControllerManager.GameNetClinet + if not _client then return end + local ping = _client:getAveragePingTime() + if not ping then return end + ping = math.floor(ping / 2) + if ping > 300 then ping =300 end + if ping <= 100 then + self.ctr_xh.selectedIndex = 0 + elseif ping <= 300 then + self.ctr_xh.selectedIndex = 1 + else + self.ctr_xh.selectedIndex = 2 + end + self._tex_ping.text = ping .. "ms" +end + +return M diff --git a/lua_probject/main_project/main/majiang/MJMainView.lua b/lua_probject/main_project/main/majiang/MJMainView.lua new file mode 100644 index 00000000..621fb687 --- /dev/null +++ b/lua_probject/main_project/main/majiang/MJMainView.lua @@ -0,0 +1,548 @@ +local MJPlayerCardInfoView = import(".MJPlayerCardInfoView") +local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView") +local TableBG = require("Game.Data.TableBG") +local MJSettingView = import(".MJSettingViewNew") +local MJMainRightPanelView = import(".MJMainRightPanelView") + + local bg_config = { + {id = 1, url = "base/main_majiang/bg/bg1", thumb = "ui://Main_Majiang/b01"}, + {id = 2, url = "base/main_majiang/bg/bg2", thumb = "ui://Main_Majiang/b02"}, + {id = 3, url = "base/main_majiang/bg/bg3", thumb = "ui://Main_Majiang/b03"} +} + +local M = {} + +setmetatable(M,{__index = MainView}) + +local default_bg = 1 +function M:InitView(url, use_custom_bg) + -- 加载牌型数据 + if not DataManager.CardTypeList then + local json_data = Utils.LoadLocalFile("CardTypeData") + if json_data then + DataManager.CardTypeList = json.decode(json_data) + else + DataManager.CardTypeList = {} + end + end + self._room.card_type = DataManager.CardTypeList[tostring(self._room.game_id)] or 1 + + UIPackage.AddPackage("base/main_majiang/ui/Main_Majiang") + + MainView.InitView(self,url) + local _view = self._view + self._cursor = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Ani_play_bj") + if not use_custom_bg then + TableBG.LoadTableBG(default_bg, self._room.game_id, self._root_view, bg_config) + end + + local _room = self._room + + local _cardbox = _view:GetChild("cardbox") + + self._zhuanpanCtr=_cardbox:GetController("zuozi") + self._ctr_cardbox = _cardbox:GetController("c1") + self._tex_leftTime = _cardbox:GetChild("tex_leftnum") + + + if self._room.card_type == 2 then + self:Change3d(true) + else + self:Change3d(false) + end + + local rightpanel = self._view:GetChild("com_roominfo") + if self._rightPanelView ~= nil then + self._rightPanelView:Destroy() + end + self._rightPanelView = MJMainRightPanelView.new(self, rightpanel) + + --local tempdsaf=self._view:GetChild("btn_back_jiesan") + --tempdsaf:GetChild("n3").displayObject.gameObject:SetActive(false) + + --print("2222222222222222222222") + --print(self._view:GetChild("btn_back_jiesan").displayObject.gameObject.name) + --self._view:GetChild("btn_back_jiesan").displayObject.gameObject:SetActive(false) + --local temp111=self._view:GetChild("btn_back_jiesan").displayObject.gameObject + --temp111:SetActive(false) + self._view:GetChild("btn_back_jiesan").onClick:Set(function () + if self.dismiss_room_cd_time > 0 then + ViewUtil.ErrorTip(nil, "您还处于解散冷却时间当中,请稍后重试!") + else + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:AskDismissRoom() + end + + end) + + + self._tex_LeftCard = _view:GetChild("remaining_card") + + self._player_card_info = {} + + local _player_card_info = self._player_card_info + for i = 1, _room.room_config.people_num do + local tem = _view:GetChild("player_card_info" .. i) + _player_card_info[i] = self:NewMJPlayerCardInfoView(tem,i) + end + + local list = _room.player_list + for i=1,#list do + local p = list[i] + local info = _player_card_info[self:GetPos(p.seat)] + info:SetPlayer(p) + info:FillData() + end + + local list = _room.player_list + local readyNum = 0 + for i=1,#list do + local p = list[i] + if p.ready then readyNum = readyNum + 1 end + end + + for i=1,#_room.player_list do + + local p = _room.player_list[i] + local zi,icon = self:GetPosString(p.seat) + if self._room.card_type == 2 then + _cardbox:GetChild("3d_direction"..self:GetIndex(self:GetPos(p.seat))).icon = "ui://MajiangCard3d/"..icon + end + + _cardbox:GetChild("direction"..self:GetIndex(self:GetPos(p.seat))).text = zi + end + + self._ctr_action = _view:GetController("action") + if _room.banker_seat == _room.self_player.seat and readyNum == _room.room_config.people_num then + --self._ctr_action.selectedIndex = 2 + elseif not _room.self_player.ready then + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig then + if round>1 then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 2 + end + + else + self._ctr_action.selectedIndex = 1 + end + else + self._ctr_action.selectedIndex = 0 + end + + self:InitXiPai() + self:InitXiPai1() +end + + +function M:InitXiPai() + self._xipaiPanel = UIPackage.CreateObjectFromURL("ui://Common/panel_handanim") + self._xipaiPanel.visible=false + self._root_view:AddChild(self._xipaiPanel) + + local offset = get_offset(self._full_offset) + + self._xipaiPanel.width = GRoot.inst.width - (offset * 2) + self._xipaiPanel.height = GRoot.inst.height + self._xipaiPanel.x = offset + + self._handAnimCtr=self._xipaiPanel:GetController("anim") + self._handAnimCtr.selectedIndex=0 + --self:PlayXiPai() +end + + +function M:InitXiPai1() + self._xipaiPanel1 = UIPackage.CreateObjectFromURL("ui://Common/panel_handanim02") + self._xipaiPanel1.visible=false + self._root_view:AddChild(self._xipaiPanel1) + + local offset = get_offset(self._full_offset) + + self._xipaiPanel1.width = GRoot.inst.width - (offset * 2) + self._xipaiPanel1.height = GRoot.inst.height + self._xipaiPanel1.x = offset + + self._handAnimCtr1=self._xipaiPanel1:GetController("anim1") + self._handAnimCtr1.selectedIndex=0 +end + + +function M:PlayXiPai(xipaiCallBack) + if self._xipaiPanel then + coroutine.start(function() + self._xipaiPanel.visible=true + self._xipaiPanel:GetTransition("XiPai"):Play() + self._handAnimCtr.selectedIndex=1 + coroutine.wait(3) + self._handAnimCtr.selectedIndex=0 + self._xipaiPanel.visible=false + if xipaiCallBack then + xipaiCallBack() + end + end) + + + end +end + +function M:PlayXiPai1(xipaiCallBack) + if self._xipaiPanel1 then + coroutine.start(function() + self._xipaiPanel1.visible=true + self._xipaiPanel1:GetTransition("XiPai"):Play() + self._handAnimCtr1.selectedIndex=1 + coroutine.wait(3) + self._handAnimCtr1.selectedIndex=0 + self._xipaiPanel1.visible=false + if xipaiCallBack then + xipaiCallBack() + end + end) + + + end +end + + +function M:EventInit() + MainView.EventInit(self) +end + +function M:Change3d(flag) + + local _room = self._room + local _view = self._view + + local _cardbox = _view:GetChild("cardbox") + + for i=1,#_room.player_list do + + local p = _room.player_list[i] + local zi,icon = self:GetPosString(p.seat) + if self._room.card_type == 2 then + _cardbox:GetChild("3d_direction"..self:GetIndex(self:GetPos(p.seat))).icon = "ui://MajiangCard3d/"..icon + end + + _cardbox:GetChild("direction"..self:GetIndex(self:GetPos(p.seat))).text = zi + end + + -- 如果要切换3d牌桌的cardbox位置及上方文字(剩余牌,回合数)显示不错乱,需要做以下改动 + -- 取消文字组合的3d控制器的位置, 并设置对cardbox的关联,左左,顶顶 + if flag == true then + + if _view:GetController("3d") ~= nil then + _view:GetController("3d").selectedIndex = 1 + _cardbox.x = (_view.width - _cardbox.width) * 0.5 + end + + _cardbox:GetController("3d").selectedIndex = 1 + _cardbox.x = (_view.width - _cardbox.width) * 0.5 + else + if _view:GetController("3d") ~= nil then + _view:GetController("3d").selectedIndex = 0 + _cardbox.x = (_view.width - _cardbox.width) * 0.5 + end + + _cardbox:GetController("3d").selectedIndex = 0 + _cardbox.x = (_view.width - _cardbox.width) * 0.5 + end +end + +-- function M:NewSettingView() +-- local settingView = MJSettingView.new(self._root_view) +-- settingView:FillBgSection(function(url) +-- LoadGameBg(url, self._root_view) +-- end, self._room.game_id, default_bg) +-- settingView.onChangeCardCallback:Add(function() + +-- self:Change3d(DataManager.CurrenRoom.card_type == 2) +-- self:ReloadRoom() + +-- for i = 1, #self._room.player_list do +-- local p = self._room.player_list[i] +-- local card_info = self._player_card_info[self:GetPos(p.seat)] +-- card_info:ResetCardType() +-- end +-- end) + +-- settingView.onEXVoiceCallback:Add(function() + +-- end) +-- settingView.onEXChuPaiCallback:Add(function() + +-- end) +-- return settingView +-- end + +function M:NewSettingView() + local settingView = MJSettingView.new(self._root_view) + -- settingView._view:GetChild("btn_card_1").icon = pack_full_name .. "com_card_preview" + -- local gear = settingView._view:GetChild("panel_bg"):GetGear(0) + -- gear.pages = {"0", "1", "2"} + -- gear:Apply() + -- settingView.Change3d = function() end + + settingView:FillBgSection(function(url,index) + LoadGameBg(url, self._root_view) + self._zhuanpanCtr.selectedIndex=index-1 + end, self._room.game_id, 1, bg_config) + + settingView.onChangeCardCallback:Add(function() + self:RemoveCursor() + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + local card_info = self._player_card_info[self:GetPos(p.seat)] + card_info:Clear(true) + card_info:ResetCardType() + end + self:Change3d(DataManager.CurrenRoom.card_type == 2) + self:ReloadRoom(true) + end) + return settingView +end + +function M:GetIndex(seat) + local index = seat + local people_num = self._room.room_config.people_num + if people_num == 2 and seat == 2 then + index = 3 + elseif people_num == 3 and seat == 3 then + index = 4 + end + return index +end + +function M:GetPosString(seat) + + if DataManager.CurrenRoom.room_config.people_num == 4 then + if seat == 1 then + return "东","dir_1" + elseif seat == 2 then + return "南","dir_2" + elseif seat == 3 then + return "西","dir_3" + elseif seat == 4 then + return "北","dir_4" + end + elseif DataManager.CurrenRoom.room_config.people_num == 3 then + if seat == 1 then + return "东","dir_1" + elseif seat == 2 then + return "南","dir_2" + elseif seat == 3 then + return "西","dir_3" + end + elseif DataManager.CurrenRoom.room_config.people_num == 2 then + if seat == 1 then + return "东","dir_1" + elseif seat == 2 then + return "西","dir_3" + end + end +end + +function M:SetCardBoxPosition() + local _room = self._room + for i = 1, _room.room_config.people_num do + local tex = self._view:GetChild("cardbox"):GetChild("direction"..i) + local index = _room.self_player.seat + i - 1 + index = index > 4 and index - 4 or index + tex.text = self._gamectr:GetPosString(index) + end +end + +function M:markOutCards(showTip, data) + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + for j = 1, #p.outcard_list do + local card = p.outcard_list[j] + if card == data then + for k = 1, #p.outcard_list do + local obj = info:GetOutCardByIndex(k) + if obj.data == card then + obj:GetController("gray").selectedIndex = showTip and 1 or 0 + end + end + end + end + end +end + +function M:OnPlayerEnter(...) + MainView.OnPlayerEnter(self,...) + local arg = {...} + local p = arg[1] + local info = self._player_card_info[self:GetPos(p.seat)] + info:SetPlayer(p) + info:FillData() +end + +function M:OnPlayerReady( ... ) + local arg = {...} + local p = arg[1] + local _room = self._room + local _view = self._view + + local _player_info = self._player_info + if p.seat == _room.self_player.seat then + self._ctr_action.selectedIndex = 0 + if p.entrust and self._clearingView and self._clearingView.DestroyWithCallback then + self._clearingView:DestroyWithCallback() + end + end + local info = _player_info[self:GetPos(p.seat)] + info:Ready(true) + + local readyNum = self:GetReadyNum() + + + if readyNum == _room.room_config.people_num then + local _cardbox = _view:GetChild("cardbox") + for i=1,#_room.player_list do + + local p = _room.player_list[i] + local zi,icon = self:GetPosString(p.seat) + _cardbox:GetChild("3d_direction"..self:GetIndex(self:GetPos(p.seat))).icon = "ui://MajiangCard3d/"..icon + _cardbox:GetChild("direction"..self:GetIndex(self:GetPos(p.seat))).text = zi + end + end + + if _room.banker_seat == _room.self_player.seat and readyNum == _room.room_config.people_num then + if self._state.selectedIndex == 2 then + local _gamectr = ControllerManager.GetController(GameController) + _gamectr:StartGame() + end + + --self._ctr_action.selectedIndex = 2 + elseif not _room.self_player.ready then + --self._ctr_action.selectedIndex = 1 + local round=DataManager.CurrenRoom.room_config.config.times or 1 + local xpconfig=DataManager.CurrenRoom.room_config.config.xi_pai + if xpconfig then + if round>1 then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 2 + end + + else + self._ctr_action.selectedIndex = 1 + end + else + self._ctr_action.selectedIndex = 0 + end +end + +function M:CountCardLeftNum(card) + local player_list = DataManager.CurrenRoom.player_list + local count = 4 + for i = 1, #player_list do + local p = player_list[i] + if p.card_list then + for j = 1, #p.card_list do + if p.card_list[j] == card then + count = count - 1 + end + end + end + for j = 1, #p.outcard_list do + if p.outcard_list[j] == card then + count = count - 1 + end + end + for j = 1, #p.fz_list do + local fz = p.fz_list[j] + if fz.type == FZType.Chi then + for k = 1, #fz.opcard do + if card == fz.opcard[k] then + count = count - 1 + break + end + end + else + local num = fz.type == FZType.Peng and 3 or 4 + if card == fz.card then + count = count - num + end + end + end + end + return count +end + +function M:OnPlayerLeave( ... ) + MainView.OnPlayerLeave(self, ...) + local _room = self._room + if _room.banker_seat == _room.self_player.seat then + self._ctr_action.selectedIndex = 0 + end +end + +function M:PlayerChangeLineState() + local isOutCard = true + local str = "玩家 " + for _ , player in ipairs(self._room.player_list) do + if player.line_state == 0 then + isOutCard = false + -- str = str .. self._gamectr:GetPosString(player.seat) .. "、" + end + end + -- if not isOutCard then + -- str = str.sub(str, 1, string.len(str) - string.len("、")) + -- str = str .. " 正在赶来,请稍等" + -- if self._room.curren_round > 0 then + -- self._waitingView = ModalWaitingView.new(self._view, str) + -- end + -- else + -- if self._waitingView then + -- self._waitingView:CloseWaitingView() + -- end + -- end + self._player_card_info[1]._area_handcard_list.touchable = isOutCard +end + +function M:NewMJPlayerCardInfoView(view,index) + if index == 1 then + return MJPlayerSelfCardInfoView.new(view,self) + end + return MJPlayerCardInfoView.new(view,self) +end + +function M:RemoveCursor() + if self._cursor.parent then + self._cursor.parent:GetController("color").selectedIndex = 0 + end + self._cursor:RemoveFromParent() +end + +function M:Destroy() + UIPackage.RemovePackage("base/main_majiang/ui/Main_Majiang") + MainView.Destroy(self) + self._cursor:Dispose() + self._xipaiPanel:Dispose() +end + +local majiang_asset_path = "base/main_majiang/sound/" +function M:PlayMJSound(path) + ViewUtil.PlaySound(self.asset_group, majiang_asset_path .. path) +end + +function M:PlayMJMusic(path) + ViewUtil.PlayMuisc(self.asset_group, majiang_asset_path .. path) +end + +function M:PlaySound(group,sex,path) + local sex_path = ViewUtil.Sex_Chat[sex] + local path1 = majiang_asset_path .. string.format("%s/%s.mp3",sex_path,path) + ViewUtil.PlaySound(group,path1) +end + +function M:GetPrefix() + return get_majiang_prefix(DataManager.CurrenRoom.game_id) +end + +return M \ No newline at end of file diff --git a/lua_probject/main_project/main/majiang/MJPlayBackView.lua b/lua_probject/main_project/main/majiang/MJPlayBackView.lua new file mode 100644 index 00000000..25f24dea --- /dev/null +++ b/lua_probject/main_project/main/majiang/MJPlayBackView.lua @@ -0,0 +1,191 @@ +local MJPlayerCardInfoView = import(".MJPlayerCardInfoView") +local MJPlayerSelfCardInfoView = import(".MJPlayerSelfCardInfoView") +local TableBG = import('Game.Data.TableBG') + + --- +local M = {} + +setmetatable(M,{__index = PlayBackView}) + +local bg_config = { + {id = 1, url = "base/main_majiang/bg/bg1", thumb = "ui://Main_Majiang/b01"} +} +function M:InitView(url) + UIPackage.AddPackage("base/main_majiang/ui/Main_Majiang") + PlayBackView.InitView(self,url) + local _view = self._view + self._cursor = UIPackage.CreateObjectFromURL("ui://Main_Majiang/Ani_play_bj") + TableBG.LoadTableBG(1, nil, self._root_view,bg_config) + + UpdateBeat:Add(self.OnUpdate,self) +end + +function M:FillRoomData() + local _room = self._room + if self._player_card_info == nil or #self._player_card_info == 0 then + self._player_card_info = {} + local _player_card_info = self._player_card_info + for i = 1, _room.room_config.people_num do + local tem = self._view:GetChild("player_card_info" .. i) + _player_card_info[i] = self:NewMJPlayerCardInfoView(tem,i) + end + end + + + local list = _room.player_list + for i=1,#list do + local p = list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + info:SetPlayer(p) + info:FillData() + end + self:SetCardBoxPosition() + + local list = _room.player_list + for i=1,#list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + end +end + +function M:SetCardBoxPosition() + local _room = self._room + for i = 1, _room.room_config.people_num do + local tex = self._view:GetChild("cardbox"):GetChild("direction"..i) + local index = _room.self_player.seat + i - 1 + index = index > 4 and index - 4 or index + tex.text = self._gamectr:GetPosString(index) + end +end + +function M:NewMJPlayerCardInfoView(view,index) + return MJPlayerCardInfoView.new(view,self) +end + +function M:NextRecordPlay() + self:RemoveCursor() + local result = PlayBackView.NextRecordPlay(self) + if not result then return end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() +end + +function M:LastRecordPlay() + self:RemoveCursor() + local result = PlayBackView.LastRecordPlay(self) + if not result then return end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() +end + +function M:Play() + self:ChangeAlpha() + self:ChangePlayState(not self._play) + if not self._play then return end + if (self._currentStep == #self.cmdList and self._playFoward) or (self._currentStep == 0 and not self._playFoward) then + self._currentStep = 0 + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:ChangePlayState(state) + self._play = state + self:ChangeTextSpeed() + local btn_play = self._view:GetChild("panel_record"):GetChild("btn_play") + if self._play then + btn_play:GetController("state").selectedIndex = 1 + else + btn_play:GetController("state").selectedIndex = 0 + end +end + +function M:ChangeTextSpeed() + local str1 = self._play and self._speed or "" + self._view:GetChild("panel_record"):GetChild("tex_speed").text = str1 + local str2 = not self._play and (self._playFoward and "播放暂停" or "回退暂停") or self._playFoward and (self._speed == 1 and "播放" or "快进") or (self._speed == 1 and "回退" or "快退") + self._view:GetChild("panel_record"):GetChild("tex_2").text = str2 + local str3 = self._play and "倍速度" or "" + self._view:GetChild("panel_record"):GetChild("tex_1").text = str3 +end + +function M:CmdLeftArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if not self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = false + self:ChangeTextSpeed() + end +end + +function M:CmdRightArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:OnUpdate() + if self._play then + if (self._currentStep == #self.cmdList and self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil,"当前已是录像结尾了,再次点击播放按钮可重新播放") + return + elseif (self._currentStep == 0 and not self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil,"当前已是录像开头了,再次点击播放按钮可重新播放") + return + end + self._timer = self._timer + Time.deltaTime + if self._timer >= 1 / self._speed then + self._timer = 0 + local step = self._playFoward and 1 or -1 + self._currentStep = self._currentStep + step + self:ShowStep(self._currentStep) + end + end +end + +function M:RemoveCursor() + if self._cursor.parent then + self._cursor.parent:GetController("color").selectedIndex = 0 + end + self._cursor:RemoveFromParent() +end + +function M:GetPrefix() + return get_majiang_prefix(DataManager.CurrenRoom.game_id) +end + +function M:Destroy() + if self._cursor then self._cursor:Dispose() end + UpdateBeat:Remove(self.OnUpdate,self) + PlayBackView.Destroy(self) +end + +return M \ No newline at end of file diff --git a/lua_probject/main_project/main/majiang/MJPlayer.lua b/lua_probject/main_project/main/majiang/MJPlayer.lua new file mode 100644 index 00000000..3d81cfaf --- /dev/null +++ b/lua_probject/main_project/main/majiang/MJPlayer.lua @@ -0,0 +1,40 @@ + + +local MJPlayer = { + -- 自动出牌 + auto_out_card = false, + -- 手牌列表 + hand_cards = nil, + card_list = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil +} + +local M = MJPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.hand_cards = {} + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.hand_cards = {} + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 +end + +return M \ No newline at end of file diff --git a/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua b/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua new file mode 100644 index 00000000..85d74c7e --- /dev/null +++ b/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua @@ -0,0 +1,619 @@ +AreaOderType = { + left_right = 'left_right', + right_left = 'right_left', + up_down = 'up_down', + down_up = 'down_up' +} + +local PlayerCardInfoView = { + _view = nil, + _mainView = nil, + _mask_liangpai = nil, + _mask_data = nil, + _area_handcard_list = nil, + _src_fz_list = nil, + _current_card_type = -1 +} + +local M = PlayerCardInfoView + +--- Create a new PlayerCardInfoView +function M.new(view, mainView) + local self = {} + setmetatable(self, {__index = M}) + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:init() + local view = self._view + local _area_mask = view:GetChild('area_mask') + local mask = _area_mask.text + + self._mask_data = json.decode(mask) + self._area_handcard_list = view:GetChild('area_handcard_list') + + self._area_fz_list = view:GetChild('area_fz_list') + self._area_outcard_list = view:GetChild('area_outcard_list') + self._src_fz_list = + Vector4(self._area_fz_list.x, self._area_fz_list.y, self._area_fz_list.width, self._area_fz_list.height) + local c3d = self._view:GetController('3d') + if c3d ~= nil then + c3d.selectedIndex = 1 + end + self._src_fz_list_3d = + Vector4(self._area_fz_list.x, self._area_fz_list.y, self._area_fz_list.width, self._area_fz_list.height) + local c3d = self._view:GetController('3d') + if c3d ~= nil then + c3d.selectedIndex = 0 + end + + self._mask_liangpai = view:GetChild('mask_liangpai') + + local _gamectr = ControllerManager.GetController(GameController) + if _gamectr then + _gamectr:AddEventListener(GameEvent.MJModifySzie, handler(self, self.SetMJSize)) + end + + +end + +function M:SetMJSize(zS) + local tempSzieConfig={} + tempSzieConfig.size=zS + local filename = 'mjsize' .. DataManager.SelfUser.account_id + Utils.SaveLocalFile(filename, json.encode(tempSzieConfig)) + + --ControllerManager.OnConnect(SocketCode.TimeoutDisconnect) + ViewManager.refreshGameView() +end + +function M:SetPlayer(p) + self._player = p +end + +function M:FillData(begin) + if (begin) then + for i = 1, #self._player.fz_list do + self:UpdateFzList(self._player.fz_list[i], -1) + end + self:UpdateOutCardList() + else + self._current_card_type = DataManager.CurrenRoom.card_type + + if self._current_card_type == 2 then + local c3d = self._view:GetController('3d') + if c3d ~= nil then + c3d.selectedIndex = 1 + end + else + local c3d = self._view:GetController('3d') + if c3d ~= nil then + c3d.selectedIndex = 0 + end + end + end +end + +function M:Clear() + --self._ctr_state.selectedIndex = 0 + self._area_fz_list.x = self._src_fz_list.x + self._area_fz_list.y = self._src_fz_list.y + self._area_fz_list.width = self._src_fz_list.z + self._area_fz_list.height = self._src_fz_list.w + + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_outcard_list:RemoveChildren(0, -1, true) + self._mask_liangpai:RemoveChildren(0, -1, true) +end + +-- 获取麻将资源前缀 +function M:GetPrefix() + -- local card_type = DataManager.CurrenRoom.card_type + -- local prefix = card_type == 1 and "a" or "" + -- return prefix + return get_majiang_prefix(DataManager.CurrenRoom.game_id) +end + +function M:fillCard(obj, pos_str, card, use3d) + + if self._current_card_type == 2 and (use3d == nil or use3d == true) then + obj.icon = 'ui://MajiangCard3d/' .. 'b' .. pos_str .. card + else + obj.icon = 'ui://Main_Majiang/' .. self:GetPrefix() .. pos_str .. card + end +end + +function M:getBackCard(card) + return 'ui://Main_Majiang/' .. card +end + +function M:GetCard(btn) + local pic_name = split(btn.icon, '/')[4] + local lst = string.split(pic_name, '_') + return tonumber(lst[2] or 0) +end + +function M:UpdateHandCard(getcard, mp) + getcard = getcard or false + mp = mp or false + local handcard_list = self._mask_data['handcard_list'] + local oder = handcard_list['oder'] + local _player = self._player + -- print(vardump(self._player)) + + self._area_handcard_list:RemoveChildren(0, -1, true) + -- print(vardump(_player.card_list)) + if (not mp) then + local comp_back = handcard_list['comp_back'] + if self._current_card_type == 2 then + comp_back = comp_back .. '_3d' + end + + for i = 0, _player.hand_left_count - 1 do + local obj = UIPackage.CreateObjectFromURL(self:getBackCard(comp_back)) + local _room = DataManager.CurrenRoom + local people_num = _room.room_config.people_num + local pos = ViewUtil.GetPos(_room.self_player.seat, _player.seat, people_num) + local gap = (pos == 3 and people_num == 4 or pos == 2 and people_num == 2) and 15 or 45 + local offset = getcard and (i == _player.hand_left_count - 1 and gap or 0) + -- local offset = getcard and (i == _player.hand_left_count - 1 and 15 or 0) + ViewUtil.CardPos(obj, self._area_handcard_list, oder, i, offset) + + --改变左右两边的手牌的x值 + if self._current_card_type == 2 and (oder == AreaOderType.down_up or oder == AreaOderType.up_down) then + obj.x = i * -7.0 + end + + if (oder == AreaOderType.down_up) then + self._area_handcard_list:AddChildAt(obj, 0) + else + self._area_handcard_list:AddChild(obj) + end + end + else + local outcard_list = self._mask_data['outcard_list'] + local comp = handcard_list['comp'] + local card = outcard_list['card'] + --print("comp"..comp) + -- print(vardump(_player.card_list)) + + if self._current_card_type == 2 then + comp = comp .. '_3d' + end + + for i = 0, #_player.card_list - 1 do + local obj = UIPackage.CreateObject('Main_Majiang', comp) + + self:fillCard(obj, card, _player.card_list[i + 1]) + -- obj.icon = UIPackage.GetItemURL("Main_Majiang", card .. _player.card_list[i+1]) + + local offset = getcard and (i == _player.hand_left_count - 1 and 0 or 0) + + ViewUtil.CardPos(obj, self._area_handcard_list, oder, i, offset) + + --改变左右两边的手牌的x值 + if self._current_card_type == 2 and (oder == AreaOderType.down_up or oder == AreaOderType.up_down) then + obj.x = i * -7 + end + + if (oder == AreaOderType.down_up) then + self._area_handcard_list:AddChildAt(obj, 0) + else + self._area_handcard_list:AddChild(obj) + end + end + end +end + +-- 获取麻将图片资源位置,可以在扩展中复写 +function M:GetCardPicPack() + -- if DataManager.CurrenRoom.card_type == 2 then + -- return "MajiangCard3d" + -- else + return 'Main_Majiang' + -- end +end + +function M:adjust3dOutPut(obj, area, oder, num, index) + if index >= num then + local row = 1 + math.floor(((index - num) / (num + 2))) + local col = ((index - num) % (num + 2)) + + if oder == AreaOderType.left_right then + obj.x = obj.x + math.floor((area.width - obj.width * (num + 2)) / 2) + elseif oder == AreaOderType.right_left then + obj.x = obj.x - math.floor((area.width - obj.width * (num + 2)) / 2) + elseif oder == AreaOderType.up_down then + obj.y = obj.y + math.floor((area.height - obj.height * (num + 2)) / 2) + obj.x = obj.x - col * 7 + 7 * (row + 1) + elseif oder == AreaOderType.down_up then + obj.y = obj.y - math.floor((area.height - obj.height * (num + 2)) / 2) + obj.x = obj.x - col * 7 - 7 * (row - 1) + end + else + if oder == AreaOderType.left_right then + obj.x = obj.x + math.floor((area.width - obj.width * num) / 2) + elseif oder == AreaOderType.right_left then + obj.x = obj.x - math.floor((area.width - obj.width * num) / 2) + elseif oder == AreaOderType.up_down then + obj.y = obj.y + math.floor((area.height - obj.height * num) / 2) + obj.x = obj.x - index * 7 + elseif oder == AreaOderType.down_up then + obj.y = obj.y - math.floor((area.height - obj.height * num) / 2) + obj.x = obj.x - index * 7 + end + end +end + +function M:UpdateOutCardList(outcard, card_item, cursor) + outcard = outcard or nil + card_item = card_item or 0 + cursor = cursor or nil + + local outlist = self._player.outcard_list + if (outcard) then + outcard:SetPivot(0.5, 0.5, true) + outcard.touchable = false + -- outcard.icon = "ui://Main_Majiang/" .. self:GetPrefix() .. "202_" .. card_item + outcard.icon = string.format('ui://%s/%s202_%s', self:GetCardPicPack(), self:GetPrefix(), card_item) + self._mask_liangpai:AddChild(outcard) + end + + local outcard_list = self._mask_data['outcard_list'] + local oder = outcard_list['oder'] + local comp = outcard_list['comp'] + local card = outcard_list['card'] + local multi_oder = outcard_list['multi_oder'] + local num = outcard_list['num'] + local multi_draw_oder = 0 + local sortStart = 0 + local sortType = 0 + local sortStep = 0 + if (outcard_list['multi_draw_oder']) then + multi_draw_oder = outcard_list['multi_draw_oder'] + end + + if self._current_card_type == 2 then + comp = comp .. '_3d' + num = outcard_list['num3d'] + multi_oder = outcard_list['multi_oder3d'] + sortType = outcard_list['sorting_order3d'] + card = outcard_list['card3d'] + if sortType == 1 then + sortStart = 1 + sortStep = 1 + elseif sortType == -1 then + sortStart = #outlist + sortStep = -1 + end + end + + local obj = nil + self._area_outcard_list:RemoveChildren(0, -1, true) + for i = 0, #outlist - 1 do + obj = UIPackage.CreateObjectFromURL('ui://Main_Majiang/' .. comp) + local row = math.floor(i / num) + local col = math.floor(i % num) + + if self._current_card_type == 2 then + if i >= num then + row = 1 + math.floor(((i - num) / (num + 2))) + col = ((i - num) % (num + 2)) + end + end + + ViewUtil.CardPos(obj, self._area_outcard_list, oder, col) + ViewUtil.CardPos(obj, self._area_outcard_list, multi_oder, row) + + if self._current_card_type == 2 then + self:adjust3dOutPut(obj, self._area_outcard_list, oder, num, i) + end + + self:fillCard(obj, card, outlist[i + 1]) + -- 添加角标 + self:AddFlag(i + 1, outlist[i], obj) + -- obj.icon = "ui://Main_Majiang/"..card .. outlist[i+1] + sortStart = sortStart + sortStep + obj.sortingOrder = sortStart + obj.data = outlist[i + 1] + + if (oder == AreaOderType.down_up or (multi_draw_oder == 1)) then + self._area_outcard_list:AddChildAt(obj, 0) + else + self._area_outcard_list:AddChild(obj) + end + end + if (obj and cursor) then + cursor.xy = Vector2(obj.width / 2, obj.height / 2) + obj:AddChild(cursor) + obj:GetController('color').selectedIndex = 1 + end +end + +-- 设置添加角标的方法 +function M:SetAddFlag(cb) + self.__addFlag = cb +end + +-- 给麻将牌添加flag +function M:AddFlag(index, card, btn) + if not self.__addFlag then + return + end + local str_flag = self.__addFlag(index, card, btn) + btn:GetController('hun').selectedIndex = str_flag == '' and 0 or 1 + btn:GetChild('flag').icon = str_flag +end + +local function getPos(my_seat, other_seat, total) + local pos = 0 + pos = other_seat - my_seat + 1 + if pos <= 0 then + pos = pos + total + end + if total ~= 4 and pos == total then + pos = total + 1 + end + return pos +end + +function M:UpdateFzList(fz, index, show_card) + local gn = 3 + if fz.type == FZType.Gang or fz.type == FZType.Gang_An or fz.type == FZType.Gang_Peng then + gn = 4 + end + + local fz_list = self._mask_data['fz_list'] + local oder = fz_list['oder'] + local comp = fz_list['comp'] .. gn + local card = fz_list['card'] + local card3d = '' + local adjust3d = 0 + if self._current_card_type == 2 then + comp = comp .. '_3d' + oder = fz_list['oder3d'] + adjust3d = fz_list['adjust3d'] + card = fz_list['card3d'] + card3d = 'b' + end + + local obj = UIPackage.CreateObjectFromURL('ui://Main_Majiang/' .. comp) + + local _area_fz_list = self._area_fz_list + local _area_outcard_list = self._area_outcard_list + + if (index == -1) then + local num = _area_fz_list.numChildren + + if (oder == AreaOderType.down_up or oder == AreaOderType.up_down) then + _area_fz_list.height = _area_fz_list.height + obj.height + if (oder == AreaOderType.down_up) then + local tem1 = obj.height + for i = 1, num do + local tem = _area_fz_list:GetChildAt(num - i) + tem.y = tem.y + tem1 + end + _area_fz_list.y = _area_fz_list.y - obj.height + else + ViewUtil.CardPos(obj, _area_outcard_list, oder, num) + end + elseif (oder == AreaOderType.left_right or oder == AreaOderType.right_left) then + _area_fz_list.width = _area_fz_list.width + obj.width + if (oder == AreaOderType.right_left) then + local tem1 = obj.width + for i = 1, num do + local tem = _area_fz_list:GetChildAt(num - i) + tem.x = tem.x + tem1 + end + _area_fz_list.x = _area_fz_list.x - obj.width + else + ViewUtil.CardPos(obj, _area_outcard_list, oder, num) + end + end + _area_fz_list:AddChild(obj) + + if self._current_card_type == 2 and (oder == AreaOderType.down_up or oder == AreaOderType.up_down) then + num = _area_fz_list.numChildren + for i = 1, num do + local tem = _area_fz_list:GetChildAt(i - 1) + tem.x = adjust3d * (i - 1) + end + end + else + local obj1 = _area_fz_list:RemoveChildAt(index) + obj1:Dispose() + obj.xy = obj1.xy + _area_fz_list:AddChildAt(obj, index) + end + + -- 显示fz的牌 + local obj_show + if show_card then + obj_show = UIPackage.CreateObjectFromURL('ui://Main_Majiang/Fz_0_' .. gn) + end + + for i = 1, gn do + local _oc = obj:GetChild('card_' .. i) + local _oc2 = nil + + if show_card then + _oc2 = obj_show:GetChild('card_' .. i) + end + + if (fz.type == FZType.Gang_An and i == gn) then + if self._current_card_type == 2 then + _oc.icon = UIPackage.GetItemURL('MajiangCard3d', card3d .. card .. '00') + else + _oc.icon = UIPackage.GetItemURL(self:GetCardPicPack(), card3d .. card .. '00') + end + + if show_card then + _oc2.icon = UIPackage.GetItemURL('Main_Majiang', '202_00') + end + else + if (fz.type == FZType.Chi) then + local index = i + if oder == AreaOderType.right_left or oder == AreaOderType.down_up then + index = gn - i + 1 + end + + self:fillCard(_oc, card, fz.opcard[index]) + + if show_card then + self:fillCard(_oc2, '202_', fz.opcard[index], false) + end + else + self:fillCard(_oc, card, fz.card) + + if show_card then + self:fillCard(_oc2, '202_', fz.card, false) + end + end + end + end + + obj.touchable = false + + if show_card then + obj_show.touchable = false + obj_show:SetPivot(0.5, 0.5, true) + obj_show:SetScale(0.8, 0.8) + self._mask_liangpai:AddChildAt(obj_show, 0) + coroutine.start( + function() + coroutine.wait(2) + obj_show:Dispose() + end + ) + end + + -- -- 标记碰牌对象 + -- local num = self._area_fz_list.numChildren + -- if num == 0 then return end + -- if index == -1 then + -- -- local obj = self._area_fz_list:GetChildAt(num - 1) + -- local pic_arrow = UIPackage.CreateObjectFromURL("ui://Main_Majiang/com_arrow") + -- obj:AddChild(pic_arrow) + -- pic_arrow:Center() + -- local my_seat = self._player.seat + -- if fz.from_seat ~= my_seat then + -- pic_arrow:GetController("show").selectedIndex = 1 + -- pic_arrow:GetController("pos").selectedIndex = getPos(DataManager.CurrenRoom.self_player.seat, fz.from_seat, #DataManager.CurrenRoom.player_list) + -- pic_arrow:SetPivot(0.5, 0.5) + -- if DataManager.CurrenRoom.self_player.seat ~= self._player.seat then + -- pic_arrow.scaleX = 0.5 + -- pic_arrow.scaleY = 0.5 + -- end + -- end + -- end +end + +function M:GetOutCardByIndex(index) + local outcard_list = self._mask_data['outcard_list'] + local oder = outcard_list['oder'] + local multi_draw_oder = 0 + if (outcard_list['multi_draw_oder']) then + multi_draw_oder = outcard_list['multi_draw_oder'] + end + + if (oder == AreaOderType.down_up or (multi_draw_oder == 1)) then + return self._area_outcard_list:GetChildAt(self._area_outcard_list.numChildren - index) + else + return self._area_outcard_list:GetChildAt(index - 1) + end +end + +function M:ResetFzList() + for i = 1, #self._player.fz_list do + local fz = self._player.fz_list[i] + -- if fz.type ~= FZType.Gang_Peng then + self:UpdateFzList(fz, -1) + -- else + -- self:UpdateFzList(fz, i) + -- end + end +end + +local function replace_card(obj, prefix) + local url = obj.icon + if url then + local len = string.len(url) + local pos = string.len('ui://Main_Majiang/') + 1 + local head_char = string.sub(url, pos, pos) + local card = string.sub(url, pos, len) + if head_char >= 'a' then + card = string.sub(card, 2, len) + end + obj.icon = 'ui://Main_Majiang/' .. prefix .. card + end +end + +function M:ResetCardType() + local old_card_type = self._current_card_type + self._current_card_type = DataManager.CurrenRoom.card_type + + --设置3d标志 + if self._current_card_type == 2 then + local c3d = self._view:GetController('3d') + if c3d ~= nil then + c3d.selectedIndex = 1 + + self._area_fz_list.x = self._src_fz_list_3d.x + self._area_fz_list.y = self._src_fz_list_3d.y + self._area_fz_list.width = self._src_fz_list_3d.z + self._area_fz_list.height = self._src_fz_list_3d.w + end + else + local c3d = self._view:GetController('3d') + if c3d ~= nil then + c3d.selectedIndex = 0 + self._area_fz_list.x = self._src_fz_list.x + self._area_fz_list.y = self._src_fz_list.y + self._area_fz_list.width = self._src_fz_list.z + self._area_fz_list.height = self._src_fz_list.w + end + end + + local change2d = false + if old_card_type == 2 and self._current_card_type ~= 2 then + change2d = true + end + + local change3d = false + if old_card_type ~= 2 and self._current_card_type == 2 then + change3d = true + end + + if change2d == false and change3d == false and self._current_card_type ~= 2 then + local prefix = self:GetPrefix() + + --更新已出牌 + for i = 1, self._area_outcard_list.numChildren do + local obj = self._area_outcard_list:GetChildAt(i - 1) + replace_card(obj, prefix) + end + + --更新手牌 + for i = 1, self._area_handcard_list.numChildren do + local obj = self._area_handcard_list:GetChildAt(i - 1) + replace_card(obj, prefix) + end + + --更新放子牌 + for i = 1, self._area_fz_list.numChildren do + local com = self._area_fz_list:GetChildAt(i - 1) + for j = 1, 4 do + local obj = com:GetChild('card_' .. j) + if obj then + replace_card(obj, prefix) + end + end + end + end +end + +return M diff --git a/lua_probject/main_project/main/majiang/MJPlayerSelfCardInfoView.lua b/lua_probject/main_project/main/majiang/MJPlayerSelfCardInfoView.lua new file mode 100644 index 00000000..cd0402b4 --- /dev/null +++ b/lua_probject/main_project/main/majiang/MJPlayerSelfCardInfoView.lua @@ -0,0 +1,213 @@ +local MJPlayerCardInfoView = import(".MJPlayerCardInfoView") + +local CardView = { + card = nil, + -- 牌序号 + card_item =0, + -- 索引 + index = 0, + -- 原始位置 + old_postion = Vector2.zero +} + +local function NewCardView(card,cardItem) + local self = {} + setmetatable(self,{__index = CardView}) + self.card = card + self.card_item = cardItem + return self +end + +local PlayerSelfView = { + _dragCom=nil, + _carViewList = {} +} + +local M = PlayerSelfView + +function PlayerSelfView.new(view,mainView) + setmetatable(M,{__index = MJPlayerCardInfoView}) + local self = setmetatable({}, {__index = M}) + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:init() + MJPlayerCardInfoView.init(self) + + local filename = 'mjsize' .. DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(filename) + if json_data then + local _data = json.decode(json_data) + if _data.size==0 then + self._area_handcard_list:SetScale(1,1.1) + self._area_fz_list:SetScale(0.6,0.6) + elseif _data.size==1 then + self._area_handcard_list:SetScale(1,1) + self._area_fz_list:SetScale(1,1) + + elseif _data.size==2 then + self._area_handcard_list:SetScale(0.8,0.8) + self._area_fz_list:SetScale(0.8,0.8) + end + end +end + +function M:setHandCardPos(btn_card, i, getcard) + btn_card.x = i * btn_card.width * 1.05 + (getcard and 20 or 0) +end + +function M:UpdateHandCard(getcard,mp) + if self.outcard_button then + self.outcard_button:Dispose() + self.outcard_button = nil + end + getcard = getcard or false + mp = mp or false + local pv = self + local _carViewList = self._carViewList + + local _lit = pv._area_handcard_list + for i=1,#_carViewList do + _carViewList[i].card:Dispose() + end + _carViewList = {} + local _dragCom = self._dragCom + if (_dragCom == nil) then + _dragCom = UIPackage.CreateObject("Common","UIPanel") + _dragCom.size = Vector2(1,1) + pv._view:AddChild(_dragCom) + end + _dragCom.xy = pv._area_handcard_list.xy + self._dragCom = _dragCom + self._carViewList = _carViewList + + local b3d = "" + if self._current_card_type == 2 then + b3d = "_3d" + end + + local cards = DataManager.CurrenRoom.self_player.card_list + if (not mp) then + for i=0,(#cards)-1 do + local tem_card = cards[i+1] + + + local btn_card = UIPackage.CreateObject(self:GetCardObjPack(), "Btn_Card"..b3d) + btn_card:SetScale(1.05,1.05) + -- btn_card.icon = UIPackage.GetItemURL("Main_Majiang", "201_" .. tem_card) + self:fillCard(btn_card,"201_",tem_card) + self:setHandCardPos(btn_card, i, i == #cards - 1 and getcard) + local c_v = NewCardView(btn_card, tem_card) + c_v.index = i + c_v.old_postion = btn_card.xy + _carViewList[#_carViewList+1] = c_v + + _lit:AddChild(btn_card) + + if (not self._player.auto_out_card) then + btn_card.data = c_v + -- btn_card.draggable = true; + -- btn_card.onDragStart:Set(function(evt) + -- local _agent = evt.sender + -- _agent:RemoveFromParent() + -- _dragCom:AddChild(_agent) + -- if self.__OnDragStart then + -- self:__OnDragStart(evt) + -- end + -- _agent.onDragEnd:Set(self.__OnDragEnd,self) + -- end) + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + btn_card.onClick:Set(self.__OnClickHandCard,self) + else + btn_card:GetChild("icon").color = Color(0.5,0.5,0.5) + btn_card.touchable = false + end + end + else + for i=0,(#cards)-1 do + + local mp_card = UIPackage.CreateObject("Main_Majiang", "Mp_self_card"..b3d) + -- mp_card.icon = UIPackage.GetItemURL("Main_Majiang", "202_" .. cards[i+1]) + self:fillCard(mp_card,"202_",cards[i+1]) + mp_card:SetScale(1.05,1.05) + -- mp_card.x = i * mp_card.width + (i == #cards - 1 and getcard and 20 or 0) + self:setHandCardPos(mp_card, i, i == #cards - 1 and getcard) + _lit:AddChild(mp_card) + end + end +end + +function M:onTouchBegin(context) + local button = context.sender + local card = button.data + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + card.touch_pos = xy - button.xy + if self.__OnDragStart then + self:__OnDragStart(card.card_item) + end +end + +function M:onTouchMove(context) + local button = context.sender + local card = button.data + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + button.xy = xy - card.touch_pos +end + +function M:__OnDragEnd(context) + if self.outcard_button then + self.outcard_button:Dispose() + self.outcard_button = nil + end + local button = context.sender + -- button.onDragEnd:Set(nil) + --button:RemoveFromParent() + local card = button.data + local _room = DataManager.CurrenRoom + if not _room or _room:GetReloadStatus() then return end + + -- print("button.y"..button.y .. "_room.curren_outcard_seat".._room.curren_outcard_seat) + if (button.y < -150 and _room.curren_outcard_seat == _room.self_player.seat) then + self._mainView:OutCard(card.card_item) + button.touchable = false + self.outcard_button = buttond + else + self._area_handcard_list:AddChildAt(button, card.index) + button:TweenMove(card.old_postion, 0.2) + end +end + +function M:__OnClickHandCard(context) + local button = context.sender + local _carViewList = self._carViewList + for i=1,#_carViewList do + if (_carViewList[i].card ~= button) then + _carViewList[i].card.selected = false + end + end + local _room = DataManager.CurrenRoom + if (Utils.IsDoubleClick(context) and _room.curren_outcard_seat == _room.self_player.seat) then + local card = button.data + self._mainView:OutCard(card.card_item) + end +end + +-- 获取手牌资源位置,可以在扩展中复写 +function M:GetCardObjPack() + return "Main_Majiang" +end + +function M:Clear() + MJPlayerCardInfoView.Clear(self) + for i=1,#self._carViewList do + self._carViewList[i].card:Dispose() + end + self._carViewList = {} +end + +return M \ No newline at end of file diff --git a/lua_probject/main_project/main/majiang/MJRoom.lua b/lua_probject/main_project/main/majiang/MJRoom.lua new file mode 100644 index 00000000..97f5c3e0 --- /dev/null +++ b/lua_probject/main_project/main/majiang/MJRoom.lua @@ -0,0 +1,30 @@ +local MJPlayer = import(".MJPlayer") + +local MJRoom = { + -- 记录此游戏使用的牌型 + card_type = 0, + + curren_outcard_seat = -1, + left_count = 0, + last_outcard_seat = 0 +} + +local M = MJRoom + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Room}) + local self = setmetatable({}, {__index = M}) + self.left_count = 0 + self.last_outcard_seat = 0 + self:init() + return self +end + + + +function M:NewPlayer() + return MJPlayer.new() +end + +return M \ No newline at end of file diff --git a/lua_probject/main_project/main/majiang/MJSettingView.lua b/lua_probject/main_project/main/majiang/MJSettingView.lua new file mode 100644 index 00000000..3b20e858 --- /dev/null +++ b/lua_probject/main_project/main/majiang/MJSettingView.lua @@ -0,0 +1,76 @@ +local SettingView = require("Game.View.SettingView") +local TableBG = import(".MJTableBG") + +local M = {} + +function M.new(blur_view) + setmetatable(M, {__index = SettingView}) + local self = setmetatable({}, {__index = M}) + self.class = "MJSettingView" + self._blur_view = blur_view + self.onCallback = event("onCallback",true) + self.onChangeCardCallback = event("onCallback",true) + self._btn_dismiss_room_enable = true + self._close_destroy = true + self:init("ui://Main_Majiang/SettingWindow1") + return self +end + +function M:init(url) + SettingView.init(self,url) + local ctr_card = self._view:GetController("card") + ctr_card.onChanged:Set(function () + if self.onChangeCardCallback then + DataManager.CurrenRoom.card_type = ctr_card.selectedIndex + self.onChangeCardCallback() + + local cardtype = ctr_card.selectedIndex + local list_cardtype = DataManager.CardTypeList + if DataManager.CurrenRoom then + local game_id = tostring(DataManager.CurrenRoom.game_id) + if not list_cardtype[game_id] or list_cardtype[game_id] ~= cardtype then + list_cardtype[game_id] = cardtype + Utils.SaveLocalFile("CardTypeData",json.encode(list_cardtype)) + end + end + end + end) +end + +--赋值bg_config +function M:GetBGConfig() + return TableBG.GetBGConfig() +end +--获得背景方法 +function M:GetBgByGameId(game_id) + return TableBG.GetTableBG(game_id) +end + +function M:Show() + self:UpdateIndex() + SettingView.Show(self) +end + +function M:Close() +-- local cardtype = self._view:GetController("card").selectedIndex +-- local list_cardtype = DataManager.CardTypeList +-- if DataManager.CurrenRoom then +-- local game_id = tostring(DataManager.CurrenRoom.game_id) +-- if not list_cardtype[game_id] or list_cardtype[game_id] ~= cardtype then +-- list_cardtype[game_id] = cardtype +-- Utils.SaveLocalFile("CardTypeData",json.encode(list_cardtype)) +-- end +-- end + BaseWindow.Close(self) +end + +function M:Destroy(remove_map) + BaseWindow.Destroy(self,remove_map) +end + +function M:UpdateIndex() + local room = DataManager.CurrenRoom + local ctr_card = self._view:GetController("card") + ctr_card.selectedIndex = room.card_type +end +return M diff --git a/lua_probject/main_project/main/majiang/MJSettingViewNew.lua b/lua_probject/main_project/main/majiang/MJSettingViewNew.lua new file mode 100644 index 00000000..4e455f6f --- /dev/null +++ b/lua_probject/main_project/main/majiang/MJSettingViewNew.lua @@ -0,0 +1,238 @@ +local SettingView = require("Game.View.SettingView") +local TableBG = require("Game.Data.TableBG") +local MJSettingViewNew = { + -- 修改牌 + onUpdataCardCallback = nil +} +local M = MJSettingViewNew + +-- show_dialect是否显示'切换方言'选项 +function MJSettingViewNew.new(blur_view, show_dialect) + setmetatable(SettingView, {__index = BaseWindow}) + setmetatable(M, {__index = SettingView}) + local self = setmetatable({}, {__index = M}) + self.class = "MJSettingViewNew" + self._currenIndex = 0 + self._blur_view = blur_view + self.onCallback = event("onCallback", true) + self.onChangeCardCallback = event("onCallback",true) + self.onChangeLanguageCallback = event("onCallback", true) + self.stateIndex = 0 + self.cd_time = 0 + self._btn_dismiss_room_enable = true + self._full = true + self._anim_pop = 2 + self._close_zone = true + self._show_dialect = show_dialect + self:init("ui://Main_Majiang/SettingWindow2") + + return self +end +function M:init(url) + + SettingView.init(self, url) + + + self._view:GetChild("btn_close22").onClick:Set(function( ... ) + local bg_id = self._view:GetController("bg").selectedIndex + 1 + if self._bg ~= bg_id then + self._bg = bg_id + TableBG.SaveTableBG(self._game_id, self._bg) + end + self:Destroy() + end) + + self._view:GetChild("btn_close").onClick:Set(function( ... ) + local bg_id = self._view:GetController("bg").selectedIndex + 1 + if self._bg ~= bg_id then + self._bg = bg_id + TableBG.SaveTableBG(self._game_id, self._bg) + end + self:Destroy() + end) + + if self._show_dialect == true then + self._view:GetController("show_dialect").selectedIndex = 1 + local ctr_language = self._view:GetController("language") + ctr_language.selectedIndex = self:GetLanguage() + ctr_language.onChanged:Set(function() + self:SaveLanguage(ctr_language.selectedIndex) + if self.onChangeLanguageCallback then + self:onChangeLanguageCallback(ctr_language.selectedIndex) + end + end) + end +end + +--赋值bg_config +function M:GetBGConfig() + return TableBG.GetBGConfig() +end + +function M:Change3d(mode,oldCardType) + + local lst_bg = self._view:GetChild("lst_bg") + + if mode == 2 then + + local bg_id = self._view:GetController("bg").selectedIndex + 1 + if self._bg ~= bg_id then + self._bg = bg_id + TableBG.SaveTableBG(self._game_id, self._bg) + end + + for i = 1, lst_bg.numChildren do + local item = lst_bg:GetChildAt(i - 1) + if item.data.id == 4 then + item.onClick:Call(); + break + end + end + + else + + if oldCardType == 2 and DataManager.CurrenRoom.card_type ~= 2 then + for i = 1, lst_bg.numChildren do + local item = lst_bg:GetChildAt(i - 1) + if item.data.id == self._default_bg then + item.onClick:Call(); + break + end + end + end + + local bg_id = self._view:GetController("bg").selectedIndex + 1 + if self._bg ~= bg_id and bg_id ~= 4 then + self._bg = bg_id + TableBG.SaveTableBG(self._game_id, self._bg) + end + + bg_id = TableBG.GetTableBG(self._game_id) + if bg_id > 0 then + for i = 1, lst_bg.numChildren do + local item = lst_bg:GetChildAt(i - 1) + if item.data.id == bg_id then + item.onClick:Call(); + break + end + end + end + end +end + +--赋值bg_config +function M:GetBGConfig() + return TableBG.GetBGConfig() +end +--获得背景方法 +function M:GetBgByGameId(game_id) + return TableBG.GetTableBG(game_id) +end +--获得当前语言 +function M:GetLanguage() + return PlayerPrefs.GetInt("Languauge" .. DataManager.CurrenRoom.game_id) +end +--保存选择的语言 +function M:SaveLanguage(languauge) + PlayerPrefs.SetInt("Languauge" .. DataManager.CurrenRoom.game_id, languauge) +end + +function M:Show() + self:UpdateIndex() + SettingView.Show(self) + + local ctr_card = self._view:GetController("card") + ctr_card.selectedIndex=0 + + local game_id = tostring(DataManager.CurrenRoom.game_id) + local ctr_cardIndex=0 + + local ct_data = nil + local json_data = Utils.LoadLocalFile("CardTypeData") + if json_data then + ct_data = json.decode(json_data) + if ct_data[game_id] then + ctr_cardIndex=ct_data[game_id] + else + ctr_cardIndex=0 + end + else + ctr_cardIndex=0 + end + + ctr_card.selectedIndex=ctr_cardIndex + + local list_cardtype = DataManager.CardTypeList + if DataManager.CurrenRoom then + list_cardtype[game_id] = ctr_cardIndex + Utils.SaveLocalFile("CardTypeData",json.encode(list_cardtype)) + end + + + + ctr_card.onChanged:Set(function () + + if self.onChangeCardCallback then + local oldCardType = DataManager.CurrenRoom.card_type + DataManager.CurrenRoom.card_type = ctr_card.selectedIndex + self.onChangeCardCallback() + + local cardtype = ctr_card.selectedIndex + local list_cardtype = DataManager.CardTypeList + if DataManager.CurrenRoom then + local game_id = tostring(DataManager.CurrenRoom.game_id) + if not list_cardtype[game_id] or list_cardtype[game_id] ~= cardtype then + list_cardtype[game_id] = cardtype + Utils.SaveLocalFile("CardTypeData",json.encode(list_cardtype)) + end + end + + self:Change3d(ctr_card.selectedIndex,oldCardType) + end + end) + + local ctr_size = self._view:GetController("size") + local filename = 'mjsize' .. DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(filename) + if json_data then + local _data = json.decode(json_data) + if _data and _data.size then + ctr_size.selectedIndex=_data.size + end + else + ctr_size.selectedIndex=1 + end + ctr_size.onChanged:Set(function () + local _gamectr = ControllerManager.GetController(GameController) + if _gamectr then + DispatchEvent(_gamectr._dispatcher,GameEvent.MJModifySzie,ctr_size.selectedIndex) + end + + end) + +end + +function M:Change3DMode() + + DataManager.CurrenRoom.card_type = 2 + + local list_cardtype = DataManager.CardTypeList + if DataManager.CurrenRoom then + local game_id = tostring(DataManager.CurrenRoom.game_id) + if not list_cardtype[game_id] or list_cardtype[game_id] ~= cardtype then + list_cardtype[game_id] = cardtype + Utils.SaveLocalFile("CardTypeData",json.encode(list_cardtype)) + end + end + + TableBG.SaveTableBG(DataManager.CurrenRoom.game_id, 4) +end + + +function M:UpdateIndex() + local room = DataManager.CurrenRoom + local ctr_card = self._view:GetController("card") + ctr_card.selectedIndex = room.card_type +end + +return M \ No newline at end of file diff --git a/lua_probject/main_project/main/majiang/MJTableBG.lua b/lua_probject/main_project/main/majiang/MJTableBG.lua new file mode 100644 index 00000000..6104e6d5 --- /dev/null +++ b/lua_probject/main_project/main/majiang/MJTableBG.lua @@ -0,0 +1,87 @@ +-- Edit By ChenGY +-- 记录各游戏的桌面背景 + +local MJTableBG = {} + +local M = MJTableBG +local mj_bg_config = { + {id = 1, url = "base/tablebg/bg/bg1", thumb = "ui://Common/b04"}, + {id = 2, url = "base/tablebg/bg/bg2", thumb = "ui://Common/b05"}, + {id = 3, url = "base/tablebg/bg/bg3", thumb = "ui://Common/b06"}, + {id = 4, url = "base/main_majiang/bg/bg6", thumb = "ui://Main_Majiang/b01"}, + {id = 5, url = "base/tablebg/bg/bg5", thumb = "ui://Common/b02"}, + {id = 6, url = "base/tablebg/bg/bg4", thumb = "ui://Common/b03"}, +} + +local function GetBG(data, game_id) + local bg_id = 0 + for i = 1, #data do + if data[i].game_id == game_id then + if data[i].bg_id ~= nil then + bg_id = data[i].bg_id + end + break + end + end + return bg_id +end +local function SetBG(data, game_id, bg_id) + local contain_key = false + for i = 1, #data do + if data[i].game_id == game_id then + contain_key = true + if data[i].bg_id ~= bg_id then + data[i].bg_id = bg_id + break + end + end + end + if not contain_key then + local _data = {} + _data.game_id = game_id + _data.bg_id = bg_id + table.insert(data, _data) + end +end + +function MJTableBG.GetBGConfig() + return mj_bg_config +end + +function MJTableBG.GetTableBG(game_id) + local id = -1 + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + + -- print(DataManager.SelfUser.invite_code, DataManager.SelfUser.account_id) + if json_data ~= nil then + local config_data = json.decode(json_data) + id = GetBG(config_data, game_id) + end + return id +end + +function MJTableBG.LoadTableBG(id, game_id, main_view) + local bg_id = M.GetTableBG(game_id) + local index + if bg_id > 0 then + index = bg_id + else + index = id + end + local url = mj_bg_config[index].url + LoadGameBg(url, main_view) +end + +function MJTableBG.SaveTableBG(game_id, bg_id) + local config_data + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + config_data = json.decode(json_data) + else + config_data = {} + end + SetBG(config_data, game_id, bg_id) + Utils.SaveLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code, json.encode(config_data)) +end + +return M \ No newline at end of file diff --git a/lua_probject/main_project/main/poker/MSMainView.lua b/lua_probject/main_project/main/poker/MSMainView.lua new file mode 100644 index 00000000..31a0681d --- /dev/null +++ b/lua_probject/main_project/main/poker/MSMainView.lua @@ -0,0 +1,45 @@ +local TableBG = import('Game.Data.TableBG') +local MainRightPanelView = import('Game.View.MainRightPanelView') + +--- +local M = {} + +setmetatable(M, {__index = MainView}) + +local pk_default_bg = 1 +local pk_bg_config = { + {id = 1, url = 'base/main_poker/bg/bg3', thumb = 'ui://Main_Poker/bg3'}, + {id = 2, url = 'base/main_poker/bg/bg2', thumb = 'ui://Main_Poker/bg2'}, + {id = 3, url = 'base/main_poker/bg/bg1', thumb = 'ui://Main_Poker/bg1'} +} + +-- settingViewType:1跑得快:显示换牌,隐藏返回和解散 2超级拼十:隐藏解散和换牌 3其他:隐藏换牌,根据是否观战显示解散和返回 +-- ex_defaultbg 自定义默认背景编号 +-- ex_bgconfig 自定义的背景 +function M:InitView(url, isHideIpAdds, settingViewType, ex_defaultbg, ex_bgconfig, isHideJiesan,settingUrl) + printlog("11111111111111111111") + UIPackage.AddPackage('base/main_poker/ui/Main_Poker') + MainView.InitView(self, url, isHideIpAdds) + local _view = self._view + local default_bg = ex_defaultbg or pk_default_bg + local bg_config = ex_bgconfig or pk_bg_config + TableBG.LoadTableBG(default_bg, self._room.game_id, self._root_view, bg_config) + local rightpanel = self._view:GetChild('right_panel') + if rightpanel then + self._rightPanelView = MainRightPanelView.new(self, rightpanel) + end +end + +-- 设置界面的换牌回调,需要换牌的玩法settingViewType传1,重写这个方法 +function M:UpdateCard(index) +end + +function M:UpdateCardSize(index) +end + +function M:Destroy() + UIPackage.RemovePackage('base/main_poker/ui/Main_Poker') + MainView.Destroy(self) +end + +return M diff --git a/lua_probject/main_project/main/poker/PKMainView.lua b/lua_probject/main_project/main/poker/PKMainView.lua new file mode 100644 index 00000000..cefe6016 --- /dev/null +++ b/lua_probject/main_project/main/poker/PKMainView.lua @@ -0,0 +1,162 @@ +local TableBG = import('Game.Data.TableBG') +local PKSettingView = import('.PKSettingView') +local MainRightPanelView = import('Game.View.MainRightPanelView') + +--- +local M = {} + +setmetatable(M, {__index = MainView}) + +local pk_default_bg = 1 +local pk_bg_config = { + {id = 1, url = 'base/main_poker/bg/bg3', thumb = 'ui://Main_Poker/bg3'}, + {id = 2, url = 'base/main_poker/bg/bg2', thumb = 'ui://Main_Poker/bg2'}, + {id = 3, url = 'base/main_poker/bg/bg1', thumb = 'ui://Main_Poker/bg1'} +} + +-- settingViewType:1跑得快:显示换牌,隐藏返回和解散 2超级拼十:隐藏解散和换牌 3其他:隐藏换牌,根据是否观战显示解散和返回 +-- ex_defaultbg 自定义默认背景编号 +-- ex_bgconfig 自定义的背景 +function M:InitView(url, isHideIpAdds, settingViewType, ex_defaultbg, ex_bgconfig, isHideJiesan,settingUrl) + UIPackage.AddPackage('base/main_poker/ui/Main_Poker') + MainView.InitView(self, url, isHideIpAdds) + + local default_bg = ex_defaultbg or pk_default_bg + local bg_config = ex_bgconfig or pk_bg_config + -- 设置界面初始化方法 + self.NewSettingView = function(self) + -- 根据settingViewType和self._state判断界面按钮功能显示 + local stype = 0 + local room = DataManager.CurrenRoom + local ispanguangzhe = room.self_player.seat == 0 + if self._state.selectedIndex == 3 then + stype = 0 + elseif settingViewType < 2 then + stype = settingViewType + elseif settingViewType == 2 then + if (ispanguangzhe or self._state.selectedIndex == 0) then + stype = 2 + else + stype = 3 + end + elseif settingViewType == 3 then + if not ispanguangzhe and self._state.selectedIndex > 0 then + stype = 3 + else + stype = 2 + end + end--self._root_view + local settingView = PKSettingView.new(self._root_view, stype, isHideJiesan, settingUrl,handler(self, self.UpdateCardSize)) + -- 获取MainView界面state控制器选项 + settingView.__checkMainViewState = function() + return self._state.selectedIndex + end + -- 设置界面换牌功能回调 + if settingViewType == 1 then + settingView.__changePokerCallBack = handler(self, self.UpdateCard) + settingView.__changePokerSizeCallBack = handler(self, self.UpdateCardSize) + end + settingView:FillBgSection( + function(url) + LoadGameBg(url, self._root_view) + end, + self._room.game_id, + default_bg, + bg_config + ) + return settingView + end + + local _view = self._view + TableBG.LoadTableBG(default_bg, self._room.game_id, self._root_view, bg_config) + local rightpanel = self._view:GetChild('right_panel') + if rightpanel then + self._rightPanelView = MainRightPanelView.new(self, rightpanel) + end + self:InitXiPai() + self:InitXiPai1() +end + + +function M:InitXiPai() + self._xipaiPanel = UIPackage.CreateObjectFromURL("ui://Common/panel_handPoke") + self._root_view:AddChild(self._xipaiPanel) + + local offset = get_offset(self._full_offset) + + self._xipaiPanel.width = GRoot.inst.width - (offset * 2) + self._xipaiPanel.height = GRoot.inst.height + self._xipaiPanel.x = offset + + self._xipaiPanel.visible=false + self._handAnimCtr=self._xipaiPanel:GetController("anim") + self._handAnimCtr.selectedIndex=0 + --self:PlayXiPai() +end + +function M:PlayXiPai(xipaiCallBack) + if self._xipaiPanel then + coroutine.start(function() + self._xipaiPanel.visible=true + self._xipaiPanel:GetTransition("XiPai"):Play() + self._handAnimCtr.selectedIndex=1 + coroutine.wait(3.5) + self._handAnimCtr.selectedIndex=0 + self._xipaiPanel.visible=false + if xipaiCallBack then + xipaiCallBack() + end + end) + + + end +end + +function M:InitXiPai1() + self._xipaiPanel1 = UIPackage.CreateObjectFromURL("ui://Common/panel_handPoke02") + self._root_view:AddChild(self._xipaiPanel1) + + local offset = get_offset(self._full_offset) + + self._xipaiPanel1.width = GRoot.inst.width - (offset * 2) + self._xipaiPanel1.height = GRoot.inst.height + self._xipaiPanel1.x = offset + + self._xipaiPanel1.visible=false + self._handAnimCtr1=self._xipaiPanel1:GetController("anim") + self._handAnimCtr1.selectedIndex=0 + +end + +function M:PlayXiPai1(xipaiCallBack) + if self._xipaiPanel1 then + coroutine.start(function() + self._xipaiPanel1.visible=true + self._xipaiPanel1:GetTransition("XiPai"):Play() + self._handAnimCtr1.selectedIndex=1 + coroutine.wait(3.5) + self._handAnimCtr1.selectedIndex=0 + self._xipaiPanel1.visible=false + if xipaiCallBack then + xipaiCallBack() + end + end) + + + end +end + + +-- 设置界面的换牌回调,需要换牌的玩法settingViewType传1,重写这个方法 +function M:UpdateCard(index) +end + +function M:UpdateCardSize(index) +end + +function M:Destroy() + UIPackage.RemovePackage('base/main_poker/ui/Main_Poker') + MainView.Destroy(self) +end + +return M diff --git a/lua_probject/main_project/main/poker/PKPlayBackView.lua b/lua_probject/main_project/main/poker/PKPlayBackView.lua new file mode 100644 index 00000000..6b0727c2 --- /dev/null +++ b/lua_probject/main_project/main/poker/PKPlayBackView.lua @@ -0,0 +1,135 @@ +local TableBG = import('Game.Data.TableBG') + +local M = {} + +setmetatable(M,{__index = PlayBackView}) + +local pk_default_bg = 1 +local pk_bg_config = { + {id = 1, url = "base/main_poker/bg/bg1", thumb = "ui://Main_Poker/bg1"}, + {id = 2, url = "base/main_poker/bg/bg2", thumb = "ui://Main_Poker/bg2"}, + {id = 3, url = "base/main_poker/bg/bg3", thumb = "ui://Main_Poker/bg3"}, +} + +function M:InitView(url, ex_defaultbg, ex_bgconfig) + UIPackage.AddPackage("base/main_poker/ui/Main_Poker") + PlayBackView.InitView(self,url) + local _view = self._view + + local default_bg = ex_defaultbg or pk_default_bg + local bg_config = ex_bgconfig or pk_bg_config + TableBG.LoadTableBG(default_bg, self._room.game_id, self._root_view, bg_config) + UpdateBeat:Add(self.OnUpdate,self) +end + +function M:NextRecordPlay() + local result = PlayBackView.NextRecordPlay(self) + if not result then return end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() +end + +function M:LastRecordPlay() + local result = PlayBackView.LastRecordPlay(self) + if not result then return end + self:ChangePlayState(false) + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() +end + +function M:Play() + self:ChangeAlpha() + self:ChangePlayState(not self._play) + if not self._play then return end + if (self._currentStep == #self.cmdList and self._playFoward) or (self._currentStep == 0 and not self._playFoward) then + self._currentStep = 0 + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:ChangePlayState(state) + self._play = state + self:ChangeTextSpeed() + local btn_play = self._view:GetChild("panel_record"):GetChild("btn_play") + if self._play then + btn_play:GetController("state").selectedIndex = 1 + else + btn_play:GetController("state").selectedIndex = 0 + end +end + +function M:ChangeTextSpeed() + local str1 = self._play and self._speed or "" + self._view:GetChild("panel_record"):GetChild("tex_speed").text = str1 + local str2 = not self._play and (self._playFoward and "播放暂停" or "回退暂停") or self._playFoward and (self._speed == 1 and "播放" or "快进") or (self._speed == 1 and "回退" or "快退") + self._view:GetChild("panel_record"):GetChild("tex_2").text = str2 + local str3 = self._play and "倍速度" or "" + self._view:GetChild("panel_record"):GetChild("tex_1").text = str3 +end + +function M:CmdLeftArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if not self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = false + self:ChangeTextSpeed() + end +end + +function M:CmdRightArrows() + self:ChangeAlpha() + self:ChangePlayState(true) + if self._playFoward then + if self._speed < 16 then + self._speed = self._speed * 2 + else + self._speed = 1 + end + self:ChangeTextSpeed() + else + self._speed = 1 + self._playFoward = true + self:ChangeTextSpeed() + end +end + +function M:OnUpdate() + if self._play then + if (self._currentStep == #self.cmdList and self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil,"当前已是录像结尾了,再次点击播放按钮可重新播放") + return + elseif (self._currentStep == 0 and not self._playFoward) then + self:ChangePlayState(false) + ViewUtil.ErrorTip(nil,"当前已是录像开头了,再次点击播放按钮可重新播放") + return + end + self._timer = self._timer + Time.deltaTime + if self._timer >= 1 / self._speed then + self._timer = 0 + local step = self._playFoward and 1 or -1 + self._currentStep = self._currentStep + step + self:ShowStep(self._currentStep) + end + end +end + +function M:Destroy() + UpdateBeat:Remove(self.OnUpdate,self) + PlayBackView.Destroy(self) +end + +return M \ No newline at end of file diff --git a/lua_probject/main_project/main/poker/PKSettingView.lua b/lua_probject/main_project/main/poker/PKSettingView.lua new file mode 100644 index 00000000..f4ede3e4 --- /dev/null +++ b/lua_probject/main_project/main/poker/PKSettingView.lua @@ -0,0 +1,176 @@ +--local EXMainView = import(".EXMainView") + +local SettingView = require('Game.View.SettingView') +local PKSettingView = { + __checkMainViewState = nil, + __changePokerCallBack = nil, + __changePokerSizeCallBack = nil, +} +local M = PKSettingView +function PKSettingView.new(blur_view, show_type, isjiesan,url,cardSizeHandle) + setmetatable(SettingView, {__index = BaseWindow}) + setmetatable(M, {__index = SettingView}) + local self = setmetatable({}, {__index = M}) + self.class = 'PKSettingView' + self._currenIndex = 0 + self._blur_view = blur_view + self.onCallback = event('onCallback', true) + self.stateIndex = 0 + self.cd_time = 0 + self._btn_dismiss_room_enable = true + self._full = true + self._anim_pop = 2 + self._close_destroy = true + self._show_type = show_type + self.isjiesan = isjiesan + self.__changePokerSizeCallBack=cardSizeHandle + if url ~= nil then + self:init(url) + else + self:init('ui://Main_Poker/SettingWindow1') + end + + return self +end + +function M:init(url) + SettingView.init(self, url) + -- show_type:1隐藏所有 2隐藏解散和换牌 3隐藏返回和换牌 + -- 设置界面有换牌功能的,需要在mainview中重写方法UpdateCard + self._view:GetController('type').selectedIndex = self._show_type + -- show_type1玩法的换牌功能 + if self._show_type == 1 then + local room = DataManager.CurrenRoom + local c1 = self._view:GetController('paimian') + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. room.game_id .. 'pai') + if json_data == nil then + local _gamectr = self._gamectr + c1.selectedIndex = 0 + else + local _data = json.decode(json_data) + local pai = _data['pai'] + + c1.selectedIndex = pai + end + + + c1.onChanged:Set( + function() + if self.__changePokerCallBack then + self.__changePokerCallBack(c1.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['pai'] = c1.selectedIndex + local key = user_id .. room.game_id .. 'pai' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + + local card_size = self._view:GetController('card_size') + json_data = Utils.LoadLocalFile(user_id .. room.game_id .. 'cardsize') + if json_data == nil then + local _gamectr = self._gamectr + card_size.selectedIndex = 1 + else + local _data = json.decode(json_data) + local cardsize = _data['cardsize'] + + card_size.selectedIndex = cardsize + end + + card_size.onChanged:Set( + function() + if self.__changePokerSizeCallBack then + self.__changePokerSizeCallBack(card_size.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['cardsize'] = card_size.selectedIndex + local key = user_id .. room.game_id .. 'cardsize' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + + self._view:GetChild('btn_close').onClick:Add( + function(...) + self:Destroy() + end + ) + end + if self.isjiesan then + self._view:GetChild('n82').visible = false + end +end + +function M:Show() + SettingView.Show(self) + self:showSettingOption() +end + +-- 显示设置界面按钮 +function M:showSettingOption() + local btn_back = self._view:GetChild('btn_back') + if btn_back ~= nil then + btn_back.onClick:Set( + function() + local room = DataManager.CurrenRoom + local ispanguangzhe = room.self_player.seat == 0 + local tip_owner = '您是否退出房间?\n(退出房间后房间将解散)' + local tip = '您是否退出房间?' + local tipStr = '' + if room.agent then + tipStr = '您是否返回?' + else + tipStr = + (not ispanguangzhe and room.owner_id == room.self_player.self_user.account_id) and tip_owner or tip + end + local _curren_msg = MsgWindow.new(self._root_view, tipStr, MsgWindow.MsgMode.OkAndCancel) + _curren_msg.onOk:Add( + function() + -- 如果游戏已经开始,是旁观者发出退出协议,否则的话不能离开 + -- 如果没开始,发出退出协议 + -- 不用考虑回放,回放不会显示返回按钮 + local state = self.__checkMainViewState() + local _gamectr = ControllerManager.GetController(GameController) + if state > 0 and state < 3 then + if ispanguangzhe then + ViewUtil.ShowModalWait(self._root_view) + _gamectr:LevelRoom( + function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode == 0 then + ViewManager.ChangeView(ViewManager.View_Lobby) + else + ViewUtil.ErrorTip(res.ReturnCode) + end + end + ) + else + ViewUtil.ErrorTip(nil, '房间已开始,无法退出游戏。') + end + else + ViewUtil.ShowModalWait(self._root_view) + _gamectr:LevelRoom( + function(res) + ViewUtil.CloseModalWait() + if res.ReturnCode == 0 then + ViewManager.ChangeView(ViewManager.View_Lobby) + else + ViewUtil.ErrorTip(res.ReturnCode) + end + end + ) + end + end + ) + _curren_msg:Show() + end + ) + end +end + +return M diff --git a/lua_probject/main_project/main/zipai/CardCheck.lua b/lua_probject/main_project/main/zipai/CardCheck.lua new file mode 100644 index 00000000..38850d29 --- /dev/null +++ b/lua_probject/main_project/main/zipai/CardCheck.lua @@ -0,0 +1,453 @@ +-- 检测牌是否存在 +local function checkCard(eventCard, cardList, num) + if num == nil then + num = 1 + end + local result = 0 + for i = 1, #cardList do + if (cardList[i] == eventCard) then + result = result + 1 + if (result == num) then + return true + end + end + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card, count) + for i = 1, count do + list_remove(cardList, card) + end +end + +local function checkCardAndRomve(eventCard, cardList, num) + if (checkCard(eventCard, cardList, num)) then + removeCard(cardList, eventCard, num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard, cardList) + local result = 0 + for i = 1, #cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local M = { + pair_count = 0, + cardList = nil, + stack = nil, + stackHuxi = nil +} + +function M:push(cardGroup) + self.stack[#self.stack + 1] = cardGroup +end +function M:pushhuxi(cardGroup) + self.stackHuxi[#self.stackHuxi + 1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack, #self.stack) + for _, card in ipairs(cardGroup) do + self.cardList[#self.cardList + 1] = card + end + table.sort(self.cardList) +end +-- 顺子 +function M:tryShunzi1(card, player) + if card < 300 and card % 100 > 8 then + return false + end + if (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + removeCard(self.cardList, card + 1, 1) + removeCard(self.cardList, card + 2, 1) + removeCard(self.cardList, card, 1) + local cardGroup = {card, card + 1, card + 2} + self:push(cardGroup) + local _huxi = 0 + if card == 101 then + _huxi = 3 + end + if card == 201 then + _huxi = 6 + end + self:pushhuxi(_huxi) + return true + end + return false +end + +-- 大大小 小小大 +function M:tryShunzi2(card) + if card - card % 100 == 100 then + if checkCard(card + 100, self.cardList, 1) and checkCard(card, self.cardList, 2) then + removeCard(self.cardList, card, 2) + removeCard(self.cardList, card + 100, 1) + local cardGroup = {card, card, card + 100} + self:push(cardGroup) + self:pushhuxi(0) + return true + end + if (checkCard(card + 100, self.cardList, 2)) and (checkCard(card, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 100, 2) + local cardGroup = {card, card + 100, card + 100} + self:push(cardGroup) + self:pushhuxi(0) + return true + end + else + if (checkCard(card - 100, self.cardList, 1)) and checkCard(card, self.cardList, 2) then + removeCard(self.cardList, card, 2) + removeCard(self.cardList, card - 100, 1) + local cardGroup = {card - 100, card, card} + self:push(cardGroup) + self:pushhuxi(0) + return true + end + if (checkCard(card - 100, self.cardList, 2)) and checkCard(card, self.cardList, 1) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card - 100, 2) + local cardGroup = {card, card - 100, card - 100} + self:push(cardGroup) + self:pushhuxi(0) + return true + end + end + --print(card) + return false + -- body +end + +-- 2 7 10 +function M:tryShunzi3(card, player) + if card % 100 == 2 then + if (checkCard(card + 5, self.cardList, 1)) and (checkCard(card + 8, self.cardList, 1)) then + removeCard(self.cardList, card, 1) + removeCard(self.cardList, card + 5, 1) + removeCard(self.cardList, card + 8, 1) + local cardGroup = {card, card + 5, card + 8} + self:push(cardGroup) + local _huxi = 0 + if card == 102 then + _huxi = 3 + elseif card == 202 then + _huxi = 6 + end + self:pushhuxi(_huxi) + return true + end + end + return false +end +-- 坎 +function M:tryKezi(card, player) + if (checkCard(card, self.cardList, 3)) then + removeCard(self.cardList, card, 3) + local cardGroup = {card, card, card} + self:push(cardGroup) + local _huxi = 0 + if card < 200 then + _huxi = 1 + else + _huxi = 3 + end + self:pushhuxi(_huxi) + return true + end + -- print(card) + return false +end + +function M:tryPair(card) + if (self.pair_count > 0) then + return false + end + if (checkCard(card, self.cardList, 2)) then + removeCard(self.cardList, card, 2) + local cardGroup = {card, card} + self:push(cardGroup) + self.pair_count = 1 + return true + end + -- print(card) + return false +end + +function M:tryWin(player) + if #self.cardList == 0 then + if (player.tiCount + player.paoCount + self.kong_count > 0) then + if (self.pair_count == 1) then + return true + end + return false + else + if (self.pair_count > 0) then + return false + end + return true + end + end + local activeCard = 0 + for i = 1, #self.cardList do + if (self.cardList[i] == 201 or self.cardList[i] == 202) then + activeCard = self.cardList[i] + break + end + end + if (activeCard == 0) then + activeCard = self.cardList[1] + end + if (activeCard % 100 == 1) then + if self:tryShunzi1(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + if self:tryKezi(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + if (player.tiCount + player.paoCount + self.kong_count > 0) then + if self:tryPair(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + end + end + if self:tryShunzi2(activeCard) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + elseif activeCard % 100 == 2 then + if self:tryShunzi3(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + if self:tryKezi(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + if player.tiCount + player.paoCount + self.kong_count > 0 then + if self:tryPair(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + end + end + if self:tryShunzi1(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + if self:tryShunzi2(activeCard) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + else + if self:tryKezi(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + if player.tiCount + player.paoCount + self.kong_count > 0 then + if self:tryPair(activeCard) then + if self:tryWin(player) then + return true + end + self.pair_count = 0 + self:rollBack() + end + end + if self:tryShunzi2(activeCard) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + if self:tryShunzi1(activeCard, player) then + if self:tryWin(player) then + return true + end + self:rollBack() + table.remove(self.stackHuxi, #self.stackHuxi) + end + end + return false +end + +local function init(self, player, cardInhand, addCard) + self.stack = {} + self.stackHuxi = {} + self.pair_count = 0 + self.kong_count = 0 + self.cardList = membe_clone(cardInhand) + if addCard == nil then + self.kong_count = 1 + else + self.kong_count = 0 + self.cardList[#self.cardList + 1] = addCard + end + table.sort(self.cardList) + return self:tryWin(player) +end + +function M.tingPai(player, room) + local self = setmetatable({}, {__index = M}) + local tingList = {} + local cardInhand = player.handcard_list + if not cardInhand or #cardInhand == 0 then + return tingList + end + local kan_huxi = 0 + local kan_cards = {} + for j = 1, #player.fz_list do + for i = 1, #cardInhand do + if cardInhand[i] == player.fz_list[j].active_card and player.fz_list[j].type == 3 then + kan_cards[#kan_cards + 1] = cardInhand[i] + break + end + end + end + if #kan_cards > 0 then + for i = 1, #kan_cards do + if kan_cards[i] > 200 then + kan_huxi = kan_huxi + 6 + else + kan_huxi = kan_huxi + 3 + end + removeCard(cardInhand, kan_cards[i], 3) + end + end + player.tiCount = 0 + player.paoCount = 0 + if #player.fz_list > 0 then + for i = 1, #player.fz_list do + if player.fz_list[i].type == 6 then + player.paoCount = player.paoCount + 1 + elseif player.fz_list[i].type == 7 then + player.tiCount = player.tiCount + 1 + end + end + end + for k = 100, 200, 100 do + for i = 1, 10 do + local tem = k + i + local result = init(self, player, cardInhand, tem) + local num = 0 + for k = 1, #self.stackHuxi do + num = num + self.stackHuxi[k] + end + if result == false or (player.hu_xi + num + kan_huxi) < (self:getHuxi(room)) then + if #player.fz_list > 0 then + for k = 1, #player.fz_list do + if tem == player.fz_list[k].active_card then + local ctype = player.fz_list[k].type + if ctype == 2 or ctype == 3 or ctype == 4 or ctype == 5 then + local paohu = init(self, player, cardInhand) + if paohu then + local num2 = 0 + for j = 1, #self.stackHuxi do + num2 = num2 + self.stackHuxi[j] + end + if + (num2 + player.hu_xi + kan_huxi + self:GetFzData(tem, ctype)) >= + (self:getHuxi(room)) + then + tingList[#tingList + 1] = tem + end + end + end + end + end + end + else + local num1 = 0 + for k = 1, #self.stackHuxi do + num1 = num1 + self.stackHuxi[k] + end + if (player.hu_xi + num1 + kan_huxi) >= (self:getHuxi(room)) then + tingList[#tingList + 1] = tem + end + end + end + end + return tingList +end + +function M:getHuxi(room) + if room.game_id == 301 then + return 8 + end + if room.game_id == 15 then + return 15 + end + if room.game_id == 13 or room.game_id == 14 or room.game_id == 23 then + return 15 + elseif room.game_id == 26 then + return 10 + elseif room.game_id == 29 then + if room.room_config.maxPlayers == 3 then + return 15 + else + return 9 + end + end +end + +function M:GetFzData(tem, ctype) + local huxi + if ctype == 2 then + if tem > 200 then + huxi = 6 + else + huxi = 5 + end + elseif ctype == 3 then + huxi = 3 + elseif ctype == 4 then + huxi = 3 + elseif ctype == 5 then + huxi = 3 + end + return huxi +end + +return M diff --git a/lua_probject/main_project/main/zipai/FZData.lua b/lua_probject/main_project/main/zipai/FZData.lua new file mode 100644 index 00000000..e5bb09cd --- /dev/null +++ b/lua_probject/main_project/main/zipai/FZData.lua @@ -0,0 +1,45 @@ +RB_FZType = +{ + Chi = 1, + Peng = 2, + Kan = 3, + Wei = 4, + ChouWei=5, + Pao = 6, + Ti = 7, + HU = 8, + Bi = 9, + PengPao =10, + WeiPao =11, + WeiTi =12, + KanTi =13, + DuiZi = 14, + zhao = 15, +} + +local FZTipList = { + tip_map_id = nil, + tip_map_type = nil +} + +local M = FZTipList + +function M.new() + local self = {} + setmetatable(self,{__index = FZTipList}) + self.tip_map_id = {} + self.tip_map_type = {} + return self +end + +function M:AddTip(tip) + self.tip_map_id[tip.id] = tip + local tiplist = self.tip_map_type[tip.weight] + if not tiplist then + tiplist = {} + self.tip_map_type[tip.weight] = tiplist + end + tiplist[#tiplist+1] = tip +end + +return M \ No newline at end of file diff --git a/lua_probject/main_project/main/zipai/HuTipView.lua b/lua_probject/main_project/main/zipai/HuTipView.lua new file mode 100644 index 00000000..d6e6e97b --- /dev/null +++ b/lua_probject/main_project/main/zipai/HuTipView.lua @@ -0,0 +1,69 @@ +local HuTipView = { + _view_start_pos = nil, + _touch_start_pos = nil, +} + +local M = HuTipView + +function M.new(main_view) + local self = {} + self.class = "HuTipView" + setmetatable(self,{__index = HuTipView}) + self._main_view = main_view + self:init() + return self +end + +local function SetObjEnabled(obj, enabled) + obj.visible = enabled + obj.touchable = enabled +end +function M:OnTouchBegin(context) + self._view_start_pos = Vector2(self._view.x, self._view.y) + self._touch_start_pos = self._main_view._view:GlobalToLocal(Vector2(context.inputEvent.x, context.inputEvent.y)) +end +function M:OnTouchMove(context) + local xy = self._main_view._view:GlobalToLocal(Vector2.New(context.inputEvent.x,context.inputEvent.y)) + local dist = Vector2(xy.x - self._touch_start_pos.x, xy.y - self._touch_start_pos.y) + local posx = self._view_start_pos.x + dist.x + local posy = self._view_start_pos.y + dist.y + local max_x = self._main_view._view.width - self._view.width + local max_y = self._main_view._view.height - self._view.height + self._view.x = posx < 0 and 0 or posx > max_x and max_x or posx + self._view.y = posy < 0 and 0 or posy > max_y and max_y or posy +end + +function M:init() + self._view = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Hu_Tip") + self._main_view._view:AddChild(self._view) + local width = self._view.width + local m_width = self._main_view._view.width + local m_height = self._main_view._view.height + -- self._view.x = 0.5 * m_width - 0.5 * width + self._view.x = 0 + self._view.y = 0.7 * m_height + SetObjEnabled(self._view, false) + self._view.onTouchBegin:Add(handler(self, self.OnTouchBegin)) + self._view.onTouchMove:Add(handler(self, self.OnTouchMove)) +end + +function M:FillData(cards) + local lst_card = self._view:GetChild("tingpai") + lst_card:RemoveChildrenToPool() + local num = #cards + if num > 0 then + if num > 4 and num < 28 then + self._view.width = 191 + ((num > 4 and 6 or num) - 3) * 38 + self._view.height = 69 + (math.ceil(num / 5) - 1) * 56 + end + for i = 1, num do + local item = lst_card:AddItemFromPool() + item:GetChild("icon").icon = "ui://Main_RunBeard/202_1_" .. cards[i] + end + SetObjEnabled(self._view, true) + else + SetObjEnabled(self._view, false) + end +end + +return M \ No newline at end of file diff --git a/lua_probject/main_project/main/zipai/PendulumRule.lua b/lua_probject/main_project/main/zipai/PendulumRule.lua new file mode 100644 index 00000000..aa19ebf2 --- /dev/null +++ b/lua_probject/main_project/main/zipai/PendulumRule.lua @@ -0,0 +1,1013 @@ + +-- 检测牌是否存在 +local function checkCard(eventCard,cardList,num) + if num ==nil then + num =1 + end + local result = 0 + for i = 1,#cardList do + if (cardList[i] == eventCard) then + result = result + 1 + end + end + if(result ==num) then + return true + end + return false +end + +-- 移除指定数量的牌 +local function removeCard(cardList, card,count) + for i=1,count do + list_remove(cardList,card) + end +end + +local function checkCardAndRomve(eventCard,cardList,num) + + if(checkCard(eventCard,cardList,num)) then + removeCard(cardList,eventCard,num) + return true + end + return false +end + +-- 获取列表中牌数量 +local function cardNum(eventCard,cardList) + local result = 0 + for i=1,#cardList do + local card = cardList[i] + if (card == eventCard) then + result = result + 1 + end + end + return result +end + +local M = { + cardList = nil, + stack = nil, +} + + +function M:push(cardGroup) + self.stack[#self.stack+1] = cardGroup +end + +function M:rollBack() + local cardGroup = self.stack[#self.stack] + table.remove(self.stack,#self.stack) + for _,card in ipairs(cardGroup) do + self.cardList[#self.cardList + 1] = card + end + table.sort(self.cardList) +end + +function M:tryShunzi1(card,type1 ) + if card < 300 and card % 100 > 8 then + return false + end + if (checkCard(card, self.cardList)) and (checkCard(card + 1, self.cardList) and checkCard(card + 2, self.cardList)) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card+1,1) + removeCard(self.cardList,card+2,1) + removeCard(self.cardList,card,1) + local cardGroup = {card,card+1,card+2} + self:push(cardGroup) + return true + end + return false +end +function M:tryShunzi2( card ,type1) + if card -card%100 == 100 then + if self:tryShunzi1(card+100,0) or self:tryShunzi3(card+100,0) then + return false + end + if checkCard(card+100,self.cardList,1) and checkCard(card,self.cardList,2) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,2) + removeCard(self.cardList,card+100,1) + local cardGroup = {card,card,card+100} + self:push(cardGroup) + return true + end + if (checkCard(card+100,self.cardList,2)) and (checkCard(card,self.cardList,1)) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+100,2) + local cardGroup = {card+100,card+100,card} + self:push(cardGroup) + return true + end + else + if self:tryShunzi1(card-100) or self:tryShunzi3(card-100) then + return false + end + if (checkCard(card-100,self.cardList,1)) and checkCard(card,self.cardList,2) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,2) + removeCard(self.cardList,card-100,1) + local cardGroup = {card,card,card-100} + self:push(cardGroup) + return true + end + if (checkCard(card-100,self.cardList,2)) and checkCard(card,self.cardList,1) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card-100,2) + local cardGroup = {card-100,card-100,card} + self:push(cardGroup) + return true + end + end + return false +end +function M:tryShunzi3( card,type1 ) + if card % 100 == 2 then + if (checkCard(card, self.cardList, 1)) and (checkCard(card+5, self.cardList, 1)) and (checkCard(card+8, self.cardList, 1)) then + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+5,1) + removeCard(self.cardList,card+8,1) + local cardGroup = {card,card+5,card+8} + self:push(cardGroup) + return true + + end + return false + end + return false +end + +function M:tryKezi(card) + if (checkCard(card, self.cardList, 3)) then + removeCard(self.cardList,card,3) + local cardGroup = {card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryTi(card) + if (checkCard(card, self.cardList, 4)) then + removeCard(self.cardList,card,4) + local cardGroup = {card,card,card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryPair(card) + if (checkCard(card, self.cardList, 2)) then + removeCard(self.cardList,card,2) + local cardGroup = {card,card} + self:push(cardGroup) + return true + end + return false +end + +function M:tryShunzi4( card ) + if card -card%100 == 100 then + if self:tryShunzi1(card+100,0) or self:tryShunzi3(card+100,0) or self:tryShunzi5(card+100,0) then + return false + end + if checkCard(card+100,self.cardList,1) and checkCard(card,self.cardList,1) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+100,1) + local cardGroup = {card,card+100} + self:push(cardGroup) + return true + end + if (checkCard(card+100,self.cardList,1)) and (checkCard(card,self.cardList,1)) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+100,1) + local cardGroup = {card,card+100} + self:push(cardGroup) + return true + end + else + if self:tryShunzi1(card-100,0) or self:tryShunzi3(card-100,0) or self:tryShunzi5(card-100,0) then + return false + end + if (checkCard(card-100,self.cardList,1)) and checkCard(card,self.cardList,1) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card-100,1) + local cardGroup = {card-100,card} + self:push(cardGroup) + return true + end + if (checkCard(card-100,self.cardList,1)) and checkCard(card,self.cardList,1) then + removeCard(self.cardList,card,1) + removeCard(self.cardList,card-100,1) + local cardGroup = {card,card-100} + self:push(cardGroup) + return true + end + end + return false +end +function M:tryShunzi5( card ,type1) + if card % 100 == 2 then + if (checkCard(card, self.cardList, 1)) and (checkCard(card+5, self.cardList, 1)) then + if self:tryShunzi2(card+5,0) or self:tryShunzi1(card+5,0) then + return false + end + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+5,1) + local cardGroup = {card,card+5} + self:push(cardGroup) + return true + end + if (checkCard(card, self.cardList, 1)) and (checkCard(card+8, self.cardList, 1)) then + if self:tryShunzi2(card+8,0) or self:tryShunzi1(card+8,0) then + return false + end + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+8,1) + local cardGroup = {card,card+8} + self:push(cardGroup) + return true + end + elseif card % 100 == 7 then + if (checkCard(card, self.cardList, 1)) and (checkCard(card+3, self.cardList, 1)) then + if self:tryShunzi2(card+3,0) or self:tryShunzi1(card+3,0) then + return false + end + if type1 ~=nil then + return true + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+3,1) + local cardGroup = {card,card+3} + self:push(cardGroup) + return true + end + end + return false +end + +function M:tryMenzi1( card ) + + if (checkCard(card, self.cardList, 1)) and (checkCard(card+1, self.cardList, 1)) then + if self:tryShunzi2(card+1,0) or self:tryShunzi1(card+1,0) or self:tryShunzi3(card+1,0) then + return false + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+1,1) + local cardGroup = {card,card+1} + self:push(cardGroup) + return true + end + if (checkCard(card, self.cardList, 1)) and (checkCard(card+2, self.cardList, 1)) then + if self:tryShunzi2(card+2,0) or self:tryShunzi1(card+2,0) or self:tryShunzi3(card+2,0) then + return false + end + removeCard(self.cardList,card,1) + removeCard(self.cardList,card+2,1) + local cardGroup = {card,card+2} + self:push(cardGroup) + return true + end + + return false +end + +function M:tryOneCard(card) + if (checkCard(card, self.cardList, 1)) then + removeCard(self.cardList,card,1) + local cardGroup = {card} + self:push(cardGroup) + return true + end + return false +end + -- 摆牌规则 先四后三 对子 顺子 单个 +function M:tryPendulumRule() + for i=1,10 do + for k=100,200,100 do + local tem = k + i + local x = true + if x and self:tryTi(tem) then + x =false + end + if x and self:tryKezi(tem) then + x =false + end + if x and self:tryShunzi2(tem) then + x =false + end + if x and self:tryPair(tem) then + x =false + end + if x and self:tryShunzi3(tem) then + x =false + end + if x and self:tryShunzi1(tem) then + x =false + end + if x and self:tryShunzi5(tem) then + x =false + end + if x and self:tryShunzi4(tem) then + x =false + end + if x and self:tryMenzi1(tem) then + x =false + end + if x and self:tryOneCard(tem) then + x =false + end + end + end + if #self.stack >10 then + --变成10列--这里牌多了也不会报错了 + local removeitem = 0 + local card = 0 + for i=#self.stack,1,-1 do + if #self.stack[i] == 1 and removeitem ==0 then + removeitem = i + card = self.stack[i][1] + list_remove(self.stack[i],self.stack[i][1]) + end + end + if card ~= 0 then + list_remove(self.stack,self.stack[removeitem]) + for i=#self.stack,1,-1 do + if #self.stack[i] >0 and #self.stack[i] <3 then + self.stack[i][#self.stack[i] +1] = card + break + end + end + end + end + return self.stack +end + + + + +--摆牌规则 优先胡息 +function M:tryPendulumRule2() + local card_count = #self.cardList + local cards_map = {} + local CountCards = {} + for i=1,#self.cardList do + CountCards[self.cardList[i]]= CountCards[self.cardList[i]] == nil and 1 or CountCards[self.cardList[i]] + 1 + end + --find4 + for k,v in pairs(CountCards) do + if (v == 4) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + --find 大 2 7 10 + local countA = CountCards[202] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[210]~=nil and CountCards[202] >0 and CountCards[207] >0 and CountCards[210] >0 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cs[3]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 3 + end + end + end + + --find 小 2 7 10 + local counta = CountCards[102] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[110]~=nil and CountCards[102] >0 and CountCards[107] >0 and CountCards[110] >0 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cs[3]= 110 + cards_map[#cards_map+1] = cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 3 + end + end + end + --find 大 123 + local countA = CountCards[201] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[201]~=nil and CountCards[202]~=nil and CountCards[203]~=nil and CountCards[201] >0 and CountCards[202] >0 and CountCards[203] >0 then + local cs = {} + cs[1]= 201 + cs[2]= 202 + cs[3]= 203 + cards_map[#cards_map+1]=cs + CountCards[201] = CountCards[201]-1 + CountCards[202] = CountCards[202]-1 + CountCards[203] = CountCards[203]-1 + card_count = card_count - 3 + end + end + end + + --find 小 123 + local counta = CountCards[101] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[101]~=nil and CountCards[102]~=nil and CountCards[103]~=nil and CountCards[101] >0 and CountCards[102] >0 and CountCards[103] >0 then + local cs = {} + cs[1]= 101 + cs[2]= 102 + cs[3]= 103 + cards_map[#cards_map+1] = cs + CountCards[101] = CountCards[101]-1 + CountCards[102] = CountCards[102]-1 + CountCards[103] = CountCards[103]-1 + card_count = card_count - 3 + end + end + end + + + --find abc + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] == CountCards[i + 1] and CountCards[i] == CountCards[i + 2] then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + --find ABC + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] == CountCards[i + 1] and CountCards[i] == CountCards[i + 2] then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + + --find AAa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] >= 2 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-3; + end + end + end + --find aaA + for i = 101, 110 do + if CountCards[i]~=nil and (CountCards[i] >= 2) then + if CountCards[i + 100]~=nil and (CountCards[i + 100] == 1) then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i+100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i +100] = CountCards[i +100] - 1 + card_count = card_count-3; + end + end + end + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + --find Aa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] == 1 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 1; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-2 + end + end + end + --find ab + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + --find AB + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + --find 大 2 7 两个 + for i=201,210 do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[202] ==1 and CountCards[207] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + card_count = card_count - 2 + end + end + + for i=201,210 do + if CountCards[202]~=nil and CountCards[210]~=nil and CountCards[202] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + for i=201,210 do + if CountCards[207]~=nil and CountCards[210]~=nil and CountCards[207] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 207 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + --find 小 2 7 两个 + for i=101,110 do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[102] ==1 and CountCards[107] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[102]~=nil and CountCards[110]~=nil and CountCards[102] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[107]~=nil and CountCards[110]~=nil and CountCards[107] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 107 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + local singleList = {} + --find else + for k,v in pairs(CountCards) do + if (v == 1) then + singleList[#singleList+1] = k + CountCards[k] = CountCards[k] -1 + + end + end + local index = 3 + for i=1,#singleList,index do + local cs ={} + cs[#cs+1] = singleList[i] + if i < #singleList then cs[#cs+1] = singleList[i+1] end + if i < #singleList - 1 then cs[#cs+1] = singleList[i+2] end + cards_map[#cards_map + 1]=cs + end + --变成9列--这里牌多了也不会报错了 + for i=10 ,1,-1 do + for j = #cards_map , 10,-1 do + if #cards_map[i] < 3 then + cards_map[i][#cards_map[i]+1] = cards_map[j][1] + list_remove(cards_map[j],cards_map[j][1]) + end + end + end + + return cards_map + +end + + +--摆牌规则 优先顺子 -AAa- 对子 - 单牌 +function M:tryPendulumRule3() + local card_count = #self.cardList + local cards_map = {} + local CountCards = {} + for i=1,#self.cardList do + CountCards[self.cardList[i]]= CountCards[self.cardList[i]] == nil and 1 or CountCards[self.cardList[i]] + 1 + end + --find4 + for k,v in pairs(CountCards) do + if (v == 4) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + --find abc + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] >0 and CountCards[i + 1]>0 and CountCards[i + 2]>0 then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + --find ABC + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and CountCards[i] >0 and CountCards[i + 1]>0 and CountCards[i + 2]>0 then + if CountCards[i] >0 then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + end + --find 大 2 7 10 + local countA = CountCards[202] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[210]~=nil and CountCards[202] >0 and CountCards[207] >0 and CountCards[210] >0 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cs[3]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 3 + end + end + end + + --find 小 2 7 10 + local counta = CountCards[102] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[110]~=nil and CountCards[102] >0 and CountCards[107] >0 and CountCards[110] >0 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cs[3]= 110 + cards_map[#cards_map+1] = cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 3 + end + end + end + + --find AAa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] >= 2 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-3; + end + end + end + --find aaA + for i = 101, 110 do + if CountCards[i]~=nil and (CountCards[i] >= 2) then + if CountCards[i + 100]~=nil and (CountCards[i + 100] == 1) then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i+100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i +100] = CountCards[i +100] - 1 + card_count = card_count-3; + end + end + end + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + --find Aa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] == 1 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 1; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-2 + end + end + end + --find ab + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + --find AB + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil ) and (CountCards[i] > 0 and CountCards[i + 1] > 0 ) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + card_count = card_count - 2 + end + end + --find 大 2 7 两个 + for i=201,210 do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[202] ==1 and CountCards[207] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + card_count = card_count - 2 + end + end + + for i=201,210 do + if CountCards[202]~=nil and CountCards[210]~=nil and CountCards[202] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 202 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + for i=201,210 do + if CountCards[207]~=nil and CountCards[210]~=nil and CountCards[207] ==1 and CountCards[210] ==1 then + local cs = {} + cs[1]= 207 + cs[2]= 210 + cards_map[#cards_map+1]=cs + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 2 + end + end + + --find 小 2 7 两个 + for i=101,110 do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[102] ==1 and CountCards[107] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[102]~=nil and CountCards[110]~=nil and CountCards[102] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 102 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[102] = CountCards[102]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + for i=101,110 do + if CountCards[107]~=nil and CountCards[110]~=nil and CountCards[107] ==1 and CountCards[110] ==1 then + local cs = {} + cs[1]= 107 + cs[2]= 110 + cards_map[#cards_map+1]=cs + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 2 + end + end + + local singleList = {} + --find else + for k,v in pairs(CountCards) do + if (v == 1) then + singleList[#singleList+1] = k + CountCards[k] = CountCards[k] -1 + + end + end + local index = 3 + for i=1,#singleList,index do + local cs ={} + cs[#cs+1] = singleList[i] + if i < #singleList then cs[#cs+1] = singleList[i+1] end + if i < #singleList - 1 then cs[#cs+1] = singleList[i+2] end + cards_map[#cards_map + 1]=cs + end + --变成9列--这里牌多了也不会报错了 + for i=10 ,1,-1 do + for j = #cards_map , 10,-1 do + if #cards_map[i] < 3 then + cards_map[i][#cards_map[i]+1] = cards_map[j][1] + list_remove(cards_map[j],cards_map[j][1]) + end + end + end + + return cards_map + +end + +local function init(self,cardInhand,index) + self.cardList= {} + self.stack = {} + self.cardList = membe_clone(cardInhand) + table.sort(self.cardList) + if index== nil or index ==0 then + return self:tryPendulumRule() + elseif index == 1 then + return self:tryPendulumRule() + elseif index == 2 then + return self:tryPendulumRule2() + elseif index == 3 then + return self:tryPendulumRule3() + end +end + +function M.GetHandCard(cardInhand,index) + local self = setmetatable({}, {__index = M}) + if not cardInhand or #cardInhand == 0 then + return nil + end + local HandCardList = init(self,cardInhand,index) + return HandCardList +end + + +return M + + + + + diff --git a/lua_probject/main_project/main/zipai/ZPCardView.lua b/lua_probject/main_project/main/zipai/ZPCardView.lua new file mode 100644 index 00000000..2c24f342 --- /dev/null +++ b/lua_probject/main_project/main/zipai/ZPCardView.lua @@ -0,0 +1,119 @@ + + +local M = { + btn_card = nil, + card_item = 0, + Hierarchy = 0, + index_X = 0, + index_Y = 0, + isUser = false, + initPos = Vector2.zero +} + + +function M.InitCardView(card_code, index_X, index_Y, type) + -- setmetatable(M, {__index = CardView}) + local self = setmetatable({}, {__index = M}) + self._room = DataManager.CurrenRoom + self.btn_card = self:InitUI(card_code, type) + self.card_item = card_code + self.index_X = index_X + self.index_Y = index_Y + self.btn_card.data = self + + self:Init() + return self, self.btn_card +end + +function M:Init() + self.card_width = 87 + self.initPos = Vector2.zero +end + +function M:InitUI(card_code, type) + local card + if type == 0 then + card = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Btn_Card") + self.icon = card:GetChild("icon") + self.icon.icon = self:getHandCardItem("ui://Main_RunBeard/201_", card_code) + self.icon:SetScale(self:getCardSize(), self:getCardSize()) + card:GetChild("n6"):SetScale(self:getCardSize(), self:getCardSize()) + elseif type == 1 then + card = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + self.icon = card:GetChild("icon") + if card_code == 0 then + self.icon = "ui://Main_RunBeard/202_1_300" + else + self.icon = self:GetCardItem("ui://Main_RunBeard/203_", card_code) + end + end + return card +end + +function M:GetCardItem(card_1, card_2) + local room = DataManager.CurrenRoom + if room.change_card_display ~= nil then + return card_1 .. room.change_card_display .. card_2 + else + return card_1 .. "2_" .. card_2 + end +end + +function M:getCardSize() + if self._room.change_card_size ~= nil then + return self._room.change_card_size + else + return 1 + end +end + +function M:getHandCardItem(card_1, card_2) + if self._room.change_card_display ~= nil then + if self._room.change_card_display == "1_" then + if self._room.change_card_size ~= nil then + self.card_width = 94 * self._room.change_card_size + else + self.card_width = 94 + end + + return card_1 .. "4_" .. card_2 + end + if self._room.change_card_size ~= nil then + self.card_width = 87 * self._room.change_card_size + else + self.card_width = 87 + end + return card_1 .. self._room.change_card_display .. card_2 + else + if self._room.change_card_size ~= nil then + self.card_width = 90 * self._room.change_card_size + else + self.card_width = 90 + end + return card_1 .. "6_" .. card_2 + end +end + +function M:UpdateKan() + self.btn_card.touchable = false + self.btn_card:GetController("Kan").selectedIndex = 1 +end + +function M:UpdateTing(isting) + self.btn_card:GetController("mark_ting").selectedIndex = isting and 1 or 0 +end + +function M:UpdateIcon() + self.icon.icon = self:getHandCardItem("ui://Main_RunBeard/201_", self.card_item) + -- self.btn_card:TweenMove(self:GetHandCardPos(self, #CountCards), 0.02) +end + +function M:UpdateScale() + local size = self._room.change_card_size + -- card_view.btn_card:GetChild("icon").icon = self:getHandCardItem("ui://Main_RunBeard/201_", card_view.card_item) + self.icon:SetScale(size, size) + self.btn_card:GetChild("n6"):SetScale(size, size) + -- self:getCardWidth() +end + +return M diff --git a/lua_probject/main_project/main/zipai/ZPChiView.lua b/lua_probject/main_project/main/zipai/ZPChiView.lua new file mode 100644 index 00000000..66b171b5 --- /dev/null +++ b/lua_probject/main_project/main/zipai/ZPChiView.lua @@ -0,0 +1,131 @@ +local M = {} + +function M.InitChiView(gamectr, view, cardInfo) + local self = setmetatable({}, {__index = M}) + self._room = DataManager.CurrenRoom + self.class = "ChiView" + self._gamectr = gamectr + self._mainView = view + self._cardInfo = cardInfo + return self +end + +function M:UpdateChiView(list, tip_hu, callback, cardInfo) + self:ShowView(list, tip_hu, callback, cardInfo) +end + +function M:ShowView(tiplist, tip_hu, callback, cardInfo) + local _pop_tip_choice = UIPackage.CreateObject("Main_RunBeard", "Pop_tip_choice") + local list_choose = _pop_tip_choice:GetChild("Lst_choose") + _pop_tip_choice:GetChild("dibtn").onClick:Add(function() + _pop_tip_choice:Dispose() + end) + + -- --list 去重复的 + if #tiplist == 1 then + _pop_tip_choice:GetController("bipai").selectedIndex = 3 + end + + local tip_list = membe_deep_clone(tiplist) + for i = 1, #tiplist do + for k = 1, #tip_list do + if tip_list[k].weight ~= 4 and tiplist[i].id ~= tip_list[k].id then + if tiplist[i].OpCard[1] == tip_list[k].OpCard[1] and tiplist[i].OpCard[2] == tip_list[k].OpCard[2] then + tip_list[i].weight = 4 + end + end + end + end + + list_choose:RemoveChildrenToPool() + for i = 1, #tip_list do + if tip_list[i].weight ~=4 then + local item_choose = list_choose:AddItemFromPool() + self:SetIcon(item_choose, 2, tip_list[i].OpCard[1]) + self:SetIcon(item_choose, 3, tip_list[i].OpCard[2]) + self:SetIcon(item_choose, 1, tip_list[i].card) + + item_choose.onClick:Add(function() + for k=1,list_choose.numChildren do + list_choose:GetChildAt(k-1):GetController("zhong") .selectedIndex = 0 + end + item_choose:GetController("zhong").selectedIndex = 1 + if tip_list[i].bi_list ==nil then + callback(tip_list[i].id) + self:CloseTip() + else + self.bilist={} + self._chiid = tip_list[i].id + self:CheckRatioCard(tip_list[i].bi_list,1,tip_list[i].card) + + end + end) + end + end + list_choose:ResizeToFit(#tip_list) + _pop_tip_choice:GetChild("di1").width = list_choose.width+110 + _pop_tip_choice.xy = Vector2((self._mainView.width - _pop_tip_choice.width)/2, -100) + self._mainView:AddChild(_pop_tip_choice) + self._pop_tip_choice = _pop_tip_choice + end + --比牌显示 + function M:CheckRatioCard(_tiplist,index,chicard,_biid) + if _biid ~=nil then + self.bilist={} + self.bilist[#self.bilist+1] = _biid + end + self._pop_tip_choice:GetController("bipai").selectedIndex = index + local Bilist_choose = self._pop_tip_choice:GetChild("Bi_Lst_choose"..index) + Bilist_choose:RemoveChildrenToPool() + for i = 1, #_tiplist do + local item = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Comp_choose") + local item_choose = Bilist_choose:AddChild(item) + self:SetIcon(item_choose, 2, _tiplist[i].opcard[1]) + self:SetIcon(item_choose, 3, _tiplist[i].opcard[2]) + self:SetIcon(item_choose, 1, chicard) + item_choose:GetController("zhong") .selectedIndex = 0 + item_choose.onClick:Add(function() + for k=1,Bilist_choose.numChildren do + Bilist_choose:GetChildAt(k-1):GetController("zhong") .selectedIndex = 0 + end + item_choose:GetController("zhong") .selectedIndex = 1 + if _tiplist[i].bi_list ==nil then + if tip_hu then + local guo_msg = MsgWindow.new(self._root_view, "确定取消胡吗?", MsgWindow.MsgMode.OkAndCancel) + guo_msg.onOk:Add(function() + self.bilist[#self.bilist+1] = i-1 + self._gamectr:SendAction(self._chiid,self.bilist) + guo_msg:Close() + self:CloseTip() + self._cardInfo:UpdateIsOnClick(false) + end) + guo_msg:Show() + else + self.bilist[#self.bilist+1] = i-1 + self._gamectr:SendAction(self._chiid,self.bilist) + self:CloseTip() + self._cardInfo:UpdateIsOnClick(false) + end + else + self:CheckRatioCard(_tiplist[i].bi_list,2,chicard,i-1) + end + end) + end + Bilist_choose:ResizeToFit(#_tiplist) + self._pop_tip_choice:GetChild("di"..index+1).width = Bilist_choose.width+110 + + end + + +function M:SetIcon(item, index, card) + item:GetChild("card" .. index).icon = UIPackage.GetItemURL("Main_RunBeard", CommonFun:GetCardItem("201_", card)) +end + +function M:CloseTip() + if (self._pop_tip_choice) then + self._pop_tip_choice:Dispose() + self._pop_tip_choice = nil + end +end + +return M diff --git a/lua_probject/main_project/main/zipai/ZPFzCardView.lua b/lua_probject/main_project/main/zipai/ZPFzCardView.lua new file mode 100644 index 00000000..1f64ef41 --- /dev/null +++ b/lua_probject/main_project/main/zipai/ZPFzCardView.lua @@ -0,0 +1,181 @@ +local M = {} + +local source_fz_03 = "ui://Main_RunBeard/Fz_0_3" +local source_fz_04 = "ui://Main_RunBeard/Fz_0_4" +local source_card = "ui://Main_RunBeard/202_" + +function M:getCardItem(card_1, card_2) + local room = DataManager.CurrenRoom + if room.change_card_display ~= nil then + return card_1 .. room.change_card_display .. card_2 + else + return card_1 .. "6_" .. card_2 + end +end + +function M.InitFzView(fz,isMy,isplay,index,count) + local self = setmetatable({}, {__index = M}) + local item,fzcards + if fz.type ~= RB_FZType.Kan then + item = UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Component1")--Extend_Poker_AHRunBeard + item:RemoveChildren(0, -1, true) + end + + -- local fzItem + if fz.type == RB_FZType.Bi or fz.type == RB_FZType.Chi then + fzcards = self:UpateChiBi(item,fz) + elseif fz.type == RB_FZType.Peng then + fzcards = self:UpdatePeng(item,fz) + elseif fz.type == RB_FZType.Wei or fz.type == RB_FZType.ChouWei then + fzcards = self:UpdateWei(item,fz,isMy) + elseif fz.type == RB_FZType.Ti then + fzcards = self:UpateTi(item,fz) + elseif fz.type == RB_FZType.Pao then + fzcards = self:UpatePao(item,fz) + end + + if item ~= nil and fzcards ~= nil then + self:PlayEffect(item,fzcards,isplay,index,count) + end + + return item,fzcards +end + +function M:UpateChiBi(item,fz) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_03) + local cardId1,cardId2,cardId3 + if #fz.opcard == 2 then + cardId1 = fz.card + cardId2 = fz.opcard[1] + cardId3 = fz.opcard[2] + else + cardId1 = fz.opcard[1] + cardId2 = fz.opcard[2] + cardId3 = fz.opcard[3] + end + fzcards:GetChild("card_" .. 1).icon = self:getCardItem(source_card, cardId1) + fzcards:GetController("c2").selectedIndex = 1 + fzcards:GetChild("card_" .. 2).icon = self:getCardItem(source_card, cardId2) + -- local card = fz.opcard[2] == nil and fz.opcard[1] or fz.opcard[2] + fzcards:GetChild("card_" .. 3).icon = self:getCardItem(source_card, cardId3) + fzcards.x, fzcards.y = 0, 0 + item:AddChildAt(fzcards, 0) + return fzcards +end + +function M:UpdatePeng(item,fz) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_03) + for j = 1, 3 do + fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1]) + end + fzcards.x, fzcards.y = 0, 0 + item:AddChildAt(fzcards, 0) + return fzcards +end + +function M:UpdateWei(item,fz,isMy) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_03) + --fzcards:GetController("c1").selectedIndex=1 + local room = DataManager.CurrenRoom + for j = 1, 3 do + if room.room_config.mingwei or fz.type==RB_FZType.ChouWei or isMy then + if j == 3 then + fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1]) + else + fzcards:GetChild("card_" .. j).icon = "ui://Main_RunBeard/202_1_300" + end + else + --未勾选明偎 + -- if isMy then + -- fzcards:GetChild("card_" .. j).icon = self:getCardItem(source_card, fz.opcard[1]) + -- fzcards:GetController("c1").selectedIndex = 1 + -- else + fzcards:GetChild("card_" .. j).icon = "ui://Main_RunBeard/202_1_300" + -- end + end + + end + fzcards.x, fzcards.y = 0, 0 + item:AddChildAt(fzcards,0) + return fzcards +end + +function M:UpateTi(item, fz,icon) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_04) + for i = 1, 4 do + if i == 4 and fz.type == RB_FZType.Ti then + fzcards:GetChild("card_" .. i).icon = self:getCardItem(source_card, fz.card) + else + fzcards:GetChild("card_" .. i).icon = "ui://Main_RunBeard/202_1_300" + end + end + fzcards.x, fzcards.y = 0, 0 + -- item:AddChildAt(fzcards,0) + return fzcards +end + +function M:UpatePao(item, fz,icon) + local fzcards = UIPackage.CreateObjectFromURL(source_fz_04) + for i = 1, 4 do + fzcards:GetChild("card_" .. i).icon = self:getCardItem(source_card, fz.opcard[1]) + end + fzcards.x, fzcards.y = 0, 0 + return fzcards +end + +function M:PlayEffect(fzitem,fzcards,isplay,index,count) + if (isplay == nil) then + isplay = false + end + if (isplay and index == count) then + local faArray = fzitem:GetChild("chiwei") + if (faArray ~= nil) then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end +end + +function M:PlayEffectOther(fzitem,fzcards, size,i,isplay,seat) + isplay = isplay == nil and false or isplay + local isAddlast = false + + local room = DataManager.CurrenRoom + if isplay and i== size then + local faArray = fzitem:GetChild("chiwei") + if room.room_config.people_num == 3 then + if (room.self_player.seat == 1) then + if (seat == 2) then + faArray = fzitem:GetChild("chiwei1") + else + faArray = fzitem:GetChild("chiwei") + end + elseif (room.self_player.seat == 2) then + if (seat == 3) then + faArray = fzitem:GetChild("chiwei1") + else + faArray = fzitem:GetChild("chiwei") + end + elseif (room.self_player.seat == 3) then + if (seat == 1) then + faArray = fzitem:GetChild("chiwei1") + else + faArray = fzitem:GetChild("chiwei") + end + end + end + + if (faArray ~= nil) then + faArray:AddChild(fzcards) + else + fzitem:AddChild(fzcards) + end + else + fzitem:AddChild(fzcards) + end +end + +return M diff --git a/lua_probject/main_project/main/zipai/ZPGameController.lua b/lua_probject/main_project/main/zipai/ZPGameController.lua new file mode 100644 index 00000000..ab5e5a19 --- /dev/null +++ b/lua_probject/main_project/main/zipai/ZPGameController.lua @@ -0,0 +1,10 @@ + +local M = {} + +setmetatable(M,{__index = GameController}) + +function M:init(name) + GameController.init(self,name) +end + +return M diff --git a/lua_probject/main_project/main/zipai/ZPGameEvent.lua b/lua_probject/main_project/main/zipai/ZPGameEvent.lua new file mode 100644 index 00000000..22d92845 --- /dev/null +++ b/lua_probject/main_project/main/zipai/ZPGameEvent.lua @@ -0,0 +1,22 @@ +local ZPGameEvent = { + -- 发牌 + SendCards = 'SendCards', + --发最后一张牌 + AddCard = 'AddCard', + -- 胡牌 + ZPHuCard = 'ZPHuCard', + -- 结算事件 + ZPResult1 = 'ZPResult1', + -- 大结算事件 + ZPResult2 = 'ZPResult2', + -- 转盘指向事件 + EventTurn = 'EventTurn', + OutHint = 'OutHint', --出牌tips + GetCard = 'GetCard', --摸牌 + OutCard = 'OutCard', --出牌 + FangziAction = 'FangziAction', --吃碰等操作事件 + FZTips = 'FZTips', --放子提示 + QiCard = 'QiCard' --弃牌 +} + +return ZPGameEvent diff --git a/lua_probject/main_project/main/zipai/ZPMainView.lua b/lua_probject/main_project/main/zipai/ZPMainView.lua new file mode 100644 index 00000000..27fe63a2 --- /dev/null +++ b/lua_probject/main_project/main/zipai/ZPMainView.lua @@ -0,0 +1,354 @@ +local PlayerSelfCardInfoView = import('.ZPPlayerSelfCardInfoView') +local PlayerCardInfoView = import('.ZPPlayerCardInfoView') +local ZPSettingView = import('.ZPSettingView') +local ZPTableBG = import('.ZPTableBG') +local HuTipView = import('.HuTipView') +local ZPGameEvent = import('.ZPGameEvent') +local M = { + default_btn = false +} + +setmetatable(M, {__index = MainView}) + +local default_bg = 1 + +function M:InitView(url, isdisplay, open_social, change_card_size, qihu) + UIPackage.AddPackage('base/main_zipai/ui/Main_RunBeard') + MainView.InitView(self, url) + self._full_offset = false + --显示背景 + ZPTableBG.LoadTableBG(default_bg, self._room.game_id, self._root_view) + self.qihu = qihu + if qihu ~= nil then + local id = ZPTableBG.GetTableBG(self._room.game_id) + if id > 3 or id <= 0 then + id = 1 + end + if self._room.score_times ~= nil and self._room.score_times > 0 then + self._view:GetChild('di_text').text = + self._room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起 ' .. self._room.score_times .. '倍' + else + self._view:GetChild('di_text').text = self._room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起' + end + self._view:GetController('bg_state').selectedIndex = id - 1 + end + self.cd_time = 0 + self.default_btn = open_social + if isdisplay == nil then + isdisplay = false + end + local tex_round = self._view:GetChild('tex_round') + self._tex_leftTime = self._view:GetChild('time') + local remaining_card = self._view:GetChild('remaining_card') + self._tex_LeftCard = self._view:GetChild('remaining_card') + self._rightPanelView._opt = 2 + self._rightPanelView:__UpdateTime() + local rightpanel = self._view:GetChild('right_panel') + if (rightpanel ~= nil) then + self.tex_gametype = rightpanel:GetChild('tex_gametype') + if (self.tex_gametype ~= nil) then + self.tex_gametype.text = self._room.room_config:GetGameName() + end + end + self._player_card_info = {} + local _room = self._room + self._hu_tip = HuTipView.new(self) + --加载上次游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id) + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + + local _gamectr = self._gamectr + _gamectr:SendChangeTypeFace(typeface) + if typeface == 1 then + if isdisplay then + self._room.change_card_display = '7_' + else + self._room.change_card_display = '2_' + end + elseif typeface == 2 then + self._room.change_card_display = '1_' + elseif typeface == 3 then + self._room.change_card_display = '3_' + elseif typeface == 4 then + self._room.change_card_display = '8_' + end + end + -- self._view.fairyBatching = true + --加载上次游戏的手牌大小 + + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. 'cardsize_new') + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_cardsize'] + local _gamectr = self._gamectr + if typeface == 0 then + self._room.change_card_size = 1.2 + elseif typeface == 1 then + self._room.change_card_size = 1 + elseif typeface == 2 then + self._room.change_card_size = 0.8 + end + else + self._room.change_card_size = change_card_size + end + + --加载上次游戏的接收语音 + if self.default_btn then + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. _room.game_id .. 'yuyin') + local json_data1 = Utils.LoadLocalFile(user_id .. _room.game_id .. 'chupai') + local json_data2 = Utils.LoadLocalFile(user_id .. _room.game_id .. 'fangyan') + self._room.yuyin_typeface = 1 + self._room.chupai_typeface = 1 + self._room.fangyan_typeface = 1 + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + self._room.yuyin_typeface = typeface + self:SetInteractEnabled(typeface == 1 and 0 or 1) + end + if json_data1 ~= nil then + local _data = json.decode(json_data1) + local typeface = _data['game_typeface'] + self._room.chupai_typeface = typeface + end + if json_data2 ~= nil then + local _data = json.decode(json_data2) + local typeface = _data['game_typeface'] + self._room.fangyan_typeface = typeface + end + end + + local _player_card_info = self._player_card_info + for i = 1, _room.room_config.people_num do + local tem = self._view:GetChild('player_card_info' .. i) + _player_card_info[i] = self:NewPlayerCardInfoView(tem, i) + end + + local list = _room.player_list + for i = 1, #list do + local p = list[i] + local info = _player_card_info[self:GetPos(p.seat)] + info:SetPlayer(p) + info:FillData() + end + + self._rightPanelView.ctr_log.selectedIndex = 0 + local list = _room.player_list + local readyNum = 0 + for i = 1, #list do + local p = list[i] + local info = self._player_info[self:GetPos(p.seat)] + info._view.visible = true + info:FillData(p) + if p.ready then + readyNum = readyNum + 1 + end + end + if (_room.curren_round > 0) then + self._rightPanelView.ctr_log.selectedIndex = 0 + end + + self._ctr_action = self._view:GetController('action') + if _room.banker_seat == _room.self_player.seat and readyNum > 1 and readyNum == _room.room_config.people_num then + elseif not _room.self_player.ready then + self._ctr_action.selectedIndex = 1 + else + self._ctr_action.selectedIndex = 0 + end + self:ResetHandCard() + self:showBackBtnView() + self:InitXiPai() +end + +function M:InitXiPai() + self._xipaiPanel = UIPackage.CreateObjectFromURL("ui://Common/panel_handzipai02") + self._root_view:AddChild(self._xipaiPanel) + + local offset = get_offset(self._full_offset) + + self._xipaiPanel.width = GRoot.inst.width - (offset * 2) + self._xipaiPanel.height = GRoot.inst.height + self._xipaiPanel.x = offset + + self._xipaiPanel.visible=false + --self:PlayXiPai() +end + +function M:PlayXiPai(xipaiCallBack) + if self._xipaiPanel then + coroutine.start(function() + self._xipaiPanel.visible=true + self._xipaiPanel:GetTransition("XiPai"):Play() + coroutine.wait(3.5) + self._xipaiPanel.visible=false + if xipaiCallBack then + xipaiCallBack() + end + end) + + + end +end + +function M:NewSettingView() + local settingView = ZPSettingView.new(self._view, 2, self.default_btn) + settingView:FillBgSection( + function(url) + LoadGameBg(url, self._root_view) + end, + self._room.game_id, + default_bg, + self._room, + self.qihu + ) + return settingView +end + +function M:EventInit() + MainView.EventInit(self) +end + +function M:NewPlayerCardInfoView(view, index) + if index == 1 then + return PlayerSelfCardInfoView.new(view, self) + end + return PlayerCardInfoView.new(view, self) +end + +-- 设置 更新 手牌字体 三套 +function M:UpdateCardDisplay(index) + local _gamectr = self._gamectr + _gamectr:SendChangeTypeFace(index) + if index == 1 then + self._room.change_card_display = '2_' + elseif index == 2 then + self._room.change_card_display = '1_' + elseif index == 3 then + self._room.change_card_display = '3_' + elseif index == 4 then + self._room.change_card_display = '8_' + end + for i = 1, #self._room.player_list do + local p = self._room.player_list[i] + local info = self._player_card_info[self:GetPos(p.seat)] + if p.DiceCard ~= nil and p.DiceCard ~= 0 then + info:UpdateOutCardList(p.DiceCard) + end + if p.outcard_list ~= nil and #p.outcard_list > 0 then + info:UpdateQiPai(p.outcard_list) + end + if p.fz_list ~= nil and #p.fz_list > 0 then + info:UpdateFzList(p.fz_list) + end + if p.seat == self._room.self_player.seat then + info:UpdateCardDisplay() + end + end +end + +-- 设置 更新 手牌大小 +function M:UpdateCardSize(index) + if index == 0 then + self._room.change_card_size = 1.2 + elseif index == 1 then + self._room.change_card_size = 1 + elseif index == 2 then + self._room.change_card_size = 0.8 + end + local info = self._player_card_info[1] + info:UpdateCardSize() +end + +-- 设置 更新 方言 +function M:UpdateFangyan(index) + self._room.fangyan_typeface = index +end +--刷新手牌排列 按钮 三种 排列方法 在 PendulumRule 里 +function M:ResetHandCard(...) + local btn_reset = self._view:GetChild('btn_reset') + btn_reset.onClick:Set( + function(...) + if self._popEvent == false then + return + end + --加载上次的 + local index = 1 + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. 'ResetHandCard') + if json_data ~= nil then + local _data = json.decode(json_data) + index = _data['index'] + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['ResetHandCard'] = true + if index == 1 then + _data['index'] = 2 + elseif index == 2 then + _data['index'] = 3 + elseif index == 3 then + _data['index'] = 1 + end + local key = user_id .. 'ResetHandCard' + Utils.SaveLocalFile(key, json.encode(_data)) + local x = _data['index'] + local card_info = self._player_card_info[1] + card_info:InitHandCard(false, x) + end + ) +end + +function M:showBackBtnView() + local btn_back_lobby = self._view:GetChild('btn_back_lobby') + local btn_jiesan_lobby1 = self._view:GetChild('Btn_jiesan_lobby') + --btn_jiesan_lobby1.displayObject.gameObject:SetActive(false) + --btn_jiesan_lobby1:GetChild("n8").displayObject.gameObject:SetActive(false) + if (btn_jiesan_lobby1 ~= nil) then + btn_jiesan_lobby1.onClick:Set( + function() + if (self.cd_time > 0) then + ViewUtil.ErrorTip(nil, '您还处于解散冷却时间当中,请稍后再试') + else + self.cd_time = 30 + self._gamectr:AskDismissRoom( + function(res) + ViewUtil.ErrorTip(res.ReturnCode, '') + end + ) + self:onDisBandTimer() + end + end + ) + end +end + +--解散计时器 +function M:onDisBandTimer() + if self.cd_coroutine ~= nil then + coroutine.stop(self.cd_coroutine) + end + self.cd_coroutine = + coroutine.start( + function() + while (self.cd_time > 0) do + self.cd_time = self.cd_time - 1 + self.cd_time = math.max(0, self.cd_time) + if self.cd_time > 0 then + coroutine.wait(1) + end + end + end + ) +end + +function M:Destroy() + UIPackage.RemovePackage('base/main_zipai/ui/Main_RunBeard') + MainView.Destroy(self) +end +return M diff --git a/lua_probject/main_project/main/zipai/ZPPlayBackView.lua b/lua_probject/main_project/main/zipai/ZPPlayBackView.lua new file mode 100644 index 00000000..5633fd43 --- /dev/null +++ b/lua_probject/main_project/main/zipai/ZPPlayBackView.lua @@ -0,0 +1,13 @@ +local ZPTableBG = import('.ZPTableBG') + +local M = {} + +setmetatable(M, {__index = PlayBackView}) + +function M:InitView(url) + PlayBackView.InitView(self, url) + local _view = self._view + ZPTableBG.LoadTableBG(1, self._room.game_id, self._root_view) +end + +return M diff --git a/lua_probject/main_project/main/zipai/ZPPlayer.lua b/lua_probject/main_project/main/zipai/ZPPlayer.lua new file mode 100644 index 00000000..fe112fd2 --- /dev/null +++ b/lua_probject/main_project/main/zipai/ZPPlayer.lua @@ -0,0 +1,37 @@ + + +local EXPlayer ={ + -- 手牌列表 + card_list = nil, + -- 剩余牌数 + hand_left_count = 0, + -- 出牌列表 + outcard_list = nil, + -- 牌组列表 + fz_list = nil, + hu_xi =0 +} + +local M = EXPlayer + +--- Create a new EXPlayer +function M.new() + setmetatable(M,{__index = Player}) + local self = setmetatable({}, {__index = M}) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + return self +end + +-- 清理玩家数据 +function M:Clear() + Player.Clear(self) + self.card_list = {} + self.outcard_list = {} + self.fz_list = {} + self.hand_left_count = 0 + self.hu_xi =0 +end + +return M \ No newline at end of file diff --git a/lua_probject/main_project/main/zipai/ZPPlayerCardInfoView.lua b/lua_probject/main_project/main/zipai/ZPPlayerCardInfoView.lua new file mode 100644 index 00000000..5be62c48 --- /dev/null +++ b/lua_probject/main_project/main/zipai/ZPPlayerCardInfoView.lua @@ -0,0 +1,475 @@ +AreaOderType = { + left_right = "left_right", + right_left = "right_left", + up_down = "up_down", + down_up = "down_up" +} + +local PlayerCardInfoView = { + _view = nil, + _mainView = nil, + + _mask_liangpai = nil, + _area_outcard_list = nil, + _area_handcard_list = nil, + + +} +local function NewCardView(card,cardItem,index_X,index_Y) + local self = {} + setmetatable(self,{__index = CardView}) + self.btn_card = card + self.card_item = cardItem + self.index_X = index_X + self.index_Y = index_Y + return self +end + + +local M = PlayerCardInfoView + +function M.new(view,mainView) + local self = {} + setmetatable(self, {__index = M}) + self._view = view + self._mainView = mainView + self:init() + return self +end + +function M:init() + + local view = self._view + self._room = DataManager.CurrenRoom + self._area_outcard_list = view:GetChild("area_outcard_list") + self._area_handcard_list = view:GetChild("area_handcard_list") + self._area_fz_list = view:GetChild("area_fz_list") + self._area_qipai_list = view:GetChild("windcard_list") + self._mask_liangpai = view:GetChild("mask_liangpai") + UIPackage.AddPackage("base/main_zipai/ui/Main_RunBeard") +end + +function M:SetPlayer(p) + self._player = p +end + +function M:FillData(begin) + +end + +function M:Clear() + self._area_outcard_list:RemoveChildren(0, -1, true) + self._area_fz_list:RemoveChildren(0, -1, true) + self._area_handcard_list:RemoveChildren(0, -1, true) + self._area_qipai_list:RemoveChildren(0, -1, true) + self._mask_liangpai:RemoveChildren(0, -1, true) +end + + +function M:fillCard(obj,card_type,card) + +end + + +function M:ClearOutCard() + self._area_outcard_list:RemoveChildren(0, -1, true) + +end + +--弃牌 +function M:UpdateQiPai( qi_list) + self._area_qipai_list:RemoveChildren(0,-1,true) + for i=1,#qi_list do + local qicards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + qicards:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",qi_list[i]) + self._area_qipai_list:AddChild(qicards) + end + +end + + --放字 +function M:UpdateFzList( fz_list ) + printlog("UpdateFzList=======") + pt(fz_list) + self._area_fz_list:RemoveChildren(0,-1,true) + for i = 1,#fz_list do + local fzitem = nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Component1") + fzitem:RemoveChildren(0,-1,true) + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + fzcards:GetController("c2").selectedIndex =1 + fzcards:GetChild("card_"..1).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].active_card) + fzcards:GetChild("card_"..2).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[1]) + fzcards:GetChild("card_"..3).icon = self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].opcard[2]) + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Peng then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,3 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Wei then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_3") + for j=1,2 do + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + fzcards:GetChild("card_"..3).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Pao then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + end + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + + elseif fz_list[i].type == RB_FZType.Ti then + + local fzcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Fz_0_4") + for j=1,4 do + if j==4 then + fzcards:GetChild("card_"..j).icon =self:getCardItem("ui://Main_RunBeard/202_",fz_list[i].card) + else + fzcards:GetChild("card_"..j).icon ="ui://Main_RunBeard/202_1_300" + end + end + fzcards.x,fzcards.y = 0,0 + fzitem:AddChildAt(fzcards,0) + self._area_fz_list:AddChild(fzitem) + end + end +end + +--回放手牌 +function M:InitHandCard(handcard) + self._area_handcard_list:RemoveChildren(0,-1,true) + local pokerList = self:PendulumRule(handcard) + self.card_lists ={} + for i =1,#pokerList do + for j =1,#pokerList[i] do + local card_code = pokerList[i][j] + local btn_card =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",card_code) + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card,5-j) + local card_view = NewCardView(btn_card,card_code,i,j) + self.card_lists[#self.card_lists+1] = card_view + end + end + for j=#self.card_lists,1,-1 do + local card_view = self.card_lists[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view,#pokerList) + end + + if self._player.fz_list~=nil then + for i=1,#self._player.fz_list do + if self._player.fz_list[i].type == RB_FZType.Kan then + self:UpdateKan(self._player.fz_list[i].card) + end + end + end +end + + + +function M:UpdateHandCards( list ) + self.card_lists = {} + self._area_handcard_list:RemoveChildren(0,-1,true) + local CountCards = {} + for i=1,#list do + CountCards[list[i].index_X]=CountCards[list[i].index_X] == nil and 1 or CountCards[list[i].index_X] + 1 + end + for i=1,#list do + local card_code = list[i].card_item + local btn_card =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Qipai") + btn_card:GetChild("icon").icon = self:getCardItem("ui://Main_RunBeard/202_",card_code) + local card_view = NewCardView(btn_card,card_code,list[i].index_X,list[i].index_Y) + --存牌堆 + self.card_lists[#self.card_lists+1] =card_view + end + for j=#self.card_lists,1,-1 do + local card_view = self.card_lists[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view,#CountCards) + end + +end + +--牌位置 +function M:GetHandCardPos(cards_view,cards) + local x,y = 0,0 + local card_width = 42 -- 牌的宽度 + local middle_x = self._area_handcard_list.width / 2 + local start_x = middle_x - (cards / 2 * (card_width)) + x = start_x + (card_width) * (cards_view.index_X - 1) + y = 0 - (42*cards_view.index_Y) + return Vector2.New(x,y) +end + + + +function M:UpdateOutCardList(outcard) + + self._area_outcard_list:RemoveChildren(0,-1,true) + local outcards =UIPackage.CreateObjectFromURL("ui://Main_RunBeard/Gcm_OutCard") + if outcard==0 then + outcards:GetChild("icon").icon ="ui://Main_RunBeard/203_1_300" + else + outcards:GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/203_",outcard) + end + outcards.x,outcards.y = 0,0 + self._area_outcard_list:AddChild(outcards) +end + +--摸牌动画 +function M:PlayingOutCardAnima(card) + if(self._area_outcard_list ~=nil and self._area_outcard_list.numChildren>0)then + self._area_outcard_list:GetChildAt(0):GetChild("icon").icon =self:getCardItem("ui://Main_RunBeard/202_",card) + self._view:GetTransition("t0"):Play() + end + coroutine.start(function() + coroutine.wait(0.1) + self:ClearOutCard() + end) + -- +end + + +--摆牌规则 +function M:PendulumRule(handcard) + local room = DataManager.CurrenRoom + local card_list = handcard + local card_count = #card_list + local cards_map = {} + local CountCards = {} + for i=1,#card_list do + CountCards[card_list[i]]= CountCards[card_list[i]] == nil and 1 or CountCards[card_list[i]] + 1 + end + --find4 + for k,v in pairs(CountCards) do + if (v == 4) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cs[4]= k + cards_map[#cards_map+1]=cs + CountCards[k] = 0 + card_count =card_count- 4 + end + end + + + --find3 + for k,v in pairs(CountCards) do + if (v >= 3) then + local cs = {} + cs[1]= k + cs[2]= k + cs[3]= k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] -3 + card_count =card_count- 3 + end + end + --find AAa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] >= 2 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-3 + end + end + end + --find aaA + for i = 101, 110 do + if CountCards[i]~=nil and (CountCards[i] >= 2) then + if CountCards[i + 100]~=nil and (CountCards[i + 100] == 1) then + local cs = {} + cs[1]= i + cs[2]= i + cs[3]= i+100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 2; + CountCards[i +100] = CountCards[i +100] - 1 + card_count = card_count-3 + end + end + end + + --find2 + for k,v in pairs(CountCards) do + if (v >= 2) then + local cs = {} + cs[1] = k + cs[2] = k + cards_map[#cards_map+1]=cs + CountCards[k] = CountCards[k] - 2 + card_count =card_count- 2 + end + end + --find 小 2 7 10 + local counta = CountCards[102] + if counta ~=nil and counta>0 then + for i=1,counta do + if CountCards[102]~=nil and CountCards[107]~=nil and CountCards[110]~=nil and CountCards[102] >0 and CountCards[107] >0 and CountCards[110] >0 then + local cs = {} + cs[1]= 102 + cs[2]= 107 + cs[3]= 110 + cards_map[#cards_map+1] = cs + CountCards[102] = CountCards[102]-1 + CountCards[107] = CountCards[107]-1 + CountCards[110] = CountCards[110]-1 + card_count = card_count - 3 + end + end + end + + --find 大 2 7 10 + local countA = CountCards[202] + if countA ~=nil and countA>0 then + for i=1,countA do + if CountCards[202]~=nil and CountCards[207]~=nil and CountCards[210]~=nil and CountCards[202] >0 and CountCards[207] >0 and CountCards[210] >0 then + local cs = {} + cs[1]= 202 + cs[2]= 207 + cs[3]= 210 + cards_map[#cards_map+1]=cs + CountCards[202] = CountCards[202]-1 + CountCards[207] = CountCards[207]-1 + CountCards[210] = CountCards[210]-1 + card_count = card_count - 3 + end + end + end + + --find abc + for i=101,110 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and (CountCards[i] > 0 and CountCards[i + 1] > 0 and CountCards[i + 2] > 0) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + --find ABC + for i=201,210 do + if (CountCards[i] ~=nil and CountCards[i + 1] ~=nil and CountCards[i + 2] ~=nil) and (CountCards[i] > 0 and CountCards[i + 1] > 0 and CountCards[i + 2] > 0) then + local cs = {} + cs[1]= i + cs[2]= i+1 + cs[3]= i+2 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]-1 + CountCards[i+1] = CountCards[i+1]-1 + CountCards[i+2] = CountCards[i+2]-1 + card_count = card_count - 3 + end + end + --find Aa + for i = 201, 210 do + if CountCards[i]~=nil and CountCards[i] == 1 then + if CountCards[i-100]~=nil and CountCards[i-100] == 1 then + local cs = {} + cs[1]= i + cs[2]= i-100 + cards_map[#cards_map+1]=cs + CountCards[i] = CountCards[i]- 1; + CountCards[i - 100] = CountCards[i - 100]-1 + card_count = card_count-2 + end + end + end + + local r_count = 9 - #cards_map + local merge = false + merge = r_count0 then + for i=1,#tempNotPutList do + self:UpdateKan(tempNotPutList[i]) + end + end +end + +--手牌 +function M:InitHandCard(isPlayAni, index) + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + self.outcard_button = nil + + if self.cor_init_poker ~= nil then + coroutine.stop(self.cor_init_poker) + end + self.cor_init_poker = nil + local _room = DataManager.CurrenRoom + --得到排序好的 list + local pokerList = PendulumRule.GetHandCard(_room.self_player.handcard_list, index) + if pokerList == nil or #pokerList == 0 then + return + end + self.cards_count = #pokerList + self.card_list = {} + self._area_handcard_list:RemoveChildren(0, -1, true) + --开始发牌动画 + if isPlayAni == true then + self.cor_init_poker = + coroutine.start( + function() + self._mainView._popEvent = false + if self._mainView._rightPanelView._settingView ~= nil then + self._mainView._rightPanelView._settingView:SetBtnUpdateCardEnable(false) + end + for i = 1, #pokerList do + local pokerListNum = 0 + for j = 1, #pokerList[i] do + local card_code = pokerList[i][j] + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 87 * self:getCardSize() + self.card_hight = 110 * self:getCardSize() + local x, y = 500, (j * 75) - 500 + btn_card:SetXY(x, y) + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card, 5 - j) + local card_view = NewCardView(btn_card, card_code, i, j) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + btn_card.data = card_view + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + end + for j = #self.card_list, 1, -1 do + coroutine.wait(0.005) + if pokerListNum == #pokerList[i] then + break + end + pokerListNum = pokerListNum + 1 + local card_view = self.card_list[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, self.cards_count), 0.08) + end + end + self:UpdateHandCardsPos() + self._mainView._popEvent = true + self:UpdateIsOnClick(true) + if self._mainView._rightPanelView._settingView ~= nil then + coroutine.start( + function() + coroutine.wait(1) + self._mainView._rightPanelView._settingView:SetBtnUpdateCardEnable(true) + end + ) + end + end + ) + else + --没有发牌动画 + for i = 1, #pokerList do + for j = 1, #pokerList[i] do + local card_code = pokerList[i][j] + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 87 * self:getCardSize() + self.card_hight = 110 * self:getCardSize() + self._area_handcard_list:AddChild(btn_card) + self._area_handcard_list:SetChildIndex(btn_card, 5 - j) + local card_view = NewCardView(btn_card, card_code, i, j) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + btn_card.data = card_view + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + end + --存牌堆 + for j = 1, #self.card_list do + local card_view = self.card_list[j] + card_view.btn_card.xy = self:GetHandCardPos(card_view, self.cards_count) + end + end + if self._player.fz_list ~= nil then + for i = 1, #self._player.fz_list do + if self._player.fz_list[i].type == RB_FZType.Kan then + self:UpdateKan(self._player.fz_list[i].card) + end + end + end + self:UpdateHandCardsPos() + end + + self:SetNotPutCard() +end +--更新手牌 +function M:UpdateHandCards(list) + self.card_list = {} + self._area_handcard_list:RemoveChildren(0, -1, true) + + self.outcard_button = nil + + local CountCards = {} + for i = 1, #list do + CountCards[list[i].index_X] = CountCards[list[i].index_X] == nil and 1 or CountCards[list[i].index_X] + 1 + end + for i = 1, #list do + local card_code = list[i].card_item + local btn_card = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Btn_Card') + btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_code) + btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 87 * self:getCardSize() + self.card_hight = 110 * self:getCardSize() + local card_view = NewCardView(btn_card, card_code, list[i].index_X, list[i].index_Y) + --存牌堆 + self.card_list[#self.card_list + 1] = card_view + btn_card.data = card_view + btn_card.onTouchBegin:Set(handler(self, self.onTouchBegin)) + btn_card.onTouchMove:Set(handler(self, self.onTouchMove)) + btn_card.onTouchEnd:Set(handler(self, self.__OnDragEnd)) + end + for j = #self.card_list, 1, -1 do + local card_view = self.card_list[j] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card.xy = self:GetHandCardPos(card_view, #CountCards) + end + if self._player.fz_list ~= nil then + for i = 1, #self._player.fz_list do + if self._player.fz_list[i].type == RB_FZType.Kan then + self:UpdateKan(self._player.fz_list[i].card) + end + end + end + self:SetNotPutCard() +end + +-- -- +function M:onTouchBegin(context) + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + local button = context.sender + local card = button.data + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self:ShowHuTip(card.card_item) + end + card.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/203_', card.card_item) + -- card.btn_card.sortingOrder = 100 + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + card.btn_card.xy = Vector2.New(card.btn_card.x + 20, card.btn_card.y - 50) + card.touch_pos = xy - button.xy +end + +function M:onTouchMove(context) + local button = context.sender + local card = button.data + local xy = self._area_handcard_list:GlobalToLocal(Vector2.New(context.inputEvent.x, context.inputEvent.y)) + button.xy = xy - card.touch_pos +end + +--出牌提示动画 +function M:ChuPaiTiShi() + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + if DataManager.CurrenRoom.curren_outcard_seat == DataManager.CurrenRoom.self_player.seat then + self._view:GetController('chupai').selectedIndex = 1 + else + self._view:GetController('chupai').selectedIndex = 0 + end +end +-- 删手牌 +function M:DeleteHandCard(carditem) + local card = nil + if self.outcard_button ~= nil and carditem == self.outcard_button.card_item then + list_remove(self.card_list, self.outcard_button) + self._area_handcard_list:RemoveChild(self.outcard_button.btn_card, true) + + card = self.outcard_button + self.outcard_button = nil + else + for i = 1, #self.card_list do + local card_view = self.card_list[i] + if carditem == card_view.card_item then + card_view.btn_card.touchable = false + list_remove(self.card_list, card_view) + card = card_view + --card_view.btn_card:RemoveFromParent() + self._area_handcard_list:RemoveChild(card_view.btn_card, true) + break + end + end + end + if card ~= nil then + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + end + end + self:UpdateHandCardsPos() +end +--更新手牌的坎 +function M:UpdateKan(card) + for i = 1, #self.card_list do + local card_view = self.card_list[i] + if card_view.card_item == card then + card_view.btn_card.touchable = false + card_view.btn_card:GetController('Kan').selectedIndex = 1 + end + end +end + +-- 手牌更新位置方法 self.card_list 里面的对象 NewCardView,index_X index_Y 就是xy序号 +function M:UpdateHandCardsPos() + --得到有 多少列 + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.old_postion = self:GetHandCardPos(card_view, #CountCards) + card_view.btn_card:TweenMove(card_view.old_postion, 0.3) + end + self:ShowHuTip() +end + +--刷新手牌字体 +function M:UpdateCardDisplay() + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + card_view.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_view.card_item) + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, #CountCards), 0.3) + end +end +--更新手牌大小 +function M:UpdateCardSize() + local CountCards = {} + for i = 1, #self.card_list do + CountCards[self.card_list[i].index_X] = + CountCards[self.card_list[i].index_X] == nil and 1 or CountCards[self.card_list[i].index_X] + 1 + end + for i = #self.card_list, 1, -1 do + local card_view = self.card_list[i] + card_view.btn_card:RemoveFromParent() + card_view.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card_view.card_item) + card_view.btn_card:GetChild('icon'):SetScale(self:getCardSize(), self:getCardSize()) + card_view.btn_card:GetChild('n6'):SetScale(self:getCardSize(), self:getCardSize()) + self.card_width = 87 * self:getCardSize() + self.card_hight = 110 * self:getCardSize() + self._area_handcard_list:AddChild(card_view.btn_card) + card_view.btn_card:TweenMove(self:GetHandCardPos(card_view, #CountCards), 0.3) + end +end + +function M:UpdateIsOnClick(isOut) + self._view.touchable = isOut +end + +-- 结束 拖拽事件 +-- 根据牌结束点的位置 判断是出牌还是调整位置 button.xy 和 牌的xy比较 +function M:__OnDragEnd(context) + if DataManager.CurrenRoom == nil or DataManager.CurrenRoom.self_player == nil then + return + end + if self.outcard_button then + self.outcard_button = nil + end + local button = context.sender + local card = button.data + -- card.btn_card.sortingOrder = 0 + local _room = DataManager.CurrenRoom + + if (button.y < -320 and _room ~= nil and _room.curren_outcard_seat == _room.self_player.seat) then + button.touchable = false + self.outcard_button = card + self:UpdateIsOnClick(false) + self._mainView:OutCard(card.card_item) + else + local isChangeCard = false + self.outcard_button = nil + card.btn_card:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/201_', card.card_item) + self._area_handcard_list:AddChild(button) + if #self.card_list == 1 then + isChangeCard = false + self:UpdateHandCardsPos() + return + end + local CountCards = {} + for i = 1, #self.card_list do + local lists = {} + if CountCards[self.card_list[i].index_X] == nil then + lists[#lists + 1] = self.card_list[i] + CountCards[self.card_list[i].index_X] = lists + else + CountCards[self.card_list[i].index_X][#CountCards[self.card_list[i].index_X] + 1] = self.card_list[i] + end + end + local minmark = 1 + local maxmark = #self.card_list + if card == self.card_list[1] or card == self.card_list[#self.card_list] then + if self.card_list[1].index_X == self.card_list[2].index_X then + minmark = 2 + end + if self.card_list[#self.card_list].index_X == self.card_list[#self.card_list - 1].index_X then + maxmark = #self.card_list - 1 + end + end + --位置x小于第一张牌 放第一排 + if button.x + button.width / 2 < self.card_list[minmark].btn_card.x and #CountCards < 10 then + --位置大于最后一张牌 放最后一排 + list_remove(self.card_list, card) + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X < card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + else + for i = 1, #self.card_list do + self.card_list[i].index_X = self.card_list[i].index_X + 1 + end + end + card.index_X = 1 + card.index_Y = 1 + table.insert(self.card_list, 1, card) + isChangeCard = true + elseif button.x + button.width / 2 > (self.card_list[maxmark].btn_card.x + button.width) and #CountCards < 10 then + list_remove(self.card_list, card) + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + end + card.index_X = self.card_list[#self.card_list].index_X + 1 + card.index_Y = 1 + self.card_list[#self.card_list + 1] = card + isChangeCard = true + else + --放已有的牌堆上 判断放第几列 + local MoveCard = false + local MoveCardPos = 0 + local MoveCardY = 0 + for i = 1, #CountCards do + local card_view = CountCards[i][1] + if card_view ~= nil then + if + button.x + button.width / 2 > card_view.old_postion.x and + button.x + button.width / 2 < (card_view.old_postion.x + button.width) + then + if card ~= card_view and #CountCards[i] < 4 and card.index_X ~= card_view.index_X then + MoveCardPos = i + MoveCardY = #CountCards[i] + 1 + MoveCard = true + list_remove(self.card_list, card) + end + end + end + end + local MoveCardindex = 0 + -- local MoveCardY = 0 + if + button.x + button.width / 2 > card.old_postion.x and + button.x + button.width / 2 < (card.old_postion.x + button.width) + then + if #CountCards[card.index_X] > 1 then + for i = 1, #CountCards[card.index_X] do + local _cv = CountCards[card.index_X][i] + if _cv ~= card then + if + button.y + button.height / 2 > _cv.btn_card.y and + button.y + button.height / 2 < (_cv.btn_card.y + button.height) + then + --向下移動 + if ((button.y + button.height / 2) + 20) > (card.old_postion.y + button.height) then + --向上移動 + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + elseif ((button.y + button.height / 2) - 20) < card.old_postion.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + end + elseif i == #CountCards[card.index_X] and button.y + button.height / 2 < _cv.btn_card.y then + MoveCardindex = 1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + elseif i == 1 and button.y + button.height / 2 > (_cv.btn_card.y + button.width) then + MoveCardindex = -1 + MoveCardPos = card.index_X + MoveCardY = _cv.index_Y + MoveCard = true + list_remove(self.card_list, card) + end + end + end + end + end + if MoveCard == true and MoveCardindex == 0 then + --上下移动 + local num = 0 + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X and card.index_Y < self.card_list[i].index_Y then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + if card.index_X == self.card_list[i].index_X then + num = num + 1 + end + end + if num == 0 then + for i = 1, #self.card_list do + if self.card_list[i].index_X > card.index_X then + self.card_list[i].index_X = self.card_list[i].index_X - 1 + end + end + if MoveCardPos > card.index_X then + MoveCardPos = MoveCardPos - 1 + end + end + card.index_X = MoveCardPos + card.index_Y = MoveCardY + for i = #self.card_list, 1, -1 do + if MoveCardPos == self.card_list[i].index_X then + table.insert(self.card_list, (i + 1), card) + break + end + end + isChangeCard = true + elseif MoveCard == true and MoveCardindex ~= 0 then + for i = 1, #self.card_list do + if card.index_X == self.card_list[i].index_X then + --向下移动 + if MoveCardindex == -1 then + --向上移动 + if self.card_list[i].index_Y < card.index_Y and self.card_list[i].index_Y >= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y + 1 + end + else + if self.card_list[i].index_Y > card.index_Y and self.card_list[i].index_Y <= MoveCardY then + self.card_list[i].index_Y = self.card_list[i].index_Y - 1 + end + end + end + end + card.index_X = MoveCardPos + card.index_Y = MoveCardY + for i = #self.card_list, 1, -1 do + if MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY - 1) then + table.insert(self.card_list, (i + 1), card) + break + elseif MoveCardPos == self.card_list[i].index_X and self.card_list[i].index_Y == (MoveCardY + 1) then + table.insert(self.card_list, i, card) + break + end + end + isChangeCard = true + else + isChangeCard = false + self._area_handcard_list:AddChild(button) + end + end + self:UpdateHandCardsPos() + --每次改变手牌排列发给服务器 重连 回放需要用 --回放需要没次改变都要显示 + if isChangeCard == true then + self:SendChangeCard() + end + end +end + +--改变手牌排列发给服务器 +function M:SendChangeCard(...) + local list = {} + for i = 1, #self.card_list do + local data = {} + data.card = self.card_list[i].card_item + data.X = self.card_list[i].index_X + data.Y = self.card_list[i].index_Y + list[#list + 1] = data + end + self._mainView:ChangeCards(list) +end + +--计算手牌位置 +function M:GetHandCardPos(cards_view, cards) + local x, y = 0, 0 + local card_width = self.card_width -- 牌的宽度 + local middle_x = self._area_handcard_list.width / 2 + local start_x = middle_x - (cards / 2 * (card_width)) + x = start_x + (card_width) * (cards_view.index_X - 1) + + if self:getCardSize() == 1 then + y = 90 - (85 * cards_view.index_Y) + elseif self:getCardSize() == 1.2 then + y = 70 - (100 * cards_view.index_Y) + elseif self:getCardSize() == 0.8 then + y = 100 - (65 * cards_view.index_Y) + end + return Vector2.New(x, y) +end + +--更新 吃碰 +function M:UpdateFzList(fz_list) + printlog("UpdateFzList=======") + pt(fz_list) + self._area_fz_list:RemoveChildren(0, -1, true) + for i = 1, #fz_list do + local fzitem = nil + if fz_list[i].type ~= RB_FZType.Kan then + fzitem = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Component1') + fzitem:RemoveChildren(0, -1, true) + end + if fz_list[i].type == RB_FZType.Chi or fz_list[i].type == RB_FZType.Bi then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + fzcards:GetChild('card_' .. 1).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].active_card) + fzcards:GetController('c2').selectedIndex = 1 + fzcards:GetChild('card_' .. 2).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].opcard[1]) + fzcards:GetChild('card_' .. 3).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].opcard[2]) + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Peng then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + for j = 1, 3 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Wei then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + fzcards:GetController('c1').selectedIndex = 1 + for j = 1, 3 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.ChouWei then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_3') + fzcards:GetController('c1').selectedIndex = 1 + for j = 1, 3 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Pao then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_4') + for j = 1, 4 do + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + elseif fz_list[i].type == RB_FZType.Ti then + local fzcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Fz_0_4') + for j = 1, 4 do + if j == 4 then + fzcards:GetChild('card_' .. j).icon = self:getCardItem('ui://Main_RunBeard/202_', fz_list[i].card) + else + fzcards:GetChild('card_' .. j).icon = 'ui://Main_RunBeard/202_1_300' + end + end + fzcards.x, fzcards.y = 0, 0 + fzitem:AddChildAt(fzcards, 0) + self._area_fz_list:AddChild(fzitem) + end + end +end + +function M:ClearOutCard() + self._area_outcard_list:RemoveChildren(0, -1, true) +end +--出牌 +function M:UpdateOutCardList(outcard) + self._area_outcard_list:RemoveChildren(0, -1, true) + local outcards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Gcm_OutCard') + if outcard == 0 then + outcards:GetChild('icon').icon = 'ui://Main_RunBeard/202_1_300' + else + outcards:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/203_', outcard) + end + outcards.x, outcards.y = 0, 0 + self._area_outcard_list:AddChild(outcards) +end + +--弃牌 +function M:UpdateQiPai(qi_list) + self._area_qipai_list:RemoveChildren(0, -1, true) + for i = 1, #qi_list do + local qicards = UIPackage.CreateObjectFromURL('ui://Main_RunBeard/Qipai') + qicards:GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/202_', qi_list[i]) + self._area_qipai_list:AddChild(qicards) + end +end + +--摸牌动画 +function M:PlayingOutCardAnima(card) + if (self._area_outcard_list ~= nil and self._area_outcard_list.numChildren > 0) then + self._area_outcard_list:GetChildAt(0):GetChild('icon').icon = self:getCardItem('ui://Main_RunBeard/202_', card) + self._view:GetTransition('t0'):Play() + end + coroutine.start( + function() + coroutine.wait(0.1) + self:ClearOutCard() + end + ) +end + +--得到设置的牌字体 +function M:getCardItem(card_1, card_2) + if self._room.change_card_display ~= nil then + return card_1 .. self._room.change_card_display .. card_2 + else + return card_1 .. '2_' .. card_2 + end +end +--得到设置的牌大小 +function M:getCardSize() + if self._room.change_card_size ~= nil then + return self._room.change_card_size + else + return 1 + end +end + +return M diff --git a/lua_probject/main_project/main/zipai/ZPProtocol.lua b/lua_probject/main_project/main/zipai/ZPProtocol.lua new file mode 100644 index 00000000..7c0b7ff3 --- /dev/null +++ b/lua_probject/main_project/main/zipai/ZPProtocol.lua @@ -0,0 +1,36 @@ +local Protocol = { + -- 通知服务器出牌 + GAME_DIS_CARD = "611", + -- 通知服务器提示选择行为 + GAME_ACTION = "612", + -- 通知服务器手牌队形改变 + GAME_CHANGE_CARD = "613", + -- 通知服务器牌字体改变 + GAME_CHANGE_TYPEfACE = "615", + + -- 发牌协议 + GAME_EVT_PLAYER_DEAL = "811", + -- 出牌事件 + GAME_EVT_DISCARD = "812", + -- 出牌提示事件 + GAME_EVT_DISCARD_TIP = "813", + -- 放子提示事件 + GAME_EVT_FZTIPS = "814", + -- action 事件 + GAME_EVT_ACTION = "815", + -- 胡牌事件 + GAME_EVT_HU = "816", + -- 结算 + GAME_EVT_RESULT1 = "817", + -- 弃牌 + GAME_EVT_QIPAI = "818", + -- 抓牌 + GAME_EVT_DRAW = "819", + -- 转盘指向事件 + GAME_EVT_CHANGE_ACTIVE_PLAYER = "820", + --第二十一张牌 + GAME_EVT_ADD_CARD = "821", + +} + +return Protocol \ No newline at end of file diff --git a/lua_probject/main_project/main/zipai/ZPSettingView.lua b/lua_probject/main_project/main/zipai/ZPSettingView.lua new file mode 100644 index 00000000..bccc2cb2 --- /dev/null +++ b/lua_probject/main_project/main/zipai/ZPSettingView.lua @@ -0,0 +1,330 @@ +local SettingView = require('Game.View.SettingView') +local ZPTableBG = import('.ZPTableBG') + +local ZPSettingView = { + -- 修改牌字体 + onEXMainCallback = nil, + -- 修改手牌大小 + onUpdataCardSizeCallback = nil, + -- 语音 + onEXVoiceCallback = nil, + -- 快速出牌 + onEXChuPaiCallback = nil, + -- 方言 + onEXFangYanCallback = nil +} +local M = ZPSettingView + +function ZPSettingView.new(blur_view, index, open_social) + setmetatable(SettingView, {__index = BaseWindow}) + setmetatable(M, {__index = SettingView}) + local self = setmetatable({}, {__index = M}) + self.class = 'ZPSettingView' + self._currenIndex = 0 + self._blur_view = blur_view + self.onCallback = event('onCallback', true) + self.stateIndex = 0 + self.cd_time = 0 + self._btn_dismiss_room_enable = false + self._close_destroy = true + self.bigSize = 1.2 + self.mediumSize = 1 + self.smallSize = 0.8 + self._full = true + self._anim_pop = 2 + self._open_social = open_social + self:init('ui://Main_RunBeard/New_SettingWindow') + return self +end + +function M:init(url) + SettingView.init(self, url) + if DataManager.CurrenRoom == nil then + return + end + self._view = self._view:GetChild('showview') + + local view = self._view + local slider_sound = view:GetChild('slider_sound') + local slider_music = view:GetChild('slider_music') + -- local btn_music = view:GetChild('btn_music') + -- local btn_sound = view:GetChild('btn_sound') + + -- btn_music.selected = (GameApplication.Instance.MusicValue < 5 and false or true) + slider_sound.value = GameApplication.Instance.SoundValue + slider_music.value = GameApplication.Instance.MusicValue + -- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true + + slider_music.onChanged:Add( + function() + GameApplication.Instance.MusicValue = slider_music.value + -- btn_music.selected = GameApplication.Instance.MusicValue < 5 and false or true + end + ) + + slider_sound.onChanged:Add( + function() + GameApplication.Instance.SoundValue = slider_sound.value + -- btn_sound.selected = GameApplication.Instance.SoundValue < 5 and false or true + end + ) + + local room = DataManager.CurrenRoom + local c1 = self._view:GetController('cards') + local size = self._view:GetController('size') + if room.change_card_size ~= nil then + + if room.change_card_size == self.bigSize then + size.selectedIndex = 0 + elseif room.change_card_size == self.mediumSize then + size.selectedIndex = 1 + elseif room.change_card_size == self.smallSize then + size.selectedIndex = 2 + end + else + room.change_card_size = 0 + size.selectedIndex = 0 + end + if room.change_card_display ~= nil then + local _str = string.sub(room.change_card_display, 1, 1) + local n = tonumber(_str) + if n == 1 then + c1.selectedIndex = 1 + elseif n == 2 then + c1.selectedIndex = 0 + elseif n == 8 then + c1.selectedIndex = 3 + else + c1.selectedIndex = 2 + end + end + if self._open_social then + self._view:GetChild('n78').visible = true + self._view:GetChild('n88').visible = true + self._view:GetChild('n57').visible = true + + local yuyin = self._view:GetController('yuyin') + local chupai = self._view:GetController('chupai') + local fangyan = self._view:GetController('fangyan') + local user_id = DataManager.SelfUser.account_id + local json_data = Utils.LoadLocalFile(user_id .. room.game_id .. 'yuyin') + local json_data1 = Utils.LoadLocalFile(user_id .. room.game_id .. 'chupai') + local json_data2 = Utils.LoadLocalFile(user_id .. room.game_id .. 'fangyan') + yuyin.selectedIndex = 1 + chupai.selectedIndex = 1 + room.yuyin_typeface = 1 + room.chupai_typeface = 1 + fangyan.selectedIndex = 1 + room.fangyan_typeface = 1 + if json_data ~= nil then + local _data = json.decode(json_data) + local typeface = _data['game_typeface'] + room.yuyin_typeface = typeface + end + if json_data1 ~= nil then + local _data = json.decode(json_data1) + local typeface = _data['game_typeface'] + room.chupai_typeface = typeface + end + if json_data2 ~= nil then + local _data = json.decode(json_data2) + local typeface = _data['game_typeface'] + room.fangyan_typeface = typeface + end + if room.yuyin_typeface ~= nil then + yuyin.selectedIndex = room.yuyin_typeface + end + if room.chupai_typeface ~= nil then + chupai.selectedIndex = room.chupai_typeface + end + if room.fangyan_typeface ~= nil then + fangyan.selectedIndex = room.fangyan_typeface + end + else + self._view:GetChild('n78').visible = false + self._view:GetChild('n88').visible = false + self._view:GetChild('n57').visible = false + end + + c1.onChanged:Set( + function() + if self.onEXMainCallback then + self.onEXMainCallback(c1.selectedIndex + 1) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = c1.selectedIndex + 1 + local key = user_id .. room.game_id + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + + size.onChanged:Set( + function() + if self.onUpdataCardSizeCallback then + self.onUpdataCardSizeCallback(size.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_cardsize'] = size.selectedIndex + local key = user_id .. room.game_id .. 'cardsize_new' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + if self._open_social then + self._view:GetChild('n78').visible = false + local yuyin = self._view:GetController('yuyin') + local chupai = self._view:GetController('chupai') + local fangyan = self._view:GetController('fangyan') + yuyin.onChanged:Set( + function() + if self.onEXVoiceCallback then + room.yuyin_typeface = yuyin.selectedIndex + self.onEXVoiceCallback(yuyin.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = yuyin.selectedIndex + local key = user_id .. room.game_id .. 'yuyin' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + chupai.onChanged:Set( + function() + if self.onEXChuPaiCallback then + room.chupai_typeface = chupai.selectedIndex + self.onEXChuPaiCallback(chupai.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = chupai.selectedIndex + local key = user_id .. room.game_id .. 'chupai' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + fangyan.onChanged:Set( + function() + if self.onEXFangYanCallback then + room.fangyan_typeface = fangyan.selectedIndex + self.onEXFangYanCallback(fangyan.selectedIndex) + end + --点击换牌按钮后保存当前游戏的牌字体 + local user_id = DataManager.SelfUser.account_id + local _data = {} + _data['game_typeface'] = fangyan.selectedIndex + local key = user_id .. room.game_id .. 'fangyan' + Utils.SaveLocalFile(key, json.encode(_data)) + end + ) + else + self._view:GetChild('n78').visible = false + end +end + +function M:Show() + SettingView.Show(self) + self:UpdateIndex() + self:UpdateCardSizeIndex() +end +--根据存的数据改变设置里面的控制器 + +function M:UpdateIndex() + local room = DataManager.CurrenRoom + local c1 = self._view:GetController('cards') + if room.change_card_display ~= nil then + local _str = string.sub(room.change_card_display, 1, 1) + local n = tonumber(_str) + if n == 7 then + n = 2 + end + if n == 1 then + c1.selectedIndex = 1 + elseif n == 2 then + c1.selectedIndex = 0 + elseif n == 8 then + c1.selectedIndex = 3 + else + c1.selectedIndex = 2 + end + end +end +function M:UpdateCardSizeIndex() + local room = DataManager.CurrenRoom + local size = self._view:GetController('size') + if room.change_card_size ~= nil then + if room.change_card_size == self.bigSize then + size.selectedIndex = 0 + elseif room.change_card_size == self.mediumSize then + size.selectedIndex = 1 + elseif room.change_card_size == self.smallSize then + size.selectedIndex = 2 + end + else + size.selectedIndex = 0 + end +end + +function M:SetBtnUpdateCardEnable(enable) + self._view:GetChild('n37').enabled = enable + self._view:GetChild('n38').enabled = enable + self._view:GetChild('n49').enabled = enable +end + +function M:FillBgSection(cb, game_id, default_bg, room, qihu) + if (default_bg == nil) then + default_bg = 1 + end + local view = self._view + local lst_bg = view:GetChild('lst_bg') + local ctr_bg = view:GetController('bg') + for i = 1, #bg_config_zipai do + local config = bg_config_zipai[i] + local item = lst_bg:AddItemFromPool() + item.icon = config.thumb + if i > 3 then + ctr_bg:AddPage(i - 1) + end + item.onClick:Add( + function() + cb(config.url) + ctr_bg.selectedIndex = i - 1 + if qihu ~= nil then + -- self._blur_view:GetChild('di_text').text = room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起' + self._blur_view:GetController('bg_state').selectedIndex = i - 1 + end + end + ) + end + self._game_id = game_id + self._bg = ZPTableBG.GetTableBG(game_id) + local index = 0 + if self._bg > 0 then + lst_bg.selectedIndex = self._bg - 1 + index = lst_bg.selectedIndex + else + ctr_bg.selectedIndex = default_bg - 1 + index = ctr_bg.selectedIndex + end + if qihu ~= nil then + -- self._blur_view:GetChild('di_text').text = room.room_config:GetGameName() .. ' ' .. qihu .. '胡息起' + if index < 3 then + self._blur_view:GetController('bg_state').selectedIndex = index + else + self._blur_view:GetController('bg_state').selectedIndex = 0 + end + end +end +function M:Destroy() + local bg_id = self._view:GetController('bg').selectedIndex + 1 + if self._bg ~= bg_id then + self._bg = bg_id + ZPTableBG.SaveTableBG(self._game_id, self._bg) + end + SettingView.Destroy(self) +end + +return M diff --git a/lua_probject/main_project/main/zipai/ZPTableBG.lua b/lua_probject/main_project/main/zipai/ZPTableBG.lua new file mode 100644 index 00000000..e11083ee --- /dev/null +++ b/lua_probject/main_project/main/zipai/ZPTableBG.lua @@ -0,0 +1,84 @@ +-- 记录各游戏的桌面背景 +json = require 'cjson' + +local ZPTableBG = {} + +local M = ZPTableBG + bg_config_zipai = { + {id = 1, url = "base/main_zipai/bg/bg_1", thumb = "ui://Main_RunBeard/table_bg1"}, + {id = 2, url = "base/main_zipai/bg/bg_2", thumb = "ui://Main_RunBeard/table_bg2"}, + {id = 3, url = "base/main_zipai/bg/bg_3", thumb = "ui://Main_RunBeard/table_bg3"}, + -- {id = 4, url = "base/main_zipai/bg/bg_gold", thumb = "ui://Main_RunBeard/table_bg3"}, + -- {id = 5, url = "base/main_zipai/bg/bg8", thumb = "ui://Main_RunBeard/table_bg1"}, + -- {id = 6, url = "base/tablebg/bg/bg1", thumb = "ui://Common/b04"}, +} + +local function GetBG(data, game_id) + local bg_id = 0 + for i = 1, #data do + if data[i].game_id == game_id then + bg_id = data[i].bg_id + break + end + end + return bg_id +end +local function SetBG(data, game_id, bg_id) + local contain_key = false + for i = 1, #data do + if data[i].game_id == game_id then + contain_key = true + if data[i].bg_id ~= bg_id then + data[i].bg_id = bg_id + break + end + end + end + if not contain_key then + local _data = {} + _data.game_id = game_id + _data.bg_id = bg_id + table.insert(data, _data) + end +end + +function ZPTableBG.GetTableBG(game_id) + local id = -1 + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + local config_data = json.decode(json_data) + id = GetBG(config_data, game_id) + end + return id +end + +function ZPTableBG.LoadTableBG(id, game_id, main_view) + local bg_id = M.GetTableBG(game_id) + local index + if bg_id > 0 then + index = bg_id + else + index = id + end + + if index>3 then + -- body + index=1 + end + local url = bg_config_zipai[index].url + LoadGameBg(url, main_view) +end + +function ZPTableBG.SaveTableBG(game_id, bg_id) + local config_data + local json_data = Utils.LoadLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code) + if json_data ~= nil then + config_data = json.decode(json_data) + else + config_data = {} + end + SetBG(config_data, game_id, bg_id) + Utils.SaveLocalFile(DataManager.SelfUser.account_id .. DataManager.SelfUser.invite_code, json.encode(config_data)) +end + +return M \ No newline at end of file diff --git a/lua_probject/tolua_project/System/Reflection/BindingFlags.lua b/lua_probject/tolua_project/System/Reflection/BindingFlags.lua new file mode 100644 index 00000000..01cc2149 --- /dev/null +++ b/lua_probject/tolua_project/System/Reflection/BindingFlags.lua @@ -0,0 +1,43 @@ +if System.Reflection == nil then + System.Reflection = {} +end + +local function GetMask(...) + local arg = {...} + local value = 0 + + for i = 1, #arg do + value = value + arg[i] + end + + return value +end + +local BindingFlags = +{ + Default = 0, + IgnoreCase = 1, + DeclaredOnly = 2, + Instance = 4, + Static = 8, + Public = 16, + NonPublic = 32, + FlattenHierarchy = 64, + InvokeMethod = 256, + CreateInstance = 512, + GetField = 1024, + SetField = 2048, + GetProperty = 4096, + SetProperty = 8192, + PutDispProperty = 16384, + PutRefDispProperty = 32768, + ExactBinding = 65536, + SuppressChangeType = 131072, + OptionalParamBinding = 262144, + IgnoreReturn = 16777216, +} + +System.Reflection.BindingFlags = BindingFlags +System.Reflection.BindingFlags.GetMask = GetMask + +return BindingFlags \ No newline at end of file diff --git a/lua_probject/tolua_project/System/Timer.lua b/lua_probject/tolua_project/System/Timer.lua new file mode 100644 index 00000000..145efddb --- /dev/null +++ b/lua_probject/tolua_project/System/Timer.lua @@ -0,0 +1,184 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- +local setmetatable = setmetatable +local UpdateBeat = UpdateBeat +local CoUpdateBeat = CoUpdateBeat +local Time = Time + +Timer = {} + +local Timer = Timer +local mt = {__index = Timer} + +--unscaled false 采用deltaTime计时,true 采用 unscaledDeltaTime计时 +function Timer.New(func, duration, loop, unscaled) + unscaled = unscaled or false and true + loop = loop or 1 + return setmetatable({func = func, duration = duration, time = duration, loop = loop, unscaled = unscaled, running = false}, mt) +end + +function Timer:Start() + self.running = true + + if not self.handle then + self.handle = UpdateBeat:CreateListener(self.Update, self) + end + + UpdateBeat:AddListener(self.handle) +end + +function Timer:Reset(func, duration, loop, unscaled) + self.duration = duration + self.loop = loop or 1 + self.unscaled = unscaled + self.func = func + self.time = duration +end + +function Timer:Stop() + self.running = false + + if self.handle then + UpdateBeat:RemoveListener(self.handle) + end +end + +function Timer:Update() + if not self.running then + return + end + + local delta = self.unscaled and Time.unscaledDeltaTime or Time.deltaTime + self.time = self.time - delta + + if self.time <= 0 then + self.func() + + if self.loop > 0 then + self.loop = self.loop - 1 + self.time = self.time + self.duration + end + + if self.loop == 0 then + self:Stop() + elseif self.loop < 0 then + self.time = self.time + self.duration + end + end +end + +--给协同使用的帧计数timer +FrameTimer = {} + +local FrameTimer = FrameTimer +local mt2 = {__index = FrameTimer} + +function FrameTimer.New(func, count, loop) + local c = Time.frameCount + count + loop = loop or 1 + return setmetatable({func = func, loop = loop, duration = count, count = c, running = false}, mt2) +end + +function FrameTimer:Reset(func, count, loop) + self.func = func + self.duration = count + self.loop = loop + self.count = Time.frameCount + count +end + +function FrameTimer:Start() + if not self.handle then + self.handle = CoUpdateBeat:CreateListener(self.Update, self) + end + + CoUpdateBeat:AddListener(self.handle) + self.running = true +end + +function FrameTimer:Stop() + self.running = false + + if self.handle then + CoUpdateBeat:RemoveListener(self.handle) + end +end + +function FrameTimer:Update() + if not self.running then + return + end + + if Time.frameCount >= self.count then + self.func() + + if self.loop > 0 then + self.loop = self.loop - 1 + end + + if self.loop == 0 then + self:Stop() + else + self.count = Time.frameCount + self.duration + end + end +end + +CoTimer = {} + +local CoTimer = CoTimer +local mt3 = {__index = CoTimer} + +function CoTimer.New(func, duration, loop) + loop = loop or 1 + return setmetatable({duration = duration, loop = loop, func = func, time = duration, running = false}, mt3) +end + +function CoTimer:Start() + if not self.handle then + self.handle = CoUpdateBeat:CreateListener(self.Update, self) + end + + self.running = true + CoUpdateBeat:AddListener(self.handle) +end + +function CoTimer:Reset(func, duration, loop) + self.duration = duration + self.loop = loop or 1 + self.func = func + self.time = duration +end + +function CoTimer:Stop() + self.running = false + + if self.handle then + CoUpdateBeat:RemoveListener(self.handle) + end +end + +function CoTimer:Update() + if not self.running then + return + end + + if self.time <= 0 then + self.func() + + if self.loop > 0 then + self.loop = self.loop - 1 + self.time = self.time + self.duration + end + + if self.loop == 0 then + self:Stop() + elseif self.loop < 0 then + self.time = self.time + self.duration + end + end + + self.time = self.time - Time.deltaTime +end \ No newline at end of file diff --git a/lua_probject/tolua_project/System/ValueType.lua b/lua_probject/tolua_project/System/ValueType.lua new file mode 100644 index 00000000..a3eb221e --- /dev/null +++ b/lua_probject/tolua_project/System/ValueType.lua @@ -0,0 +1,40 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- +local ValueType = {} + +ValueType[Vector3] = 1 +ValueType[Quaternion] = 2 +ValueType[Vector2] = 3 +ValueType[Color] = 4 +ValueType[Vector4] = 5 +ValueType[Ray] = 6 +ValueType[Bounds] = 7 +ValueType[Touch] = 8 +ValueType[LayerMask] = 9 +ValueType[RaycastHit] = 10 +ValueType[int64] = 11 +ValueType[uint64] = 12 + +local function GetValueType() + local getmetatable = getmetatable + local ValueType = ValueType + + return function(udata) + local meta = getmetatable(udata) + + if meta == nil then + return 0 + end + + return ValueType[meta] or 0 + end +end + +function AddValueType(table, type) + ValueType[table] = type +end + +GetLuaValueType = GetValueType() \ No newline at end of file diff --git a/lua_probject/tolua_project/System/coroutine.lua b/lua_probject/tolua_project/System/coroutine.lua new file mode 100644 index 00000000..ca6b8b48 --- /dev/null +++ b/lua_probject/tolua_project/System/coroutine.lua @@ -0,0 +1,128 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- +local create = coroutine.create +local running = coroutine.running +local resume = coroutine.resume +local yield = coroutine.yield +local error = error +local unpack = unpack +local debug = debug +local FrameTimer = FrameTimer +local CoTimer = CoTimer + +local comap = {} +setmetatable(comap, {__mode = "kv"}) + +function coroutine.start(f, ...) + local co = create(f) + + if running() == nil then + local flag, msg = resume(co, ...) + + if not flag then + error(debug.traceback(co, msg)) + end + else + local args = {...} + local timer = nil + + local action = function() + local flag, msg = resume(co, unpack(args)) + + if not flag then + timer:Stop() + error(debug.traceback(co, msg)) + end + end + + timer = FrameTimer.New(action, 0, 1) + comap[co] = timer + timer:Start() + end + + return co +end + +function coroutine.wait(t, co, ...) + local args = {...} + co = co or running() + local timer = nil + + local action = function() + local flag, msg = resume(co, unpack(args)) + + if not flag then + timer:Stop() + error(debug.traceback(co, msg)) + return + end + end + + timer = CoTimer.New(action, t, 1) + comap[co] = timer + timer:Start() + return yield() +end + +function coroutine.step(t, co, ...) + local args = {...} + co = co or running() + local timer = nil + + local action = function() + local flag, msg = resume(co, unpack(args)) + + if not flag then + timer:Stop() + error(debug.traceback(co, msg)) + return + end + end + + timer = FrameTimer.New(action, t or 1, 1) + comap[co] = timer + timer:Start() + return yield() +end + +function coroutine.www(www, co) + co = co or running() + local timer = nil + + local action = function() + if not www.isDone then + return + end + + timer:Stop() + local flag, msg = resume(co) + + if not flag then + error(debug.traceback(co, msg)) + return + end + end + + timer = FrameTimer.New(action, 1, -1) + comap[co] = timer + timer:Start() + return yield() +end + +function coroutine.stop(co) + local timer = comap[co] + + if timer ~= nil then + comap[co] = nil + timer:Stop() + end +end + +function coroutine.stopAll() + for k,v in pairs(comap) do + coroutine.stop(k) + end +end diff --git a/lua_probject/tolua_project/UnityEngine/Bounds.lua b/lua_probject/tolua_project/UnityEngine/Bounds.lua new file mode 100644 index 00000000..9d3bb07f --- /dev/null +++ b/lua_probject/tolua_project/UnityEngine/Bounds.lua @@ -0,0 +1,190 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- +local rawget = rawget +local setmetatable = setmetatable +local type = type +local Vector3 = Vector3 +local zero = Vector3.zero + +local Bounds = +{ + center = Vector3.zero, + extents = Vector3.zero, +} + +local get = tolua.initget(Bounds) + +Bounds.__index = function(t,k) + local var = rawget(Bounds, k) + + if var == nil then + var = rawget(get, k) + + if var ~= nil then + return var(t) + end + end + + return var +end + +Bounds.__call = function(t, center, size) + return setmetatable({center = center, extents = size * 0.5}, Bounds) +end + +function Bounds.New(center, size) + return setmetatable({center = center, extents = size * 0.5}, Bounds) +end + +function Bounds:Get() + local size = self:GetSize() + return self.center, size +end + +function Bounds:GetSize() + return self.extents * 2 +end + +function Bounds:SetSize(value) + self.extents = value * 0.5 +end + +function Bounds:GetMin() + return self.center - self.extents +end + +function Bounds:SetMin(value) + self:SetMinMax(value, self:GetMax()) +end + +function Bounds:GetMax() + return self.center + self.extents +end + +function Bounds:SetMax(value) + self:SetMinMax(self:GetMin(), value) +end + +function Bounds:SetMinMax(min, max) + self.extents = (max - min) * 0.5 + self.center = min + self.extents +end + +function Bounds:Encapsulate(point) + self:SetMinMax(Vector3.Min(self:GetMin(), point), Vector3.Max(self:GetMax(), point)) +end + +function Bounds:Expand(amount) + if type(amount) == "number" then + amount = amount * 0.5 + self.extents:Add(Vector3.New(amount, amount, amount)) + else + self.extents:Add(amount * 0.5) + end +end + +function Bounds:Intersects(bounds) + local min = self:GetMin() + local max = self:GetMax() + + local min2 = bounds:GetMin() + local max2 = bounds:GetMax() + + return min.x <= max2.x and max.x >= min2.x and min.y <= max2.y and max.y >= min2.y and min.z <= max2.z and max.z >= min2.z +end + +function Bounds:Contains(p) + local min = self:GetMin() + local max = self:GetMax() + + if p.x < min.x or p.y < min.y or p.z < min.z or p.x > max.x or p.y > max.y or p.z > max.z then + return false + end + + return true +end + +function Bounds:IntersectRay(ray) + local tmin = -Mathf.Infinity + local tmax = Mathf.Infinity + + local t0, t1, f + local t = self:GetCenter () - ray:GetOrigin() + local p = {t.x, t.y, t.z} + t = self.extents + local extent = {t.x, t.y, t.z} + t = ray:GetDirection() + local dir = {t.x, t.y, t.z} + + for i = 1, 3 do + f = 1 / dir[i] + t0 = (p[i] + extent[i]) * f + t1 = (p[i] - extent[i]) * f + + if t0 < t1 then + if t0 > tmin then tmin = t0 end + if t1 < tmax then tmax = t1 end + if tmin > tmax then return false end + if tmax < 0 then return false end + else + if t1 > tmin then tmin = t1 end + if t0 < tmax then tmax = t0 end + if tmin > tmax then return false end + if tmax < 0 then return false end + end + end + + return true, tmin +end + +function Bounds:ClosestPoint(point) + local t = point - self:GetCenter() + local closest = {t.x, t.y, t.z} + local et = self.extents + local extent = {et.x, et.y, et.z} + local distance = 0 + local delta + + for i = 1, 3 do + if closest[i] < - extent[i] then + delta = closest[i] + extent[i] + distance = distance + delta * delta + closest[i] = -extent[i] + elseif closest[i] > extent[i] then + delta = closest[i] - extent[i] + distance = distance + delta * delta + closest[i] = extent[i] + end + end + + if distance == 0 then + return point, 0 + else + outPoint = closest + self:GetCenter() + return outPoint, distance + end +end + +function Bounds:Destroy() + self.center = nil + self.size = nil +end + +Bounds.__tostring = function(self) + return string.format("Center: %s, Extents %s", tostring(self.center), tostring(self.extents)) +end + +Bounds.__eq = function(a, b) + return a.center == b.center and a.extents == b.extents +end + +get.size = Bounds.GetSize +get.min = Bounds.GetMin +get.max = Bounds.GetMax + +UnityEngine.Bounds = Bounds +setmetatable(Bounds, Bounds) +return Bounds diff --git a/lua_probject/tolua_project/UnityEngine/Color.lua b/lua_probject/tolua_project/UnityEngine/Color.lua new file mode 100644 index 00000000..23682429 --- /dev/null +++ b/lua_probject/tolua_project/UnityEngine/Color.lua @@ -0,0 +1,241 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- + +local rawget = rawget +local setmetatable = setmetatable +local type = type +local Mathf = Mathf + +local Color = {} +local get = tolua.initget(Color) + +Color.__index = function(t,k) + local var = rawget(Color, k) + + if var == nil then + var = rawget(get, k) + + if var ~= nil then + return var(t) + end + end + + return var +end + +Color.__call = function(t, r, g, b, a) + return setmetatable({r = r or 0, g = g or 0, b = b or 0, a = a or 1}, Color) +end + +function Color.New(r, g, b, a) + return setmetatable({r = r or 0, g = g or 0, b = b or 0, a = a or 1}, Color) +end + +function Color:Set(r, g, b, a) + self.r = r + self.g = g + self.b = b + self.a = a or 1 +end + +function Color:Get() + return self.r, self.g, self.b, self.a +end + +function Color:Equals(other) + return self.r == other.r and self.g == other.g and self.b == other.b and self.a == other.a +end + +function Color.Lerp(a, b, t) + t = Mathf.Clamp01(t) + return Color.New(a.r + t * (b.r - a.r), a.g + t * (b.g - a.g), a.b + t * (b.b - a.b), a.a + t * (b.a - a.a)) +end + +function Color.LerpUnclamped(a, b, t) + return Color.New(a.r + t * (b.r - a.r), a.g + t * (b.g - a.g), a.b + t * (b.b - a.b), a.a + t * (b.a - a.a)) +end + +function Color.HSVToRGB(H, S, V, hdr) + hdr = hdr and false or true + local white = Color.New(1,1,1,1) + + if S == 0 then + white.r = V + white.g = V + white.b = V + return white + end + + if V == 0 then + white.r = 0 + white.g = 0 + white.b = 0 + return white + end + + white.r = 0 + white.g = 0 + white.b = 0; + local num = S + local num2 = V + local f = H * 6; + local num4 = Mathf.Floor(f) + local num5 = f - num4 + local num6 = num2 * (1 - num) + local num7 = num2 * (1 - (num * num5)) + local num8 = num2 * (1 - (num * (1 - num5))) + local num9 = num4 + + local flag = num9 + 1 + + if flag == 0 then + white.r = num2 + white.g = num6 + white.b = num7 + elseif flag == 1 then + white.r = num2 + white.g = num8 + white.b = num6 + elseif flag == 2 then + white.r = num7 + white.g = num2 + white.b = num6 + elseif flag == 3 then + white.r = num6 + white.g = num2 + white.b = num8 + elseif flag == 4 then + white.r = num6 + white.g = num7 + white.b = num2 + elseif flag == 5 then + white.r = num8 + white.g = num6 + white.b = num2 + elseif flag == 6 then + white.r = num2 + white.g = num6 + white.b = num7 + elseif flag == 7 then + white.r = num2 + white.g = num8 + white.b = num6 + end + + if not hdr then + white.r = Mathf.Clamp(white.r, 0, 1) + white.g = Mathf.Clamp(white.g, 0, 1) + white.b = Mathf.Clamp(white.b, 0, 1) + end + + return white +end + +local function RGBToHSVHelper(offset, dominantcolor, colorone, colortwo) + local V = dominantcolor + + if V ~= 0 then + local num = 0 + + if colorone > colortwo then + num = colortwo + else + num = colorone + end + + local num2 = V - num + local H = 0 + local S = 0 + + if num2 ~= 0 then + S = num2 / V + H = offset + (colorone - colortwo) / num2 + else + S = 0 + H = offset + (colorone - colortwo) + end + + H = H / 6 + if H < 0 then H = H + 1 end + return H, S, V + end + + return 0, 0, V +end + +function Color.RGBToHSV(rgbColor) + if rgbColor.b > rgbColor.g and rgbColor.b > rgbColor.r then + return RGBToHSVHelper(4, rgbColor.b, rgbColor.r, rgbColor.g) + elseif rgbColor.g > rgbColor.r then + return RGBToHSVHelper(2, rgbColor.g, rgbColor.b, rgbColor.r) + else + return RGBToHSVHelper(0, rgbColor.r, rgbColor.g, rgbColor.b) + end +end + +function Color.GrayScale(a) + return 0.299 * a.r + 0.587 * a.g + 0.114 * a.b +end + +Color.__tostring = function(self) + return string.format("RGBA(%f,%f,%f,%f)", self.r, self.g, self.b, self.a) +end + +Color.__add = function(a, b) + return Color.New(a.r + b.r, a.g + b.g, a.b + b.b, a.a + b.a) +end + +Color.__sub = function(a, b) + return Color.New(a.r - b.r, a.g - b.g, a.b - b.b, a.a - b.a) +end + +Color.__mul = function(a, b) + if type(b) == "number" then + return Color.New(a.r * b, a.g * b, a.b * b, a.a * b) + elseif getmetatable(b) == Color then + return Color.New(a.r * b.r, a.g * b.g, a.b * b.b, a.a * b.a) + end +end + +Color.__div = function(a, d) + return Color.New(a.r / d, a.g / d, a.b / d, a.a / d) +end + +Color.__eq = function(a,b) + return a.r == b.r and a.g == b.g and a.b == b.b and a.a == b.a +end + +get.red = function() return Color.New(1,0,0,1) end +get.green = function() return Color.New(0,1,0,1) end +get.blue = function() return Color.New(0,0,1,1) end +get.white = function() return Color.New(1,1,1,1) end +get.black = function() return Color.New(0,0,0,1) end +get.yellow = function() return Color.New(1, 0.9215686, 0.01568628, 1) end +get.cyan = function() return Color.New(0,1,1,1) end +get.magenta = function() return Color.New(1,0,1,1) end +get.gray = function() return Color.New(0.5,0.5,0.5,1) end +get.clear = function() return Color.New(0,0,0,0) end + +get.gamma = function(c) + return Color.New(Mathf.LinearToGammaSpace(c.r), Mathf.LinearToGammaSpace(c.g), Mathf.LinearToGammaSpace(c.b), c.a) +end + +get.linear = function(c) + return Color.New(Mathf.GammaToLinearSpace(c.r), Mathf.GammaToLinearSpace(c.g), Mathf.GammaToLinearSpace(c.b), c.a) +end + +get.maxColorComponent = function(c) + return Mathf.Max(Mathf.Max(c.r, c.g), c.b) +end + +get.grayscale = Color.GrayScale + +UnityEngine.Color = Color +setmetatable(Color, Color) +return Color + + + diff --git a/lua_probject/tolua_project/UnityEngine/LayerMask.lua b/lua_probject/tolua_project/UnityEngine/LayerMask.lua new file mode 100644 index 00000000..42f99a49 --- /dev/null +++ b/lua_probject/tolua_project/UnityEngine/LayerMask.lua @@ -0,0 +1,52 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- +local Layer = Layer +local rawget = rawget +local setmetatable = setmetatable + +local LayerMask = {} + +LayerMask.__index = function(t,k) + return rawget(LayerMask, k) +end + +LayerMask.__call = function(t,v) + return setmetatable({value = value or 0}, LayerMask) +end + +function LayerMask.New(value) + return setmetatable({value = value or 0}, LayerMask) +end + +function LayerMask:Get() + return self.value +end + +function LayerMask.NameToLayer(name) + return Layer[name] +end + +function LayerMask.GetMask(...) + local arg = {...} + local value = 0 + + for i = 1, #arg do + local n = LayerMask.NameToLayer(arg[i]) + + if n ~= nil then + value = value + 2 ^ n + end + end + + return value +end + +UnityEngine.LayerMask = LayerMask +setmetatable(LayerMask, LayerMask) +return LayerMask + + + diff --git a/lua_probject/tolua_project/UnityEngine/Mathf.lua b/lua_probject/tolua_project/UnityEngine/Mathf.lua new file mode 100644 index 00000000..5347fc0d --- /dev/null +++ b/lua_probject/tolua_project/UnityEngine/Mathf.lua @@ -0,0 +1,223 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- +local math = math +local floor = math.floor +local abs = math.abs +local Mathf = Mathf + +Mathf.Deg2Rad = math.rad(1) +Mathf.Epsilon = 1.4013e-45 +Mathf.Infinity = math.huge +Mathf.NegativeInfinity = -math.huge +Mathf.PI = math.pi +Mathf.Rad2Deg = math.deg(1) + +Mathf.Abs = math.abs +Mathf.Acos = math.acos +Mathf.Asin = math.asin +Mathf.Atan = math.atan +Mathf.Atan2 = math.atan2 +Mathf.Ceil = math.ceil +Mathf.Cos = math.cos +Mathf.Exp = math.exp +Mathf.Floor = math.floor +Mathf.Log = math.log +Mathf.Log10 = math.log10 +Mathf.Max = math.max +Mathf.Min = math.min +Mathf.Pow = math.pow +Mathf.Sin = math.sin +Mathf.Sqrt = math.sqrt +Mathf.Tan = math.tan +Mathf.Deg = math.deg +Mathf.Rad = math.rad +Mathf.Random = math.random + +function Mathf.Approximately(a, b) + return abs(b - a) < math.max(1e-6 * math.max(abs(a), abs(b)), 1.121039e-44) +end + +function Mathf.Clamp(value, min, max) + if value < min then + value = min + elseif value > max then + value = max + end + + return value +end + +function Mathf.Clamp01(value) + if value < 0 then + return 0 + elseif value > 1 then + return 1 + end + + return value +end + +function Mathf.DeltaAngle(current, target) + local num = Mathf.Repeat(target - current, 360) + + if num > 180 then + num = num - 360 + end + + return num +end + +function Mathf.Gamma(value, absmax, gamma) + local flag = false + + if value < 0 then + flag = true + end + + local num = abs(value) + + if num > absmax then + return (not flag) and num or -num + end + + local num2 = math.pow(num / absmax, gamma) * absmax + return (not flag) and num2 or -num2 +end + +function Mathf.InverseLerp(from, to, value) + if from < to then + if value < from then + return 0 + end + + if value > to then + return 1 + end + + value = value - from + value = value/(to - from) + return value + end + + if from <= to then + return 0 + end + + if value < to then + return 1 + end + + if value > from then + return 0 + end + + return 1 - ((value - to) / (from - to)) +end + +function Mathf.Lerp(from, to, t) + return from + (to - from) * Mathf.Clamp01(t) +end + +function Mathf.LerpAngle(a, b, t) + local num = Mathf.Repeat(b - a, 360) + + if num > 180 then + num = num - 360 + end + + return a + num * Mathf.Clamp01(t) +end + +function Mathf.LerpUnclamped(a, b, t) + return a + (b - a) * t; +end + +function Mathf.MoveTowards(current, target, maxDelta) + if abs(target - current) <= maxDelta then + return target + end + + return current + Mathf.Sign(target - current) * maxDelta +end + +function Mathf.MoveTowardsAngle(current, target, maxDelta) + target = current + Mathf.DeltaAngle(current, target) + return Mathf.MoveTowards(current, target, maxDelta) +end + +function Mathf.PingPong(t, length) + t = Mathf.Repeat(t, length * 2) + return length - abs(t - length) +end + +function Mathf.Repeat(t, length) + return t - (floor(t / length) * length) +end + +function Mathf.Round(num) + return floor(num + 0.5) +end + +function Mathf.Sign(num) + if num > 0 then + num = 1 + elseif num < 0 then + num = -1 + else + num = 0 + end + + return num +end + +function Mathf.SmoothDamp(current, target, currentVelocity, smoothTime, maxSpeed, deltaTime) + maxSpeed = maxSpeed or Mathf.Infinity + deltaTime = deltaTime or Time.deltaTime + smoothTime = Mathf.Max(0.0001, smoothTime) + local num = 2 / smoothTime + local num2 = num * deltaTime + local num3 = 1 / (1 + num2 + 0.48 * num2 * num2 + 0.235 * num2 * num2 * num2) + local num4 = current - target + local num5 = target + local max = maxSpeed * smoothTime + num4 = Mathf.Clamp(num4, -max, max) + target = current - num4 + local num7 = (currentVelocity + (num * num4)) * deltaTime + currentVelocity = (currentVelocity - num * num7) * num3 + local num8 = target + (num4 + num7) * num3 + + if (num5 > current) == (num8 > num5) then + num8 = num5 + currentVelocity = (num8 - num5) / deltaTime + end + + return num8,currentVelocity +end + +function Mathf.SmoothDampAngle(current, target, currentVelocity, smoothTime, maxSpeed, deltaTime) + deltaTime = deltaTime or Time.deltaTime + maxSpeed = maxSpeed or Mathf.Infinity + target = current + Mathf.DeltaAngle(current, target) + return Mathf.SmoothDamp(current, target, currentVelocity, smoothTime, maxSpeed, deltaTime) +end + + +function Mathf.SmoothStep(from, to, t) + t = Mathf.Clamp01(t) + t = -2 * t * t * t + 3 * t * t + return to * t + from * (1 - t) +end + +function Mathf.HorizontalAngle(dir) + return math.deg(math.atan2(dir.x, dir.z)) +end + +function Mathf.IsNan(number) + return not (number == number) +end + +UnityEngine.Mathf = Mathf +return Mathf \ No newline at end of file diff --git a/lua_probject/tolua_project/UnityEngine/Plane.lua b/lua_probject/tolua_project/UnityEngine/Plane.lua new file mode 100644 index 00000000..58ec16ee --- /dev/null +++ b/lua_probject/tolua_project/UnityEngine/Plane.lua @@ -0,0 +1,66 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- +local setmetatable = setmetatable +local Mathf = Mathf +local Vector3 = Vector3 + +local Plane = {} + +Plane.__index = function(t,k) + return rawget(Plane, k) +end + +Plane.__call = function(t,v) + return Plane.New(v) +end + +function Plane.New(normal, d) + return setmetatable({normal = normal:Normalize(), distance = d}, Plane) +end + +function Plane:Get() + return self.normal, self.distance +end + +function Plane:Raycast(ray) + local a = Vector3.Dot(ray.direction, self.normal) + local num2 = -Vector3.Dot(ray.origin, self.normal) - self.distance + + if Mathf.Approximately(a, 0) then + return false, 0 + end + + local enter = num2 / a + return enter > 0, enter +end + +function Plane:SetNormalAndPosition(inNormal, inPoint) + self.normal = inNormal:Normalize() + self.distance = -Vector3.Dot(inNormal, inPoint) +end + +function Plane:Set3Points(a, b, c) + self.normal = Vector3.Normalize(Vector3.Cross(b - a, c - a)) + self.distance = -Vector3.Dot(self.normal, a) +end + +function Plane:GetDistanceToPoint(inPt) + return Vector3.Dot(self.normal, inPt) + self.distance +end + +function Plane:GetSide(inPt) + return (Vector3.Dot(self.normal, inPt) + self.distance) > 0 +end + +function Plane:SameSide(inPt0, inPt1) + local distanceToPoint = self:GetDistanceToPoint(inPt0) + local num2 = self:GetDistanceToPoint(inPt1) + return (distanceToPoint > 0 and num2 > 0) or (distanceToPoint <= 0 and num2 <= 0) +end + +UnityEngine.Plane = Plane +setmetatable(Plane, Plane) +return Plane \ No newline at end of file diff --git a/lua_probject/tolua_project/UnityEngine/Quaternion.lua b/lua_probject/tolua_project/UnityEngine/Quaternion.lua new file mode 100644 index 00000000..9fe8288c --- /dev/null +++ b/lua_probject/tolua_project/UnityEngine/Quaternion.lua @@ -0,0 +1,616 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- +local math = math +local sin = math.sin +local cos = math.cos +local acos = math.acos +local asin = math.asin +local sqrt = math.sqrt +local min = math.min +local max = math.max +local sign = math.sign +local atan2 = math.atan2 +local clamp = Mathf.Clamp +local abs = math.abs +local setmetatable = setmetatable +local getmetatable = getmetatable +local rawget = rawget +local rawset = rawset +local Vector3 = Vector3 + +local rad2Deg = Mathf.Rad2Deg +local halfDegToRad = 0.5 * Mathf.Deg2Rad +local _forward = Vector3.forward +local _up = Vector3.up +local _next = { 2, 3, 1 } + +local Quaternion = {} +local get = tolua.initget(Quaternion) + +Quaternion.__index = function(t, k) + local var = rawget(Quaternion, k) + + if var == nil then + var = rawget(get, k) + + if var ~= nil then + return var(t) + end + end + + return var +end + +Quaternion.__newindex = function(t, name, k) + if name == "eulerAngles" then + t:SetEuler(k) + else + rawset(t, name, k) + end +end + +function Quaternion.New(x, y, z, w) + local t = {x = x or 0, y = y or 0, z = z or 0, w = w or 0} + setmetatable(t, Quaternion) + return t +end + +local _new = Quaternion.New + +Quaternion.__call = function(t, x, y, z, w) + local t = {x = x or 0, y = y or 0, z = z or 0, w = w or 0} + setmetatable(t, Quaternion) + return t +end + +function Quaternion:Set(x,y,z,w) + self.x = x or 0 + self.y = y or 0 + self.z = z or 0 + self.w = w or 0 +end + +function Quaternion:Clone() + return _new(self.x, self.y, self.z, self.w) +end + +function Quaternion:Get() + return self.x, self.y, self.z, self.w +end + +function Quaternion.Dot(a, b) + return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w +end + +function Quaternion.Angle(a, b) + local dot = Quaternion.Dot(a, b) + if dot < 0 then dot = -dot end + return acos(min(dot, 1)) * 2 * 57.29578 +end + +function Quaternion.AngleAxis(angle, axis) + local normAxis = axis:Normalize() + angle = angle * halfDegToRad + local s = sin(angle) + + local w = cos(angle) + local x = normAxis.x * s + local y = normAxis.y * s + local z = normAxis.z * s + + return _new(x,y,z,w) +end + +function Quaternion.Equals(a, b) + return a.x == b.x and a.y == b.y and a.z == b.z and a.w == b.w +end + +function Quaternion.Euler(x, y, z) + if y == nil and z == nil then + y = x.y + z = x.z + x = x.x + end + + x = x * 0.0087266462599716 + y = y * 0.0087266462599716 + z = z * 0.0087266462599716 + + local sinX = sin(x) + x = cos(x) + local sinY = sin(y) + y = cos(y) + local sinZ = sin(z) + z = cos(z) + + local q = {x = y * sinX * z + sinY * x * sinZ, y = sinY * x * z - y * sinX * sinZ, z = y * x * sinZ - sinY * sinX * z, w = y * x * z + sinY * sinX * sinZ} + setmetatable(q, Quaternion) + return q +end + +function Quaternion:SetEuler(x, y, z) + if y == nil and z == nil then + y = x.y + z = x.z + x = x.x + end + + x = x * 0.0087266462599716 + y = y * 0.0087266462599716 + z = z * 0.0087266462599716 + + local sinX = sin(x) + local cosX = cos(x) + local sinY = sin(y) + local cosY = cos(y) + local sinZ = sin(z) + local cosZ = cos(z) + + self.w = cosY * cosX * cosZ + sinY * sinX * sinZ + self.x = cosY * sinX * cosZ + sinY * cosX * sinZ + self.y = sinY * cosX * cosZ - cosY * sinX * sinZ + self.z = cosY * cosX * sinZ - sinY * sinX * cosZ + + return self +end + +function Quaternion:Normalize() + local quat = self:Clone() + quat:SetNormalize() + return quat +end + +function Quaternion:SetNormalize() + local n = self.x * self.x + self.y * self.y + self.z * self.z + self.w * self.w + + if n ~= 1 and n > 0 then + n = 1 / sqrt(n) + self.x = self.x * n + self.y = self.y * n + self.z = self.z * n + self.w = self.w * n + end +end + +--产生一个新的从from到to的四元数 +function Quaternion.FromToRotation(from, to) + local quat = Quaternion.New() + quat:SetFromToRotation(from, to) + return quat +end + +--设置当前四元数为 from 到 to的旋转, 注意from和to同 forward平行会同unity不一致 +function Quaternion:SetFromToRotation1(from, to) + local v0 = from:Normalize() + local v1 = to:Normalize() + local d = Vector3.Dot(v0, v1) + + if d > -1 + 1e-6 then + local s = sqrt((1+d) * 2) + local invs = 1 / s + local c = Vector3.Cross(v0, v1) * invs + self:Set(c.x, c.y, c.z, s * 0.5) + elseif d > 1 - 1e-6 then + return _new(0, 0, 0, 1) + else + local axis = Vector3.Cross(Vector3.right, v0) + + if axis:SqrMagnitude() < 1e-6 then + axis = Vector3.Cross(Vector3.forward, v0) + end + + self:Set(axis.x, axis.y, axis.z, 0) + return self + end + + return self +end + +local function MatrixToQuaternion(rot, quat) + local trace = rot[1][1] + rot[2][2] + rot[3][3] + + if trace > 0 then + local s = sqrt(trace + 1) + quat.w = 0.5 * s + s = 0.5 / s + quat.x = (rot[3][2] - rot[2][3]) * s + quat.y = (rot[1][3] - rot[3][1]) * s + quat.z = (rot[2][1] - rot[1][2]) * s + quat:SetNormalize() + else + local i = 1 + local q = {0, 0, 0} + + if rot[2][2] > rot[1][1] then + i = 2 + end + + if rot[3][3] > rot[i][i] then + i = 3 + end + + local j = _next[i] + local k = _next[j] + + local t = rot[i][i] - rot[j][j] - rot[k][k] + 1 + local s = 0.5 / sqrt(t) + q[i] = s * t + local w = (rot[k][j] - rot[j][k]) * s + q[j] = (rot[j][i] + rot[i][j]) * s + q[k] = (rot[k][i] + rot[i][k]) * s + + quat:Set(q[1], q[2], q[3], w) + quat:SetNormalize() + end +end + +function Quaternion:SetFromToRotation(from, to) + from = from:Normalize() + to = to:Normalize() + + local e = Vector3.Dot(from, to) + + if e > 1 - 1e-6 then + self:Set(0, 0, 0, 1) + elseif e < -1 + 1e-6 then + local left = {0, from.z, from.y} + local mag = left[2] * left[2] + left[3] * left[3] --+ left[1] * left[1] = 0 + + if mag < 1e-6 then + left[1] = -from.z + left[2] = 0 + left[3] = from.x + mag = left[1] * left[1] + left[3] * left[3] + end + + local invlen = 1/sqrt(mag) + left[1] = left[1] * invlen + left[2] = left[2] * invlen + left[3] = left[3] * invlen + + local up = {0, 0, 0} + up[1] = left[2] * from.z - left[3] * from.y + up[2] = left[3] * from.x - left[1] * from.z + up[3] = left[1] * from.y - left[2] * from.x + + + local fxx = -from.x * from.x + local fyy = -from.y * from.y + local fzz = -from.z * from.z + + local fxy = -from.x * from.y + local fxz = -from.x * from.z + local fyz = -from.y * from.z + + local uxx = up[1] * up[1] + local uyy = up[2] * up[2] + local uzz = up[3] * up[3] + local uxy = up[1] * up[2] + local uxz = up[1] * up[3] + local uyz = up[2] * up[3] + + local lxx = -left[1] * left[1] + local lyy = -left[2] * left[2] + local lzz = -left[3] * left[3] + local lxy = -left[1] * left[2] + local lxz = -left[1] * left[3] + local lyz = -left[2] * left[3] + + local rot = + { + {fxx + uxx + lxx, fxy + uxy + lxy, fxz + uxz + lxz}, + {fxy + uxy + lxy, fyy + uyy + lyy, fyz + uyz + lyz}, + {fxz + uxz + lxz, fyz + uyz + lyz, fzz + uzz + lzz}, + } + + MatrixToQuaternion(rot, self) + else + local v = Vector3.Cross(from, to) + local h = (1 - e) / Vector3.Dot(v, v) + + local hx = h * v.x + local hz = h * v.z + local hxy = hx * v.y + local hxz = hx * v.z + local hyz = hz * v.y + + local rot = + { + {e + hx*v.x, hxy - v.z, hxz + v.y}, + {hxy + v.z, e + h*v.y*v.y, hyz-v.x}, + {hxz - v.y, hyz + v.x, e + hz*v.z}, + } + + MatrixToQuaternion(rot, self) + end +end + +function Quaternion:Inverse() + local quat = Quaternion.New() + + quat.x = -self.x + quat.y = -self.y + quat.z = -self.z + quat.w = self.w + + return quat +end + +function Quaternion.Lerp(q1, q2, t) + t = clamp(t, 0, 1) + local q = {x = 0, y = 0, z = 0, w = 1} + + if Quaternion.Dot(q1, q2) < 0 then + q.x = q1.x + t * (-q2.x -q1.x) + q.y = q1.y + t * (-q2.y -q1.y) + q.z = q1.z + t * (-q2.z -q1.z) + q.w = q1.w + t * (-q2.w -q1.w) + else + q.x = q1.x + (q2.x - q1.x) * t + q.y = q1.y + (q2.y - q1.y) * t + q.z = q1.z + (q2.z - q1.z) * t + q.w = q1.w + (q2.w - q1.w) * t + end + + Quaternion.SetNormalize(q) + setmetatable(q, Quaternion) + return q +end + + +function Quaternion.LookRotation(forward, up) + local mag = forward:Magnitude() + if mag < 1e-6 then + error("error input forward to Quaternion.LookRotation"..tostring(forward)) + return nil + end + + forward = forward / mag + up = up or _up + local right = Vector3.Cross(up, forward) + right:SetNormalize() + up = Vector3.Cross(forward, right) + right = Vector3.Cross(up, forward) + +--[[ local quat = _new(0,0,0,1) + local rot = + { + {right.x, up.x, forward.x}, + {right.y, up.y, forward.y}, + {right.z, up.z, forward.z}, + } + + MatrixToQuaternion(rot, quat) + return quat--]] + + local t = right.x + up.y + forward.z + + if t > 0 then + local x, y, z, w + t = t + 1 + local s = 0.5 / sqrt(t) + w = s * t + x = (up.z - forward.y) * s + y = (forward.x - right.z) * s + z = (right.y - up.x) * s + + local ret = _new(x, y, z, w) + ret:SetNormalize() + return ret + else + local rot = + { + {right.x, up.x, forward.x}, + {right.y, up.y, forward.y}, + {right.z, up.z, forward.z}, + } + + local q = {0, 0, 0} + local i = 1 + + if up.y > right.x then + i = 2 + end + + if forward.z > rot[i][i] then + i = 3 + end + + local j = _next[i] + local k = _next[j] + + local t = rot[i][i] - rot[j][j] - rot[k][k] + 1 + local s = 0.5 / sqrt(t) + q[i] = s * t + local w = (rot[k][j] - rot[j][k]) * s + q[j] = (rot[j][i] + rot[i][j]) * s + q[k] = (rot[k][i] + rot[i][k]) * s + + local ret = _new(q[1], q[2], q[3], w) + ret:SetNormalize() + return ret + end +end + +function Quaternion:SetIdentity() + self.x = 0 + self.y = 0 + self.z = 0 + self.w = 1 +end + +local function UnclampedSlerp(q1, q2, t) + local dot = q1.x * q2.x + q1.y * q2.y + q1.z * q2.z + q1.w * q2.w + + if dot < 0 then + dot = -dot + q2 = setmetatable({x = -q2.x, y = -q2.y, z = -q2.z, w = -q2.w}, Quaternion) + end + + if dot < 0.95 then + local angle = acos(dot) + local invSinAngle = 1 / sin(angle) + local t1 = sin((1 - t) * angle) * invSinAngle + local t2 = sin(t * angle) * invSinAngle + q1 = {x = q1.x * t1 + q2.x * t2, y = q1.y * t1 + q2.y * t2, z = q1.z * t1 + q2.z * t2, w = q1.w * t1 + q2.w * t2} + setmetatable(q1, Quaternion) + return q1 + else + q1 = {x = q1.x + t * (q2.x - q1.x), y = q1.y + t * (q2.y - q1.y), z = q1.z + t * (q2.z - q1.z), w = q1.w + t * (q2.w - q1.w)} + Quaternion.SetNormalize(q1) + setmetatable(q1, Quaternion) + return q1 + end +end + + +function Quaternion.Slerp(from, to, t) + if t < 0 then + t = 0 + elseif t > 1 then + t = 1 + end + + return UnclampedSlerp(from, to, t) +end + +function Quaternion.RotateTowards(from, to, maxDegreesDelta) + local angle = Quaternion.Angle(from, to) + + if angle == 0 then + return to + end + + local t = min(1, maxDegreesDelta / angle) + return UnclampedSlerp(from, to, t) +end + +local function Approximately(f0, f1) + return abs(f0 - f1) < 1e-6 +end + +function Quaternion:ToAngleAxis() + local angle = 2 * acos(self.w) + + if Approximately(angle, 0) then + return angle * 57.29578, Vector3.New(1, 0, 0) + end + + local div = 1 / sqrt(1 - sqrt(self.w)) + return angle * 57.29578, Vector3.New(self.x * div, self.y * div, self.z * div) +end + +local pi = Mathf.PI +local half_pi = pi * 0.5 +local two_pi = 2 * pi +local negativeFlip = -0.0001 +local positiveFlip = two_pi - 0.0001 + +local function SanitizeEuler(euler) + if euler.x < negativeFlip then + euler.x = euler.x + two_pi + elseif euler.x > positiveFlip then + euler.x = euler.x - two_pi + end + + if euler.y < negativeFlip then + euler.y = euler.y + two_pi + elseif euler.y > positiveFlip then + euler.y = euler.y - two_pi + end + + if euler.z < negativeFlip then + euler.z = euler.z + two_pi + elseif euler.z > positiveFlip then + euler.z = euler.z + two_pi + end +end + +--from http://www.geometrictools.com/Documentation/EulerAngles.pdf +--Order of rotations: YXZ +function Quaternion:ToEulerAngles() + local x = self.x + local y = self.y + local z = self.z + local w = self.w + + local check = 2 * (y * z - w * x) + + if check < 0.999 then + if check > -0.999 then + local v = Vector3.New( -asin(check), + atan2(2 * (x * z + w * y), 1 - 2 * (x * x + y * y)), + atan2(2 * (x * y + w * z), 1 - 2 * (x * x + z * z))) + SanitizeEuler(v) + v:Mul(rad2Deg) + return v + else + local v = Vector3.New(half_pi, atan2(2 * (x * y - w * z), 1 - 2 * (y * y + z * z)), 0) + SanitizeEuler(v) + v:Mul(rad2Deg) + return v + end + else + local v = Vector3.New(-half_pi, atan2(-2 * (x * y - w * z), 1 - 2 * (y * y + z * z)), 0) + SanitizeEuler(v) + v:Mul(rad2Deg) + return v + end +end + +function Quaternion:Forward() + return self:MulVec3(_forward) +end + +function Quaternion.MulVec3(self, point) + local vec = Vector3.New() + + local num = self.x * 2 + local num2 = self.y * 2 + local num3 = self.z * 2 + local num4 = self.x * num + local num5 = self.y * num2 + local num6 = self.z * num3 + local num7 = self.x * num2 + local num8 = self.x * num3 + local num9 = self.y * num3 + local num10 = self.w * num + local num11 = self.w * num2 + local num12 = self.w * num3 + + vec.x = (((1 - (num5 + num6)) * point.x) + ((num7 - num12) * point.y)) + ((num8 + num11) * point.z) + vec.y = (((num7 + num12) * point.x) + ((1 - (num4 + num6)) * point.y)) + ((num9 - num10) * point.z) + vec.z = (((num8 - num11) * point.x) + ((num9 + num10) * point.y)) + ((1 - (num4 + num5)) * point.z) + + return vec +end + +Quaternion.__mul = function(lhs, rhs) + if Quaternion == getmetatable(rhs) then + return Quaternion.New((((lhs.w * rhs.x) + (lhs.x * rhs.w)) + (lhs.y * rhs.z)) - (lhs.z * rhs.y), (((lhs.w * rhs.y) + (lhs.y * rhs.w)) + (lhs.z * rhs.x)) - (lhs.x * rhs.z), (((lhs.w * rhs.z) + (lhs.z * rhs.w)) + (lhs.x * rhs.y)) - (lhs.y * rhs.x), (((lhs.w * rhs.w) - (lhs.x * rhs.x)) - (lhs.y * rhs.y)) - (lhs.z * rhs.z)) + elseif Vector3 == getmetatable(rhs) then + return lhs:MulVec3(rhs) + end +end + +Quaternion.__unm = function(q) + return Quaternion.New(-q.x, -q.y, -q.z, -q.w) +end + +Quaternion.__eq = function(lhs,rhs) + return Quaternion.Dot(lhs, rhs) > 0.999999 +end + +Quaternion.__tostring = function(self) + return "["..self.x..","..self.y..","..self.z..","..self.w.."]" +end + +get.identity = function() return _new(0, 0, 0, 1) end +get.eulerAngles = Quaternion.ToEulerAngles + +UnityEngine.Quaternion = Quaternion +setmetatable(Quaternion, Quaternion) +return Quaternion \ No newline at end of file diff --git a/lua_probject/tolua_project/UnityEngine/Ray.lua b/lua_probject/tolua_project/UnityEngine/Ray.lua new file mode 100644 index 00000000..dbd776e5 --- /dev/null +++ b/lua_probject/tolua_project/UnityEngine/Ray.lua @@ -0,0 +1,62 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- +local rawget = rawget +local setmetatable = setmetatable +local Vector3 = Vector3 + +local Ray = +{ + direction = Vector3.zero, + origin = Vector3.zero, +} + +local get = tolua.initget(Ray) + +Ray.__index = function(t,k) + local var = rawget(Ray, k) + + if var == nil then + var = rawget(get, k) + + if var ~= nil then + return var(t) + end + end + + return var +end + +Ray.__call = function(t, direction, origin) + return Ray.New(direction, origin) +end + +function Ray.New(direction, origin) + local ray = {} + ray.direction = direction:Normalize() + ray.origin = origin + setmetatable(ray, Ray) + return ray +end + +function Ray:GetPoint(distance) + local dir = self.direction * distance + dir:Add(self.origin) + return dir +end + +function Ray:Get() + local o = self.origin + local d = self.direction + return o.x, o.y, o.z, d.x, d.y, d.z +end + +Ray.__tostring = function(self) + return string.format("Origin:(%f,%f,%f),Dir:(%f,%f, %f)", self.origin.x, self.origin.y, self.origin.z, self.direction.x, self.direction.y, self.direction.z) +end + +UnityEngine.Ray = Ray +setmetatable(Ray, Ray) +return Ray \ No newline at end of file diff --git a/lua_probject/tolua_project/UnityEngine/RaycastHit.lua b/lua_probject/tolua_project/UnityEngine/RaycastHit.lua new file mode 100644 index 00000000..8f51e123 --- /dev/null +++ b/lua_probject/tolua_project/UnityEngine/RaycastHit.lua @@ -0,0 +1,81 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- +local rawget = rawget +local setmetatable = setmetatable + +RaycastBits = +{ + Collider = 1, + Normal = 2, + Point = 4, + Rigidbody = 8, + Transform = 16, + ALL = 31, +} + +local RaycastBits = RaycastBits +local RaycastHit = {} +local get = tolua.initget(RaycastHit) + +RaycastHit.__index = function(t,k) + local var = rawget(RaycastHit, k) + + if var == nil then + var = rawget(get, k) + + if var ~= nil then + return var(t) + end + end + + return var +end + +--c# 创建 +function RaycastHit.New(collider, distance, normal, point, rigidbody, transform) + local hit = {collider = collider, distance = distance, normal = normal, point = point, rigidbody = rigidbody, transform = transform} + setmetatable(hit, RaycastHit) + return hit +end + +function RaycastHit:Init(collider, distance, normal, point, rigidbody, transform) + self.collider = collider + self.distance = distance + self.normal = normal + self.point = point + self.rigidbody = rigidbody + self.transform = transform +end + +function RaycastHit:Get() + return self.collider, self.distance, self.normal, self.point, self.rigidbody, self.transform +end + +function RaycastHit:Destroy() + self.collider = nil + self.rigidbody = nil + self.transform = nil +end + +function RaycastHit.GetMask(...) + local arg = {...} + local value = 0 + + for i = 1, #arg do + local n = RaycastBits[arg[i]] or 0 + + if n ~= 0 then + value = value + n + end + end + + if value == 0 then value = RaycastBits["all"] end + return value +end + +UnityEngine.RaycastHit = RaycastHit +setmetatable(RaycastHit, RaycastHit) +return RaycastHit \ No newline at end of file diff --git a/lua_probject/tolua_project/UnityEngine/Time.lua b/lua_probject/tolua_project/UnityEngine/Time.lua new file mode 100644 index 00000000..179601e3 --- /dev/null +++ b/lua_probject/tolua_project/UnityEngine/Time.lua @@ -0,0 +1,126 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- +local rawget = rawget +local uTime = UnityEngine.Time +local gettime = tolua.gettime + +local _Time = +{ + deltaTime = 0, + fixedDeltaTime = 0, + maximumDeltaTime = 0.3333333, + fixedTime = 0, + frameCount = 1, + realtimeSinceStartup=0, + time = 0, + timeScale = 1, + timeSinceLevelLoad = 0, + unscaledDeltaTime = 0, + unscaledTime = 0, +} + +local _set = {} + +function _set.fixedDeltaTime(v) + _Time.fixedDeltaTime = v + uTime.fixedDeltaTime = v +end + +function _set.maximumDeltaTime(v) + _Time.maximumDeltaTime = v + uTime.maximumDeltaTime = v +end + +function _set.timeScale(v) + _Time.timeScale = v + uTime.timeScale = v +end + +function _set.captureFramerate(v) + _Time.captureFramerate = v + uTime.captureFramerate = v +end + +function _set.timeSinceLevelLoad(v) + _Time.timeSinceLevelLoad = v +end + +_Time.__index = function(t, k) + local var = rawget(_Time, k) + + if var then + return var + end + + return uTime.__index(uTime, k) +end + +_Time.__newindex = function(t, k, v) + local func = rawget(_set, k) + + if func then + return func(v) + end + + error(string.format("Property or indexer `UnityEngine.Time.%s' cannot be assigned to (it is read only)", k)) +end + +local Time = {} +local counter = 1 + +function Time:SetDeltaTime(deltaTime, unscaledDeltaTime) + local _Time = _Time + _Time.deltaTime = deltaTime + _Time.unscaledDeltaTime = unscaledDeltaTime + counter = counter - 1 + + if counter == 0 and uTime then + _Time.time = uTime.time + _Time.timeSinceLevelLoad = uTime.timeSinceLevelLoad + _Time.unscaledTime = uTime.unscaledTime + _Time.realtimeSinceStartup = uTime.realtimeSinceStartup + _Time.frameCount = uTime.frameCount + counter = 1000000 + else + _Time.time = _Time.time + deltaTime + _Time.realtimeSinceStartup = _Time.realtimeSinceStartup + unscaledDeltaTime + _Time.timeSinceLevelLoad = _Time.timeSinceLevelLoad + deltaTime + _Time.unscaledTime = _Time.unscaledTime + unscaledDeltaTime + end +end + +function Time:SetFixedDelta(fixedDeltaTime) + _Time.deltaTime = fixedDeltaTime + _Time.fixedDeltaTime = fixedDeltaTime + + _Time.fixedTime = _Time.fixedTime + fixedDeltaTime +end + +function Time:SetFrameCount() + _Time.frameCount = _Time.frameCount + 1 +end + +function Time:SetTimeScale(scale) + local last = _Time.timeScale + _Time.timeScale = scale + uTime.timeScale = scale + return last +end + +function Time:GetTimestamp() + return gettime() +end + +UnityEngine.Time = Time +setmetatable(Time, _Time) + +if uTime ~= nil then + _Time.maximumDeltaTime = uTime.maximumDeltaTime + _Time.timeScale = uTime.timeScale +end + + +return Time \ No newline at end of file diff --git a/lua_probject/tolua_project/UnityEngine/Touch.lua b/lua_probject/tolua_project/UnityEngine/Touch.lua new file mode 100644 index 00000000..121c3983 --- /dev/null +++ b/lua_probject/tolua_project/UnityEngine/Touch.lua @@ -0,0 +1,89 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- +local zero = Vector2.zero +local rawget = rawget +local setmetatable = setmetatable + +TouchPhase = +{ + Began = 0, + Moved = 1, + Stationary = 2, + Ended = 3, + Canceled = 4, +} + +TouchBits = +{ + DeltaPosition = 1, + Position = 2, + RawPosition = 4, + ALL = 7, +} + +local TouchPhase = TouchPhase +local TouchBits = TouchBits +local Touch = {} +local get = tolua.initget(Touch) + +Touch.__index = function(t,k) + local var = rawget(Touch, k) + + if var == nil then + var = rawget(get, k) + + if var ~= nil then + return var(t) + end + end + + return var +end + +--c# 创建 +function Touch.New(fingerId, position, rawPosition, deltaPosition, deltaTime, tapCount, phase) + return setmetatable({fingerId = fingerId or 0, position = position or zero, rawPosition = rawPosition or zero, deltaPosition = deltaPosition or zero, deltaTime = deltaTime or 0, tapCount = tapCount or 0, phase = phase or 0}, Touch) +end + +function Touch:Init(fingerId, position, rawPosition, deltaPosition, deltaTime, tapCount, phase) + self.fingerId = fingerId + self.position = position + self.rawPosition = rawPosition + self.deltaPosition = deltaPosition + self.deltaTime = deltaTime + self.tapCount = tapCount + self.phase = phase +end + +function Touch:Destroy() + self.position = nil + self.rawPosition = nil + self.deltaPosition = nil +end + +function Touch.GetMask(...) + local arg = {...} + local value = 0 + + for i = 1, #arg do + local n = TouchBits[arg[i]] or 0 + + if n ~= 0 then + value = value + n + end + end + + if value == 0 then value = TouchBits["all"] end + + return value +end + +UnityEngine.TouchPhase = TouchPhase +UnityEngine.Touch = Touch +setmetatable(Touch, Touch) +return Touch + + diff --git a/lua_probject/tolua_project/UnityEngine/Vector2.lua b/lua_probject/tolua_project/UnityEngine/Vector2.lua new file mode 100644 index 00000000..7fccd798 --- /dev/null +++ b/lua_probject/tolua_project/UnityEngine/Vector2.lua @@ -0,0 +1,318 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- + +local sqrt = math.sqrt +local setmetatable = setmetatable +local rawget = rawget +local math = math +local acos = math.acos +local max = math.max + +local Vector2 = {} +local get = tolua.initget(Vector2) + +Vector2.__index = function(t,k) + local var = rawget(Vector2, k) + + if var == nil then + var = rawget(get, k) + + if var ~= nil then + return var(t) + end + end + + return var +end + +Vector2.__call = function(t, x, y) + return setmetatable({x = x or 0, y = y or 0}, Vector2) +end + +function Vector2.New(x, y) + return setmetatable({x = x or 0, y = y or 0}, Vector2) +end + +function Vector2:Set(x,y) + self.x = x or 0 + self.y = y or 0 +end + +function Vector2:Get() + if self then + return self.x, self.y + else + printlog("Vector2:Get获取异常") + end + +end + +function Vector2:SqrMagnitude() + return self.x * self.x + self.y * self.y +end + +function Vector2:Clone() + return setmetatable({x = self.x, y = self.y}, Vector2) +end + + +function Vector2.Normalize(v) + local x = v.x + local y = v.y + local magnitude = sqrt(x * x + y * y) + + if magnitude > 1e-05 then + x = x / magnitude + y = y / magnitude + else + x = 0 + y = 0 + end + + return setmetatable({x = x, y = y}, Vector2) +end + +function Vector2:SetNormalize() + local magnitude = sqrt(self.x * self.x + self.y * self.y) + + if magnitude > 1e-05 then + self.x = self.x / magnitude + self.y = self.y / magnitude + else + self.x = 0 + self.y = 0 + end + + return self +end + + +function Vector2.Dot(lhs, rhs) + return lhs.x * rhs.x + lhs.y * rhs.y +end + +function Vector2.Angle(from, to) + local x1,y1 = from.x, from.y + local d = sqrt(x1 * x1 + y1 * y1) + + if d > 1e-5 then + x1 = x1/d + y1 = y1/d + else + x1,y1 = 0,0 + end + + local x2,y2 = to.x, to.y + d = sqrt(x2 * x2 + y2 * y2) + + if d > 1e-5 then + x2 = x2/d + y2 = y2/d + else + x2,y2 = 0,0 + end + + d = x1 * x2 + y1 * y2 + + if d < -1 then + d = -1 + elseif d > 1 then + d = 1 + end + + return acos(d) * 57.29578 +end + +function Vector2.Magnitude(v) + return sqrt(v.x * v.x + v.y * v.y) +end + +function Vector2.Reflect(dir, normal) + local dx = dir.x + local dy = dir.y + local nx = normal.x + local ny = normal.y + local s = -2 * (dx * nx + dy * ny) + + return setmetatable({x = s * nx + dx, y = s * ny + dy}, Vector2) +end + +function Vector2.Distance(a, b) + return sqrt((a.x - b.x) ^ 2 + (a.y - b.y) ^ 2) +end + +function Vector2.Lerp(a, b, t) + if t < 0 then + t = 0 + elseif t > 1 then + t = 1 + end + + return setmetatable({x = a.x + (b.x - a.x) * t, y = a.y + (b.y - a.y) * t}, Vector2) +end + +function Vector2.LerpUnclamped(a, b, t) + return setmetatable({x = a.x + (b.x - a.x) * t, y = a.y + (b.y - a.y) * t}, Vector2) +end + +function Vector2.MoveTowards(current, target, maxDistanceDelta) + local cx = current.x + local cy = current.y + local x = target.x - cx + local y = target.y - cy + local s = x * x + y * y + + if s > maxDistanceDelta * maxDistanceDelta and s ~= 0 then + s = maxDistanceDelta / sqrt(s) + return setmetatable({x = cx + x * s, y = cy + y * s}, Vector2) + end + + return setmetatable({x = target.x, y = target.y}, Vector2) +end + +function Vector2.ClampMagnitude(v, maxLength) + local x = v.x + local y = v.y + local sqrMag = x * x + y * y + + if sqrMag > maxLength * maxLength then + local mag = maxLength / sqrt(sqrMag) + x = x * mag + y = y * mag + return setmetatable({x = x, y = y}, Vector2) + end + + return setmetatable({x = x, y = y}, Vector2) +end + +function Vector2.SmoothDamp(current, target, Velocity, smoothTime, maxSpeed, deltaTime) + deltaTime = deltaTime or Time.deltaTime + maxSpeed = maxSpeed or math.huge + smoothTime = math.max(0.0001, smoothTime) + + local num = 2 / smoothTime + local num2 = num * deltaTime + num2 = 1 / (1 + num2 + 0.48 * num2 * num2 + 0.235 * num2 * num2 * num2) + + local tx = target.x + local ty = target.y + local cx = current.x + local cy = current.y + local vecx = cx - tx + local vecy = cy - ty + local m = vecx * vecx + vecy * vecy + local n = maxSpeed * smoothTime + + if m > n * n then + m = n / sqrt(m) + vecx = vecx * m + vecy = vecy * m + end + + m = Velocity.x + n = Velocity.y + + local vec3x = (m + num * vecx) * deltaTime + local vec3y = (n + num * vecy) * deltaTime + Velocity.x = (m - num * vec3x) * num2 + Velocity.y = (n - num * vec3y) * num2 + m = cx - vecx + (vecx + vec3x) * num2 + n = cy - vecy + (vecy + vec3y) * num2 + + if (tx - cx) * (m - tx) + (ty - cy) * (n - ty) > 0 then + m = tx + n = ty + Velocity.x = 0 + Velocity.y = 0 + end + + return setmetatable({x = m, y = n}, Vector2), Velocity +end + +function Vector2.Max(a, b) + return setmetatable({x = math.max(a.x, b.x), y = math.max(a.y, b.y)}, Vector2) +end + +function Vector2.Min(a, b) + return setmetatable({x = math.min(a.x, b.x), y = math.min(a.y, b.y)}, Vector2) +end + +function Vector2.Scale(a, b) + return setmetatable({x = a.x * b.x, y = a.y * b.y}, Vector2) +end + +function Vector2:Div(d) + self.x = self.x / d + self.y = self.y / d + + return self +end + +function Vector2:Mul(d) + self.x = self.x * d + self.y = self.y * d + + return self +end + +function Vector2:Add(b) + self.x = self.x + b.x + self.y = self.y + b.y + + return self +end + +function Vector2:Sub(b) + self.x = self.x - b.x + self.y = self.y - b.y + + return +end + +Vector2.__tostring = function(self) + return string.format("(%f,%f)", self.x, self.y) +end + +Vector2.__div = function(va, d) + return setmetatable({x = va.x / d, y = va.y / d}, Vector2) +end + +Vector2.__mul = function(a, d) + if type(d) == "number" then + return setmetatable({x = a.x * d, y = a.y * d}, Vector2) + else + return setmetatable({x = a * d.x, y = a * d.y}, Vector2) + end +end + +Vector2.__add = function(a, b) + return setmetatable({x = a.x + b.x, y = a.y + b.y}, Vector2) +end + +Vector2.__sub = function(a, b) + return setmetatable({x = a.x - b.x, y = a.y - b.y}, Vector2) +end + +Vector2.__unm = function(v) + return setmetatable({x = -v.x, y = -v.y}, Vector2) +end + +Vector2.__eq = function(a,b) + return ((a.x - b.x) ^ 2 + (a.y - b.y) ^ 2) < 9.999999e-11 +end + +get.up = function() return setmetatable({x = 0, y = 1}, Vector2) end +get.right = function() return setmetatable({x = 1, y = 0}, Vector2) end +get.zero = function() return setmetatable({x = 0, y = 0}, Vector2) end +get.one = function() return setmetatable({x = 1, y = 1}, Vector2) end + +get.magnitude = Vector2.Magnitude +get.normalized = Vector2.Normalize +get.sqrMagnitude = Vector2.SqrMagnitude + +UnityEngine.Vector2 = Vector2 +setmetatable(Vector2, Vector2) +return Vector2 \ No newline at end of file diff --git a/lua_probject/tolua_project/UnityEngine/Vector3.lua b/lua_probject/tolua_project/UnityEngine/Vector3.lua new file mode 100644 index 00000000..ba124a4b --- /dev/null +++ b/lua_probject/tolua_project/UnityEngine/Vector3.lua @@ -0,0 +1,471 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- +local math = math +local acos = math.acos +local sqrt = math.sqrt +local max = math.max +local min = math.min +local clamp = Mathf.Clamp +local cos = math.cos +local sin = math.sin +local abs = math.abs +local sign = Mathf.Sign +local setmetatable = setmetatable +local rawset = rawset +local rawget = rawget +local type = type + +local rad2Deg = 57.295779513082 +local deg2Rad = 0.017453292519943 + +local Vector3 = {} +local get = tolua.initget(Vector3) + +Vector3.__index = function(t,k) + local var = rawget(Vector3, k) + + if var == nil then + var = rawget(get, k) + + if var ~= nil then + return var(t) + end + end + + return var +end + +function Vector3.New(x, y, z) + local t = {x = x or 0, y = y or 0, z = z or 0} + setmetatable(t, Vector3) + return t +end + +local _new = Vector3.New + +Vector3.__call = function(t,x,y,z) + local t = {x = x or 0, y = y or 0, z = z or 0} + setmetatable(t, Vector3) + return t +end + +function Vector3:Set(x,y,z) + self.x = x or 0 + self.y = y or 0 + self.z = z or 0 +end + +function Vector3.Get(v) + return v.x, v.y, v.z +end + +function Vector3:Clone() + return setmetatable({x = self.x, y = self.y, z = self.z}, Vector3) +end + +function Vector3.Distance(va, vb) + return sqrt((va.x - vb.x)^2 + (va.y - vb.y)^2 + (va.z - vb.z)^2) +end + +function Vector3.Dot(lhs, rhs) + return lhs.x * rhs.x + lhs.y * rhs.y + lhs.z * rhs.z +end + +function Vector3.Lerp(from, to, t) + t = clamp(t, 0, 1) + return _new(from.x + (to.x - from.x) * t, from.y + (to.y - from.y) * t, from.z + (to.z - from.z) * t) +end + +function Vector3:Magnitude() + return sqrt(self.x * self.x + self.y * self.y + self.z * self.z) +end + +function Vector3.Max(lhs, rhs) + return _new(max(lhs.x, rhs.x), max(lhs.y, rhs.y), max(lhs.z, rhs.z)) +end + +function Vector3.Min(lhs, rhs) + return _new(min(lhs.x, rhs.x), min(lhs.y, rhs.y), min(lhs.z, rhs.z)) +end + +function Vector3.Normalize(v) + local x,y,z = v.x, v.y, v.z + local num = sqrt(x * x + y * y + z * z) + + if num > 1e-5 then + return setmetatable({x = x / num, y = y / num, z = z / num}, Vector3) + end + + return setmetatable({x = 0, y = 0, z = 0}, Vector3) +end + +function Vector3:SetNormalize() + local num = sqrt(self.x * self.x + self.y * self.y + self.z * self.z) + + if num > 1e-5 then + self.x = self.x / num + self.y = self.y / num + self.z = self.z /num + else + self.x = 0 + self.y = 0 + self.z = 0 + end + + return self +end + +function Vector3:SqrMagnitude() + return self.x * self.x + self.y * self.y + self.z * self.z +end + +local dot = Vector3.Dot + +function Vector3.Angle(from, to) + return acos(clamp(dot(from:Normalize(), to:Normalize()), -1, 1)) * rad2Deg +end + +function Vector3:ClampMagnitude(maxLength) + if self:SqrMagnitude() > (maxLength * maxLength) then + self:SetNormalize() + self:Mul(maxLength) + end + + return self +end + + +function Vector3.OrthoNormalize(va, vb, vc) + va:SetNormalize() + vb:Sub(vb:Project(va)) + vb:SetNormalize() + + if vc == nil then + return va, vb + end + + vc:Sub(vc:Project(va)) + vc:Sub(vc:Project(vb)) + vc:SetNormalize() + return va, vb, vc +end + +function Vector3.MoveTowards(current, target, maxDistanceDelta) + local delta = target - current + local sqrDelta = delta:SqrMagnitude() + local sqrDistance = maxDistanceDelta * maxDistanceDelta + + if sqrDelta > sqrDistance then + local magnitude = sqrt(sqrDelta) + + if magnitude > 1e-6 then + delta:Mul(maxDistanceDelta / magnitude) + delta:Add(current) + return delta + else + return current:Clone() + end + end + + return target:Clone() +end + +function ClampedMove(lhs, rhs, clampedDelta) + local delta = rhs - lhs + + if delta > 0 then + return lhs + min(delta, clampedDelta) + else + return lhs - min(-delta, clampedDelta) + end +end + +local overSqrt2 = 0.7071067811865475244008443621048490 + +local function OrthoNormalVector(vec) + local res = _new() + + if abs(vec.z) > overSqrt2 then + local a = vec.y * vec.y + vec.z * vec.z + local k = 1 / sqrt (a) + res.x = 0 + res.y = -vec.z * k + res.z = vec.y * k + else + local a = vec.x * vec.x + vec.y * vec.y + local k = 1 / sqrt (a) + res.x = -vec.y * k + res.y = vec.x * k + res.z = 0 + end + + return res +end + +function Vector3.RotateTowards(current, target, maxRadiansDelta, maxMagnitudeDelta) + local len1 = current:Magnitude() + local len2 = target:Magnitude() + + if len1 > 1e-6 and len2 > 1e-6 then + local from = current / len1 + local to = target / len2 + local cosom = dot(from, to) + + if cosom > 1 - 1e-6 then + return Vector3.MoveTowards (current, target, maxMagnitudeDelta) + elseif cosom < -1 + 1e-6 then + local axis = OrthoNormalVector(from) + local q = Quaternion.AngleAxis(maxRadiansDelta * rad2Deg, axis) + local rotated = q:MulVec3(from) + local delta = ClampedMove(len1, len2, maxMagnitudeDelta) + rotated:Mul(delta) + return rotated + else + local angle = acos(cosom) + local axis = Vector3.Cross(from, to) + axis:SetNormalize () + local q = Quaternion.AngleAxis(min(maxRadiansDelta, angle) * rad2Deg, axis) + local rotated = q:MulVec3(from) + local delta = ClampedMove(len1, len2, maxMagnitudeDelta) + rotated:Mul(delta) + return rotated + end + end + + return Vector3.MoveTowards(current, target, maxMagnitudeDelta) +end + +function Vector3.SmoothDamp(current, target, currentVelocity, smoothTime) + local maxSpeed = Mathf.Infinity + local deltaTime = Time.deltaTime + smoothTime = max(0.0001, smoothTime) + local num = 2 / smoothTime + local num2 = num * deltaTime + local num3 = 1 / (1 + num2 + 0.48 * num2 * num2 + 0.235 * num2 * num2 * num2) + local vector2 = target:Clone() + local maxLength = maxSpeed * smoothTime + local vector = current - target + vector:ClampMagnitude(maxLength) + target = current - vector + local vec3 = (currentVelocity + (vector * num)) * deltaTime + currentVelocity = (currentVelocity - (vec3 * num)) * num3 + local vector4 = target + (vector + vec3) * num3 + + if Vector3.Dot(vector2 - current, vector4 - vector2) > 0 then + vector4 = vector2 + currentVelocity:Set(0,0,0) + end + + return vector4, currentVelocity +end + +function Vector3.Scale(a, b) + local x = a.x * b.x + local y = a.y * b.y + local z = a.z * b.z + return _new(x, y, z) +end + +function Vector3.Cross(lhs, rhs) + local x = lhs.y * rhs.z - lhs.z * rhs.y + local y = lhs.z * rhs.x - lhs.x * rhs.z + local z = lhs.x * rhs.y - lhs.y * rhs.x + return _new(x,y,z) +end + +function Vector3:Equals(other) + return self.x == other.x and self.y == other.y and self.z == other.z +end + +function Vector3.Reflect(inDirection, inNormal) + local num = -2 * dot(inNormal, inDirection) + inNormal = inNormal * num + inNormal:Add(inDirection) + return inNormal +end + + +function Vector3.Project(vector, onNormal) + local num = onNormal:SqrMagnitude() + + if num < 1.175494e-38 then + return _new(0,0,0) + end + + local num2 = dot(vector, onNormal) + local v3 = onNormal:Clone() + v3:Mul(num2/num) + return v3 +end + +function Vector3.ProjectOnPlane(vector, planeNormal) + local v3 = Vector3.Project(vector, planeNormal) + v3:Mul(-1) + v3:Add(vector) + return v3 +end + +function Vector3.Slerp(from, to, t) + local omega, sinom, scale0, scale1 + + if t <= 0 then + return from:Clone() + elseif t >= 1 then + return to:Clone() + end + + local v2 = to:Clone() + local v1 = from:Clone() + local len2 = to:Magnitude() + local len1 = from:Magnitude() + v2:Div(len2) + v1:Div(len1) + + local len = (len2 - len1) * t + len1 + local cosom = v1.x * v2.x + v1.y * v2.y + v1.z * v2.z + + if cosom > 1 - 1e-6 then + scale0 = 1 - t + scale1 = t + elseif cosom < -1 + 1e-6 then + local axis = OrthoNormalVector(from) + local q = Quaternion.AngleAxis(180.0 * t, axis) + local v = q:MulVec3(from) + v:Mul(len) + return v + else + omega = acos(cosom) + sinom = sin(omega) + scale0 = sin((1 - t) * omega) / sinom + scale1 = sin(t * omega) / sinom + end + + v1:Mul(scale0) + v2:Mul(scale1) + v2:Add(v1) + v2:Mul(len) + return v2 +end + + +function Vector3:Mul(q) + if type(q) == "number" then + self.x = self.x * q + self.y = self.y * q + self.z = self.z * q + else + self:MulQuat(q) + end + + return self +end + +function Vector3:Div(d) + self.x = self.x / d + self.y = self.y / d + self.z = self.z / d + + return self +end + +function Vector3:Add(vb) + self.x = self.x + vb.x + self.y = self.y + vb.y + self.z = self.z + vb.z + + return self +end + +function Vector3:Sub(vb) + self.x = self.x - vb.x + self.y = self.y - vb.y + self.z = self.z - vb.z + + return self +end + +function Vector3:MulQuat(quat) + local num = quat.x * 2 + local num2 = quat.y * 2 + local num3 = quat.z * 2 + local num4 = quat.x * num + local num5 = quat.y * num2 + local num6 = quat.z * num3 + local num7 = quat.x * num2 + local num8 = quat.x * num3 + local num9 = quat.y * num3 + local num10 = quat.w * num + local num11 = quat.w * num2 + local num12 = quat.w * num3 + + local x = (((1 - (num5 + num6)) * self.x) + ((num7 - num12) * self.y)) + ((num8 + num11) * self.z) + local y = (((num7 + num12) * self.x) + ((1 - (num4 + num6)) * self.y)) + ((num9 - num10) * self.z) + local z = (((num8 - num11) * self.x) + ((num9 + num10) * self.y)) + ((1 - (num4 + num5)) * self.z) + + self:Set(x, y, z) + return self +end + +function Vector3.AngleAroundAxis (from, to, axis) + from = from - Vector3.Project(from, axis) + to = to - Vector3.Project(to, axis) + local angle = Vector3.Angle (from, to) + return angle * (Vector3.Dot (axis, Vector3.Cross (from, to)) < 0 and -1 or 1) +end + + +Vector3.__tostring = function(self) + return "["..self.x..","..self.y..","..self.z.."]" +end + +Vector3.__div = function(va, d) + return _new(va.x / d, va.y / d, va.z / d) +end + +Vector3.__mul = function(va, d) + if type(d) == "number" then + return _new(va.x * d, va.y * d, va.z * d) + else + local vec = va:Clone() + vec:MulQuat(d) + return vec + end +end + +Vector3.__add = function(va, vb) + return _new(va.x + vb.x, va.y + vb.y, va.z + vb.z) +end + +Vector3.__sub = function(va, vb) + return _new(va.x - vb.x, va.y - vb.y, va.z - vb.z) +end + +Vector3.__unm = function(va) + return _new(-va.x, -va.y, -va.z) +end + +Vector3.__eq = function(a,b) + local v = a - b + local delta = v:SqrMagnitude() + return delta < 1e-10 +end + +get.up = function() return _new(0,1,0) end +get.down = function() return _new(0,-1,0) end +get.right = function() return _new(1,0,0) end +get.left = function() return _new(-1,0,0) end +get.forward = function() return _new(0,0,1) end +get.back = function() return _new(0,0,-1) end +get.zero = function() return _new(0,0,0) end +get.one = function() return _new(1,1,1) end + +get.magnitude = Vector3.Magnitude +get.normalized = Vector3.Normalize +get.sqrMagnitude= Vector3.SqrMagnitude + +UnityEngine.Vector3 = Vector3 +setmetatable(Vector3, Vector3) +return Vector3 diff --git a/lua_probject/tolua_project/UnityEngine/Vector4.lua b/lua_probject/tolua_project/UnityEngine/Vector4.lua new file mode 100644 index 00000000..95f8aef3 --- /dev/null +++ b/lua_probject/tolua_project/UnityEngine/Vector4.lua @@ -0,0 +1,204 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- + +local clamp = Mathf.Clamp +local sqrt = Mathf.Sqrt +local min = Mathf.Min +local max = Mathf.Max +local setmetatable = setmetatable +local rawget = rawget + +local Vector4 = {} +local get = tolua.initget(Vector4) + +Vector4.__index = function(t,k) + local var = rawget(Vector4, k) + + if var == nil then + var = rawget(get, k) + + if var ~= nil then + return var(t) + end + end + + return var +end + +Vector4.__call = function(t, x, y, z, w) + return setmetatable({x = x or 0, y = y or 0, z = z or 0, w = w or 0}, Vector4) +end + +function Vector4.New(x, y, z, w) + return setmetatable({x = x or 0, y = y or 0, z = z or 0, w = w or 0}, Vector4) +end + +function Vector4:Set(x,y,z,w) + self.x = x or 0 + self.y = y or 0 + self.z = z or 0 + self.w = w or 0 +end + +function Vector4:Get() + return self.x, self.y, self.z, self.w +end + +function Vector4.Lerp(from, to, t) + t = clamp(t, 0, 1) + return Vector4.New(from.x + ((to.x - from.x) * t), from.y + ((to.y - from.y) * t), from.z + ((to.z - from.z) * t), from.w + ((to.w - from.w) * t)) +end + +function Vector4.MoveTowards(current, target, maxDistanceDelta) + local vector = target - current + local magnitude = vector:Magnitude() + + if magnitude > maxDistanceDelta and magnitude ~= 0 then + maxDistanceDelta = maxDistanceDelta / magnitude + vector:Mul(maxDistanceDelta) + vector:Add(current) + return vector + end + + return target +end + +function Vector4.Scale(a, b) + return Vector4.New(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w) +end + +function Vector4:SetScale(scale) + self.x = self.x * scale.x + self.y = self.y * scale.y + self.z = self.z * scale.z + self.w = self.w * scale.w +end + +function Vector4:Normalize() + local v = vector4.New(self.x, self.y, self.z, self.w) + return v:SetNormalize() +end + +function Vector4:SetNormalize() + local num = self:Magnitude() + + if num == 1 then + return self + elseif num > 1e-05 then + self:Div(num) + else + self:Set(0,0,0,0) + end + + return self +end + +function Vector4:Div(d) + self.x = self.x / d + self.y = self.y / d + self.z = self.z / d + self.w = self.w / d + + return self +end + +function Vector4:Mul(d) + self.x = self.x * d + self.y = self.y * d + self.z = self.z * d + self.w = self.w * d + + return self +end + +function Vector4:Add(b) + self.x = self.x + b.x + self.y = self.y + b.y + self.z = self.z + b.z + self.w = self.w + b.w + + return self +end + +function Vector4:Sub(b) + self.x = self.x - b.x + self.y = self.y - b.y + self.z = self.z - b.z + self.w = self.w - b.w + + return self +end + +function Vector4.Dot(a, b) + return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w +end + +function Vector4.Project(a, b) + local s = Vector4.Dot(a, b) / Vector4.Dot(b, b) + return b * s +end + +function Vector4.Distance(a, b) + local v = a - b + return Vector4.Magnitude(v) +end + +function Vector4.Magnitude(a) + return sqrt(a.x * a.x + a.y * a.y + a.z * a.z + a.w * a.w) +end + +function Vector4.SqrMagnitude(a) + return a.x * a.x + a.y * a.y + a.z * a.z + a.w * a.w +end + +function Vector4.Min(lhs, rhs) + return Vector4.New(max(lhs.x, rhs.x), max(lhs.y, rhs.y), max(lhs.z, rhs.z), max(lhs.w, rhs.w)) +end + +function Vector4.Max(lhs, rhs) + return Vector4.New(min(lhs.x, rhs.x), min(lhs.y, rhs.y), min(lhs.z, rhs.z), min(lhs.w, rhs.w)) +end + +Vector4.__tostring = function(self) + return string.format("[%f,%f,%f,%f]", self.x, self.y, self.z, self.w) +end + +Vector4.__div = function(va, d) + return Vector4.New(va.x / d, va.y / d, va.z / d, va.w / d) +end + +Vector4.__mul = function(va, d) + return Vector4.New(va.x * d, va.y * d, va.z * d, va.w * d) +end + +Vector4.__add = function(va, vb) + return Vector4.New(va.x + vb.x, va.y + vb.y, va.z + vb.z, va.w + vb.w) +end + +Vector4.__sub = function(va, vb) + return Vector4.New(va.x - vb.x, va.y - vb.y, va.z - vb.z, va.w - vb.w) +end + +Vector4.__unm = function(va) + return Vector4.New(-va.x, -va.y, -va.z, -va.w) +end + +Vector4.__eq = function(va,vb) + local v = va - vb + local delta = Vector4.SqrMagnitude(v) + return delta < 1e-10 +end + +get.zero = function() return Vector4.New(0, 0, 0, 0) end +get.one = function() return Vector4.New(1, 1, 1, 1) end + +get.magnitude = Vector4.Magnitude +get.normalized = Vector4.Normalize +get.sqrMagnitude = Vector4.SqrMagnitude + +UnityEngine.Vector4 = Vector4 +setmetatable(Vector4, Vector4) +return Vector4 \ No newline at end of file diff --git a/lua_probject/tolua_project/cjson/util.lua b/lua_probject/tolua_project/cjson/util.lua new file mode 100644 index 00000000..6916dad0 --- /dev/null +++ b/lua_probject/tolua_project/cjson/util.lua @@ -0,0 +1,271 @@ +local json = require "cjson" + +-- Various common routines used by the Lua CJSON package +-- +-- Mark Pulford + +-- Determine with a Lua table can be treated as an array. +-- Explicitly returns "not an array" for very sparse arrays. +-- Returns: +-- -1 Not an array +-- 0 Empty table +-- >0 Highest index in the array +local function is_array(table) + local max = 0 + local count = 0 + for k, v in pairs(table) do + if type(k) == "number" then + if k > max then max = k end + count = count + 1 + else + return -1 + end + end + if max > count * 2 then + return -1 + end + + return max +end + +local serialise_value + +local function serialise_table(value, indent, depth) + local spacing, spacing2, indent2 + if indent then + spacing = "\n" .. indent + spacing2 = spacing .. " " + indent2 = indent .. " " + else + spacing, spacing2, indent2 = " ", " ", false + end + depth = depth + 1 + if depth > 50 then + return "Cannot serialise any further: too many nested tables" + end + + local max = is_array(value) + + local comma = false + local fragment = { "{" .. spacing2 } + if max > 0 then + -- Serialise array + for i = 1, max do + if comma then + table.insert(fragment, "," .. spacing2) + end + table.insert(fragment, serialise_value(value[i], indent2, depth)) + comma = true + end + elseif max < 0 then + -- Serialise table + for k, v in pairs(value) do + if comma then + table.insert(fragment, "," .. spacing2) + end + table.insert(fragment, + ("[%s] = %s"):format(serialise_value(k, indent2, depth), + serialise_value(v, indent2, depth))) + comma = true + end + end + table.insert(fragment, spacing .. "}") + + return table.concat(fragment) +end + +function serialise_value(value, indent, depth) + if indent == nil then indent = "" end + if depth == nil then depth = 0 end + + if value == json.null then + return "json.null" + elseif type(value) == "string" then + return ("%q"):format(value) + elseif type(value) == "nil" or type(value) == "number" or + type(value) == "boolean" then + return tostring(value) + elseif type(value) == "table" then + return serialise_table(value, indent, depth) + else + return "\"<" .. type(value) .. ">\"" + end +end + +local function file_load(filename) + local file + if filename == nil then + file = io.stdin + else + local err + file, err = io.open(filename, "rb") + if file == nil then + error(("Unable to read '%s': %s"):format(filename, err)) + end + end + local data = file:read("*a") + + if filename ~= nil then + file:close() + end + + if data == nil then + error("Failed to read " .. filename) + end + + return data +end + +local function file_save(filename, data) + local file + if filename == nil then + file = io.stdout + else + local err + file, err = io.open(filename, "wb") + if file == nil then + error(("Unable to write '%s': %s"):format(filename, err)) + end + end + file:write(data) + if filename ~= nil then + file:close() + end +end + +local function compare_values(val1, val2) + local type1 = type(val1) + local type2 = type(val2) + if type1 ~= type2 then + return false + end + + -- Check for NaN + if type1 == "number" and val1 ~= val1 and val2 ~= val2 then + return true + end + + if type1 ~= "table" then + return val1 == val2 + end + + -- check_keys stores all the keys that must be checked in val2 + local check_keys = {} + for k, _ in pairs(val1) do + check_keys[k] = true + end + + for k, v in pairs(val2) do + if not check_keys[k] then + return false + end + + if not compare_values(val1[k], val2[k]) then + return false + end + + check_keys[k] = nil + end + for k, _ in pairs(check_keys) do + -- Not the same if any keys from val1 were not found in val2 + return false + end + return true +end + +local test_count_pass = 0 +local test_count_total = 0 + +local function run_test_summary() + return test_count_pass, test_count_total +end + +local function run_test(testname, func, input, should_work, output) + local function status_line(name, status, value) + local statusmap = { [true] = ":success", [false] = ":error" } + if status ~= nil then + name = name .. statusmap[status] + end + print(("[%s] %s"):format(name, serialise_value(value, false))) + end + + local result = { pcall(func, unpack(input)) } + local success = table.remove(result, 1) + + local correct = false + if success == should_work and compare_values(result, output) then + correct = true + test_count_pass = test_count_pass + 1 + end + test_count_total = test_count_total + 1 + + local teststatus = { [true] = "PASS", [false] = "FAIL" } + print(("==> Test [%d] %s: %s"):format(test_count_total, testname, + teststatus[correct])) + + status_line("Input", nil, input) + if not correct then + status_line("Expected", should_work, output) + end + status_line("Received", success, result) + print() + + return correct, result +end + +local function run_test_group(tests) + local function run_helper(name, func, input) + if type(name) == "string" and #name > 0 then + print("==> " .. name) + end + -- Not a protected call, these functions should never generate errors. + func(unpack(input or {})) + print() + end + + for _, v in ipairs(tests) do + -- Run the helper if "should_work" is missing + if v[4] == nil then + run_helper(unpack(v)) + else + run_test(unpack(v)) + end + end +end + +-- Run a Lua script in a separate environment +local function run_script(script, env) + local env = env or {} + local func + + -- Use setfenv() if it exists, otherwise assume Lua 5.2 load() exists + if _G.setfenv then + func = loadstring(script) + if func then + setfenv(func, env) + end + else + func = load(script, nil, nil, env) + end + + if func == nil then + error("Invalid syntax.") + end + func() + + return env +end + +-- Export functions +return { + serialise_value = serialise_value, + file_load = file_load, + file_save = file_save, + compare_values = compare_values, + run_test_summary = run_test_summary, + run_test = run_test, + run_test_group = run_test_group, + run_script = run_script +} + +-- vi:ai et sw=4 ts=4: diff --git a/lua_probject/tolua_project/event.lua b/lua_probject/tolua_project/event.lua new file mode 100644 index 00000000..fb3db8a0 --- /dev/null +++ b/lua_probject/tolua_project/event.lua @@ -0,0 +1,222 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- + +local setmetatable = setmetatable +local xpcall = xpcall +local pcall = pcall +local assert = assert +local rawget = rawget +local error = error +local print = print +local maxn = table.maxn +local traceback = tolua.traceback +local ilist = ilist + +local _xpcall = {} + +_xpcall.__call = function(self, ...) + if jit then + if nil == self.obj then + return xpcall(self.func, traceback, ...) + else + return xpcall(self.func, traceback, self.obj, ...) + end + else + local args = {...} + + if nil == self.obj then + local func = function() self.func(unpack(args, 1, maxn(args))) end + return xpcall(func, traceback) + else + local func = function() self.func(self.obj, unpack(args, 1, maxn(args))) end + return xpcall(func, traceback) + end + end +end + +_xpcall.__eq = function(lhs, rhs) + return lhs.func == rhs.func and lhs.obj == rhs.obj +end + +local function xfunctor(func, obj) + return setmetatable({func = func, obj = obj}, _xpcall) +end + +local _pcall = {} + +_pcall.__call = function(self, ...) + if nil == self.obj then + return pcall(self.func, ...) + else + return pcall(self.func, self.obj, ...) + end +end + +_pcall.__eq = function(lhs, rhs) + return lhs.func == rhs.func and lhs.obj == rhs.obj +end + +local function functor(func, obj) + return setmetatable({func = func, obj = obj}, _pcall) +end + +local _event = {} +_event.__index = _event + +--废弃 +function _event:Add(func, obj) + assert(func) + + if self.keepSafe then + func = xfunctor(func, obj) + else + func = functor(func, obj) + end + + if self.lock then + local node = {value = func, _prev = 0, _next = 0, removed = true} + table.insert(self.opList, function() self.list:pushnode(node) end) + return node + else + return self.list:push(func) + end +end + +--废弃 +function _event:Remove(func, obj) + for i, v in ilist(self.list) do + if v.func == func and v.obj == obj then + if self.lock then + table.insert(self.opList, function() self.list:remove(i) end) + else + self.list:remove(i) + end + break + end + end +end + +function _event:CreateListener(func, obj) + if self.keepSafe then + func = xfunctor(func, obj) + else + func = functor(func, obj) + end + + return {value = func, _prev = 0, _next = 0, removed = true} +end + +function _event:AddListener(handle) + assert(handle) + + if self.lock then + table.insert(self.opList, function() self.list:pushnode(handle) end) + else + self.list:pushnode(handle) + end +end + +function _event:RemoveListener(handle) + assert(handle) + + if self.lock then + table.insert(self.opList, function() self.list:remove(handle) end) + else + self.list:remove(handle) + end +end + +function _event:Count() + return self.list.length +end + +function _event:Clear() + self.list:clear() + self.opList = {} + self.lock = false + self.keepSafe = false + self.current = nil +end + +function _event:Dump() + local count = 0 + + for _, v in ilist(self.list) do + if v.obj then + print("update function:", v.func, "object name:", v.obj.name) + else + print("update function: ", v.func) + end + + count = count + 1 + end + + print("all function is:", count) +end + +_event.__call = function(self, ...) + local _list = self.list + self.lock = true + local ilist = ilist + + for i, f in ilist(_list) do + self.current = i + local flag, msg = f(...) + + if not flag then + _list:remove(i) + self.lock = false + error(msg) + end + end + + local opList = self.opList + self.lock = false + + for i, op in ipairs(opList) do + op() + opList[i] = nil + end +end + +function event(name, safe) + safe = safe or false + return setmetatable({name = name, keepSafe = safe, lock = false, opList = {}, list = list:new()}, _event) +end + +UpdateBeat = event("Update", true) +LateUpdateBeat = event("LateUpdate", true) +FixedUpdateBeat = event("FixedUpdate", true) +CoUpdateBeat = event("CoUpdate") --只在协同使用 + +local Time = Time +local UpdateBeat = UpdateBeat +local LateUpdateBeat = LateUpdateBeat +local FixedUpdateBeat = FixedUpdateBeat +local CoUpdateBeat = CoUpdateBeat + +--逻辑update +function Update(deltaTime, unscaledDeltaTime) + Time:SetDeltaTime(deltaTime, unscaledDeltaTime) + UpdateBeat() +end + +function LateUpdate() + LateUpdateBeat() + CoUpdateBeat() + Time:SetFrameCount() +end + +--物理update +function FixedUpdate(fixedDeltaTime) + Time:SetFixedDelta(fixedDeltaTime) + FixedUpdateBeat() +end + +function PrintEvents() + UpdateBeat:Dump() + FixedUpdateBeat:Dump() +end \ No newline at end of file diff --git a/lua_probject/tolua_project/jit/bc.lua b/lua_probject/tolua_project/jit/bc.lua new file mode 100644 index 00000000..193cf01f --- /dev/null +++ b/lua_probject/tolua_project/jit/bc.lua @@ -0,0 +1,190 @@ +---------------------------------------------------------------------------- +-- LuaJIT bytecode listing module. +-- +-- Copyright (C) 2005-2017 Mike Pall. All rights reserved. +-- Released under the MIT license. See Copyright Notice in luajit.h +---------------------------------------------------------------------------- +-- +-- This module lists the bytecode of a Lua function. If it's loaded by -jbc +-- it hooks into the parser and lists all functions of a chunk as they +-- are parsed. +-- +-- Example usage: +-- +-- luajit -jbc -e 'local x=0; for i=1,1e6 do x=x+i end; print(x)' +-- luajit -jbc=- foo.lua +-- luajit -jbc=foo.list foo.lua +-- +-- Default output is to stderr. To redirect the output to a file, pass a +-- filename as an argument (use '-' for stdout) or set the environment +-- variable LUAJIT_LISTFILE. The file is overwritten every time the module +-- is started. +-- +-- This module can also be used programmatically: +-- +-- local bc = require("jit.bc") +-- +-- local function foo() print("hello") end +-- +-- bc.dump(foo) --> -- BYTECODE -- [...] +-- print(bc.line(foo, 2)) --> 0002 KSTR 1 1 ; "hello" +-- +-- local out = { +-- -- Do something with each line: +-- write = function(t, ...) io.write(...) end, +-- close = function(t) end, +-- flush = function(t) end, +-- } +-- bc.dump(foo, out) +-- +------------------------------------------------------------------------------ + +-- Cache some library functions and objects. +local jit = require("jit") +assert(jit.version_num == 20100, "LuaJIT core/library version mismatch") +local jutil = require("jit.util") +local vmdef = require("jit.vmdef") +local bit = require("bit") +local sub, gsub, format = string.sub, string.gsub, string.format +local byte, band, shr = string.byte, bit.band, bit.rshift +local funcinfo, funcbc, funck = jutil.funcinfo, jutil.funcbc, jutil.funck +local funcuvname = jutil.funcuvname +local bcnames = vmdef.bcnames +local stdout, stderr = io.stdout, io.stderr + +------------------------------------------------------------------------------ + +local function ctlsub(c) + if c == "\n" then return "\\n" + elseif c == "\r" then return "\\r" + elseif c == "\t" then return "\\t" + else return format("\\%03d", byte(c)) + end +end + +-- Return one bytecode line. +local function bcline(func, pc, prefix) + local ins, m = funcbc(func, pc) + if not ins then return end + local ma, mb, mc = band(m, 7), band(m, 15*8), band(m, 15*128) + local a = band(shr(ins, 8), 0xff) + local oidx = 6*band(ins, 0xff) + local op = sub(bcnames, oidx+1, oidx+6) + local s = format("%04d %s %-6s %3s ", + pc, prefix or " ", op, ma == 0 and "" or a) + local d = shr(ins, 16) + if mc == 13*128 then -- BCMjump + return format("%s=> %04d\n", s, pc+d-0x7fff) + end + if mb ~= 0 then + d = band(d, 0xff) + elseif mc == 0 then + return s.."\n" + end + local kc + if mc == 10*128 then -- BCMstr + kc = funck(func, -d-1) + kc = format(#kc > 40 and '"%.40s"~' or '"%s"', gsub(kc, "%c", ctlsub)) + elseif mc == 9*128 then -- BCMnum + kc = funck(func, d) + if op == "TSETM " then kc = kc - 2^52 end + elseif mc == 12*128 then -- BCMfunc + local fi = funcinfo(funck(func, -d-1)) + if fi.ffid then + kc = vmdef.ffnames[fi.ffid] + else + kc = fi.loc + end + elseif mc == 5*128 then -- BCMuv + kc = funcuvname(func, d) + end + if ma == 5 then -- BCMuv + local ka = funcuvname(func, a) + if kc then kc = ka.." ; "..kc else kc = ka end + end + if mb ~= 0 then + local b = shr(ins, 24) + if kc then return format("%s%3d %3d ; %s\n", s, b, d, kc) end + return format("%s%3d %3d\n", s, b, d) + end + if kc then return format("%s%3d ; %s\n", s, d, kc) end + if mc == 7*128 and d > 32767 then d = d - 65536 end -- BCMlits + return format("%s%3d\n", s, d) +end + +-- Collect branch targets of a function. +local function bctargets(func) + local target = {} + for pc=1,1000000000 do + local ins, m = funcbc(func, pc) + if not ins then break end + if band(m, 15*128) == 13*128 then target[pc+shr(ins, 16)-0x7fff] = true end + end + return target +end + +-- Dump bytecode instructions of a function. +local function bcdump(func, out, all) + if not out then out = stdout end + local fi = funcinfo(func) + if all and fi.children then + for n=-1,-1000000000,-1 do + local k = funck(func, n) + if not k then break end + if type(k) == "proto" then bcdump(k, out, true) end + end + end + out:write(format("-- BYTECODE -- %s-%d\n", fi.loc, fi.lastlinedefined)) + local target = bctargets(func) + for pc=1,1000000000 do + local s = bcline(func, pc, target[pc] and "=>") + if not s then break end + out:write(s) + end + out:write("\n") + out:flush() +end + +------------------------------------------------------------------------------ + +-- Active flag and output file handle. +local active, out + +-- List handler. +local function h_list(func) + return bcdump(func, out) +end + +-- Detach list handler. +local function bclistoff() + if active then + active = false + jit.attach(h_list) + if out and out ~= stdout and out ~= stderr then out:close() end + out = nil + end +end + +-- Open the output file and attach list handler. +local function bcliston(outfile) + if active then bclistoff() end + if not outfile then outfile = os.getenv("LUAJIT_LISTFILE") end + if outfile then + out = outfile == "-" and stdout or assert(io.open(outfile, "w")) + else + out = stderr + end + jit.attach(h_list, "bc") + active = true +end + +-- Public module functions. +return { + line = bcline, + dump = bcdump, + targets = bctargets, + on = bcliston, + off = bclistoff, + start = bcliston -- For -j command line option. +} + diff --git a/lua_probject/tolua_project/jit/bcsave.lua b/lua_probject/tolua_project/jit/bcsave.lua new file mode 100644 index 00000000..c17c88e0 --- /dev/null +++ b/lua_probject/tolua_project/jit/bcsave.lua @@ -0,0 +1,661 @@ +---------------------------------------------------------------------------- +-- LuaJIT module to save/list bytecode. +-- +-- Copyright (C) 2005-2017 Mike Pall. All rights reserved. +-- Released under the MIT license. See Copyright Notice in luajit.h +---------------------------------------------------------------------------- +-- +-- This module saves or lists the bytecode for an input file. +-- It's run by the -b command line option. +-- +------------------------------------------------------------------------------ + +local jit = require("jit") +assert(jit.version_num == 20100, "LuaJIT core/library version mismatch") +local bit = require("bit") + +-- Symbol name prefix for LuaJIT bytecode. +local LJBC_PREFIX = "luaJIT_BC_" + +------------------------------------------------------------------------------ + +local function usage() + io.stderr:write[[ +Save LuaJIT bytecode: luajit -b[options] input output + -l Only list bytecode. + -s Strip debug info (default). + -g Keep debug info. + -n name Set module name (default: auto-detect from input name). + -t type Set output file type (default: auto-detect from output name). + -a arch Override architecture for object files (default: native). + -o os Override OS for object files (default: native). + -e chunk Use chunk string as input. + -- Stop handling options. + - Use stdin as input and/or stdout as output. + +File types: c h obj o raw (default) +]] + os.exit(1) +end + +local function check(ok, ...) + if ok then return ok, ... end + io.stderr:write("luajit: ", ...) + io.stderr:write("\n") + os.exit(1) +end + +local function readfile(input) + if type(input) == "function" then return input end + if input == "-" then input = nil end + return check(loadfile(input)) +end + +local function savefile(name, mode) + if name == "-" then return io.stdout end + return check(io.open(name, mode)) +end + +------------------------------------------------------------------------------ + +local map_type = { + raw = "raw", c = "c", h = "h", o = "obj", obj = "obj", +} + +local map_arch = { + x86 = true, x64 = true, arm = true, arm64 = true, arm64be = true, + ppc = true, mips = true, mipsel = true, +} + +local map_os = { + linux = true, windows = true, osx = true, freebsd = true, netbsd = true, + openbsd = true, dragonfly = true, solaris = true, +} + +local function checkarg(str, map, err) + str = string.lower(str) + local s = check(map[str], "unknown ", err) + return s == true and str or s +end + +local function detecttype(str) + local ext = string.match(string.lower(str), "%.(%a+)$") + return map_type[ext] or "raw" +end + +local function checkmodname(str) + check(string.match(str, "^[%w_.%-]+$"), "bad module name") + return string.gsub(str, "[%.%-]", "_") +end + +local function detectmodname(str) + if type(str) == "string" then + local tail = string.match(str, "[^/\\]+$") + if tail then str = tail end + local head = string.match(str, "^(.*)%.[^.]*$") + if head then str = head end + str = string.match(str, "^[%w_.%-]+") + else + str = nil + end + check(str, "cannot derive module name, use -n name") + return string.gsub(str, "[%.%-]", "_") +end + +------------------------------------------------------------------------------ + +local function bcsave_tail(fp, output, s) + local ok, err = fp:write(s) + if ok and output ~= "-" then ok, err = fp:close() end + check(ok, "cannot write ", output, ": ", err) +end + +local function bcsave_raw(output, s) + local fp = savefile(output, "wb") + bcsave_tail(fp, output, s) +end + +local function bcsave_c(ctx, output, s) + local fp = savefile(output, "w") + if ctx.type == "c" then + fp:write(string.format([[ +#ifdef _cplusplus +extern "C" +#endif +#ifdef _WIN32 +__declspec(dllexport) +#endif +const unsigned char %s%s[] = { +]], LJBC_PREFIX, ctx.modname)) + else + fp:write(string.format([[ +#define %s%s_SIZE %d +static const unsigned char %s%s[] = { +]], LJBC_PREFIX, ctx.modname, #s, LJBC_PREFIX, ctx.modname)) + end + local t, n, m = {}, 0, 0 + for i=1,#s do + local b = tostring(string.byte(s, i)) + m = m + #b + 1 + if m > 78 then + fp:write(table.concat(t, ",", 1, n), ",\n") + n, m = 0, #b + 1 + end + n = n + 1 + t[n] = b + end + bcsave_tail(fp, output, table.concat(t, ",", 1, n).."\n};\n") +end + +local function bcsave_elfobj(ctx, output, s, ffi) + ffi.cdef[[ +typedef struct { + uint8_t emagic[4], eclass, eendian, eversion, eosabi, eabiversion, epad[7]; + uint16_t type, machine; + uint32_t version; + uint32_t entry, phofs, shofs; + uint32_t flags; + uint16_t ehsize, phentsize, phnum, shentsize, shnum, shstridx; +} ELF32header; +typedef struct { + uint8_t emagic[4], eclass, eendian, eversion, eosabi, eabiversion, epad[7]; + uint16_t type, machine; + uint32_t version; + uint64_t entry, phofs, shofs; + uint32_t flags; + uint16_t ehsize, phentsize, phnum, shentsize, shnum, shstridx; +} ELF64header; +typedef struct { + uint32_t name, type, flags, addr, ofs, size, link, info, align, entsize; +} ELF32sectheader; +typedef struct { + uint32_t name, type; + uint64_t flags, addr, ofs, size; + uint32_t link, info; + uint64_t align, entsize; +} ELF64sectheader; +typedef struct { + uint32_t name, value, size; + uint8_t info, other; + uint16_t sectidx; +} ELF32symbol; +typedef struct { + uint32_t name; + uint8_t info, other; + uint16_t sectidx; + uint64_t value, size; +} ELF64symbol; +typedef struct { + ELF32header hdr; + ELF32sectheader sect[6]; + ELF32symbol sym[2]; + uint8_t space[4096]; +} ELF32obj; +typedef struct { + ELF64header hdr; + ELF64sectheader sect[6]; + ELF64symbol sym[2]; + uint8_t space[4096]; +} ELF64obj; +]] + local symname = LJBC_PREFIX..ctx.modname + local is64, isbe = false, false + if ctx.arch == "x64" or ctx.arch == "arm64" or ctx.arch == "arm64be" then + is64 = true + elseif ctx.arch == "ppc" or ctx.arch == "mips" then + isbe = true + end + + -- Handle different host/target endianess. + local function f32(x) return x end + local f16, fofs = f32, f32 + if ffi.abi("be") ~= isbe then + f32 = bit.bswap + function f16(x) return bit.rshift(bit.bswap(x), 16) end + if is64 then + local two32 = ffi.cast("int64_t", 2^32) + function fofs(x) return bit.bswap(x)*two32 end + else + fofs = f32 + end + end + + -- Create ELF object and fill in header. + local o = ffi.new(is64 and "ELF64obj" or "ELF32obj") + local hdr = o.hdr + if ctx.os == "bsd" or ctx.os == "other" then -- Determine native hdr.eosabi. + local bf = assert(io.open("/bin/ls", "rb")) + local bs = bf:read(9) + bf:close() + ffi.copy(o, bs, 9) + check(hdr.emagic[0] == 127, "no support for writing native object files") + else + hdr.emagic = "\127ELF" + hdr.eosabi = ({ freebsd=9, netbsd=2, openbsd=12, solaris=6 })[ctx.os] or 0 + end + hdr.eclass = is64 and 2 or 1 + hdr.eendian = isbe and 2 or 1 + hdr.eversion = 1 + hdr.type = f16(1) + hdr.machine = f16(({ x86=3, x64=62, arm=40, arm64=183, arm64be=183, ppc=20, mips=8, mipsel=8 })[ctx.arch]) + if ctx.arch == "mips" or ctx.arch == "mipsel" then + hdr.flags = f32(0x50001006) + end + hdr.version = f32(1) + hdr.shofs = fofs(ffi.offsetof(o, "sect")) + hdr.ehsize = f16(ffi.sizeof(hdr)) + hdr.shentsize = f16(ffi.sizeof(o.sect[0])) + hdr.shnum = f16(6) + hdr.shstridx = f16(2) + + -- Fill in sections and symbols. + local sofs, ofs = ffi.offsetof(o, "space"), 1 + for i,name in ipairs{ + ".symtab", ".shstrtab", ".strtab", ".rodata", ".note.GNU-stack", + } do + local sect = o.sect[i] + sect.align = fofs(1) + sect.name = f32(ofs) + ffi.copy(o.space+ofs, name) + ofs = ofs + #name+1 + end + o.sect[1].type = f32(2) -- .symtab + o.sect[1].link = f32(3) + o.sect[1].info = f32(1) + o.sect[1].align = fofs(8) + o.sect[1].ofs = fofs(ffi.offsetof(o, "sym")) + o.sect[1].entsize = fofs(ffi.sizeof(o.sym[0])) + o.sect[1].size = fofs(ffi.sizeof(o.sym)) + o.sym[1].name = f32(1) + o.sym[1].sectidx = f16(4) + o.sym[1].size = fofs(#s) + o.sym[1].info = 17 + o.sect[2].type = f32(3) -- .shstrtab + o.sect[2].ofs = fofs(sofs) + o.sect[2].size = fofs(ofs) + o.sect[3].type = f32(3) -- .strtab + o.sect[3].ofs = fofs(sofs + ofs) + o.sect[3].size = fofs(#symname+1) + ffi.copy(o.space+ofs+1, symname) + ofs = ofs + #symname + 2 + o.sect[4].type = f32(1) -- .rodata + o.sect[4].flags = fofs(2) + o.sect[4].ofs = fofs(sofs + ofs) + o.sect[4].size = fofs(#s) + o.sect[5].type = f32(1) -- .note.GNU-stack + o.sect[5].ofs = fofs(sofs + ofs + #s) + + -- Write ELF object file. + local fp = savefile(output, "wb") + fp:write(ffi.string(o, ffi.sizeof(o)-4096+ofs)) + bcsave_tail(fp, output, s) +end + +local function bcsave_peobj(ctx, output, s, ffi) + ffi.cdef[[ +typedef struct { + uint16_t arch, nsects; + uint32_t time, symtabofs, nsyms; + uint16_t opthdrsz, flags; +} PEheader; +typedef struct { + char name[8]; + uint32_t vsize, vaddr, size, ofs, relocofs, lineofs; + uint16_t nreloc, nline; + uint32_t flags; +} PEsection; +typedef struct __attribute((packed)) { + union { + char name[8]; + uint32_t nameref[2]; + }; + uint32_t value; + int16_t sect; + uint16_t type; + uint8_t scl, naux; +} PEsym; +typedef struct __attribute((packed)) { + uint32_t size; + uint16_t nreloc, nline; + uint32_t cksum; + uint16_t assoc; + uint8_t comdatsel, unused[3]; +} PEsymaux; +typedef struct { + PEheader hdr; + PEsection sect[2]; + // Must be an even number of symbol structs. + PEsym sym0; + PEsymaux sym0aux; + PEsym sym1; + PEsymaux sym1aux; + PEsym sym2; + PEsym sym3; + uint32_t strtabsize; + uint8_t space[4096]; +} PEobj; +]] + local symname = LJBC_PREFIX..ctx.modname + local is64 = false + if ctx.arch == "x86" then + symname = "_"..symname + elseif ctx.arch == "x64" then + is64 = true + end + local symexport = " /EXPORT:"..symname..",DATA " + + -- The file format is always little-endian. Swap if the host is big-endian. + local function f32(x) return x end + local f16 = f32 + if ffi.abi("be") then + f32 = bit.bswap + function f16(x) return bit.rshift(bit.bswap(x), 16) end + end + + -- Create PE object and fill in header. + local o = ffi.new("PEobj") + local hdr = o.hdr + hdr.arch = f16(({ x86=0x14c, x64=0x8664, arm=0x1c0, ppc=0x1f2, mips=0x366, mipsel=0x366 })[ctx.arch]) + hdr.nsects = f16(2) + hdr.symtabofs = f32(ffi.offsetof(o, "sym0")) + hdr.nsyms = f32(6) + + -- Fill in sections and symbols. + o.sect[0].name = ".drectve" + o.sect[0].size = f32(#symexport) + o.sect[0].flags = f32(0x00100a00) + o.sym0.sect = f16(1) + o.sym0.scl = 3 + o.sym0.name = ".drectve" + o.sym0.naux = 1 + o.sym0aux.size = f32(#symexport) + o.sect[1].name = ".rdata" + o.sect[1].size = f32(#s) + o.sect[1].flags = f32(0x40300040) + o.sym1.sect = f16(2) + o.sym1.scl = 3 + o.sym1.name = ".rdata" + o.sym1.naux = 1 + o.sym1aux.size = f32(#s) + o.sym2.sect = f16(2) + o.sym2.scl = 2 + o.sym2.nameref[1] = f32(4) + o.sym3.sect = f16(-1) + o.sym3.scl = 2 + o.sym3.value = f32(1) + o.sym3.name = "@feat.00" -- Mark as SafeSEH compliant. + ffi.copy(o.space, symname) + local ofs = #symname + 1 + o.strtabsize = f32(ofs + 4) + o.sect[0].ofs = f32(ffi.offsetof(o, "space") + ofs) + ffi.copy(o.space + ofs, symexport) + ofs = ofs + #symexport + o.sect[1].ofs = f32(ffi.offsetof(o, "space") + ofs) + + -- Write PE object file. + local fp = savefile(output, "wb") + fp:write(ffi.string(o, ffi.sizeof(o)-4096+ofs)) + bcsave_tail(fp, output, s) +end + +local function bcsave_machobj(ctx, output, s, ffi) + ffi.cdef[[ +typedef struct +{ + uint32_t magic, cputype, cpusubtype, filetype, ncmds, sizeofcmds, flags; +} mach_header; +typedef struct +{ + mach_header; uint32_t reserved; +} mach_header_64; +typedef struct { + uint32_t cmd, cmdsize; + char segname[16]; + uint32_t vmaddr, vmsize, fileoff, filesize; + uint32_t maxprot, initprot, nsects, flags; +} mach_segment_command; +typedef struct { + uint32_t cmd, cmdsize; + char segname[16]; + uint64_t vmaddr, vmsize, fileoff, filesize; + uint32_t maxprot, initprot, nsects, flags; +} mach_segment_command_64; +typedef struct { + char sectname[16], segname[16]; + uint32_t addr, size; + uint32_t offset, align, reloff, nreloc, flags; + uint32_t reserved1, reserved2; +} mach_section; +typedef struct { + char sectname[16], segname[16]; + uint64_t addr, size; + uint32_t offset, align, reloff, nreloc, flags; + uint32_t reserved1, reserved2, reserved3; +} mach_section_64; +typedef struct { + uint32_t cmd, cmdsize, symoff, nsyms, stroff, strsize; +} mach_symtab_command; +typedef struct { + int32_t strx; + uint8_t type, sect; + int16_t desc; + uint32_t value; +} mach_nlist; +typedef struct { + uint32_t strx; + uint8_t type, sect; + uint16_t desc; + uint64_t value; +} mach_nlist_64; +typedef struct +{ + uint32_t magic, nfat_arch; +} mach_fat_header; +typedef struct +{ + uint32_t cputype, cpusubtype, offset, size, align; +} mach_fat_arch; +typedef struct { + struct { + mach_header hdr; + mach_segment_command seg; + mach_section sec; + mach_symtab_command sym; + } arch[1]; + mach_nlist sym_entry; + uint8_t space[4096]; +} mach_obj; +typedef struct { + struct { + mach_header_64 hdr; + mach_segment_command_64 seg; + mach_section_64 sec; + mach_symtab_command sym; + } arch[1]; + mach_nlist_64 sym_entry; + uint8_t space[4096]; +} mach_obj_64; +typedef struct { + mach_fat_header fat; + mach_fat_arch fat_arch[2]; + struct { + mach_header hdr; + mach_segment_command seg; + mach_section sec; + mach_symtab_command sym; + } arch[2]; + mach_nlist sym_entry; + uint8_t space[4096]; +} mach_fat_obj; +]] + local symname = '_'..LJBC_PREFIX..ctx.modname + local isfat, is64, align, mobj = false, false, 4, "mach_obj" + if ctx.arch == "x64" then + is64, align, mobj = true, 8, "mach_obj_64" + elseif ctx.arch == "arm" then + isfat, mobj = true, "mach_fat_obj" + elseif ctx.arch == "arm64" then + is64, align, isfat, mobj = true, 8, true, "mach_fat_obj" + else + check(ctx.arch == "x86", "unsupported architecture for OSX") + end + local function aligned(v, a) return bit.band(v+a-1, -a) end + local be32 = bit.bswap -- Mach-O FAT is BE, supported archs are LE. + + -- Create Mach-O object and fill in header. + local o = ffi.new(mobj) + local mach_size = aligned(ffi.offsetof(o, "space")+#symname+2, align) + local cputype = ({ x86={7}, x64={0x01000007}, arm={7,12}, arm64={0x01000007,0x0100000c} })[ctx.arch] + local cpusubtype = ({ x86={3}, x64={3}, arm={3,9}, arm64={3,0} })[ctx.arch] + if isfat then + o.fat.magic = be32(0xcafebabe) + o.fat.nfat_arch = be32(#cpusubtype) + end + + -- Fill in sections and symbols. + for i=0,#cpusubtype-1 do + local ofs = 0 + if isfat then + local a = o.fat_arch[i] + a.cputype = be32(cputype[i+1]) + a.cpusubtype = be32(cpusubtype[i+1]) + -- Subsequent slices overlap each other to share data. + ofs = ffi.offsetof(o, "arch") + i*ffi.sizeof(o.arch[0]) + a.offset = be32(ofs) + a.size = be32(mach_size-ofs+#s) + end + local a = o.arch[i] + a.hdr.magic = is64 and 0xfeedfacf or 0xfeedface + a.hdr.cputype = cputype[i+1] + a.hdr.cpusubtype = cpusubtype[i+1] + a.hdr.filetype = 1 + a.hdr.ncmds = 2 + a.hdr.sizeofcmds = ffi.sizeof(a.seg)+ffi.sizeof(a.sec)+ffi.sizeof(a.sym) + a.seg.cmd = is64 and 0x19 or 0x1 + a.seg.cmdsize = ffi.sizeof(a.seg)+ffi.sizeof(a.sec) + a.seg.vmsize = #s + a.seg.fileoff = mach_size-ofs + a.seg.filesize = #s + a.seg.maxprot = 1 + a.seg.initprot = 1 + a.seg.nsects = 1 + ffi.copy(a.sec.sectname, "__data") + ffi.copy(a.sec.segname, "__DATA") + a.sec.size = #s + a.sec.offset = mach_size-ofs + a.sym.cmd = 2 + a.sym.cmdsize = ffi.sizeof(a.sym) + a.sym.symoff = ffi.offsetof(o, "sym_entry")-ofs + a.sym.nsyms = 1 + a.sym.stroff = ffi.offsetof(o, "sym_entry")+ffi.sizeof(o.sym_entry)-ofs + a.sym.strsize = aligned(#symname+2, align) + end + o.sym_entry.type = 0xf + o.sym_entry.sect = 1 + o.sym_entry.strx = 1 + ffi.copy(o.space+1, symname) + + -- Write Macho-O object file. + local fp = savefile(output, "wb") + fp:write(ffi.string(o, mach_size)) + bcsave_tail(fp, output, s) +end + +local function bcsave_obj(ctx, output, s) + local ok, ffi = pcall(require, "ffi") + check(ok, "FFI library required to write this file type") + if ctx.os == "windows" then + return bcsave_peobj(ctx, output, s, ffi) + elseif ctx.os == "osx" then + return bcsave_machobj(ctx, output, s, ffi) + else + return bcsave_elfobj(ctx, output, s, ffi) + end +end + +------------------------------------------------------------------------------ + +local function bclist(input, output) + local f = readfile(input) + require("jit.bc").dump(f, savefile(output, "w"), true) +end + +local function bcsave(ctx, input, output) + local f = readfile(input) + local s = string.dump(f, ctx.strip) + local t = ctx.type + if not t then + t = detecttype(output) + ctx.type = t + end + if t == "raw" then + bcsave_raw(output, s) + else + if not ctx.modname then ctx.modname = detectmodname(input) end + if t == "obj" then + bcsave_obj(ctx, output, s) + else + bcsave_c(ctx, output, s) + end + end +end + +local function docmd(...) + local arg = {...} + local n = 1 + local list = false + local ctx = { + strip = true, arch = jit.arch, os = string.lower(jit.os), + type = false, modname = false, + } + while n <= #arg do + local a = arg[n] + if type(a) == "string" and string.sub(a, 1, 1) == "-" and a ~= "-" then + table.remove(arg, n) + if a == "--" then break end + for m=2,#a do + local opt = string.sub(a, m, m) + if opt == "l" then + list = true + elseif opt == "s" then + ctx.strip = true + elseif opt == "g" then + ctx.strip = false + else + if arg[n] == nil or m ~= #a then usage() end + if opt == "e" then + if n ~= 1 then usage() end + arg[1] = check(loadstring(arg[1])) + elseif opt == "n" then + ctx.modname = checkmodname(table.remove(arg, n)) + elseif opt == "t" then + ctx.type = checkarg(table.remove(arg, n), map_type, "file type") + elseif opt == "a" then + ctx.arch = checkarg(table.remove(arg, n), map_arch, "architecture") + elseif opt == "o" then + ctx.os = checkarg(table.remove(arg, n), map_os, "OS name") + else + usage() + end + end + end + else + n = n + 1 + end + end + if list then + if #arg == 0 or #arg > 2 then usage() end + bclist(arg[1], arg[2] or "-") + else + if #arg ~= 2 then usage() end + bcsave(ctx, arg[1], arg[2]) + end +end + +------------------------------------------------------------------------------ + +-- Public module functions. +return { + start = docmd -- Process -b command line option. +} + diff --git a/lua_probject/tolua_project/jit/dis_arm.lua b/lua_probject/tolua_project/jit/dis_arm.lua new file mode 100644 index 00000000..c2dd7769 --- /dev/null +++ b/lua_probject/tolua_project/jit/dis_arm.lua @@ -0,0 +1,689 @@ +---------------------------------------------------------------------------- +-- LuaJIT ARM disassembler module. +-- +-- Copyright (C) 2005-2017 Mike Pall. All rights reserved. +-- Released under the MIT license. See Copyright Notice in luajit.h +---------------------------------------------------------------------------- +-- This is a helper module used by the LuaJIT machine code dumper module. +-- +-- It disassembles most user-mode ARMv7 instructions +-- NYI: Advanced SIMD and VFP instructions. +------------------------------------------------------------------------------ + +local type = type +local sub, byte, format = string.sub, string.byte, string.format +local match, gmatch = string.match, string.gmatch +local concat = table.concat +local bit = require("bit") +local band, bor, ror, tohex = bit.band, bit.bor, bit.ror, bit.tohex +local lshift, rshift, arshift = bit.lshift, bit.rshift, bit.arshift + +------------------------------------------------------------------------------ +-- Opcode maps +------------------------------------------------------------------------------ + +local map_loadc = { + shift = 8, mask = 15, + [10] = { + shift = 20, mask = 1, + [0] = { + shift = 23, mask = 3, + [0] = "vmovFmDN", "vstmFNdr", + _ = { + shift = 21, mask = 1, + [0] = "vstrFdl", + { shift = 16, mask = 15, [13] = "vpushFdr", _ = "vstmdbFNdr", } + }, + }, + { + shift = 23, mask = 3, + [0] = "vmovFDNm", + { shift = 16, mask = 15, [13] = "vpopFdr", _ = "vldmFNdr", }, + _ = { + shift = 21, mask = 1, + [0] = "vldrFdl", "vldmdbFNdr", + }, + }, + }, + [11] = { + shift = 20, mask = 1, + [0] = { + shift = 23, mask = 3, + [0] = "vmovGmDN", "vstmGNdr", + _ = { + shift = 21, mask = 1, + [0] = "vstrGdl", + { shift = 16, mask = 15, [13] = "vpushGdr", _ = "vstmdbGNdr", } + }, + }, + { + shift = 23, mask = 3, + [0] = "vmovGDNm", + { shift = 16, mask = 15, [13] = "vpopGdr", _ = "vldmGNdr", }, + _ = { + shift = 21, mask = 1, + [0] = "vldrGdl", "vldmdbGNdr", + }, + }, + }, + _ = { + shift = 0, mask = 0 -- NYI ldc, mcrr, mrrc. + }, +} + +local map_vfps = { + shift = 6, mask = 0x2c001, + [0] = "vmlaF.dnm", "vmlsF.dnm", + [0x04000] = "vnmlsF.dnm", [0x04001] = "vnmlaF.dnm", + [0x08000] = "vmulF.dnm", [0x08001] = "vnmulF.dnm", + [0x0c000] = "vaddF.dnm", [0x0c001] = "vsubF.dnm", + [0x20000] = "vdivF.dnm", + [0x24000] = "vfnmsF.dnm", [0x24001] = "vfnmaF.dnm", + [0x28000] = "vfmaF.dnm", [0x28001] = "vfmsF.dnm", + [0x2c000] = "vmovF.dY", + [0x2c001] = { + shift = 7, mask = 0x1e01, + [0] = "vmovF.dm", "vabsF.dm", + [0x0200] = "vnegF.dm", [0x0201] = "vsqrtF.dm", + [0x0800] = "vcmpF.dm", [0x0801] = "vcmpeF.dm", + [0x0a00] = "vcmpzF.d", [0x0a01] = "vcmpzeF.d", + [0x0e01] = "vcvtG.dF.m", + [0x1000] = "vcvt.f32.u32Fdm", [0x1001] = "vcvt.f32.s32Fdm", + [0x1800] = "vcvtr.u32F.dm", [0x1801] = "vcvt.u32F.dm", + [0x1a00] = "vcvtr.s32F.dm", [0x1a01] = "vcvt.s32F.dm", + }, +} + +local map_vfpd = { + shift = 6, mask = 0x2c001, + [0] = "vmlaG.dnm", "vmlsG.dnm", + [0x04000] = "vnmlsG.dnm", [0x04001] = "vnmlaG.dnm", + [0x08000] = "vmulG.dnm", [0x08001] = "vnmulG.dnm", + [0x0c000] = "vaddG.dnm", [0x0c001] = "vsubG.dnm", + [0x20000] = "vdivG.dnm", + [0x24000] = "vfnmsG.dnm", [0x24001] = "vfnmaG.dnm", + [0x28000] = "vfmaG.dnm", [0x28001] = "vfmsG.dnm", + [0x2c000] = "vmovG.dY", + [0x2c001] = { + shift = 7, mask = 0x1e01, + [0] = "vmovG.dm", "vabsG.dm", + [0x0200] = "vnegG.dm", [0x0201] = "vsqrtG.dm", + [0x0800] = "vcmpG.dm", [0x0801] = "vcmpeG.dm", + [0x0a00] = "vcmpzG.d", [0x0a01] = "vcmpzeG.d", + [0x0e01] = "vcvtF.dG.m", + [0x1000] = "vcvt.f64.u32GdFm", [0x1001] = "vcvt.f64.s32GdFm", + [0x1800] = "vcvtr.u32FdG.m", [0x1801] = "vcvt.u32FdG.m", + [0x1a00] = "vcvtr.s32FdG.m", [0x1a01] = "vcvt.s32FdG.m", + }, +} + +local map_datac = { + shift = 24, mask = 1, + [0] = { + shift = 4, mask = 1, + [0] = { + shift = 8, mask = 15, + [10] = map_vfps, + [11] = map_vfpd, + -- NYI cdp, mcr, mrc. + }, + { + shift = 8, mask = 15, + [10] = { + shift = 20, mask = 15, + [0] = "vmovFnD", "vmovFDn", + [14] = "vmsrD", + [15] = { shift = 12, mask = 15, [15] = "vmrs", _ = "vmrsD", }, + }, + }, + }, + "svcT", +} + +local map_loadcu = { + shift = 0, mask = 0, -- NYI unconditional CP load/store. +} + +local map_datacu = { + shift = 0, mask = 0, -- NYI unconditional CP data. +} + +local map_simddata = { + shift = 0, mask = 0, -- NYI SIMD data. +} + +local map_simdload = { + shift = 0, mask = 0, -- NYI SIMD load/store, preload. +} + +local map_preload = { + shift = 0, mask = 0, -- NYI preload. +} + +local map_media = { + shift = 20, mask = 31, + [0] = false, + { --01 + shift = 5, mask = 7, + [0] = "sadd16DNM", "sasxDNM", "ssaxDNM", "ssub16DNM", + "sadd8DNM", false, false, "ssub8DNM", + }, + { --02 + shift = 5, mask = 7, + [0] = "qadd16DNM", "qasxDNM", "qsaxDNM", "qsub16DNM", + "qadd8DNM", false, false, "qsub8DNM", + }, + { --03 + shift = 5, mask = 7, + [0] = "shadd16DNM", "shasxDNM", "shsaxDNM", "shsub16DNM", + "shadd8DNM", false, false, "shsub8DNM", + }, + false, + { --05 + shift = 5, mask = 7, + [0] = "uadd16DNM", "uasxDNM", "usaxDNM", "usub16DNM", + "uadd8DNM", false, false, "usub8DNM", + }, + { --06 + shift = 5, mask = 7, + [0] = "uqadd16DNM", "uqasxDNM", "uqsaxDNM", "uqsub16DNM", + "uqadd8DNM", false, false, "uqsub8DNM", + }, + { --07 + shift = 5, mask = 7, + [0] = "uhadd16DNM", "uhasxDNM", "uhsaxDNM", "uhsub16DNM", + "uhadd8DNM", false, false, "uhsub8DNM", + }, + { --08 + shift = 5, mask = 7, + [0] = "pkhbtDNMU", false, "pkhtbDNMU", + { shift = 16, mask = 15, [15] = "sxtb16DMU", _ = "sxtab16DNMU", }, + "pkhbtDNMU", "selDNM", "pkhtbDNMU", + }, + false, + { --0a + shift = 5, mask = 7, + [0] = "ssatDxMu", "ssat16DxM", "ssatDxMu", + { shift = 16, mask = 15, [15] = "sxtbDMU", _ = "sxtabDNMU", }, + "ssatDxMu", false, "ssatDxMu", + }, + { --0b + shift = 5, mask = 7, + [0] = "ssatDxMu", "revDM", "ssatDxMu", + { shift = 16, mask = 15, [15] = "sxthDMU", _ = "sxtahDNMU", }, + "ssatDxMu", "rev16DM", "ssatDxMu", + }, + { --0c + shift = 5, mask = 7, + [3] = { shift = 16, mask = 15, [15] = "uxtb16DMU", _ = "uxtab16DNMU", }, + }, + false, + { --0e + shift = 5, mask = 7, + [0] = "usatDwMu", "usat16DwM", "usatDwMu", + { shift = 16, mask = 15, [15] = "uxtbDMU", _ = "uxtabDNMU", }, + "usatDwMu", false, "usatDwMu", + }, + { --0f + shift = 5, mask = 7, + [0] = "usatDwMu", "rbitDM", "usatDwMu", + { shift = 16, mask = 15, [15] = "uxthDMU", _ = "uxtahDNMU", }, + "usatDwMu", "revshDM", "usatDwMu", + }, + { --10 + shift = 12, mask = 15, + [15] = { + shift = 5, mask = 7, + "smuadNMS", "smuadxNMS", "smusdNMS", "smusdxNMS", + }, + _ = { + shift = 5, mask = 7, + [0] = "smladNMSD", "smladxNMSD", "smlsdNMSD", "smlsdxNMSD", + }, + }, + false, false, false, + { --14 + shift = 5, mask = 7, + [0] = "smlaldDNMS", "smlaldxDNMS", "smlsldDNMS", "smlsldxDNMS", + }, + { --15 + shift = 5, mask = 7, + [0] = { shift = 12, mask = 15, [15] = "smmulNMS", _ = "smmlaNMSD", }, + { shift = 12, mask = 15, [15] = "smmulrNMS", _ = "smmlarNMSD", }, + false, false, false, false, + "smmlsNMSD", "smmlsrNMSD", + }, + false, false, + { --18 + shift = 5, mask = 7, + [0] = { shift = 12, mask = 15, [15] = "usad8NMS", _ = "usada8NMSD", }, + }, + false, + { --1a + shift = 5, mask = 3, [2] = "sbfxDMvw", + }, + { --1b + shift = 5, mask = 3, [2] = "sbfxDMvw", + }, + { --1c + shift = 5, mask = 3, + [0] = { shift = 0, mask = 15, [15] = "bfcDvX", _ = "bfiDMvX", }, + }, + { --1d + shift = 5, mask = 3, + [0] = { shift = 0, mask = 15, [15] = "bfcDvX", _ = "bfiDMvX", }, + }, + { --1e + shift = 5, mask = 3, [2] = "ubfxDMvw", + }, + { --1f + shift = 5, mask = 3, [2] = "ubfxDMvw", + }, +} + +local map_load = { + shift = 21, mask = 9, + { + shift = 20, mask = 5, + [0] = "strtDL", "ldrtDL", [4] = "strbtDL", [5] = "ldrbtDL", + }, + _ = { + shift = 20, mask = 5, + [0] = "strDL", "ldrDL", [4] = "strbDL", [5] = "ldrbDL", + } +} + +local map_load1 = { + shift = 4, mask = 1, + [0] = map_load, map_media, +} + +local map_loadm = { + shift = 20, mask = 1, + [0] = { + shift = 23, mask = 3, + [0] = "stmdaNR", "stmNR", + { shift = 16, mask = 63, [45] = "pushR", _ = "stmdbNR", }, "stmibNR", + }, + { + shift = 23, mask = 3, + [0] = "ldmdaNR", { shift = 16, mask = 63, [61] = "popR", _ = "ldmNR", }, + "ldmdbNR", "ldmibNR", + }, +} + +local map_data = { + shift = 21, mask = 15, + [0] = "andDNPs", "eorDNPs", "subDNPs", "rsbDNPs", + "addDNPs", "adcDNPs", "sbcDNPs", "rscDNPs", + "tstNP", "teqNP", "cmpNP", "cmnNP", + "orrDNPs", "movDPs", "bicDNPs", "mvnDPs", +} + +local map_mul = { + shift = 21, mask = 7, + [0] = "mulNMSs", "mlaNMSDs", "umaalDNMS", "mlsDNMS", + "umullDNMSs", "umlalDNMSs", "smullDNMSs", "smlalDNMSs", +} + +local map_sync = { + shift = 20, mask = 15, -- NYI: brackets around N. R(D+1) for ldrexd/strexd. + [0] = "swpDMN", false, false, false, + "swpbDMN", false, false, false, + "strexDMN", "ldrexDN", "strexdDN", "ldrexdDN", + "strexbDMN", "ldrexbDN", "strexhDN", "ldrexhDN", +} + +local map_mulh = { + shift = 21, mask = 3, + [0] = { shift = 5, mask = 3, + [0] = "smlabbNMSD", "smlatbNMSD", "smlabtNMSD", "smlattNMSD", }, + { shift = 5, mask = 3, + [0] = "smlawbNMSD", "smulwbNMS", "smlawtNMSD", "smulwtNMS", }, + { shift = 5, mask = 3, + [0] = "smlalbbDNMS", "smlaltbDNMS", "smlalbtDNMS", "smlalttDNMS", }, + { shift = 5, mask = 3, + [0] = "smulbbNMS", "smultbNMS", "smulbtNMS", "smulttNMS", }, +} + +local map_misc = { + shift = 4, mask = 7, + -- NYI: decode PSR bits of msr. + [0] = { shift = 21, mask = 1, [0] = "mrsD", "msrM", }, + { shift = 21, mask = 3, "bxM", false, "clzDM", }, + { shift = 21, mask = 3, "bxjM", }, + { shift = 21, mask = 3, "blxM", }, + false, + { shift = 21, mask = 3, [0] = "qaddDMN", "qsubDMN", "qdaddDMN", "qdsubDMN", }, + false, + { shift = 21, mask = 3, "bkptK", }, +} + +local map_datar = { + shift = 4, mask = 9, + [9] = { + shift = 5, mask = 3, + [0] = { shift = 24, mask = 1, [0] = map_mul, map_sync, }, + { shift = 20, mask = 1, [0] = "strhDL", "ldrhDL", }, + { shift = 20, mask = 1, [0] = "ldrdDL", "ldrsbDL", }, + { shift = 20, mask = 1, [0] = "strdDL", "ldrshDL", }, + }, + _ = { + shift = 20, mask = 25, + [16] = { shift = 7, mask = 1, [0] = map_misc, map_mulh, }, + _ = { + shift = 0, mask = 0xffffffff, + [bor(0xe1a00000)] = "nop", + _ = map_data, + } + }, +} + +local map_datai = { + shift = 20, mask = 31, -- NYI: decode PSR bits of msr. Decode imm12. + [16] = "movwDW", [20] = "movtDW", + [18] = { shift = 0, mask = 0xf00ff, [0] = "nopv6", _ = "msrNW", }, + [22] = "msrNW", + _ = map_data, +} + +local map_branch = { + shift = 24, mask = 1, + [0] = "bB", "blB" +} + +local map_condins = { + [0] = map_datar, map_datai, map_load, map_load1, + map_loadm, map_branch, map_loadc, map_datac +} + +-- NYI: setend. +local map_uncondins = { + [0] = false, map_simddata, map_simdload, map_preload, + false, "blxB", map_loadcu, map_datacu, +} + +------------------------------------------------------------------------------ + +local map_gpr = { + [0] = "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", + "r8", "r9", "r10", "r11", "r12", "sp", "lr", "pc", +} + +local map_cond = { + [0] = "eq", "ne", "hs", "lo", "mi", "pl", "vs", "vc", + "hi", "ls", "ge", "lt", "gt", "le", "al", +} + +local map_shift = { [0] = "lsl", "lsr", "asr", "ror", } + +------------------------------------------------------------------------------ + +-- Output a nicely formatted line with an opcode and operands. +local function putop(ctx, text, operands) + local pos = ctx.pos + local extra = "" + if ctx.rel then + local sym = ctx.symtab[ctx.rel] + if sym then + extra = "\t->"..sym + elseif band(ctx.op, 0x0e000000) ~= 0x0a000000 then + extra = "\t; 0x"..tohex(ctx.rel) + end + end + if ctx.hexdump > 0 then + ctx.out(format("%08x %s %-5s %s%s\n", + ctx.addr+pos, tohex(ctx.op), text, concat(operands, ", "), extra)) + else + ctx.out(format("%08x %-5s %s%s\n", + ctx.addr+pos, text, concat(operands, ", "), extra)) + end + ctx.pos = pos + 4 +end + +-- Fallback for unknown opcodes. +local function unknown(ctx) + return putop(ctx, ".long", { "0x"..tohex(ctx.op) }) +end + +-- Format operand 2 of load/store opcodes. +local function fmtload(ctx, op, pos) + local base = map_gpr[band(rshift(op, 16), 15)] + local x, ofs + local ext = (band(op, 0x04000000) == 0) + if not ext and band(op, 0x02000000) == 0 then + ofs = band(op, 4095) + if band(op, 0x00800000) == 0 then ofs = -ofs end + if base == "pc" then ctx.rel = ctx.addr + pos + 8 + ofs end + ofs = "#"..ofs + elseif ext and band(op, 0x00400000) ~= 0 then + ofs = band(op, 15) + band(rshift(op, 4), 0xf0) + if band(op, 0x00800000) == 0 then ofs = -ofs end + if base == "pc" then ctx.rel = ctx.addr + pos + 8 + ofs end + ofs = "#"..ofs + else + ofs = map_gpr[band(op, 15)] + if ext or band(op, 0xfe0) == 0 then + elseif band(op, 0xfe0) == 0x60 then + ofs = format("%s, rrx", ofs) + else + local sh = band(rshift(op, 7), 31) + if sh == 0 then sh = 32 end + ofs = format("%s, %s #%d", ofs, map_shift[band(rshift(op, 5), 3)], sh) + end + if band(op, 0x00800000) == 0 then ofs = "-"..ofs end + end + if ofs == "#0" then + x = format("[%s]", base) + elseif band(op, 0x01000000) == 0 then + x = format("[%s], %s", base, ofs) + else + x = format("[%s, %s]", base, ofs) + end + if band(op, 0x01200000) == 0x01200000 then x = x.."!" end + return x +end + +-- Format operand 2 of vector load/store opcodes. +local function fmtvload(ctx, op, pos) + local base = map_gpr[band(rshift(op, 16), 15)] + local ofs = band(op, 255)*4 + if band(op, 0x00800000) == 0 then ofs = -ofs end + if base == "pc" then ctx.rel = ctx.addr + pos + 8 + ofs end + if ofs == 0 then + return format("[%s]", base) + else + return format("[%s, #%d]", base, ofs) + end +end + +local function fmtvr(op, vr, sh0, sh1) + if vr == "s" then + return format("s%d", 2*band(rshift(op, sh0), 15)+band(rshift(op, sh1), 1)) + else + return format("d%d", band(rshift(op, sh0), 15)+band(rshift(op, sh1-4), 16)) + end +end + +-- Disassemble a single instruction. +local function disass_ins(ctx) + local pos = ctx.pos + local b0, b1, b2, b3 = byte(ctx.code, pos+1, pos+4) + local op = bor(lshift(b3, 24), lshift(b2, 16), lshift(b1, 8), b0) + local operands = {} + local suffix = "" + local last, name, pat + local vr + ctx.op = op + ctx.rel = nil + + local cond = rshift(op, 28) + local opat + if cond == 15 then + opat = map_uncondins[band(rshift(op, 25), 7)] + else + if cond ~= 14 then suffix = map_cond[cond] end + opat = map_condins[band(rshift(op, 25), 7)] + end + while type(opat) ~= "string" do + if not opat then return unknown(ctx) end + opat = opat[band(rshift(op, opat.shift), opat.mask)] or opat._ + end + name, pat = match(opat, "^([a-z0-9]*)(.*)") + if sub(pat, 1, 1) == "." then + local s2, p2 = match(pat, "^([a-z0-9.]*)(.*)") + suffix = suffix..s2 + pat = p2 + end + + for p in gmatch(pat, ".") do + local x = nil + if p == "D" then + x = map_gpr[band(rshift(op, 12), 15)] + elseif p == "N" then + x = map_gpr[band(rshift(op, 16), 15)] + elseif p == "S" then + x = map_gpr[band(rshift(op, 8), 15)] + elseif p == "M" then + x = map_gpr[band(op, 15)] + elseif p == "d" then + x = fmtvr(op, vr, 12, 22) + elseif p == "n" then + x = fmtvr(op, vr, 16, 7) + elseif p == "m" then + x = fmtvr(op, vr, 0, 5) + elseif p == "P" then + if band(op, 0x02000000) ~= 0 then + x = ror(band(op, 255), 2*band(rshift(op, 8), 15)) + else + x = map_gpr[band(op, 15)] + if band(op, 0xff0) ~= 0 then + operands[#operands+1] = x + local s = map_shift[band(rshift(op, 5), 3)] + local r = nil + if band(op, 0xf90) == 0 then + if s == "ror" then s = "rrx" else r = "#32" end + elseif band(op, 0x10) == 0 then + r = "#"..band(rshift(op, 7), 31) + else + r = map_gpr[band(rshift(op, 8), 15)] + end + if name == "mov" then name = s; x = r + elseif r then x = format("%s %s", s, r) + else x = s end + end + end + elseif p == "L" then + x = fmtload(ctx, op, pos) + elseif p == "l" then + x = fmtvload(ctx, op, pos) + elseif p == "B" then + local addr = ctx.addr + pos + 8 + arshift(lshift(op, 8), 6) + if cond == 15 then addr = addr + band(rshift(op, 23), 2) end + ctx.rel = addr + x = "0x"..tohex(addr) + elseif p == "F" then + vr = "s" + elseif p == "G" then + vr = "d" + elseif p == "." then + suffix = suffix..(vr == "s" and ".f32" or ".f64") + elseif p == "R" then + if band(op, 0x00200000) ~= 0 and #operands == 1 then + operands[1] = operands[1].."!" + end + local t = {} + for i=0,15 do + if band(rshift(op, i), 1) == 1 then t[#t+1] = map_gpr[i] end + end + x = "{"..concat(t, ", ").."}" + elseif p == "r" then + if band(op, 0x00200000) ~= 0 and #operands == 2 then + operands[1] = operands[1].."!" + end + local s = tonumber(sub(last, 2)) + local n = band(op, 255) + if vr == "d" then n = rshift(n, 1) end + operands[#operands] = format("{%s-%s%d}", last, vr, s+n-1) + elseif p == "W" then + x = band(op, 0x0fff) + band(rshift(op, 4), 0xf000) + elseif p == "T" then + x = "#0x"..tohex(band(op, 0x00ffffff), 6) + elseif p == "U" then + x = band(rshift(op, 7), 31) + if x == 0 then x = nil end + elseif p == "u" then + x = band(rshift(op, 7), 31) + if band(op, 0x40) == 0 then + if x == 0 then x = nil else x = "lsl #"..x end + else + if x == 0 then x = "asr #32" else x = "asr #"..x end + end + elseif p == "v" then + x = band(rshift(op, 7), 31) + elseif p == "w" then + x = band(rshift(op, 16), 31) + elseif p == "x" then + x = band(rshift(op, 16), 31) + 1 + elseif p == "X" then + x = band(rshift(op, 16), 31) - last + 1 + elseif p == "Y" then + x = band(rshift(op, 12), 0xf0) + band(op, 0x0f) + elseif p == "K" then + x = "#0x"..tohex(band(rshift(op, 4), 0x0000fff0) + band(op, 15), 4) + elseif p == "s" then + if band(op, 0x00100000) ~= 0 then suffix = "s"..suffix end + else + assert(false) + end + if x then + last = x + if type(x) == "number" then x = "#"..x end + operands[#operands+1] = x + end + end + + return putop(ctx, name..suffix, operands) +end + +------------------------------------------------------------------------------ + +-- Disassemble a block of code. +local function disass_block(ctx, ofs, len) + if not ofs then ofs = 0 end + local stop = len and ofs+len or #ctx.code + ctx.pos = ofs + ctx.rel = nil + while ctx.pos < stop do disass_ins(ctx) end +end + +-- Extended API: create a disassembler context. Then call ctx:disass(ofs, len). +local function create(code, addr, out) + local ctx = {} + ctx.code = code + ctx.addr = addr or 0 + ctx.out = out or io.write + ctx.symtab = {} + ctx.disass = disass_block + ctx.hexdump = 8 + return ctx +end + +-- Simple API: disassemble code (a string) at address and output via out. +local function disass(code, addr, out) + create(code, addr, out):disass() +end + +-- Return register name for RID. +local function regname(r) + if r < 16 then return map_gpr[r] end + return "d"..(r-16) +end + +-- Public module functions. +return { + create = create, + disass = disass, + regname = regname +} + diff --git a/lua_probject/tolua_project/jit/dis_arm64.lua b/lua_probject/tolua_project/jit/dis_arm64.lua new file mode 100644 index 00000000..a7173326 --- /dev/null +++ b/lua_probject/tolua_project/jit/dis_arm64.lua @@ -0,0 +1,1216 @@ +---------------------------------------------------------------------------- +-- LuaJIT ARM64 disassembler module. +-- +-- Copyright (C) 2005-2017 Mike Pall. All rights reserved. +-- Released under the MIT license. See Copyright Notice in luajit.h +-- +-- Contributed by Djordje Kovacevic and Stefan Pejic from RT-RK.com. +-- Sponsored by Cisco Systems, Inc. +---------------------------------------------------------------------------- +-- This is a helper module used by the LuaJIT machine code dumper module. +-- +-- It disassembles most user-mode AArch64 instructions. +-- NYI: Advanced SIMD and VFP instructions. +------------------------------------------------------------------------------ + +local type = type +local sub, byte, format = string.sub, string.byte, string.format +local match, gmatch, gsub = string.match, string.gmatch, string.gsub +local concat = table.concat +local bit = require("bit") +local band, bor, bxor, tohex = bit.band, bit.bor, bit.bxor, bit.tohex +local lshift, rshift, arshift = bit.lshift, bit.rshift, bit.arshift +local ror = bit.ror + +------------------------------------------------------------------------------ +-- Opcode maps +------------------------------------------------------------------------------ + +local map_adr = { -- PC-relative addressing. + shift = 31, mask = 1, + [0] = "adrDBx", "adrpDBx" +} + +local map_addsubi = { -- Add/subtract immediate. + shift = 29, mask = 3, + [0] = "add|movDNIg", "adds|cmnD0NIg", "subDNIg", "subs|cmpD0NIg", +} + +local map_logi = { -- Logical immediate. + shift = 31, mask = 1, + [0] = { + shift = 22, mask = 1, + [0] = { + shift = 29, mask = 3, + [0] = "andDNig", "orr|movDN0ig", "eorDNig", "ands|tstD0Nig" + }, + false -- unallocated + }, + { + shift = 29, mask = 3, + [0] = "andDNig", "orr|movDN0ig", "eorDNig", "ands|tstD0Nig" + } +} + +local map_movwi = { -- Move wide immediate. + shift = 31, mask = 1, + [0] = { + shift = 22, mask = 1, + [0] = { + shift = 29, mask = 3, + [0] = "movnDWRg", false, "movz|movDYRg", "movkDWRg" + }, false -- unallocated + }, + { + shift = 29, mask = 3, + [0] = "movnDWRg", false, "movz|movDYRg", "movkDWRg" + }, +} + +local map_bitf = { -- Bitfield. + shift = 31, mask = 1, + [0] = { + shift = 22, mask = 1, + [0] = { + shift = 29, mask = 3, + [0] = "sbfm|sbfiz|sbfx|asr|sxtw|sxth|sxtbDN12w", + "bfm|bfi|bfxilDN13w", + "ubfm|ubfiz|ubfx|lsr|lsl|uxth|uxtbDN12w" + } + }, + { + shift = 22, mask = 1, + { + shift = 29, mask = 3, + [0] = "sbfm|sbfiz|sbfx|asr|sxtw|sxth|sxtbDN12x", + "bfm|bfi|bfxilDN13x", + "ubfm|ubfiz|ubfx|lsr|lsl|uxth|uxtbDN12x" + } + } +} + +local map_datai = { -- Data processing - immediate. + shift = 23, mask = 7, + [0] = map_adr, map_adr, map_addsubi, false, + map_logi, map_movwi, map_bitf, + { + shift = 15, mask = 0x1c0c1, + [0] = "extr|rorDNM4w", [0x10080] = "extr|rorDNM4x", + [0x10081] = "extr|rorDNM4x" + } +} + +local map_logsr = { -- Logical, shifted register. + shift = 31, mask = 1, + [0] = { + shift = 15, mask = 1, + [0] = { + shift = 29, mask = 3, + [0] = { + shift = 21, mask = 7, + [0] = "andDNMSg", "bicDNMSg", "andDNMSg", "bicDNMSg", + "andDNMSg", "bicDNMSg", "andDNMg", "bicDNMg" + }, + { + shift = 21, mask = 7, + [0] ="orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0MSg", "orn|mvnDN0MSg", + "orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0Mg", "orn|mvnDN0Mg" + }, + { + shift = 21, mask = 7, + [0] = "eorDNMSg", "eonDNMSg", "eorDNMSg", "eonDNMSg", + "eorDNMSg", "eonDNMSg", "eorDNMg", "eonDNMg" + }, + { + shift = 21, mask = 7, + [0] = "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMSg", "bicsDNMSg", + "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMg", "bicsDNMg" + } + }, + false -- unallocated + }, + { + shift = 29, mask = 3, + [0] = { + shift = 21, mask = 7, + [0] = "andDNMSg", "bicDNMSg", "andDNMSg", "bicDNMSg", + "andDNMSg", "bicDNMSg", "andDNMg", "bicDNMg" + }, + { + shift = 21, mask = 7, + [0] = "orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0MSg", "orn|mvnDN0MSg", + "orr|movDN0MSg", "orn|mvnDN0MSg", "orr|movDN0Mg", "orn|mvnDN0Mg" + }, + { + shift = 21, mask = 7, + [0] = "eorDNMSg", "eonDNMSg", "eorDNMSg", "eonDNMSg", + "eorDNMSg", "eonDNMSg", "eorDNMg", "eonDNMg" + }, + { + shift = 21, mask = 7, + [0] = "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMSg", "bicsDNMSg", + "ands|tstD0NMSg", "bicsDNMSg", "ands|tstD0NMg", "bicsDNMg" + } + } +} + +local map_assh = { + shift = 31, mask = 1, + [0] = { + shift = 15, mask = 1, + [0] = { + shift = 29, mask = 3, + [0] = { + shift = 22, mask = 3, + [0] = "addDNMSg", "addDNMSg", "addDNMSg", "addDNMg" + }, + { + shift = 22, mask = 3, + [0] = "adds|cmnD0NMSg", "adds|cmnD0NMSg", + "adds|cmnD0NMSg", "adds|cmnD0NMg" + }, + { + shift = 22, mask = 3, + [0] = "sub|negDN0MSg", "sub|negDN0MSg", "sub|negDN0MSg", "sub|negDN0Mg" + }, + { + shift = 22, mask = 3, + [0] = "subs|cmp|negsD0N0MzSg", "subs|cmp|negsD0N0MzSg", + "subs|cmp|negsD0N0MzSg", "subs|cmp|negsD0N0Mzg" + }, + }, + false -- unallocated + }, + { + shift = 29, mask = 3, + [0] = { + shift = 22, mask = 3, + [0] = "addDNMSg", "addDNMSg", "addDNMSg", "addDNMg" + }, + { + shift = 22, mask = 3, + [0] = "adds|cmnD0NMSg", "adds|cmnD0NMSg", "adds|cmnD0NMSg", + "adds|cmnD0NMg" + }, + { + shift = 22, mask = 3, + [0] = "sub|negDN0MSg", "sub|negDN0MSg", "sub|negDN0MSg", "sub|negDN0Mg" + }, + { + shift = 22, mask = 3, + [0] = "subs|cmp|negsD0N0MzSg", "subs|cmp|negsD0N0MzSg", + "subs|cmp|negsD0N0MzSg", "subs|cmp|negsD0N0Mzg" + } + } +} + +local map_addsubsh = { -- Add/subtract, shifted register. + shift = 22, mask = 3, + [0] = map_assh, map_assh, map_assh +} + +local map_addsubex = { -- Add/subtract, extended register. + shift = 22, mask = 3, + [0] = { + shift = 29, mask = 3, + [0] = "addDNMXg", "adds|cmnD0NMXg", "subDNMXg", "subs|cmpD0NMzXg", + } +} + +local map_addsubc = { -- Add/subtract, with carry. + shift = 10, mask = 63, + [0] = { + shift = 29, mask = 3, + [0] = "adcDNMg", "adcsDNMg", "sbc|ngcDN0Mg", "sbcs|ngcsDN0Mg", + } +} + +local map_ccomp = { + shift = 4, mask = 1, + [0] = { + shift = 10, mask = 3, + [0] = { -- Conditional compare register. + shift = 29, mask = 3, + "ccmnNMVCg", false, "ccmpNMVCg", + }, + [2] = { -- Conditional compare immediate. + shift = 29, mask = 3, + "ccmnN5VCg", false, "ccmpN5VCg", + } + } +} + +local map_csel = { -- Conditional select. + shift = 11, mask = 1, + [0] = { + shift = 10, mask = 1, + [0] = { + shift = 29, mask = 3, + [0] = "cselDNMzCg", false, "csinv|cinv|csetmDNMcg", false, + }, + { + shift = 29, mask = 3, + [0] = "csinc|cinc|csetDNMcg", false, "csneg|cnegDNMcg", false, + } + } +} + +local map_data1s = { -- Data processing, 1 source. + shift = 29, mask = 1, + [0] = { + shift = 31, mask = 1, + [0] = { + shift = 10, mask = 0x7ff, + [0] = "rbitDNg", "rev16DNg", "revDNw", false, "clzDNg", "clsDNg" + }, + { + shift = 10, mask = 0x7ff, + [0] = "rbitDNg", "rev16DNg", "rev32DNx", "revDNx", "clzDNg", "clsDNg" + } + } +} + +local map_data2s = { -- Data processing, 2 sources. + shift = 29, mask = 1, + [0] = { + shift = 10, mask = 63, + false, "udivDNMg", "sdivDNMg", false, false, false, false, "lslDNMg", + "lsrDNMg", "asrDNMg", "rorDNMg" + } +} + +local map_data3s = { -- Data processing, 3 sources. + shift = 29, mask = 7, + [0] = { + shift = 21, mask = 7, + [0] = { + shift = 15, mask = 1, + [0] = "madd|mulDNMA0g", "msub|mnegDNMA0g" + } + }, false, false, false, + { + shift = 15, mask = 1, + [0] = { + shift = 21, mask = 7, + [0] = "madd|mulDNMA0g", "smaddl|smullDxNMwA0x", "smulhDNMx", false, + false, "umaddl|umullDxNMwA0x", "umulhDNMx" + }, + { + shift = 21, mask = 7, + [0] = "msub|mnegDNMA0g", "smsubl|smneglDxNMwA0x", false, false, + false, "umsubl|umneglDxNMwA0x" + } + } +} + +local map_datar = { -- Data processing, register. + shift = 28, mask = 1, + [0] = { + shift = 24, mask = 1, + [0] = map_logsr, + { + shift = 21, mask = 1, + [0] = map_addsubsh, map_addsubex + } + }, + { + shift = 21, mask = 15, + [0] = map_addsubc, false, map_ccomp, false, map_csel, false, + { + shift = 30, mask = 1, + [0] = map_data2s, map_data1s + }, + false, map_data3s, map_data3s, map_data3s, map_data3s, map_data3s, + map_data3s, map_data3s, map_data3s + } +} + +local map_lrl = { -- Load register, literal. + shift = 26, mask = 1, + [0] = { + shift = 30, mask = 3, + [0] = "ldrDwB", "ldrDxB", "ldrswDxB" + }, + { + shift = 30, mask = 3, + [0] = "ldrDsB", "ldrDdB" + } +} + +local map_lsriind = { -- Load/store register, immediate pre/post-indexed. + shift = 30, mask = 3, + [0] = { + shift = 26, mask = 1, + [0] = { + shift = 22, mask = 3, + [0] = "strbDwzL", "ldrbDwzL", "ldrsbDxzL", "ldrsbDwzL" + } + }, + { + shift = 26, mask = 1, + [0] = { + shift = 22, mask = 3, + [0] = "strhDwzL", "ldrhDwzL", "ldrshDxzL", "ldrshDwzL" + } + }, + { + shift = 26, mask = 1, + [0] = { + shift = 22, mask = 3, + [0] = "strDwzL", "ldrDwzL", "ldrswDxzL" + }, + { + shift = 22, mask = 3, + [0] = "strDszL", "ldrDszL" + } + }, + { + shift = 26, mask = 1, + [0] = { + shift = 22, mask = 3, + [0] = "strDxzL", "ldrDxzL" + }, + { + shift = 22, mask = 3, + [0] = "strDdzL", "ldrDdzL" + } + } +} + +local map_lsriro = { + shift = 21, mask = 1, + [0] = { -- Load/store register immediate. + shift = 10, mask = 3, + [0] = { -- Unscaled immediate. + shift = 26, mask = 1, + [0] = { + shift = 30, mask = 3, + [0] = { + shift = 22, mask = 3, + [0] = "sturbDwK", "ldurbDwK" + }, + { + shift = 22, mask = 3, + [0] = "sturhDwK", "ldurhDwK" + }, + { + shift = 22, mask = 3, + [0] = "sturDwK", "ldurDwK" + }, + { + shift = 22, mask = 3, + [0] = "sturDxK", "ldurDxK" + } + } + }, map_lsriind, false, map_lsriind + }, + { -- Load/store register, register offset. + shift = 10, mask = 3, + [2] = { + shift = 26, mask = 1, + [0] = { + shift = 30, mask = 3, + [0] = { + shift = 22, mask = 3, + [0] = "strbDwO", "ldrbDwO", "ldrsbDxO", "ldrsbDwO" + }, + { + shift = 22, mask = 3, + [0] = "strhDwO", "ldrhDwO", "ldrshDxO", "ldrshDwO" + }, + { + shift = 22, mask = 3, + [0] = "strDwO", "ldrDwO", "ldrswDxO" + }, + { + shift = 22, mask = 3, + [0] = "strDxO", "ldrDxO" + } + }, + { + shift = 30, mask = 3, + [2] = { + shift = 22, mask = 3, + [0] = "strDsO", "ldrDsO" + }, + [3] = { + shift = 22, mask = 3, + [0] = "strDdO", "ldrDdO" + } + } + } + } +} + +local map_lsp = { -- Load/store register pair, offset. + shift = 22, mask = 1, + [0] = { + shift = 30, mask = 3, + [0] = { + shift = 26, mask = 1, + [0] = "stpDzAzwP", "stpDzAzsP", + }, + { + shift = 26, mask = 1, + "stpDzAzdP" + }, + { + shift = 26, mask = 1, + [0] = "stpDzAzxP" + } + }, + { + shift = 30, mask = 3, + [0] = { + shift = 26, mask = 1, + [0] = "ldpDzAzwP", "ldpDzAzsP", + }, + { + shift = 26, mask = 1, + [0] = "ldpswDAxP", "ldpDzAzdP" + }, + { + shift = 26, mask = 1, + [0] = "ldpDzAzxP" + } + } +} + +local map_ls = { -- Loads and stores. + shift = 24, mask = 0x31, + [0x10] = map_lrl, [0x30] = map_lsriro, + [0x20] = { + shift = 23, mask = 3, + map_lsp, map_lsp, map_lsp + }, + [0x21] = { + shift = 23, mask = 3, + map_lsp, map_lsp, map_lsp + }, + [0x31] = { + shift = 26, mask = 1, + [0] = { + shift = 30, mask = 3, + [0] = { + shift = 22, mask = 3, + [0] = "strbDwzU", "ldrbDwzU" + }, + { + shift = 22, mask = 3, + [0] = "strhDwzU", "ldrhDwzU" + }, + { + shift = 22, mask = 3, + [0] = "strDwzU", "ldrDwzU" + }, + { + shift = 22, mask = 3, + [0] = "strDxzU", "ldrDxzU" + } + }, + { + shift = 30, mask = 3, + [2] = { + shift = 22, mask = 3, + [0] = "strDszU", "ldrDszU" + }, + [3] = { + shift = 22, mask = 3, + [0] = "strDdzU", "ldrDdzU" + } + } + }, +} + +local map_datafp = { -- Data processing, SIMD and FP. + shift = 28, mask = 7, + { -- 001 + shift = 24, mask = 1, + [0] = { + shift = 21, mask = 1, + { + shift = 10, mask = 3, + [0] = { + shift = 12, mask = 1, + [0] = { + shift = 13, mask = 1, + [0] = { + shift = 14, mask = 1, + [0] = { + shift = 15, mask = 1, + [0] = { -- FP/int conversion. + shift = 31, mask = 1, + [0] = { + shift = 16, mask = 0xff, + [0x20] = "fcvtnsDwNs", [0x21] = "fcvtnuDwNs", + [0x22] = "scvtfDsNw", [0x23] = "ucvtfDsNw", + [0x24] = "fcvtasDwNs", [0x25] = "fcvtauDwNs", + [0x26] = "fmovDwNs", [0x27] = "fmovDsNw", + [0x28] = "fcvtpsDwNs", [0x29] = "fcvtpuDwNs", + [0x30] = "fcvtmsDwNs", [0x31] = "fcvtmuDwNs", + [0x38] = "fcvtzsDwNs", [0x39] = "fcvtzuDwNs", + [0x60] = "fcvtnsDwNd", [0x61] = "fcvtnuDwNd", + [0x62] = "scvtfDdNw", [0x63] = "ucvtfDdNw", + [0x64] = "fcvtasDwNd", [0x65] = "fcvtauDwNd", + [0x68] = "fcvtpsDwNd", [0x69] = "fcvtpuDwNd", + [0x70] = "fcvtmsDwNd", [0x71] = "fcvtmuDwNd", + [0x78] = "fcvtzsDwNd", [0x79] = "fcvtzuDwNd" + }, + { + shift = 16, mask = 0xff, + [0x20] = "fcvtnsDxNs", [0x21] = "fcvtnuDxNs", + [0x22] = "scvtfDsNx", [0x23] = "ucvtfDsNx", + [0x24] = "fcvtasDxNs", [0x25] = "fcvtauDxNs", + [0x28] = "fcvtpsDxNs", [0x29] = "fcvtpuDxNs", + [0x30] = "fcvtmsDxNs", [0x31] = "fcvtmuDxNs", + [0x38] = "fcvtzsDxNs", [0x39] = "fcvtzuDxNs", + [0x60] = "fcvtnsDxNd", [0x61] = "fcvtnuDxNd", + [0x62] = "scvtfDdNx", [0x63] = "ucvtfDdNx", + [0x64] = "fcvtasDxNd", [0x65] = "fcvtauDxNd", + [0x66] = "fmovDxNd", [0x67] = "fmovDdNx", + [0x68] = "fcvtpsDxNd", [0x69] = "fcvtpuDxNd", + [0x70] = "fcvtmsDxNd", [0x71] = "fcvtmuDxNd", + [0x78] = "fcvtzsDxNd", [0x79] = "fcvtzuDxNd" + } + } + }, + { -- FP data-processing, 1 source. + shift = 31, mask = 1, + [0] = { + shift = 22, mask = 3, + [0] = { + shift = 15, mask = 63, + [0] = "fmovDNf", "fabsDNf", "fnegDNf", + "fsqrtDNf", false, "fcvtDdNs", false, false, + "frintnDNf", "frintpDNf", "frintmDNf", "frintzDNf", + "frintaDNf", false, "frintxDNf", "frintiDNf", + }, + { + shift = 15, mask = 63, + [0] = "fmovDNf", "fabsDNf", "fnegDNf", + "fsqrtDNf", "fcvtDsNd", false, false, false, + "frintnDNf", "frintpDNf", "frintmDNf", "frintzDNf", + "frintaDNf", false, "frintxDNf", "frintiDNf", + } + } + } + }, + { -- FP compare. + shift = 31, mask = 1, + [0] = { + shift = 14, mask = 3, + [0] = { + shift = 23, mask = 1, + [0] = { + shift = 0, mask = 31, + [0] = "fcmpNMf", [8] = "fcmpNZf", + [16] = "fcmpeNMf", [24] = "fcmpeNZf", + } + } + } + } + }, + { -- FP immediate. + shift = 31, mask = 1, + [0] = { + shift = 5, mask = 31, + [0] = { + shift = 23, mask = 1, + [0] = "fmovDFf" + } + } + } + }, + { -- FP conditional compare. + shift = 31, mask = 1, + [0] = { + shift = 23, mask = 1, + [0] = { + shift = 4, mask = 1, + [0] = "fccmpNMVCf", "fccmpeNMVCf" + } + } + }, + { -- FP data-processing, 2 sources. + shift = 31, mask = 1, + [0] = { + shift = 23, mask = 1, + [0] = { + shift = 12, mask = 15, + [0] = "fmulDNMf", "fdivDNMf", "faddDNMf", "fsubDNMf", + "fmaxDNMf", "fminDNMf", "fmaxnmDNMf", "fminnmDNMf", + "fnmulDNMf" + } + } + }, + { -- FP conditional select. + shift = 31, mask = 1, + [0] = { + shift = 23, mask = 1, + [0] = "fcselDNMCf" + } + } + } + }, + { -- FP data-processing, 3 sources. + shift = 31, mask = 1, + [0] = { + shift = 15, mask = 1, + [0] = { + shift = 21, mask = 5, + [0] = "fmaddDNMAf", "fnmaddDNMAf" + }, + { + shift = 21, mask = 5, + [0] = "fmsubDNMAf", "fnmsubDNMAf" + } + } + } + } +} + +local map_br = { -- Branches, exception generating and system instructions. + shift = 29, mask = 7, + [0] = "bB", + { -- Compare & branch, immediate. + shift = 24, mask = 3, + [0] = "cbzDBg", "cbnzDBg", "tbzDTBw", "tbnzDTBw" + }, + { -- Conditional branch, immediate. + shift = 24, mask = 3, + [0] = { + shift = 4, mask = 1, + [0] = { + shift = 0, mask = 15, + [0] = "beqB", "bneB", "bhsB", "bloB", "bmiB", "bplB", "bvsB", "bvcB", + "bhiB", "blsB", "bgeB", "bltB", "bgtB", "bleB", "balB" + } + } + }, false, "blB", + { -- Compare & branch, immediate. + shift = 24, mask = 3, + [0] = "cbzDBg", "cbnzDBg", "tbzDTBx", "tbnzDTBx" + }, + { + shift = 24, mask = 3, + [0] = { -- Exception generation. + shift = 0, mask = 0xe0001f, + [0x200000] = "brkW" + }, + { -- System instructions. + shift = 0, mask = 0x3fffff, + [0x03201f] = "nop" + }, + { -- Unconditional branch, register. + shift = 0, mask = 0xfffc1f, + [0x1f0000] = "brNx", [0x3f0000] = "blrNx", + [0x5f0000] = "retNx" + }, + } +} + +local map_init = { + shift = 25, mask = 15, + [0] = false, false, false, false, map_ls, map_datar, map_ls, map_datafp, + map_datai, map_datai, map_br, map_br, map_ls, map_datar, map_ls, map_datafp +} + +------------------------------------------------------------------------------ + +local map_regs = { x = {}, w = {}, d = {}, s = {} } + +for i=0,30 do + map_regs.x[i] = "x"..i + map_regs.w[i] = "w"..i + map_regs.d[i] = "d"..i + map_regs.s[i] = "s"..i +end +map_regs.x[31] = "sp" +map_regs.w[31] = "wsp" +map_regs.d[31] = "d31" +map_regs.s[31] = "s31" + +local map_cond = { + [0] = "eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc", + "hi", "ls", "ge", "lt", "gt", "le", "al", +} + +local map_shift = { [0] = "lsl", "lsr", "asr", } + +local map_extend = { + [0] = "uxtb", "uxth", "uxtw", "uxtx", "sxtb", "sxth", "sxtw", "sxtx", +} + +------------------------------------------------------------------------------ + +-- Output a nicely formatted line with an opcode and operands. +local function putop(ctx, text, operands) + local pos = ctx.pos + local extra = "" + if ctx.rel then + local sym = ctx.symtab[ctx.rel] + if sym then + extra = "\t->"..sym + end + end + if ctx.hexdump > 0 then + ctx.out(format("%08x %s %-5s %s%s\n", + ctx.addr+pos, tohex(ctx.op), text, concat(operands, ", "), extra)) + else + ctx.out(format("%08x %-5s %s%s\n", + ctx.addr+pos, text, concat(operands, ", "), extra)) + end + ctx.pos = pos + 4 +end + +-- Fallback for unknown opcodes. +local function unknown(ctx) + return putop(ctx, ".long", { "0x"..tohex(ctx.op) }) +end + +local function match_reg(p, pat, regnum) + return map_regs[match(pat, p.."%w-([xwds])")][regnum] +end + +local function fmt_hex32(x) + if x < 0 then + return tohex(x) + else + return format("%x", x) + end +end + +local imm13_rep = { 0x55555555, 0x11111111, 0x01010101, 0x00010001, 0x00000001 } + +local function decode_imm13(op) + local imms = band(rshift(op, 10), 63) + local immr = band(rshift(op, 16), 63) + if band(op, 0x00400000) == 0 then + local len = 5 + if imms >= 56 then + if imms >= 60 then len = 1 else len = 2 end + elseif imms >= 48 then len = 3 elseif imms >= 32 then len = 4 end + local l = lshift(1, len)-1 + local s = band(imms, l) + local r = band(immr, l) + local imm = ror(rshift(-1, 31-s), r) + if len ~= 5 then imm = band(imm, lshift(1, l)-1) + rshift(imm, 31-l) end + imm = imm * imm13_rep[len] + local ix = fmt_hex32(imm) + if rshift(op, 31) ~= 0 then + return ix..tohex(imm) + else + return ix + end + else + local lo, hi = -1, 0 + if imms < 32 then lo = rshift(-1, 31-imms) else hi = rshift(-1, 63-imms) end + if immr ~= 0 then + lo, hi = ror(lo, immr), ror(hi, immr) + local x = immr == 32 and 0 or band(bxor(lo, hi), lshift(-1, 32-immr)) + lo, hi = bxor(lo, x), bxor(hi, x) + if immr >= 32 then lo, hi = hi, lo end + end + if hi ~= 0 then + return fmt_hex32(hi)..tohex(lo) + else + return fmt_hex32(lo) + end + end +end + +local function parse_immpc(op, name) + if name == "b" or name == "bl" then + return arshift(lshift(op, 6), 4) + elseif name == "adr" or name == "adrp" then + local immlo = band(rshift(op, 29), 3) + local immhi = lshift(arshift(lshift(op, 8), 13), 2) + return bor(immhi, immlo) + elseif name == "tbz" or name == "tbnz" then + return lshift(arshift(lshift(op, 13), 18), 2) + else + return lshift(arshift(lshift(op, 8), 13), 2) + end +end + +local function parse_fpimm8(op) + local sign = band(op, 0x100000) == 0 and 1 or -1 + local exp = bxor(rshift(arshift(lshift(op, 12), 5), 24), 0x80) - 131 + local frac = 16+band(rshift(op, 13), 15) + return sign * frac * 2^exp +end + +local function prefer_bfx(sf, uns, imms, immr) + if imms < immr or imms == 31 or imms == 63 then + return false + end + if immr == 0 then + if sf == 0 and (imms == 7 or imms == 15) then + return false + end + if sf ~= 0 and uns == 0 and (imms == 7 or imms == 15 or imms == 31) then + return false + end + end + return true +end + +-- Disassemble a single instruction. +local function disass_ins(ctx) + local pos = ctx.pos + local b0, b1, b2, b3 = byte(ctx.code, pos+1, pos+4) + local op = bor(lshift(b3, 24), lshift(b2, 16), lshift(b1, 8), b0) + local operands = {} + local suffix = "" + local last, name, pat + local map_reg + ctx.op = op + ctx.rel = nil + last = nil + local opat + opat = map_init[band(rshift(op, 25), 15)] + while type(opat) ~= "string" do + if not opat then return unknown(ctx) end + opat = opat[band(rshift(op, opat.shift), opat.mask)] or opat._ + end + name, pat = match(opat, "^([a-z0-9]*)(.*)") + local altname, pat2 = match(pat, "|([a-z0-9_.|]*)(.*)") + if altname then pat = pat2 end + if sub(pat, 1, 1) == "." then + local s2, p2 = match(pat, "^([a-z0-9.]*)(.*)") + suffix = suffix..s2 + pat = p2 + end + + local rt = match(pat, "[gf]") + if rt then + if rt == "g" then + map_reg = band(op, 0x80000000) ~= 0 and map_regs.x or map_regs.w + else + map_reg = band(op, 0x400000) ~= 0 and map_regs.d or map_regs.s + end + end + + local second0, immr + + for p in gmatch(pat, ".") do + local x = nil + if p == "D" then + local regnum = band(op, 31) + x = rt and map_reg[regnum] or match_reg(p, pat, regnum) + elseif p == "N" then + local regnum = band(rshift(op, 5), 31) + x = rt and map_reg[regnum] or match_reg(p, pat, regnum) + elseif p == "M" then + local regnum = band(rshift(op, 16), 31) + x = rt and map_reg[regnum] or match_reg(p, pat, regnum) + elseif p == "A" then + local regnum = band(rshift(op, 10), 31) + x = rt and map_reg[regnum] or match_reg(p, pat, regnum) + elseif p == "B" then + local addr = ctx.addr + pos + parse_immpc(op, name) + ctx.rel = addr + x = "0x"..tohex(addr) + elseif p == "T" then + x = bor(band(rshift(op, 26), 32), band(rshift(op, 19), 31)) + elseif p == "V" then + x = band(op, 15) + elseif p == "C" then + x = map_cond[band(rshift(op, 12), 15)] + elseif p == "c" then + local rn = band(rshift(op, 5), 31) + local rm = band(rshift(op, 16), 31) + local cond = band(rshift(op, 12), 15) + local invc = bxor(cond, 1) + x = map_cond[cond] + if altname and cond ~= 14 and cond ~= 15 then + local a1, a2 = match(altname, "([^|]*)|(.*)") + if rn == rm then + local n = #operands + operands[n] = nil + x = map_cond[invc] + if rn ~= 31 then + if a1 then name = a1 else name = altname end + else + operands[n-1] = nil + name = a2 + end + end + end + elseif p == "W" then + x = band(rshift(op, 5), 0xffff) + elseif p == "Y" then + x = band(rshift(op, 5), 0xffff) + local hw = band(rshift(op, 21), 3) + if altname and (hw == 0 or x ~= 0) then + name = altname + end + elseif p == "L" then + local rn = map_regs.x[band(rshift(op, 5), 31)] + local imm9 = arshift(lshift(op, 11), 23) + if band(op, 0x800) ~= 0 then + x = "["..rn..", #"..imm9.."]!" + else + x = "["..rn.."], #"..imm9 + end + elseif p == "U" then + local rn = map_regs.x[band(rshift(op, 5), 31)] + local sz = band(rshift(op, 30), 3) + local imm12 = lshift(arshift(lshift(op, 10), 20), sz) + if imm12 ~= 0 then + x = "["..rn..", #"..imm12.."]" + else + x = "["..rn.."]" + end + elseif p == "K" then + local rn = map_regs.x[band(rshift(op, 5), 31)] + local imm9 = arshift(lshift(op, 11), 23) + if imm9 ~= 0 then + x = "["..rn..", #"..imm9.."]" + else + x = "["..rn.."]" + end + elseif p == "O" then + local rn, rm = map_regs.x[band(rshift(op, 5), 31)] + local m = band(rshift(op, 13), 1) + if m == 0 then + rm = map_regs.w[band(rshift(op, 16), 31)] + else + rm = map_regs.x[band(rshift(op, 16), 31)] + end + x = "["..rn..", "..rm + local opt = band(rshift(op, 13), 7) + local s = band(rshift(op, 12), 1) + local sz = band(rshift(op, 30), 3) + -- extension to be applied + if opt == 3 then + if s == 0 then x = x.."]" + else x = x..", lsl #"..sz.."]" end + elseif opt == 2 or opt == 6 or opt == 7 then + if s == 0 then x = x..", "..map_extend[opt].."]" + else x = x..", "..map_extend[opt].." #"..sz.."]" end + else + x = x.."]" + end + elseif p == "P" then + local opcv, sh = rshift(op, 26), 2 + if opcv >= 0x2a then sh = 4 elseif opcv >= 0x1b then sh = 3 end + local imm7 = lshift(arshift(lshift(op, 10), 25), sh) + local rn = map_regs.x[band(rshift(op, 5), 31)] + local ind = band(rshift(op, 23), 3) + if ind == 1 then + x = "["..rn.."], #"..imm7 + elseif ind == 2 then + if imm7 == 0 then + x = "["..rn.."]" + else + x = "["..rn..", #"..imm7.."]" + end + elseif ind == 3 then + x = "["..rn..", #"..imm7.."]!" + end + elseif p == "I" then + local shf = band(rshift(op, 22), 3) + local imm12 = band(rshift(op, 10), 0x0fff) + local rn, rd = band(rshift(op, 5), 31), band(op, 31) + if altname == "mov" and shf == 0 and imm12 == 0 and (rn == 31 or rd == 31) then + name = altname + x = nil + elseif shf == 0 then + x = imm12 + elseif shf == 1 then + x = imm12..", lsl #12" + end + elseif p == "i" then + x = "#0x"..decode_imm13(op) + elseif p == "1" then + immr = band(rshift(op, 16), 63) + x = immr + elseif p == "2" then + x = band(rshift(op, 10), 63) + if altname then + local a1, a2, a3, a4, a5, a6 = + match(altname, "([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|(.*)") + local sf = band(rshift(op, 26), 32) + local uns = band(rshift(op, 30), 1) + if prefer_bfx(sf, uns, x, immr) then + name = a2 + x = x - immr + 1 + elseif immr == 0 and x == 7 then + local n = #operands + operands[n] = nil + if sf ~= 0 then + operands[n-1] = gsub(operands[n-1], "x", "w") + end + last = operands[n-1] + name = a6 + x = nil + elseif immr == 0 and x == 15 then + local n = #operands + operands[n] = nil + if sf ~= 0 then + operands[n-1] = gsub(operands[n-1], "x", "w") + end + last = operands[n-1] + name = a5 + x = nil + elseif x == 31 or x == 63 then + if x == 31 and immr == 0 and name == "sbfm" then + name = a4 + local n = #operands + operands[n] = nil + if sf ~= 0 then + operands[n-1] = gsub(operands[n-1], "x", "w") + end + last = operands[n-1] + else + name = a3 + end + x = nil + elseif band(x, 31) ~= 31 and immr == x+1 and name == "ubfm" then + name = a4 + last = "#"..(sf+32 - immr) + operands[#operands] = last + x = nil + elseif x < immr then + name = a1 + last = "#"..(sf+32 - immr) + operands[#operands] = last + x = x + 1 + end + end + elseif p == "3" then + x = band(rshift(op, 10), 63) + if altname then + local a1, a2 = match(altname, "([^|]*)|(.*)") + if x < immr then + name = a1 + local sf = band(rshift(op, 26), 32) + last = "#"..(sf+32 - immr) + operands[#operands] = last + x = x + 1 + elseif x >= immr then + name = a2 + x = x - immr + 1 + end + end + elseif p == "4" then + x = band(rshift(op, 10), 63) + local rn = band(rshift(op, 5), 31) + local rm = band(rshift(op, 16), 31) + if altname and rn == rm then + local n = #operands + operands[n] = nil + last = operands[n-1] + name = altname + end + elseif p == "5" then + x = band(rshift(op, 16), 31) + elseif p == "S" then + x = band(rshift(op, 10), 63) + if x == 0 then x = nil + else x = map_shift[band(rshift(op, 22), 3)].." #"..x end + elseif p == "X" then + local opt = band(rshift(op, 13), 7) + -- Width specifier . + if opt ~= 3 and opt ~= 7 then + last = map_regs.w[band(rshift(op, 16), 31)] + operands[#operands] = last + end + x = band(rshift(op, 10), 7) + -- Extension. + if opt == 2 + band(rshift(op, 31), 1) and + band(rshift(op, second0 and 5 or 0), 31) == 31 then + if x == 0 then x = nil + else x = "lsl #"..x end + else + if x == 0 then x = map_extend[band(rshift(op, 13), 7)] + else x = map_extend[band(rshift(op, 13), 7)].." #"..x end + end + elseif p == "R" then + x = band(rshift(op,21), 3) + if x == 0 then x = nil + else x = "lsl #"..x*16 end + elseif p == "z" then + local n = #operands + if operands[n] == "sp" then operands[n] = "xzr" + elseif operands[n] == "wsp" then operands[n] = "wzr" + end + elseif p == "Z" then + x = 0 + elseif p == "F" then + x = parse_fpimm8(op) + elseif p == "g" or p == "f" or p == "x" or p == "w" or + p == "d" or p == "s" then + -- These are handled in D/N/M/A. + elseif p == "0" then + if last == "sp" or last == "wsp" then + local n = #operands + operands[n] = nil + last = operands[n-1] + if altname then + local a1, a2 = match(altname, "([^|]*)|(.*)") + if not a1 then + name = altname + elseif second0 then + name, altname = a2, a1 + else + name, altname = a1, a2 + end + end + end + second0 = true + else + assert(false) + end + if x then + last = x + if type(x) == "number" then x = "#"..x end + operands[#operands+1] = x + end + end + + return putop(ctx, name..suffix, operands) +end + +------------------------------------------------------------------------------ + +-- Disassemble a block of code. +local function disass_block(ctx, ofs, len) + if not ofs then ofs = 0 end + local stop = len and ofs+len or #ctx.code + ctx.pos = ofs + ctx.rel = nil + while ctx.pos < stop do disass_ins(ctx) end +end + +-- Extended API: create a disassembler context. Then call ctx:disass(ofs, len). +local function create(code, addr, out) + local ctx = {} + ctx.code = code + ctx.addr = addr or 0 + ctx.out = out or io.write + ctx.symtab = {} + ctx.disass = disass_block + ctx.hexdump = 8 + return ctx +end + +-- Simple API: disassemble code (a string) at address and output via out. +local function disass(code, addr, out) + create(code, addr, out):disass() +end + +-- Return register name for RID. +local function regname(r) + if r < 32 then return map_regs.x[r] end + return map_regs.d[r-32] +end + +-- Public module functions. +return { + create = create, + disass = disass, + regname = regname +} + diff --git a/lua_probject/tolua_project/jit/dis_arm64be.lua b/lua_probject/tolua_project/jit/dis_arm64be.lua new file mode 100644 index 00000000..7eb389e2 --- /dev/null +++ b/lua_probject/tolua_project/jit/dis_arm64be.lua @@ -0,0 +1,12 @@ +---------------------------------------------------------------------------- +-- LuaJIT ARM64BE disassembler wrapper module. +-- +-- Copyright (C) 2005-2017 Mike Pall. All rights reserved. +-- Released under the MIT license. See Copyright Notice in luajit.h +---------------------------------------------------------------------------- +-- ARM64 instructions are always little-endian. So just forward to the +-- common ARM64 disassembler module. All the interesting stuff is there. +------------------------------------------------------------------------------ + +return require((string.match(..., ".*%.") or "").."dis_arm64") + diff --git a/lua_probject/tolua_project/jit/dis_mips.lua b/lua_probject/tolua_project/jit/dis_mips.lua new file mode 100644 index 00000000..a12b8e62 --- /dev/null +++ b/lua_probject/tolua_project/jit/dis_mips.lua @@ -0,0 +1,443 @@ +---------------------------------------------------------------------------- +-- LuaJIT MIPS disassembler module. +-- +-- Copyright (C) 2005-2017 Mike Pall. All rights reserved. +-- Released under the MIT/X license. See Copyright Notice in luajit.h +---------------------------------------------------------------------------- +-- This is a helper module used by the LuaJIT machine code dumper module. +-- +-- It disassembles all standard MIPS32R1/R2 instructions. +-- Default mode is big-endian, but see: dis_mipsel.lua +------------------------------------------------------------------------------ + +local type = type +local byte, format = string.byte, string.format +local match, gmatch = string.match, string.gmatch +local concat = table.concat +local bit = require("bit") +local band, bor, tohex = bit.band, bit.bor, bit.tohex +local lshift, rshift, arshift = bit.lshift, bit.rshift, bit.arshift + +------------------------------------------------------------------------------ +-- Primary and extended opcode maps +------------------------------------------------------------------------------ + +local map_movci = { shift = 16, mask = 1, [0] = "movfDSC", "movtDSC", } +local map_srl = { shift = 21, mask = 1, [0] = "srlDTA", "rotrDTA", } +local map_srlv = { shift = 6, mask = 1, [0] = "srlvDTS", "rotrvDTS", } + +local map_special = { + shift = 0, mask = 63, + [0] = { shift = 0, mask = -1, [0] = "nop", _ = "sllDTA" }, + map_movci, map_srl, "sraDTA", + "sllvDTS", false, map_srlv, "sravDTS", + "jrS", "jalrD1S", "movzDST", "movnDST", + "syscallY", "breakY", false, "sync", + "mfhiD", "mthiS", "mfloD", "mtloS", + "dsllvDST", false, "dsrlvDST", "dsravDST", + "multST", "multuST", "divST", "divuST", + "dmultST", "dmultuST", "ddivST", "ddivuST", + "addDST", "addu|moveDST0", "subDST", "subu|neguDS0T", + "andDST", "or|moveDST0", "xorDST", "nor|notDST0", + false, false, "sltDST", "sltuDST", + "daddDST", "dadduDST", "dsubDST", "dsubuDST", + "tgeSTZ", "tgeuSTZ", "tltSTZ", "tltuSTZ", + "teqSTZ", false, "tneSTZ", false, + "dsllDTA", false, "dsrlDTA", "dsraDTA", + "dsll32DTA", false, "dsrl32DTA", "dsra32DTA", +} + +local map_special2 = { + shift = 0, mask = 63, + [0] = "maddST", "madduST", "mulDST", false, + "msubST", "msubuST", + [32] = "clzDS", [33] = "cloDS", + [63] = "sdbbpY", +} + +local map_bshfl = { + shift = 6, mask = 31, + [2] = "wsbhDT", + [16] = "sebDT", + [24] = "sehDT", +} + +local map_dbshfl = { + shift = 6, mask = 31, + [2] = "dsbhDT", + [5] = "dshdDT", +} + +local map_special3 = { + shift = 0, mask = 63, + [0] = "extTSAK", [1] = "dextmTSAP", [3] = "dextTSAK", + [4] = "insTSAL", [6] = "dinsuTSEQ", [7] = "dinsTSAL", + [32] = map_bshfl, [36] = map_dbshfl, [59] = "rdhwrTD", +} + +local map_regimm = { + shift = 16, mask = 31, + [0] = "bltzSB", "bgezSB", "bltzlSB", "bgezlSB", + false, false, false, false, + "tgeiSI", "tgeiuSI", "tltiSI", "tltiuSI", + "teqiSI", false, "tneiSI", false, + "bltzalSB", "bgezalSB", "bltzallSB", "bgezallSB", + false, false, false, false, + false, false, false, false, + false, false, false, "synciSO", +} + +local map_cop0 = { + shift = 25, mask = 1, + [0] = { + shift = 21, mask = 15, + [0] = "mfc0TDW", [4] = "mtc0TDW", + [10] = "rdpgprDT", + [11] = { shift = 5, mask = 1, [0] = "diT0", "eiT0", }, + [14] = "wrpgprDT", + }, { + shift = 0, mask = 63, + [1] = "tlbr", [2] = "tlbwi", [6] = "tlbwr", [8] = "tlbp", + [24] = "eret", [31] = "deret", + [32] = "wait", + }, +} + +local map_cop1s = { + shift = 0, mask = 63, + [0] = "add.sFGH", "sub.sFGH", "mul.sFGH", "div.sFGH", + "sqrt.sFG", "abs.sFG", "mov.sFG", "neg.sFG", + "round.l.sFG", "trunc.l.sFG", "ceil.l.sFG", "floor.l.sFG", + "round.w.sFG", "trunc.w.sFG", "ceil.w.sFG", "floor.w.sFG", + false, + { shift = 16, mask = 1, [0] = "movf.sFGC", "movt.sFGC" }, + "movz.sFGT", "movn.sFGT", + false, "recip.sFG", "rsqrt.sFG", false, + false, false, false, false, + false, false, false, false, + false, "cvt.d.sFG", false, false, + "cvt.w.sFG", "cvt.l.sFG", "cvt.ps.sFGH", false, + false, false, false, false, + false, false, false, false, + "c.f.sVGH", "c.un.sVGH", "c.eq.sVGH", "c.ueq.sVGH", + "c.olt.sVGH", "c.ult.sVGH", "c.ole.sVGH", "c.ule.sVGH", + "c.sf.sVGH", "c.ngle.sVGH", "c.seq.sVGH", "c.ngl.sVGH", + "c.lt.sVGH", "c.nge.sVGH", "c.le.sVGH", "c.ngt.sVGH", +} + +local map_cop1d = { + shift = 0, mask = 63, + [0] = "add.dFGH", "sub.dFGH", "mul.dFGH", "div.dFGH", + "sqrt.dFG", "abs.dFG", "mov.dFG", "neg.dFG", + "round.l.dFG", "trunc.l.dFG", "ceil.l.dFG", "floor.l.dFG", + "round.w.dFG", "trunc.w.dFG", "ceil.w.dFG", "floor.w.dFG", + false, + { shift = 16, mask = 1, [0] = "movf.dFGC", "movt.dFGC" }, + "movz.dFGT", "movn.dFGT", + false, "recip.dFG", "rsqrt.dFG", false, + false, false, false, false, + false, false, false, false, + "cvt.s.dFG", false, false, false, + "cvt.w.dFG", "cvt.l.dFG", false, false, + false, false, false, false, + false, false, false, false, + "c.f.dVGH", "c.un.dVGH", "c.eq.dVGH", "c.ueq.dVGH", + "c.olt.dVGH", "c.ult.dVGH", "c.ole.dVGH", "c.ule.dVGH", + "c.df.dVGH", "c.ngle.dVGH", "c.deq.dVGH", "c.ngl.dVGH", + "c.lt.dVGH", "c.nge.dVGH", "c.le.dVGH", "c.ngt.dVGH", +} + +local map_cop1ps = { + shift = 0, mask = 63, + [0] = "add.psFGH", "sub.psFGH", "mul.psFGH", false, + false, "abs.psFG", "mov.psFG", "neg.psFG", + false, false, false, false, + false, false, false, false, + false, + { shift = 16, mask = 1, [0] = "movf.psFGC", "movt.psFGC" }, + "movz.psFGT", "movn.psFGT", + false, false, false, false, + false, false, false, false, + false, false, false, false, + "cvt.s.puFG", false, false, false, + false, false, false, false, + "cvt.s.plFG", false, false, false, + "pll.psFGH", "plu.psFGH", "pul.psFGH", "puu.psFGH", + "c.f.psVGH", "c.un.psVGH", "c.eq.psVGH", "c.ueq.psVGH", + "c.olt.psVGH", "c.ult.psVGH", "c.ole.psVGH", "c.ule.psVGH", + "c.psf.psVGH", "c.ngle.psVGH", "c.pseq.psVGH", "c.ngl.psVGH", + "c.lt.psVGH", "c.nge.psVGH", "c.le.psVGH", "c.ngt.psVGH", +} + +local map_cop1w = { + shift = 0, mask = 63, + [32] = "cvt.s.wFG", [33] = "cvt.d.wFG", +} + +local map_cop1l = { + shift = 0, mask = 63, + [32] = "cvt.s.lFG", [33] = "cvt.d.lFG", +} + +local map_cop1bc = { + shift = 16, mask = 3, + [0] = "bc1fCB", "bc1tCB", "bc1flCB", "bc1tlCB", +} + +local map_cop1 = { + shift = 21, mask = 31, + [0] = "mfc1TG", "dmfc1TG", "cfc1TG", "mfhc1TG", + "mtc1TG", "dmtc1TG", "ctc1TG", "mthc1TG", + map_cop1bc, false, false, false, + false, false, false, false, + map_cop1s, map_cop1d, false, false, + map_cop1w, map_cop1l, map_cop1ps, +} + +local map_cop1x = { + shift = 0, mask = 63, + [0] = "lwxc1FSX", "ldxc1FSX", false, false, + false, "luxc1FSX", false, false, + "swxc1FSX", "sdxc1FSX", false, false, + false, "suxc1FSX", false, "prefxMSX", + false, false, false, false, + false, false, false, false, + false, false, false, false, + false, false, "alnv.psFGHS", false, + "madd.sFRGH", "madd.dFRGH", false, false, + false, false, "madd.psFRGH", false, + "msub.sFRGH", "msub.dFRGH", false, false, + false, false, "msub.psFRGH", false, + "nmadd.sFRGH", "nmadd.dFRGH", false, false, + false, false, "nmadd.psFRGH", false, + "nmsub.sFRGH", "nmsub.dFRGH", false, false, + false, false, "nmsub.psFRGH", false, +} + +local map_pri = { + [0] = map_special, map_regimm, "jJ", "jalJ", + "beq|beqz|bST00B", "bne|bnezST0B", "blezSB", "bgtzSB", + "addiTSI", "addiu|liTS0I", "sltiTSI", "sltiuTSI", + "andiTSU", "ori|liTS0U", "xoriTSU", "luiTU", + map_cop0, map_cop1, false, map_cop1x, + "beql|beqzlST0B", "bnel|bnezlST0B", "blezlSB", "bgtzlSB", + "daddiTSI", "daddiuTSI", false, false, + map_special2, "jalxJ", false, map_special3, + "lbTSO", "lhTSO", "lwlTSO", "lwTSO", + "lbuTSO", "lhuTSO", "lwrTSO", false, + "sbTSO", "shTSO", "swlTSO", "swTSO", + false, false, "swrTSO", "cacheNSO", + "llTSO", "lwc1HSO", "lwc2TSO", "prefNSO", + false, "ldc1HSO", "ldc2TSO", "ldTSO", + "scTSO", "swc1HSO", "swc2TSO", false, + false, "sdc1HSO", "sdc2TSO", "sdTSO", +} + +------------------------------------------------------------------------------ + +local map_gpr = { + [0] = "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", + "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", + "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", + "r24", "r25", "r26", "r27", "r28", "sp", "r30", "ra", +} + +------------------------------------------------------------------------------ + +-- Output a nicely formatted line with an opcode and operands. +local function putop(ctx, text, operands) + local pos = ctx.pos + local extra = "" + if ctx.rel then + local sym = ctx.symtab[ctx.rel] + if sym then extra = "\t->"..sym end + end + if ctx.hexdump > 0 then + ctx.out(format("%08x %s %-7s %s%s\n", + ctx.addr+pos, tohex(ctx.op), text, concat(operands, ", "), extra)) + else + ctx.out(format("%08x %-7s %s%s\n", + ctx.addr+pos, text, concat(operands, ", "), extra)) + end + ctx.pos = pos + 4 +end + +-- Fallback for unknown opcodes. +local function unknown(ctx) + return putop(ctx, ".long", { "0x"..tohex(ctx.op) }) +end + +local function get_be(ctx) + local pos = ctx.pos + local b0, b1, b2, b3 = byte(ctx.code, pos+1, pos+4) + return bor(lshift(b0, 24), lshift(b1, 16), lshift(b2, 8), b3) +end + +local function get_le(ctx) + local pos = ctx.pos + local b0, b1, b2, b3 = byte(ctx.code, pos+1, pos+4) + return bor(lshift(b3, 24), lshift(b2, 16), lshift(b1, 8), b0) +end + +-- Disassemble a single instruction. +local function disass_ins(ctx) + local op = ctx:get() + local operands = {} + local last = nil + ctx.op = op + ctx.rel = nil + + local opat = map_pri[rshift(op, 26)] + while type(opat) ~= "string" do + if not opat then return unknown(ctx) end + opat = opat[band(rshift(op, opat.shift), opat.mask)] or opat._ + end + local name, pat = match(opat, "^([a-z0-9_.]*)(.*)") + local altname, pat2 = match(pat, "|([a-z0-9_.|]*)(.*)") + if altname then pat = pat2 end + + for p in gmatch(pat, ".") do + local x = nil + if p == "S" then + x = map_gpr[band(rshift(op, 21), 31)] + elseif p == "T" then + x = map_gpr[band(rshift(op, 16), 31)] + elseif p == "D" then + x = map_gpr[band(rshift(op, 11), 31)] + elseif p == "F" then + x = "f"..band(rshift(op, 6), 31) + elseif p == "G" then + x = "f"..band(rshift(op, 11), 31) + elseif p == "H" then + x = "f"..band(rshift(op, 16), 31) + elseif p == "R" then + x = "f"..band(rshift(op, 21), 31) + elseif p == "A" then + x = band(rshift(op, 6), 31) + elseif p == "E" then + x = band(rshift(op, 6), 31) + 32 + elseif p == "M" then + x = band(rshift(op, 11), 31) + elseif p == "N" then + x = band(rshift(op, 16), 31) + elseif p == "C" then + x = band(rshift(op, 18), 7) + if x == 0 then x = nil end + elseif p == "K" then + x = band(rshift(op, 11), 31) + 1 + elseif p == "P" then + x = band(rshift(op, 11), 31) + 33 + elseif p == "L" then + x = band(rshift(op, 11), 31) - last + 1 + elseif p == "Q" then + x = band(rshift(op, 11), 31) - last + 33 + elseif p == "I" then + x = arshift(lshift(op, 16), 16) + elseif p == "U" then + x = band(op, 0xffff) + elseif p == "O" then + local disp = arshift(lshift(op, 16), 16) + operands[#operands] = format("%d(%s)", disp, last) + elseif p == "X" then + local index = map_gpr[band(rshift(op, 16), 31)] + operands[#operands] = format("%s(%s)", index, last) + elseif p == "B" then + x = ctx.addr + ctx.pos + arshift(lshift(op, 16), 16)*4 + 4 + ctx.rel = x + x = format("0x%08x", x) + elseif p == "J" then + local a = ctx.addr + ctx.pos + x = a - band(a, 0x0fffffff) + band(op, 0x03ffffff)*4 + ctx.rel = x + x = format("0x%08x", x) + elseif p == "V" then + x = band(rshift(op, 8), 7) + if x == 0 then x = nil end + elseif p == "W" then + x = band(op, 7) + if x == 0 then x = nil end + elseif p == "Y" then + x = band(rshift(op, 6), 0x000fffff) + if x == 0 then x = nil end + elseif p == "Z" then + x = band(rshift(op, 6), 1023) + if x == 0 then x = nil end + elseif p == "0" then + if last == "r0" or last == 0 then + local n = #operands + operands[n] = nil + last = operands[n-1] + if altname then + local a1, a2 = match(altname, "([^|]*)|(.*)") + if a1 then name, altname = a1, a2 + else name = altname end + end + end + elseif p == "1" then + if last == "ra" then + operands[#operands] = nil + end + else + assert(false) + end + if x then operands[#operands+1] = x; last = x end + end + + return putop(ctx, name, operands) +end + +------------------------------------------------------------------------------ + +-- Disassemble a block of code. +local function disass_block(ctx, ofs, len) + if not ofs then ofs = 0 end + local stop = len and ofs+len or #ctx.code + stop = stop - stop % 4 + ctx.pos = ofs - ofs % 4 + ctx.rel = nil + while ctx.pos < stop do disass_ins(ctx) end +end + +-- Extended API: create a disassembler context. Then call ctx:disass(ofs, len). +local function create(code, addr, out) + local ctx = {} + ctx.code = code + ctx.addr = addr or 0 + ctx.out = out or io.write + ctx.symtab = {} + ctx.disass = disass_block + ctx.hexdump = 8 + ctx.get = get_be + return ctx +end + +local function create_el(code, addr, out) + local ctx = create(code, addr, out) + ctx.get = get_le + return ctx +end + +-- Simple API: disassemble code (a string) at address and output via out. +local function disass(code, addr, out) + create(code, addr, out):disass() +end + +local function disass_el(code, addr, out) + create_el(code, addr, out):disass() +end + +-- Return register name for RID. +local function regname(r) + if r < 32 then return map_gpr[r] end + return "f"..(r-32) +end + +-- Public module functions. +return { + create = create, + create_el = create_el, + disass = disass, + disass_el = disass_el, + regname = regname +} + diff --git a/lua_probject/tolua_project/jit/dis_mips64.lua b/lua_probject/tolua_project/jit/dis_mips64.lua new file mode 100644 index 00000000..c4374928 --- /dev/null +++ b/lua_probject/tolua_project/jit/dis_mips64.lua @@ -0,0 +1,17 @@ +---------------------------------------------------------------------------- +-- LuaJIT MIPS64 disassembler wrapper module. +-- +-- Copyright (C) 2005-2017 Mike Pall. All rights reserved. +-- Released under the MIT license. See Copyright Notice in luajit.h +---------------------------------------------------------------------------- +-- This module just exports the big-endian functions from the +-- MIPS disassembler module. All the interesting stuff is there. +------------------------------------------------------------------------------ + +local dis_mips = require((string.match(..., ".*%.") or "").."dis_mips") +return { + create = dis_mips.create, + disass = dis_mips.disass, + regname = dis_mips.regname +} + diff --git a/lua_probject/tolua_project/jit/dis_mips64el.lua b/lua_probject/tolua_project/jit/dis_mips64el.lua new file mode 100644 index 00000000..2b1470af --- /dev/null +++ b/lua_probject/tolua_project/jit/dis_mips64el.lua @@ -0,0 +1,17 @@ +---------------------------------------------------------------------------- +-- LuaJIT MIPS64EL disassembler wrapper module. +-- +-- Copyright (C) 2005-2017 Mike Pall. All rights reserved. +-- Released under the MIT license. See Copyright Notice in luajit.h +---------------------------------------------------------------------------- +-- This module just exports the little-endian functions from the +-- MIPS disassembler module. All the interesting stuff is there. +------------------------------------------------------------------------------ + +local dis_mips = require((string.match(..., ".*%.") or "").."dis_mips") +return { + create = dis_mips.create_el, + disass = dis_mips.disass_el, + regname = dis_mips.regname +} + diff --git a/lua_probject/tolua_project/jit/dis_mipsel.lua b/lua_probject/tolua_project/jit/dis_mipsel.lua new file mode 100644 index 00000000..f69b11f0 --- /dev/null +++ b/lua_probject/tolua_project/jit/dis_mipsel.lua @@ -0,0 +1,17 @@ +---------------------------------------------------------------------------- +-- LuaJIT MIPSEL disassembler wrapper module. +-- +-- Copyright (C) 2005-2017 Mike Pall. All rights reserved. +-- Released under the MIT license. See Copyright Notice in luajit.h +---------------------------------------------------------------------------- +-- This module just exports the little-endian functions from the +-- MIPS disassembler module. All the interesting stuff is there. +------------------------------------------------------------------------------ + +local dis_mips = require((string.match(..., ".*%.") or "").."dis_mips") +return { + create = dis_mips.create_el, + disass = dis_mips.disass_el, + regname = dis_mips.regname +} + diff --git a/lua_probject/tolua_project/jit/dis_ppc.lua b/lua_probject/tolua_project/jit/dis_ppc.lua new file mode 100644 index 00000000..2aeb1b29 --- /dev/null +++ b/lua_probject/tolua_project/jit/dis_ppc.lua @@ -0,0 +1,591 @@ +---------------------------------------------------------------------------- +-- LuaJIT PPC disassembler module. +-- +-- Copyright (C) 2005-2017 Mike Pall. All rights reserved. +-- Released under the MIT/X license. See Copyright Notice in luajit.h +---------------------------------------------------------------------------- +-- This is a helper module used by the LuaJIT machine code dumper module. +-- +-- It disassembles all common, non-privileged 32/64 bit PowerPC instructions +-- plus the e500 SPE instructions and some Cell/Xenon extensions. +-- +-- NYI: VMX, VMX128 +------------------------------------------------------------------------------ + +local type = type +local byte, format = string.byte, string.format +local match, gmatch, gsub = string.match, string.gmatch, string.gsub +local concat = table.concat +local bit = require("bit") +local band, bor, tohex = bit.band, bit.bor, bit.tohex +local lshift, rshift, arshift = bit.lshift, bit.rshift, bit.arshift + +------------------------------------------------------------------------------ +-- Primary and extended opcode maps +------------------------------------------------------------------------------ + +local map_crops = { + shift = 1, mask = 1023, + [0] = "mcrfXX", + [33] = "crnor|crnotCCC=", [129] = "crandcCCC", + [193] = "crxor|crclrCCC%", [225] = "crnandCCC", + [257] = "crandCCC", [289] = "creqv|crsetCCC%", + [417] = "crorcCCC", [449] = "cror|crmoveCCC=", + [16] = "b_lrKB", [528] = "b_ctrKB", + [150] = "isync", +} + +local map_rlwinm = setmetatable({ + shift = 0, mask = -1, +}, +{ __index = function(t, x) + local rot = band(rshift(x, 11), 31) + local mb = band(rshift(x, 6), 31) + local me = band(rshift(x, 1), 31) + if mb == 0 and me == 31-rot then + return "slwiRR~A." + elseif me == 31 and mb == 32-rot then + return "srwiRR~-A." + else + return "rlwinmRR~AAA." + end + end +}) + +local map_rld = { + shift = 2, mask = 7, + [0] = "rldiclRR~HM.", "rldicrRR~HM.", "rldicRR~HM.", "rldimiRR~HM.", + { + shift = 1, mask = 1, + [0] = "rldclRR~RM.", "rldcrRR~RM.", + }, +} + +local map_ext = setmetatable({ + shift = 1, mask = 1023, + + [0] = "cmp_YLRR", [32] = "cmpl_YLRR", + [4] = "twARR", [68] = "tdARR", + + [8] = "subfcRRR.", [40] = "subfRRR.", + [104] = "negRR.", [136] = "subfeRRR.", + [200] = "subfzeRR.", [232] = "subfmeRR.", + [520] = "subfcoRRR.", [552] = "subfoRRR.", + [616] = "negoRR.", [648] = "subfeoRRR.", + [712] = "subfzeoRR.", [744] = "subfmeoRR.", + + [9] = "mulhduRRR.", [73] = "mulhdRRR.", [233] = "mulldRRR.", + [457] = "divduRRR.", [489] = "divdRRR.", + [745] = "mulldoRRR.", + [969] = "divduoRRR.", [1001] = "divdoRRR.", + + [10] = "addcRRR.", [138] = "addeRRR.", + [202] = "addzeRR.", [234] = "addmeRR.", [266] = "addRRR.", + [522] = "addcoRRR.", [650] = "addeoRRR.", + [714] = "addzeoRR.", [746] = "addmeoRR.", [778] = "addoRRR.", + + [11] = "mulhwuRRR.", [75] = "mulhwRRR.", [235] = "mullwRRR.", + [459] = "divwuRRR.", [491] = "divwRRR.", + [747] = "mullwoRRR.", + [971] = "divwouRRR.", [1003] = "divwoRRR.", + + [15] = "iselltRRR", [47] = "iselgtRRR", [79] = "iseleqRRR", + + [144] = { shift = 20, mask = 1, [0] = "mtcrfRZ~", "mtocrfRZ~", }, + [19] = { shift = 20, mask = 1, [0] = "mfcrR", "mfocrfRZ", }, + [371] = { shift = 11, mask = 1023, [392] = "mftbR", [424] = "mftbuR", }, + [339] = { + shift = 11, mask = 1023, + [32] = "mferR", [256] = "mflrR", [288] = "mfctrR", [16] = "mfspefscrR", + }, + [467] = { + shift = 11, mask = 1023, + [32] = "mtxerR", [256] = "mtlrR", [288] = "mtctrR", [16] = "mtspefscrR", + }, + + [20] = "lwarxRR0R", [84] = "ldarxRR0R", + + [21] = "ldxRR0R", [53] = "lduxRRR", + [149] = "stdxRR0R", [181] = "stduxRRR", + [341] = "lwaxRR0R", [373] = "lwauxRRR", + + [23] = "lwzxRR0R", [55] = "lwzuxRRR", + [87] = "lbzxRR0R", [119] = "lbzuxRRR", + [151] = "stwxRR0R", [183] = "stwuxRRR", + [215] = "stbxRR0R", [247] = "stbuxRRR", + [279] = "lhzxRR0R", [311] = "lhzuxRRR", + [343] = "lhaxRR0R", [375] = "lhauxRRR", + [407] = "sthxRR0R", [439] = "sthuxRRR", + + [54] = "dcbst-R0R", [86] = "dcbf-R0R", + [150] = "stwcxRR0R.", [214] = "stdcxRR0R.", + [246] = "dcbtst-R0R", [278] = "dcbt-R0R", + [310] = "eciwxRR0R", [438] = "ecowxRR0R", + [470] = "dcbi-RR", + + [598] = { + shift = 21, mask = 3, + [0] = "sync", "lwsync", "ptesync", + }, + [758] = "dcba-RR", + [854] = "eieio", [982] = "icbi-R0R", [1014] = "dcbz-R0R", + + [26] = "cntlzwRR~", [58] = "cntlzdRR~", + [122] = "popcntbRR~", + [154] = "prtywRR~", [186] = "prtydRR~", + + [28] = "andRR~R.", [60] = "andcRR~R.", [124] = "nor|notRR~R=.", + [284] = "eqvRR~R.", [316] = "xorRR~R.", + [412] = "orcRR~R.", [444] = "or|mrRR~R=.", [476] = "nandRR~R.", + [508] = "cmpbRR~R", + + [512] = "mcrxrX", + + [532] = "ldbrxRR0R", [660] = "stdbrxRR0R", + + [533] = "lswxRR0R", [597] = "lswiRR0A", + [661] = "stswxRR0R", [725] = "stswiRR0A", + + [534] = "lwbrxRR0R", [662] = "stwbrxRR0R", + [790] = "lhbrxRR0R", [918] = "sthbrxRR0R", + + [535] = "lfsxFR0R", [567] = "lfsuxFRR", + [599] = "lfdxFR0R", [631] = "lfduxFRR", + [663] = "stfsxFR0R", [695] = "stfsuxFRR", + [727] = "stfdxFR0R", [759] = "stfduxFR0R", + [855] = "lfiwaxFR0R", + [983] = "stfiwxFR0R", + + [24] = "slwRR~R.", + + [27] = "sldRR~R.", [536] = "srwRR~R.", + [792] = "srawRR~R.", [824] = "srawiRR~A.", + + [794] = "sradRR~R.", [826] = "sradiRR~H.", [827] = "sradiRR~H.", + [922] = "extshRR~.", [954] = "extsbRR~.", [986] = "extswRR~.", + + [539] = "srdRR~R.", +}, +{ __index = function(t, x) + if band(x, 31) == 15 then return "iselRRRC" end + end +}) + +local map_ld = { + shift = 0, mask = 3, + [0] = "ldRRE", "lduRRE", "lwaRRE", +} + +local map_std = { + shift = 0, mask = 3, + [0] = "stdRRE", "stduRRE", +} + +local map_fps = { + shift = 5, mask = 1, + { + shift = 1, mask = 15, + [0] = false, false, "fdivsFFF.", false, + "fsubsFFF.", "faddsFFF.", "fsqrtsF-F.", false, + "fresF-F.", "fmulsFF-F.", "frsqrtesF-F.", false, + "fmsubsFFFF~.", "fmaddsFFFF~.", "fnmsubsFFFF~.", "fnmaddsFFFF~.", + } +} + +local map_fpd = { + shift = 5, mask = 1, + [0] = { + shift = 1, mask = 1023, + [0] = "fcmpuXFF", [32] = "fcmpoXFF", [64] = "mcrfsXX", + [38] = "mtfsb1A.", [70] = "mtfsb0A.", [134] = "mtfsfiA>>-A>", + [8] = "fcpsgnFFF.", [40] = "fnegF-F.", [72] = "fmrF-F.", + [136] = "fnabsF-F.", [264] = "fabsF-F.", + [12] = "frspF-F.", + [14] = "fctiwF-F.", [15] = "fctiwzF-F.", + [583] = "mffsF.", [711] = "mtfsfZF.", + [392] = "frinF-F.", [424] = "frizF-F.", + [456] = "fripF-F.", [488] = "frimF-F.", + [814] = "fctidF-F.", [815] = "fctidzF-F.", [846] = "fcfidF-F.", + }, + { + shift = 1, mask = 15, + [0] = false, false, "fdivFFF.", false, + "fsubFFF.", "faddFFF.", "fsqrtF-F.", "fselFFFF~.", + "freF-F.", "fmulFF-F.", "frsqrteF-F.", false, + "fmsubFFFF~.", "fmaddFFFF~.", "fnmsubFFFF~.", "fnmaddFFFF~.", + } +} + +local map_spe = { + shift = 0, mask = 2047, + + [512] = "evaddwRRR", [514] = "evaddiwRAR~", + [516] = "evsubwRRR~", [518] = "evsubiwRAR~", + [520] = "evabsRR", [521] = "evnegRR", + [522] = "evextsbRR", [523] = "evextshRR", [524] = "evrndwRR", + [525] = "evcntlzwRR", [526] = "evcntlswRR", + + [527] = "brincRRR", + + [529] = "evandRRR", [530] = "evandcRRR", [534] = "evxorRRR", + [535] = "evor|evmrRRR=", [536] = "evnor|evnotRRR=", + [537] = "eveqvRRR", [539] = "evorcRRR", [542] = "evnandRRR", + + [544] = "evsrwuRRR", [545] = "evsrwsRRR", + [546] = "evsrwiuRRA", [547] = "evsrwisRRA", + [548] = "evslwRRR", [550] = "evslwiRRA", + [552] = "evrlwRRR", [553] = "evsplatiRS", + [554] = "evrlwiRRA", [555] = "evsplatfiRS", + [556] = "evmergehiRRR", [557] = "evmergeloRRR", + [558] = "evmergehiloRRR", [559] = "evmergelohiRRR", + + [560] = "evcmpgtuYRR", [561] = "evcmpgtsYRR", + [562] = "evcmpltuYRR", [563] = "evcmpltsYRR", + [564] = "evcmpeqYRR", + + [632] = "evselRRR", [633] = "evselRRRW", + [634] = "evselRRRW", [635] = "evselRRRW", + [636] = "evselRRRW", [637] = "evselRRRW", + [638] = "evselRRRW", [639] = "evselRRRW", + + [640] = "evfsaddRRR", [641] = "evfssubRRR", + [644] = "evfsabsRR", [645] = "evfsnabsRR", [646] = "evfsnegRR", + [648] = "evfsmulRRR", [649] = "evfsdivRRR", + [652] = "evfscmpgtYRR", [653] = "evfscmpltYRR", [654] = "evfscmpeqYRR", + [656] = "evfscfuiR-R", [657] = "evfscfsiR-R", + [658] = "evfscfufR-R", [659] = "evfscfsfR-R", + [660] = "evfsctuiR-R", [661] = "evfsctsiR-R", + [662] = "evfsctufR-R", [663] = "evfsctsfR-R", + [664] = "evfsctuizR-R", [666] = "evfsctsizR-R", + [668] = "evfststgtYRR", [669] = "evfststltYRR", [670] = "evfststeqYRR", + + [704] = "efsaddRRR", [705] = "efssubRRR", + [708] = "efsabsRR", [709] = "efsnabsRR", [710] = "efsnegRR", + [712] = "efsmulRRR", [713] = "efsdivRRR", + [716] = "efscmpgtYRR", [717] = "efscmpltYRR", [718] = "efscmpeqYRR", + [719] = "efscfdR-R", + [720] = "efscfuiR-R", [721] = "efscfsiR-R", + [722] = "efscfufR-R", [723] = "efscfsfR-R", + [724] = "efsctuiR-R", [725] = "efsctsiR-R", + [726] = "efsctufR-R", [727] = "efsctsfR-R", + [728] = "efsctuizR-R", [730] = "efsctsizR-R", + [732] = "efststgtYRR", [733] = "efststltYRR", [734] = "efststeqYRR", + + [736] = "efdaddRRR", [737] = "efdsubRRR", + [738] = "efdcfuidR-R", [739] = "efdcfsidR-R", + [740] = "efdabsRR", [741] = "efdnabsRR", [742] = "efdnegRR", + [744] = "efdmulRRR", [745] = "efddivRRR", + [746] = "efdctuidzR-R", [747] = "efdctsidzR-R", + [748] = "efdcmpgtYRR", [749] = "efdcmpltYRR", [750] = "efdcmpeqYRR", + [751] = "efdcfsR-R", + [752] = "efdcfuiR-R", [753] = "efdcfsiR-R", + [754] = "efdcfufR-R", [755] = "efdcfsfR-R", + [756] = "efdctuiR-R", [757] = "efdctsiR-R", + [758] = "efdctufR-R", [759] = "efdctsfR-R", + [760] = "efdctuizR-R", [762] = "efdctsizR-R", + [764] = "efdtstgtYRR", [765] = "efdtstltYRR", [766] = "efdtsteqYRR", + + [768] = "evlddxRR0R", [769] = "evlddRR8", + [770] = "evldwxRR0R", [771] = "evldwRR8", + [772] = "evldhxRR0R", [773] = "evldhRR8", + [776] = "evlhhesplatxRR0R", [777] = "evlhhesplatRR2", + [780] = "evlhhousplatxRR0R", [781] = "evlhhousplatRR2", + [782] = "evlhhossplatxRR0R", [783] = "evlhhossplatRR2", + [784] = "evlwhexRR0R", [785] = "evlwheRR4", + [788] = "evlwhouxRR0R", [789] = "evlwhouRR4", + [790] = "evlwhosxRR0R", [791] = "evlwhosRR4", + [792] = "evlwwsplatxRR0R", [793] = "evlwwsplatRR4", + [796] = "evlwhsplatxRR0R", [797] = "evlwhsplatRR4", + + [800] = "evstddxRR0R", [801] = "evstddRR8", + [802] = "evstdwxRR0R", [803] = "evstdwRR8", + [804] = "evstdhxRR0R", [805] = "evstdhRR8", + [816] = "evstwhexRR0R", [817] = "evstwheRR4", + [820] = "evstwhoxRR0R", [821] = "evstwhoRR4", + [824] = "evstwwexRR0R", [825] = "evstwweRR4", + [828] = "evstwwoxRR0R", [829] = "evstwwoRR4", + + [1027] = "evmhessfRRR", [1031] = "evmhossfRRR", [1032] = "evmheumiRRR", + [1033] = "evmhesmiRRR", [1035] = "evmhesmfRRR", [1036] = "evmhoumiRRR", + [1037] = "evmhosmiRRR", [1039] = "evmhosmfRRR", [1059] = "evmhessfaRRR", + [1063] = "evmhossfaRRR", [1064] = "evmheumiaRRR", [1065] = "evmhesmiaRRR", + [1067] = "evmhesmfaRRR", [1068] = "evmhoumiaRRR", [1069] = "evmhosmiaRRR", + [1071] = "evmhosmfaRRR", [1095] = "evmwhssfRRR", [1096] = "evmwlumiRRR", + [1100] = "evmwhumiRRR", [1101] = "evmwhsmiRRR", [1103] = "evmwhsmfRRR", + [1107] = "evmwssfRRR", [1112] = "evmwumiRRR", [1113] = "evmwsmiRRR", + [1115] = "evmwsmfRRR", [1127] = "evmwhssfaRRR", [1128] = "evmwlumiaRRR", + [1132] = "evmwhumiaRRR", [1133] = "evmwhsmiaRRR", [1135] = "evmwhsmfaRRR", + [1139] = "evmwssfaRRR", [1144] = "evmwumiaRRR", [1145] = "evmwsmiaRRR", + [1147] = "evmwsmfaRRR", + + [1216] = "evaddusiaawRR", [1217] = "evaddssiaawRR", + [1218] = "evsubfusiaawRR", [1219] = "evsubfssiaawRR", + [1220] = "evmraRR", + [1222] = "evdivwsRRR", [1223] = "evdivwuRRR", + [1224] = "evaddumiaawRR", [1225] = "evaddsmiaawRR", + [1226] = "evsubfumiaawRR", [1227] = "evsubfsmiaawRR", + + [1280] = "evmheusiaawRRR", [1281] = "evmhessiaawRRR", + [1283] = "evmhessfaawRRR", [1284] = "evmhousiaawRRR", + [1285] = "evmhossiaawRRR", [1287] = "evmhossfaawRRR", + [1288] = "evmheumiaawRRR", [1289] = "evmhesmiaawRRR", + [1291] = "evmhesmfaawRRR", [1292] = "evmhoumiaawRRR", + [1293] = "evmhosmiaawRRR", [1295] = "evmhosmfaawRRR", + [1320] = "evmhegumiaaRRR", [1321] = "evmhegsmiaaRRR", + [1323] = "evmhegsmfaaRRR", [1324] = "evmhogumiaaRRR", + [1325] = "evmhogsmiaaRRR", [1327] = "evmhogsmfaaRRR", + [1344] = "evmwlusiaawRRR", [1345] = "evmwlssiaawRRR", + [1352] = "evmwlumiaawRRR", [1353] = "evmwlsmiaawRRR", + [1363] = "evmwssfaaRRR", [1368] = "evmwumiaaRRR", + [1369] = "evmwsmiaaRRR", [1371] = "evmwsmfaaRRR", + [1408] = "evmheusianwRRR", [1409] = "evmhessianwRRR", + [1411] = "evmhessfanwRRR", [1412] = "evmhousianwRRR", + [1413] = "evmhossianwRRR", [1415] = "evmhossfanwRRR", + [1416] = "evmheumianwRRR", [1417] = "evmhesmianwRRR", + [1419] = "evmhesmfanwRRR", [1420] = "evmhoumianwRRR", + [1421] = "evmhosmianwRRR", [1423] = "evmhosmfanwRRR", + [1448] = "evmhegumianRRR", [1449] = "evmhegsmianRRR", + [1451] = "evmhegsmfanRRR", [1452] = "evmhogumianRRR", + [1453] = "evmhogsmianRRR", [1455] = "evmhogsmfanRRR", + [1472] = "evmwlusianwRRR", [1473] = "evmwlssianwRRR", + [1480] = "evmwlumianwRRR", [1481] = "evmwlsmianwRRR", + [1491] = "evmwssfanRRR", [1496] = "evmwumianRRR", + [1497] = "evmwsmianRRR", [1499] = "evmwsmfanRRR", +} + +local map_pri = { + [0] = false, false, "tdiARI", "twiARI", + map_spe, false, false, "mulliRRI", + "subficRRI", false, "cmpl_iYLRU", "cmp_iYLRI", + "addicRRI", "addic.RRI", "addi|liRR0I", "addis|lisRR0I", + "b_KBJ", "sc", "bKJ", map_crops, + "rlwimiRR~AAA.", map_rlwinm, false, "rlwnmRR~RAA.", + "oriNRR~U", "orisRR~U", "xoriRR~U", "xorisRR~U", + "andi.RR~U", "andis.RR~U", map_rld, map_ext, + "lwzRRD", "lwzuRRD", "lbzRRD", "lbzuRRD", + "stwRRD", "stwuRRD", "stbRRD", "stbuRRD", + "lhzRRD", "lhzuRRD", "lhaRRD", "lhauRRD", + "sthRRD", "sthuRRD", "lmwRRD", "stmwRRD", + "lfsFRD", "lfsuFRD", "lfdFRD", "lfduFRD", + "stfsFRD", "stfsuFRD", "stfdFRD", "stfduFRD", + false, false, map_ld, map_fps, + false, false, map_std, map_fpd, +} + +------------------------------------------------------------------------------ + +local map_gpr = { + [0] = "r0", "sp", "r2", "r3", "r4", "r5", "r6", "r7", + "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", + "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", + "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31", +} + +local map_cond = { [0] = "lt", "gt", "eq", "so", "ge", "le", "ne", "ns", } + +-- Format a condition bit. +local function condfmt(cond) + if cond <= 3 then + return map_cond[band(cond, 3)] + else + return format("4*cr%d+%s", rshift(cond, 2), map_cond[band(cond, 3)]) + end +end + +------------------------------------------------------------------------------ + +-- Output a nicely formatted line with an opcode and operands. +local function putop(ctx, text, operands) + local pos = ctx.pos + local extra = "" + if ctx.rel then + local sym = ctx.symtab[ctx.rel] + if sym then extra = "\t->"..sym end + end + if ctx.hexdump > 0 then + ctx.out(format("%08x %s %-7s %s%s\n", + ctx.addr+pos, tohex(ctx.op), text, concat(operands, ", "), extra)) + else + ctx.out(format("%08x %-7s %s%s\n", + ctx.addr+pos, text, concat(operands, ", "), extra)) + end + ctx.pos = pos + 4 +end + +-- Fallback for unknown opcodes. +local function unknown(ctx) + return putop(ctx, ".long", { "0x"..tohex(ctx.op) }) +end + +-- Disassemble a single instruction. +local function disass_ins(ctx) + local pos = ctx.pos + local b0, b1, b2, b3 = byte(ctx.code, pos+1, pos+4) + local op = bor(lshift(b0, 24), lshift(b1, 16), lshift(b2, 8), b3) + local operands = {} + local last = nil + local rs = 21 + ctx.op = op + ctx.rel = nil + + local opat = map_pri[rshift(b0, 2)] + while type(opat) ~= "string" do + if not opat then return unknown(ctx) end + opat = opat[band(rshift(op, opat.shift), opat.mask)] + end + local name, pat = match(opat, "^([a-z0-9_.]*)(.*)") + local altname, pat2 = match(pat, "|([a-z0-9_.]*)(.*)") + if altname then pat = pat2 end + + for p in gmatch(pat, ".") do + local x = nil + if p == "R" then + x = map_gpr[band(rshift(op, rs), 31)] + rs = rs - 5 + elseif p == "F" then + x = "f"..band(rshift(op, rs), 31) + rs = rs - 5 + elseif p == "A" then + x = band(rshift(op, rs), 31) + rs = rs - 5 + elseif p == "S" then + x = arshift(lshift(op, 27-rs), 27) + rs = rs - 5 + elseif p == "I" then + x = arshift(lshift(op, 16), 16) + elseif p == "U" then + x = band(op, 0xffff) + elseif p == "D" or p == "E" then + local disp = arshift(lshift(op, 16), 16) + if p == "E" then disp = band(disp, -4) end + if last == "r0" then last = "0" end + operands[#operands] = format("%d(%s)", disp, last) + elseif p >= "2" and p <= "8" then + local disp = band(rshift(op, rs), 31) * p + if last == "r0" then last = "0" end + operands[#operands] = format("%d(%s)", disp, last) + elseif p == "H" then + x = band(rshift(op, rs), 31) + lshift(band(op, 2), 4) + rs = rs - 5 + elseif p == "M" then + x = band(rshift(op, rs), 31) + band(op, 0x20) + elseif p == "C" then + x = condfmt(band(rshift(op, rs), 31)) + rs = rs - 5 + elseif p == "B" then + local bo = rshift(op, 21) + local cond = band(rshift(op, 16), 31) + local cn = "" + rs = rs - 10 + if band(bo, 4) == 0 then + cn = band(bo, 2) == 0 and "dnz" or "dz" + if band(bo, 0x10) == 0 then + cn = cn..(band(bo, 8) == 0 and "f" or "t") + end + if band(bo, 0x10) == 0 then x = condfmt(cond) end + name = name..(band(bo, 1) == band(rshift(op, 15), 1) and "-" or "+") + elseif band(bo, 0x10) == 0 then + cn = map_cond[band(cond, 3) + (band(bo, 8) == 0 and 4 or 0)] + if cond > 3 then x = "cr"..rshift(cond, 2) end + name = name..(band(bo, 1) == band(rshift(op, 15), 1) and "-" or "+") + end + name = gsub(name, "_", cn) + elseif p == "J" then + x = arshift(lshift(op, 27-rs), 29-rs)*4 + if band(op, 2) == 0 then x = ctx.addr + pos + x end + ctx.rel = x + x = "0x"..tohex(x) + elseif p == "K" then + if band(op, 1) ~= 0 then name = name.."l" end + if band(op, 2) ~= 0 then name = name.."a" end + elseif p == "X" or p == "Y" then + x = band(rshift(op, rs+2), 7) + if x == 0 and p == "Y" then x = nil else x = "cr"..x end + rs = rs - 5 + elseif p == "W" then + x = "cr"..band(op, 7) + elseif p == "Z" then + x = band(rshift(op, rs-4), 255) + rs = rs - 10 + elseif p == ">" then + operands[#operands] = rshift(operands[#operands], 1) + elseif p == "0" then + if last == "r0" then + operands[#operands] = nil + if altname then name = altname end + end + elseif p == "L" then + name = gsub(name, "_", band(op, 0x00200000) ~= 0 and "d" or "w") + elseif p == "." then + if band(op, 1) == 1 then name = name.."." end + elseif p == "N" then + if op == 0x60000000 then name = "nop"; break end + elseif p == "~" then + local n = #operands + operands[n-1], operands[n] = operands[n], operands[n-1] + elseif p == "=" then + local n = #operands + if last == operands[n-1] then + operands[n] = nil + name = altname + end + elseif p == "%" then + local n = #operands + if last == operands[n-1] and last == operands[n-2] then + operands[n] = nil + operands[n-1] = nil + name = altname + end + elseif p == "-" then + rs = rs - 5 + else + assert(false) + end + if x then operands[#operands+1] = x; last = x end + end + + return putop(ctx, name, operands) +end + +------------------------------------------------------------------------------ + +-- Disassemble a block of code. +local function disass_block(ctx, ofs, len) + if not ofs then ofs = 0 end + local stop = len and ofs+len or #ctx.code + stop = stop - stop % 4 + ctx.pos = ofs - ofs % 4 + ctx.rel = nil + while ctx.pos < stop do disass_ins(ctx) end +end + +-- Extended API: create a disassembler context. Then call ctx:disass(ofs, len). +local function create(code, addr, out) + local ctx = {} + ctx.code = code + ctx.addr = addr or 0 + ctx.out = out or io.write + ctx.symtab = {} + ctx.disass = disass_block + ctx.hexdump = 8 + return ctx +end + +-- Simple API: disassemble code (a string) at address and output via out. +local function disass(code, addr, out) + create(code, addr, out):disass() +end + +-- Return register name for RID. +local function regname(r) + if r < 32 then return map_gpr[r] end + return "f"..(r-32) +end + +-- Public module functions. +return { + create = create, + disass = disass, + regname = regname +} + diff --git a/lua_probject/tolua_project/jit/dis_x64.lua b/lua_probject/tolua_project/jit/dis_x64.lua new file mode 100644 index 00000000..d5714ee1 --- /dev/null +++ b/lua_probject/tolua_project/jit/dis_x64.lua @@ -0,0 +1,17 @@ +---------------------------------------------------------------------------- +-- LuaJIT x64 disassembler wrapper module. +-- +-- Copyright (C) 2005-2017 Mike Pall. All rights reserved. +-- Released under the MIT license. See Copyright Notice in luajit.h +---------------------------------------------------------------------------- +-- This module just exports the 64 bit functions from the combined +-- x86/x64 disassembler module. All the interesting stuff is there. +------------------------------------------------------------------------------ + +local dis_x86 = require((string.match(..., ".*%.") or "").."dis_x86") +return { + create = dis_x86.create64, + disass = dis_x86.disass64, + regname = dis_x86.regname64 +} + diff --git a/lua_probject/tolua_project/jit/dis_x86.lua b/lua_probject/tolua_project/jit/dis_x86.lua new file mode 100644 index 00000000..4371233d --- /dev/null +++ b/lua_probject/tolua_project/jit/dis_x86.lua @@ -0,0 +1,931 @@ +---------------------------------------------------------------------------- +-- LuaJIT x86/x64 disassembler module. +-- +-- Copyright (C) 2005-2017 Mike Pall. All rights reserved. +-- Released under the MIT license. See Copyright Notice in luajit.h +---------------------------------------------------------------------------- +-- This is a helper module used by the LuaJIT machine code dumper module. +-- +-- Sending small code snippets to an external disassembler and mixing the +-- output with our own stuff was too fragile. So I had to bite the bullet +-- and write yet another x86 disassembler. Oh well ... +-- +-- The output format is very similar to what ndisasm generates. But it has +-- been developed independently by looking at the opcode tables from the +-- Intel and AMD manuals. The supported instruction set is quite extensive +-- and reflects what a current generation Intel or AMD CPU implements in +-- 32 bit and 64 bit mode. Yes, this includes MMX, SSE, SSE2, SSE3, SSSE3, +-- SSE4.1, SSE4.2, SSE4a, AVX, AVX2 and even privileged and hypervisor +-- (VMX/SVM) instructions. +-- +-- Notes: +-- * The (useless) a16 prefix, 3DNow and pre-586 opcodes are unsupported. +-- * No attempt at optimization has been made -- it's fast enough for my needs. +------------------------------------------------------------------------------ + +local type = type +local sub, byte, format = string.sub, string.byte, string.format +local match, gmatch, gsub = string.match, string.gmatch, string.gsub +local lower, rep = string.lower, string.rep +local bit = require("bit") +local tohex = bit.tohex + +-- Map for 1st opcode byte in 32 bit mode. Ugly? Well ... read on. +local map_opc1_32 = { +--0x +[0]="addBmr","addVmr","addBrm","addVrm","addBai","addVai","push es","pop es", +"orBmr","orVmr","orBrm","orVrm","orBai","orVai","push cs","opc2*", +--1x +"adcBmr","adcVmr","adcBrm","adcVrm","adcBai","adcVai","push ss","pop ss", +"sbbBmr","sbbVmr","sbbBrm","sbbVrm","sbbBai","sbbVai","push ds","pop ds", +--2x +"andBmr","andVmr","andBrm","andVrm","andBai","andVai","es:seg","daa", +"subBmr","subVmr","subBrm","subVrm","subBai","subVai","cs:seg","das", +--3x +"xorBmr","xorVmr","xorBrm","xorVrm","xorBai","xorVai","ss:seg","aaa", +"cmpBmr","cmpVmr","cmpBrm","cmpVrm","cmpBai","cmpVai","ds:seg","aas", +--4x +"incVR","incVR","incVR","incVR","incVR","incVR","incVR","incVR", +"decVR","decVR","decVR","decVR","decVR","decVR","decVR","decVR", +--5x +"pushUR","pushUR","pushUR","pushUR","pushUR","pushUR","pushUR","pushUR", +"popUR","popUR","popUR","popUR","popUR","popUR","popUR","popUR", +--6x +"sz*pushaw,pusha","sz*popaw,popa","boundVrm","arplWmr", +"fs:seg","gs:seg","o16:","a16", +"pushUi","imulVrmi","pushBs","imulVrms", +"insb","insVS","outsb","outsVS", +--7x +"joBj","jnoBj","jbBj","jnbBj","jzBj","jnzBj","jbeBj","jaBj", +"jsBj","jnsBj","jpeBj","jpoBj","jlBj","jgeBj","jleBj","jgBj", +--8x +"arith!Bmi","arith!Vmi","arith!Bmi","arith!Vms", +"testBmr","testVmr","xchgBrm","xchgVrm", +"movBmr","movVmr","movBrm","movVrm", +"movVmg","leaVrm","movWgm","popUm", +--9x +"nop*xchgVaR|pause|xchgWaR|repne nop","xchgVaR","xchgVaR","xchgVaR", +"xchgVaR","xchgVaR","xchgVaR","xchgVaR", +"sz*cbw,cwde,cdqe","sz*cwd,cdq,cqo","call farViw","wait", +"sz*pushfw,pushf","sz*popfw,popf","sahf","lahf", +--Ax +"movBao","movVao","movBoa","movVoa", +"movsb","movsVS","cmpsb","cmpsVS", +"testBai","testVai","stosb","stosVS", +"lodsb","lodsVS","scasb","scasVS", +--Bx +"movBRi","movBRi","movBRi","movBRi","movBRi","movBRi","movBRi","movBRi", +"movVRI","movVRI","movVRI","movVRI","movVRI","movVRI","movVRI","movVRI", +--Cx +"shift!Bmu","shift!Vmu","retBw","ret","vex*3$lesVrm","vex*2$ldsVrm","movBmi","movVmi", +"enterBwu","leave","retfBw","retf","int3","intBu","into","iretVS", +--Dx +"shift!Bm1","shift!Vm1","shift!Bmc","shift!Vmc","aamBu","aadBu","salc","xlatb", +"fp*0","fp*1","fp*2","fp*3","fp*4","fp*5","fp*6","fp*7", +--Ex +"loopneBj","loopeBj","loopBj","sz*jcxzBj,jecxzBj,jrcxzBj", +"inBau","inVau","outBua","outVua", +"callVj","jmpVj","jmp farViw","jmpBj","inBad","inVad","outBda","outVda", +--Fx +"lock:","int1","repne:rep","rep:","hlt","cmc","testb!Bm","testv!Vm", +"clc","stc","cli","sti","cld","std","incb!Bm","incd!Vm", +} +assert(#map_opc1_32 == 255) + +-- Map for 1st opcode byte in 64 bit mode (overrides only). +local map_opc1_64 = setmetatable({ + [0x06]=false, [0x07]=false, [0x0e]=false, + [0x16]=false, [0x17]=false, [0x1e]=false, [0x1f]=false, + [0x27]=false, [0x2f]=false, [0x37]=false, [0x3f]=false, + [0x60]=false, [0x61]=false, [0x62]=false, [0x63]="movsxdVrDmt", [0x67]="a32:", + [0x40]="rex*", [0x41]="rex*b", [0x42]="rex*x", [0x43]="rex*xb", + [0x44]="rex*r", [0x45]="rex*rb", [0x46]="rex*rx", [0x47]="rex*rxb", + [0x48]="rex*w", [0x49]="rex*wb", [0x4a]="rex*wx", [0x4b]="rex*wxb", + [0x4c]="rex*wr", [0x4d]="rex*wrb", [0x4e]="rex*wrx", [0x4f]="rex*wrxb", + [0x82]=false, [0x9a]=false, [0xc4]="vex*3", [0xc5]="vex*2", [0xce]=false, + [0xd4]=false, [0xd5]=false, [0xd6]=false, [0xea]=false, +}, { __index = map_opc1_32 }) + +-- Map for 2nd opcode byte (0F xx). True CISC hell. Hey, I told you. +-- Prefix dependent MMX/SSE opcodes: (none)|rep|o16|repne, -|F3|66|F2 +local map_opc2 = { +--0x +[0]="sldt!Dmp","sgdt!Ump","larVrm","lslVrm",nil,"syscall","clts","sysret", +"invd","wbinvd",nil,"ud1",nil,"$prefetch!Bm","femms","3dnowMrmu", +--1x +"movupsXrm|movssXrvm|movupdXrm|movsdXrvm", +"movupsXmr|movssXmvr|movupdXmr|movsdXmvr", +"movhlpsXrm$movlpsXrm|movsldupXrm|movlpdXrm|movddupXrm", +"movlpsXmr||movlpdXmr", +"unpcklpsXrvm||unpcklpdXrvm", +"unpckhpsXrvm||unpckhpdXrvm", +"movlhpsXrm$movhpsXrm|movshdupXrm|movhpdXrm", +"movhpsXmr||movhpdXmr", +"$prefetcht!Bm","hintnopVm","hintnopVm","hintnopVm", +"hintnopVm","hintnopVm","hintnopVm","hintnopVm", +--2x +"movUmx$","movUmy$","movUxm$","movUym$","movUmz$",nil,"movUzm$",nil, +"movapsXrm||movapdXrm", +"movapsXmr||movapdXmr", +"cvtpi2psXrMm|cvtsi2ssXrvVmt|cvtpi2pdXrMm|cvtsi2sdXrvVmt", +"movntpsXmr|movntssXmr|movntpdXmr|movntsdXmr", +"cvttps2piMrXm|cvttss2siVrXm|cvttpd2piMrXm|cvttsd2siVrXm", +"cvtps2piMrXm|cvtss2siVrXm|cvtpd2piMrXm|cvtsd2siVrXm", +"ucomissXrm||ucomisdXrm", +"comissXrm||comisdXrm", +--3x +"wrmsr","rdtsc","rdmsr","rdpmc","sysenter","sysexit",nil,"getsec", +"opc3*38",nil,"opc3*3a",nil,nil,nil,nil,nil, +--4x +"cmovoVrm","cmovnoVrm","cmovbVrm","cmovnbVrm", +"cmovzVrm","cmovnzVrm","cmovbeVrm","cmovaVrm", +"cmovsVrm","cmovnsVrm","cmovpeVrm","cmovpoVrm", +"cmovlVrm","cmovgeVrm","cmovleVrm","cmovgVrm", +--5x +"movmskpsVrXm$||movmskpdVrXm$","sqrtpsXrm|sqrtssXrm|sqrtpdXrm|sqrtsdXrm", +"rsqrtpsXrm|rsqrtssXrvm","rcppsXrm|rcpssXrvm", +"andpsXrvm||andpdXrvm","andnpsXrvm||andnpdXrvm", +"orpsXrvm||orpdXrvm","xorpsXrvm||xorpdXrvm", +"addpsXrvm|addssXrvm|addpdXrvm|addsdXrvm","mulpsXrvm|mulssXrvm|mulpdXrvm|mulsdXrvm", +"cvtps2pdXrm|cvtss2sdXrvm|cvtpd2psXrm|cvtsd2ssXrvm", +"cvtdq2psXrm|cvttps2dqXrm|cvtps2dqXrm", +"subpsXrvm|subssXrvm|subpdXrvm|subsdXrvm","minpsXrvm|minssXrvm|minpdXrvm|minsdXrvm", +"divpsXrvm|divssXrvm|divpdXrvm|divsdXrvm","maxpsXrvm|maxssXrvm|maxpdXrvm|maxsdXrvm", +--6x +"punpcklbwPrvm","punpcklwdPrvm","punpckldqPrvm","packsswbPrvm", +"pcmpgtbPrvm","pcmpgtwPrvm","pcmpgtdPrvm","packuswbPrvm", +"punpckhbwPrvm","punpckhwdPrvm","punpckhdqPrvm","packssdwPrvm", +"||punpcklqdqXrvm","||punpckhqdqXrvm", +"movPrVSm","movqMrm|movdquXrm|movdqaXrm", +--7x +"pshufwMrmu|pshufhwXrmu|pshufdXrmu|pshuflwXrmu","pshiftw!Pvmu", +"pshiftd!Pvmu","pshiftq!Mvmu||pshiftdq!Xvmu", +"pcmpeqbPrvm","pcmpeqwPrvm","pcmpeqdPrvm","emms*|", +"vmreadUmr||extrqXmuu$|insertqXrmuu$","vmwriteUrm||extrqXrm$|insertqXrm$", +nil,nil, +"||haddpdXrvm|haddpsXrvm","||hsubpdXrvm|hsubpsXrvm", +"movVSmMr|movqXrm|movVSmXr","movqMmr|movdquXmr|movdqaXmr", +--8x +"joVj","jnoVj","jbVj","jnbVj","jzVj","jnzVj","jbeVj","jaVj", +"jsVj","jnsVj","jpeVj","jpoVj","jlVj","jgeVj","jleVj","jgVj", +--9x +"setoBm","setnoBm","setbBm","setnbBm","setzBm","setnzBm","setbeBm","setaBm", +"setsBm","setnsBm","setpeBm","setpoBm","setlBm","setgeBm","setleBm","setgBm", +--Ax +"push fs","pop fs","cpuid","btVmr","shldVmru","shldVmrc",nil,nil, +"push gs","pop gs","rsm","btsVmr","shrdVmru","shrdVmrc","fxsave!Dmp","imulVrm", +--Bx +"cmpxchgBmr","cmpxchgVmr","$lssVrm","btrVmr", +"$lfsVrm","$lgsVrm","movzxVrBmt","movzxVrWmt", +"|popcntVrm","ud2Dp","bt!Vmu","btcVmr", +"bsfVrm","bsrVrm|lzcntVrm|bsrWrm","movsxVrBmt","movsxVrWmt", +--Cx +"xaddBmr","xaddVmr", +"cmppsXrvmu|cmpssXrvmu|cmppdXrvmu|cmpsdXrvmu","$movntiVmr|", +"pinsrwPrvWmu","pextrwDrPmu", +"shufpsXrvmu||shufpdXrvmu","$cmpxchg!Qmp", +"bswapVR","bswapVR","bswapVR","bswapVR","bswapVR","bswapVR","bswapVR","bswapVR", +--Dx +"||addsubpdXrvm|addsubpsXrvm","psrlwPrvm","psrldPrvm","psrlqPrvm", +"paddqPrvm","pmullwPrvm", +"|movq2dqXrMm|movqXmr|movdq2qMrXm$","pmovmskbVrMm||pmovmskbVrXm", +"psubusbPrvm","psubuswPrvm","pminubPrvm","pandPrvm", +"paddusbPrvm","padduswPrvm","pmaxubPrvm","pandnPrvm", +--Ex +"pavgbPrvm","psrawPrvm","psradPrvm","pavgwPrvm", +"pmulhuwPrvm","pmulhwPrvm", +"|cvtdq2pdXrm|cvttpd2dqXrm|cvtpd2dqXrm","$movntqMmr||$movntdqXmr", +"psubsbPrvm","psubswPrvm","pminswPrvm","porPrvm", +"paddsbPrvm","paddswPrvm","pmaxswPrvm","pxorPrvm", +--Fx +"|||lddquXrm","psllwPrvm","pslldPrvm","psllqPrvm", +"pmuludqPrvm","pmaddwdPrvm","psadbwPrvm","maskmovqMrm||maskmovdquXrm$", +"psubbPrvm","psubwPrvm","psubdPrvm","psubqPrvm", +"paddbPrvm","paddwPrvm","padddPrvm","ud", +} +assert(map_opc2[255] == "ud") + +-- Map for three-byte opcodes. Can't wait for their next invention. +local map_opc3 = { +["38"] = { -- [66] 0f 38 xx +--0x +[0]="pshufbPrvm","phaddwPrvm","phadddPrvm","phaddswPrvm", +"pmaddubswPrvm","phsubwPrvm","phsubdPrvm","phsubswPrvm", +"psignbPrvm","psignwPrvm","psigndPrvm","pmulhrswPrvm", +"||permilpsXrvm","||permilpdXrvm",nil,nil, +--1x +"||pblendvbXrma",nil,nil,nil, +"||blendvpsXrma","||blendvpdXrma","||permpsXrvm","||ptestXrm", +"||broadcastssXrm","||broadcastsdXrm","||broadcastf128XrlXm",nil, +"pabsbPrm","pabswPrm","pabsdPrm",nil, +--2x +"||pmovsxbwXrm","||pmovsxbdXrm","||pmovsxbqXrm","||pmovsxwdXrm", +"||pmovsxwqXrm","||pmovsxdqXrm",nil,nil, +"||pmuldqXrvm","||pcmpeqqXrvm","||$movntdqaXrm","||packusdwXrvm", +"||maskmovpsXrvm","||maskmovpdXrvm","||maskmovpsXmvr","||maskmovpdXmvr", +--3x +"||pmovzxbwXrm","||pmovzxbdXrm","||pmovzxbqXrm","||pmovzxwdXrm", +"||pmovzxwqXrm","||pmovzxdqXrm","||permdXrvm","||pcmpgtqXrvm", +"||pminsbXrvm","||pminsdXrvm","||pminuwXrvm","||pminudXrvm", +"||pmaxsbXrvm","||pmaxsdXrvm","||pmaxuwXrvm","||pmaxudXrvm", +--4x +"||pmulddXrvm","||phminposuwXrm",nil,nil, +nil,"||psrlvVSXrvm","||psravdXrvm","||psllvVSXrvm", +--5x +[0x58] = "||pbroadcastdXrlXm",[0x59] = "||pbroadcastqXrlXm", +[0x5a] = "||broadcasti128XrlXm", +--7x +[0x78] = "||pbroadcastbXrlXm",[0x79] = "||pbroadcastwXrlXm", +--8x +[0x8c] = "||pmaskmovXrvVSm", +[0x8e] = "||pmaskmovVSmXvr", +--Dx +[0xdc] = "||aesencXrvm", [0xdd] = "||aesenclastXrvm", +[0xde] = "||aesdecXrvm", [0xdf] = "||aesdeclastXrvm", +--Fx +[0xf0] = "|||crc32TrBmt",[0xf1] = "|||crc32TrVmt", +[0xf7] = "| sarxVrmv| shlxVrmv| shrxVrmv", +}, + +["3a"] = { -- [66] 0f 3a xx +--0x +[0x00]="||permqXrmu","||permpdXrmu","||pblenddXrvmu",nil, +"||permilpsXrmu","||permilpdXrmu","||perm2f128Xrvmu",nil, +"||roundpsXrmu","||roundpdXrmu","||roundssXrvmu","||roundsdXrvmu", +"||blendpsXrvmu","||blendpdXrvmu","||pblendwXrvmu","palignrPrvmu", +--1x +nil,nil,nil,nil, +"||pextrbVmXru","||pextrwVmXru","||pextrVmSXru","||extractpsVmXru", +"||insertf128XrvlXmu","||extractf128XlXmYru",nil,nil, +nil,nil,nil,nil, +--2x +"||pinsrbXrvVmu","||insertpsXrvmu","||pinsrXrvVmuS",nil, +--3x +[0x38] = "||inserti128Xrvmu",[0x39] = "||extracti128XlXmYru", +--4x +[0x40] = "||dppsXrvmu", +[0x41] = "||dppdXrvmu", +[0x42] = "||mpsadbwXrvmu", +[0x44] = "||pclmulqdqXrvmu", +[0x46] = "||perm2i128Xrvmu", +[0x4a] = "||blendvpsXrvmb",[0x4b] = "||blendvpdXrvmb", +[0x4c] = "||pblendvbXrvmb", +--6x +[0x60] = "||pcmpestrmXrmu",[0x61] = "||pcmpestriXrmu", +[0x62] = "||pcmpistrmXrmu",[0x63] = "||pcmpistriXrmu", +[0xdf] = "||aeskeygenassistXrmu", +--Fx +[0xf0] = "||| rorxVrmu", +}, +} + +-- Map for VMX/SVM opcodes 0F 01 C0-FF (sgdt group with register operands). +local map_opcvm = { +[0xc1]="vmcall",[0xc2]="vmlaunch",[0xc3]="vmresume",[0xc4]="vmxoff", +[0xc8]="monitor",[0xc9]="mwait", +[0xd8]="vmrun",[0xd9]="vmmcall",[0xda]="vmload",[0xdb]="vmsave", +[0xdc]="stgi",[0xdd]="clgi",[0xde]="skinit",[0xdf]="invlpga", +[0xf8]="swapgs",[0xf9]="rdtscp", +} + +-- Map for FP opcodes. And you thought stack machines are simple? +local map_opcfp = { +-- D8-DF 00-BF: opcodes with a memory operand. +-- D8 +[0]="faddFm","fmulFm","fcomFm","fcompFm","fsubFm","fsubrFm","fdivFm","fdivrFm", +"fldFm",nil,"fstFm","fstpFm","fldenvVm","fldcwWm","fnstenvVm","fnstcwWm", +-- DA +"fiaddDm","fimulDm","ficomDm","ficompDm", +"fisubDm","fisubrDm","fidivDm","fidivrDm", +-- DB +"fildDm","fisttpDm","fistDm","fistpDm",nil,"fld twordFmp",nil,"fstp twordFmp", +-- DC +"faddGm","fmulGm","fcomGm","fcompGm","fsubGm","fsubrGm","fdivGm","fdivrGm", +-- DD +"fldGm","fisttpQm","fstGm","fstpGm","frstorDmp",nil,"fnsaveDmp","fnstswWm", +-- DE +"fiaddWm","fimulWm","ficomWm","ficompWm", +"fisubWm","fisubrWm","fidivWm","fidivrWm", +-- DF +"fildWm","fisttpWm","fistWm","fistpWm", +"fbld twordFmp","fildQm","fbstp twordFmp","fistpQm", +-- xx C0-FF: opcodes with a pseudo-register operand. +-- D8 +"faddFf","fmulFf","fcomFf","fcompFf","fsubFf","fsubrFf","fdivFf","fdivrFf", +-- D9 +"fldFf","fxchFf",{"fnop"},nil, +{"fchs","fabs",nil,nil,"ftst","fxam"}, +{"fld1","fldl2t","fldl2e","fldpi","fldlg2","fldln2","fldz"}, +{"f2xm1","fyl2x","fptan","fpatan","fxtract","fprem1","fdecstp","fincstp"}, +{"fprem","fyl2xp1","fsqrt","fsincos","frndint","fscale","fsin","fcos"}, +-- DA +"fcmovbFf","fcmoveFf","fcmovbeFf","fcmovuFf",nil,{nil,"fucompp"},nil,nil, +-- DB +"fcmovnbFf","fcmovneFf","fcmovnbeFf","fcmovnuFf", +{nil,nil,"fnclex","fninit"},"fucomiFf","fcomiFf",nil, +-- DC +"fadd toFf","fmul toFf",nil,nil, +"fsub toFf","fsubr toFf","fdivr toFf","fdiv toFf", +-- DD +"ffreeFf",nil,"fstFf","fstpFf","fucomFf","fucompFf",nil,nil, +-- DE +"faddpFf","fmulpFf",nil,{nil,"fcompp"}, +"fsubrpFf","fsubpFf","fdivrpFf","fdivpFf", +-- DF +nil,nil,nil,nil,{"fnstsw ax"},"fucomipFf","fcomipFf",nil, +} +assert(map_opcfp[126] == "fcomipFf") + +-- Map for opcode groups. The subkey is sp from the ModRM byte. +local map_opcgroup = { + arith = { "add", "or", "adc", "sbb", "and", "sub", "xor", "cmp" }, + shift = { "rol", "ror", "rcl", "rcr", "shl", "shr", "sal", "sar" }, + testb = { "testBmi", "testBmi", "not", "neg", "mul", "imul", "div", "idiv" }, + testv = { "testVmi", "testVmi", "not", "neg", "mul", "imul", "div", "idiv" }, + incb = { "inc", "dec" }, + incd = { "inc", "dec", "callUmp", "$call farDmp", + "jmpUmp", "$jmp farDmp", "pushUm" }, + sldt = { "sldt", "str", "lldt", "ltr", "verr", "verw" }, + sgdt = { "vm*$sgdt", "vm*$sidt", "$lgdt", "vm*$lidt", + "smsw", nil, "lmsw", "vm*$invlpg" }, + bt = { nil, nil, nil, nil, "bt", "bts", "btr", "btc" }, + cmpxchg = { nil, "sz*,cmpxchg8bQmp,cmpxchg16bXmp", nil, nil, + nil, nil, "vmptrld|vmxon|vmclear", "vmptrst" }, + pshiftw = { nil, nil, "psrlw", nil, "psraw", nil, "psllw" }, + pshiftd = { nil, nil, "psrld", nil, "psrad", nil, "pslld" }, + pshiftq = { nil, nil, "psrlq", nil, nil, nil, "psllq" }, + pshiftdq = { nil, nil, "psrlq", "psrldq", nil, nil, "psllq", "pslldq" }, + fxsave = { "$fxsave", "$fxrstor", "$ldmxcsr", "$stmxcsr", + nil, "lfenceDp$", "mfenceDp$", "sfenceDp$clflush" }, + prefetch = { "prefetch", "prefetchw" }, + prefetcht = { "prefetchnta", "prefetcht0", "prefetcht1", "prefetcht2" }, +} + +------------------------------------------------------------------------------ + +-- Maps for register names. +local map_regs = { + B = { "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh", + "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b" }, + B64 = { "al", "cl", "dl", "bl", "spl", "bpl", "sil", "dil", + "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b" }, + W = { "ax", "cx", "dx", "bx", "sp", "bp", "si", "di", + "r8w", "r9w", "r10w", "r11w", "r12w", "r13w", "r14w", "r15w" }, + D = { "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi", + "r8d", "r9d", "r10d", "r11d", "r12d", "r13d", "r14d", "r15d" }, + Q = { "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", + "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" }, + M = { "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7", + "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7" }, -- No x64 ext! + X = { "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", + "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15" }, + Y = { "ymm0", "ymm1", "ymm2", "ymm3", "ymm4", "ymm5", "ymm6", "ymm7", + "ymm8", "ymm9", "ymm10", "ymm11", "ymm12", "ymm13", "ymm14", "ymm15" }, +} +local map_segregs = { "es", "cs", "ss", "ds", "fs", "gs", "segr6", "segr7" } + +-- Maps for size names. +local map_sz2n = { + B = 1, W = 2, D = 4, Q = 8, M = 8, X = 16, Y = 32, +} +local map_sz2prefix = { + B = "byte", W = "word", D = "dword", + Q = "qword", + M = "qword", X = "xword", Y = "yword", + F = "dword", G = "qword", -- No need for sizes/register names for these two. +} + +------------------------------------------------------------------------------ + +-- Output a nicely formatted line with an opcode and operands. +local function putop(ctx, text, operands) + local code, pos, hex = ctx.code, ctx.pos, "" + local hmax = ctx.hexdump + if hmax > 0 then + for i=ctx.start,pos-1 do + hex = hex..format("%02X", byte(code, i, i)) + end + if #hex > hmax then hex = sub(hex, 1, hmax)..". " + else hex = hex..rep(" ", hmax-#hex+2) end + end + if operands then text = text.." "..operands end + if ctx.o16 then text = "o16 "..text; ctx.o16 = false end + if ctx.a32 then text = "a32 "..text; ctx.a32 = false end + if ctx.rep then text = ctx.rep.." "..text; ctx.rep = false end + if ctx.rex then + local t = (ctx.rexw and "w" or "")..(ctx.rexr and "r" or "").. + (ctx.rexx and "x" or "")..(ctx.rexb and "b" or "").. + (ctx.vexl and "l" or "") + if ctx.vexv and ctx.vexv ~= 0 then t = t.."v"..ctx.vexv end + if t ~= "" then text = ctx.rex.."."..t.." "..gsub(text, "^ ", "") + elseif ctx.rex == "vex" then text = gsub("v"..text, "^v ", "") end + ctx.rexw = false; ctx.rexr = false; ctx.rexx = false; ctx.rexb = false + ctx.rex = false; ctx.vexl = false; ctx.vexv = false + end + if ctx.seg then + local text2, n = gsub(text, "%[", "["..ctx.seg..":") + if n == 0 then text = ctx.seg.." "..text else text = text2 end + ctx.seg = false + end + if ctx.lock then text = "lock "..text; ctx.lock = false end + local imm = ctx.imm + if imm then + local sym = ctx.symtab[imm] + if sym then text = text.."\t->"..sym end + end + ctx.out(format("%08x %s%s\n", ctx.addr+ctx.start, hex, text)) + ctx.mrm = false + ctx.vexv = false + ctx.start = pos + ctx.imm = nil +end + +-- Clear all prefix flags. +local function clearprefixes(ctx) + ctx.o16 = false; ctx.seg = false; ctx.lock = false; ctx.rep = false + ctx.rexw = false; ctx.rexr = false; ctx.rexx = false; ctx.rexb = false + ctx.rex = false; ctx.a32 = false; ctx.vexl = false +end + +-- Fallback for incomplete opcodes at the end. +local function incomplete(ctx) + ctx.pos = ctx.stop+1 + clearprefixes(ctx) + return putop(ctx, "(incomplete)") +end + +-- Fallback for unknown opcodes. +local function unknown(ctx) + clearprefixes(ctx) + return putop(ctx, "(unknown)") +end + +-- Return an immediate of the specified size. +local function getimm(ctx, pos, n) + if pos+n-1 > ctx.stop then return incomplete(ctx) end + local code = ctx.code + if n == 1 then + local b1 = byte(code, pos, pos) + return b1 + elseif n == 2 then + local b1, b2 = byte(code, pos, pos+1) + return b1+b2*256 + else + local b1, b2, b3, b4 = byte(code, pos, pos+3) + local imm = b1+b2*256+b3*65536+b4*16777216 + ctx.imm = imm + return imm + end +end + +-- Process pattern string and generate the operands. +local function putpat(ctx, name, pat) + local operands, regs, sz, mode, sp, rm, sc, rx, sdisp + local code, pos, stop, vexl = ctx.code, ctx.pos, ctx.stop, ctx.vexl + + -- Chars used: 1DFGIMPQRSTUVWXYabcdfgijlmoprstuvwxyz + for p in gmatch(pat, ".") do + local x = nil + if p == "V" or p == "U" then + if ctx.rexw then sz = "Q"; ctx.rexw = false + elseif ctx.o16 then sz = "W"; ctx.o16 = false + elseif p == "U" and ctx.x64 then sz = "Q" + else sz = "D" end + regs = map_regs[sz] + elseif p == "T" then + if ctx.rexw then sz = "Q"; ctx.rexw = false else sz = "D" end + regs = map_regs[sz] + elseif p == "B" then + sz = "B" + regs = ctx.rex and map_regs.B64 or map_regs.B + elseif match(p, "[WDQMXYFG]") then + sz = p + if sz == "X" and vexl then sz = "Y"; ctx.vexl = false end + regs = map_regs[sz] + elseif p == "P" then + sz = ctx.o16 and "X" or "M"; ctx.o16 = false + if sz == "X" and vexl then sz = "Y"; ctx.vexl = false end + regs = map_regs[sz] + elseif p == "S" then + name = name..lower(sz) + elseif p == "s" then + local imm = getimm(ctx, pos, 1); if not imm then return end + x = imm <= 127 and format("+0x%02x", imm) + or format("-0x%02x", 256-imm) + pos = pos+1 + elseif p == "u" then + local imm = getimm(ctx, pos, 1); if not imm then return end + x = format("0x%02x", imm) + pos = pos+1 + elseif p == "b" then + local imm = getimm(ctx, pos, 1); if not imm then return end + x = regs[imm/16+1] + pos = pos+1 + elseif p == "w" then + local imm = getimm(ctx, pos, 2); if not imm then return end + x = format("0x%x", imm) + pos = pos+2 + elseif p == "o" then -- [offset] + if ctx.x64 then + local imm1 = getimm(ctx, pos, 4); if not imm1 then return end + local imm2 = getimm(ctx, pos+4, 4); if not imm2 then return end + x = format("[0x%08x%08x]", imm2, imm1) + pos = pos+8 + else + local imm = getimm(ctx, pos, 4); if not imm then return end + x = format("[0x%08x]", imm) + pos = pos+4 + end + elseif p == "i" or p == "I" then + local n = map_sz2n[sz] + if n == 8 and ctx.x64 and p == "I" then + local imm1 = getimm(ctx, pos, 4); if not imm1 then return end + local imm2 = getimm(ctx, pos+4, 4); if not imm2 then return end + x = format("0x%08x%08x", imm2, imm1) + else + if n == 8 then n = 4 end + local imm = getimm(ctx, pos, n); if not imm then return end + if sz == "Q" and (imm < 0 or imm > 0x7fffffff) then + imm = (0xffffffff+1)-imm + x = format(imm > 65535 and "-0x%08x" or "-0x%x", imm) + else + x = format(imm > 65535 and "0x%08x" or "0x%x", imm) + end + end + pos = pos+n + elseif p == "j" then + local n = map_sz2n[sz] + if n == 8 then n = 4 end + local imm = getimm(ctx, pos, n); if not imm then return end + if sz == "B" and imm > 127 then imm = imm-256 + elseif imm > 2147483647 then imm = imm-4294967296 end + pos = pos+n + imm = imm + pos + ctx.addr + if imm > 4294967295 and not ctx.x64 then imm = imm-4294967296 end + ctx.imm = imm + if sz == "W" then + x = format("word 0x%04x", imm%65536) + elseif ctx.x64 then + local lo = imm % 0x1000000 + x = format("0x%02x%06x", (imm-lo) / 0x1000000, lo) + else + x = "0x"..tohex(imm) + end + elseif p == "R" then + local r = byte(code, pos-1, pos-1)%8 + if ctx.rexb then r = r + 8; ctx.rexb = false end + x = regs[r+1] + elseif p == "a" then x = regs[1] + elseif p == "c" then x = "cl" + elseif p == "d" then x = "dx" + elseif p == "1" then x = "1" + else + if not mode then + mode = ctx.mrm + if not mode then + if pos > stop then return incomplete(ctx) end + mode = byte(code, pos, pos) + pos = pos+1 + end + rm = mode%8; mode = (mode-rm)/8 + sp = mode%8; mode = (mode-sp)/8 + sdisp = "" + if mode < 3 then + if rm == 4 then + if pos > stop then return incomplete(ctx) end + sc = byte(code, pos, pos) + pos = pos+1 + rm = sc%8; sc = (sc-rm)/8 + rx = sc%8; sc = (sc-rx)/8 + if ctx.rexx then rx = rx + 8; ctx.rexx = false end + if rx == 4 then rx = nil end + end + if mode > 0 or rm == 5 then + local dsz = mode + if dsz ~= 1 then dsz = 4 end + local disp = getimm(ctx, pos, dsz); if not disp then return end + if mode == 0 then rm = nil end + if rm or rx or (not sc and ctx.x64 and not ctx.a32) then + if dsz == 1 and disp > 127 then + sdisp = format("-0x%x", 256-disp) + elseif disp >= 0 and disp <= 0x7fffffff then + sdisp = format("+0x%x", disp) + else + sdisp = format("-0x%x", (0xffffffff+1)-disp) + end + else + sdisp = format(ctx.x64 and not ctx.a32 and + not (disp >= 0 and disp <= 0x7fffffff) + and "0xffffffff%08x" or "0x%08x", disp) + end + pos = pos+dsz + end + end + if rm and ctx.rexb then rm = rm + 8; ctx.rexb = false end + if ctx.rexr then sp = sp + 8; ctx.rexr = false end + end + if p == "m" then + if mode == 3 then x = regs[rm+1] + else + local aregs = ctx.a32 and map_regs.D or ctx.aregs + local srm, srx = "", "" + if rm then srm = aregs[rm+1] + elseif not sc and ctx.x64 and not ctx.a32 then srm = "rip" end + ctx.a32 = false + if rx then + if rm then srm = srm.."+" end + srx = aregs[rx+1] + if sc > 0 then srx = srx.."*"..(2^sc) end + end + x = format("[%s%s%s]", srm, srx, sdisp) + end + if mode < 3 and + (not match(pat, "[aRrgp]") or match(pat, "t")) then -- Yuck. + x = map_sz2prefix[sz].." "..x + end + elseif p == "r" then x = regs[sp+1] + elseif p == "g" then x = map_segregs[sp+1] + elseif p == "p" then -- Suppress prefix. + elseif p == "f" then x = "st"..rm + elseif p == "x" then + if sp == 0 and ctx.lock and not ctx.x64 then + x = "CR8"; ctx.lock = false + else + x = "CR"..sp + end + elseif p == "v" then + if ctx.vexv then + x = regs[ctx.vexv+1]; ctx.vexv = false + end + elseif p == "y" then x = "DR"..sp + elseif p == "z" then x = "TR"..sp + elseif p == "l" then vexl = false + elseif p == "t" then + else + error("bad pattern `"..pat.."'") + end + end + if x then operands = operands and operands..", "..x or x end + end + ctx.pos = pos + return putop(ctx, name, operands) +end + +-- Forward declaration. +local map_act + +-- Fetch and cache MRM byte. +local function getmrm(ctx) + local mrm = ctx.mrm + if not mrm then + local pos = ctx.pos + if pos > ctx.stop then return nil end + mrm = byte(ctx.code, pos, pos) + ctx.pos = pos+1 + ctx.mrm = mrm + end + return mrm +end + +-- Dispatch to handler depending on pattern. +local function dispatch(ctx, opat, patgrp) + if not opat then return unknown(ctx) end + if match(opat, "%|") then -- MMX/SSE variants depending on prefix. + local p + if ctx.rep then + p = ctx.rep=="rep" and "%|([^%|]*)" or "%|[^%|]*%|[^%|]*%|([^%|]*)" + ctx.rep = false + elseif ctx.o16 then p = "%|[^%|]*%|([^%|]*)"; ctx.o16 = false + else p = "^[^%|]*" end + opat = match(opat, p) + if not opat then return unknown(ctx) end +-- ctx.rep = false; ctx.o16 = false + --XXX fails for 66 f2 0f 38 f1 06 crc32 eax,WORD PTR [esi] + --XXX remove in branches? + end + if match(opat, "%$") then -- reg$mem variants. + local mrm = getmrm(ctx); if not mrm then return incomplete(ctx) end + opat = match(opat, mrm >= 192 and "^[^%$]*" or "%$(.*)") + if opat == "" then return unknown(ctx) end + end + if opat == "" then return unknown(ctx) end + local name, pat = match(opat, "^([a-z0-9 ]*)(.*)") + if pat == "" and patgrp then pat = patgrp end + return map_act[sub(pat, 1, 1)](ctx, name, pat) +end + +-- Get a pattern from an opcode map and dispatch to handler. +local function dispatchmap(ctx, opcmap) + local pos = ctx.pos + local opat = opcmap[byte(ctx.code, pos, pos)] + pos = pos + 1 + ctx.pos = pos + return dispatch(ctx, opat) +end + +-- Map for action codes. The key is the first char after the name. +map_act = { + -- Simple opcodes without operands. + [""] = function(ctx, name, pat) + return putop(ctx, name) + end, + + -- Operand size chars fall right through. + B = putpat, W = putpat, D = putpat, Q = putpat, + V = putpat, U = putpat, T = putpat, + M = putpat, X = putpat, P = putpat, + F = putpat, G = putpat, Y = putpat, + + -- Collect prefixes. + [":"] = function(ctx, name, pat) + ctx[pat == ":" and name or sub(pat, 2)] = name + if ctx.pos - ctx.start > 5 then return unknown(ctx) end -- Limit #prefixes. + end, + + -- Chain to special handler specified by name. + ["*"] = function(ctx, name, pat) + return map_act[name](ctx, name, sub(pat, 2)) + end, + + -- Use named subtable for opcode group. + ["!"] = function(ctx, name, pat) + local mrm = getmrm(ctx); if not mrm then return incomplete(ctx) end + return dispatch(ctx, map_opcgroup[name][((mrm-(mrm%8))/8)%8+1], sub(pat, 2)) + end, + + -- o16,o32[,o64] variants. + sz = function(ctx, name, pat) + if ctx.o16 then ctx.o16 = false + else + pat = match(pat, ",(.*)") + if ctx.rexw then + local p = match(pat, ",(.*)") + if p then pat = p; ctx.rexw = false end + end + end + pat = match(pat, "^[^,]*") + return dispatch(ctx, pat) + end, + + -- Two-byte opcode dispatch. + opc2 = function(ctx, name, pat) + return dispatchmap(ctx, map_opc2) + end, + + -- Three-byte opcode dispatch. + opc3 = function(ctx, name, pat) + return dispatchmap(ctx, map_opc3[pat]) + end, + + -- VMX/SVM dispatch. + vm = function(ctx, name, pat) + return dispatch(ctx, map_opcvm[ctx.mrm]) + end, + + -- Floating point opcode dispatch. + fp = function(ctx, name, pat) + local mrm = getmrm(ctx); if not mrm then return incomplete(ctx) end + local rm = mrm%8 + local idx = pat*8 + ((mrm-rm)/8)%8 + if mrm >= 192 then idx = idx + 64 end + local opat = map_opcfp[idx] + if type(opat) == "table" then opat = opat[rm+1] end + return dispatch(ctx, opat) + end, + + -- REX prefix. + rex = function(ctx, name, pat) + if ctx.rex then return unknown(ctx) end -- Only 1 REX or VEX prefix allowed. + for p in gmatch(pat, ".") do ctx["rex"..p] = true end + ctx.rex = "rex" + end, + + -- VEX prefix. + vex = function(ctx, name, pat) + if ctx.rex then return unknown(ctx) end -- Only 1 REX or VEX prefix allowed. + ctx.rex = "vex" + local pos = ctx.pos + if ctx.mrm then + ctx.mrm = nil + pos = pos-1 + end + local b = byte(ctx.code, pos, pos) + if not b then return incomplete(ctx) end + pos = pos+1 + if b < 128 then ctx.rexr = true end + local m = 1 + if pat == "3" then + m = b%32; b = (b-m)/32 + local nb = b%2; b = (b-nb)/2 + if nb == 0 then ctx.rexb = true end + local nx = b%2 + if nx == 0 then ctx.rexx = true end + b = byte(ctx.code, pos, pos) + if not b then return incomplete(ctx) end + pos = pos+1 + if b >= 128 then ctx.rexw = true end + end + ctx.pos = pos + local map + if m == 1 then map = map_opc2 + elseif m == 2 then map = map_opc3["38"] + elseif m == 3 then map = map_opc3["3a"] + else return unknown(ctx) end + local p = b%4; b = (b-p)/4 + if p == 1 then ctx.o16 = "o16" + elseif p == 2 then ctx.rep = "rep" + elseif p == 3 then ctx.rep = "repne" end + local l = b%2; b = (b-l)/2 + if l ~= 0 then ctx.vexl = true end + ctx.vexv = (-1-b)%16 + return dispatchmap(ctx, map) + end, + + -- Special case for nop with REX prefix. + nop = function(ctx, name, pat) + return dispatch(ctx, ctx.rex and pat or "nop") + end, + + -- Special case for 0F 77. + emms = function(ctx, name, pat) + if ctx.rex ~= "vex" then + return putop(ctx, "emms") + elseif ctx.vexl then + ctx.vexl = false + return putop(ctx, "zeroall") + else + return putop(ctx, "zeroupper") + end + end, +} + +------------------------------------------------------------------------------ + +-- Disassemble a block of code. +local function disass_block(ctx, ofs, len) + if not ofs then ofs = 0 end + local stop = len and ofs+len or #ctx.code + ofs = ofs + 1 + ctx.start = ofs + ctx.pos = ofs + ctx.stop = stop + ctx.imm = nil + ctx.mrm = false + clearprefixes(ctx) + while ctx.pos <= stop do dispatchmap(ctx, ctx.map1) end + if ctx.pos ~= ctx.start then incomplete(ctx) end +end + +-- Extended API: create a disassembler context. Then call ctx:disass(ofs, len). +local function create(code, addr, out) + local ctx = {} + ctx.code = code + ctx.addr = (addr or 0) - 1 + ctx.out = out or io.write + ctx.symtab = {} + ctx.disass = disass_block + ctx.hexdump = 16 + ctx.x64 = false + ctx.map1 = map_opc1_32 + ctx.aregs = map_regs.D + return ctx +end + +local function create64(code, addr, out) + local ctx = create(code, addr, out) + ctx.x64 = true + ctx.map1 = map_opc1_64 + ctx.aregs = map_regs.Q + return ctx +end + +-- Simple API: disassemble code (a string) at address and output via out. +local function disass(code, addr, out) + create(code, addr, out):disass() +end + +local function disass64(code, addr, out) + create64(code, addr, out):disass() +end + +-- Return register name for RID. +local function regname(r) + if r < 8 then return map_regs.D[r+1] end + return map_regs.X[r-7] +end + +local function regname64(r) + if r < 16 then return map_regs.Q[r+1] end + return map_regs.X[r-15] +end + +-- Public module functions. +return { + create = create, + create64 = create64, + disass = disass, + disass64 = disass64, + regname = regname, + regname64 = regname64 +} + diff --git a/lua_probject/tolua_project/jit/dump.lua b/lua_probject/tolua_project/jit/dump.lua new file mode 100644 index 00000000..2bea652b --- /dev/null +++ b/lua_probject/tolua_project/jit/dump.lua @@ -0,0 +1,712 @@ +---------------------------------------------------------------------------- +-- LuaJIT compiler dump module. +-- +-- Copyright (C) 2005-2017 Mike Pall. All rights reserved. +-- Released under the MIT license. See Copyright Notice in luajit.h +---------------------------------------------------------------------------- +-- +-- This module can be used to debug the JIT compiler itself. It dumps the +-- code representations and structures used in various compiler stages. +-- +-- Example usage: +-- +-- luajit -jdump -e "local x=0; for i=1,1e6 do x=x+i end; print(x)" +-- luajit -jdump=im -e "for i=1,1000 do for j=1,1000 do end end" | less -R +-- luajit -jdump=is myapp.lua | less -R +-- luajit -jdump=-b myapp.lua +-- luajit -jdump=+aH,myapp.html myapp.lua +-- luajit -jdump=ixT,myapp.dump myapp.lua +-- +-- The first argument specifies the dump mode. The second argument gives +-- the output file name. Default output is to stdout, unless the environment +-- variable LUAJIT_DUMPFILE is set. The file is overwritten every time the +-- module is started. +-- +-- Different features can be turned on or off with the dump mode. If the +-- mode starts with a '+', the following features are added to the default +-- set of features; a '-' removes them. Otherwise the features are replaced. +-- +-- The following dump features are available (* marks the default): +-- +-- * t Print a line for each started, ended or aborted trace (see also -jv). +-- * b Dump the traced bytecode. +-- * i Dump the IR (intermediate representation). +-- r Augment the IR with register/stack slots. +-- s Dump the snapshot map. +-- * m Dump the generated machine code. +-- x Print each taken trace exit. +-- X Print each taken trace exit and the contents of all registers. +-- a Print the IR of aborted traces, too. +-- +-- The output format can be set with the following characters: +-- +-- T Plain text output. +-- A ANSI-colored text output +-- H Colorized HTML + CSS output. +-- +-- The default output format is plain text. It's set to ANSI-colored text +-- if the COLORTERM variable is set. Note: this is independent of any output +-- redirection, which is actually considered a feature. +-- +-- You probably want to use less -R to enjoy viewing ANSI-colored text from +-- a pipe or a file. Add this to your ~/.bashrc: export LESS="-R" +-- +------------------------------------------------------------------------------ + +-- Cache some library functions and objects. +local jit = require("jit") +assert(jit.version_num == 20100, "LuaJIT core/library version mismatch") +local jutil = require("jit.util") +local vmdef = require("jit.vmdef") +local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc +local traceinfo, traceir, tracek = jutil.traceinfo, jutil.traceir, jutil.tracek +local tracemc, tracesnap = jutil.tracemc, jutil.tracesnap +local traceexitstub, ircalladdr = jutil.traceexitstub, jutil.ircalladdr +local bit = require("bit") +local band, shr, tohex = bit.band, bit.rshift, bit.tohex +local sub, gsub, format = string.sub, string.gsub, string.format +local byte, rep = string.byte, string.rep +local type, tostring = type, tostring +local stdout, stderr = io.stdout, io.stderr + +-- Load other modules on-demand. +local bcline, disass + +-- Active flag, output file handle and dump mode. +local active, out, dumpmode + +------------------------------------------------------------------------------ + +local symtabmt = { __index = false } +local symtab = {} +local nexitsym = 0 + +-- Fill nested symbol table with per-trace exit stub addresses. +local function fillsymtab_tr(tr, nexit) + local t = {} + symtabmt.__index = t + if jit.arch:sub(1, 4) == "mips" then + t[traceexitstub(tr, 0)] = "exit" + return + end + for i=0,nexit-1 do + local addr = traceexitstub(tr, i) + if addr < 0 then addr = addr + 2^32 end + t[addr] = tostring(i) + end + local addr = traceexitstub(tr, nexit) + if addr then t[addr] = "stack_check" end +end + +-- Fill symbol table with trace exit stub addresses. +local function fillsymtab(tr, nexit) + local t = symtab + if nexitsym == 0 then + local ircall = vmdef.ircall + for i=0,#ircall do + local addr = ircalladdr(i) + if addr ~= 0 then + if addr < 0 then addr = addr + 2^32 end + t[addr] = ircall[i] + end + end + end + if nexitsym == 1000000 then -- Per-trace exit stubs. + fillsymtab_tr(tr, nexit) + elseif nexit > nexitsym then -- Shared exit stubs. + for i=nexitsym,nexit-1 do + local addr = traceexitstub(i) + if addr == nil then -- Fall back to per-trace exit stubs. + fillsymtab_tr(tr, nexit) + setmetatable(symtab, symtabmt) + nexit = 1000000 + break + end + if addr < 0 then addr = addr + 2^32 end + t[addr] = tostring(i) + end + nexitsym = nexit + end + return t +end + +local function dumpwrite(s) + out:write(s) +end + +-- Disassemble machine code. +local function dump_mcode(tr) + local info = traceinfo(tr) + if not info then return end + local mcode, addr, loop = tracemc(tr) + if not mcode then return end + if not disass then disass = require("jit.dis_"..jit.arch) end + if addr < 0 then addr = addr + 2^32 end + out:write("---- TRACE ", tr, " mcode ", #mcode, "\n") + local ctx = disass.create(mcode, addr, dumpwrite) + ctx.hexdump = 0 + ctx.symtab = fillsymtab(tr, info.nexit) + if loop ~= 0 then + symtab[addr+loop] = "LOOP" + ctx:disass(0, loop) + out:write("->LOOP:\n") + ctx:disass(loop, #mcode-loop) + symtab[addr+loop] = nil + else + ctx:disass(0, #mcode) + end +end + +------------------------------------------------------------------------------ + +local irtype_text = { + [0] = "nil", + "fal", + "tru", + "lud", + "str", + "p32", + "thr", + "pro", + "fun", + "p64", + "cdt", + "tab", + "udt", + "flt", + "num", + "i8 ", + "u8 ", + "i16", + "u16", + "int", + "u32", + "i64", + "u64", + "sfp", +} + +local colortype_ansi = { + [0] = "%s", + "%s", + "%s", + "\027[36m%s\027[m", + "\027[32m%s\027[m", + "%s", + "\027[1m%s\027[m", + "%s", + "\027[1m%s\027[m", + "%s", + "\027[33m%s\027[m", + "\027[31m%s\027[m", + "\027[36m%s\027[m", + "\027[34m%s\027[m", + "\027[34m%s\027[m", + "\027[35m%s\027[m", + "\027[35m%s\027[m", + "\027[35m%s\027[m", + "\027[35m%s\027[m", + "\027[35m%s\027[m", + "\027[35m%s\027[m", + "\027[35m%s\027[m", + "\027[35m%s\027[m", + "\027[35m%s\027[m", +} + +local function colorize_text(s) + return s +end + +local function colorize_ansi(s, t) + return format(colortype_ansi[t], s) +end + +local irtype_ansi = setmetatable({}, + { __index = function(tab, t) + local s = colorize_ansi(irtype_text[t], t); tab[t] = s; return s; end }) + +local html_escape = { ["<"] = "<", [">"] = ">", ["&"] = "&", } + +local function colorize_html(s, t) + s = gsub(s, "[<>&]", html_escape) + return format('%s', irtype_text[t], s) +end + +local irtype_html = setmetatable({}, + { __index = function(tab, t) + local s = colorize_html(irtype_text[t], t); tab[t] = s; return s; end }) + +local header_html = [[ + +]] + +local colorize, irtype + +-- Lookup tables to convert some literals into names. +local litname = { + ["SLOAD "] = setmetatable({}, { __index = function(t, mode) + local s = "" + if band(mode, 1) ~= 0 then s = s.."P" end + if band(mode, 2) ~= 0 then s = s.."F" end + if band(mode, 4) ~= 0 then s = s.."T" end + if band(mode, 8) ~= 0 then s = s.."C" end + if band(mode, 16) ~= 0 then s = s.."R" end + if band(mode, 32) ~= 0 then s = s.."I" end + t[mode] = s + return s + end}), + ["XLOAD "] = { [0] = "", "R", "V", "RV", "U", "RU", "VU", "RVU", }, + ["CONV "] = setmetatable({}, { __index = function(t, mode) + local s = irtype[band(mode, 31)] + s = irtype[band(shr(mode, 5), 31)].."."..s + if band(mode, 0x800) ~= 0 then s = s.." sext" end + local c = shr(mode, 14) + if c == 2 then s = s.." index" elseif c == 3 then s = s.." check" end + t[mode] = s + return s + end}), + ["FLOAD "] = vmdef.irfield, + ["FREF "] = vmdef.irfield, + ["FPMATH"] = vmdef.irfpm, + ["BUFHDR"] = { [0] = "RESET", "APPEND" }, + ["TOSTR "] = { [0] = "INT", "NUM", "CHAR" }, +} + +local function ctlsub(c) + if c == "\n" then return "\\n" + elseif c == "\r" then return "\\r" + elseif c == "\t" then return "\\t" + else return format("\\%03d", byte(c)) + end +end + +local function fmtfunc(func, pc) + local fi = funcinfo(func, pc) + if fi.loc then + return fi.loc + elseif fi.ffid then + return vmdef.ffnames[fi.ffid] + elseif fi.addr then + return format("C:%x", fi.addr) + else + return "(?)" + end +end + +local function formatk(tr, idx, sn) + local k, t, slot = tracek(tr, idx) + local tn = type(k) + local s + if tn == "number" then + if band(sn or 0, 0x30000) ~= 0 then + s = band(sn, 0x20000) ~= 0 and "contpc" or "ftsz" + elseif k == 2^52+2^51 then + s = "bias" + else + s = format(0 < k and k < 0x1p-1026 and "%+a" or "%+.14g", k) + end + elseif tn == "string" then + s = format(#k > 20 and '"%.20s"~' or '"%s"', gsub(k, "%c", ctlsub)) + elseif tn == "function" then + s = fmtfunc(k) + elseif tn == "table" then + s = format("{%p}", k) + elseif tn == "userdata" then + if t == 12 then + s = format("userdata:%p", k) + else + s = format("[%p]", k) + if s == "[NULL]" then s = "NULL" end + end + elseif t == 21 then -- int64_t + s = sub(tostring(k), 1, -3) + if sub(s, 1, 1) ~= "-" then s = "+"..s end + elseif sn == 0x1057fff then -- SNAP(1, SNAP_FRAME | SNAP_NORESTORE, REF_NIL) + return "----" -- Special case for LJ_FR2 slot 1. + else + s = tostring(k) -- For primitives. + end + s = colorize(format("%-4s", s), t) + if slot then + s = format("%s @%d", s, slot) + end + return s +end + +local function printsnap(tr, snap) + local n = 2 + for s=0,snap[1]-1 do + local sn = snap[n] + if shr(sn, 24) == s then + n = n + 1 + local ref = band(sn, 0xffff) - 0x8000 -- REF_BIAS + if ref < 0 then + out:write(formatk(tr, ref, sn)) + elseif band(sn, 0x80000) ~= 0 then -- SNAP_SOFTFPNUM + out:write(colorize(format("%04d/%04d", ref, ref+1), 14)) + else + local m, ot, op1, op2 = traceir(tr, ref) + out:write(colorize(format("%04d", ref), band(ot, 31))) + end + out:write(band(sn, 0x10000) == 0 and " " or "|") -- SNAP_FRAME + else + out:write("---- ") + end + end + out:write("]\n") +end + +-- Dump snapshots (not interleaved with IR). +local function dump_snap(tr) + out:write("---- TRACE ", tr, " snapshots\n") + for i=0,1000000000 do + local snap = tracesnap(tr, i) + if not snap then break end + out:write(format("#%-3d %04d [ ", i, snap[0])) + printsnap(tr, snap) + end +end + +-- Return a register name or stack slot for a rid/sp location. +local function ridsp_name(ridsp, ins) + if not disass then disass = require("jit.dis_"..jit.arch) end + local rid, slot = band(ridsp, 0xff), shr(ridsp, 8) + if rid == 253 or rid == 254 then + return (slot == 0 or slot == 255) and " {sink" or format(" {%04d", ins-slot) + end + if ridsp > 255 then return format("[%x]", slot*4) end + if rid < 128 then return disass.regname(rid) end + return "" +end + +-- Dump CALL* function ref and return optional ctype. +local function dumpcallfunc(tr, ins) + local ctype + if ins > 0 then + local m, ot, op1, op2 = traceir(tr, ins) + if band(ot, 31) == 0 then -- nil type means CARG(func, ctype). + ins = op1 + ctype = formatk(tr, op2) + end + end + if ins < 0 then + out:write(format("[0x%x](", tonumber((tracek(tr, ins))))) + else + out:write(format("%04d (", ins)) + end + return ctype +end + +-- Recursively gather CALL* args and dump them. +local function dumpcallargs(tr, ins) + if ins < 0 then + out:write(formatk(tr, ins)) + else + local m, ot, op1, op2 = traceir(tr, ins) + local oidx = 6*shr(ot, 8) + local op = sub(vmdef.irnames, oidx+1, oidx+6) + if op == "CARG " then + dumpcallargs(tr, op1) + if op2 < 0 then + out:write(" ", formatk(tr, op2)) + else + out:write(" ", format("%04d", op2)) + end + else + out:write(format("%04d", ins)) + end + end +end + +-- Dump IR and interleaved snapshots. +local function dump_ir(tr, dumpsnap, dumpreg) + local info = traceinfo(tr) + if not info then return end + local nins = info.nins + out:write("---- TRACE ", tr, " IR\n") + local irnames = vmdef.irnames + local snapref = 65536 + local snap, snapno + if dumpsnap then + snap = tracesnap(tr, 0) + snapref = snap[0] + snapno = 0 + end + for ins=1,nins do + if ins >= snapref then + if dumpreg then + out:write(format(".... SNAP #%-3d [ ", snapno)) + else + out:write(format(".... SNAP #%-3d [ ", snapno)) + end + printsnap(tr, snap) + snapno = snapno + 1 + snap = tracesnap(tr, snapno) + snapref = snap and snap[0] or 65536 + end + local m, ot, op1, op2, ridsp = traceir(tr, ins) + local oidx, t = 6*shr(ot, 8), band(ot, 31) + local op = sub(irnames, oidx+1, oidx+6) + if op == "LOOP " then + if dumpreg then + out:write(format("%04d ------------ LOOP ------------\n", ins)) + else + out:write(format("%04d ------ LOOP ------------\n", ins)) + end + elseif op ~= "NOP " and op ~= "CARG " and + (dumpreg or op ~= "RENAME") then + local rid = band(ridsp, 255) + if dumpreg then + out:write(format("%04d %-6s", ins, ridsp_name(ridsp, ins))) + else + out:write(format("%04d ", ins)) + end + out:write(format("%s%s %s %s ", + (rid == 254 or rid == 253) and "}" or + (band(ot, 128) == 0 and " " or ">"), + band(ot, 64) == 0 and " " or "+", + irtype[t], op)) + local m1, m2 = band(m, 3), band(m, 3*4) + if sub(op, 1, 4) == "CALL" then + local ctype + if m2 == 1*4 then -- op2 == IRMlit + out:write(format("%-10s (", vmdef.ircall[op2])) + else + ctype = dumpcallfunc(tr, op2) + end + if op1 ~= -1 then dumpcallargs(tr, op1) end + out:write(")") + if ctype then out:write(" ctype ", ctype) end + elseif op == "CNEW " and op2 == -1 then + out:write(formatk(tr, op1)) + elseif m1 ~= 3 then -- op1 != IRMnone + if op1 < 0 then + out:write(formatk(tr, op1)) + else + out:write(format(m1 == 0 and "%04d" or "#%-3d", op1)) + end + if m2 ~= 3*4 then -- op2 != IRMnone + if m2 == 1*4 then -- op2 == IRMlit + local litn = litname[op] + if litn and litn[op2] then + out:write(" ", litn[op2]) + elseif op == "UREFO " or op == "UREFC " then + out:write(format(" #%-3d", shr(op2, 8))) + else + out:write(format(" #%-3d", op2)) + end + elseif op2 < 0 then + out:write(" ", formatk(tr, op2)) + else + out:write(format(" %04d", op2)) + end + end + end + out:write("\n") + end + end + if snap then + if dumpreg then + out:write(format(".... SNAP #%-3d [ ", snapno)) + else + out:write(format(".... SNAP #%-3d [ ", snapno)) + end + printsnap(tr, snap) + end +end + +------------------------------------------------------------------------------ + +local recprefix = "" +local recdepth = 0 + +-- Format trace error message. +local function fmterr(err, info) + if type(err) == "number" then + if type(info) == "function" then info = fmtfunc(info) end + err = format(vmdef.traceerr[err], info) + end + return err +end + +-- Dump trace states. +local function dump_trace(what, tr, func, pc, otr, oex) + if what == "stop" or (what == "abort" and dumpmode.a) then + if dumpmode.i then dump_ir(tr, dumpmode.s, dumpmode.r and what == "stop") + elseif dumpmode.s then dump_snap(tr) end + if dumpmode.m then dump_mcode(tr) end + end + if what == "start" then + if dumpmode.H then out:write('
\n') end
+    out:write("---- TRACE ", tr, " ", what)
+    if otr then out:write(" ", otr, "/", oex == -1 and "stitch" or oex) end
+    out:write(" ", fmtfunc(func, pc), "\n")
+  elseif what == "stop" or what == "abort" then
+    out:write("---- TRACE ", tr, " ", what)
+    if what == "abort" then
+      out:write(" ", fmtfunc(func, pc), " -- ", fmterr(otr, oex), "\n")
+    else
+      local info = traceinfo(tr)
+      local link, ltype = info.link, info.linktype
+      if link == tr or link == 0 then
+	out:write(" -> ", ltype, "\n")
+      elseif ltype == "root" then
+	out:write(" -> ", link, "\n")
+      else
+	out:write(" -> ", link, " ", ltype, "\n")
+      end
+    end
+    if dumpmode.H then out:write("
\n\n") else out:write("\n") end + else + if what == "flush" then symtab, nexitsym = {}, 0 end + out:write("---- TRACE ", what, "\n\n") + end + out:flush() +end + +-- Dump recorded bytecode. +local function dump_record(tr, func, pc, depth, callee) + if depth ~= recdepth then + recdepth = depth + recprefix = rep(" .", depth) + end + local line + if pc >= 0 then + line = bcline(func, pc, recprefix) + if dumpmode.H then line = gsub(line, "[<>&]", html_escape) end + else + line = "0000 "..recprefix.." FUNCC \n" + callee = func + end + if pc <= 0 then + out:write(sub(line, 1, -2), " ; ", fmtfunc(func), "\n") + else + out:write(line) + end + if pc >= 0 and band(funcbc(func, pc), 0xff) < 16 then -- ORDER BC + out:write(bcline(func, pc+1, recprefix)) -- Write JMP for cond. + end +end + +------------------------------------------------------------------------------ + +-- Dump taken trace exits. +local function dump_texit(tr, ex, ngpr, nfpr, ...) + out:write("---- TRACE ", tr, " exit ", ex, "\n") + if dumpmode.X then + local regs = {...} + if jit.arch == "x64" then + for i=1,ngpr do + out:write(format(" %016x", regs[i])) + if i % 4 == 0 then out:write("\n") end + end + else + for i=1,ngpr do + out:write(" ", tohex(regs[i])) + if i % 8 == 0 then out:write("\n") end + end + end + if jit.arch == "mips" or jit.arch == "mipsel" then + for i=1,nfpr,2 do + out:write(format(" %+17.14g", regs[ngpr+i])) + if i % 8 == 7 then out:write("\n") end + end + else + for i=1,nfpr do + out:write(format(" %+17.14g", regs[ngpr+i])) + if i % 4 == 0 then out:write("\n") end + end + end + end +end + +------------------------------------------------------------------------------ + +-- Detach dump handlers. +local function dumpoff() + if active then + active = false + jit.attach(dump_texit) + jit.attach(dump_record) + jit.attach(dump_trace) + if out and out ~= stdout and out ~= stderr then out:close() end + out = nil + end +end + +-- Open the output file and attach dump handlers. +local function dumpon(opt, outfile) + if active then dumpoff() end + + local term = os.getenv("TERM") + local colormode = (term and term:match("color") or os.getenv("COLORTERM")) and "A" or "T" + if opt then + opt = gsub(opt, "[TAH]", function(mode) colormode = mode; return ""; end) + end + + local m = { t=true, b=true, i=true, m=true, } + if opt and opt ~= "" then + local o = sub(opt, 1, 1) + if o ~= "+" and o ~= "-" then m = {} end + for i=1,#opt do m[sub(opt, i, i)] = (o ~= "-") end + end + dumpmode = m + + if m.t or m.b or m.i or m.s or m.m then + jit.attach(dump_trace, "trace") + end + if m.b then + jit.attach(dump_record, "record") + if not bcline then bcline = require("jit.bc").line end + end + if m.x or m.X then + jit.attach(dump_texit, "texit") + end + + if not outfile then outfile = os.getenv("LUAJIT_DUMPFILE") end + if outfile then + out = outfile == "-" and stdout or assert(io.open(outfile, "w")) + else + out = stdout + end + + m[colormode] = true + if colormode == "A" then + colorize = colorize_ansi + irtype = irtype_ansi + elseif colormode == "H" then + colorize = colorize_html + irtype = irtype_html + out:write(header_html) + else + colorize = colorize_text + irtype = irtype_text + end + + active = true +end + +-- Public module functions. +return { + on = dumpon, + off = dumpoff, + start = dumpon -- For -j command line option. +} + diff --git a/lua_probject/tolua_project/jit/p.lua b/lua_probject/tolua_project/jit/p.lua new file mode 100644 index 00000000..7be10586 --- /dev/null +++ b/lua_probject/tolua_project/jit/p.lua @@ -0,0 +1,311 @@ +---------------------------------------------------------------------------- +-- LuaJIT profiler. +-- +-- Copyright (C) 2005-2017 Mike Pall. All rights reserved. +-- Released under the MIT license. See Copyright Notice in luajit.h +---------------------------------------------------------------------------- +-- +-- This module is a simple command line interface to the built-in +-- low-overhead profiler of LuaJIT. +-- +-- The lower-level API of the profiler is accessible via the "jit.profile" +-- module or the luaJIT_profile_* C API. +-- +-- Example usage: +-- +-- luajit -jp myapp.lua +-- luajit -jp=s myapp.lua +-- luajit -jp=-s myapp.lua +-- luajit -jp=vl myapp.lua +-- luajit -jp=G,profile.txt myapp.lua +-- +-- The following dump features are available: +-- +-- f Stack dump: function name, otherwise module:line. Default mode. +-- F Stack dump: ditto, but always prepend module. +-- l Stack dump: module:line. +-- stack dump depth (callee < caller). Default: 1. +-- - Inverse stack dump depth (caller > callee). +-- s Split stack dump after first stack level. Implies abs(depth) >= 2. +-- p Show full path for module names. +-- v Show VM states. Can be combined with stack dumps, e.g. vf or fv. +-- z Show zones. Can be combined with stack dumps, e.g. zf or fz. +-- r Show raw sample counts. Default: show percentages. +-- a Annotate excerpts from source code files. +-- A Annotate complete source code files. +-- G Produce raw output suitable for graphical tools (e.g. flame graphs). +-- m Minimum sample percentage to be shown. Default: 3. +-- i Sampling interval in milliseconds. Default: 10. +-- +---------------------------------------------------------------------------- + +-- Cache some library functions and objects. +local jit = require("jit") +assert(jit.version_num == 20100, "LuaJIT core/library version mismatch") +local profile = require("jit.profile") +local vmdef = require("jit.vmdef") +local math = math +local pairs, ipairs, tonumber, floor = pairs, ipairs, tonumber, math.floor +local sort, format = table.sort, string.format +local stdout = io.stdout +local zone -- Load jit.zone module on demand. + +-- Output file handle. +local out + +------------------------------------------------------------------------------ + +local prof_ud +local prof_states, prof_split, prof_min, prof_raw, prof_fmt, prof_depth +local prof_ann, prof_count1, prof_count2, prof_samples + +local map_vmmode = { + N = "Compiled", + I = "Interpreted", + C = "C code", + G = "Garbage Collector", + J = "JIT Compiler", +} + +-- Profiler callback. +local function prof_cb(th, samples, vmmode) + prof_samples = prof_samples + samples + local key_stack, key_stack2, key_state + -- Collect keys for sample. + if prof_states then + if prof_states == "v" then + key_state = map_vmmode[vmmode] or vmmode + else + key_state = zone:get() or "(none)" + end + end + if prof_fmt then + key_stack = profile.dumpstack(th, prof_fmt, prof_depth) + key_stack = key_stack:gsub("%[builtin#(%d+)%]", function(x) + return vmdef.ffnames[tonumber(x)] + end) + if prof_split == 2 then + local k1, k2 = key_stack:match("(.-) [<>] (.*)") + if k2 then key_stack, key_stack2 = k1, k2 end + elseif prof_split == 3 then + key_stack2 = profile.dumpstack(th, "l", 1) + end + end + -- Order keys. + local k1, k2 + if prof_split == 1 then + if key_state then + k1 = key_state + if key_stack then k2 = key_stack end + end + elseif key_stack then + k1 = key_stack + if key_stack2 then k2 = key_stack2 elseif key_state then k2 = key_state end + end + -- Coalesce samples in one or two levels. + if k1 then + local t1 = prof_count1 + t1[k1] = (t1[k1] or 0) + samples + if k2 then + local t2 = prof_count2 + local t3 = t2[k1] + if not t3 then t3 = {}; t2[k1] = t3 end + t3[k2] = (t3[k2] or 0) + samples + end + end +end + +------------------------------------------------------------------------------ + +-- Show top N list. +local function prof_top(count1, count2, samples, indent) + local t, n = {}, 0 + for k in pairs(count1) do + n = n + 1 + t[n] = k + end + sort(t, function(a, b) return count1[a] > count1[b] end) + for i=1,n do + local k = t[i] + local v = count1[k] + local pct = floor(v*100/samples + 0.5) + if pct < prof_min then break end + if not prof_raw then + out:write(format("%s%2d%% %s\n", indent, pct, k)) + elseif prof_raw == "r" then + out:write(format("%s%5d %s\n", indent, v, k)) + else + out:write(format("%s %d\n", k, v)) + end + if count2 then + local r = count2[k] + if r then + prof_top(r, nil, v, (prof_split == 3 or prof_split == 1) and " -- " or + (prof_depth < 0 and " -> " or " <- ")) + end + end + end +end + +-- Annotate source code +local function prof_annotate(count1, samples) + local files = {} + local ms = 0 + for k, v in pairs(count1) do + local pct = floor(v*100/samples + 0.5) + ms = math.max(ms, v) + if pct >= prof_min then + local file, line = k:match("^(.*):(%d+)$") + if not file then file = k; line = 0 end + local fl = files[file] + if not fl then fl = {}; files[file] = fl; files[#files+1] = file end + line = tonumber(line) + fl[line] = prof_raw and v or pct + end + end + sort(files) + local fmtv, fmtn = " %3d%% | %s\n", " | %s\n" + if prof_raw then + local n = math.max(5, math.ceil(math.log10(ms))) + fmtv = "%"..n.."d | %s\n" + fmtn = (" "):rep(n).." | %s\n" + end + local ann = prof_ann + for _, file in ipairs(files) do + local f0 = file:byte() + if f0 == 40 or f0 == 91 then + out:write(format("\n====== %s ======\n[Cannot annotate non-file]\n", file)) + break + end + local fp, err = io.open(file) + if not fp then + out:write(format("====== ERROR: %s: %s\n", file, err)) + break + end + out:write(format("\n====== %s ======\n", file)) + local fl = files[file] + local n, show = 1, false + if ann ~= 0 then + for i=1,ann do + if fl[i] then show = true; out:write("@@ 1 @@\n"); break end + end + end + for line in fp:lines() do + if line:byte() == 27 then + out:write("[Cannot annotate bytecode file]\n") + break + end + local v = fl[n] + if ann ~= 0 then + local v2 = fl[n+ann] + if show then + if v2 then show = n+ann elseif v then show = n + elseif show+ann < n then show = false end + elseif v2 then + show = n+ann + out:write(format("@@ %d @@\n", n)) + end + if not show then goto next end + end + if v then + out:write(format(fmtv, v, line)) + else + out:write(format(fmtn, line)) + end + ::next:: + n = n + 1 + end + fp:close() + end +end + +------------------------------------------------------------------------------ + +-- Finish profiling and dump result. +local function prof_finish() + if prof_ud then + profile.stop() + local samples = prof_samples + if samples == 0 then + if prof_raw ~= true then out:write("[No samples collected]\n") end + return + end + if prof_ann then + prof_annotate(prof_count1, samples) + else + prof_top(prof_count1, prof_count2, samples, "") + end + prof_count1 = nil + prof_count2 = nil + prof_ud = nil + end +end + +-- Start profiling. +local function prof_start(mode) + local interval = "" + mode = mode:gsub("i%d*", function(s) interval = s; return "" end) + prof_min = 3 + mode = mode:gsub("m(%d+)", function(s) prof_min = tonumber(s); return "" end) + prof_depth = 1 + mode = mode:gsub("%-?%d+", function(s) prof_depth = tonumber(s); return "" end) + local m = {} + for c in mode:gmatch(".") do m[c] = c end + prof_states = m.z or m.v + if prof_states == "z" then zone = require("jit.zone") end + local scope = m.l or m.f or m.F or (prof_states and "" or "f") + local flags = (m.p or "") + prof_raw = m.r + if m.s then + prof_split = 2 + if prof_depth == -1 or m["-"] then prof_depth = -2 + elseif prof_depth == 1 then prof_depth = 2 end + elseif mode:find("[fF].*l") then + scope = "l" + prof_split = 3 + else + prof_split = (scope == "" or mode:find("[zv].*[lfF]")) and 1 or 0 + end + prof_ann = m.A and 0 or (m.a and 3) + if prof_ann then + scope = "l" + prof_fmt = "pl" + prof_split = 0 + prof_depth = 1 + elseif m.G and scope ~= "" then + prof_fmt = flags..scope.."Z;" + prof_depth = -100 + prof_raw = true + prof_min = 0 + elseif scope == "" then + prof_fmt = false + else + local sc = prof_split == 3 and m.f or m.F or scope + prof_fmt = flags..sc..(prof_depth >= 0 and "Z < " or "Z > ") + end + prof_count1 = {} + prof_count2 = {} + prof_samples = 0 + profile.start(scope:lower()..interval, prof_cb) + prof_ud = newproxy(true) + getmetatable(prof_ud).__gc = prof_finish +end + +------------------------------------------------------------------------------ + +local function start(mode, outfile) + if not outfile then outfile = os.getenv("LUAJIT_PROFILEFILE") end + if outfile then + out = outfile == "-" and stdout or assert(io.open(outfile, "w")) + else + out = stdout + end + prof_start(mode or "f") +end + +-- Public module functions. +return { + start = start, -- For -j command line option. + stop = prof_finish +} + diff --git a/lua_probject/tolua_project/jit/v.lua b/lua_probject/tolua_project/jit/v.lua new file mode 100644 index 00000000..f87ed44d --- /dev/null +++ b/lua_probject/tolua_project/jit/v.lua @@ -0,0 +1,163 @@ +---------------------------------------------------------------------------- +-- Verbose mode of the LuaJIT compiler. +-- +-- Copyright (C) 2005-2017 Mike Pall. All rights reserved. +-- Released under the MIT license. See Copyright Notice in luajit.h +---------------------------------------------------------------------------- +-- +-- This module shows verbose information about the progress of the +-- JIT compiler. It prints one line for each generated trace. This module +-- is useful to see which code has been compiled or where the compiler +-- punts and falls back to the interpreter. +-- +-- Example usage: +-- +-- luajit -jv -e "for i=1,1000 do for j=1,1000 do end end" +-- luajit -jv=myapp.out myapp.lua +-- +-- Default output is to stderr. To redirect the output to a file, pass a +-- filename as an argument (use '-' for stdout) or set the environment +-- variable LUAJIT_VERBOSEFILE. The file is overwritten every time the +-- module is started. +-- +-- The output from the first example should look like this: +-- +-- [TRACE 1 (command line):1 loop] +-- [TRACE 2 (1/3) (command line):1 -> 1] +-- +-- The first number in each line is the internal trace number. Next are +-- the file name ('(command line)') and the line number (':1') where the +-- trace has started. Side traces also show the parent trace number and +-- the exit number where they are attached to in parentheses ('(1/3)'). +-- An arrow at the end shows where the trace links to ('-> 1'), unless +-- it loops to itself. +-- +-- In this case the inner loop gets hot and is traced first, generating +-- a root trace. Then the last exit from the 1st trace gets hot, too, +-- and triggers generation of the 2nd trace. The side trace follows the +-- path along the outer loop and *around* the inner loop, back to its +-- start, and then links to the 1st trace. Yes, this may seem unusual, +-- if you know how traditional compilers work. Trace compilers are full +-- of surprises like this -- have fun! :-) +-- +-- Aborted traces are shown like this: +-- +-- [TRACE --- foo.lua:44 -- leaving loop in root trace at foo:lua:50] +-- +-- Don't worry -- trace aborts are quite common, even in programs which +-- can be fully compiled. The compiler may retry several times until it +-- finds a suitable trace. +-- +-- Of course this doesn't work with features that are not-yet-implemented +-- (NYI error messages). The VM simply falls back to the interpreter. This +-- may not matter at all if the particular trace is not very high up in +-- the CPU usage profile. Oh, and the interpreter is quite fast, too. +-- +-- Also check out the -jdump module, which prints all the gory details. +-- +------------------------------------------------------------------------------ + +-- Cache some library functions and objects. +local jit = require("jit") +assert(jit.version_num == 20100, "LuaJIT core/library version mismatch") +local jutil = require("jit.util") +local vmdef = require("jit.vmdef") +local funcinfo, traceinfo = jutil.funcinfo, jutil.traceinfo +local type, format = type, string.format +local stdout, stderr = io.stdout, io.stderr + +-- Active flag and output file handle. +local active, out + +------------------------------------------------------------------------------ + +local startloc, startex + +local function fmtfunc(func, pc) + local fi = funcinfo(func, pc) + if fi.loc then + return fi.loc + elseif fi.ffid then + return vmdef.ffnames[fi.ffid] + elseif fi.addr then + return format("C:%x", fi.addr) + else + return "(?)" + end +end + +-- Format trace error message. +local function fmterr(err, info) + if type(err) == "number" then + if type(info) == "function" then info = fmtfunc(info) end + err = format(vmdef.traceerr[err], info) + end + return err +end + +-- Dump trace states. +local function dump_trace(what, tr, func, pc, otr, oex) + if what == "start" then + startloc = fmtfunc(func, pc) + startex = otr and "("..otr.."/"..(oex == -1 and "stitch" or oex)..") " or "" + else + if what == "abort" then + local loc = fmtfunc(func, pc) + if loc ~= startloc then + print(format("[TRACE --- %s%s -- %s at %s]\n", startex, startloc, fmterr(otr, oex), loc)) + else + print(format("[TRACE --- %s%s -- %s]\n", startex, startloc, fmterr(otr, oex))) + end + elseif what == "stop" then + local info = traceinfo(tr) + local link, ltype = info.link, info.linktype + if ltype == "interpreter" then + print(format("[TRACE %3s %s%s -- fallback to interpreter]\n", tr, startex, startloc)) + elseif ltype == "stitch" then + print(format("[TRACE %3s %s%s %s %s]\n", tr, startex, startloc, ltype, fmtfunc(func, pc))) + elseif link == tr or link == 0 then + print(format("[TRACE %3s %s%s %s]\n", tr, startex, startloc, ltype)) + elseif ltype == "root" then + print(format("[TRACE %3s %s%s -> %d]\n", tr, startex, startloc, link)) + else + print(format("[TRACE %3s %s%s -> %d %s]\n", tr, startex, startloc, link, ltype)) + end + else + print(format("[TRACE %s]\n", what)) + end + out:flush() + end +end + +------------------------------------------------------------------------------ + +-- Detach dump handlers. +local function dumpoff() + if active then + active = false + jit.attach(dump_trace) + if out and out ~= stdout and out ~= stderr then out:close() end + out = nil + end +end + +-- Open the output file and attach dump handlers. +local function dumpon(outfile) + if active then dumpoff() end + if not outfile then outfile = os.getenv("LUAJIT_VERBOSEFILE") end + if outfile then + out = outfile == "-" and stdout or assert(io.open(outfile, "w")) + else + out = stderr + end + jit.attach(dump_trace, "trace") + active = true +end + +-- Public module functions. +return { + on = dumpon, + off = dumpoff, + start = dumpon -- For -j command line option. +} + diff --git a/lua_probject/tolua_project/jit/vmdef.lua b/lua_probject/tolua_project/jit/vmdef.lua new file mode 100644 index 00000000..2ca17839 --- /dev/null +++ b/lua_probject/tolua_project/jit/vmdef.lua @@ -0,0 +1,362 @@ +-- This is a generated file. DO NOT EDIT! + +return { + +bcnames = "ISLT ISGE ISLE ISGT ISEQV ISNEV ISEQS ISNES ISEQN ISNEN ISEQP ISNEP ISTC ISFC IST ISF ISTYPEISNUM MOV NOT UNM LEN ADDVN SUBVN MULVN DIVVN MODVN ADDNV SUBNV MULNV DIVNV MODNV ADDVV SUBVV MULVV DIVVV MODVV POW CAT KSTR KCDATAKSHORTKNUM KPRI KNIL UGET USETV USETS USETN USETP UCLO FNEW TNEW TDUP GGET GSET TGETV TGETS TGETB TGETR TSETV TSETS TSETB TSETM TSETR CALLM CALL CALLMTCALLT ITERC ITERN VARG ISNEXTRETM RET RET0 RET1 FORI JFORI FORL IFORL JFORL ITERL IITERLJITERLLOOP ILOOP JLOOP JMP FUNCF IFUNCFJFUNCFFUNCV IFUNCVJFUNCVFUNCC FUNCCW", + +irnames = "LT GE LE GT ULT UGE ULE UGT EQ NE ABC RETF NOP BASE PVAL GCSTEPHIOP LOOP USE PHI RENAMEPROF KPRI KINT KGC KPTR KKPTR KNULL KNUM KINT64KSLOT BNOT BSWAP BAND BOR BXOR BSHL BSHR BSAR BROL BROR ADD SUB MUL DIV MOD POW NEG ABS ATAN2 LDEXP MIN MAX FPMATHADDOV SUBOV MULOV AREF HREFK HREF NEWREFUREFO UREFC FREF STRREFLREF ALOAD HLOAD ULOAD FLOAD XLOAD SLOAD VLOAD ASTOREHSTOREUSTOREFSTOREXSTORESNEW XSNEW TNEW TDUP CNEW CNEWI BUFHDRBUFPUTBUFSTRTBAR OBAR XBAR CONV TOBIT TOSTR STRTO CALLN CALLA CALLL CALLS CALLXSCARG ", + +irfpm = { [0]="floor", "ceil", "trunc", "sqrt", "exp", "exp2", "log", "log2", "log10", "sin", "cos", "tan", "other", }, + +irfield = { [0]="str.len", "func.env", "func.pc", "func.ffid", "thread.env", "tab.meta", "tab.array", "tab.node", "tab.asize", "tab.hmask", "tab.nomm", "udata.meta", "udata.udtype", "udata.file", "cdata.ctypeid", "cdata.ptr", "cdata.int", "cdata.int64", "cdata.int64_4", }, + +ircall = { +[0]="lj_str_cmp", +"lj_str_find", +"lj_str_new", +"lj_strscan_num", +"lj_strfmt_int", +"lj_strfmt_num", +"lj_strfmt_char", +"lj_strfmt_putint", +"lj_strfmt_putnum", +"lj_strfmt_putquoted", +"lj_strfmt_putfxint", +"lj_strfmt_putfnum_int", +"lj_strfmt_putfnum_uint", +"lj_strfmt_putfnum", +"lj_strfmt_putfstr", +"lj_strfmt_putfchar", +"lj_buf_putmem", +"lj_buf_putstr", +"lj_buf_putchar", +"lj_buf_putstr_reverse", +"lj_buf_putstr_lower", +"lj_buf_putstr_upper", +"lj_buf_putstr_rep", +"lj_buf_puttab", +"lj_buf_tostr", +"lj_tab_new_ah", +"lj_tab_new1", +"lj_tab_dup", +"lj_tab_clear", +"lj_tab_newkey", +"lj_tab_len", +"lj_gc_step_jit", +"lj_gc_barrieruv", +"lj_mem_newgco", +"lj_math_random_step", +"lj_vm_modi", +"sinh", +"cosh", +"tanh", +"fputc", +"fwrite", +"fflush", +"lj_vm_floor", +"lj_vm_ceil", +"lj_vm_trunc", +"sqrt", +"exp", +"lj_vm_exp2", +"log", +"lj_vm_log2", +"log10", +"sin", +"cos", +"tan", +"lj_vm_powi", +"pow", +"atan2", +"ldexp", +"lj_vm_tobit", +"softfp_add", +"softfp_sub", +"softfp_mul", +"softfp_div", +"softfp_cmp", +"softfp_i2d", +"softfp_d2i", +"lj_vm_sfmin", +"lj_vm_sfmax", +"softfp_ui2d", +"softfp_f2d", +"softfp_d2ui", +"softfp_d2f", +"softfp_i2f", +"softfp_ui2f", +"softfp_f2i", +"softfp_f2ui", +"fp64_l2d", +"fp64_ul2d", +"fp64_l2f", +"fp64_ul2f", +"fp64_d2l", +"fp64_d2ul", +"fp64_f2l", +"fp64_f2ul", +"lj_carith_divi64", +"lj_carith_divu64", +"lj_carith_modi64", +"lj_carith_modu64", +"lj_carith_powi64", +"lj_carith_powu64", +"lj_cdata_newv", +"lj_cdata_setfin", +"strlen", +"memcpy", +"memset", +"lj_vm_errno", +"lj_carith_mul64", +"lj_carith_shl64", +"lj_carith_shr64", +"lj_carith_sar64", +"lj_carith_rol64", +"lj_carith_ror64", +}, + +traceerr = { +[0]="error thrown or hook called during recording", +"trace too short", +"trace too long", +"trace too deep", +"too many snapshots", +"blacklisted", +"retry recording", +"NYI: bytecode %d", +"leaving loop in root trace", +"inner loop in root trace", +"loop unroll limit reached", +"bad argument type", +"JIT compilation disabled for function", +"call unroll limit reached", +"down-recursion, restarting", +"NYI: unsupported variant of FastFunc %s", +"NYI: return to lower frame", +"store with nil or NaN key", +"missing metamethod", +"looping index lookup", +"NYI: mixed sparse/dense table", +"symbol not in cache", +"NYI: unsupported C type conversion", +"NYI: unsupported C function type", +"guard would always fail", +"too many PHIs", +"persistent type instability", +"failed to allocate mcode memory", +"machine code too long", +"hit mcode limit (retrying)", +"too many spill slots", +"inconsistent register allocation", +"NYI: cannot assemble IR instruction %d", +"NYI: PHI shuffling too complex", +"NYI: register coalescing too complex", +}, + +ffnames = { +[0]="Lua", +"C", +"assert", +"type", +"next", +"pairs", +"ipairs_aux", +"ipairs", +"getmetatable", +"setmetatable", +"getfenv", +"setfenv", +"rawget", +"rawset", +"rawequal", +"unpack", +"select", +"tonumber", +"tostring", +"error", +"pcall", +"xpcall", +"loadfile", +"load", +"loadstring", +"dofile", +"gcinfo", +"collectgarbage", +"newproxy", +"print", +"coroutine.status", +"coroutine.running", +"coroutine.create", +"coroutine.yield", +"coroutine.resume", +"coroutine.wrap_aux", +"coroutine.wrap", +"math.abs", +"math.floor", +"math.ceil", +"math.sqrt", +"math.log10", +"math.exp", +"math.sin", +"math.cos", +"math.tan", +"math.asin", +"math.acos", +"math.atan", +"math.sinh", +"math.cosh", +"math.tanh", +"math.frexp", +"math.modf", +"math.log", +"math.atan2", +"math.pow", +"math.fmod", +"math.ldexp", +"math.min", +"math.max", +"math.random", +"math.randomseed", +"bit.tobit", +"bit.bnot", +"bit.bswap", +"bit.lshift", +"bit.rshift", +"bit.arshift", +"bit.rol", +"bit.ror", +"bit.band", +"bit.bor", +"bit.bxor", +"bit.tohex", +"string.byte", +"string.char", +"string.sub", +"string.rep", +"string.reverse", +"string.lower", +"string.upper", +"string.dump", +"string.find", +"string.match", +"string.gmatch_aux", +"string.gmatch", +"string.gsub", +"string.format", +"table.maxn", +"table.insert", +"table.concat", +"table.sort", +"table.new", +"table.clear", +"io.method.close", +"io.method.read", +"io.method.write", +"io.method.flush", +"io.method.seek", +"io.method.setvbuf", +"io.method.lines", +"io.method.__gc", +"io.method.__tostring", +"io.open", +"io.popen", +"io.tmpfile", +"io.close", +"io.read", +"io.write", +"io.flush", +"io.input", +"io.output", +"io.lines", +"io.type", +"os.execute", +"os.remove", +"os.rename", +"os.tmpname", +"os.getenv", +"os.exit", +"os.clock", +"os.date", +"os.time", +"os.difftime", +"os.setlocale", +"debug.getregistry", +"debug.getmetatable", +"debug.setmetatable", +"debug.getfenv", +"debug.setfenv", +"debug.getinfo", +"debug.getlocal", +"debug.setlocal", +"debug.getupvalue", +"debug.setupvalue", +"debug.upvalueid", +"debug.upvaluejoin", +"debug.sethook", +"debug.gethook", +"debug.debug", +"debug.traceback", +"jit.on", +"jit.off", +"jit.flush", +"jit.status", +"jit.attach", +"jit.util.funcinfo", +"jit.util.funcbc", +"jit.util.funck", +"jit.util.funcuvname", +"jit.util.traceinfo", +"jit.util.traceir", +"jit.util.tracek", +"jit.util.tracesnap", +"jit.util.tracemc", +"jit.util.traceexitstub", +"jit.util.ircalladdr", +"jit.opt.start", +"jit.profile.start", +"jit.profile.stop", +"jit.profile.dumpstack", +"ffi.meta.__index", +"ffi.meta.__newindex", +"ffi.meta.__eq", +"ffi.meta.__len", +"ffi.meta.__lt", +"ffi.meta.__le", +"ffi.meta.__concat", +"ffi.meta.__call", +"ffi.meta.__add", +"ffi.meta.__sub", +"ffi.meta.__mul", +"ffi.meta.__div", +"ffi.meta.__mod", +"ffi.meta.__pow", +"ffi.meta.__unm", +"ffi.meta.__tostring", +"ffi.meta.__pairs", +"ffi.meta.__ipairs", +"ffi.clib.__index", +"ffi.clib.__newindex", +"ffi.clib.__gc", +"ffi.callback.free", +"ffi.callback.set", +"ffi.cdef", +"ffi.new", +"ffi.cast", +"ffi.typeof", +"ffi.typeinfo", +"ffi.istype", +"ffi.sizeof", +"ffi.alignof", +"ffi.offsetof", +"ffi.errno", +"ffi.string", +"ffi.copy", +"ffi.fill", +"ffi.abi", +"ffi.metatype", +"ffi.gc", +"ffi.load", +}, + +} + diff --git a/lua_probject/tolua_project/jit/zone.lua b/lua_probject/tolua_project/jit/zone.lua new file mode 100644 index 00000000..fa702c4e --- /dev/null +++ b/lua_probject/tolua_project/jit/zone.lua @@ -0,0 +1,45 @@ +---------------------------------------------------------------------------- +-- LuaJIT profiler zones. +-- +-- Copyright (C) 2005-2017 Mike Pall. All rights reserved. +-- Released under the MIT license. See Copyright Notice in luajit.h +---------------------------------------------------------------------------- +-- +-- This module implements a simple hierarchical zone model. +-- +-- Example usage: +-- +-- local zone = require("jit.zone") +-- zone("AI") +-- ... +-- zone("A*") +-- ... +-- print(zone:get()) --> "A*" +-- ... +-- zone() +-- ... +-- print(zone:get()) --> "AI" +-- ... +-- zone() +-- +---------------------------------------------------------------------------- + +local remove = table.remove + +return setmetatable({ + flush = function(t) + for i=#t,1,-1 do t[i] = nil end + end, + get = function(t) + return t[#t] + end +}, { + __call = function(t, zone) + if zone then + t[#t+1] = zone + else + return (assert(remove(t), "empty zone stack")) + end + end +}) + diff --git a/lua_probject/tolua_project/list.lua b/lua_probject/tolua_project/list.lua new file mode 100644 index 00000000..0779627e --- /dev/null +++ b/lua_probject/tolua_project/list.lua @@ -0,0 +1,180 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- +local setmetatable = setmetatable + +local list = {} +list.__index = list + +function list:new() + local t = {length = 0, _prev = 0, _next = 0} + t._prev = t + t._next = t + return setmetatable(t, list) +end + +function list:clear() + self._next = self + self._prev = self + self.length = 0 +end + +function list:push(value) + --assert(value) + local node = {value = value, _prev = 0, _next = 0, removed = false} + + self._prev._next = node + node._next = self + node._prev = self._prev + self._prev = node + + self.length = self.length + 1 + return node +end + +function list:pushnode(node) + if not node.removed then return end + + self._prev._next = node + node._next = self + node._prev = self._prev + self._prev = node + node.removed = false + self.length = self.length + 1 +end + +function list:pop() + local _prev = self._prev + self:remove(_prev) + return _prev.value +end + +function list:unshift(v) + local node = {value = v, _prev = 0, _next = 0, removed = false} + + self._next._prev = node + node._prev = self + node._next = self._next + self._next = node + + self.length = self.length + 1 + return node +end + +function list:shift() + local _next = self._next + self:remove(_next) + return _next.value +end + +function list:remove(iter) + if iter.removed then return end + + local _prev = iter._prev + local _next = iter._next + _next._prev = _prev + _prev._next = _next + + self.length = math.max(0, self.length - 1) + iter.removed = true +end + +function list:find(v, iter) + iter = iter or self + + repeat + if v == iter.value then + return iter + else + iter = iter._next + end + until iter == self + + return nil +end + +function list:findlast(v, iter) + iter = iter or self + + repeat + if v == iter.value then + return iter + end + + iter = iter._prev + until iter == self + + return nil +end + +function list:next(iter) + local _next = iter._next + if _next ~= self then + return _next, _next.value + end + + return nil +end + +function list:prev(iter) + local _prev = iter._prev + if _prev ~= self then + return _prev, _prev.value + end + + return nil +end + +function list:erase(v) + local iter = self:find(v) + + if iter then + self:remove(iter) + end +end + +function list:insert(v, iter) + if not iter then + return self:push(v) + end + + local node = {value = v, _next = 0, _prev = 0, removed = false} + + if iter._next then + iter._next._prev = node + node._next = iter._next + else + self.last = node + end + + node._prev = iter + iter._next = node + self.length = self.length + 1 + return node +end + +function list:head() + return self._next.value +end + +function list:tail() + return self._prev.value +end + +function list:clone() + local t = list:new() + + for i, v in list.next, self, self do + t:push(v) + end + + return t +end + +ilist = function(_list) return list.next, _list, _list end +rilist = function(_list) return list.prev, _list, _list end + +setmetatable(list, {__call = list.new}) +return list \ No newline at end of file diff --git a/lua_probject/tolua_project/lpeg/re.lua b/lua_probject/tolua_project/lpeg/re.lua new file mode 100644 index 00000000..f8e7c373 --- /dev/null +++ b/lua_probject/tolua_project/lpeg/re.lua @@ -0,0 +1,262 @@ +-- $Id: re.lua,v 1.44 2013/03/26 20:11:40 roberto Exp $ + +-- imported functions and modules +local tonumber, type, print, error = tonumber, type, print, error +local setmetatable = setmetatable +local m = require"lpeg" + +-- 'm' will be used to parse expressions, and 'mm' will be used to +-- create expressions; that is, 're' runs on 'm', creating patterns +-- on 'mm' +local mm = m + +-- pattern's metatable +local mt = getmetatable(mm.P(0)) + + + +-- No more global accesses after this point +local version = _VERSION +if version == "Lua 5.2" then _ENV = nil end + + +local any = m.P(1) + + +-- Pre-defined names +local Predef = { nl = m.P"\n" } + + +local mem +local fmem +local gmem + + +local function updatelocale () + mm.locale(Predef) + Predef.a = Predef.alpha + Predef.c = Predef.cntrl + Predef.d = Predef.digit + Predef.g = Predef.graph + Predef.l = Predef.lower + Predef.p = Predef.punct + Predef.s = Predef.space + Predef.u = Predef.upper + Predef.w = Predef.alnum + Predef.x = Predef.xdigit + Predef.A = any - Predef.a + Predef.C = any - Predef.c + Predef.D = any - Predef.d + Predef.G = any - Predef.g + Predef.L = any - Predef.l + Predef.P = any - Predef.p + Predef.S = any - Predef.s + Predef.U = any - Predef.u + Predef.W = any - Predef.w + Predef.X = any - Predef.x + mem = {} -- restart memoization + fmem = {} + gmem = {} + local mt = {__mode = "v"} + setmetatable(mem, mt) + setmetatable(fmem, mt) + setmetatable(gmem, mt) +end + + +updatelocale() + + + +local I = m.P(function (s,i) print(i, s:sub(1, i-1)); return i end) + + +local function getdef (id, defs) + local c = defs and defs[id] + if not c then error("undefined name: " .. id) end + return c +end + + +local function patt_error (s, i) + local msg = (#s < i + 20) and s:sub(i) + or s:sub(i,i+20) .. "..." + msg = ("pattern error near '%s'"):format(msg) + error(msg, 2) +end + +local function mult (p, n) + local np = mm.P(true) + while n >= 1 do + if n%2 >= 1 then np = np * p end + p = p * p + n = n/2 + end + return np +end + +local function equalcap (s, i, c) + if type(c) ~= "string" then return nil end + local e = #c + i + if s:sub(i, e - 1) == c then return e else return nil end +end + + +local S = (Predef.space + "--" * (any - Predef.nl)^0)^0 + +local name = m.R("AZ", "az", "__") * m.R("AZ", "az", "__", "09")^0 + +local arrow = S * "<-" + +local seq_follow = m.P"/" + ")" + "}" + ":}" + "~}" + "|}" + (name * arrow) + -1 + +name = m.C(name) + + +-- a defined name only have meaning in a given environment +local Def = name * m.Carg(1) + +local num = m.C(m.R"09"^1) * S / tonumber + +local String = "'" * m.C((any - "'")^0) * "'" + + '"' * m.C((any - '"')^0) * '"' + + +local defined = "%" * Def / function (c,Defs) + local cat = Defs and Defs[c] or Predef[c] + if not cat then error ("name '" .. c .. "' undefined") end + return cat +end + +local Range = m.Cs(any * (m.P"-"/"") * (any - "]")) / mm.R + +local item = defined + Range + m.C(any) + +local Class = + "[" + * (m.C(m.P"^"^-1)) -- optional complement symbol + * m.Cf(item * (item - "]")^0, mt.__add) / + function (c, p) return c == "^" and any - p or p end + * "]" + +local function adddef (t, k, exp) + if t[k] then + error("'"..k.."' already defined as a rule") + else + t[k] = exp + end + return t +end + +local function firstdef (n, r) return adddef({n}, n, r) end + + +local function NT (n, b) + if not b then + error("rule '"..n.."' used outside a grammar") + else return mm.V(n) + end +end + + +local exp = m.P{ "Exp", + Exp = S * ( m.V"Grammar" + + m.Cf(m.V"Seq" * ("/" * S * m.V"Seq")^0, mt.__add) ); + Seq = m.Cf(m.Cc(m.P"") * m.V"Prefix"^0 , mt.__mul) + * (#seq_follow + patt_error); + Prefix = "&" * S * m.V"Prefix" / mt.__len + + "!" * S * m.V"Prefix" / mt.__unm + + m.V"Suffix"; + Suffix = m.Cf(m.V"Primary" * S * + ( ( m.P"+" * m.Cc(1, mt.__pow) + + m.P"*" * m.Cc(0, mt.__pow) + + m.P"?" * m.Cc(-1, mt.__pow) + + "^" * ( m.Cg(num * m.Cc(mult)) + + m.Cg(m.C(m.S"+-" * m.R"09"^1) * m.Cc(mt.__pow)) + ) + + "->" * S * ( m.Cg((String + num) * m.Cc(mt.__div)) + + m.P"{}" * m.Cc(nil, m.Ct) + + m.Cg(Def / getdef * m.Cc(mt.__div)) + ) + + "=>" * S * m.Cg(Def / getdef * m.Cc(m.Cmt)) + ) * S + )^0, function (a,b,f) return f(a,b) end ); + Primary = "(" * m.V"Exp" * ")" + + String / mm.P + + Class + + defined + + "{:" * (name * ":" + m.Cc(nil)) * m.V"Exp" * ":}" / + function (n, p) return mm.Cg(p, n) end + + "=" * name / function (n) return mm.Cmt(mm.Cb(n), equalcap) end + + m.P"{}" / mm.Cp + + "{~" * m.V"Exp" * "~}" / mm.Cs + + "{|" * m.V"Exp" * "|}" / mm.Ct + + "{" * m.V"Exp" * "}" / mm.C + + m.P"." * m.Cc(any) + + (name * -arrow + "<" * name * ">") * m.Cb("G") / NT; + Definition = name * arrow * m.V"Exp"; + Grammar = m.Cg(m.Cc(true), "G") * + m.Cf(m.V"Definition" / firstdef * m.Cg(m.V"Definition")^0, + adddef) / mm.P +} + +local pattern = S * m.Cg(m.Cc(false), "G") * exp / mm.P * (-any + patt_error) + + +local function compile (p, defs) + if mm.type(p) == "pattern" then return p end -- already compiled + local cp = pattern:match(p, 1, defs) + if not cp then error("incorrect pattern", 3) end + return cp +end + +local function match (s, p, i) + local cp = mem[p] + if not cp then + cp = compile(p) + mem[p] = cp + end + return cp:match(s, i or 1) +end + +local function find (s, p, i) + local cp = fmem[p] + if not cp then + cp = compile(p) / 0 + cp = mm.P{ mm.Cp() * cp * mm.Cp() + 1 * mm.V(1) } + fmem[p] = cp + end + local i, e = cp:match(s, i or 1) + if i then return i, e - 1 + else return i + end +end + +local function gsub (s, p, rep) + local g = gmem[p] or {} -- ensure gmem[p] is not collected while here + gmem[p] = g + local cp = g[rep] + if not cp then + cp = compile(p) + cp = mm.Cs((cp / rep + 1)^0) + g[rep] = cp + end + return cp:match(s) +end + + +-- exported names +local re = { + compile = compile, + match = match, + find = find, + gsub = gsub, + updatelocale = updatelocale, +} + +if version == "Lua 5.1" then + --I need this to work with strict.lua, sorry for breaking compatibility. + --_G.re = re +end + +return re diff --git a/lua_probject/tolua_project/ltn12.lua b/lua_probject/tolua_project/ltn12.lua new file mode 100644 index 00000000..575c5a7f --- /dev/null +++ b/lua_probject/tolua_project/ltn12.lua @@ -0,0 +1,309 @@ +----------------------------------------------------------------------------- +-- LTN12 - Filters, sources, sinks and pumps. +-- LuaSocket toolkit. +-- Author: Diego Nehab +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- +-- Declare module +----------------------------------------------------------------------------- +local string = require("string") +local table = require("table") +local unpack = unpack or table.unpack +local base = _G +local _M = {} +if module then -- heuristic for exporting a global package table + ltn12 = _M +end +local filter,source,sink,pump = {},{},{},{} + +_M.filter = filter +_M.source = source +_M.sink = sink +_M.pump = pump + +local unpack = unpack or table.unpack +local select = base.select + +-- 2048 seems to be better in windows... +_M.BLOCKSIZE = 2048 +_M._VERSION = "LTN12 1.0.3" + +----------------------------------------------------------------------------- +-- Filter stuff +----------------------------------------------------------------------------- +-- returns a high level filter that cycles a low-level filter +function filter.cycle(low, ctx, extra) + base.assert(low) + return function(chunk) + local ret + ret, ctx = low(ctx, chunk, extra) + return ret + end +end + +-- chains a bunch of filters together +-- (thanks to Wim Couwenberg) +function filter.chain(...) + local arg = {...} + local n = base.select('#',...) + local top, index = 1, 1 + local retry = "" + return function(chunk) + retry = chunk and retry + while true do + if index == top then + chunk = arg[index](chunk) + if chunk == "" or top == n then return chunk + elseif chunk then index = index + 1 + else + top = top+1 + index = top + end + else + chunk = arg[index](chunk or "") + if chunk == "" then + index = index - 1 + chunk = retry + elseif chunk then + if index == n then return chunk + else index = index + 1 end + else base.error("filter returned inappropriate nil") end + end + end + end +end + +----------------------------------------------------------------------------- +-- Source stuff +----------------------------------------------------------------------------- +-- create an empty source +local function empty() + return nil +end + +function source.empty() + return empty +end + +-- returns a source that just outputs an error +function source.error(err) + return function() + return nil, err + end +end + +-- creates a file source +function source.file(handle, io_err) + if handle then + return function() + local chunk = handle:read(_M.BLOCKSIZE) + if not chunk then handle:close() end + return chunk + end + else return source.error(io_err or "unable to open file") end +end + +-- turns a fancy source into a simple source +function source.simplify(src) + base.assert(src) + return function() + local chunk, err_or_new = src() + src = err_or_new or src + if not chunk then return nil, err_or_new + else return chunk end + end +end + +-- creates string source +function source.string(s) + if s then + local i = 1 + return function() + local chunk = string.sub(s, i, i+_M.BLOCKSIZE-1) + i = i + _M.BLOCKSIZE + if chunk ~= "" then return chunk + else return nil end + end + else return source.empty() end +end + +-- creates rewindable source +function source.rewind(src) + base.assert(src) + local t = {} + return function(chunk) + if not chunk then + chunk = table.remove(t) + if not chunk then return src() + else return chunk end + else + table.insert(t, chunk) + end + end +end + +-- chains a source with one or several filter(s) +function source.chain(src, f, ...) + if ... then f=filter.chain(f, ...) end + base.assert(src and f) + local last_in, last_out = "", "" + local state = "feeding" + local err + return function() + if not last_out then + base.error('source is empty!', 2) + end + while true do + if state == "feeding" then + last_in, err = src() + if err then return nil, err end + last_out = f(last_in) + if not last_out then + if last_in then + base.error('filter returned inappropriate nil') + else + return nil + end + elseif last_out ~= "" then + state = "eating" + if last_in then last_in = "" end + return last_out + end + else + last_out = f(last_in) + if last_out == "" then + if last_in == "" then + state = "feeding" + else + base.error('filter returned ""') + end + elseif not last_out then + if last_in then + base.error('filter returned inappropriate nil') + else + return nil + end + else + return last_out + end + end + end + end +end + +-- creates a source that produces contents of several sources, one after the +-- other, as if they were concatenated +-- (thanks to Wim Couwenberg) +function source.cat(...) + local arg = {...} + local src = table.remove(arg, 1) + return function() + while src do + local chunk, err = src() + if chunk then return chunk end + if err then return nil, err end + src = table.remove(arg, 1) + end + end +end + +----------------------------------------------------------------------------- +-- Sink stuff +----------------------------------------------------------------------------- +-- creates a sink that stores into a table +function sink.table(t) + t = t or {} + local f = function(chunk, err) + if chunk then table.insert(t, chunk) end + return 1 + end + return f, t +end + +-- turns a fancy sink into a simple sink +function sink.simplify(snk) + base.assert(snk) + return function(chunk, err) + local ret, err_or_new = snk(chunk, err) + if not ret then return nil, err_or_new end + snk = err_or_new or snk + return 1 + end +end + +-- creates a file sink +function sink.file(handle, io_err) + if handle then + return function(chunk, err) + if not chunk then + handle:close() + return 1 + else return handle:write(chunk) end + end + else return sink.error(io_err or "unable to open file") end +end + +-- creates a sink that discards data +local function null() + return 1 +end + +function sink.null() + return null +end + +-- creates a sink that just returns an error +function sink.error(err) + return function() + return nil, err + end +end + +-- chains a sink with one or several filter(s) +function sink.chain(f, snk, ...) + if ... then + local args = { f, snk, ... } + snk = table.remove(args, #args) + f = filter.chain(unpack(args)) + end + base.assert(f and snk) + return function(chunk, err) + if chunk ~= "" then + local filtered = f(chunk) + local done = chunk and "" + while true do + local ret, snkerr = snk(filtered, err) + if not ret then return nil, snkerr end + if filtered == done then return 1 end + filtered = f(done) + end + else return 1 end + end +end + +----------------------------------------------------------------------------- +-- Pump stuff +----------------------------------------------------------------------------- +-- pumps one chunk from the source to the sink +function pump.step(src, snk) + local chunk, src_err = src() + local ret, snk_err = snk(chunk, src_err) + if chunk and ret then return 1 + else return nil, src_err or snk_err end +end + +-- pumps all data from a source to a sink, using a step function +function pump.all(src, snk, step) + base.assert(src and snk) + step = step or pump.step + while true do + local ret, err = step(src, snk) + if not ret then + if err then return nil, err + else return 1 end + end + end +end + +return _M diff --git a/lua_probject/tolua_project/mime.lua b/lua_probject/tolua_project/mime.lua new file mode 100644 index 00000000..642cd9ca --- /dev/null +++ b/lua_probject/tolua_project/mime.lua @@ -0,0 +1,90 @@ +----------------------------------------------------------------------------- +-- MIME support for the Lua language. +-- Author: Diego Nehab +-- Conforming to RFCs 2045-2049 +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- +-- Declare module and import dependencies +----------------------------------------------------------------------------- +local base = _G +local ltn12 = require("ltn12") +local mime = require("mime.core") +local io = require("io") +local string = require("string") +local _M = mime + +-- encode, decode and wrap algorithm tables +local encodet, decodet, wrapt = {},{},{} + +_M.encodet = encodet +_M.decodet = decodet +_M.wrapt = wrapt + +-- creates a function that chooses a filter by name from a given table +local function choose(table) + return function(name, opt1, opt2) + if base.type(name) ~= "string" then + name, opt1, opt2 = "default", name, opt1 + end + local f = table[name or "nil"] + if not f then + base.error("unknown key (" .. base.tostring(name) .. ")", 3) + else return f(opt1, opt2) end + end +end + +-- define the encoding filters +encodet['base64'] = function() + return ltn12.filter.cycle(_M.b64, "") +end + +encodet['quoted-printable'] = function(mode) + return ltn12.filter.cycle(_M.qp, "", + (mode == "binary") and "=0D=0A" or "\r\n") +end + +-- define the decoding filters +decodet['base64'] = function() + return ltn12.filter.cycle(_M.unb64, "") +end + +decodet['quoted-printable'] = function() + return ltn12.filter.cycle(_M.unqp, "") +end + +local function format(chunk) + if chunk then + if chunk == "" then return "''" + else return string.len(chunk) end + else return "nil" end +end + +-- define the line-wrap filters +wrapt['text'] = function(length) + length = length or 76 + return ltn12.filter.cycle(_M.wrp, length, length) +end +wrapt['base64'] = wrapt['text'] +wrapt['default'] = wrapt['text'] + +wrapt['quoted-printable'] = function() + return ltn12.filter.cycle(_M.qpwrp, 76, 76) +end + +-- function that choose the encoding, decoding or wrap algorithm +_M.encode = choose(encodet) +_M.decode = choose(decodet) +_M.wrap = choose(wrapt) + +-- define the end-of-line normalization filter +function _M.normalize(marker) + return ltn12.filter.cycle(_M.eol, 0, marker) +end + +-- high level stuffing filter +function _M.stuff() + return ltn12.filter.cycle(_M.dot, 2) +end + +return _M \ No newline at end of file diff --git a/lua_probject/tolua_project/misc/functions.lua b/lua_probject/tolua_project/misc/functions.lua new file mode 100644 index 00000000..5d89a67c --- /dev/null +++ b/lua_probject/tolua_project/misc/functions.lua @@ -0,0 +1,58 @@ +local require = require +local string = string +local table = table + +int64.zero = int64.new(0,0) +uint64.zero = uint64.new(0,0) + +function string.split(input, delimiter) + input = tostring(input) + delimiter = tostring(delimiter) + if (delimiter=='') then return false end + local pos,arr = 0, {} + -- for each divider found + for st,sp in function() return string.find(input, delimiter, pos, true) end do + table.insert(arr, string.sub(input, pos, st - 1)) + pos = sp + 1 + end + table.insert(arr, string.sub(input, pos)) + return arr +end + +function import(moduleName, currentModuleName) + local currentModuleNameParts + local moduleFullName = moduleName + local offset = 1 + + while true do + if string.byte(moduleName, offset) ~= 46 then -- . + moduleFullName = string.sub(moduleName, offset) + if currentModuleNameParts and #currentModuleNameParts > 0 then + moduleFullName = table.concat(currentModuleNameParts, ".") .. "." .. moduleFullName + end + break + end + offset = offset + 1 + + if not currentModuleNameParts then + if not currentModuleName then + local n,v = debug.getlocal(3, 1) + currentModuleName = v + end + + currentModuleNameParts = string.split(currentModuleName, ".") + end + table.remove(currentModuleNameParts, #currentModuleNameParts) + end + + return require(moduleFullName) +end + +--重新require一个lua文件,替代系统文件。 +function reimport(name) + local package = package + package.loaded[name] = nil + package.preload[name] = nil + return require(name) +end + diff --git a/lua_probject/tolua_project/misc/strict.lua b/lua_probject/tolua_project/misc/strict.lua new file mode 100644 index 00000000..033b2db9 --- /dev/null +++ b/lua_probject/tolua_project/misc/strict.lua @@ -0,0 +1,40 @@ +-- +-- strict.lua +-- checks uses of undeclared global variables +-- All global variables must be 'declared' through a regular assignment +-- (even assigning nil will do) in a main chunk before being used +-- anywhere or assigned to inside a function. +-- +-- modified for better compatibility with LuaJIT, see: +-- http://www.freelists.org/post/luajit/strictlua-with-stripped-bytecode + +local getinfo, error, rawset, rawget = debug.getinfo, error, rawset, rawget + +local mt = getmetatable(_G) +if mt == nil then + mt = {} + setmetatable(_G, mt) +end + +mt.__declared = {} + +mt.__newindex = function (t, n, v) + if not mt.__declared[n] then + local info = getinfo(2, "S") + if info and info.linedefined > 0 then + error("assign to undeclared variable '"..n.."'", 2) + end + mt.__declared[n] = true + end + rawset(t, n, v) +end + +mt.__index = function (t, n) + if not mt.__declared[n] then + local info = getinfo(2, "S") + if info and info.linedefined > 0 then + error("variable '"..n.."' is not declared", 2) + end + end + return rawget(t, n) +end diff --git a/lua_probject/tolua_project/misc/utf8.lua b/lua_probject/tolua_project/misc/utf8.lua new file mode 100644 index 00000000..66730a6e --- /dev/null +++ b/lua_probject/tolua_project/misc/utf8.lua @@ -0,0 +1,306 @@ +local utf8 = {} + +--byte index of the next char after the char at byte index i, followed by a valid flag for the char at byte index i. +--nil if not found. invalid characters are iterated as 1-byte chars. +function utf8.next_raw(s, i) + if not i then + if #s == 0 then return nil end + return 1, true --fake flag (doesn't matter since this flag is not to be taken as full validation) + end + if i > #s then return end + local c = s:byte(i) + if c >= 0x00 and c <= 0x7F then + i = i + 1 + elseif c >= 0xC2 and c <= 0xDF then + i = i + 2 + elseif c >= 0xE0 and c <= 0xEF then + i = i + 3 + elseif c >= 0xF0 and c <= 0xF4 then + i = i + 4 + else --invalid + return i + 1, false + end + if i > #s then return end + return i, true +end + +--next() is the generic iterator and can be replaced for different semantics. next_raw() must preserve its semantics. +utf8.next = utf8.next_raw + +--iterate chars, returning the byte index where each char starts +function utf8.byte_indices(s, previ) + return utf8.next, s, previ +end + +--number of chars in string +function utf8.len(s) + assert(s, "bad argument #1 to 'len' (string expected, got nil)") + local len = 0 + for _ in utf8.byte_indices(s) do + len = len + 1 + end + return len +end + +--byte index given char index. nil if the index is outside the string. +function utf8.byte_index(s, target_ci) + if target_ci < 1 then return end + local ci = 0 + for i in utf8.byte_indices(s) do + ci = ci + 1 + if ci == target_ci then + return i + end + end + assert(target_ci > ci, "invalid index") +end + +--char index given byte index. nil if the index is outside the string. +function utf8.char_index(s, target_i) + if target_i < 1 or target_i > #s then return end + local ci = 0 + for i in utf8.byte_indices(s) do + ci = ci + 1 + if i == target_i then + return ci + end + end + error("invalid index") +end + +--byte index of the prev. char before the char at byte index i, which defaults to #s + 1. +--nil if the index is outside the 2..#s+1 range. +--NOTE: unlike next(), this is a O(N) operation! +function utf8.prev(s, nexti) + nexti = nexti or #s + 1 + if nexti <= 1 or nexti > #s + 1 then return end + local lasti, lastvalid = utf8.next(s) + for i, valid in utf8.byte_indices(s) do + if i == nexti then + return lasti, lastvalid + end + lasti, lastvalid = i, valid + end + if nexti == #s + 1 then + return lasti, lastvalid + end + error("invalid index") +end + +--iterate chars in reverse order, returning the byte index where each char starts. +function utf8.byte_indices_reverse(s, nexti) + if #s < 200 then + --using prev() is a O(N^2/2) operation, ok for small strings (200 chars need 40,000 iterations) + return utf8.prev, s, nexti + else + --store byte indices in a table and iterate them in reverse. + --this is 40x slower than byte_indices() but still fast at 2mil chars/second (but eats RAM and makes garbage). + local t = {} + for i in utf8.byte_indices(s) do + if nexti and i >= nexti then break end + table.insert(t, i) + end + local i = #t + 1 + return function() + i = i - 1 + return t[i] + end + end +end + +--sub based on char indices, which, unlike with standard string.sub(), can't be negative. +--start_ci can be 1..inf and end_ci can be 0..inf. end_ci can be nil meaning last char. +--if start_ci is out of range or end_ci < start_ci, the empty string is returned. +--if end_ci is out of range, it is considered to be the last position in the string. +function utf8.sub(s, start_ci, end_ci) + --assert for positive indices because we might implement negative indices in the future. + assert(start_ci >= 1) + assert(not end_ci or end_ci >= 0) + local ci = 0 + local start_i, end_i + for i in utf8.byte_indices(s) do + ci = ci + 1 + if ci == start_ci then + start_i = i + end + if ci == end_ci then + end_i = i + end + end + if not start_i then + assert(start_ci > ci, 'invalid index') + return '' + end + if end_ci and not end_i then + if end_ci < start_ci then + return '' + end + assert(end_ci > ci, 'invalid index') + end + return s:sub(start_i, end_i and end_i - 1) +end + +--check if a string contains a substring at byte index i without making garbage. +--nil if the index is out of range. true if searching for the empty string. +function utf8.contains(s, i, sub) + if i < 1 or i > #s then return nil end + for si = 1, #sub do + if s:byte(i + si - 1) ~= sub:byte(si) then + return false + end + end + return true +end + +--count the number of occurences of a substring in a string. the substring cannot be the empty string. +function utf8.count(s, sub) + assert(#sub > 0) + local count = 0 + local i = 1 + while i do + if utf8.contains(s, i, sub) then + count = count + 1 + i = i + #sub + if i > #s then break end + else + i = utf8.next(s, i) + end + end + return count +end + +--utf8 validation and sanitization + +--check if there's a valid utf8 codepoint at byte index i. valid ranges for each utf8 byte are: +-- byte 1 2 3 4 +-------------------------------------------- +-- 00 - 7F +-- C2 - DF 80 - BF +-- E0 A0 - BF 80 - BF +-- E1 - EC 80 - BF 80 - BF +-- ED 80 - 9F 80 - BF +-- EE - EF 80 - BF 80 - BF +-- F0 90 - BF 80 - BF 80 - BF +-- F1 - F3 80 - BF 80 - BF 80 - BF +-- F4 80 - 8F 80 - BF 80 - BF +function utf8.isvalid(s, i) + local c = s:byte(i) + if not c then + return false + elseif c >= 0x00 and c <= 0x7F then + return true + elseif c >= 0xC2 and c <= 0xDF then + local c2 = s:byte(i + 1) + return c2 and c2 >= 0x80 and c2 <= 0xBF + elseif c >= 0xE0 and c <= 0xEF then + local c2 = s:byte(i + 1) + local c3 = s:byte(i + 2) + if c == 0xE0 then + return c2 and c3 and + c2 >= 0xA0 and c2 <= 0xBF and + c3 >= 0x80 and c3 <= 0xBF + elseif c >= 0xE1 and c <= 0xEC then + return c2 and c3 and + c2 >= 0x80 and c2 <= 0xBF and + c3 >= 0x80 and c3 <= 0xBF + elseif c == 0xED then + return c2 and c3 and + c2 >= 0x80 and c2 <= 0x9F and + c3 >= 0x80 and c3 <= 0xBF + elseif c >= 0xEE and c <= 0xEF then + if c == 0xEF and c2 == 0xBF and (c3 == 0xBE or c3 == 0xBF) then + return false --uFFFE and uFFFF non-characters + end + return c2 and c3 and + c2 >= 0x80 and c2 <= 0xBF and + c3 >= 0x80 and c3 <= 0xBF + end + elseif c >= 0xF0 and c <= 0xF4 then + local c2 = s:byte(i + 1) + local c3 = s:byte(i + 2) + local c4 = s:byte(i + 3) + if c == 0xF0 then + return c2 and c3 and c4 and + c2 >= 0x90 and c2 <= 0xBF and + c3 >= 0x80 and c3 <= 0xBF and + c4 >= 0x80 and c4 <= 0xBF + elseif c >= 0xF1 and c <= 0xF3 then + return c2 and c3 and c4 and + c2 >= 0x80 and c2 <= 0xBF and + c3 >= 0x80 and c3 <= 0xBF and + c4 >= 0x80 and c4 <= 0xBF + elseif c == 0xF4 then + return c2 and c3 and c4 and + c2 >= 0x80 and c2 <= 0x8F and + c3 >= 0x80 and c3 <= 0xBF and + c4 >= 0x80 and c4 <= 0xBF + end + end + return false +end + +--byte index of the next valid utf8 char after the char at byte index i. +--nil if indices go out of range. invalid characters are skipped. +function utf8.next_valid(s, i) + local valid + i, valid = utf8.next_raw(s, i) + while i and (not valid or not utf8.isvalid(s, i)) do + i, valid = utf8.next(s, i) + end + return i +end + +--iterate valid chars, returning the byte index where each char starts +function utf8.valid_byte_indices(s) + return utf8.next_valid, s +end + +--assert that a string only contains valid utf8 characters +function utf8.validate(s) + for i, valid in utf8.byte_indices(s) do + if not valid or not utf8.isvalid(s, i) then + error(string.format('invalid utf8 char at #%d', i)) + end + end +end + +local function table_lookup(s, i, j, t) + return t[s:sub(i, j)] +end + +--replace characters in string based on a function f(s, i, j, ...) -> replacement_string | nil +function utf8.replace(s, f, ...) + if type(f) == 'table' then + return utf8.replace(s, table_lookup, f) + end + if s == '' then + return s + end + local t = {} + local lasti = 1 + for i in utf8.byte_indices(s) do + local nexti = utf8.next(s, i) or #s + 1 + local repl = f(s, i, nexti - 1, ...) + if repl then + table.insert(t, s:sub(lasti, i - 1)) + table.insert(t, repl) + lasti = nexti + end + end + table.insert(t, s:sub(lasti)) + return table.concat(t) +end + +local function replace_invalid(s, i, j, repl_char) + if not utf8.isvalid(s, i) then + return repl_char + end +end + +--replace invalid utf8 chars with a replacement char +function utf8.sanitize(s, repl_char) + repl_char = repl_char or '�' --\uFFFD + return utf8.replace(s, replace_invalid, repl_char) +end + +return utf8 diff --git a/lua_probject/tolua_project/protobuf/containers.lua b/lua_probject/tolua_project/protobuf/containers.lua new file mode 100644 index 00000000..9b5445ed --- /dev/null +++ b/lua_probject/tolua_project/protobuf/containers.lua @@ -0,0 +1,78 @@ +-- +-------------------------------------------------------------------------------- +-- FILE: containers.lua +-- DESCRIPTION: protoc-gen-lua +-- Google's Protocol Buffers project, ported to lua. +-- https://code.google.com/p/protoc-gen-lua/ +-- +-- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com +-- All rights reserved. +-- +-- Use, modification and distribution are subject to the "New BSD License" +-- as listed at . +-- +-- COMPANY: NetEase +-- CREATED: 2010年08月02日 16时15分42秒 CST +-------------------------------------------------------------------------------- +-- +local setmetatable = setmetatable +local table = table +local rawset = rawset +local error = error + +module "protobuf.containers" + +local _RCFC_meta = { + add = function(self) + local value = self._message_descriptor._concrete_class() + local listener = self._listener + rawset(self, #self + 1, value) + value:_SetListener(listener) + if listener.dirty == false then + listener:Modified() + end + return value + end, + remove = function(self, key) + local listener = self._listener + table.remove(self, key) + listener:Modified() + end, + __newindex = function(self, key, value) + error("RepeatedCompositeFieldContainer Can't set value directly") + end +} +_RCFC_meta.__index = _RCFC_meta + +function RepeatedCompositeFieldContainer(listener, message_descriptor) + local o = { + _listener = listener, + _message_descriptor = message_descriptor + } + return setmetatable(o, _RCFC_meta) +end + +local _RSFC_meta = { + append = function(self, value) + self._type_checker(value) + rawset(self, #self + 1, value) + self._listener:Modified() + end, + remove = function(self, key) + table.remove(self, key) + self._listener:Modified() + end, + __newindex = function(self, key, value) + error("RepeatedCompositeFieldContainer Can't set value directly") + end +} +_RSFC_meta.__index = _RSFC_meta + +function RepeatedScalarFieldContainer(listener, type_checker) + local o = {} + o._listener = listener + o._type_checker = type_checker + return setmetatable(o, _RSFC_meta) +end + + diff --git a/lua_probject/tolua_project/protobuf/decoder.lua b/lua_probject/tolua_project/protobuf/decoder.lua new file mode 100644 index 00000000..12e3be3c --- /dev/null +++ b/lua_probject/tolua_project/protobuf/decoder.lua @@ -0,0 +1,340 @@ +-- +-------------------------------------------------------------------------------- +-- FILE: decoder.lua +-- DESCRIPTION: protoc-gen-lua +-- Google's Protocol Buffers project, ported to lua. +-- https://code.google.com/p/protoc-gen-lua/ +-- +-- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com +-- All rights reserved. +-- +-- Use, modification and distribution are subject to the "New BSD License" +-- as listed at . +-- +-- COMPANY: NetEase +-- CREATED: 2010年07月29日 19时30分51秒 CST +-------------------------------------------------------------------------------- +-- +local string = string +local table = table +local assert = assert +local ipairs = ipairs +local error = error +local print = print + +local pb = require "pb" +local encoder = require "protobuf.encoder" +local wire_format = require "protobuf.wire_format" +module "protobuf.decoder" + +local _DecodeVarint = pb.varint_decoder +local _DecodeSignedVarint = pb.signed_varint_decoder + +local _DecodeVarint32 = pb.varint_decoder +local _DecodeSignedVarint32 = pb.signed_varint_decoder + +local _DecodeVarint64 = pb.varint_decoder64 +local _DecodeSignedVarint64 = pb.signed_varint_decoder64 + +ReadTag = pb.read_tag + +local function _SimpleDecoder(wire_type, decode_value) + return function(field_number, is_repeated, is_packed, key, new_default) + if is_packed then + local DecodeVarint = _DecodeVarint + return function (buffer, pos, pend, message, field_dict) + local value = field_dict[key] + if value == nil then + value = new_default(message) + field_dict[key] = value + end + local endpoint + endpoint, pos = DecodeVarint(buffer, pos) + endpoint = endpoint + pos + if endpoint > pend then + error('Truncated message.') + end + local element + while pos < endpoint do + element, pos = decode_value(buffer, pos) + value[#value + 1] = element + end + if pos > endpoint then + value:remove(#value) + error('Packed element was truncated.') + end + return pos + end + elseif is_repeated then + local tag_bytes = encoder.TagBytes(field_number, wire_type) + local tag_len = #tag_bytes + local sub = string.sub + return function(buffer, pos, pend, message, field_dict) + local value = field_dict[key] + if value == nil then + value = new_default(message) + field_dict[key] = value + end + while 1 do + local element, new_pos = decode_value(buffer, pos) + value:append(element) + pos = new_pos + tag_len + if sub(buffer, new_pos+1, pos) ~= tag_bytes or new_pos >= pend then + if new_pos > pend then + error('Truncated message.') + end + return new_pos + end + end + end + else + return function (buffer, pos, pend, message, field_dict) + field_dict[key], pos = decode_value(buffer, pos) + if pos > pend then + field_dict[key] = nil + error('Truncated message.') + end + return pos + end + end + end +end + +local function _ModifiedDecoder(wire_type, decode_value, modify_value) + local InnerDecode = function (buffer, pos) + local result, new_pos = decode_value(buffer, pos) + return modify_value(result), new_pos + end + return _SimpleDecoder(wire_type, InnerDecode) +end + +local function _StructPackDecoder(wire_type, value_size, format) + local struct_unpack = pb.struct_unpack + + function InnerDecode(buffer, pos) + local new_pos = pos + value_size + local result = struct_unpack(format, buffer, pos) + return result, new_pos + end + return _SimpleDecoder(wire_type, InnerDecode) +end + +local function _Boolean(value) + return value ~= 0 +end + +Int32Decoder = _SimpleDecoder(wire_format.WIRETYPE_VARINT, _DecodeSignedVarint32) +EnumDecoder = Int32Decoder + +Int64Decoder = _SimpleDecoder(wire_format.WIRETYPE_VARINT, _DecodeSignedVarint64) + +UInt32Decoder = _SimpleDecoder(wire_format.WIRETYPE_VARINT, _DecodeVarint32) +UInt64Decoder = _SimpleDecoder(wire_format.WIRETYPE_VARINT, _DecodeVarint64) + +SInt32Decoder = _ModifiedDecoder(wire_format.WIRETYPE_VARINT, _DecodeVarint32, wire_format.ZigZagDecode32) +SInt64Decoder = _ModifiedDecoder(wire_format.WIRETYPE_VARINT, _DecodeVarint64, wire_format.ZigZagDecode64) + +Fixed32Decoder = _StructPackDecoder(wire_format.WIRETYPE_FIXED32, 4, string.byte('I')) +Fixed64Decoder = _StructPackDecoder(wire_format.WIRETYPE_FIXED64, 8, string.byte('Q')) +SFixed32Decoder = _StructPackDecoder(wire_format.WIRETYPE_FIXED32, 4, string.byte('i')) +SFixed64Decoder = _StructPackDecoder(wire_format.WIRETYPE_FIXED64, 8, string.byte('q')) +FloatDecoder = _StructPackDecoder(wire_format.WIRETYPE_FIXED32, 4, string.byte('f')) +DoubleDecoder = _StructPackDecoder(wire_format.WIRETYPE_FIXED64, 8, string.byte('d')) + + +BoolDecoder = _ModifiedDecoder(wire_format.WIRETYPE_VARINT, _DecodeVarint, _Boolean) + + +function StringDecoder(field_number, is_repeated, is_packed, key, new_default) + local DecodeVarint = _DecodeVarint + local sub = string.sub + -- local unicode = unicode + assert(not is_packed) + if is_repeated then + local tag_bytes = encoder.TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) + local tag_len = #tag_bytes + return function (buffer, pos, pend, message, field_dict) + local value = field_dict[key] + if value == nil then + value = new_default(message) + field_dict[key] = value + end + while 1 do + local size, new_pos + size, pos = DecodeVarint(buffer, pos) + new_pos = pos + size + if new_pos > pend then + error('Truncated string.') + end + value:append(sub(buffer, pos+1, new_pos)) + pos = new_pos + tag_len + if sub(buffer, new_pos + 1, pos) ~= tag_bytes or new_pos == pend then + return new_pos + end + end + end + else + return function (buffer, pos, pend, message, field_dict) + local size, new_pos + size, pos = DecodeVarint(buffer, pos) + new_pos = pos + size + if new_pos > pend then + error('Truncated string.') + end + field_dict[key] = sub(buffer, pos + 1, new_pos) + return new_pos + end + end +end + +function BytesDecoder(field_number, is_repeated, is_packed, key, new_default) + local DecodeVarint = _DecodeVarint + local sub = string.sub + assert(not is_packed) + if is_repeated then + local tag_bytes = encoder.TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) + local tag_len = #tag_bytes + return function (buffer, pos, pend, message, field_dict) + local value = field_dict[key] + if value == nil then + value = new_default(message) + field_dict[key] = value + end + while 1 do + local size, new_pos + size, pos = DecodeVarint(buffer, pos) + new_pos = pos + size + if new_pos > pend then + error('Truncated string.') + end + value:append(sub(buffer, pos + 1, new_pos)) + pos = new_pos + tag_len + if sub(buffer, new_pos + 1, pos) ~= tag_bytes or new_pos == pend then + return new_pos + end + end + end + else + return function(buffer, pos, pend, message, field_dict) + local size, new_pos + size, pos = DecodeVarint(buffer, pos) + new_pos = pos + size + if new_pos > pend then + error('Truncated string.') + end + field_dict[key] = sub(buffer, pos + 1, new_pos) + return new_pos + end + end +end + +function MessageDecoder(field_number, is_repeated, is_packed, key, new_default) + local DecodeVarint = _DecodeVarint + local sub = string.sub + + assert(not is_packed) + if is_repeated then + local tag_bytes = encoder.TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) + local tag_len = #tag_bytes + return function (buffer, pos, pend, message, field_dict) + local value = field_dict[key] + if value == nil then + value = new_default(message) + field_dict[key] = value + end + while 1 do + local size, new_pos + size, pos = DecodeVarint(buffer, pos) + new_pos = pos + size + if new_pos > pend then + error('Truncated message.') + end + if value:add():_InternalParse(buffer, pos, new_pos) ~= new_pos then + error('Unexpected end-group tag.') + end + pos = new_pos + tag_len + if sub(buffer, new_pos + 1, pos) ~= tag_bytes or new_pos == pend then + return new_pos + end + end + end + else + return function (buffer, pos, pend, message, field_dict) + local value = field_dict[key] + if value == nil then + value = new_default(message) + field_dict[key] = value + end + local size, new_pos + size, pos = DecodeVarint(buffer, pos) + new_pos = pos + size + if new_pos > pend then + error('Truncated message.') + end + if value:_InternalParse(buffer, pos, new_pos) ~= new_pos then + error('Unexpected end-group tag.') + end + return new_pos + end + end +end + +function _SkipVarint(buffer, pos, pend) + local value + value, pos = _DecodeVarint(buffer, pos) + return pos +end + +function _SkipFixed64(buffer, pos, pend) + pos = pos + 8 + if pos > pend then + error('Truncated message.') + end + return pos +end + +function _SkipLengthDelimited(buffer, pos, pend) + local size + size, pos = _DecodeVarint(buffer, pos) + pos = pos + size + if pos > pend then + error('Truncated message.') + end + return pos +end + +function _SkipFixed32(buffer, pos, pend) + pos = pos + 4 + if pos > pend then + error('Truncated message.') + end + return pos +end + +function _RaiseInvalidWireType(buffer, pos, pend) + error('Tag had invalid wire type.') +end + +function _FieldSkipper() + WIRETYPE_TO_SKIPPER = { + _SkipVarint, + _SkipFixed64, + _SkipLengthDelimited, + _SkipGroup, + _EndGroup, + _SkipFixed32, + _RaiseInvalidWireType, + _RaiseInvalidWireType, + } + +-- wiretype_mask = wire_format.TAG_TYPE_MASK + local ord = string.byte + local sub = string.sub + + return function (buffer, pos, pend, tag_bytes) + local wire_type = ord(sub(tag_bytes, 1, 1)) % 8 + 1 + return WIRETYPE_TO_SKIPPER[wire_type](buffer, pos, pend) + end +end + +SkipField = _FieldSkipper() diff --git a/lua_probject/tolua_project/protobuf/descriptor.lua b/lua_probject/tolua_project/protobuf/descriptor.lua new file mode 100644 index 00000000..52c59f6d --- /dev/null +++ b/lua_probject/tolua_project/protobuf/descriptor.lua @@ -0,0 +1,64 @@ +-- +-------------------------------------------------------------------------------- +-- FILE: descriptor.lua +-- DESCRIPTION: protoc-gen-lua +-- Google's Protocol Buffers project, ported to lua. +-- https://code.google.com/p/protoc-gen-lua/ +-- +-- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com +-- All rights reserved. +-- +-- Use, modification and distribution are subject to the "New BSD License" +-- as listed at . +-- +-- COMPANY: NetEase +-- CREATED: 2010年08月11日 18时45分43秒 CST +-------------------------------------------------------------------------------- +-- + +module "protobuf.descriptor" + +FieldDescriptor = { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18, + MAX_TYPE = 18, + + -- Must be consistent with C++ FieldDescriptor::CppType enum in + -- descriptor.h. + -- + CPPTYPE_INT32 = 1, + CPPTYPE_INT64 = 2, + CPPTYPE_UINT32 = 3, + CPPTYPE_UINT64 = 4, + CPPTYPE_DOUBLE = 5, + CPPTYPE_FLOAT = 6, + CPPTYPE_BOOL = 7, + CPPTYPE_ENUM = 8, + CPPTYPE_STRING = 9, + CPPTYPE_MESSAGE = 10, + MAX_CPPTYPE = 10, + + -- Must be consistent with C++ FieldDescriptor::Label enum in + -- descriptor.h. + -- + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3, + MAX_LABEL = 3 +} diff --git a/lua_probject/tolua_project/protobuf/encoder.lua b/lua_probject/tolua_project/protobuf/encoder.lua new file mode 100644 index 00000000..959483cf --- /dev/null +++ b/lua_probject/tolua_project/protobuf/encoder.lua @@ -0,0 +1,473 @@ +-- +-------------------------------------------------------------------------------- +-- FILE: encoder.lua +-- DESCRIPTION: protoc-gen-lua +-- Google's Protocol Buffers project, ported to lua. +-- https://code.google.com/p/protoc-gen-lua/ +-- +-- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com +-- All rights reserved. +-- +-- Use, modification and distribution are subject to the "New BSD License" +-- as listed at . +-- +-- COMPANY: NetEase +-- CREATED: 2010年07月29日 19时30分46秒 CST +-------------------------------------------------------------------------------- +-- +local string = string +local table = table +local ipairs = ipairs +local assert =assert + +local pb = require "pb" +local wire_format = require "protobuf.wire_format" +module "protobuf.encoder" + +function _VarintSize(value) + if value <= 0x7f then return 1 end + if value <= 0x3fff then return 2 end + if value <= 0x1fffff then return 3 end + if value <= 0xfffffff then return 4 end + if value <= 0x7ffffffff then return 5 end + if value <= 0x3ffffffffff then return 6 end + if value <= 0x1ffffffffffff then return 7 end + if value <= 0xffffffffffffff then return 8 end + if value <= 0x7fffffffffffffff then return 9 end + return 10 +end + +function _SignedVarintSize(value) + if value < 0 then return 10 end + if value <= 0x7f then return 1 end + if value <= 0x3fff then return 2 end + if value <= 0x1fffff then return 3 end + if value <= 0xfffffff then return 4 end + if value <= 0x7ffffffff then return 5 end + if value <= 0x3ffffffffff then return 6 end + if value <= 0x1ffffffffffff then return 7 end + if value <= 0xffffffffffffff then return 8 end + if value <= 0x7fffffffffffffff then return 9 end + return 10 +end + +function _TagSize(field_number) + return _VarintSize(wire_format.PackTag(field_number, 0)) +end + +function _SimpleSizer(compute_value_size) + return function(field_number, is_repeated, is_packed) + local tag_size = _TagSize(field_number) + if is_packed then + local VarintSize = _VarintSize + return function(value) + local result = 0 + for _, element in ipairs(value) do + result = result + compute_value_size(element) + end + return result + VarintSize(result) + tag_size + end + elseif is_repeated then + return function(value) + local result = tag_size * #value + for _, element in ipairs(value) do + result = result + compute_value_size(element) + end + return result + end + else + return function (value) + return tag_size + compute_value_size(value) + end + end + end +end + +function _ModifiedSizer(compute_value_size, modify_value) + return function (field_number, is_repeated, is_packed) + local tag_size = _TagSize(field_number) + if is_packed then + local VarintSize = _VarintSize + return function (value) + local result = 0 + for _, element in ipairs(value) do + result = result + compute_value_size(modify_value(element)) + end + return result + VarintSize(result) + tag_size + end + elseif is_repeated then + return function (value) + local result = tag_size * #value + for _, element in ipairs(value) do + result = result + compute_value_size(modify_value(element)) + end + return result + end + else + return function (value) + return tag_size + compute_value_size(modify_value(value)) + end + end + end +end + +function _FixedSizer(value_size) + return function (field_number, is_repeated, is_packed) + local tag_size = _TagSize(field_number) + if is_packed then + local VarintSize = _VarintSize + return function (value) + local result = #value * value_size + return result + VarintSize(result) + tag_size + end + elseif is_repeated then + local element_size = value_size + tag_size + return function(value) + return #value * element_size + end + else + local field_size = value_size + tag_size + return function (value) + return field_size + end + end + end +end + +Int32Sizer = _SimpleSizer(_SignedVarintSize) +Int64Sizer = _SimpleSizer(pb.signed_varint_size) +EnumSizer = Int32Sizer + +UInt32Sizer = _SimpleSizer(_VarintSize) +UInt64Sizer = _SimpleSizer(pb.varint_size) + +SInt32Sizer = _ModifiedSizer(_SignedVarintSize, wire_format.ZigZagEncode32) +SInt64Sizer = SInt32Sizer + +Fixed32Sizer = _FixedSizer(4) +SFixed32Sizer = Fixed32Sizer +FloatSizer = Fixed32Sizer + +Fixed64Sizer = _FixedSizer(8) +SFixed64Sizer = Fixed64Sizer +DoubleSizer = Fixed64Sizer + +BoolSizer = _FixedSizer(1) + + +function StringSizer(field_number, is_repeated, is_packed) + local tag_size = _TagSize(field_number) + local VarintSize = _VarintSize + assert(not is_packed) + if is_repeated then + return function(value) + local result = tag_size * #value + for _, element in ipairs(value) do + local l = #element + result = result + VarintSize(l) + l + end + return result + end + else + return function(value) + local l = #value + return tag_size + VarintSize(l) + l + end + end +end + +function BytesSizer(field_number, is_repeated, is_packed) + local tag_size = _TagSize(field_number) + local VarintSize = _VarintSize + assert(not is_packed) + if is_repeated then + return function (value) + local result = tag_size * #value + for _,element in ipairs(value) do + local l = #element + result = result + VarintSize(l) + l + end + return result + end + else + return function (value) + local l = #value + return tag_size + VarintSize(l) + l + end + end +end + +function MessageSizer(field_number, is_repeated, is_packed) + local tag_size = _TagSize(field_number) + local VarintSize = _VarintSize + assert(not is_packed) + if is_repeated then + return function(value) + local result = tag_size * #value + for _,element in ipairs(value) do + local l = element:ByteSize() + result = result + VarintSize(l) + l + end + return result + end + else + return function (value) + local l = value:ByteSize() + return tag_size + VarintSize(l) + l + end + end +end + + +-- ==================================================================== +-- Encoders! + +local _EncodeVarint = pb.varint_encoder +local _EncodeSignedVarint = pb.signed_varint_encoder +local _EncodeVarint64 = pb.varint_encoder64 +local _EncodeSignedVarint64 = pb.signed_varint_encoder64 + + +function _VarintBytes(value) + local out = {} + local write = function(value) + out[#out + 1 ] = value + end + _EncodeSignedVarint(write, value) + return table.concat(out) +end + +function TagBytes(field_number, wire_type) + return _VarintBytes(wire_format.PackTag(field_number, wire_type)) +end + +function _SimpleEncoder(wire_type, encode_value, compute_value_size) + return function(field_number, is_repeated, is_packed) + if is_packed then + local tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) + local EncodeVarint = _EncodeVarint + return function(write, value) + write(tag_bytes) + local size = 0 + for _, element in ipairs(value) do + size = size + compute_value_size(element) + end + EncodeVarint(write, size) + for element in value do + encode_value(write, element) + end + end + elseif is_repeated then + local tag_bytes = TagBytes(field_number, wire_type) + return function(write, value) + for _, element in ipairs(value) do + write(tag_bytes) + encode_value(write, element) + end + end + else + local tag_bytes = TagBytes(field_number, wire_type) + return function(write, value) + write(tag_bytes) + encode_value(write, value) + end + end + end +end + +function _ModifiedEncoder(wire_type, encode_value, compute_value_size, modify_value) + return function (field_number, is_repeated, is_packed) + if is_packed then + local tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) + local EncodeVarint = _EncodeVarint + return function (write, value) + write(tag_bytes) + local size = 0 + for _, element in ipairs(value) do + size = size + compute_value_size(modify_value(element)) + end + EncodeVarint(write, size) + for _, element in ipairs(value) do + encode_value(write, modify_value(element)) + end + end + elseif is_repeated then + local tag_bytes = TagBytes(field_number, wire_type) + return function (write, value) + for _, element in ipairs(value) do + write(tag_bytes) + encode_value(write, modify_value(element)) + end + end + else + local tag_bytes = TagBytes(field_number, wire_type) + return function (write, value) + write(tag_bytes) + encode_value(write, modify_value(value)) + end + end + end +end + +function _StructPackEncoder(wire_type, value_size, format) + return function(field_number, is_repeated, is_packed) + local struct_pack = pb.struct_pack + if is_packed then + local tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) + local EncodeVarint = _EncodeVarint + return function (write, value) + write(tag_bytes) + EncodeVarint(write, #value * value_size) + for _, element in ipairs(value) do + struct_pack(write, format, element) + end + end + elseif is_repeated then + local tag_bytes = TagBytes(field_number, wire_type) + return function (write, value) + for _, element in ipairs(value) do + write(tag_bytes) + struct_pack(write, format, element) + end + end + else + local tag_bytes = TagBytes(field_number, wire_type) + return function (write, value) + write(tag_bytes) + struct_pack(write, format, value) + end + end + + end +end + +Int32Encoder = _SimpleEncoder(wire_format.WIRETYPE_VARINT, _EncodeSignedVarint, _SignedVarintSize) +Int64Encoder = _SimpleEncoder(wire_format.WIRETYPE_VARINT, _EncodeSignedVarint64, _SignedVarintSize) +EnumEncoder = Int32Encoder + +UInt32Encoder = _SimpleEncoder(wire_format.WIRETYPE_VARINT, _EncodeVarint, _VarintSize) +UInt64Encoder = _SimpleEncoder(wire_format.WIRETYPE_VARINT, _EncodeVarint64, _VarintSize) + +SInt32Encoder = _ModifiedEncoder( + wire_format.WIRETYPE_VARINT, _EncodeVarint, _VarintSize, + wire_format.ZigZagEncode32) + +SInt64Encoder = _ModifiedEncoder( + wire_format.WIRETYPE_VARINT, _EncodeVarint64, _VarintSize, + wire_format.ZigZagEncode64) + +Fixed32Encoder = _StructPackEncoder(wire_format.WIRETYPE_FIXED32, 4, string.byte('I')) +Fixed64Encoder = _StructPackEncoder(wire_format.WIRETYPE_FIXED64, 8, string.byte('Q')) +SFixed32Encoder = _StructPackEncoder(wire_format.WIRETYPE_FIXED32, 4, string.byte('i')) +SFixed64Encoder = _StructPackEncoder(wire_format.WIRETYPE_FIXED64, 8, string.byte('q')) +FloatEncoder = _StructPackEncoder(wire_format.WIRETYPE_FIXED32, 4, string.byte('f')) +DoubleEncoder = _StructPackEncoder(wire_format.WIRETYPE_FIXED64, 8, string.byte('d')) + + +function BoolEncoder(field_number, is_repeated, is_packed) + local false_byte = '\0' + local true_byte = '\1' + if is_packed then + local tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) + local EncodeVarint = _EncodeVarint + return function (write, value) + write(tag_bytes) + EncodeVarint(write, #value) + for _, element in ipairs(value) do + if element then + write(true_byte) + else + write(false_byte) + end + end + end + elseif is_repeated then + local tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_VARINT) + return function(write, value) + for _, element in ipairs(value) do + write(tag_bytes) + if element then + write(true_byte) + else + write(false_byte) + end + end + end + else + local tag_bytes = TagBytes(field_number, wire_format.WIRETYPE_VARINT) + return function (write, value) + write(tag_bytes) + if value then + return write(true_byte) + end + return write(false_byte) + end + end +end + +function StringEncoder(field_number, is_repeated, is_packed) + local tag = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) + local EncodeVarint = _EncodeVarint + assert(not is_packed) + if is_repeated then + return function (write, value) + for _, element in ipairs(value) do +-- encoded = element.encode('utf-8') + write(tag) + EncodeVarint(write, #element) + write(element) + end + end + else + return function (write, value) +-- local encoded = value.encode('utf-8') + write(tag) + EncodeVarint(write, #value) + return write(value) + end + end +end + +function BytesEncoder(field_number, is_repeated, is_packed) + local tag = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) + local EncodeVarint = _EncodeVarint + assert(not is_packed) + if is_repeated then + return function (write, value) + for _, element in ipairs(value) do + write(tag) + EncodeVarint(write, #element) + write(element) + end + end + else + return function(write, value) + write(tag) + EncodeVarint(write, #value) + return write(value) + end + end +end + + +function MessageEncoder(field_number, is_repeated, is_packed) + local tag = TagBytes(field_number, wire_format.WIRETYPE_LENGTH_DELIMITED) + local EncodeVarint = _EncodeVarint + assert(not is_packed) + if is_repeated then + return function(write, value) + for _, element in ipairs(value) do + write(tag) + EncodeVarint(write, element:ByteSize()) + element:_InternalSerialize(write) + end + end + else + return function (write, value) + write(tag) + EncodeVarint(write, value:ByteSize()) + return value:_InternalSerialize(write) + end + end +end + diff --git a/lua_probject/tolua_project/protobuf/listener.lua b/lua_probject/tolua_project/protobuf/listener.lua new file mode 100644 index 00000000..7d7f89db --- /dev/null +++ b/lua_probject/tolua_project/protobuf/listener.lua @@ -0,0 +1,50 @@ +-- +-------------------------------------------------------------------------------- +-- FILE: listener.lua +-- DESCRIPTION: protoc-gen-lua +-- Google's Protocol Buffers project, ported to lua. +-- https://code.google.com/p/protoc-gen-lua/ +-- +-- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com +-- All rights reserved. +-- +-- Use, modification and distribution are subject to the "New BSD License" +-- as listed at . +-- +-- COMPANY: NetEase +-- CREATED: 2010年08月02日 17时35分25秒 CST +-------------------------------------------------------------------------------- +-- +local setmetatable = setmetatable + +module "protobuf.listener" + +local _null_listener = { + Modified = function() + end +} + +function NullMessageListener() + return _null_listener +end + +local _listener_meta = { + Modified = function(self) + if self.dirty then + return + end + if self._parent_message then + self._parent_message:_Modified() + end + end +} +_listener_meta.__index = _listener_meta + +function Listener(parent_message) + local o = {} + o.__mode = "v" + o._parent_message = parent_message + o.dirty = false + return setmetatable(o, _listener_meta) +end + diff --git a/lua_probject/tolua_project/protobuf/protobuf.lua b/lua_probject/tolua_project/protobuf/protobuf.lua new file mode 100644 index 00000000..1235cf93 --- /dev/null +++ b/lua_probject/tolua_project/protobuf/protobuf.lua @@ -0,0 +1,960 @@ +-- +-------------------------------------------------------------------------------- +-- FILE: protobuf.lua +-- DESCRIPTION: protoc-gen-lua +-- Google's Protocol Buffers project, ported to lua. +-- https://code.google.com/p/protoc-gen-lua/ +-- +-- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com +-- All rights reserved. +-- +-- Use, modification and distribution are subject to the "New BSD License" +-- as listed at . +-- +-- COMPANY: NetEase +-- CREATED: 2010年07月29日 14时30分02秒 CST +-------------------------------------------------------------------------------- +-- + +local setmetatable = setmetatable +local rawset = rawset +local rawget = rawget +local error = error +local ipairs = ipairs +local pairs = pairs +local print = print +local table = table +local string = string +local tostring = tostring +local type = type + +local pb = require "pb" +local wire_format = require "protobuf.wire_format" +local type_checkers = require "protobuf.type_checkers" +local encoder = require "protobuf.encoder" +local decoder = require "protobuf.decoder" +local listener_mod = require "protobuf.listener" +local containers = require "protobuf.containers" +local descriptor = require "protobuf.descriptor" +local FieldDescriptor = descriptor.FieldDescriptor +local text_format = require "protobuf.text_format" + +module("protobuf.protobuf") + +local function make_descriptor(name, descriptor, usable_key) + local meta = { + __newindex = function(self, key, value) + if usable_key[key] then + rawset(self, key, value) + else + error("error key: "..key) + end + end + }; + meta.__index = meta + meta.__call = function() + return setmetatable({}, meta) + end + + _M[name] = setmetatable(descriptor, meta); +end + + +make_descriptor("Descriptor", {}, { + name = true, + full_name = true, + filename = true, + containing_type = true, + fields = true, + nested_types = true, + enum_types = true, + extensions = true, + options = true, + is_extendable = true, + extension_ranges = true, +}) + +make_descriptor("FieldDescriptor", FieldDescriptor, { + name = true, + full_name = true, + index = true, + number = true, + type = true, + cpp_type = true, + label = true, + has_default_value = true, + default_value = true, + containing_type = true, + message_type = true, + enum_type = true, + is_extension = true, + extension_scope = true, +}) + +make_descriptor("EnumDescriptor", {}, { + name = true, + full_name = true, + values = true, + containing_type = true, + options = true +}) + +make_descriptor("EnumValueDescriptor", {}, { + name = true, + index = true, + number = true, + type = true, + options = true +}) + +-- Maps from field type to expected wiretype. +local FIELD_TYPE_TO_WIRE_TYPE = { + [FieldDescriptor.TYPE_DOUBLE] = wire_format.WIRETYPE_FIXED64, + [FieldDescriptor.TYPE_FLOAT] = wire_format.WIRETYPE_FIXED32, + [FieldDescriptor.TYPE_INT64] = wire_format.WIRETYPE_VARINT, + [FieldDescriptor.TYPE_UINT64] = wire_format.WIRETYPE_VARINT, + [FieldDescriptor.TYPE_INT32] = wire_format.WIRETYPE_VARINT, + [FieldDescriptor.TYPE_FIXED64] = wire_format.WIRETYPE_FIXED64, + [FieldDescriptor.TYPE_FIXED32] = wire_format.WIRETYPE_FIXED32, + [FieldDescriptor.TYPE_BOOL] = wire_format.WIRETYPE_VARINT, + [FieldDescriptor.TYPE_STRING] = wire_format.WIRETYPE_LENGTH_DELIMITED, + [FieldDescriptor.TYPE_GROUP] = wire_format.WIRETYPE_START_GROUP, + [FieldDescriptor.TYPE_MESSAGE] = wire_format.WIRETYPE_LENGTH_DELIMITED, + [FieldDescriptor.TYPE_BYTES] = wire_format.WIRETYPE_LENGTH_DELIMITED, + [FieldDescriptor.TYPE_UINT32] = wire_format.WIRETYPE_VARINT, + [FieldDescriptor.TYPE_ENUM] = wire_format.WIRETYPE_VARINT, + [FieldDescriptor.TYPE_SFIXED32] = wire_format.WIRETYPE_FIXED32, + [FieldDescriptor.TYPE_SFIXED64] = wire_format.WIRETYPE_FIXED64, + [FieldDescriptor.TYPE_SINT32] = wire_format.WIRETYPE_VARINT, + [FieldDescriptor.TYPE_SINT64] = wire_format.WIRETYPE_VARINT +} + +local NON_PACKABLE_TYPES = { + [FieldDescriptor.TYPE_STRING] = true, + [FieldDescriptor.TYPE_GROUP] = true, + [FieldDescriptor.TYPE_MESSAGE] = true, + [FieldDescriptor.TYPE_BYTES] = true +} + +local _VALUE_CHECKERS = { + [FieldDescriptor.CPPTYPE_INT32] = type_checkers.Int32ValueChecker(), + [FieldDescriptor.CPPTYPE_INT64] = type_checkers.TypeChecker({string = true, number = true}), + [FieldDescriptor.CPPTYPE_UINT32] = type_checkers.Uint32ValueChecker(), + [FieldDescriptor.CPPTYPE_UINT64] = type_checkers.TypeChecker({string = true, number = true}), + [FieldDescriptor.CPPTYPE_DOUBLE] = type_checkers.TypeChecker({number = true}), + [FieldDescriptor.CPPTYPE_FLOAT] = type_checkers.TypeChecker({number = true}), + [FieldDescriptor.CPPTYPE_BOOL] = type_checkers.TypeChecker({boolean = true, bool = true, int=true}), + [FieldDescriptor.CPPTYPE_ENUM] = type_checkers.Int32ValueChecker(), + [FieldDescriptor.CPPTYPE_STRING] = type_checkers.TypeChecker({string = true}) +} + + +local TYPE_TO_BYTE_SIZE_FN = { + [FieldDescriptor.TYPE_DOUBLE] = wire_format.DoubleByteSize, + [FieldDescriptor.TYPE_FLOAT] = wire_format.FloatByteSize, + [FieldDescriptor.TYPE_INT64] = wire_format.Int64ByteSize, + [FieldDescriptor.TYPE_UINT64] = wire_format.UInt64ByteSize, + [FieldDescriptor.TYPE_INT32] = wire_format.Int32ByteSize, + [FieldDescriptor.TYPE_FIXED64] = wire_format.Fixed64ByteSize, + [FieldDescriptor.TYPE_FIXED32] = wire_format.Fixed32ByteSize, + [FieldDescriptor.TYPE_BOOL] = wire_format.BoolByteSize, + [FieldDescriptor.TYPE_STRING] = wire_format.StringByteSize, + [FieldDescriptor.TYPE_GROUP] = wire_format.GroupByteSize, + [FieldDescriptor.TYPE_MESSAGE] = wire_format.MessageByteSize, + [FieldDescriptor.TYPE_BYTES] = wire_format.BytesByteSize, + [FieldDescriptor.TYPE_UINT32] = wire_format.UInt32ByteSize, + [FieldDescriptor.TYPE_ENUM] = wire_format.EnumByteSize, + [FieldDescriptor.TYPE_SFIXED32] = wire_format.SFixed32ByteSize, + [FieldDescriptor.TYPE_SFIXED64] = wire_format.SFixed64ByteSize, + [FieldDescriptor.TYPE_SINT32] = wire_format.SInt32ByteSize, + [FieldDescriptor.TYPE_SINT64] = wire_format.SInt64ByteSize +} + +local TYPE_TO_ENCODER = { + [FieldDescriptor.TYPE_DOUBLE] = encoder.DoubleEncoder, + [FieldDescriptor.TYPE_FLOAT] = encoder.FloatEncoder, + [FieldDescriptor.TYPE_INT64] = encoder.Int64Encoder, + [FieldDescriptor.TYPE_UINT64] = encoder.UInt64Encoder, + [FieldDescriptor.TYPE_INT32] = encoder.Int32Encoder, + [FieldDescriptor.TYPE_FIXED64] = encoder.Fixed64Encoder, + [FieldDescriptor.TYPE_FIXED32] = encoder.Fixed32Encoder, + [FieldDescriptor.TYPE_BOOL] = encoder.BoolEncoder, + [FieldDescriptor.TYPE_STRING] = encoder.StringEncoder, + [FieldDescriptor.TYPE_GROUP] = encoder.GroupEncoder, + [FieldDescriptor.TYPE_MESSAGE] = encoder.MessageEncoder, + [FieldDescriptor.TYPE_BYTES] = encoder.BytesEncoder, + [FieldDescriptor.TYPE_UINT32] = encoder.UInt32Encoder, + [FieldDescriptor.TYPE_ENUM] = encoder.EnumEncoder, + [FieldDescriptor.TYPE_SFIXED32] = encoder.SFixed32Encoder, + [FieldDescriptor.TYPE_SFIXED64] = encoder.SFixed64Encoder, + [FieldDescriptor.TYPE_SINT32] = encoder.SInt32Encoder, + [FieldDescriptor.TYPE_SINT64] = encoder.SInt64Encoder +} + +local TYPE_TO_SIZER = { + [FieldDescriptor.TYPE_DOUBLE] = encoder.DoubleSizer, + [FieldDescriptor.TYPE_FLOAT] = encoder.FloatSizer, + [FieldDescriptor.TYPE_INT64] = encoder.Int64Sizer, + [FieldDescriptor.TYPE_UINT64] = encoder.UInt64Sizer, + [FieldDescriptor.TYPE_INT32] = encoder.Int32Sizer, + [FieldDescriptor.TYPE_FIXED64] = encoder.Fixed64Sizer, + [FieldDescriptor.TYPE_FIXED32] = encoder.Fixed32Sizer, + [FieldDescriptor.TYPE_BOOL] = encoder.BoolSizer, + [FieldDescriptor.TYPE_STRING] = encoder.StringSizer, + [FieldDescriptor.TYPE_GROUP] = encoder.GroupSizer, + [FieldDescriptor.TYPE_MESSAGE] = encoder.MessageSizer, + [FieldDescriptor.TYPE_BYTES] = encoder.BytesSizer, + [FieldDescriptor.TYPE_UINT32] = encoder.UInt32Sizer, + [FieldDescriptor.TYPE_ENUM] = encoder.EnumSizer, + [FieldDescriptor.TYPE_SFIXED32] = encoder.SFixed32Sizer, + [FieldDescriptor.TYPE_SFIXED64] = encoder.SFixed64Sizer, + [FieldDescriptor.TYPE_SINT32] = encoder.SInt32Sizer, + [FieldDescriptor.TYPE_SINT64] = encoder.SInt64Sizer +} + +local TYPE_TO_DECODER = { + [FieldDescriptor.TYPE_DOUBLE] = decoder.DoubleDecoder, + [FieldDescriptor.TYPE_FLOAT] = decoder.FloatDecoder, + [FieldDescriptor.TYPE_INT64] = decoder.Int64Decoder, + [FieldDescriptor.TYPE_UINT64] = decoder.UInt64Decoder, + [FieldDescriptor.TYPE_INT32] = decoder.Int32Decoder, + [FieldDescriptor.TYPE_FIXED64] = decoder.Fixed64Decoder, + [FieldDescriptor.TYPE_FIXED32] = decoder.Fixed32Decoder, + [FieldDescriptor.TYPE_BOOL] = decoder.BoolDecoder, + [FieldDescriptor.TYPE_STRING] = decoder.StringDecoder, + [FieldDescriptor.TYPE_GROUP] = decoder.GroupDecoder, + [FieldDescriptor.TYPE_MESSAGE] = decoder.MessageDecoder, + [FieldDescriptor.TYPE_BYTES] = decoder.BytesDecoder, + [FieldDescriptor.TYPE_UINT32] = decoder.UInt32Decoder, + [FieldDescriptor.TYPE_ENUM] = decoder.EnumDecoder, + [FieldDescriptor.TYPE_SFIXED32] = decoder.SFixed32Decoder, + [FieldDescriptor.TYPE_SFIXED64] = decoder.SFixed64Decoder, + [FieldDescriptor.TYPE_SINT32] = decoder.SInt32Decoder, + [FieldDescriptor.TYPE_SINT64] = decoder.SInt64Decoder +} + +local FIELD_TYPE_TO_WIRE_TYPE = { + [FieldDescriptor.TYPE_DOUBLE] = wire_format.WIRETYPE_FIXED64, + [FieldDescriptor.TYPE_FLOAT] = wire_format.WIRETYPE_FIXED32, + [FieldDescriptor.TYPE_INT64] = wire_format.WIRETYPE_VARINT, + [FieldDescriptor.TYPE_UINT64] = wire_format.WIRETYPE_VARINT, + [FieldDescriptor.TYPE_INT32] = wire_format.WIRETYPE_VARINT, + [FieldDescriptor.TYPE_FIXED64] = wire_format.WIRETYPE_FIXED64, + [FieldDescriptor.TYPE_FIXED32] = wire_format.WIRETYPE_FIXED32, + [FieldDescriptor.TYPE_BOOL] = wire_format.WIRETYPE_VARINT, + [FieldDescriptor.TYPE_STRING] = wire_format.WIRETYPE_LENGTH_DELIMITED, + [FieldDescriptor.TYPE_GROUP] = wire_format.WIRETYPE_START_GROUP, + [FieldDescriptor.TYPE_MESSAGE] = wire_format.WIRETYPE_LENGTH_DELIMITED, + [FieldDescriptor.TYPE_BYTES] = wire_format.WIRETYPE_LENGTH_DELIMITED, + [FieldDescriptor.TYPE_UINT32] = wire_format.WIRETYPE_VARINT, + [FieldDescriptor.TYPE_ENUM] = wire_format.WIRETYPE_VARINT, + [FieldDescriptor.TYPE_SFIXED32] = wire_format.WIRETYPE_FIXED32, + [FieldDescriptor.TYPE_SFIXED64] = wire_format.WIRETYPE_FIXED64, + [FieldDescriptor.TYPE_SINT32] = wire_format.WIRETYPE_VARINT, + [FieldDescriptor.TYPE_SINT64] = wire_format.WIRETYPE_VARINT +} + +local function IsTypePackable(field_type) + return NON_PACKABLE_TYPES[field_type] == nil +end + +local function GetTypeChecker(cpp_type, field_type) + if (cpp_type == FieldDescriptor.CPPTYPE_STRING and field_type == FieldDescriptor.TYPE_STRING) then + return type_checkers.UnicodeValueChecker() + end + return _VALUE_CHECKERS[cpp_type] +end + +local function _DefaultValueConstructorForField(field) + if field.label == FieldDescriptor.LABEL_REPEATED then + if type(field.default_value) ~= "table" or #(field.default_value) ~= 0 then + error('Repeated field default value not empty list:' .. tostring(field.default_value)) + end + if field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE then + local message_type = field.message_type + return function (message) + return containers.RepeatedCompositeFieldContainer(message._listener_for_children, message_type) + end + else + local type_checker = GetTypeChecker(field.cpp_type, field.type) + return function (message) + return containers.RepeatedScalarFieldContainer(message._listener_for_children, type_checker) + end + end + end + if field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE then + local message_type = field.message_type + return function (message) + result = message_type._concrete_class() + result._SetListener(message._listener_for_children) + return result + end + end + return function (message) + return field.default_value + end +end + +local function _AttachFieldHelpers(message_meta, field_descriptor) + local is_repeated = (field_descriptor.label == FieldDescriptor.LABEL_REPEATED) + local is_packed = (field_descriptor.has_options and field_descriptor.GetOptions().packed) + + rawset(field_descriptor, "_encoder", TYPE_TO_ENCODER[field_descriptor.type](field_descriptor.number, is_repeated, is_packed)) + rawset(field_descriptor, "_sizer", TYPE_TO_SIZER[field_descriptor.type](field_descriptor.number, is_repeated, is_packed)) + rawset(field_descriptor, "_default_constructor", _DefaultValueConstructorForField(field_descriptor)) + + local AddDecoder = function(wiretype, is_packed) + local tag_bytes = encoder.TagBytes(field_descriptor.number, wiretype) + message_meta._decoders_by_tag[tag_bytes] = TYPE_TO_DECODER[field_descriptor.type](field_descriptor.number, is_repeated, is_packed, field_descriptor, field_descriptor._default_constructor) + end + + AddDecoder(FIELD_TYPE_TO_WIRE_TYPE[field_descriptor.type], False) + if is_repeated and IsTypePackable(field_descriptor.type) then + AddDecoder(wire_format.WIRETYPE_LENGTH_DELIMITED, True) + end +end + +local function _AddEnumValues(descriptor, message_meta) + for _, enum_type in ipairs(descriptor.enum_types) do + for _, enum_value in ipairs(enum_type.values) do + message_meta._member[enum_value.name] = enum_value.number + end + end +end + +local function _InitMethod(message_meta) + return function() + local self = {} + self._cached_byte_size = 0 + self._cached_byte_size_dirty = false + self._fields = {} + self._is_present_in_parent = false + self._listener = listener_mod.NullMessageListener() + self._listener_for_children = listener_mod.Listener(self) + return setmetatable(self, message_meta) + end +end + +local function _AddPropertiesForRepeatedField(field, message_meta) + local property_name = field.name + + message_meta._getter[property_name] = function(self) + local field_value = self._fields[field] + if field_value == nil then + field_value = field._default_constructor(self) + self._fields[field] = field_value + + if not self._cached_byte_size_dirty then + message_meta._member._Modified(self) + end + end + return field_value + end + + message_meta._setter[property_name] = function(self) + error('Assignment not allowed to repeated field "' .. property_name .. '" in protocol message object.') + end +end + +local function _AddPropertiesForNonRepeatedCompositeField(field, message_meta) + local property_name = field.name + local message_type = field.message_type + + message_meta._getter[property_name] = function(self) + local field_value = self._fields[field] + if field_value == nil then + field_value = message_type._concrete_class() + field_value:_SetListener(self._listener_for_children) + self._fields[field] = field_value + + if not self._cached_byte_size_dirty then + message_meta._member._Modified(self) + end + end + return field_value + end + message_meta._setter[property_name] = function(self, new_value) + error('Assignment not allowed to composite field' .. property_name .. 'in protocol message object.' ) + end +end + +local function _AddPropertiesForNonRepeatedScalarField(field, message) + local property_name = field.name + local type_checker = GetTypeChecker(field.cpp_type, field.type) + local default_value = field.default_value + + message._getter[property_name] = function(self) + local value = self._fields[field] + if value ~= nil then + return self._fields[field] + else + return default_value + end + end + + message._setter[property_name] = function(self, new_value) + type_checker(new_value) + self._fields[field] = new_value + if not self._cached_byte_size_dirty then + message._member._Modified(self) + end + end +end + +local function _AddPropertiesForField(field, message_meta) + constant_name = field.name:upper() .. "_FIELD_NUMBER" + message_meta._member[constant_name] = field.number + + if field.label == FieldDescriptor.LABEL_REPEATED then + _AddPropertiesForRepeatedField(field, message_meta) + elseif field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE then + _AddPropertiesForNonRepeatedCompositeField(field, message_meta) + else + _AddPropertiesForNonRepeatedScalarField(field, message_meta) + end +end + +local _ED_meta = { + __index = function(self, extension_handle) + local _extended_message = rawget(self, "_extended_message") + local value = _extended_message._fields[extension_handle] + if value ~= nil then + return value + end + if extension_handle.label == FieldDescriptor.LABEL_REPEATED then + value = extension_handle._default_constructor(self._extended_message) + elseif extension_handle.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE then + value = extension_handle.message_type._concrete_class() + value:_SetListener(_extended_message._listener_for_children) + else + return extension_handle.default_value + end + _extended_message._fields[extension_handle] = value + return value + end, + __newindex = function(self, extension_handle, value) + local _extended_message = rawget(self, "_extended_message") + if (extension_handle.label == FieldDescriptor.LABEL_REPEATED or + extension_handle.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE) then + error('Cannot assign to extension "'.. extension_handle.full_name .. '" because it is a repeated or composite type.') + end + + local type_checker = GetTypeChecker(extension_handle.cpp_type, extension_handle.type) + type_checker.CheckValue(value) + _extended_message._fields[extension_handle] = value + _extended_message._Modified() + end +} + +local function _ExtensionDict(message) + local o = {} + o._extended_message = message + return setmetatable(o, _ED_meta) +end + +local function _AddPropertiesForFields(descriptor, message_meta) + for _, field in ipairs(descriptor.fields) do + _AddPropertiesForField(field, message_meta) + end + if descriptor.is_extendable then + message_meta._getter.Extensions = function(self) return _ExtensionDict(self) end + end +end + +local function _AddPropertiesForExtensions(descriptor, message_meta) + local extension_dict = descriptor._extensions_by_name + for extension_name, extension_field in pairs(extension_dict) do + local constant_name = string.upper(extension_name) .. "_FIELD_NUMBER" + message_meta._member[constant_name] = extension_field.number + end +end + +local function _AddStaticMethods(message_meta) + message_meta._member.RegisterExtension = function(extension_handle) + extension_handle.containing_type = message_meta._descriptor + _AttachFieldHelpers(message_meta, extension_handle) + + if message_meta._extensions_by_number[extension_handle.number] == nil then + message_meta._extensions_by_number[extension_handle.number] = extension_handle + else + error( + string.format('Extensions "%s" and "%s" both try to extend message type "%s" with field number %d.', + extension_handle.full_name, actual_handle.full_name, + message_meta._descriptor.full_name, extension_handle.number)) + end + message_meta._extensions_by_name[extension_handle.full_name] = extension_handle + end + + message_meta._member.FromString = function(s) + local message = message_meta._member.__call() + message.MergeFromString(s) + return message + end +end + +local function _IsPresent(descriptor, value) + if descriptor.label == FieldDescriptor.LABEL_REPEATED then + return value + elseif descriptor.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE then + return value._is_present_in_parent + else + return true + end +end + +function sortFunc(a, b) + return a.index < b.index +end +function pairsByKeys (t, f) + local a = {} + for n in pairs(t) do table.insert(a, n) end + table.sort(a, f) + local i = 0 -- iterator variable + local iter = function () -- iterator function + i = i + 1 + if a[i] == nil then return nil + else return a[i], t[a[i]] + end + end + return iter +end + +local function _AddListFieldsMethod(message_descriptor, message_meta) + message_meta._member.ListFields = function (self) + local list_field = function(fields) + --local f, s, v = pairs(self._fields) + local f,s,v = pairsByKeys(self._fields, sortFunc) + local iter = function(a, i) + while true do + local descriptor, value = f(a, i) + if descriptor == nil then + return + elseif _IsPresent(descriptor, value) then + return descriptor, value + end + end + end + return iter, s, v + end + return list_field(self._fields) + end +end + +local function _AddHasFieldMethod(message_descriptor, message_meta) + local singular_fields = {} + for _, field in ipairs(message_descriptor.fields) do + if field.label ~= FieldDescriptor.LABEL_REPEATED then + singular_fields[field.name] = field + end + end + message_meta._member.HasField = function (self, field_name) + field = singular_fields[field_name] + if field == nil then + error('Protocol message has no singular "'.. field_name.. '" field.') + end + if field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE then + value = self._fields[field] + return value ~= nil and value._is_present_in_parent + else + local valueTmp = self._fields[field] + return valueTmp ~= nil + end + end +end + +local function _AddClearFieldMethod(message_descriptor, message_meta) + local singular_fields = {} + for _, field in ipairs(message_descriptor.fields) do + if field.label ~= FieldDescriptor.LABEL_REPEATED then + singular_fields[field.name] = field + end + end + + message_meta._member.ClearField = function(self, field_name) + field = singular_fields[field_name] + if field == nil then + error('Protocol message has no singular "'.. field_name.. '" field.') + end + + if self._fields[field] then + self._fields[field] = nil + end + message_meta._member._Modified(self) + end +end + +local function _AddClearExtensionMethod(message_meta) + message_meta._member.ClearExtension = function(self, extension_handle) + if self._fields[extension_handle] == nil then + self._fields[extension_handle] = nil + end + message_meta._member._Modified(self) + end +end + +local function _AddClearMethod(message_descriptor, message_meta) + message_meta._member.Clear = function(self) + self._fields = {} + message_meta._member._Modified(self) + end +end + +local function _AddStrMethod(message_meta) + local format = text_format.msg_format + message_meta.__tostring = function(self) + return format(self) + end +end + +local function _AddHasExtensionMethod(message_meta) + message_meta._member.HasExtension = function(self, extension_handle) + if extension_handle.label == FieldDescriptor.LABEL_REPEATED then + error(extension_handle.full_name .. ' is repeated.') + end + if extension_handle.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE then + value = self._fields[extension_handle] + return value ~= nil and value._is_present_in_parent + else + return self._fields[extension_handle] + end + end +end + +local function _AddSetListenerMethod(message_meta) + message_meta._member._SetListener = function(self, listener) + if listener ~= nil then + self._listener = listener_mod.NullMessageListener() + else + self._listener = listener + end + end +end + +local function _AddByteSizeMethod(message_descriptor, message_meta) + message_meta._member.ByteSize = function(self) + --kaiser + --bug:这里在Repeat字段的结构体如果第一个字段不是int变量会产生_cached_byte_size_dirty为false而导致byte size为0 + --如果bytesize为0让它强制计算byte size + if not self._cached_byte_size_dirty and self._cached_byte_size > 0 then + return self._cached_byte_size + end + local size = 0 + for field_descriptor, field_value in message_meta._member.ListFields(self) do + size = field_descriptor._sizer(field_value) + size + end + self._cached_byte_size = size + self._cached_byte_size_dirty = false + self._listener_for_children.dirty = false + return size + end +end + +local function _AddSerializeToStringMethod(message_descriptor, message_meta) + message_meta._member.SerializeToString = function(self) + if not message_meta._member.IsInitialized(self) then + error('Message is missing required fields: ' .. + table.concat(message_meta._member.FindInitializationErrors(self), ',')) + end + return message_meta._member.SerializePartialToString(self) + end + message_meta._member.SerializeToIOString = function(self, iostring) + if not message_meta._member.IsInitialized(self) then + error('Message is missing required fields: ' .. + table.concat(message_meta._member.FindInitializationErrors(self), ',')) + end + return message_meta._member.SerializePartialToIOString(self, iostring) + end +end + +local function _AddSerializePartialToStringMethod(message_descriptor, message_meta) + local concat = table.concat + local _internal_serialize = function(self, write_bytes) + for field_descriptor, field_value in message_meta._member.ListFields(self) do + field_descriptor._encoder(write_bytes, field_value) + end + end + + local _serialize_partial_to_iostring = function(self, iostring) + local w = iostring.write + local write = function(value) + w(iostring, value) + end + _internal_serialize(self, write) + return + end + + local _serialize_partial_to_string = function(self) + local out = {} + local write = function(value) + out[#out + 1] = value + end + _internal_serialize(self, write) + return concat(out) + end + + message_meta._member._InternalSerialize = _internal_serialize + message_meta._member.SerializePartialToIOString = _serialize_partial_to_iostring + message_meta._member.SerializePartialToString = _serialize_partial_to_string +end + + + +local function _AddMergeFromStringMethod(message_descriptor, message_meta) + local ReadTag = decoder.ReadTag + local SkipField = decoder.SkipField + local decoders_by_tag = message_meta._decoders_by_tag + + local _internal_parse = function(self, buffer, pos, pend) + message_meta._member._Modified(self) + local field_dict = self._fields + local tag_bytes, new_pos + local field_decoder + while pos ~= pend do + tag_bytes, new_pos = ReadTag(buffer, pos) + field_decoder = decoders_by_tag[tag_bytes] + if field_decoder == nil then + new_pos = SkipField(buffer, new_pos, pend, tag_bytes) + if new_pos == -1 then + return pos + end + pos = new_pos + else + pos = field_decoder(buffer, new_pos, pend, self, field_dict) + end + end + return pos + end + message_meta._member._InternalParse = _internal_parse + + local merge_from_string = function(self, serialized) + local length = #serialized + if _internal_parse(self, serialized, 0, length) ~= length then + error('Unexpected end-group tag.') + end + return length + end + message_meta._member.MergeFromString = merge_from_string + + message_meta._member.ParseFromString = function(self, serialized) + message_meta._member.Clear(self) + merge_from_string(self, serialized) + end +end + +local function _AddIsInitializedMethod(message_descriptor, message_meta) + local required_fields = {} + for _, field in ipairs(message_descriptor.fields) do + if field.label == FieldDescriptor.LABEL_REQUIRED then + required_fields[#required_fields + 1] = field + end + end + + message_meta._member.IsInitialized = function(self, errors) + for _, field in ipairs(required_fields) do + if self._fields[field] == nil or + (field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE and not self._fields[field]._is_present_in_parent) then + if errors ~= nil then + errors[#errors + 1] = message_meta._member.FindInitializationErrors(self) + end + return false + end + end + + for field, value in pairs(self._fields) do + if field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE then + if field.label == FieldDescriptor.LABEL_REPEATED then + for _, element in ipairs(value) do + if not element:IsInitialized() then + if errors ~= nil then + errors[#errors + 1] = message_meta._member.FindInitializationErrors(self) + end + return false + end + end + elseif value._is_present_in_parent and not value:IsInitialized() then + if errors ~= nil then + errors[#errors + 1] = message_meta._member.FindInitializationErrors(self) + end + return false + end + end + end + return true + end + + message_meta._member.FindInitializationErrors = function(self) + local errors = {} + + for _,field in ipairs(required_fields) do + if not message_meta._member.HasField(self, field.name) then + errors[#errors + 1] = field.name + end + end + + for field, value in message_meta._member.ListFields(self) do + if field.cpp_type == FieldDescriptor.CPPTYPE_MESSAGE then + if field.is_extension then + name = string.format("(%s)", field.full_name) + else + name = field.name + end + if field.label == FieldDescriptor.LABEL_REPEATED then + for i, element in ipairs(value) do + prefix = string.format("%s[%d].", name, i) + sub_errors = element:FindInitializationErrors() + for _, e in ipairs(sub_errors) do + errors[#errors + 1] = prefix .. e + end + end + else + prefix = name .. "." + sub_errors = value:FindInitializationErrors() + for _, e in ipairs(sub_errors) do + errors[#errors + 1] = prefix .. e + end + end + end + end + return errors + end +end + +local function _AddMergeFromMethod(message_meta) + local LABEL_REPEATED = FieldDescriptor.LABEL_REPEATED + local CPPTYPE_MESSAGE = FieldDescriptor.CPPTYPE_MESSAGE + + message_meta._member.MergeFrom = function (self, msg) + assert(msg ~= self) + message_meta._member._Modified(self) + + local fields = self._fields + + for field, value in pairs(msg._fields) do + if field.label == LABEL_REPEATED or field.cpp_type == CPPTYPE_MESSAGE then + field_value = fields[field] + if field_value == nil then + field_value = field._default_constructor(self) + fields[field] = field_value + end + field_value:MergeFrom(value) + else + self._fields[field] = value + end + end + end +end + +local function _AddMessageMethods(message_descriptor, message_meta) + _AddListFieldsMethod(message_descriptor, message_meta) + _AddHasFieldMethod(message_descriptor, message_meta) + _AddClearFieldMethod(message_descriptor, message_meta) + if message_descriptor.is_extendable then + _AddClearExtensionMethod(message_meta) + _AddHasExtensionMethod(message_meta) + end + _AddClearMethod(message_descriptor, message_meta) +-- _AddEqualsMethod(message_descriptor, message_meta) + _AddStrMethod(message_meta) + _AddSetListenerMethod(message_meta) + _AddByteSizeMethod(message_descriptor, message_meta) + _AddSerializeToStringMethod(message_descriptor, message_meta) + _AddSerializePartialToStringMethod(message_descriptor, message_meta) + _AddMergeFromStringMethod(message_descriptor, message_meta) + _AddIsInitializedMethod(message_descriptor, message_meta) + _AddMergeFromMethod(message_meta) +end + +local function _AddPrivateHelperMethods(message_meta) + local Modified = function (self) + if not self._cached_byte_size_dirty then + self._cached_byte_size_dirty = true + self._listener_for_children.dirty = true + self._is_present_in_parent = true + self._listener:Modified() + end + end + message_meta._member._Modified = Modified + message_meta._member.SetInParent = Modified +end + +local function property_getter(message_meta) + local getter = message_meta._getter + local member = message_meta._member + + return function (self, property) + local g = getter[property] + if g then + return g(self) + else + return member[property] + end + end +end + +local function property_setter(message_meta) + local setter = message_meta._setter + + return function (self, property, value) + local s = setter[property] + if s then + s(self, value) + else + error(property .. " not found") + end + end +end + +function _AddClassAttributesForNestedExtensions(descriptor, message_meta) + local extension_dict = descriptor._extensions_by_name + for extension_name, extension_field in pairs(extension_dict) do + message_meta._member[extension_name] = extension_field + end +end + +local function Message(descriptor) + local message_meta = {} + message_meta._decoders_by_tag = {} + rawset(descriptor, "_extensions_by_name", {}) + for _, k in ipairs(descriptor.extensions) do + descriptor._extensions_by_name[k.name] = k + end + rawset(descriptor, "_extensions_by_number", {}) + for _, k in ipairs(descriptor.extensions) do + descriptor._extensions_by_number[k.number] = k + end + message_meta._descriptor = descriptor + message_meta._extensions_by_name = {} + message_meta._extensions_by_number = {} + + message_meta._getter = {} + message_meta._setter = {} + message_meta._member = {} +-- message_meta._name = descriptor.full_name + + local ns = setmetatable({}, message_meta._member) + message_meta._member.__call = _InitMethod(message_meta) + message_meta._member.__index = message_meta._member + message_meta._member.type = ns + + if rawget(descriptor, "_concrete_class") == nil then + rawset(descriptor, "_concrete_class", ns) + for k, field in ipairs(descriptor.fields) do + _AttachFieldHelpers(message_meta, field) + end + end + _AddEnumValues(descriptor, message_meta) + _AddClassAttributesForNestedExtensions(descriptor, message_meta) + _AddPropertiesForFields(descriptor, message_meta) + _AddPropertiesForExtensions(descriptor, message_meta) + _AddStaticMethods(message_meta) + _AddMessageMethods(descriptor, message_meta) + _AddPrivateHelperMethods(message_meta) + + message_meta.__index = property_getter(message_meta) + message_meta.__newindex = property_setter(message_meta) + + return ns +end + +_M.Message = Message + diff --git a/lua_probject/tolua_project/protobuf/text_format.lua b/lua_probject/tolua_project/protobuf/text_format.lua new file mode 100644 index 00000000..11b14239 --- /dev/null +++ b/lua_probject/tolua_project/protobuf/text_format.lua @@ -0,0 +1,79 @@ +-- +-------------------------------------------------------------------------------- +-- FILE: text_format.lua +-- DESCRIPTION: protoc-gen-lua +-- Google's Protocol Buffers project, ported to lua. +-- https://code.google.com/p/protoc-gen-lua/ +-- +-- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com +-- All rights reserved. +-- +-- Use, modification and distribution are subject to the "New BSD License" +-- as listed at . +-- COMPANY: NetEase +-- CREATED: 2010年08月05日 15时14分13秒 CST +-------------------------------------------------------------------------------- +-- +local string = string +local math = math +local print = print +local getmetatable = getmetatable +local table = table +local ipairs = ipairs +local tostring = tostring + +local descriptor = require "protobuf.descriptor" + +module "protobuf.text_format" + +function format(buffer) + local len = string.len( buffer ) + for i = 1, len, 16 do + local text = "" + for j = i, math.min( i + 16 - 1, len ) do + text = string.format( "%s %02x", text, string.byte( buffer, j ) ) + end + print( text ) + end +end + +local FieldDescriptor = descriptor.FieldDescriptor + +msg_format_indent = function(write, msg, indent) + for field, value in msg:ListFields() do + local print_field = function(field_value) + local name = field.name + write(string.rep(" ", indent)) + if field.type == FieldDescriptor.TYPE_MESSAGE then + local extensions = getmetatable(msg)._extensions_by_name + if extensions[field.full_name] then + write("[" .. name .. "] {\n") + else + write(name .. " {\n") + end + msg_format_indent(write, field_value, indent + 4) + write(string.rep(" ", indent)) + write("}\n") + else + write(string.format("%s: %s\n", name, tostring(field_value))) + end + end + if field.label == FieldDescriptor.LABEL_REPEATED then + for _, k in ipairs(value) do + print_field(k) + end + else + print_field(value) + end + end +end + +function msg_format(msg) + local out = {} + local write = function(value) + out[#out + 1] = value + end + msg_format_indent(write, msg, 0) + return table.concat(out) +end + diff --git a/lua_probject/tolua_project/protobuf/type_checkers.lua b/lua_probject/tolua_project/protobuf/type_checkers.lua new file mode 100644 index 00000000..afb5084a --- /dev/null +++ b/lua_probject/tolua_project/protobuf/type_checkers.lua @@ -0,0 +1,72 @@ +-- +-------------------------------------------------------------------------------- +-- FILE: type_checkers.lua +-- DESCRIPTION: protoc-gen-lua +-- Google's Protocol Buffers project, ported to lua. +-- https://code.google.com/p/protoc-gen-lua/ +-- +-- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com +-- All rights reserved. +-- +-- Use, modification and distribution are subject to the "New BSD License" +-- as listed at . +-- +-- COMPANY: NetEase +-- CREATED: 2010年07月29日 19时30分37秒 CST +-------------------------------------------------------------------------------- +-- + +local type = type +local error = error +local string = string + +module "protobuf.type_checkers" + +function TypeChecker(acceptable_types) + local acceptable_types = acceptable_types + + return function(proposed_value) + local t = type(proposed_value) + if acceptable_types[type(proposed_value)] == nil then + error(string.format('%s has type %s, but expected one of: %s', + proposed_value, type(proposed_value), acceptable_types)) + end + end +end + +function Int32ValueChecker() + local _MIN = -2147483648 + local _MAX = 2147483647 + return function(proposed_value) + if type(proposed_value) ~= 'number' then + error(string.format('%s has type %s, but expected one of: number', + proposed_value, type(proposed_value))) + end + if _MIN > proposed_value or proposed_value > _MAX then + error('Value out of range: ' .. proposed_value) + end + end +end + +function Uint32ValueChecker(IntValueChecker) + local _MIN = 0 + local _MAX = 0xffffffff + + return function(proposed_value) + if type(proposed_value) ~= 'number' then + error(string.format('%s has type %s, but expected one of: number', + proposed_value, type(proposed_value))) + end + if _MIN > proposed_value or proposed_value > _MAX then + error('Value out of range: ' .. proposed_value) + end + end +end + +function UnicodeValueChecker() + return function (proposed_value) + if type(proposed_value) ~= 'string' then + error(string.format('%s has type %s, but expected one of: string', proposed_value, type(proposed_value))) + end + end +end diff --git a/lua_probject/tolua_project/protobuf/wire_format.lua b/lua_probject/tolua_project/protobuf/wire_format.lua new file mode 100644 index 00000000..5e23b01a --- /dev/null +++ b/lua_probject/tolua_project/protobuf/wire_format.lua @@ -0,0 +1,137 @@ +-- +-------------------------------------------------------------------------------- +-- FILE: wire_format.lua +-- DESCRIPTION: protoc-gen-lua +-- Google's Protocol Buffers project, ported to lua. +-- https://code.google.com/p/protoc-gen-lua/ +-- +-- Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com +-- All rights reserved. +-- +-- Use, modification and distribution are subject to the "New BSD License" +-- as listed at . +-- COMPANY: NetEase +-- CREATED: 2010年07月30日 15时59分53秒 CST +-------------------------------------------------------------------------------- +-- + +local pb = require "pb" +module "protobuf.wire_format" + +WIRETYPE_VARINT = 0 +WIRETYPE_FIXED64 = 1 +WIRETYPE_LENGTH_DELIMITED = 2 +WIRETYPE_START_GROUP = 3 +WIRETYPE_END_GROUP = 4 +WIRETYPE_FIXED32 = 5 +_WIRETYPE_MAX = 5 + + +-- yeah, we don't need uint64 +local function _VarUInt64ByteSizeNoTag(uint64) + if uint64 <= 0x7f then return 1 end + if uint64 <= 0x3fff then return 2 end + if uint64 <= 0x1fffff then return 3 end + if uint64 <= 0xfffffff then return 4 end + return 5 +end + +function PackTag(field_number, wire_type) + return field_number * 8 + wire_type +end + +function UnpackTag(tag) + local wire_type = tag % 8 + return (tag - wire_type) / 8, wire_type +end + +ZigZagEncode32 = pb.zig_zag_encode32 +ZigZagDecode32 = pb.zig_zag_decode32 +ZigZagEncode64 = pb.zig_zag_encode64 +ZigZagDecode64 = pb.zig_zag_decode64 + +function Int32ByteSize(field_number, int32) + return Int64ByteSize(field_number, int32) +end + +function Int32ByteSizeNoTag(int32) + return _VarUInt64ByteSizeNoTag(int32) +end + +function Int64ByteSize(field_number, int64) + return UInt64ByteSize(field_number, int64) +end + +function UInt32ByteSize(field_number, uint32) + return UInt64ByteSize(field_number, uint32) +end + +function UInt64ByteSize(field_number, uint64) + return TagByteSize(field_number) + _VarUInt64ByteSizeNoTag(uint64) +end + +function SInt32ByteSize(field_number, int32) + return UInt32ByteSize(field_number, ZigZagEncode(int32)) +end + +function SInt64ByteSize(field_number, int64) + return UInt64ByteSize(field_number, ZigZagEncode(int64)) +end + +function Fixed32ByteSize(field_number, fixed32) + return TagByteSize(field_number) + 4 +end + +function Fixed64ByteSize(field_number, fixed64) + return TagByteSize(field_number) + 8 +end + +function SFixed32ByteSize(field_number, sfixed32) + return TagByteSize(field_number) + 4 +end + +function SFixed64ByteSize(field_number, sfixed64) + return TagByteSize(field_number) + 8 +end + +function FloatByteSize(field_number, flt) + return TagByteSize(field_number) + 4 +end + +function DoubleByteSize(field_number, double) + return TagByteSize(field_number) + 8 +end + +function BoolByteSize(field_number, b) + return TagByteSize(field_number) + 1 +end + +function EnumByteSize(field_number, enum) + return UInt32ByteSize(field_number, enum) +end + +function StringByteSize(field_number, string) + return BytesByteSize(field_number, string) +end + +function BytesByteSize(field_number, b) + return TagByteSize(field_number) + _VarUInt64ByteSizeNoTag(#b) + #b +end + +function MessageByteSize(field_number, message) + return TagByteSize(field_number) + _VarUInt64ByteSizeNoTag(message.ByteSize()) + message.ByteSize() +end + +function MessageSetItemByteSize(field_number, msg) + local total_size = 2 * TagByteSize(1) + TagByteSize(2) + TagByteSize(3) + total_size = total_size + _VarUInt64ByteSizeNoTag(field_number) + local message_size = msg.ByteSize() + total_size = total_size + _VarUInt64ByteSizeNoTag(message_size) + total_size = total_size + message_size + return total_size +end + +function TagByteSize(field_number) + return _VarUInt64ByteSizeNoTag(PackTag(field_number, 0)) +end + diff --git a/lua_probject/tolua_project/slot.lua b/lua_probject/tolua_project/slot.lua new file mode 100644 index 00000000..8498d890 --- /dev/null +++ b/lua_probject/tolua_project/slot.lua @@ -0,0 +1,26 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- +local setmetatable = setmetatable + +local _slot = {} +setmetatable(_slot, _slot) + +_slot.__call = function(self, ...) + if nil == self.obj then + return self.func(...) + else + return self.func(self.obj, ...) + end +end + +_slot.__eq = function (lhs, rhs) + return lhs.func == rhs.func and lhs.obj == rhs.obj +end + +--可用于 Timer 定时器回调函数. 例如Timer.New(slot(self.func, self)) +function slot(func, obj) + return setmetatable({func = func, obj = obj}, _slot) +end \ No newline at end of file diff --git a/lua_probject/tolua_project/socket.lua b/lua_probject/tolua_project/socket.lua new file mode 100644 index 00000000..d1c0b164 --- /dev/null +++ b/lua_probject/tolua_project/socket.lua @@ -0,0 +1,149 @@ +----------------------------------------------------------------------------- +-- LuaSocket helper module +-- Author: Diego Nehab +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- +-- Declare module and import dependencies +----------------------------------------------------------------------------- +local base = _G +local string = require("string") +local math = require("math") +local socket = require("socket.core") + +local _M = socket + +----------------------------------------------------------------------------- +-- Exported auxiliar functions +----------------------------------------------------------------------------- +function _M.connect4(address, port, laddress, lport) + return socket.connect(address, port, laddress, lport, "inet") +end + +function _M.connect6(address, port, laddress, lport) + return socket.connect(address, port, laddress, lport, "inet6") +end + +function _M.bind(host, port, backlog) + if host == "*" then host = "0.0.0.0" end + local addrinfo, err = socket.dns.getaddrinfo(host); + if not addrinfo then return nil, err end + local sock, res + err = "no info on address" + for i, alt in base.ipairs(addrinfo) do + if alt.family == "inet" then + sock, err = socket.tcp4() + else + sock, err = socket.tcp6() + end + if not sock then return nil, err end + sock:setoption("reuseaddr", true) + res, err = sock:bind(alt.addr, port) + if not res then + sock:close() + else + res, err = sock:listen(backlog) + if not res then + sock:close() + else + return sock + end + end + end + return nil, err +end + +_M.try = _M.newtry() + +function _M.choose(table) + return function(name, opt1, opt2) + if base.type(name) ~= "string" then + name, opt1, opt2 = "default", name, opt1 + end + local f = table[name or "nil"] + if not f then base.error("unknown key (".. base.tostring(name) ..")", 3) + else return f(opt1, opt2) end + end +end + +----------------------------------------------------------------------------- +-- Socket sources and sinks, conforming to LTN12 +----------------------------------------------------------------------------- +-- create namespaces inside LuaSocket namespace +local sourcet, sinkt = {}, {} +_M.sourcet = sourcet +_M.sinkt = sinkt + +_M.BLOCKSIZE = 2048 + +sinkt["close-when-done"] = function(sock) + return base.setmetatable({ + getfd = function() return sock:getfd() end, + dirty = function() return sock:dirty() end + }, { + __call = function(self, chunk, err) + if not chunk then + sock:close() + return 1 + else return sock:send(chunk) end + end + }) +end + +sinkt["keep-open"] = function(sock) + return base.setmetatable({ + getfd = function() return sock:getfd() end, + dirty = function() return sock:dirty() end + }, { + __call = function(self, chunk, err) + if chunk then return sock:send(chunk) + else return 1 end + end + }) +end + +sinkt["default"] = sinkt["keep-open"] + +_M.sink = _M.choose(sinkt) + +sourcet["by-length"] = function(sock, length) + return base.setmetatable({ + getfd = function() return sock:getfd() end, + dirty = function() return sock:dirty() end + }, { + __call = function() + if length <= 0 then return nil end + local size = math.min(socket.BLOCKSIZE, length) + local chunk, err = sock:receive(size) + if err then return nil, err end + length = length - string.len(chunk) + return chunk + end + }) +end + +sourcet["until-closed"] = function(sock) + local done + return base.setmetatable({ + getfd = function() return sock:getfd() end, + dirty = function() return sock:dirty() end + }, { + __call = function() + if done then return nil end + local chunk, err, partial = sock:receive(socket.BLOCKSIZE) + if not err then return chunk + elseif err == "closed" then + sock:close() + done = 1 + return partial + else return nil, err end + end + }) +end + + +sourcet["default"] = sourcet["until-closed"] + +_M.source = _M.choose(sourcet) + +return _M diff --git a/lua_probject/tolua_project/socket/ftp.lua b/lua_probject/tolua_project/socket/ftp.lua new file mode 100644 index 00000000..637e6bc6 --- /dev/null +++ b/lua_probject/tolua_project/socket/ftp.lua @@ -0,0 +1,329 @@ +----------------------------------------------------------------------------- +-- FTP support for the Lua language +-- LuaSocket toolkit. +-- Author: Diego Nehab +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- +-- Declare module and import dependencies +----------------------------------------------------------------------------- +local base = _G +local table = require("table") +local string = require("string") +local math = require("math") +local socket = require("socket") +local url = require("socket.url") +local tp = require("socket.tp") +local ltn12 = require("ltn12") +socket.ftp = {} +local _M = socket.ftp +----------------------------------------------------------------------------- +-- Program constants +----------------------------------------------------------------------------- +-- timeout in seconds before the program gives up on a connection +_M.TIMEOUT = 60 +-- default port for ftp service +local PORT = 21 +-- this is the default anonymous password. used when no password is +-- provided in url. should be changed to your e-mail. +_M.USER = "ftp" +_M.PASSWORD = "anonymous@anonymous.org" + +----------------------------------------------------------------------------- +-- Low level FTP API +----------------------------------------------------------------------------- +local metat = { __index = {} } + +function _M.open(server, port, create) + local tp = socket.try(tp.connect(server, port or PORT, _M.TIMEOUT, create)) + local f = base.setmetatable({ tp = tp }, metat) + -- make sure everything gets closed in an exception + f.try = socket.newtry(function() f:close() end) + return f +end + +function metat.__index:portconnect() + self.try(self.server:settimeout(_M.TIMEOUT)) + self.data = self.try(self.server:accept()) + self.try(self.data:settimeout(_M.TIMEOUT)) +end + +function metat.__index:pasvconnect() + self.data = self.try(socket.tcp()) + self.try(self.data:settimeout(_M.TIMEOUT)) + self.try(self.data:connect(self.pasvt.address, self.pasvt.port)) +end + +function metat.__index:login(user, password) + self.try(self.tp:command("user", user or _M.USER)) + local code, reply = self.try(self.tp:check{"2..", 331}) + if code == 331 then + self.try(self.tp:command("pass", password or _M.PASSWORD)) + self.try(self.tp:check("2..")) + end + return 1 +end + +function metat.__index:pasv() + self.try(self.tp:command("pasv")) + local code, reply = self.try(self.tp:check("2..")) + local pattern = "(%d+)%D(%d+)%D(%d+)%D(%d+)%D(%d+)%D(%d+)" + local a, b, c, d, p1, p2 = socket.skip(2, string.find(reply, pattern)) + self.try(a and b and c and d and p1 and p2, reply) + self.pasvt = { + address = string.format("%d.%d.%d.%d", a, b, c, d), + port = p1*256 + p2 + } + if self.server then + self.server:close() + self.server = nil + end + return self.pasvt.address, self.pasvt.port +end + +function metat.__index:epsv() + self.try(self.tp:command("epsv")) + local code, reply = self.try(self.tp:check("229")) + local pattern = "%((.)(.-)%1(.-)%1(.-)%1%)" + local d, prt, address, port = string.match(reply, pattern) + self.try(port, "invalid epsv response") + self.pasvt = { + address = self.tp:getpeername(), + port = port + } + if self.server then + self.server:close() + self.server = nil + end + return self.pasvt.address, self.pasvt.port +end + + +function metat.__index:port(address, port) + self.pasvt = nil + if not address then + address, port = self.try(self.tp:getsockname()) + self.server = self.try(socket.bind(address, 0)) + address, port = self.try(self.server:getsockname()) + self.try(self.server:settimeout(_M.TIMEOUT)) + end + local pl = port % 256 + local ph = (port - pl)/256 + local arg = string.gsub(string.format("%s,%d,%d", address, ph, pl), "%.", ",") + self.try(self.tp:command("port", arg)) + self.try(self.tp:check("2..")) + return 1 +end + +function metat.__index:eprt(family, address, port) + self.pasvt = nil + if not address then + address, port = self.try(self.tp:getsockname()) + self.server = self.try(socket.bind(address, 0)) + address, port = self.try(self.server:getsockname()) + self.try(self.server:settimeout(_M.TIMEOUT)) + end + local arg = string.format("|%s|%s|%d|", family, address, port) + self.try(self.tp:command("eprt", arg)) + self.try(self.tp:check("2..")) + return 1 +end + + +function metat.__index:send(sendt) + self.try(self.pasvt or self.server, "need port or pasv first") + -- if there is a pasvt table, we already sent a PASV command + -- we just get the data connection into self.data + if self.pasvt then self:pasvconnect() end + -- get the transfer argument and command + local argument = sendt.argument or + url.unescape(string.gsub(sendt.path or "", "^[/\\]", "")) + if argument == "" then argument = nil end + local command = sendt.command or "stor" + -- send the transfer command and check the reply + self.try(self.tp:command(command, argument)) + local code, reply = self.try(self.tp:check{"2..", "1.."}) + -- if there is not a pasvt table, then there is a server + -- and we already sent a PORT command + if not self.pasvt then self:portconnect() end + -- get the sink, source and step for the transfer + local step = sendt.step or ltn12.pump.step + local readt = { self.tp } + local checkstep = function(src, snk) + -- check status in control connection while downloading + local readyt = socket.select(readt, nil, 0) + if readyt[tp] then code = self.try(self.tp:check("2..")) end + return step(src, snk) + end + local sink = socket.sink("close-when-done", self.data) + -- transfer all data and check error + self.try(ltn12.pump.all(sendt.source, sink, checkstep)) + if string.find(code, "1..") then self.try(self.tp:check("2..")) end + -- done with data connection + self.data:close() + -- find out how many bytes were sent + local sent = socket.skip(1, self.data:getstats()) + self.data = nil + return sent +end + +function metat.__index:receive(recvt) + self.try(self.pasvt or self.server, "need port or pasv first") + if self.pasvt then self:pasvconnect() end + local argument = recvt.argument or + url.unescape(string.gsub(recvt.path or "", "^[/\\]", "")) + if argument == "" then argument = nil end + local command = recvt.command or "retr" + self.try(self.tp:command(command, argument)) + local code,reply = self.try(self.tp:check{"1..", "2.."}) + if (code >= 200) and (code <= 299) then + recvt.sink(reply) + return 1 + end + if not self.pasvt then self:portconnect() end + local source = socket.source("until-closed", self.data) + local step = recvt.step or ltn12.pump.step + self.try(ltn12.pump.all(source, recvt.sink, step)) + if string.find(code, "1..") then self.try(self.tp:check("2..")) end + self.data:close() + self.data = nil + return 1 +end + +function metat.__index:cwd(dir) + self.try(self.tp:command("cwd", dir)) + self.try(self.tp:check(250)) + return 1 +end + +function metat.__index:type(type) + self.try(self.tp:command("type", type)) + self.try(self.tp:check(200)) + return 1 +end + +function metat.__index:greet() + local code = self.try(self.tp:check{"1..", "2.."}) + if string.find(code, "1..") then self.try(self.tp:check("2..")) end + return 1 +end + +function metat.__index:quit() + self.try(self.tp:command("quit")) + self.try(self.tp:check("2..")) + return 1 +end + +function metat.__index:close() + if self.data then self.data:close() end + if self.server then self.server:close() end + return self.tp:close() +end + +----------------------------------------------------------------------------- +-- High level FTP API +----------------------------------------------------------------------------- +local function override(t) + if t.url then + local u = url.parse(t.url) + for i,v in base.pairs(t) do + u[i] = v + end + return u + else return t end +end + +local function tput(putt) + putt = override(putt) + socket.try(putt.host, "missing hostname") + local f = _M.open(putt.host, putt.port, putt.create) + f:greet() + f:login(putt.user, putt.password) + if putt.type then f:type(putt.type) end + f:epsv() + local sent = f:send(putt) + f:quit() + f:close() + return sent +end + +local default = { + path = "/", + scheme = "ftp" +} + +local function genericform(u) + local t = socket.try(url.parse(u, default)) + socket.try(t.scheme == "ftp", "wrong scheme '" .. t.scheme .. "'") + socket.try(t.host, "missing hostname") + local pat = "^type=(.)$" + if t.params then + t.type = socket.skip(2, string.find(t.params, pat)) + socket.try(t.type == "a" or t.type == "i", + "invalid type '" .. t.type .. "'") + end + return t +end + +_M.genericform = genericform + +local function sput(u, body) + local putt = genericform(u) + putt.source = ltn12.source.string(body) + return tput(putt) +end + +_M.put = socket.protect(function(putt, body) + if base.type(putt) == "string" then return sput(putt, body) + else return tput(putt) end +end) + +local function tget(gett) + gett = override(gett) + socket.try(gett.host, "missing hostname") + local f = _M.open(gett.host, gett.port, gett.create) + f:greet() + f:login(gett.user, gett.password) + if gett.type then f:type(gett.type) end + f:epsv() + f:receive(gett) + f:quit() + return f:close() +end + +local function sget(u) + local gett = genericform(u) + local t = {} + gett.sink = ltn12.sink.table(t) + tget(gett) + return table.concat(t) +end + +_M.command = socket.protect(function(cmdt) + cmdt = override(cmdt) + socket.try(cmdt.host, "missing hostname") + socket.try(cmdt.command, "missing command") + local f = _M.open(cmdt.host, cmdt.port, cmdt.create) + f:greet() + f:login(cmdt.user, cmdt.password) + if type(cmdt.command) == "table" then + local argument = cmdt.argument or {} + local check = cmdt.check or {} + for i,cmd in ipairs(cmdt.command) do + f.try(f.tp:command(cmd, argument[i])) + if check[i] then f.try(f.tp:check(check[i])) end + end + else + f.try(f.tp:command(cmdt.command, cmdt.argument)) + if cmdt.check then f.try(f.tp:check(cmdt.check)) end + end + f:quit() + return f:close() +end) + +_M.get = socket.protect(function(gett) + if base.type(gett) == "string" then return sget(gett) + else return tget(gett) end +end) + +return _M diff --git a/lua_probject/tolua_project/socket/headers.lua b/lua_probject/tolua_project/socket/headers.lua new file mode 100644 index 00000000..1eb8223b --- /dev/null +++ b/lua_probject/tolua_project/socket/headers.lua @@ -0,0 +1,104 @@ +----------------------------------------------------------------------------- +-- Canonic header field capitalization +-- LuaSocket toolkit. +-- Author: Diego Nehab +----------------------------------------------------------------------------- +local socket = require("socket") +socket.headers = {} +local _M = socket.headers + +_M.canonic = { + ["accept"] = "Accept", + ["accept-charset"] = "Accept-Charset", + ["accept-encoding"] = "Accept-Encoding", + ["accept-language"] = "Accept-Language", + ["accept-ranges"] = "Accept-Ranges", + ["action"] = "Action", + ["alternate-recipient"] = "Alternate-Recipient", + ["age"] = "Age", + ["allow"] = "Allow", + ["arrival-date"] = "Arrival-Date", + ["authorization"] = "Authorization", + ["bcc"] = "Bcc", + ["cache-control"] = "Cache-Control", + ["cc"] = "Cc", + ["comments"] = "Comments", + ["connection"] = "Connection", + ["content-description"] = "Content-Description", + ["content-disposition"] = "Content-Disposition", + ["content-encoding"] = "Content-Encoding", + ["content-id"] = "Content-ID", + ["content-language"] = "Content-Language", + ["content-length"] = "Content-Length", + ["content-location"] = "Content-Location", + ["content-md5"] = "Content-MD5", + ["content-range"] = "Content-Range", + ["content-transfer-encoding"] = "Content-Transfer-Encoding", + ["content-type"] = "Content-Type", + ["cookie"] = "Cookie", + ["date"] = "Date", + ["diagnostic-code"] = "Diagnostic-Code", + ["dsn-gateway"] = "DSN-Gateway", + ["etag"] = "ETag", + ["expect"] = "Expect", + ["expires"] = "Expires", + ["final-log-id"] = "Final-Log-ID", + ["final-recipient"] = "Final-Recipient", + ["from"] = "From", + ["host"] = "Host", + ["if-match"] = "If-Match", + ["if-modified-since"] = "If-Modified-Since", + ["if-none-match"] = "If-None-Match", + ["if-range"] = "If-Range", + ["if-unmodified-since"] = "If-Unmodified-Since", + ["in-reply-to"] = "In-Reply-To", + ["keywords"] = "Keywords", + ["last-attempt-date"] = "Last-Attempt-Date", + ["last-modified"] = "Last-Modified", + ["location"] = "Location", + ["max-forwards"] = "Max-Forwards", + ["message-id"] = "Message-ID", + ["mime-version"] = "MIME-Version", + ["original-envelope-id"] = "Original-Envelope-ID", + ["original-recipient"] = "Original-Recipient", + ["pragma"] = "Pragma", + ["proxy-authenticate"] = "Proxy-Authenticate", + ["proxy-authorization"] = "Proxy-Authorization", + ["range"] = "Range", + ["received"] = "Received", + ["received-from-mta"] = "Received-From-MTA", + ["references"] = "References", + ["referer"] = "Referer", + ["remote-mta"] = "Remote-MTA", + ["reply-to"] = "Reply-To", + ["reporting-mta"] = "Reporting-MTA", + ["resent-bcc"] = "Resent-Bcc", + ["resent-cc"] = "Resent-Cc", + ["resent-date"] = "Resent-Date", + ["resent-from"] = "Resent-From", + ["resent-message-id"] = "Resent-Message-ID", + ["resent-reply-to"] = "Resent-Reply-To", + ["resent-sender"] = "Resent-Sender", + ["resent-to"] = "Resent-To", + ["retry-after"] = "Retry-After", + ["return-path"] = "Return-Path", + ["sender"] = "Sender", + ["server"] = "Server", + ["smtp-remote-recipient"] = "SMTP-Remote-Recipient", + ["status"] = "Status", + ["subject"] = "Subject", + ["te"] = "TE", + ["to"] = "To", + ["trailer"] = "Trailer", + ["transfer-encoding"] = "Transfer-Encoding", + ["upgrade"] = "Upgrade", + ["user-agent"] = "User-Agent", + ["vary"] = "Vary", + ["via"] = "Via", + ["warning"] = "Warning", + ["will-retry-until"] = "Will-Retry-Until", + ["www-authenticate"] = "WWW-Authenticate", + ["x-mailer"] = "X-Mailer", +} + +return _M \ No newline at end of file diff --git a/lua_probject/tolua_project/socket/http.lua b/lua_probject/tolua_project/socket/http.lua new file mode 100644 index 00000000..f2fff01c --- /dev/null +++ b/lua_probject/tolua_project/socket/http.lua @@ -0,0 +1,381 @@ +----------------------------------------------------------------------------- +-- HTTP/1.1 client support for the Lua language. +-- LuaSocket toolkit. +-- Author: Diego Nehab +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- +-- Declare module and import dependencies +------------------------------------------------------------------------------- +local socket = require("socket") +local url = require("socket.url") +local ltn12 = require("ltn12") +local mime = require("mime") +local string = require("string") +local headers = require("socket.headers") +local base = _G +local table = require("table") +socket.http = {} +local _M = socket.http + +----------------------------------------------------------------------------- +-- Program constants +----------------------------------------------------------------------------- +-- connection timeout in seconds +_M.TIMEOUT = 60 +-- user agent field sent in request +_M.USERAGENT = socket._VERSION + +-- supported schemes +local SCHEMES = { ["http"] = true } +-- default port for document retrieval +local PORT = 80 + +----------------------------------------------------------------------------- +-- Reads MIME headers from a connection, unfolding where needed +----------------------------------------------------------------------------- +local function receiveheaders(sock, headers) + local line, name, value, err + headers = headers or {} + -- get first line + line, err = sock:receive() + if err then return nil, err end + -- headers go until a blank line is found + while line ~= "" do + -- get field-name and value + name, value = socket.skip(2, string.find(line, "^(.-):%s*(.*)")) + if not (name and value) then return nil, "malformed reponse headers" end + name = string.lower(name) + -- get next line (value might be folded) + line, err = sock:receive() + if err then return nil, err end + -- unfold any folded values + while string.find(line, "^%s") do + value = value .. line + line = sock:receive() + if err then return nil, err end + end + -- save pair in table + if headers[name] then headers[name] = headers[name] .. ", " .. value + else headers[name] = value end + end + return headers +end + +----------------------------------------------------------------------------- +-- Extra sources and sinks +----------------------------------------------------------------------------- +socket.sourcet["http-chunked"] = function(sock, headers) + return base.setmetatable({ + getfd = function() return sock:getfd() end, + dirty = function() return sock:dirty() end + }, { + __call = function() + -- get chunk size, skip extention + local line, err = sock:receive() + if err then return nil, err end + local size = base.tonumber(string.gsub(line, ";.*", ""), 16) + if not size then return nil, "invalid chunk size" end + -- was it the last chunk? + if size > 0 then + -- if not, get chunk and skip terminating CRLF + local chunk, err, part = sock:receive(size) + if chunk then sock:receive() end + return chunk, err + else + -- if it was, read trailers into headers table + headers, err = receiveheaders(sock, headers) + if not headers then return nil, err end + end + end + }) +end + +socket.sinkt["http-chunked"] = function(sock) + return base.setmetatable({ + getfd = function() return sock:getfd() end, + dirty = function() return sock:dirty() end + }, { + __call = function(self, chunk, err) + if not chunk then return sock:send("0\r\n\r\n") end + local size = string.format("%X\r\n", string.len(chunk)) + return sock:send(size .. chunk .. "\r\n") + end + }) +end + +----------------------------------------------------------------------------- +-- Low level HTTP API +----------------------------------------------------------------------------- +local metat = { __index = {} } + +function _M.open(host, port, create) + -- create socket with user connect function, or with default + local c = socket.try((create or socket.tcp)()) + local h = base.setmetatable({ c = c }, metat) + -- create finalized try + h.try = socket.newtry(function() h:close() end) + -- set timeout before connecting + h.try(c:settimeout(_M.TIMEOUT)) + h.try(c:connect(host, port or PORT)) + -- here everything worked + return h +end + +function metat.__index:sendrequestline(method, uri) + local reqline = string.format("%s %s HTTP/1.1\r\n", method or "GET", uri) + return self.try(self.c:send(reqline)) +end + +function metat.__index:sendheaders(tosend) + local canonic = headers.canonic + local h = "\r\n" + for f, v in base.pairs(tosend) do + h = (canonic[f] or f) .. ": " .. v .. "\r\n" .. h + end + self.try(self.c:send(h)) + return 1 +end + +function metat.__index:sendbody(headers, source, step) + source = source or ltn12.source.empty() + step = step or ltn12.pump.step + -- if we don't know the size in advance, send chunked and hope for the best + local mode = "http-chunked" + if headers["content-length"] then mode = "keep-open" end + return self.try(ltn12.pump.all(source, socket.sink(mode, self.c), step)) +end + +function metat.__index:receivestatusline() + local status = self.try(self.c:receive(5)) + -- identify HTTP/0.9 responses, which do not contain a status line + -- this is just a heuristic, but is what the RFC recommends + if status ~= "HTTP/" then return nil, status end + -- otherwise proceed reading a status line + status = self.try(self.c:receive("*l", status)) + local code = socket.skip(2, string.find(status, "HTTP/%d*%.%d* (%d%d%d)")) + return self.try(base.tonumber(code), status) +end + +function metat.__index:receiveheaders() + return self.try(receiveheaders(self.c)) +end + +function metat.__index:receivebody(headers, sink, step) + sink = sink or ltn12.sink.null() + step = step or ltn12.pump.step + local length = base.tonumber(headers["content-length"]) + local t = headers["transfer-encoding"] -- shortcut + local mode = "default" -- connection close + if t and t ~= "identity" then mode = "http-chunked" + elseif base.tonumber(headers["content-length"]) then mode = "by-length" end + return self.try(ltn12.pump.all(socket.source(mode, self.c, length), + sink, step)) +end + +function metat.__index:receive09body(status, sink, step) + local source = ltn12.source.rewind(socket.source("until-closed", self.c)) + source(status) + return self.try(ltn12.pump.all(source, sink, step)) +end + +function metat.__index:close() + return self.c:close() +end + +----------------------------------------------------------------------------- +-- High level HTTP API +----------------------------------------------------------------------------- +local function adjusturi(reqt) + local u = reqt + -- if there is a proxy, we need the full url. otherwise, just a part. + if not reqt.proxy and not _M.PROXY then + u = { + path = socket.try(reqt.path, "invalid path 'nil'"), + params = reqt.params, + query = reqt.query, + fragment = reqt.fragment + } + end + return url.build(u) +end + +local function adjustproxy(reqt) + local proxy = reqt.proxy or _M.PROXY + if proxy then + proxy = url.parse(proxy) + return proxy.host, proxy.port or 3128 + else + return reqt.host, reqt.port + end +end + +local function adjustheaders(reqt) + -- default headers + local host = string.gsub(reqt.authority, "^.-@", "") + local lower = { + ["user-agent"] = _M.USERAGENT, + ["host"] = host, + ["connection"] = "close, TE", + ["te"] = "trailers" + } + -- if we have authentication information, pass it along + if reqt.user and reqt.password then + lower["authorization"] = + "Basic " .. (mime.b64(reqt.user .. ":" .. reqt.password)) + end + -- if we have proxy authentication information, pass it along + local proxy = reqt.proxy or _M.PROXY + if proxy then + proxy = url.parse(proxy) + if proxy.user and proxy.password then + lower["proxy-authorization"] = + "Basic " .. (mime.b64(proxy.user .. ":" .. proxy.password)) + end + end + -- override with user headers + for i,v in base.pairs(reqt.headers or lower) do + lower[string.lower(i)] = v + end + return lower +end + +-- default url parts +local default = { + host = "", + port = PORT, + path ="/", + scheme = "http" +} + +local function adjustrequest(reqt) + -- parse url if provided + local nreqt = reqt.url and url.parse(reqt.url, default) or {} + -- explicit components override url + for i,v in base.pairs(reqt) do nreqt[i] = v end + if nreqt.port == "" then nreqt.port = PORT end + if not (nreqt.host and nreqt.host ~= "") then + socket.try(nil, "invalid host '" .. base.tostring(nreqt.host) .. "'") + end + -- compute uri if user hasn't overriden + nreqt.uri = reqt.uri or adjusturi(nreqt) + -- adjust headers in request + nreqt.headers = adjustheaders(nreqt) + -- ajust host and port if there is a proxy + nreqt.host, nreqt.port = adjustproxy(nreqt) + return nreqt +end + +local function shouldredirect(reqt, code, headers) + local location = headers.location + if not location then return false end + location = string.gsub(location, "%s", "") + if location == "" then return false end + local scheme = string.match(location, "^([%w][%w%+%-%.]*)%:") + if scheme and not SCHEMES[scheme] then return false end + return (reqt.redirect ~= false) and + (code == 301 or code == 302 or code == 303 or code == 307) and + (not reqt.method or reqt.method == "GET" or reqt.method == "HEAD") + and (not reqt.nredirects or reqt.nredirects < 5) +end + +local function shouldreceivebody(reqt, code) + if reqt.method == "HEAD" then return nil end + if code == 204 or code == 304 then return nil end + if code >= 100 and code < 200 then return nil end + return 1 +end + +-- forward declarations +local trequest, tredirect + +--[[local]] function tredirect(reqt, location) + local result, code, headers, status = trequest { + -- the RFC says the redirect URL has to be absolute, but some + -- servers do not respect that + url = url.absolute(reqt.url, location), + source = reqt.source, + sink = reqt.sink, + headers = reqt.headers, + proxy = reqt.proxy, + nredirects = (reqt.nredirects or 0) + 1, + create = reqt.create + } + -- pass location header back as a hint we redirected + headers = headers or {} + headers.location = headers.location or location + return result, code, headers, status +end + +--[[local]] function trequest(reqt) + -- we loop until we get what we want, or + -- until we are sure there is no way to get it + local nreqt = adjustrequest(reqt) + local h = _M.open(nreqt.host, nreqt.port, nreqt.create) + -- send request line and headers + h:sendrequestline(nreqt.method, nreqt.uri) + h:sendheaders(nreqt.headers) + -- if there is a body, send it + if nreqt.source then + h:sendbody(nreqt.headers, nreqt.source, nreqt.step) + end + local code, status = h:receivestatusline() + -- if it is an HTTP/0.9 server, simply get the body and we are done + if not code then + h:receive09body(status, nreqt.sink, nreqt.step) + return 1, 200 + end + local headers + -- ignore any 100-continue messages + while code == 100 do + headers = h:receiveheaders() + code, status = h:receivestatusline() + end + headers = h:receiveheaders() + -- at this point we should have a honest reply from the server + -- we can't redirect if we already used the source, so we report the error + if shouldredirect(nreqt, code, headers) and not nreqt.source then + h:close() + return tredirect(reqt, headers.location) + end + -- here we are finally done + if shouldreceivebody(nreqt, code) then + h:receivebody(headers, nreqt.sink, nreqt.step) + end + h:close() + return 1, code, headers, status +end + +-- turns an url and a body into a generic request +local function genericform(u, b) + local t = {} + local reqt = { + url = u, + sink = ltn12.sink.table(t), + target = t + } + if b then + reqt.source = ltn12.source.string(b) + reqt.headers = { + ["content-length"] = string.len(b), + ["content-type"] = "application/x-www-form-urlencoded" + } + reqt.method = "POST" + end + return reqt +end + +_M.genericform = genericform + +local function srequest(u, b) + local reqt = genericform(u, b) + local _, code, headers, status = trequest(reqt) + return table.concat(reqt.target), code, headers, status +end + +_M.request = socket.protect(function(reqt, body) + if base.type(reqt) == "string" then return srequest(reqt, body) + else return trequest(reqt) end +end) + +return _M diff --git a/lua_probject/tolua_project/socket/mbox.lua b/lua_probject/tolua_project/socket/mbox.lua new file mode 100644 index 00000000..ed9e7814 --- /dev/null +++ b/lua_probject/tolua_project/socket/mbox.lua @@ -0,0 +1,92 @@ +local _M = {} + +if module then + mbox = _M +end + +function _M.split_message(message_s) + local message = {} + message_s = string.gsub(message_s, "\r\n", "\n") + string.gsub(message_s, "^(.-\n)\n", function (h) message.headers = h end) + string.gsub(message_s, "^.-\n\n(.*)", function (b) message.body = b end) + if not message.body then + string.gsub(message_s, "^\n(.*)", function (b) message.body = b end) + end + if not message.headers and not message.body then + message.headers = message_s + end + return message.headers or "", message.body or "" +end + +function _M.split_headers(headers_s) + local headers = {} + headers_s = string.gsub(headers_s, "\r\n", "\n") + headers_s = string.gsub(headers_s, "\n[ ]+", " ") + string.gsub("\n" .. headers_s, "\n([^\n]+)", function (h) table.insert(headers, h) end) + return headers +end + +function _M.parse_header(header_s) + header_s = string.gsub(header_s, "\n[ ]+", " ") + header_s = string.gsub(header_s, "\n+", "") + local _, __, name, value = string.find(header_s, "([^%s:]-):%s*(.*)") + return name, value +end + +function _M.parse_headers(headers_s) + local headers_t = _M.split_headers(headers_s) + local headers = {} + for i = 1, #headers_t do + local name, value = _M.parse_header(headers_t[i]) + if name then + name = string.lower(name) + if headers[name] then + headers[name] = headers[name] .. ", " .. value + else headers[name] = value end + end + end + return headers +end + +function _M.parse_from(from) + local _, __, name, address = string.find(from, "^%s*(.-)%s*%<(.-)%>") + if not address then + _, __, address = string.find(from, "%s*(.+)%s*") + end + name = name or "" + address = address or "" + if name == "" then name = address end + name = string.gsub(name, '"', "") + return name, address +end + +function _M.split_mbox(mbox_s) + local mbox = {} + mbox_s = string.gsub(mbox_s, "\r\n", "\n") .."\n\nFrom \n" + local nj, i, j = 1, 1, 1 + while 1 do + i, nj = string.find(mbox_s, "\n\nFrom .-\n", j) + if not i then break end + local message = string.sub(mbox_s, j, i-1) + table.insert(mbox, message) + j = nj+1 + end + return mbox +end + +function _M.parse(mbox_s) + local mbox = _M.split_mbox(mbox_s) + for i = 1, #mbox do + mbox[i] = _M.parse_message(mbox[i]) + end + return mbox +end + +function _M.parse_message(message_s) + local message = {} + message.headers, message.body = _M.split_message(message_s) + message.headers = _M.parse_headers(message.headers) + return message +end + +return _M diff --git a/lua_probject/tolua_project/socket/smtp.lua b/lua_probject/tolua_project/socket/smtp.lua new file mode 100644 index 00000000..b113d006 --- /dev/null +++ b/lua_probject/tolua_project/socket/smtp.lua @@ -0,0 +1,256 @@ +----------------------------------------------------------------------------- +-- SMTP client support for the Lua language. +-- LuaSocket toolkit. +-- Author: Diego Nehab +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- +-- Declare module and import dependencies +----------------------------------------------------------------------------- +local base = _G +local coroutine = require("coroutine") +local string = require("string") +local math = require("math") +local os = require("os") +local socket = require("socket") +local tp = require("socket.tp") +local ltn12 = require("ltn12") +local headers = require("socket.headers") +local mime = require("mime") + +socket.smtp = {} +local _M = socket.smtp + +----------------------------------------------------------------------------- +-- Program constants +----------------------------------------------------------------------------- +-- timeout for connection +_M.TIMEOUT = 60 +-- default server used to send e-mails +_M.SERVER = "localhost" +-- default port +_M.PORT = 25 +-- domain used in HELO command and default sendmail +-- If we are under a CGI, try to get from environment +_M.DOMAIN = os.getenv("SERVER_NAME") or "localhost" +-- default time zone (means we don't know) +_M.ZONE = "-0000" + +--------------------------------------------------------------------------- +-- Low level SMTP API +----------------------------------------------------------------------------- +local metat = { __index = {} } + +function metat.__index:greet(domain) + self.try(self.tp:check("2..")) + self.try(self.tp:command("EHLO", domain or _M.DOMAIN)) + return socket.skip(1, self.try(self.tp:check("2.."))) +end + +function metat.__index:mail(from) + self.try(self.tp:command("MAIL", "FROM:" .. from)) + return self.try(self.tp:check("2..")) +end + +function metat.__index:rcpt(to) + self.try(self.tp:command("RCPT", "TO:" .. to)) + return self.try(self.tp:check("2..")) +end + +function metat.__index:data(src, step) + self.try(self.tp:command("DATA")) + self.try(self.tp:check("3..")) + self.try(self.tp:source(src, step)) + self.try(self.tp:send("\r\n.\r\n")) + return self.try(self.tp:check("2..")) +end + +function metat.__index:quit() + self.try(self.tp:command("QUIT")) + return self.try(self.tp:check("2..")) +end + +function metat.__index:close() + return self.tp:close() +end + +function metat.__index:login(user, password) + self.try(self.tp:command("AUTH", "LOGIN")) + self.try(self.tp:check("3..")) + self.try(self.tp:send(mime.b64(user) .. "\r\n")) + self.try(self.tp:check("3..")) + self.try(self.tp:send(mime.b64(password) .. "\r\n")) + return self.try(self.tp:check("2..")) +end + +function metat.__index:plain(user, password) + local auth = "PLAIN " .. mime.b64("\0" .. user .. "\0" .. password) + self.try(self.tp:command("AUTH", auth)) + return self.try(self.tp:check("2..")) +end + +function metat.__index:auth(user, password, ext) + if not user or not password then return 1 end + if string.find(ext, "AUTH[^\n]+LOGIN") then + return self:login(user, password) + elseif string.find(ext, "AUTH[^\n]+PLAIN") then + return self:plain(user, password) + else + self.try(nil, "authentication not supported") + end +end + +-- send message or throw an exception +function metat.__index:send(mailt) + self:mail(mailt.from) + if base.type(mailt.rcpt) == "table" then + for i,v in base.ipairs(mailt.rcpt) do + self:rcpt(v) + end + else + self:rcpt(mailt.rcpt) + end + self:data(ltn12.source.chain(mailt.source, mime.stuff()), mailt.step) +end + +function _M.open(server, port, create) + local tp = socket.try(tp.connect(server or _M.SERVER, port or _M.PORT, + _M.TIMEOUT, create)) + local s = base.setmetatable({tp = tp}, metat) + -- make sure tp is closed if we get an exception + s.try = socket.newtry(function() + s:close() + end) + return s +end + +-- convert headers to lowercase +local function lower_headers(headers) + local lower = {} + for i,v in base.pairs(headers or lower) do + lower[string.lower(i)] = v + end + return lower +end + +--------------------------------------------------------------------------- +-- Multipart message source +----------------------------------------------------------------------------- +-- returns a hopefully unique mime boundary +local seqno = 0 +local function newboundary() + seqno = seqno + 1 + return string.format('%s%05d==%05u', os.date('%d%m%Y%H%M%S'), + math.random(0, 99999), seqno) +end + +-- send_message forward declaration +local send_message + +-- yield the headers all at once, it's faster +local function send_headers(tosend) + local canonic = headers.canonic + local h = "\r\n" + for f,v in base.pairs(tosend) do + h = (canonic[f] or f) .. ': ' .. v .. "\r\n" .. h + end + coroutine.yield(h) +end + +-- yield multipart message body from a multipart message table +local function send_multipart(mesgt) + -- make sure we have our boundary and send headers + local bd = newboundary() + local headers = lower_headers(mesgt.headers or {}) + headers['content-type'] = headers['content-type'] or 'multipart/mixed' + headers['content-type'] = headers['content-type'] .. + '; boundary="' .. bd .. '"' + send_headers(headers) + -- send preamble + if mesgt.body.preamble then + coroutine.yield(mesgt.body.preamble) + coroutine.yield("\r\n") + end + -- send each part separated by a boundary + for i, m in base.ipairs(mesgt.body) do + coroutine.yield("\r\n--" .. bd .. "\r\n") + send_message(m) + end + -- send last boundary + coroutine.yield("\r\n--" .. bd .. "--\r\n\r\n") + -- send epilogue + if mesgt.body.epilogue then + coroutine.yield(mesgt.body.epilogue) + coroutine.yield("\r\n") + end +end + +-- yield message body from a source +local function send_source(mesgt) + -- make sure we have a content-type + local headers = lower_headers(mesgt.headers or {}) + headers['content-type'] = headers['content-type'] or + 'text/plain; charset="iso-8859-1"' + send_headers(headers) + -- send body from source + while true do + local chunk, err = mesgt.body() + if err then coroutine.yield(nil, err) + elseif chunk then coroutine.yield(chunk) + else break end + end +end + +-- yield message body from a string +local function send_string(mesgt) + -- make sure we have a content-type + local headers = lower_headers(mesgt.headers or {}) + headers['content-type'] = headers['content-type'] or + 'text/plain; charset="iso-8859-1"' + send_headers(headers) + -- send body from string + coroutine.yield(mesgt.body) +end + +-- message source +function send_message(mesgt) + if base.type(mesgt.body) == "table" then send_multipart(mesgt) + elseif base.type(mesgt.body) == "function" then send_source(mesgt) + else send_string(mesgt) end +end + +-- set defaul headers +local function adjust_headers(mesgt) + local lower = lower_headers(mesgt.headers) + lower["date"] = lower["date"] or + os.date("!%a, %d %b %Y %H:%M:%S ") .. (mesgt.zone or _M.ZONE) + lower["x-mailer"] = lower["x-mailer"] or socket._VERSION + -- this can't be overriden + lower["mime-version"] = "1.0" + return lower +end + +function _M.message(mesgt) + mesgt.headers = adjust_headers(mesgt) + -- create and return message source + local co = coroutine.create(function() send_message(mesgt) end) + return function() + local ret, a, b = coroutine.resume(co) + if ret then return a, b + else return nil, a end + end +end + +--------------------------------------------------------------------------- +-- High level SMTP API +----------------------------------------------------------------------------- +_M.send = socket.protect(function(mailt) + local s = _M.open(mailt.server, mailt.port, mailt.create) + local ext = s:greet(mailt.domain) + s:auth(mailt.user, mailt.password, ext) + s:send(mailt) + s:quit() + return s:close() +end) + +return _M \ No newline at end of file diff --git a/lua_probject/tolua_project/socket/tp.lua b/lua_probject/tolua_project/socket/tp.lua new file mode 100644 index 00000000..b8ebc56d --- /dev/null +++ b/lua_probject/tolua_project/socket/tp.lua @@ -0,0 +1,134 @@ +----------------------------------------------------------------------------- +-- Unified SMTP/FTP subsystem +-- LuaSocket toolkit. +-- Author: Diego Nehab +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- +-- Declare module and import dependencies +----------------------------------------------------------------------------- +local base = _G +local string = require("string") +local socket = require("socket") +local ltn12 = require("ltn12") + +socket.tp = {} +local _M = socket.tp + +----------------------------------------------------------------------------- +-- Program constants +----------------------------------------------------------------------------- +_M.TIMEOUT = 60 + +----------------------------------------------------------------------------- +-- Implementation +----------------------------------------------------------------------------- +-- gets server reply (works for SMTP and FTP) +local function get_reply(c) + local code, current, sep + local line, err = c:receive() + local reply = line + if err then return nil, err end + code, sep = socket.skip(2, string.find(line, "^(%d%d%d)(.?)")) + if not code then return nil, "invalid server reply" end + if sep == "-" then -- reply is multiline + repeat + line, err = c:receive() + if err then return nil, err end + current, sep = socket.skip(2, string.find(line, "^(%d%d%d)(.?)")) + reply = reply .. "\n" .. line + -- reply ends with same code + until code == current and sep == " " + end + return code, reply +end + +-- metatable for sock object +local metat = { __index = {} } + +function metat.__index:getpeername() + return self.c:getpeername() +end + +function metat.__index:getsockname() + return self.c:getpeername() +end + +function metat.__index:check(ok) + local code, reply = get_reply(self.c) + if not code then return nil, reply end + if base.type(ok) ~= "function" then + if base.type(ok) == "table" then + for i, v in base.ipairs(ok) do + if string.find(code, v) then + return base.tonumber(code), reply + end + end + return nil, reply + else + if string.find(code, ok) then return base.tonumber(code), reply + else return nil, reply end + end + else return ok(base.tonumber(code), reply) end +end + +function metat.__index:command(cmd, arg) + cmd = string.upper(cmd) + if arg then + return self.c:send(cmd .. " " .. arg.. "\r\n") + else + return self.c:send(cmd .. "\r\n") + end +end + +function metat.__index:sink(snk, pat) + local chunk, err = self.c:receive(pat) + return snk(chunk, err) +end + +function metat.__index:send(data) + return self.c:send(data) +end + +function metat.__index:receive(pat) + return self.c:receive(pat) +end + +function metat.__index:getfd() + return self.c:getfd() +end + +function metat.__index:dirty() + return self.c:dirty() +end + +function metat.__index:getcontrol() + return self.c +end + +function metat.__index:source(source, step) + local sink = socket.sink("keep-open", self.c) + local ret, err = ltn12.pump.all(source, sink, step or ltn12.pump.step) + return ret, err +end + +-- closes the underlying c +function metat.__index:close() + self.c:close() + return 1 +end + +-- connect with server and return c object +function _M.connect(host, port, timeout, create) + local c, e = (create or socket.tcp)() + if not c then return nil, e end + c:settimeout(timeout or _M.TIMEOUT) + local r, e = c:connect(host, port) + if not r then + c:close() + return nil, e + end + return base.setmetatable({c = c}, metat) +end + +return _M diff --git a/lua_probject/tolua_project/socket/url.lua b/lua_probject/tolua_project/socket/url.lua new file mode 100644 index 00000000..fbd93d1d --- /dev/null +++ b/lua_probject/tolua_project/socket/url.lua @@ -0,0 +1,308 @@ +----------------------------------------------------------------------------- +-- URI parsing, composition and relative URL resolution +-- LuaSocket toolkit. +-- Author: Diego Nehab +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- +-- Declare module +----------------------------------------------------------------------------- +local string = require("string") +local base = _G +local table = require("table") +local socket = require("socket") + +socket.url = {} +local _M = socket.url + +----------------------------------------------------------------------------- +-- Module version +----------------------------------------------------------------------------- +_M._VERSION = "URL 1.0.3" + +----------------------------------------------------------------------------- +-- Encodes a string into its escaped hexadecimal representation +-- Input +-- s: binary string to be encoded +-- Returns +-- escaped representation of string binary +----------------------------------------------------------------------------- +function _M.escape(s) + return (string.gsub(s, "([^A-Za-z0-9_])", function(c) + return string.format("%%%02x", string.byte(c)) + end)) +end + +----------------------------------------------------------------------------- +-- Protects a path segment, to prevent it from interfering with the +-- url parsing. +-- Input +-- s: binary string to be encoded +-- Returns +-- escaped representation of string binary +----------------------------------------------------------------------------- +local function make_set(t) + local s = {} + for i,v in base.ipairs(t) do + s[t[i]] = 1 + end + return s +end + +-- these are allowed withing a path segment, along with alphanum +-- other characters must be escaped +local segment_set = make_set { + "-", "_", ".", "!", "~", "*", "'", "(", + ")", ":", "@", "&", "=", "+", "$", ",", +} + +local function protect_segment(s) + return string.gsub(s, "([^A-Za-z0-9_])", function (c) + if segment_set[c] then return c + else return string.format("%%%02x", string.byte(c)) end + end) +end + +----------------------------------------------------------------------------- +-- Encodes a string into its escaped hexadecimal representation +-- Input +-- s: binary string to be encoded +-- Returns +-- escaped representation of string binary +----------------------------------------------------------------------------- +function _M.unescape(s) + return (string.gsub(s, "%%(%x%x)", function(hex) + return string.char(base.tonumber(hex, 16)) + end)) +end + +----------------------------------------------------------------------------- +-- Builds a path from a base path and a relative path +-- Input +-- base_path +-- relative_path +-- Returns +-- corresponding absolute path +----------------------------------------------------------------------------- +local function absolute_path(base_path, relative_path) + if string.sub(relative_path, 1, 1) == "/" then return relative_path end + local path = string.gsub(base_path, "[^/]*$", "") + path = path .. relative_path + path = string.gsub(path, "([^/]*%./)", function (s) + if s ~= "./" then return s else return "" end + end) + path = string.gsub(path, "/%.$", "/") + local reduced + while reduced ~= path do + reduced = path + path = string.gsub(reduced, "([^/]*/%.%./)", function (s) + if s ~= "../../" then return "" else return s end + end) + end + path = string.gsub(reduced, "([^/]*/%.%.)$", function (s) + if s ~= "../.." then return "" else return s end + end) + return path +end + +----------------------------------------------------------------------------- +-- Parses a url and returns a table with all its parts according to RFC 2396 +-- The following grammar describes the names given to the URL parts +-- ::= :///;?# +-- ::= @: +-- ::= [:] +-- :: = {/} +-- Input +-- url: uniform resource locator of request +-- default: table with default values for each field +-- Returns +-- table with the following fields, where RFC naming conventions have +-- been preserved: +-- scheme, authority, userinfo, user, password, host, port, +-- path, params, query, fragment +-- Obs: +-- the leading '/' in {/} is considered part of +----------------------------------------------------------------------------- +function _M.parse(url, default) + -- initialize default parameters + local parsed = {} + for i,v in base.pairs(default or parsed) do parsed[i] = v end + -- empty url is parsed to nil + if not url or url == "" then return nil, "invalid url" end + -- remove whitespace + -- url = string.gsub(url, "%s", "") + -- get fragment + url = string.gsub(url, "#(.*)$", function(f) + parsed.fragment = f + return "" + end) + -- get scheme + url = string.gsub(url, "^([%w][%w%+%-%.]*)%:", + function(s) parsed.scheme = s; return "" end) + -- get authority + url = string.gsub(url, "^//([^/]*)", function(n) + parsed.authority = n + return "" + end) + -- get query string + url = string.gsub(url, "%?(.*)", function(q) + parsed.query = q + return "" + end) + -- get params + url = string.gsub(url, "%;(.*)", function(p) + parsed.params = p + return "" + end) + -- path is whatever was left + if url ~= "" then parsed.path = url end + local authority = parsed.authority + if not authority then return parsed end + authority = string.gsub(authority,"^([^@]*)@", + function(u) parsed.userinfo = u; return "" end) + authority = string.gsub(authority, ":([^:%]]*)$", + function(p) parsed.port = p; return "" end) + if authority ~= "" then + -- IPv6? + parsed.host = string.match(authority, "^%[(.+)%]$") or authority + end + local userinfo = parsed.userinfo + if not userinfo then return parsed end + userinfo = string.gsub(userinfo, ":([^:]*)$", + function(p) parsed.password = p; return "" end) + parsed.user = userinfo + return parsed +end + +----------------------------------------------------------------------------- +-- Rebuilds a parsed URL from its components. +-- Components are protected if any reserved or unallowed characters are found +-- Input +-- parsed: parsed URL, as returned by parse +-- Returns +-- a stringing with the corresponding URL +----------------------------------------------------------------------------- +function _M.build(parsed) + local ppath = _M.parse_path(parsed.path or "") + local url = _M.build_path(ppath) + if parsed.params then url = url .. ";" .. parsed.params end + if parsed.query then url = url .. "?" .. parsed.query end + local authority = parsed.authority + if parsed.host then + authority = parsed.host + if string.find(authority, ":") then -- IPv6? + authority = "[" .. authority .. "]" + end + if parsed.port then authority = authority .. ":" .. parsed.port end + local userinfo = parsed.userinfo + if parsed.user then + userinfo = parsed.user + if parsed.password then + userinfo = userinfo .. ":" .. parsed.password + end + end + if userinfo then authority = userinfo .. "@" .. authority end + end + if authority then url = "//" .. authority .. url end + if parsed.scheme then url = parsed.scheme .. ":" .. url end + if parsed.fragment then url = url .. "#" .. parsed.fragment end + -- url = string.gsub(url, "%s", "") + return url +end + +----------------------------------------------------------------------------- +-- Builds a absolute URL from a base and a relative URL according to RFC 2396 +-- Input +-- base_url +-- relative_url +-- Returns +-- corresponding absolute url +----------------------------------------------------------------------------- +function _M.absolute(base_url, relative_url) + local base_parsed + if base.type(base_url) == "table" then + base_parsed = base_url + base_url = _M.build(base_parsed) + else + base_parsed = _M.parse(base_url) + end + local relative_parsed = _M.parse(relative_url) + if not base_parsed then return relative_url + elseif not relative_parsed then return base_url + elseif relative_parsed.scheme then return relative_url + else + relative_parsed.scheme = base_parsed.scheme + if not relative_parsed.authority then + relative_parsed.authority = base_parsed.authority + if not relative_parsed.path then + relative_parsed.path = base_parsed.path + if not relative_parsed.params then + relative_parsed.params = base_parsed.params + if not relative_parsed.query then + relative_parsed.query = base_parsed.query + end + end + else + relative_parsed.path = absolute_path(base_parsed.path or "", + relative_parsed.path) + end + end + return _M.build(relative_parsed) + end +end + +----------------------------------------------------------------------------- +-- Breaks a path into its segments, unescaping the segments +-- Input +-- path +-- Returns +-- segment: a table with one entry per segment +----------------------------------------------------------------------------- +function _M.parse_path(path) + local parsed = {} + path = path or "" + --path = string.gsub(path, "%s", "") + string.gsub(path, "([^/]+)", function (s) table.insert(parsed, s) end) + for i = 1, #parsed do + parsed[i] = _M.unescape(parsed[i]) + end + if string.sub(path, 1, 1) == "/" then parsed.is_absolute = 1 end + if string.sub(path, -1, -1) == "/" then parsed.is_directory = 1 end + return parsed +end + +----------------------------------------------------------------------------- +-- Builds a path component from its segments, escaping protected characters. +-- Input +-- parsed: path segments +-- unsafe: if true, segments are not protected before path is built +-- Returns +-- path: corresponding path stringing +----------------------------------------------------------------------------- +function _M.build_path(parsed, unsafe) + local path = "" + local n = #parsed + if unsafe then + for i = 1, n-1 do + path = path .. parsed[i] + path = path .. "/" + end + if n > 0 then + path = path .. parsed[n] + if parsed.is_directory then path = path .. "/" end + end + else + for i = 1, n-1 do + path = path .. protect_segment(parsed[i]) + path = path .. "/" + end + if n > 0 then + path = path .. protect_segment(parsed[n]) + if parsed.is_directory then path = path .. "/" end + end + end + if parsed.is_absolute then path = "/" .. path end + return path +end + +return _M diff --git a/lua_probject/tolua_project/tolua.lua b/lua_probject/tolua_project/tolua.lua new file mode 100644 index 00000000..8fac8bdb --- /dev/null +++ b/lua_probject/tolua_project/tolua.lua @@ -0,0 +1,45 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- +if jit then + if jit.opt then + jit.opt.start(3) + end + + print("ver"..jit.version_num.." jit: ", jit.status()) + print(string.format("os: %s, arch: %s", jit.os, jit.arch)) +end + +if DebugServerIp then + require("mobdebug").start(DebugServerIp) +end + +require "misc.functions" +Mathf = require "UnityEngine.Mathf" +Vector3 = require "UnityEngine.Vector3" +Quaternion = require "UnityEngine.Quaternion" +Vector2 = require "UnityEngine.Vector2" +Vector4 = require "UnityEngine.Vector4" +Color = require "UnityEngine.Color" +Ray = require "UnityEngine.Ray" +Bounds = require "UnityEngine.Bounds" +RaycastHit = require "UnityEngine.RaycastHit" +Touch = require "UnityEngine.Touch" +LayerMask = require "UnityEngine.LayerMask" +Plane = require "UnityEngine.Plane" +Time = reimport "UnityEngine.Time" + +list = require "list" +utf8 = require "misc.utf8" + +require "event" +require "typeof" +require "slot" +require "System.Timer" +require "System.coroutine" +require "System.ValueType" +require "System.Reflection.BindingFlags" + +--require "misc.strict" \ No newline at end of file diff --git a/lua_probject/tolua_project/typeof.lua b/lua_probject/tolua_project/typeof.lua new file mode 100644 index 00000000..42c8cd37 --- /dev/null +++ b/lua_probject/tolua_project/typeof.lua @@ -0,0 +1,34 @@ +-------------------------------------------------------------------------------- +-- Copyright (c) 2015 - 2016 , 蒙占志(topameng) topameng@gmail.com +-- All rights reserved. +-- Use, modification and distribution are subject to the "MIT License" +-------------------------------------------------------------------------------- +local type = type +local types = {} +local _typeof = tolua.typeof +local _findtype = tolua.findtype + +function typeof(obj) + local t = type(obj) + local ret = nil + + if t == "table" then + ret = types[obj] + + if ret == nil then + ret = _typeof(obj) + types[obj] = ret + end + elseif t == "string" then + ret = types[obj] + + if ret == nil then + ret = _findtype(obj) + types[obj] = ret + end + else + error(debug.traceback("attemp to call typeof on type "..t)) + end + + return ret +end \ No newline at end of file diff --git a/wb_unity_pro/Assets/ART/base.meta b/wb_unity_pro/Assets/ART/base.meta new file mode 100644 index 00000000..6bc56828 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1eff9882af98acb4aa9ff43fa4c769bf +folderAsset: yes +timeCreated: 1501141341 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/Family.meta b/wb_unity_pro/Assets/ART/base/Family.meta new file mode 100644 index 00000000..f04d394c --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/Family.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 928dbf5e413057e4fa8082010a084e7c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/Family/ui.meta b/wb_unity_pro/Assets/ART/base/Family/ui.meta new file mode 100644 index 00000000..74d07650 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/Family/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4deaeea4a39f8654291bc2938585e25e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0.png b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0.png new file mode 100644 index 00000000..8b2c6b4c Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0.png.meta b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0.png.meta new file mode 100644 index 00000000..632ca9c2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 62363bae1cee2eb4fb93edc1394ae30e +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_1.png b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_1.png new file mode 100644 index 00000000..605e74c9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_1.png differ diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_1.png.meta b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_1.png.meta new file mode 100644 index 00000000..9b523337 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_1.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 2f546f5f2aa21f84baaf4a12772a130c +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_2.png b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_2.png new file mode 100644 index 00000000..53e2d94d Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_2.png differ diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_2.png.meta b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_2.png.meta new file mode 100644 index 00000000..ffe24f2f --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_2.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 2de70c880c247be47904d61203fa9343 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_3.png b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_3.png new file mode 100644 index 00000000..bc523804 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_3.png differ diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_3.png.meta b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_3.png.meta new file mode 100644 index 00000000..4e9798cf --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas0_3.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 78a8d2f4e9f7d27458e07fbb974fe1e4 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas_in3i7cup.png b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas_in3i7cup.png new file mode 100644 index 00000000..5a5bcf20 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas_in3i7cup.png differ diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas_in3i7cup.png.meta b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas_in3i7cup.png.meta new file mode 100644 index 00000000..9a004347 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/Family/ui/Family_atlas_in3i7cup.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: fafc94ee3c1cc7c4aacb3192e8e0967c +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_fui.bytes b/wb_unity_pro/Assets/ART/base/Family/ui/Family_fui.bytes new file mode 100644 index 00000000..d6585c6b Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/Family/ui/Family_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/base/Family/ui/Family_fui.bytes.meta b/wb_unity_pro/Assets/ART/base/Family/ui/Family_fui.bytes.meta new file mode 100644 index 00000000..3070e3bd --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/Family/ui/Family_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c1652156a48ed314e92cb8121851e5aa +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/chat.meta b/wb_unity_pro/Assets/ART/base/chat.meta new file mode 100644 index 00000000..81ff70b5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/chat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1c3478585f14331439ad0968382560f4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/chat/ui.meta b/wb_unity_pro/Assets/ART/base/chat/ui.meta new file mode 100644 index 00000000..6b9a4fd6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/chat/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 671285df07e3cea4f9b6c8efc61ce111 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/chat/ui/Chat_atlas0.png b/wb_unity_pro/Assets/ART/base/chat/ui/Chat_atlas0.png new file mode 100644 index 00000000..f543e618 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/chat/ui/Chat_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/base/chat/ui/Chat_atlas0.png.meta b/wb_unity_pro/Assets/ART/base/chat/ui/Chat_atlas0.png.meta new file mode 100644 index 00000000..aa0573cb --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/chat/ui/Chat_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 826a06fbec3baea41946ba36f4ad982c +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/chat/ui/Chat_fui.bytes b/wb_unity_pro/Assets/ART/base/chat/ui/Chat_fui.bytes new file mode 100644 index 00000000..99f521dc Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/chat/ui/Chat_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/base/chat/ui/Chat_fui.bytes.meta b/wb_unity_pro/Assets/ART/base/chat/ui/Chat_fui.bytes.meta new file mode 100644 index 00000000..ed9e1c41 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/chat/ui/Chat_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: fe61c614f83effa48bc725d4b8eb4405 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common.meta b/wb_unity_pro/Assets/ART/base/common.meta new file mode 100644 index 00000000..654aa6d0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22e6b259dd73da74aa3bc16a47fd3c00 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound.meta b/wb_unity_pro/Assets/ART/base/common/sound.meta new file mode 100644 index 00000000..43965cef --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c692803b2ab1ef844813ba2496345035 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/bgmusic1.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/bgmusic1.mp3 new file mode 100644 index 00000000..ee0bb029 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/bgmusic1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/bgmusic1.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/bgmusic1.mp3.meta new file mode 100644 index 00000000..0996a1a5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/bgmusic1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 613b1611aa08bfa49b400fcdb8b2587d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/2a03e8244241cd460bfd6322926934a9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/choujiang.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/choujiang.mp3 new file mode 100644 index 00000000..817314ef Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/choujiang.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/choujiang.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/choujiang.mp3.meta new file mode 100644 index 00000000..fb2b7ab6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/choujiang.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 206ee9fc427b3c54898b0bcfae9fe1ca +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/0b33a611607a10c6a35bc20221f2072c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/click.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/click.mp3 new file mode 100644 index 00000000..a7ba8dbe Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/click.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/click.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/click.mp3.meta new file mode 100644 index 00000000..3b6e1e63 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/click.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c19526a7e737e39448c175a59c87445e +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/f91f3178348fda4c8909294d8734b853 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/daojishi1.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/daojishi1.mp3 new file mode 100644 index 00000000..4516188b Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/daojishi1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/daojishi1.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/daojishi1.mp3.meta new file mode 100644 index 00000000..d6d62a5f --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/daojishi1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 935496a1251269e469df7f6350144a8e +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/02f455dc467c859c594f9cc8ac99c08a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man.meta b/wb_unity_pro/Assets/ART/base/common/sound/man.meta new file mode 100644 index 00000000..09788bae --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/man.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 893f77e0463eb6640a1cb46fc070a484 +folderAsset: yes +timeCreated: 1504842695 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_0.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_0.mp3 new file mode 100644 index 00000000..45350e00 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_0.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_0.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_0.mp3.meta new file mode 100644 index 00000000..51007f8d --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_0.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d33f91f651602d44d98504f8f2433079 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/38592b71c70ab73cdda51b1b07e95d65 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_1.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_1.mp3 new file mode 100644 index 00000000..99a835c9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_1.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_1.mp3.meta new file mode 100644 index 00000000..c99621fd --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 16316064d2484c64fba69513d17d402f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/3da5884730ad461853fd7de9d418aace + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_10.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_10.mp3 new file mode 100644 index 00000000..f250be1f Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_10.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_10.mp3.meta new file mode 100644 index 00000000..ccb6f2ca --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8b86ea13912daaa4faa9b9f5e2e54532 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/99d6f9d1475fa9528ebfb23b5c5aae2c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_2.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_2.mp3 new file mode 100644 index 00000000..f176716a Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_2.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_2.mp3.meta new file mode 100644 index 00000000..ce18d14e --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c100574b6c9f2ee4991d86c217d3d8d1 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/69099dd74c43f98987e367733f84f657 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_3.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_3.mp3 new file mode 100644 index 00000000..fe69009a Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_3.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_3.mp3.meta new file mode 100644 index 00000000..6bc00fea --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a29fc80a8980fff42af9ccc4c0188da2 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/bd851980a34997670af6c49793fba2d1 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_4.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_4.mp3 new file mode 100644 index 00000000..f0925ee5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_4.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_4.mp3.meta new file mode 100644 index 00000000..b162c464 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3deda063c6fc00541a8ad77d7f13800a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/bfd207e7b573376f7dea639c1d002160 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_5.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_5.mp3 new file mode 100644 index 00000000..d26ca491 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_5.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_5.mp3.meta new file mode 100644 index 00000000..e2c5d38d --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c49c32372f7bdee469bf1359054de024 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/678bf2972ff07c5e7892696a19113559 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_6.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_6.mp3 new file mode 100644 index 00000000..4aea2c4b Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_6.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_6.mp3.meta new file mode 100644 index 00000000..2fcc75b8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 51c997ef6f6631b4d9f36757693c2dab +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/b151c609f8e5d34f167f932545abaf56 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_7.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_7.mp3 new file mode 100644 index 00000000..d34ca7ce Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_7.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_7.mp3.meta new file mode 100644 index 00000000..63407d8a --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a8366000285dca94eb9ed22c4120fe67 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/9a7273e71c8e1f14d6bbfe9dce34a085 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_8.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_8.mp3 new file mode 100644 index 00000000..e38730ed Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_8.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_8.mp3.meta new file mode 100644 index 00000000..d9095498 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d8ddf77d2fe345c438f0ef55bb960541 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/7a35d9a2cdcda19502755d66b75ed095 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_9.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_9.mp3 new file mode 100644 index 00000000..c2a80eb6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/man/chat_9.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_9.mp3.meta new file mode 100644 index 00000000..27c6bb06 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/man/chat_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7e8432a2da6a6a441b64a4422d9d8e35 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/01591d8f5600ef7664b313b2f7315cf9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/win new.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/win new.mp3 new file mode 100644 index 00000000..d2a1c1c0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/win new.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/win new.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/win new.mp3.meta new file mode 100644 index 00000000..047e291f --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/win new.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2adcb47b6e7701740b0689897cf264b3 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/5458d7d05e0a827252160e37f6657b93 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman.meta b/wb_unity_pro/Assets/ART/base/common/sound/woman.meta new file mode 100644 index 00000000..79025bd9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/woman.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7ff633d433bb1d54c926975e01606641 +folderAsset: yes +timeCreated: 1504842709 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_0.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_0.mp3 new file mode 100644 index 00000000..921a9485 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_0.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_0.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_0.mp3.meta new file mode 100644 index 00000000..d842c06b --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_0.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 10465d92374bd6e48ae2ed828a28276d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/7557a64939b661f03b7976383197f4ab + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_1.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_1.mp3 new file mode 100644 index 00000000..979e9610 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_1.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_1.mp3.meta new file mode 100644 index 00000000..478dcb91 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1bbdc54b19d6876478aba7101c9aa7f5 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/37eb1ded631e7c89a8d39613799a6978 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_10.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_10.mp3 new file mode 100644 index 00000000..0f5f5a82 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_10.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_10.mp3.meta new file mode 100644 index 00000000..f5c50181 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b245dbce11f4f5b4ab6376fb8eb6292b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/c9fde7a5c681bd9e4c9c4b43e813d7fd + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_2.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_2.mp3 new file mode 100644 index 00000000..e63daa61 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_2.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_2.mp3.meta new file mode 100644 index 00000000..846a638d --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 22cb013ce6d5678488b0b494ebec9c46 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/b687591726b2c01fa31f4cacabcfaf9e + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_3.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_3.mp3 new file mode 100644 index 00000000..626511fd Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_3.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_3.mp3.meta new file mode 100644 index 00000000..85fe68e4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 169325fd0944af94583b012ca495a599 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/48d30c543113925fcdb5d2eae586f50f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_4.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_4.mp3 new file mode 100644 index 00000000..b8d02563 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_4.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_4.mp3.meta new file mode 100644 index 00000000..366e530f --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 09d63de0541fbf14984af4286375cd4d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/843a324d4f0104d51b55c771ef546b04 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_5.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_5.mp3 new file mode 100644 index 00000000..50218b12 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_5.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_5.mp3.meta new file mode 100644 index 00000000..0edb9a92 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 42d6c887f89bc8d48998c9363154b885 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/228412b481e3c719944ea7ef8a3a725e + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_6.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_6.mp3 new file mode 100644 index 00000000..76730395 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_6.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_6.mp3.meta new file mode 100644 index 00000000..cdd22a2f --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d7c3f7228e62ad246ad107e2ff81c4c3 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/53b6ebd19ff7adf267b8fd10885b22c1 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_7.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_7.mp3 new file mode 100644 index 00000000..a42313c7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_7.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_7.mp3.meta new file mode 100644 index 00000000..6c91085c --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2c5626d5932e9ac488687fef3dcd1eb3 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/ad16e3847f1d504ca7e2e98f17cb8db6 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_8.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_8.mp3 new file mode 100644 index 00000000..357ca535 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_8.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_8.mp3.meta new file mode 100644 index 00000000..34307291 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 01cbcd741fc7f514daafd4504729e70f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/440bef7d85dff6698ab1fa9cab6a9973 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_9.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_9.mp3 new file mode 100644 index 00000000..535dc25f Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_9.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_9.mp3.meta new file mode 100644 index 00000000..7fcff955 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/woman/chat_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 39f79d35cdfe56647b16d9acaff2742b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/407d4e3425c5cf4fbf00cd16c246fcc5 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/sound/zhongjiang.mp3 b/wb_unity_pro/Assets/ART/base/common/sound/zhongjiang.mp3 new file mode 100644 index 00000000..d37a9d14 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/sound/zhongjiang.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/sound/zhongjiang.mp3.meta b/wb_unity_pro/Assets/ART/base/common/sound/zhongjiang.mp3.meta new file mode 100644 index 00000000..39b09023 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/sound/zhongjiang.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ca04f6e1e2e050542a9f007e62259738 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: base/common/f8ae66a8290c60eff2d6a1a2126bd163 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui.meta b/wb_unity_pro/Assets/ART/base/common/ui.meta new file mode 100644 index 00000000..c14c0ce2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c00e730e00e11fb4aa82c44f8a7ca2db +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0.png new file mode 100644 index 00000000..bf17c739 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0.png.meta new file mode 100644 index 00000000..6ad726ec --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 1bcf5d260b67bdc4284f1a7be280d9e6 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_1.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_1.png new file mode 100644 index 00000000..8a2b79a5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_1.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_1.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_1.png.meta new file mode 100644 index 00000000..ae8fb08c --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_1.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 1ea7d8999eeb34c4c934e67d1861a874 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_10.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_10.png new file mode 100644 index 00000000..a78fab39 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_10.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_10.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_10.png.meta new file mode 100644 index 00000000..123e0876 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_10.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: b27507f8b68c25a48b232b4900183954 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_11.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_11.png new file mode 100644 index 00000000..a6bf252f Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_11.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_11.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_11.png.meta new file mode 100644 index 00000000..28b9c72a --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_11.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: f9ea38489dc364348bc13d202aa4ced8 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_12.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_12.png new file mode 100644 index 00000000..3f91fec6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_12.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_12.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_12.png.meta new file mode 100644 index 00000000..2bd2b59c --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_12.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: bd2d4990f6701d7478a743eaf221ae5d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_13.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_13.png new file mode 100644 index 00000000..6e371e3d Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_13.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_13.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_13.png.meta new file mode 100644 index 00000000..7caba175 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_13.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 402ca17d899206643abedfc3dcde13a6 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_14.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_14.png new file mode 100644 index 00000000..70425481 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_14.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_14.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_14.png.meta new file mode 100644 index 00000000..04a2b03c --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_14.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 1c9e68a24c2550a4295ea70402a66825 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_15.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_15.png new file mode 100644 index 00000000..2d5e96f8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_15.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_15.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_15.png.meta new file mode 100644 index 00000000..31c2eac3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_15.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: b91fc03b757a91745bc568274a8aad5a +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_16.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_16.png new file mode 100644 index 00000000..b672483d Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_16.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_16.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_16.png.meta new file mode 100644 index 00000000..c10e15de --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_16.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: da37ff44206a6d94fa35c5ccb09d2aef +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_2.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_2.png new file mode 100644 index 00000000..5ed50ecc Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_2.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_2.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_2.png.meta new file mode 100644 index 00000000..756bf89a --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_2.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: a47559180c9aeb5409018c5641a386c7 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_3.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_3.png new file mode 100644 index 00000000..2058fbc1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_3.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_3.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_3.png.meta new file mode 100644 index 00000000..df27e2f5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_3.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 3fe763ba5ef199f4889952d605112fff +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_4.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_4.png new file mode 100644 index 00000000..01321cc8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_4.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_4.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_4.png.meta new file mode 100644 index 00000000..e82622b7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_4.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: e08eb4e1262d2c847ba5197972e7d517 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_5.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_5.png new file mode 100644 index 00000000..56523fde Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_5.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_5.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_5.png.meta new file mode 100644 index 00000000..ce89745d --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_5.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 1034961e0d562e543bd033edb5357462 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_6.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_6.png new file mode 100644 index 00000000..b81aa35c Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_6.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_6.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_6.png.meta new file mode 100644 index 00000000..729b07f8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_6.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: c745a0c121d10734a8b1cc778fa8b50f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_7.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_7.png new file mode 100644 index 00000000..85f37ea1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_7.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_7.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_7.png.meta new file mode 100644 index 00000000..dd5d8467 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_7.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 11ff83717c2a7db41bcf6bf93292029e +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_8.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_8.png new file mode 100644 index 00000000..53cf2cd0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_8.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_8.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_8.png.meta new file mode 100644 index 00000000..f9f1848e --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_8.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 79ade0c382c0ad048bab2ad4f76df573 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_9.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_9.png new file mode 100644 index 00000000..6b57556e Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_9.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_9.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_9.png.meta new file mode 100644 index 00000000..7a7d76de --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas0_9.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 26c9f4b718e3f2b43be750e7e760d158 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas1.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas1.png new file mode 100644 index 00000000..200edcce Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas1.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas1.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas1.png.meta new file mode 100644 index 00000000..3ed40d10 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas1.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: ef7ca451ea5e8d745a3fa7a89ed016d3 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_86ct7imk.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_86ct7imk.png new file mode 100644 index 00000000..0864a4ce Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_86ct7imk.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_86ct7imk.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_86ct7imk.png.meta new file mode 100644 index 00000000..8ac7e877 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_86ct7imk.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 1677cd11b711b9e40ac68fbabfa0617b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_ivty7ijj.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_ivty7ijj.png new file mode 100644 index 00000000..cbc4ab90 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_ivty7ijj.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_ivty7ijj.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_ivty7ijj.png.meta new file mode 100644 index 00000000..d9e9d887 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_ivty7ijj.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 445d67b13cac7c04783ccfd313a7e8e6 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_n2h87imj.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_n2h87imj.png new file mode 100644 index 00000000..d50d12ae Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_n2h87imj.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_n2h87imj.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_n2h87imj.png.meta new file mode 100644 index 00000000..e0aed211 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_n2h87imj.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: a60c78ac4981169498f964e4b4893bbe +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_z7hi7cjl.png b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_z7hi7cjl.png new file mode 100644 index 00000000..d0f7b59d Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_z7hi7cjl.png differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_z7hi7cjl.png.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_z7hi7cjl.png.meta new file mode 100644 index 00000000..8aaf0b1a --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_atlas_z7hi7cjl.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 0566521d9cbfb8749982d2bf3d40b9ed +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8j.mp3 b/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8j.mp3 new file mode 100644 index 00000000..8cf06d78 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8j.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8j.mp3.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8j.mp3.meta new file mode 100644 index 00000000..5067b94b --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8j.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 05351b5a6cb8f594c9125eea586d22db +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8k.mp3 b/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8k.mp3 new file mode 100644 index 00000000..93955b90 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8k.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8k.mp3.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8k.mp3.meta new file mode 100644 index 00000000..069e1389 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8k.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5d7456d69076cdb4b94444edd7ea83b4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8l.mp3 b/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8l.mp3 new file mode 100644 index 00000000..9ca0a43f Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8l.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8l.mp3.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8l.mp3.meta new file mode 100644 index 00000000..3ca41662 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8l.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 052c6d1f7419fee4d9be0da02e97bb28 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8m.mp3 b/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8m.mp3 new file mode 100644 index 00000000..30566dd6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8m.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8m.mp3.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8m.mp3.meta new file mode 100644 index 00000000..ac730479 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_e0dy8m.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 991dece0a3a6c3e4081394bc97d94152 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_fui.bytes b/wb_unity_pro/Assets/ART/base/common/ui/Common_fui.bytes new file mode 100644 index 00000000..f413e169 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_fui.bytes.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_fui.bytes.meta new file mode 100644 index 00000000..5270c5af --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: eb18ba26c546b664d8bcf40dfb22334c +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijo.woff b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijo.woff new file mode 100644 index 00000000..4fac26d0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijo.woff differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijo.woff.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijo.woff.meta new file mode 100644 index 00000000..e935e930 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijo.woff.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b3fd47f6b807a5f4d99a067b8298e573 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijp.woff2 b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijp.woff2 new file mode 100644 index 00000000..bd39f6f0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijp.woff2 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijp.woff2.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijp.woff2.meta new file mode 100644 index 00000000..6fa81170 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijp.woff2.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e2a43db26d7b42441972df6d9bdd7bd1 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijq.txt b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijq.txt new file mode 100644 index 00000000..6aeef8e4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijq.txt @@ -0,0 +1,4 @@ +请按照下面流程安装文件夹里的字体包。 + +1. 打开字体文件夹,根据不同系统需要选择OTF或TTF版本 +2. 字体所包含只有一个字重(双击安装)。 \ No newline at end of file diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijq.txt.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijq.txt.meta new file mode 100644 index 00000000..f2d6d0cc --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijq.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f494e792e67a66b4db65512383e25642 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijr.txt b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijr.txt new file mode 100644 index 00000000..44b70206 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijr.txt @@ -0,0 +1,11 @@ +1. 阿里妈妈东方大楷体字体及包含该字体的字库软件,合称“阿里妈妈东方大楷体”。 + +2. 阿里妈妈东方大楷体的知识产权和相关权益归属于淘宝(中国)软件有限公司(以下简称“阿里妈妈”),受《中华人民共和国著作权法》及其他适用法律法规、国际公约、条约的保护。 + +3. 阿里妈妈授权个人、企业等用户在遵守本声明相关条款的前提下,可以下载、安装和使用上述阿里妈妈字体,该授权是免费的普通许可,用户可基于合法目的用于商业用途或非商业用途,但不得以任何违反本声明第4条及法律法规、政策、规章或公序良俗的方式使用。 + +4. 除本法律声明中明确授权之外,阿里妈妈未授予用户关于阿里妈妈东方大楷体的其他权利。未经阿里妈妈授权,任何人不得:1)对阿里妈妈东方大楷体进行仿制、转换、翻译、反编译、反向工程、拆分、破解或以其他方式试图从该字库软件获取源代码;2)删除、覆盖或修改阿里妈妈东方大楷体法律声明的全部或部分内容;3)将阿里妈妈东方大楷体进行单独定价出售、出租、出借、转让、转授权、或采取其他未经阿里妈妈授权的行为;4) 发布任何使外界误认其与阿里妈妈或其关联公司存在合作、赞助或背书等商业关联的不实信息。 + +5. 阿里妈妈授予用户的上述授权不附带任何明示或暗示的保证,不对任何人因从非阿里妈妈官方渠道或指定渠道下载、安装或使用阿里妈妈东方大楷体而引发的任何直接或间接损失承担责任。 + +6. 本声明的解释、履行与争议解决适用中华人民共和国的法律。用户与阿里妈妈就阿里妈妈东方大楷体的使用若发生争议,双方应友好协商,若协商不成,任一方有权向浙江省杭州市有管辖权的人民法院提起诉讼。 diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijr.txt.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijr.txt.meta new file mode 100644 index 00000000..5c23b3da --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijr.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8d495fdc99160ab4181d9f6fe501cad0 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijv.woff b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijv.woff new file mode 100644 index 00000000..15cc8913 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijv.woff differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijv.woff.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijv.woff.meta new file mode 100644 index 00000000..c294bffe --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijv.woff.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: de2b01ac80600f6499db43b2ff17f696 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijw.txt b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijw.txt new file mode 100644 index 00000000..2632a36e --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijw.txt @@ -0,0 +1,19 @@ +A. 在哪里可以下载阿里妈妈数黑体? +渠道一:https://www.iconfont.cn/fonts/detail?cnid=a9fXc2HD9n7s +渠道二:fonts.alibabagroup.com + + +B. 阿里阿里妈妈数黑体简介 +基本信息:阿里妈妈数黑体为中文简体字库,收纳的中文字符包括但不限于GB2312,共计6767个汉字;英文大小写共52个;常用标点符号共206个,总计7025个字符。 + +设计说明:阿里妈妈数黑体字型饱满、体态中正,布白极具现代韵律,落笔厚实而简练;字里行间流露出先锋、前卫和时尚的视觉感受。适用于电商、广告、品牌形象、推广物料等场景。 + +C. 使用反馈、商业合作等问题,请email: +alimama-font@list.alibaba-inc.com +—— +重要!安装前请先阅读此文档 +请先按照下面流程安装文件夹里的字体包。 + +1. 打开字体文件夹,根据不同系统需要选择OTF或TTF版本 + +2. 字体所包含只有一个字重(双击安装)。 \ No newline at end of file diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijw.txt.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijw.txt.meta new file mode 100644 index 00000000..b3ee1baa --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijw.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f1752370255dc154f932fce085b1685a +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijx.txt b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijx.txt new file mode 100644 index 00000000..9dab4f58 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijx.txt @@ -0,0 +1,15 @@ +阿里妈妈数黑体法律声明 + +1. 阿里妈妈数黑体字体及包含该字体的字库软件,合称“阿里妈妈数黑体”。 + +2. 阿里妈妈数黑体的知识产权和相关权益归属于淘宝(中国)软件有限公司(以下简称“阿里妈妈”),受《中华人民共和国著作权法》及其他适用法律法规、国际公约、条约的保护。 + +3. 阿里妈妈授权个人、企业等用户在遵守本声明相关条款的前提下,可以下载、安装和使用上述阿里妈妈字体,该授权是免费的普通许可,用户可基于合法目的用于商业用途或非商业用途,但不得以任何违反本声明第4条及法律法规、政策、规章或公序良俗的方式使用。 + +4. 除本法律声明中明确授权之外,阿里妈妈未授予用户关于阿里妈妈数黑体的其他权利。未经阿里妈妈授权,任何人不得:1)对阿里妈妈数黑体进行仿制、转换、翻译、反编译、反向工程、拆分、破解或以其他方式试图从该字库软件获取源代码;2)删除、覆盖或修改阿里妈妈数黑体法律声明的全部或部分内容;3)将阿里妈妈数黑体进行单独定价出售、出租、出借、转让、转授权、或采取其他未经阿里妈妈授权的行为;4) 发布任何使外界误认其与阿里妈妈或其关联公司存在合作、赞助或背书等商业关联的不实信息。 + +5. 阿里妈妈授予用户的上述授权不附带任何明示或暗示的保证,不对任何人因从非阿里妈妈官方渠道或指定渠道下载、安装或使用阿里妈妈数黑体而引发的任何直接或间接损失承担责任。 + +6. 本声明的解释、履行与争议解决适用中华人民共和国的法律。用户与阿里妈妈就阿里妈妈数黑体的使用若发生争议,双方应友好协商,若协商不成,任一方有权向浙江省杭州市有管辖权的人民法院提起诉讼。 + +反馈与咨询联系方:alimama-font@list.alibaba-inc.com \ No newline at end of file diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijx.txt.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijx.txt.meta new file mode 100644 index 00000000..4b7f9517 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijx.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 71aeeafc3b3e2004eb3d692111065754 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijy.woff b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijy.woff new file mode 100644 index 00000000..a76e898c Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijy.woff differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijy.woff.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijy.woff.meta new file mode 100644 index 00000000..1b145cd8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijy.woff.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4feb3f8abbd884c458b4296210929c27 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijz.woff2 b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijz.woff2 new file mode 100644 index 00000000..e9557454 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijz.woff2 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijz.woff2.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijz.woff2.meta new file mode 100644 index 00000000..788355cf --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ijz.woff2.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a1efe52fc0bb45145b912b159908141b +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik1.woff b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik1.woff new file mode 100644 index 00000000..749276e1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik1.woff differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik1.woff.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik1.woff.meta new file mode 100644 index 00000000..335cca5e --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik1.woff.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4e71527ddcc48b241afccfdc71911112 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik2.woff2 b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik2.woff2 new file mode 100644 index 00000000..01be5bfd Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik2.woff2 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik2.woff2.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik2.woff2.meta new file mode 100644 index 00000000..31145e76 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik2.woff2.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ccc0b09c1fdf27c4a826d3834f1b4fed +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik3.txt b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik3.txt new file mode 100644 index 00000000..923a3eed --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik3.txt @@ -0,0 +1,6 @@ +使用反馈、商业合作等问题,请email:alimama-font@list.alibaba-inc.com + +重要!安装前请先阅读此文档 +请先按照下面流程安装文件夹里的字体包。 +1. 打开字体文件夹,根据不同系统需要选择 OTF 或 TTF 版本 +2. 字体所包含字重、字宽2个可变轴,同时包含 XX 预设值(双击安装)。 \ No newline at end of file diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik3.txt.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik3.txt.meta new file mode 100644 index 00000000..00de41e2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik3.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a147c3877fbcbdf438f6d81cdec32d4c +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik4.txt b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik4.txt new file mode 100644 index 00000000..6cb5f3c4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik4.txt @@ -0,0 +1,6 @@ +1. 阿里妈妈方圆体字体及包含该字体的字库软件,合称“阿里妈妈方圆体”。 +2. 阿里妈妈方圆体的知识产权和相关权益归属于淘宝(中国)软件有限公司(以下简称“阿里妈妈”),受《中华人民共和国著作权法》及其他适用法律法规、国际公约、条约的保护。 +3. 阿里妈妈授权个人、企业等用户在遵守本声明相关条款的前提下,可以下载、安装和使用上述阿里妈妈字体,该授权是免费的普通许可,用户可基于合法目的用于商业用途或非商业用途,以及嵌入式使用,但不得以任何违反本声明第4条及法律法规、政策、规章或公序良俗的方式使用。 +4. 除本法律声明中明确授权之外,阿里妈妈未授予用户关于阿里妈妈方圆体的其他权利。未经阿里妈妈授权,任何人不得:1)对阿里妈妈方圆体进行仿制、转换、翻译、反编译、反向工程、拆分、破解或以其他方式试图从该字库软件获取源代码;2)对阿里妈妈方圆体进行新增、拆分、修改或以其他方式进行二次创作;3)对阿里妈妈方圆体进行有偿方式转让、授权或许可给第三方/商家/用户使用;4) 标注错误或不标注版权所有人阿里妈妈,无法标注版权所有人的情况除外;5)发布任何使外界误认其与阿里妈妈或其关联公司存在合作、赞助或背书等商业关联的不实信息。 +5. 阿里妈妈授予用户的上述授权不附带任何明示或暗示的保证,不对任何人因从非阿里妈妈官方渠道或指定渠道下载、安装或使用阿里妈妈方圆体而引发的任何直接或间接损失承担责任。 +6. 本声明的解释、履行与争议解决适用中华人民共和国的法律。用户与阿里妈妈就阿里妈妈方圆体的使用若发生争议,双方应友好协商,若协商不成,任一方有权向浙江省杭州市有管辖权的人民法院提起诉讼。 \ No newline at end of file diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik4.txt.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik4.txt.meta new file mode 100644 index 00000000..2bb29ff4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik4.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9b9554550fcc8464ebf97df5c779adc8 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik5.woff2 b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik5.woff2 new file mode 100644 index 00000000..dde2f11e Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik5.woff2 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik5.woff2.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik5.woff2.meta new file mode 100644 index 00000000..106295b0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik5.woff2.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4d900046c31c71a4b9a7711b7b44b95e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik6.woff b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik6.woff new file mode 100644 index 00000000..a76e898c Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik6.woff differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik6.woff.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik6.woff.meta new file mode 100644 index 00000000..e7c29db9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ik6.woff.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a2d94dcccf8451d489287aeda20f1457 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikd.txt b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikd.txt new file mode 100644 index 00000000..4bf5c609 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikd.txt @@ -0,0 +1,10 @@ + + + վ www.ddooo.com ṩϷƽ + + ȫɫվ޲޲޶ + + ܣѹΪwww.ddooo.com + + + diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikd.txt.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikd.txt.meta new file mode 100644 index 00000000..a60fe9f5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikd.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: eff76e4e8a280854ba1c328dc6dff75d +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ike.bat b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ike.bat new file mode 100644 index 00000000..a9ca30a3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ike.bat @@ -0,0 +1,7 @@ +@echo off +color 3f +title װű +echo A|xcopy *.ttf %windir%\fonts\ +echo װϣ˳.... +pause>nul +exit \ No newline at end of file diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ike.bat.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ike.bat.meta new file mode 100644 index 00000000..a2879e92 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ike.bat.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8c4a1fc1b375cbd499621322399838c2 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikg.url b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikg.url new file mode 100644 index 00000000..efa57022 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikg.url @@ -0,0 +1,3 @@ +[InternetShortcut] +URL=http://www.ddooo.com/ +Modified=30401BD8C699CB018E diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikg.url.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikg.url.meta new file mode 100644 index 00000000..c32e3f02 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikg.url.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6cd449bf29675d94699dddf1b3bdf90f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikh.url b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikh.url new file mode 100644 index 00000000..14a8fa04 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikh.url @@ -0,0 +1,3 @@ +[InternetShortcut] +URL=http://www.ddooo.com/softdown/63337.htm +Modified=F0828744A247D001F7 diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikh.url.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikh.url.meta new file mode 100644 index 00000000..fc02fc23 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikh.url.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 92f803b0cf2dddf4ea2fa5043099c714 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikj.url b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikj.url new file mode 100644 index 00000000..fd010d13 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikj.url @@ -0,0 +1,10 @@ +[InternetShortcut] +URL=http://www.downcc.com/?down +Modified=607635DA33E2CF01CA +IconFile=C:\WINDOWS\System32\shell32.dll +IconIndex=130 +[InternetShortcut.A] +[InternetShortcut.W] +IconFile=C:+AFw-Documents and Settings+AFw-Administrator+AFxoTJdiAFw-logo.ico +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,2 diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikj.url.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikj.url.meta new file mode 100644 index 00000000..199936c7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikj.url.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: da6d58cfd8ba5c74a8441ccf3e6e295e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikt.txt b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikt.txt new file mode 100644 index 00000000..683bcd35 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikt.txt @@ -0,0 +1,32 @@ +www.downcc.com ɫԴ + + + ǻdzĶṩԴĶͼ飬 + + һֱ֧ǣǻ᲻ͣṩõԭԴ + + վQQȺ:338496984 ϵʼ:webmaster@downcc.com + + + +ɫԴļѹΪwww.downcc.com + + + +ɫԴ ٶһ© + + +-------------------------------------------------- +-------------------------------------------------- + +ʾ +===================================== +RAR ļʹ Winrarѹ +PDF ļʹ AdobeReader鿴 +SWF ļʹ flashplayer +FLV ļʹ FLVרò +AVIMPG4RM Ƶļ԰װӰ + +txt,ini,confphpıļʹEditplus +鿴,±ʶеµIJ鿴. +===================================== \ No newline at end of file diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikt.txt.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikt.txt.meta new file mode 100644 index 00000000..7cfdb234 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikt.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 178e63cdbd1fd8540a8daa36e9300857 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7iku.woff2 b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7iku.woff2 new file mode 100644 index 00000000..e9557454 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7iku.woff2 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7iku.woff2.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7iku.woff2.meta new file mode 100644 index 00000000..03f283c2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7iku.woff2.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7683ae6b0b2786a4da753dece57cb4d4 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikv.ds_store b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikv.ds_store new file mode 100644 index 00000000..982c1dad Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikv.ds_store differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikv.ds_store.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikv.ds_store.meta new file mode 100644 index 00000000..61164041 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ikv.ds_store.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 36eb1fc7c9141284c98ddd943ce27571 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il0.eot b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il0.eot new file mode 100644 index 00000000..e34bec31 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il0.eot differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il0.eot.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il0.eot.meta new file mode 100644 index 00000000..96c10e4a --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il0.eot.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7a3308f7772ae7c4d96eb97d176ecff6 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il3.woff b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il3.woff new file mode 100644 index 00000000..5571550b Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il3.woff differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il3.woff.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il3.woff.meta new file mode 100644 index 00000000..01b4d238 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il3.woff.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cc3f665a776f59b4098319560a502a65 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il4.woff2 b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il4.woff2 new file mode 100644 index 00000000..fa037a7b Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il4.woff2 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il4.woff2.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il4.woff2.meta new file mode 100644 index 00000000..6b750acd --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il4.woff2.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: acb70191b16d81145ae233902b8d14cb +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il5.eot b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il5.eot new file mode 100644 index 00000000..eb628958 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il5.eot differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il5.eot.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il5.eot.meta new file mode 100644 index 00000000..80efe38b --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il5.eot.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: aedef8befb0909947a7bc9fa1040c5c2 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il8.woff b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il8.woff new file mode 100644 index 00000000..08b4f3f3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il8.woff differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il8.woff.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il8.woff.meta new file mode 100644 index 00000000..9e7a4794 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il8.woff.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f72bc9b6459f29647817761dec7871d7 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il9.woff2 b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il9.woff2 new file mode 100644 index 00000000..d4448dd3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il9.woff2 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il9.woff2.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il9.woff2.meta new file mode 100644 index 00000000..88615ae0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7il9.woff2.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 56992ce7be8c68c4ca5b166ecfbf46c8 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ila.eot b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ila.eot new file mode 100644 index 00000000..9f75e5d8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ila.eot differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ila.eot.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ila.eot.meta new file mode 100644 index 00000000..d80fdc94 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ila.eot.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 09699d668c184a34f9198461c536d556 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ild.woff b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ild.woff new file mode 100644 index 00000000..2fb878c2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ild.woff differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ild.woff.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ild.woff.meta new file mode 100644 index 00000000..9840a1e5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ild.woff.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9cbdad8c66736ca4298d6e9931217bda +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ile.woff2 b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ile.woff2 new file mode 100644 index 00000000..2f3069e2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ile.woff2 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ile.woff2.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ile.woff2.meta new file mode 100644 index 00000000..026e4bda --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ile.woff2.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 27f46f8f2b619c5438b87443bc6f2bd8 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilf.eot b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilf.eot new file mode 100644 index 00000000..7ee6a1e8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilf.eot differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilf.eot.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilf.eot.meta new file mode 100644 index 00000000..f1f1b672 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilf.eot.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 99abea027ba08f74a8f9adacbc086c13 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilj.woff b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilj.woff new file mode 100644 index 00000000..eec0c1bc Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilj.woff differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilj.woff.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilj.woff.meta new file mode 100644 index 00000000..be4b8bd6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilj.woff.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 59fb2f0b76c6f8e409dad73fb2cd2486 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilk.woff2 b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilk.woff2 new file mode 100644 index 00000000..4b574fbd Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilk.woff2 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilk.woff2.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilk.woff2.meta new file mode 100644 index 00000000..ccc912cd --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilk.woff2.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ee628a4dd720b1642b5ce89c0765dc18 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilm.eot b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilm.eot new file mode 100644 index 00000000..758c4cad Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilm.eot differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilm.eot.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilm.eot.meta new file mode 100644 index 00000000..5e9823dd --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilm.eot.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: be0fc1e2f7d4ff74fa5d8fb80b51a1fd +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilp.woff b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilp.woff new file mode 100644 index 00000000..612ec48d Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilp.woff differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilp.woff.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilp.woff.meta new file mode 100644 index 00000000..1915bffe --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilp.woff.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2ab22e527f191eb43a335e4ca2add5d5 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilq.woff2 b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilq.woff2 new file mode 100644 index 00000000..e3665bcf Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilq.woff2 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilq.woff2.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilq.woff2.meta new file mode 100644 index 00000000..9e61dec7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilq.woff2.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f57ef6b5a7d98a148a3685b77897a4a6 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilr.eot b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilr.eot new file mode 100644 index 00000000..a2a2dacb Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilr.eot differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilr.eot.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilr.eot.meta new file mode 100644 index 00000000..ae2e85ff --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilr.eot.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5862d5777b8c4d14fbd891b322348366 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilu.woff b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilu.woff new file mode 100644 index 00000000..93b78345 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilu.woff differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilu.woff.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilu.woff.meta new file mode 100644 index 00000000..f5d88515 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilu.woff.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 41bd4dff15246284fa34e70705c8d12d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilv.woff2 b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilv.woff2 new file mode 100644 index 00000000..61555157 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilv.woff2 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilv.woff2.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilv.woff2.meta new file mode 100644 index 00000000..e5b6ae05 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilv.woff2.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c5e23129388a6c1448a9757b6e29f73e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilw.woff b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilw.woff new file mode 100644 index 00000000..f5763765 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilw.woff differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilw.woff.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilw.woff.meta new file mode 100644 index 00000000..80d62326 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilw.woff.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: be08af1eb1128764196d5dce5c24ad77 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilx.eot b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilx.eot new file mode 100644 index 00000000..78989954 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilx.eot differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilx.eot.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilx.eot.meta new file mode 100644 index 00000000..e891abe2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilx.eot.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c95073c82fbaeed4d9f0ad53e70e777a +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilz.woff b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilz.woff new file mode 100644 index 00000000..0cdba3d8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilz.woff differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilz.woff.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilz.woff.meta new file mode 100644 index 00000000..e39b17b8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7ilz.woff.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f2696d1c3084efd428c1a0a0210907e2 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im0.woff2 b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im0.woff2 new file mode 100644 index 00000000..f888a244 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im0.woff2 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im0.woff2.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im0.woff2.meta new file mode 100644 index 00000000..149fbf73 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im0.woff2.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c03de88edf30eeb44bd3f4ba6dde8bb6 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im1.eot b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im1.eot new file mode 100644 index 00000000..eac46e85 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im1.eot differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im1.eot.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im1.eot.meta new file mode 100644 index 00000000..9da7aa6f --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im1.eot.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9d30d7ad1fbbb3a428628581675cc1b0 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im4.woff b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im4.woff new file mode 100644 index 00000000..61003c39 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im4.woff differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im4.woff.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im4.woff.meta new file mode 100644 index 00000000..fb70016b --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im4.woff.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 62ccc9c510c7c5141a1714c2488cf70f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im5.woff2 b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im5.woff2 new file mode 100644 index 00000000..a557a5ce Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im5.woff2 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im5.woff2.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im5.woff2.meta new file mode 100644 index 00000000..cc5b32f2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im5.woff2.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8e72411e8de220a4092d7bacaabd5132 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im6.eot b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im6.eot new file mode 100644 index 00000000..82f27fd7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im6.eot differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im6.eot.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im6.eot.meta new file mode 100644 index 00000000..389843d0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im6.eot.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9b56258c2e359d74da26f1fbfa361669 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im9.woff2 b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im9.woff2 new file mode 100644 index 00000000..707b6c01 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im9.woff2 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im9.woff2.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im9.woff2.meta new file mode 100644 index 00000000..55e53ae7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_h35o7im9.woff2.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9f0cf9fd9e4a5a04899d723ec2ae52f1 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_nj998s.mp3 b/wb_unity_pro/Assets/ART/base/common/ui/Common_nj998s.mp3 new file mode 100644 index 00000000..c256c438 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/common/ui/Common_nj998s.mp3 differ diff --git a/wb_unity_pro/Assets/ART/base/common/ui/Common_nj998s.mp3.meta b/wb_unity_pro/Assets/ART/base/common/ui/Common_nj998s.mp3.meta new file mode 100644 index 00000000..65fc8005 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/common/ui/Common_nj998s.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3e22ae82bf2cbf343ad2c3d241ab0c73 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby.meta b/wb_unity_pro/Assets/ART/base/lobby.meta new file mode 100644 index 00000000..2957bfe4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cd5070ec50c9da645881de3ac7de35d2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui.meta b/wb_unity_pro/Assets/ART/base/lobby/ui.meta new file mode 100644 index 00000000..5a614826 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c73935e35c150834e81a1db1c4b02c26 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0.png new file mode 100644 index 00000000..730ae66d Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0.png.meta new file mode 100644 index 00000000..5d3bb4d2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 5b8e798641880274a81cfce7f2027429 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_1.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_1.png new file mode 100644 index 00000000..7a248955 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_1.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_1.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_1.png.meta new file mode 100644 index 00000000..59856b68 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_1.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 7317b761fa864e14b8ab4362ea1ffa08 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_2.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_2.png new file mode 100644 index 00000000..23f74b61 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_2.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_2.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_2.png.meta new file mode 100644 index 00000000..412a81cf --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_2.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 1abaa36f5d599a4438c1157ea4c4ef0f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_3.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_3.png new file mode 100644 index 00000000..bf230663 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_3.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_3.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_3.png.meta new file mode 100644 index 00000000..ad1bbc60 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_3.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: a695411837539c24cb617f2d3abf5fd9 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_4.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_4.png new file mode 100644 index 00000000..bd582d2f Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_4.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_4.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_4.png.meta new file mode 100644 index 00000000..5c280b5f --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_4.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 3d4ae6810bfec0d418c53c6455c9566c +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_5.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_5.png new file mode 100644 index 00000000..782d0ff5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_5.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_5.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_5.png.meta new file mode 100644 index 00000000..c461c74c --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_5.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: a0b6d63778084324e824f13fabf5736f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_6.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_6.png new file mode 100644 index 00000000..06b07b9c Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_6.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_6.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_6.png.meta new file mode 100644 index 00000000..171b1ca7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_6.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 4e1f91cf03e7f7e48afb58d2021af5f9 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_7.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_7.png new file mode 100644 index 00000000..1d8b9bc2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_7.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_7.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_7.png.meta new file mode 100644 index 00000000..ffd2dd18 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_7.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 471f312994e6cf14fb498c5e2dae6139 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_8.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_8.png new file mode 100644 index 00000000..1c26cf9c Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_8.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_8.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_8.png.meta new file mode 100644 index 00000000..609142a5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_8.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 5c7a2c314008d4a44b5d5cf52bd6841c +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_9.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_9.png new file mode 100644 index 00000000..d2e20717 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_9.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_9.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_9.png.meta new file mode 100644 index 00000000..a57b1fa5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas0_9.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 33e431d5d531bfa4ca088c16e422ed58 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_h35o7csf.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_h35o7csf.png new file mode 100644 index 00000000..9925c7be Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_h35o7csf.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_h35o7csf.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_h35o7csf.png.meta new file mode 100644 index 00000000..c1444ce1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_h35o7csf.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: c513820f9725eba498251f24f7dd9ff2 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_h35o7csi.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_h35o7csi.png new file mode 100644 index 00000000..d12f2ee2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_h35o7csi.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_h35o7csi.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_h35o7csi.png.meta new file mode 100644 index 00000000..d96fa48c --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_h35o7csi.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 602afe82c7fe631448d096860053a95a +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_h35o7csj.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_h35o7csj.png new file mode 100644 index 00000000..e40cc4e5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_h35o7csj.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_h35o7csj.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_h35o7csj.png.meta new file mode 100644 index 00000000..791827a1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_h35o7csj.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 2c29e23c2bf98ef459c651b68ff2505d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_j046clu.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_j046clu.png new file mode 100644 index 00000000..eccf1a1d Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_j046clu.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_j046clu.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_j046clu.png.meta new file mode 100644 index 00000000..54f1ad20 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_j046clu.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 82b5eb793a40447479db8698d97e50d6 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87csq.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87csq.png new file mode 100644 index 00000000..18d21ef7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87csq.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87csq.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87csq.png.meta new file mode 100644 index 00000000..5038ccb3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87csq.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 0f7e4751c7617d04d88f0656f8dacbd2 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87csr.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87csr.png new file mode 100644 index 00000000..9cc48e33 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87csr.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87csr.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87csr.png.meta new file mode 100644 index 00000000..abd5ab4f --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87csr.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: f51ea6e9ffe4d4f48a998c979a75c525 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87css.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87css.png new file mode 100644 index 00000000..571575d5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87css.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87css.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87css.png.meta new file mode 100644 index 00000000..977ef414 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87css.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 9c56f7df8dcf1ec4481e06af535b2ef4 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87cst.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87cst.png new file mode 100644 index 00000000..c8a985ce Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87cst.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87cst.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87cst.png.meta new file mode 100644 index 00000000..fb89bc56 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_n2h87cst.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 9f5db38d56a975e40aed484a255f6fc3 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_xyf8bm.png b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_xyf8bm.png new file mode 100644 index 00000000..e86fdf48 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_xyf8bm.png differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_xyf8bm.png.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_xyf8bm.png.meta new file mode 100644 index 00000000..c32be58e --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_atlas_xyf8bm.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: c38ab368956c7264cbac086e24ea3bce +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_fui.bytes b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_fui.bytes new file mode 100644 index 00000000..872b5121 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_fui.bytes.meta b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_fui.bytes.meta new file mode 100644 index 00000000..6dd7562f --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/lobby/ui/Lobby_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d6995fbe679699d44af24e85f11ce9bd +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/login.meta b/wb_unity_pro/Assets/ART/base/login.meta new file mode 100644 index 00000000..d7d67631 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/login.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 559636f3fdf254e4e9b5689363abb8e8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/login/ui.meta b/wb_unity_pro/Assets/ART/base/login/ui.meta new file mode 100644 index 00000000..88669861 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/login/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5ac9447a3295dc44785fc9d8c20fb7d9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/login/ui/Login_atlas0.png b/wb_unity_pro/Assets/ART/base/login/ui/Login_atlas0.png new file mode 100644 index 00000000..893565ff Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/login/ui/Login_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/base/login/ui/Login_atlas0.png.meta b/wb_unity_pro/Assets/ART/base/login/ui/Login_atlas0.png.meta new file mode 100644 index 00000000..3e7f15c1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/login/ui/Login_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 4c303399cbbfce041b05de0f48c540f8 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/login/ui/Login_fui.bytes b/wb_unity_pro/Assets/ART/base/login/ui/Login_fui.bytes new file mode 100644 index 00000000..fff4781a Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/login/ui/Login_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/base/login/ui/Login_fui.bytes.meta b/wb_unity_pro/Assets/ART/base/login/ui/Login_fui.bytes.meta new file mode 100644 index 00000000..9d2fe64c --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/login/ui/Login_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c6e59ac7db9d0a94f94b475f4babc358 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_majiang.meta b/wb_unity_pro/Assets/ART/base/main_majiang.meta new file mode 100644 index 00000000..94e75792 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_majiang.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9c53e99b61b6a5e43adad1e4f073ad2a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/bg.meta b/wb_unity_pro/Assets/ART/base/main_majiang/bg.meta new file mode 100644 index 00000000..e41526e7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_majiang/bg.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 32cd5ee3d8bbf72428050e85d4d8c1cd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/bg/bg1.png b/wb_unity_pro/Assets/ART/base/main_majiang/bg/bg1.png new file mode 100644 index 00000000..49377423 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_majiang/bg/bg1.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/bg/bg1.png.meta b/wb_unity_pro/Assets/ART/base/main_majiang/bg/bg1.png.meta new file mode 100644 index 00000000..efe0e89c --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_majiang/bg/bg1.png.meta @@ -0,0 +1,128 @@ +fileFormatVersion: 2 +guid: 9689342f0f765c746ab86cb294e0a558 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: base/main_majiang/de3462a6bae19a6c7308e43e0192028f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/bg/bg2.png b/wb_unity_pro/Assets/ART/base/main_majiang/bg/bg2.png new file mode 100644 index 00000000..898e4943 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_majiang/bg/bg2.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/bg/bg2.png.meta b/wb_unity_pro/Assets/ART/base/main_majiang/bg/bg2.png.meta new file mode 100644 index 00000000..d6d1bcd7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_majiang/bg/bg2.png.meta @@ -0,0 +1,128 @@ +fileFormatVersion: 2 +guid: 17da55a3cede6da4781586461bb065fe +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: base/main_majiang/436191dfae4c9988ef8cf1effa8b6742 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/bg/bg3.png b/wb_unity_pro/Assets/ART/base/main_majiang/bg/bg3.png new file mode 100644 index 00000000..a87c69a2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_majiang/bg/bg3.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/bg/bg3.png.meta b/wb_unity_pro/Assets/ART/base/main_majiang/bg/bg3.png.meta new file mode 100644 index 00000000..81afb9cc --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_majiang/bg/bg3.png.meta @@ -0,0 +1,128 @@ +fileFormatVersion: 2 +guid: b7193f148a7adff48969cbd5733ec958 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: base/main_majiang/703f4bfe3ba7f8e7e0643a2f1694170f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui.meta b/wb_unity_pro/Assets/ART/base/main_majiang/ui.meta new file mode 100644 index 00000000..5c98c0d7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_majiang/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 213b32c585b66f943aef6d563a4e4116 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/MajiangCard3d_atlas0.png b/wb_unity_pro/Assets/ART/base/main_majiang/ui/MajiangCard3d_atlas0.png new file mode 100644 index 00000000..e078dbbb Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_majiang/ui/MajiangCard3d_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/MajiangCard3d_atlas0.png.meta b/wb_unity_pro/Assets/ART/base/main_majiang/ui/MajiangCard3d_atlas0.png.meta new file mode 100644 index 00000000..487efab8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_majiang/ui/MajiangCard3d_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 8757df55ce033f043b0fab1ef9e2c5fa +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/MajiangCard3d_fui.bytes b/wb_unity_pro/Assets/ART/base/main_majiang/ui/MajiangCard3d_fui.bytes new file mode 100644 index 00000000..f8239774 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_majiang/ui/MajiangCard3d_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/MajiangCard3d_fui.bytes.meta b/wb_unity_pro/Assets/ART/base/main_majiang/ui/MajiangCard3d_fui.bytes.meta new file mode 100644 index 00000000..c1504359 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_majiang/ui/MajiangCard3d_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7e110db81c0b5cc43a63094e10d01ad9 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0.png b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0.png new file mode 100644 index 00000000..79adc926 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0.png.meta b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0.png.meta new file mode 100644 index 00000000..22410103 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: fad14995ccbeef64dae917a6cd00579a +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0_1.png b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0_1.png new file mode 100644 index 00000000..63350c29 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0_1.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0_1.png.meta b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0_1.png.meta new file mode 100644 index 00000000..cfd20695 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0_1.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 431f7e2d464ddc942ad915022cabcefd +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0_2.png b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0_2.png new file mode 100644 index 00000000..4200ac1f Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0_2.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0_2.png.meta b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0_2.png.meta new file mode 100644 index 00000000..95139500 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0_2.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 7055831bde7c93045aa6190395e4773b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0_3.png b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0_3.png new file mode 100644 index 00000000..66740d19 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0_3.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0_3.png.meta b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0_3.png.meta new file mode 100644 index 00000000..d1f707d6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_atlas0_3.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 24ee6d91cbcc3b342a2ef13543161f2b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_fui.bytes b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_fui.bytes new file mode 100644 index 00000000..45bdd0e3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_fui.bytes.meta b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_fui.bytes.meta new file mode 100644 index 00000000..828134b2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_majiang/ui/main_majiang_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 326fa64ee0dd8b94aa86fa1978e56fa5 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_pokemajiang.meta b/wb_unity_pro/Assets/ART/base/main_pokemajiang.meta new file mode 100644 index 00000000..71fb901b --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_pokemajiang.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9a4df2e6d7952354aa4b1d222e787805 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui.meta b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui.meta new file mode 100644 index 00000000..62c2e640 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8b83e6fb16209224db2e6ebf887b5a1f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0.png b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0.png new file mode 100644 index 00000000..98949676 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0.png.meta b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0.png.meta new file mode 100644 index 00000000..4a134f63 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 0cd3a658edc017049b1e8b434710df61 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_1.png b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_1.png new file mode 100644 index 00000000..65b7de3a Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_1.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_1.png.meta b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_1.png.meta new file mode 100644 index 00000000..47b78f98 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_1.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: b558a000230af4d42960609fdeb17b40 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_2.png b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_2.png new file mode 100644 index 00000000..38101e21 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_2.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_2.png.meta b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_2.png.meta new file mode 100644 index 00000000..8dae9173 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_2.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 897c52b28625e4342b5bd3de12fe052f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_3.png b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_3.png new file mode 100644 index 00000000..dcf05514 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_3.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_3.png.meta b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_3.png.meta new file mode 100644 index 00000000..2333b598 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_3.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 14815c09098934441a9481d88427cdf9 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_4.png b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_4.png new file mode 100644 index 00000000..ab6bce2a Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_4.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_4.png.meta b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_4.png.meta new file mode 100644 index 00000000..2d005bf0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_atlas0_4.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 5298507cf1d0239489b2230a95a9495e +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_fui.bytes b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_fui.bytes new file mode 100644 index 00000000..cfa2ff5c Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_fui.bytes.meta b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_fui.bytes.meta new file mode 100644 index 00000000..6ce90551 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_pokemajiang/ui/Main_PokeMaJiang_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: eedaeb96e38c9114d8300488becd5715 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_poker.meta b/wb_unity_pro/Assets/ART/base/main_poker.meta new file mode 100644 index 00000000..c43e3f94 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_poker.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1ede4264d63410344b51bd8d58ec5ec3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_poker/ui.meta b/wb_unity_pro/Assets/ART/base/main_poker/ui.meta new file mode 100644 index 00000000..4c3d8d9a --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_poker/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a681ac91b9a6fba48975c0364f345c79 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_atlas0.png b/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_atlas0.png new file mode 100644 index 00000000..938cffef Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_atlas0.png.meta b/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_atlas0.png.meta new file mode 100644 index 00000000..eaba400f --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 676124bd5d9240f41af30300764e9b9e +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_fui.bytes b/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_fui.bytes new file mode 100644 index 00000000..0c88fafe Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_fui.bytes.meta b/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_fui.bytes.meta new file mode 100644 index 00000000..175da03a --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_poker/ui/Main_Poker_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c83d989b47d040d4db2acb46b32495c4 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_zipai.meta b/wb_unity_pro/Assets/ART/base/main_zipai.meta new file mode 100644 index 00000000..ff8669c0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_zipai.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1000b9d2228ad36498a67c5e3852dd00 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_zipai/ui.meta b/wb_unity_pro/Assets/ART/base/main_zipai/ui.meta new file mode 100644 index 00000000..154769cf --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_zipai/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6f1ec3af1a1c1144782eec3a48ad2120 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_atlas0.png b/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_atlas0.png new file mode 100644 index 00000000..aed1a7de Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_atlas0.png.meta b/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_atlas0.png.meta new file mode 100644 index 00000000..4e803b61 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: d074815221c25a44795ed02963c13632 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_atlas0_1.png b/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_atlas0_1.png new file mode 100644 index 00000000..5b4641b2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_atlas0_1.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_atlas0_1.png.meta b/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_atlas0_1.png.meta new file mode 100644 index 00000000..9ae857f0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_atlas0_1.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: cb39eac8c9e5aa94dbaf42da326dce39 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_atlas0_2.png b/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_atlas0_2.png new file mode 100644 index 00000000..726f6b68 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_atlas0_2.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_atlas0_2.png.meta b/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_atlas0_2.png.meta new file mode 100644 index 00000000..116150e7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_atlas0_2.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 036a4d933a3585347ba3000f99dafaf9 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_fui.bytes b/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_fui.bytes new file mode 100644 index 00000000..17de0a0d Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_fui.bytes.meta b/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_fui.bytes.meta new file mode 100644 index 00000000..a7d11717 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_zipai/ui/Main_RunBeard_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: eb32bb867a86245469b89885feeabddc +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_zipaimajiang.meta b/wb_unity_pro/Assets/ART/base/main_zipaimajiang.meta new file mode 100644 index 00000000..6120d6d0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_zipaimajiang.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0c78fae6566a83a488c4980368d2ab29 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui.meta b/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui.meta new file mode 100644 index 00000000..99580e76 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a7eb8f6a6885d6b40b070696faab2188 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_atlas0.png b/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_atlas0.png new file mode 100644 index 00000000..aa41fb6b Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_atlas0.png.meta b/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_atlas0.png.meta new file mode 100644 index 00000000..719c2380 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: a59cc3b621c896946bcb47de4f2899ef +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_atlas0_1.png b/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_atlas0_1.png new file mode 100644 index 00000000..447f3ef1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_atlas0_1.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_atlas0_1.png.meta b/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_atlas0_1.png.meta new file mode 100644 index 00000000..a6882ab5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_atlas0_1.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 38d009f1a7f38d94fb565fd19be32b8f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_atlas0_2.png b/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_atlas0_2.png new file mode 100644 index 00000000..a220ee7d Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_atlas0_2.png differ diff --git a/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_atlas0_2.png.meta b/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_atlas0_2.png.meta new file mode 100644 index 00000000..f532882a --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_atlas0_2.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: e2ce95f02423f8946b65750575ba4da4 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_fui.bytes b/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_fui.bytes new file mode 100644 index 00000000..aa1b0492 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_fui.bytes.meta b/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_fui.bytes.meta new file mode 100644 index 00000000..d133851a --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/main_zipaimajiang/ui/Main_RunBeardMaJiang_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d58a5165a61fd4a409ef7e0d0b8aec09 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/newgroup.meta b/wb_unity_pro/Assets/ART/base/newgroup.meta new file mode 100644 index 00000000..bf70cf64 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/newgroup.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e55516472cbaf4f45ae5b11ae71d3139 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/newgroup/ui.meta b/wb_unity_pro/Assets/ART/base/newgroup/ui.meta new file mode 100644 index 00000000..ccff4cac --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/newgroup/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4c765b4358753844dbd3b5aee2f13f09 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/newgroup/ui/FGAssist_atlas0.png b/wb_unity_pro/Assets/ART/base/newgroup/ui/FGAssist_atlas0.png new file mode 100644 index 00000000..868484d6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/newgroup/ui/FGAssist_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/base/newgroup/ui/FGAssist_atlas0.png.meta b/wb_unity_pro/Assets/ART/base/newgroup/ui/FGAssist_atlas0.png.meta new file mode 100644 index 00000000..2dfd6992 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/newgroup/ui/FGAssist_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 4f1aa27d131966c4cbd737cdddbc0bd1 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/newgroup/ui/FGAssist_fui.bytes b/wb_unity_pro/Assets/ART/base/newgroup/ui/FGAssist_fui.bytes new file mode 100644 index 00000000..6716307b Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/newgroup/ui/FGAssist_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/base/newgroup/ui/FGAssist_fui.bytes.meta b/wb_unity_pro/Assets/ART/base/newgroup/ui/FGAssist_fui.bytes.meta new file mode 100644 index 00000000..bbdd08f9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/newgroup/ui/FGAssist_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 617604ed45b05724c84d2b4fc8ea71a1 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas0.png b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas0.png new file mode 100644 index 00000000..51726e7d Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas0.png.meta b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas0.png.meta new file mode 100644 index 00000000..f0cb2e82 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 582931ddf262f0a4186586cb35e2c2d6 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas0_1.png b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas0_1.png new file mode 100644 index 00000000..d4ab9ce8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas0_1.png differ diff --git a/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas0_1.png.meta b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas0_1.png.meta new file mode 100644 index 00000000..8f23783c --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas0_1.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 20a77369847323b46a601ef04f3c0252 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas1.png b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas1.png new file mode 100644 index 00000000..af3c97e2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas1.png differ diff --git a/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas1.png.meta b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas1.png.meta new file mode 100644 index 00000000..e2fb1501 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas1.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 34bb63cb7a9d9f34c84e07bc344ac150 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas2.png b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas2.png new file mode 100644 index 00000000..a8ee0829 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas2.png differ diff --git a/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas2.png.meta b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas2.png.meta new file mode 100644 index 00000000..4463453b --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_atlas2.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 1a06ff3302b584548810cf8aa6b14027 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_fui.bytes b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_fui.bytes new file mode 100644 index 00000000..7dd22f14 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_fui.bytes.meta b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_fui.bytes.meta new file mode 100644 index 00000000..461c2b63 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/newgroup/ui/NewGroup_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8fe0aa8fd6f91844282b645d140a5664 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/rank.meta b/wb_unity_pro/Assets/ART/base/rank.meta new file mode 100644 index 00000000..75d78888 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/rank.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 625049fa71756e249b2b78d97325380e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/rank/ui.meta b/wb_unity_pro/Assets/ART/base/rank/ui.meta new file mode 100644 index 00000000..4dcef898 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/rank/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 481c3f617a7d0b74b836e1e9f6db7ec5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/rank/ui/Rank_atlas0.png b/wb_unity_pro/Assets/ART/base/rank/ui/Rank_atlas0.png new file mode 100644 index 00000000..dec87932 Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/rank/ui/Rank_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/base/rank/ui/Rank_atlas0.png.meta b/wb_unity_pro/Assets/ART/base/rank/ui/Rank_atlas0.png.meta new file mode 100644 index 00000000..ac614f5d --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/rank/ui/Rank_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: e929a91afa539db4e88d2a6fe13d47d5 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/base/rank/ui/Rank_fui.bytes b/wb_unity_pro/Assets/ART/base/rank/ui/Rank_fui.bytes new file mode 100644 index 00000000..0525254b Binary files /dev/null and b/wb_unity_pro/Assets/ART/base/rank/ui/Rank_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/base/rank/ui/Rank_fui.bytes.meta b/wb_unity_pro/Assets/ART/base/rank/ui/Rank_fui.bytes.meta new file mode 100644 index 00000000..156556d5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/base/rank/ui/Rank_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 93e7684e0c6ed284a8fc6ab170eb657b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend.meta b/wb_unity_pro/Assets/ART/extend.meta new file mode 100644 index 00000000..988ea25d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 43d199720f53a074ba1fa8fa6de386d9 +folderAsset: yes +timeCreated: 1501139855 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang.meta b/wb_unity_pro/Assets/ART/extend/majiang.meta new file mode 100644 index 00000000..46195f35 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5776583732633d24188b22a960ac0af7 +folderAsset: yes +timeCreated: 1501139868 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/100zhang.meta b/wb_unity_pro/Assets/ART/extend/majiang/100zhang.meta new file mode 100644 index 00000000..673bc03c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/100zhang.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f0448f65d89feb44aabcd4dd106e9fa3 +folderAsset: yes +timeCreated: 1627885456 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/100zhang/sound.meta b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/sound.meta new file mode 100644 index 00000000..1d2b8a86 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 90a27eec4c0d8f34d9e7ed7f03a7ad30 +folderAsset: yes +timeCreated: 1521443617 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/100zhang/sound/bg.mp3 b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/sound/bg.mp3 new file mode 100644 index 00000000..5c61daf5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/sound/bg.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/100zhang/sound/bg.mp3.meta b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/sound/bg.mp3.meta new file mode 100644 index 00000000..d147e8bb --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/sound/bg.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b253c877f3c820f4583ee6df4036b4b4 +timeCreated: 1517800011 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/100zhang/sound/zhuaniao.mp3 b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/sound/zhuaniao.mp3 new file mode 100644 index 00000000..a4d2a5f2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/sound/zhuaniao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/100zhang/sound/zhuaniao.mp3.meta b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/sound/zhuaniao.mp3.meta new file mode 100644 index 00000000..36f02d04 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/sound/zhuaniao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5a34f37fd72bf5c4392074db33146fad +timeCreated: 1545113299 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui.meta b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui.meta new file mode 100644 index 00000000..105a287c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9fa5a5e5cb6c3e345b117a8d26e86053 +folderAsset: yes +timeCreated: 1627885711 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui/Extend_MJ_100Zhang_atlas0.png b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui/Extend_MJ_100Zhang_atlas0.png new file mode 100644 index 00000000..20e22a3d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui/Extend_MJ_100Zhang_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui/Extend_MJ_100Zhang_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui/Extend_MJ_100Zhang_atlas0.png.meta new file mode 100644 index 00000000..6995593c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui/Extend_MJ_100Zhang_atlas0.png.meta @@ -0,0 +1,100 @@ +fileFormatVersion: 2 +guid: 6f659d1b9aec5384aabd6a28dfd05ed0 +timeCreated: 1628747559 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: 4 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Windows Store Apps + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui/Extend_MJ_100Zhang_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui/Extend_MJ_100Zhang_fui.bytes new file mode 100644 index 00000000..87a01747 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui/Extend_MJ_100Zhang_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui/Extend_MJ_100Zhang_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui/Extend_MJ_100Zhang_fui.bytes.meta new file mode 100644 index 00000000..bdfcf1c8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui/Extend_MJ_100Zhang_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0cf2a2a720b6faa46a4be4f304299a2d +timeCreated: 1628747559 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui/Info_MJ_100Zhang_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui/Info_MJ_100Zhang_fui.bytes new file mode 100644 index 00000000..1db487ad Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui/Info_MJ_100Zhang_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui/Info_MJ_100Zhang_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui/Info_MJ_100Zhang_fui.bytes.meta new file mode 100644 index 00000000..63a7f338 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/100zhang/ui/Info_MJ_100Zhang_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 200eb926e679d8948b3bb5926c4a132b +timeCreated: 1629925726 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/changsha.meta b/wb_unity_pro/Assets/ART/extend/majiang/changsha.meta new file mode 100644 index 00000000..3bdc5da1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/changsha.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7fb8da7e437e32844bc2e506df987a1d +folderAsset: yes +timeCreated: 1509614435 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/changsha/sound.meta b/wb_unity_pro/Assets/ART/extend/majiang/changsha/sound.meta new file mode 100644 index 00000000..405e1132 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/changsha/sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 12aff3b60fbb8374cb10fce702276a46 +folderAsset: yes +timeCreated: 1515480633 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/changsha/sound/bg.mp3 b/wb_unity_pro/Assets/ART/extend/majiang/changsha/sound/bg.mp3 new file mode 100644 index 00000000..fca2f8dc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/changsha/sound/bg.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/changsha/sound/bg.mp3.meta b/wb_unity_pro/Assets/ART/extend/majiang/changsha/sound/bg.mp3.meta new file mode 100644 index 00000000..722794e3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/changsha/sound/bg.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2949b80b825d80147894d0a8c9120f03 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/majiang/changsha/99f3401d306a1541aeb2a379329ac145 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/changsha/sound/zhuaniao.mp3 b/wb_unity_pro/Assets/ART/extend/majiang/changsha/sound/zhuaniao.mp3 new file mode 100644 index 00000000..a4d2a5f2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/changsha/sound/zhuaniao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/changsha/sound/zhuaniao.mp3.meta b/wb_unity_pro/Assets/ART/extend/majiang/changsha/sound/zhuaniao.mp3.meta new file mode 100644 index 00000000..fd2c3abf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/changsha/sound/zhuaniao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: eed15df6dae789a41a726263e8b469b4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/majiang/changsha/2e4aeabf8a30738cbada26f698422c7c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui.meta b/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui.meta new file mode 100644 index 00000000..2b16a104 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 409e0f0bfcd3e6d41b3e5d062e5a8108 +folderAsset: yes +timeCreated: 1509614435 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Extend_MJ_ChangSha_atlas0.png b/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Extend_MJ_ChangSha_atlas0.png new file mode 100644 index 00000000..8a626410 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Extend_MJ_ChangSha_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Extend_MJ_ChangSha_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Extend_MJ_ChangSha_atlas0.png.meta new file mode 100644 index 00000000..10ea27e0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Extend_MJ_ChangSha_atlas0.png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 8a9623958f84dbe448962e77b4f18f74 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 4 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: extend/majiang/changsha/d7829e76d3fb928cdbf041d12e51a83b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Extend_MJ_ChangSha_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Extend_MJ_ChangSha_fui.bytes new file mode 100644 index 00000000..7476410a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Extend_MJ_ChangSha_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Extend_MJ_ChangSha_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Extend_MJ_ChangSha_fui.bytes.meta new file mode 100644 index 00000000..55981108 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Extend_MJ_ChangSha_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 763b53ab87633e04db59811b8fd56c51 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/majiang/changsha/d7829e76d3fb928cdbf041d12e51a83b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Info_MJ_ChangSha_atlas0.png b/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Info_MJ_ChangSha_atlas0.png new file mode 100644 index 00000000..11aee779 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Info_MJ_ChangSha_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Info_MJ_ChangSha_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Info_MJ_ChangSha_atlas0.png.meta new file mode 100644 index 00000000..e69b16cd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Info_MJ_ChangSha_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 70054e44624cd904599e10f6bf03e9c0 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Info_MJ_ChangSha_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Info_MJ_ChangSha_fui.bytes new file mode 100644 index 00000000..e11e5681 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Info_MJ_ChangSha_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Info_MJ_ChangSha_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Info_MJ_ChangSha_fui.bytes.meta new file mode 100644 index 00000000..bcbd4169 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/changsha/ui/Info_MJ_ChangSha_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c341e134c2f14eb4a9522377515bcd50 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/majiang/changsha/08d2d03b44018f8b60ccd534d9259840 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaoshan.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan.meta new file mode 100644 index 00000000..708559e7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5e4d4b2b8821a3c46859ad66f36da54e +folderAsset: yes +timeCreated: 1627885456 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/sound.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/sound.meta new file mode 100644 index 00000000..6826056e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 39377b2f2ebb56c4b9abbde94cae4639 +folderAsset: yes +timeCreated: 1521443617 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/sound/bg.mp3 b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/sound/bg.mp3 new file mode 100644 index 00000000..5c61daf5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/sound/bg.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/sound/bg.mp3.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/sound/bg.mp3.meta new file mode 100644 index 00000000..4ced08ce --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/sound/bg.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: dfea2c1d6398c11438cc4690fea7cbe4 +timeCreated: 1517800011 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/sound/zhuaniao.mp3 b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/sound/zhuaniao.mp3 new file mode 100644 index 00000000..a4d2a5f2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/sound/zhuaniao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/sound/zhuaniao.mp3.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/sound/zhuaniao.mp3.meta new file mode 100644 index 00000000..4a6f30e9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/sound/zhuaniao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d33659276b2786f479bfe2a6e9edf912 +timeCreated: 1545113299 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui.meta new file mode 100644 index 00000000..9690d2ec --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ffa82bdbf44e2204b9b79c95f54c1b78 +folderAsset: yes +timeCreated: 1627885711 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui/Extend_MJ_ChaoShan_atlas0.png b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui/Extend_MJ_ChaoShan_atlas0.png new file mode 100644 index 00000000..20e22a3d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui/Extend_MJ_ChaoShan_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui/Extend_MJ_ChaoShan_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui/Extend_MJ_ChaoShan_atlas0.png.meta new file mode 100644 index 00000000..f5cd765e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui/Extend_MJ_ChaoShan_atlas0.png.meta @@ -0,0 +1,100 @@ +fileFormatVersion: 2 +guid: 88e93119b2f7de9418c2b9683bcdb2c5 +timeCreated: 1628339146 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: 4 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Windows Store Apps + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui/Extend_MJ_ChaoShan_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui/Extend_MJ_ChaoShan_fui.bytes new file mode 100644 index 00000000..0ea37f3d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui/Extend_MJ_ChaoShan_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui/Extend_MJ_ChaoShan_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui/Extend_MJ_ChaoShan_fui.bytes.meta new file mode 100644 index 00000000..fffdfc6f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui/Extend_MJ_ChaoShan_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 503484516b3aa324bb6670791f613166 +timeCreated: 1628339146 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui/Info_MJ_ChaoShan_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui/Info_MJ_ChaoShan_fui.bytes new file mode 100644 index 00000000..ab122412 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui/Info_MJ_ChaoShan_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui/Info_MJ_ChaoShan_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui/Info_MJ_ChaoShan_fui.bytes.meta new file mode 100644 index 00000000..50a7bbf7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaoshan/ui/Info_MJ_ChaoShan_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cea2c41324d1645429e7e61cb713dc27 +timeCreated: 1628339067 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhou.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou.meta new file mode 100644 index 00000000..37d8107a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4bbd0c0c9b835ee43b13446990c18a5a +folderAsset: yes +timeCreated: 1627885456 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/sound.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/sound.meta new file mode 100644 index 00000000..6a3b4b8f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7f79e9e88003a574a98a540d5dd88ea4 +folderAsset: yes +timeCreated: 1521443617 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/sound/bg.mp3 b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/sound/bg.mp3 new file mode 100644 index 00000000..5c61daf5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/sound/bg.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/sound/bg.mp3.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/sound/bg.mp3.meta new file mode 100644 index 00000000..7c22a893 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/sound/bg.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0d0209d66f7df364f95b1bb00c34ee34 +timeCreated: 1517800011 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/sound/zhuaniao.mp3 b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/sound/zhuaniao.mp3 new file mode 100644 index 00000000..a4d2a5f2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/sound/zhuaniao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/sound/zhuaniao.mp3.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/sound/zhuaniao.mp3.meta new file mode 100644 index 00000000..5712ad9c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/sound/zhuaniao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 55b25c7ae64f12e458c8053ea09a48d5 +timeCreated: 1545113299 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui.meta new file mode 100644 index 00000000..bde534c9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2fc6389c6932eda41ac37e8426348f15 +folderAsset: yes +timeCreated: 1627885711 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui/Extend_MJ_ChaoZhou_atlas0.png b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui/Extend_MJ_ChaoZhou_atlas0.png new file mode 100644 index 00000000..20e22a3d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui/Extend_MJ_ChaoZhou_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui/Extend_MJ_ChaoZhou_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui/Extend_MJ_ChaoZhou_atlas0.png.meta new file mode 100644 index 00000000..eda6fa1f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui/Extend_MJ_ChaoZhou_atlas0.png.meta @@ -0,0 +1,100 @@ +fileFormatVersion: 2 +guid: 3efbd732357171843919a4c5f35de9a4 +timeCreated: 1628747554 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: 4 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Windows Store Apps + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui/Extend_MJ_ChaoZhou_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui/Extend_MJ_ChaoZhou_fui.bytes new file mode 100644 index 00000000..ce983af7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui/Extend_MJ_ChaoZhou_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui/Extend_MJ_ChaoZhou_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui/Extend_MJ_ChaoZhou_fui.bytes.meta new file mode 100644 index 00000000..154ff19f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui/Extend_MJ_ChaoZhou_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 311236ea7264362419ede50a5c863eec +timeCreated: 1628747559 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui/Info_MJ_ChaoZhou_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui/Info_MJ_ChaoZhou_fui.bytes new file mode 100644 index 00000000..c6d1a781 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui/Info_MJ_ChaoZhou_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui/Info_MJ_ChaoZhou_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui/Info_MJ_ChaoZhou_fui.bytes.meta new file mode 100644 index 00000000..509b24f6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaozhou/ui/Info_MJ_ChaoZhou_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9832df5badaeab24fab74a3eaace1e39 +timeCreated: 1628747748 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui.meta new file mode 100644 index 00000000..0209b974 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8c7a2ad7fb56b404798c0ed55c5d7607 +folderAsset: yes +timeCreated: 1627885456 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/sound.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/sound.meta new file mode 100644 index 00000000..f27ec638 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 87badea94e6f5a840875b948955f21a9 +folderAsset: yes +timeCreated: 1521443617 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/sound/bg.mp3 b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/sound/bg.mp3 new file mode 100644 index 00000000..5c61daf5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/sound/bg.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/sound/bg.mp3.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/sound/bg.mp3.meta new file mode 100644 index 00000000..c6af92e8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/sound/bg.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0d427b8febe016b4193ad6dd7650dec3 +timeCreated: 1517800011 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/sound/zhuaniao.mp3 b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/sound/zhuaniao.mp3 new file mode 100644 index 00000000..a4d2a5f2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/sound/zhuaniao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/sound/zhuaniao.mp3.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/sound/zhuaniao.mp3.meta new file mode 100644 index 00000000..e53cf837 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/sound/zhuaniao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 15a3632db77341f4783f91c234d29ba4 +timeCreated: 1545113299 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/ui.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/ui.meta new file mode 100644 index 00000000..89868bd3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 95245c09f893c4e46a9d5a99af0820a8 +folderAsset: yes +timeCreated: 1627885711 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/ui/Extend_MJ_ChaoZhouGui_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/ui/Extend_MJ_ChaoZhouGui_fui.bytes new file mode 100644 index 00000000..18c83c28 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/ui/Extend_MJ_ChaoZhouGui_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/ui/Extend_MJ_ChaoZhouGui_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/ui/Extend_MJ_ChaoZhouGui_fui.bytes.meta new file mode 100644 index 00000000..006d075f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/ui/Extend_MJ_ChaoZhouGui_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6328fc7e1bce352419d2ddfdae5db5d8 +timeCreated: 1628931190 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/ui/Info_MJ_ChaoZhouGui_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/ui/Info_MJ_ChaoZhouGui_fui.bytes new file mode 100644 index 00000000..fac62ed2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/ui/Info_MJ_ChaoZhouGui_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/ui/Info_MJ_ChaoZhouGui_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/ui/Info_MJ_ChaoZhouGui_fui.bytes.meta new file mode 100644 index 00000000..dde20384 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/chaozhougui/ui/Info_MJ_ChaoZhouGui_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9e6f35cea36b12b4d89a8f05f8dc61e7 +timeCreated: 1628931190 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/fuzhou.meta b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou.meta new file mode 100644 index 00000000..92fcf8bd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4386e7f7f007d394e9c7d27b4c186521 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui.meta b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui.meta new file mode 100644 index 00000000..4c794b88 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4f3eee771cd4ce5419709905bee6885c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Extend_MJ_FuZhou_atlas0.png b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Extend_MJ_FuZhou_atlas0.png new file mode 100644 index 00000000..9e2d9e35 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Extend_MJ_FuZhou_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Extend_MJ_FuZhou_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Extend_MJ_FuZhou_atlas0.png.meta new file mode 100644 index 00000000..7b1bfcc0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Extend_MJ_FuZhou_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 213ba09ba2d70bb48920cffbe8a9fc22 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Extend_MJ_FuZhou_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Extend_MJ_FuZhou_fui.bytes new file mode 100644 index 00000000..c0c30e8d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Extend_MJ_FuZhou_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Extend_MJ_FuZhou_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Extend_MJ_FuZhou_fui.bytes.meta new file mode 100644 index 00000000..3a0342c7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Extend_MJ_FuZhou_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 977639736e037f549842799150da7961 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Info_MJ_FuZhou_atlas0.png b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Info_MJ_FuZhou_atlas0.png new file mode 100644 index 00000000..5d41ad1e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Info_MJ_FuZhou_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Info_MJ_FuZhou_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Info_MJ_FuZhou_atlas0.png.meta new file mode 100644 index 00000000..c97e372c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Info_MJ_FuZhou_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 4161332762a7ef8498e7e1cdac564aff +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Info_MJ_FuZhou_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Info_MJ_FuZhou_fui.bytes new file mode 100644 index 00000000..6f3e9d32 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Info_MJ_FuZhou_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Info_MJ_FuZhou_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Info_MJ_FuZhou_fui.bytes.meta new file mode 100644 index 00000000..49007604 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/fuzhou/ui/Info_MJ_FuZhou_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5fd100350e390004a9c9e5215dd41665 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/gejiu.meta b/wb_unity_pro/Assets/ART/extend/majiang/gejiu.meta new file mode 100644 index 00000000..d86dc6de --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/gejiu.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2ab2536cb66dce14089cb73f492c4b67 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/gejiu/ui.meta b/wb_unity_pro/Assets/ART/extend/majiang/gejiu/ui.meta new file mode 100644 index 00000000..73ddec97 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/gejiu/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 527b4ab5fb90f464baf8e4fdb3eca796 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/gejiu/ui/Extend_MJ_GeJiu_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/gejiu/ui/Extend_MJ_GeJiu_fui.bytes new file mode 100644 index 00000000..d4121474 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/gejiu/ui/Extend_MJ_GeJiu_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/gejiu/ui/Extend_MJ_GeJiu_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/gejiu/ui/Extend_MJ_GeJiu_fui.bytes.meta new file mode 100644 index 00000000..3bc21c8c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/gejiu/ui/Extend_MJ_GeJiu_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 89e1b69bb2957d4489ff0939dff46d73 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/majiang/gejiu/fac3067316b184a272e1501ec29be196 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/gejiu/ui/Info_MJ_GeJiu_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/gejiu/ui/Info_MJ_GeJiu_fui.bytes new file mode 100644 index 00000000..46185f65 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/gejiu/ui/Info_MJ_GeJiu_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/gejiu/ui/Info_MJ_GeJiu_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/gejiu/ui/Info_MJ_GeJiu_fui.bytes.meta new file mode 100644 index 00000000..ab150a0e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/gejiu/ui/Info_MJ_GeJiu_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 40672e23972a53e41bfe5bfd3bd2b712 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/majiang/gejiu/344df28c73e7ad8a0815d69943064106 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/hongzhong.meta b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong.meta new file mode 100644 index 00000000..da968aa3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a05e72c1e57fa7f498fc5374a41787a0 +folderAsset: yes +timeCreated: 1520491975 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/sound.meta b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/sound.meta new file mode 100644 index 00000000..0e6c8e13 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5b0db3c75ce63714b8c1f082c544ade7 +folderAsset: yes +timeCreated: 1521443617 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/sound/bg.mp3 b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/sound/bg.mp3 new file mode 100644 index 00000000..fca2f8dc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/sound/bg.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/sound/bg.mp3.meta b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/sound/bg.mp3.meta new file mode 100644 index 00000000..ca6764e2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/sound/bg.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 758baad650289674fba466d554e0b2fd +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/majiang/hongzhong/43b9d943384e0db8f62e8ab2ca59c131 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/sound/zhuaniao.mp3 b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/sound/zhuaniao.mp3 new file mode 100644 index 00000000..a4d2a5f2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/sound/zhuaniao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/sound/zhuaniao.mp3.meta b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/sound/zhuaniao.mp3.meta new file mode 100644 index 00000000..b962bedd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/sound/zhuaniao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5a7fe8bf286ca25478b56a055f5f3eb2 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/majiang/hongzhong/d0f1a6d1bbc2f9ebfb57b919eee4bfb4 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/ui.meta b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/ui.meta new file mode 100644 index 00000000..6bdf8f24 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 000d29f99432a5145b5ded0d882414c5 +folderAsset: yes +timeCreated: 1520491975 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/ui/Extend_MJ_HongZhong_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/ui/Extend_MJ_HongZhong_fui.bytes new file mode 100644 index 00000000..dd70e539 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/ui/Extend_MJ_HongZhong_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/ui/Extend_MJ_HongZhong_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/ui/Extend_MJ_HongZhong_fui.bytes.meta new file mode 100644 index 00000000..45cbf121 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/ui/Extend_MJ_HongZhong_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6e40cd0dde6d1444babc72502bec31fe +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/majiang/hongzhong/db5d1672696260bbd50561d8f51ff774 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/ui/Info_MJ_HongZhong_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/ui/Info_MJ_HongZhong_fui.bytes new file mode 100644 index 00000000..a4298350 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/ui/Info_MJ_HongZhong_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/ui/Info_MJ_HongZhong_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/ui/Info_MJ_HongZhong_fui.bytes.meta new file mode 100644 index 00000000..aa4a5ea0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/hongzhong/ui/Info_MJ_HongZhong_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f6177db4c54043548924305b7ea7912d +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/majiang/hongzhong/78d6751c5f2f854f108ded5e59fb2dcb + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/jinxi.meta b/wb_unity_pro/Assets/ART/extend/majiang/jinxi.meta new file mode 100644 index 00000000..ea5140cc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/jinxi.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 83df335df5acc1944b0868077059f0de +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui.meta b/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui.meta new file mode 100644 index 00000000..705d7558 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 546c7736692fe5249bda1f06f0730040 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Extend_MJ_JinXi_atlas0.png b/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Extend_MJ_JinXi_atlas0.png new file mode 100644 index 00000000..9e2d9e35 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Extend_MJ_JinXi_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Extend_MJ_JinXi_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Extend_MJ_JinXi_atlas0.png.meta new file mode 100644 index 00000000..1ceaef02 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Extend_MJ_JinXi_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: e939f366f50d9cb42a8e617df49689fa +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Extend_MJ_JinXi_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Extend_MJ_JinXi_fui.bytes new file mode 100644 index 00000000..c225954d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Extend_MJ_JinXi_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Extend_MJ_JinXi_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Extend_MJ_JinXi_fui.bytes.meta new file mode 100644 index 00000000..b9afeacc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Extend_MJ_JinXi_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5734d833ddcbfe640848444614f938f0 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Info_MJ_JinXi_atlas0.png b/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Info_MJ_JinXi_atlas0.png new file mode 100644 index 00000000..5d41ad1e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Info_MJ_JinXi_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Info_MJ_JinXi_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Info_MJ_JinXi_atlas0.png.meta new file mode 100644 index 00000000..bb49dd15 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Info_MJ_JinXi_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 9b3c55710bf00864c8ed48e90e151aea +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Info_MJ_JinXi_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Info_MJ_JinXi_fui.bytes new file mode 100644 index 00000000..ba9b3cd1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Info_MJ_JinXi_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Info_MJ_JinXi_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Info_MJ_JinXi_fui.bytes.meta new file mode 100644 index 00000000..169cc7af --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/jinxi/ui/Info_MJ_JinXi_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bc41968a5d7d11e4ab79974dfbdebbfa +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/lichuan.meta b/wb_unity_pro/Assets/ART/extend/majiang/lichuan.meta new file mode 100644 index 00000000..0b96eee7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/lichuan.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b350b54731ddfa747aff75f656fc81c1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui.meta b/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui.meta new file mode 100644 index 00000000..a602c699 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dbef3f1f1781b594a8f31b87e8f46d3d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Extend_MJ_LiChuan_atlas0.png b/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Extend_MJ_LiChuan_atlas0.png new file mode 100644 index 00000000..9e2d9e35 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Extend_MJ_LiChuan_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Extend_MJ_LiChuan_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Extend_MJ_LiChuan_atlas0.png.meta new file mode 100644 index 00000000..0a73b72c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Extend_MJ_LiChuan_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 524c26925237fda4587359bf4e261dfa +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Extend_MJ_LiChuan_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Extend_MJ_LiChuan_fui.bytes new file mode 100644 index 00000000..1940c3aa Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Extend_MJ_LiChuan_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Extend_MJ_LiChuan_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Extend_MJ_LiChuan_fui.bytes.meta new file mode 100644 index 00000000..06e38b7e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Extend_MJ_LiChuan_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b996c0d1356eb9f43beee9c723a47d11 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Info_MJ_LiChuan_atlas0.png b/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Info_MJ_LiChuan_atlas0.png new file mode 100644 index 00000000..5d41ad1e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Info_MJ_LiChuan_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Info_MJ_LiChuan_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Info_MJ_LiChuan_atlas0.png.meta new file mode 100644 index 00000000..1a808313 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Info_MJ_LiChuan_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 9b7152d682374e64da4e59e5e88a90da +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Info_MJ_LiChuan_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Info_MJ_LiChuan_fui.bytes new file mode 100644 index 00000000..3600f4a0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Info_MJ_LiChuan_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Info_MJ_LiChuan_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Info_MJ_LiChuan_fui.bytes.meta new file mode 100644 index 00000000..96fb70d0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/lichuan/ui/Info_MJ_LiChuan_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c279c5ce8544139448da535d43b811ea +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/nanCheng.meta b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng.meta new file mode 100644 index 00000000..504c13e7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0bc0b55cdf7632341a6f2f456446e3d1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/nanCheng.rar b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng.rar new file mode 100644 index 00000000..cff9df8b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng.rar differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/nanCheng.rar.meta b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng.rar.meta new file mode 100644 index 00000000..91526a9b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng.rar.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a82812a0fc9a6a34da42375fab1b9452 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui.meta b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui.meta new file mode 100644 index 00000000..eff7d2a7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: de96189ad4b6a9349a3472d5762b4715 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Extend_MJ_NanCheng_atlas0.png b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Extend_MJ_NanCheng_atlas0.png new file mode 100644 index 00000000..2cc8d88c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Extend_MJ_NanCheng_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Extend_MJ_NanCheng_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Extend_MJ_NanCheng_atlas0.png.meta new file mode 100644 index 00000000..04e38642 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Extend_MJ_NanCheng_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 64c287753abe94f468248fe2139504df +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Extend_MJ_NanCheng_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Extend_MJ_NanCheng_fui.bytes new file mode 100644 index 00000000..51dc5422 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Extend_MJ_NanCheng_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Extend_MJ_NanCheng_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Extend_MJ_NanCheng_fui.bytes.meta new file mode 100644 index 00000000..4250ea6b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Extend_MJ_NanCheng_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 39b25dcc687a2e547b9f1954cdffd619 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Info_MJ_NanCheng_atlas0.png b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Info_MJ_NanCheng_atlas0.png new file mode 100644 index 00000000..5d41ad1e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Info_MJ_NanCheng_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Info_MJ_NanCheng_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Info_MJ_NanCheng_atlas0.png.meta new file mode 100644 index 00000000..c494c555 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Info_MJ_NanCheng_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: d09647bc962bdf147b2434a2b135d32b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Info_MJ_NanCheng_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Info_MJ_NanCheng_fui.bytes new file mode 100644 index 00000000..d5afc314 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Info_MJ_NanCheng_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Info_MJ_NanCheng_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Info_MJ_NanCheng_fui.bytes.meta new file mode 100644 index 00000000..2b705c83 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/nanCheng/ui/Info_MJ_NanCheng_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 672417476ab84024d8adf61379d6f46d +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/qizhiba.meta b/wb_unity_pro/Assets/ART/extend/majiang/qizhiba.meta new file mode 100644 index 00000000..ba22e899 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/qizhiba.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5fbf4965a1dfbad47a6e499deaff1eef +folderAsset: yes +timeCreated: 1627885456 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/sound.meta b/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/sound.meta new file mode 100644 index 00000000..d7b8f609 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fe002e13b3ab27e4e84077f89a81ff47 +folderAsset: yes +timeCreated: 1521443617 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/sound/bg.mp3 b/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/sound/bg.mp3 new file mode 100644 index 00000000..5c61daf5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/sound/bg.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/sound/bg.mp3.meta b/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/sound/bg.mp3.meta new file mode 100644 index 00000000..7bfcce30 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/sound/bg.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f346af5e8b5d96f42a03e3e4e9dc2b7b +timeCreated: 1517800011 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/ui.meta b/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/ui.meta new file mode 100644 index 00000000..29c7f86b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fc68d0a614102ec42b5ac2df9c2a17a8 +folderAsset: yes +timeCreated: 1627885711 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/ui/Extend_MJ_QiZhiBa_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/ui/Extend_MJ_QiZhiBa_fui.bytes new file mode 100644 index 00000000..e0e5a4ba Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/ui/Extend_MJ_QiZhiBa_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/ui/Extend_MJ_QiZhiBa_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/ui/Extend_MJ_QiZhiBa_fui.bytes.meta new file mode 100644 index 00000000..07480719 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/ui/Extend_MJ_QiZhiBa_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1f15bb7ab5e803f408b6754175fed56f +timeCreated: 1629187501 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/ui/Info_MJ_QiZhiBa_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/ui/Info_MJ_QiZhiBa_fui.bytes new file mode 100644 index 00000000..b6ab6998 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/ui/Info_MJ_QiZhiBa_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/ui/Info_MJ_QiZhiBa_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/ui/Info_MJ_QiZhiBa_fui.bytes.meta new file mode 100644 index 00000000..7383fef5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/qizhiba/ui/Info_MJ_QiZhiBa_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bc557a04609ec0f49aa8d6017244313d +timeCreated: 1629187501 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu.meta b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu.meta new file mode 100644 index 00000000..2086c050 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5651ffe3a7ec0bd4793703bc7058add0 +folderAsset: yes +timeCreated: 1627885456 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/sound.meta b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/sound.meta new file mode 100644 index 00000000..14750b53 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a2250fe2bdd5ed64ca823441cc25ea72 +folderAsset: yes +timeCreated: 1521443617 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/sound/bg.mp3 b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/sound/bg.mp3 new file mode 100644 index 00000000..5c61daf5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/sound/bg.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/sound/bg.mp3.meta b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/sound/bg.mp3.meta new file mode 100644 index 00000000..2dd8f086 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/sound/bg.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e35d95f4e6d53304e916ffcd898a6596 +timeCreated: 1517800011 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/sound/zhuaniao.mp3 b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/sound/zhuaniao.mp3 new file mode 100644 index 00000000..a4d2a5f2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/sound/zhuaniao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/sound/zhuaniao.mp3.meta b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/sound/zhuaniao.mp3.meta new file mode 100644 index 00000000..67ed8150 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/sound/zhuaniao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d158573c5e4d2ca41af9de7bc67ff267 +timeCreated: 1545113299 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/ui.meta b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/ui.meta new file mode 100644 index 00000000..0598a103 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b1c534b8599051544877245ae220619a +folderAsset: yes +timeCreated: 1627885711 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/ui/Extend_MJ_TuiDaoHu_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/ui/Extend_MJ_TuiDaoHu_fui.bytes new file mode 100644 index 00000000..04f546e8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/ui/Extend_MJ_TuiDaoHu_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/ui/Extend_MJ_TuiDaoHu_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/ui/Extend_MJ_TuiDaoHu_fui.bytes.meta new file mode 100644 index 00000000..adc6f806 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/ui/Extend_MJ_TuiDaoHu_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9386811a5018b7c418ec289dcf11454d +timeCreated: 1627885773 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/ui/Info_MJ_TuiDaoHu_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/ui/Info_MJ_TuiDaoHu_fui.bytes new file mode 100644 index 00000000..ad2c9b6e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/ui/Info_MJ_TuiDaoHu_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/ui/Info_MJ_TuiDaoHu_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/ui/Info_MJ_TuiDaoHu_fui.bytes.meta new file mode 100644 index 00000000..67f60dec --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/tuidaohu/ui/Info_MJ_TuiDaoHu_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5cd096a01aa310c44ac6e3315a73f5e2 +timeCreated: 1627887765 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou.meta b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou.meta new file mode 100644 index 00000000..d74e4dd7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bac3107121fc3df4fa0501e2671bed7f +folderAsset: yes +timeCreated: 1645252621 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/sound.meta b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/sound.meta new file mode 100644 index 00000000..73121b33 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d0c513f7c97903d4fa917a24057369ee +folderAsset: yes +timeCreated: 1515480633 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/sound/bg.mp3 b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/sound/bg.mp3 new file mode 100644 index 00000000..5c61daf5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/sound/bg.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/sound/bg.mp3.meta b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/sound/bg.mp3.meta new file mode 100644 index 00000000..25ebc53f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/sound/bg.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0608792bd5c178d46bbcadf61fd5ffb4 +timeCreated: 1517800011 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/sound/zhuaniao.mp3 b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/sound/zhuaniao.mp3 new file mode 100644 index 00000000..a4d2a5f2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/sound/zhuaniao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/sound/zhuaniao.mp3.meta b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/sound/zhuaniao.mp3.meta new file mode 100644 index 00000000..5acc5873 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/sound/zhuaniao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 99c2b229a3553dd4c8229767f9325e65 +timeCreated: 1545113291 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui.meta b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui.meta new file mode 100644 index 00000000..fe3fa1bf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f16acf60a1263244d855739b032861d0 +folderAsset: yes +timeCreated: 1509614435 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Extend_MJ_YiJiaoLaiYou_atlas0.png b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Extend_MJ_YiJiaoLaiYou_atlas0.png new file mode 100644 index 00000000..b7b171bc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Extend_MJ_YiJiaoLaiYou_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Extend_MJ_YiJiaoLaiYou_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Extend_MJ_YiJiaoLaiYou_atlas0.png.meta new file mode 100644 index 00000000..0dc66799 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Extend_MJ_YiJiaoLaiYou_atlas0.png.meta @@ -0,0 +1,100 @@ +fileFormatVersion: 2 +guid: c6e8ed1c60e35d0418204350f4e0cb32 +timeCreated: 1640413026 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Windows Store Apps + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Extend_MJ_YiJiaoLaiYou_atlas0_1.png b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Extend_MJ_YiJiaoLaiYou_atlas0_1.png new file mode 100644 index 00000000..da4c6b20 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Extend_MJ_YiJiaoLaiYou_atlas0_1.png differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Extend_MJ_YiJiaoLaiYou_atlas0_1.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Extend_MJ_YiJiaoLaiYou_atlas0_1.png.meta new file mode 100644 index 00000000..c84e0844 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Extend_MJ_YiJiaoLaiYou_atlas0_1.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: 4617445e6a35847449da05e49e077363 +timeCreated: 1642408652 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Extend_MJ_YiJiaoLaiYou_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Extend_MJ_YiJiaoLaiYou_fui.bytes new file mode 100644 index 00000000..e58bb42b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Extend_MJ_YiJiaoLaiYou_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Extend_MJ_YiJiaoLaiYou_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Extend_MJ_YiJiaoLaiYou_fui.bytes.meta new file mode 100644 index 00000000..c17caa2d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Extend_MJ_YiJiaoLaiYou_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 016bdb483a0fb5a4f93fa56fe7eda2b9 +timeCreated: 1640413027 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Info_MJ_YiJiaoLaiYou_atlas0.png b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Info_MJ_YiJiaoLaiYou_atlas0.png new file mode 100644 index 00000000..df7ee692 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Info_MJ_YiJiaoLaiYou_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Info_MJ_YiJiaoLaiYou_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Info_MJ_YiJiaoLaiYou_atlas0.png.meta new file mode 100644 index 00000000..407fe498 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Info_MJ_YiJiaoLaiYou_atlas0.png.meta @@ -0,0 +1,100 @@ +fileFormatVersion: 2 +guid: e1e2a2bf5ab49bc46aa2fc5943f8be25 +timeCreated: 1640413027 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Windows Store Apps + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Info_MJ_YiJiaoLaiYou_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Info_MJ_YiJiaoLaiYou_fui.bytes new file mode 100644 index 00000000..47d355cd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Info_MJ_YiJiaoLaiYou_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Info_MJ_YiJiaoLaiYou_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Info_MJ_YiJiaoLaiYou_fui.bytes.meta new file mode 100644 index 00000000..c33ac473 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/yijiaolaiyou/ui/Info_MJ_YiJiaoLaiYou_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8fee61a47232689429798e68f97de9c7 +timeCreated: 1640413027 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/zhuanzhuan.meta b/wb_unity_pro/Assets/ART/extend/majiang/zhuanzhuan.meta new file mode 100644 index 00000000..6315f425 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/zhuanzhuan.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f2628edca6a33ee4eb1cd2e4f7d10feb +folderAsset: yes +timeCreated: 1629920612 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/zhuanzhuan/ui.meta b/wb_unity_pro/Assets/ART/extend/majiang/zhuanzhuan/ui.meta new file mode 100644 index 00000000..364541b1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/zhuanzhuan/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 592dbd85aed457e46b4169fa1d2f3ad2 +folderAsset: yes +timeCreated: 1629920612 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/zhuanzhuan/ui/Extend_MJ_ZhuanZhuan_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/zhuanzhuan/ui/Extend_MJ_ZhuanZhuan_fui.bytes new file mode 100644 index 00000000..0cb8000b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/zhuanzhuan/ui/Extend_MJ_ZhuanZhuan_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/zhuanzhuan/ui/Extend_MJ_ZhuanZhuan_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/zhuanzhuan/ui/Extend_MJ_ZhuanZhuan_fui.bytes.meta new file mode 100644 index 00000000..487cffd5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/zhuanzhuan/ui/Extend_MJ_ZhuanZhuan_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 600ab7f87e1bb1d4696d6e511ca6401d +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/majiang/zhuanzhuan/16222252cc53949f3bf82cfababbc395 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/majiang/zhuanzhuan/ui/Info_MJ_ZhuanZhuan_fui.bytes b/wb_unity_pro/Assets/ART/extend/majiang/zhuanzhuan/ui/Info_MJ_ZhuanZhuan_fui.bytes new file mode 100644 index 00000000..e8fe143f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/majiang/zhuanzhuan/ui/Info_MJ_ZhuanZhuan_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/majiang/zhuanzhuan/ui/Info_MJ_ZhuanZhuan_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/majiang/zhuanzhuan/ui/Info_MJ_ZhuanZhuan_fui.bytes.meta new file mode 100644 index 00000000..cbe2f238 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/majiang/zhuanzhuan/ui/Info_MJ_ZhuanZhuan_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9eb89beabc8be47409504af746adab03 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/majiang/zhuanzhuan/c797a8d9a916835c96eaefceb529d426 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker.meta b/wb_unity_pro/Assets/ART/extend/poker.meta new file mode 100644 index 00000000..6c6133fe --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: eefd4772a59200948b563481731f8f60 +folderAsset: yes +timeCreated: 1501140028 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian.meta b/wb_unity_pro/Assets/ART/extend/poker/chuntian.meta new file mode 100644 index 00000000..5ab45061 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/chuntian.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 23e267c1ff3be604c8ee1ef3e110185d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui.meta b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui.meta new file mode 100644 index 00000000..4e05eea9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1854dea3c2d80ad488f9fd345cabcdf1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_fui.bytes new file mode 100644 index 00000000..724e1235 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_fui.bytes.meta new file mode 100644 index 00000000..7d8b7800 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Extend_Poker_ChunTian_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d6caa6ac0d448804dac3cec401246196 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/poker/chuntian/8f2a9eeddae7bdd6699208ed03c6055a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Info_Poker_ChunTian_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Info_Poker_ChunTian_fui.bytes new file mode 100644 index 00000000..ba94e46c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Info_Poker_ChunTian_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Info_Poker_ChunTian_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Info_Poker_ChunTian_fui.bytes.meta new file mode 100644 index 00000000..2ce04010 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/chuntian/ui/Info_Poker_ChunTian_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d51d7753fa9ce6e41abe5bbd34df0180 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/poker/chuntian/b621e2490be5c65ffdd9e03a606c3c9b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan.meta new file mode 100644 index 00000000..042aa284 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b580d5fc37e91044b8b31caed63b42e2 +folderAsset: yes +timeCreated: 1645252621 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg.meta new file mode 100644 index 00000000..acb91c3a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8ba8328baecdd904c83805815557e44b +folderAsset: yes +timeCreated: 1564626492 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg/bg1.png b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg/bg1.png new file mode 100644 index 00000000..b0119cd7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg/bg1.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg/bg1.png.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg/bg1.png.meta new file mode 100644 index 00000000..3f24eb0d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg/bg1.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: 1e35c9836b8ada94b95f7c7a4a917643 +timeCreated: 1630150591 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg/bg2.png b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg/bg2.png new file mode 100644 index 00000000..bb6e1a8b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg/bg2.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg/bg2.png.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg/bg2.png.meta new file mode 100644 index 00000000..a56efa6f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg/bg2.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 324d824cb7decc34abc1c7a46c3382bc +timeCreated: 1575365643 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg/bg3.png b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg/bg3.png new file mode 100644 index 00000000..d1a76406 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg/bg3.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg/bg3.png.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg/bg3.png.meta new file mode 100644 index 00000000..252ce5f4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/bg/bg3.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 0e35a20f30e460240bc266ef92fa3fee +timeCreated: 1564626493 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound.meta new file mode 100644 index 00000000..af0bf203 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5d929f71101adab4e8e85fda360c28b9 +folderAsset: yes +timeCreated: 1561178583 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/bgm1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/bgm1.mp3 new file mode 100644 index 00000000..eb603013 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/bgm1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/bgm1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/bgm1.mp3.meta new file mode 100644 index 00000000..9240beec --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/bgm1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1de612a657c5c044c989a61692f7c78f +timeCreated: 1539140979 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/chupai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/chupai.mp3 new file mode 100644 index 00000000..d3452cb3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/chupai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/chupai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/chupai.mp3.meta new file mode 100644 index 00000000..1f6fec55 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/chupai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6ad721dcab380c4498cc957faac82fd9 +timeCreated: 1519463463 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/click.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/click.mp3 new file mode 100644 index 00000000..c90ed0e5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/click.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/click.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/click.mp3.meta new file mode 100644 index 00000000..efca28fe --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/click.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0b8ade29cd26d214c9b6bf7667c2944c +timeCreated: 1515572559 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/fapai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/fapai.mp3 new file mode 100644 index 00000000..8babaa08 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/fapai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/fapai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/fapai.mp3.meta new file mode 100644 index 00000000..cc4e17d5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/fapai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ffe28e1e65228404bab4c2b02d7f19c7 +timeCreated: 1515133521 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man.meta new file mode 100644 index 00000000..3badf5df --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: dd11afaaaf2c48749b42c4c39ec52849 +folderAsset: yes +timeCreated: 1513927546 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/10.mp3 new file mode 100644 index 00000000..4f358f65 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/10.mp3.meta new file mode 100644 index 00000000..b4c961b2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/10.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 0b405c3dbc2f84045a13ec84e31c1090 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/11.mp3 new file mode 100644 index 00000000..1670d392 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/11.mp3.meta new file mode 100644 index 00000000..c4e7346d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1e873c3747c2c1d4694c5569f1685119 +timeCreated: 1513927553 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_10.mp3 new file mode 100644 index 00000000..6729bec7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_10.mp3.meta new file mode 100644 index 00000000..8a340387 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: db998b2f349b1db4f82042850027696c +timeCreated: 1513927552 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_11.mp3 new file mode 100644 index 00000000..5b428ef9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_11.mp3.meta new file mode 100644 index 00000000..109f810c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a2db3db990de8c24196d312683977c90 +timeCreated: 1513927555 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_12.mp3 new file mode 100644 index 00000000..395e2cee Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_12.mp3.meta new file mode 100644 index 00000000..16878573 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bfb1634aa19668549bcb1ea1415510c9 +timeCreated: 1513927558 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_13.mp3 new file mode 100644 index 00000000..9a544470 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_13.mp3.meta new file mode 100644 index 00000000..4d162e41 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a91fe920da229cb449faa3235042b268 +timeCreated: 1513927550 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_14.mp3 new file mode 100644 index 00000000..7c1b4635 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_14.mp3.meta new file mode 100644 index 00000000..79cbdaed --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2875e7e469614ed4a92090adfad13779 +timeCreated: 1513927553 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_15.mp3 new file mode 100644 index 00000000..94101e22 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_15.mp3.meta new file mode 100644 index 00000000..031faba7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_15.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2b818b3ebf88e7c4c97844d3f95b57af +timeCreated: 1513927554 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_3.mp3 new file mode 100644 index 00000000..c5d9a9fd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_3.mp3.meta new file mode 100644 index 00000000..7f496c12 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f2d99664b6119f948b1edac08d11e2b6 +timeCreated: 1513927555 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_4.mp3 new file mode 100644 index 00000000..848ee03b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_4.mp3.meta new file mode 100644 index 00000000..b223d3cd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c79b5217cffee394cb10b71207100b61 +timeCreated: 1513927551 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_5.mp3 new file mode 100644 index 00000000..afcfcd48 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_5.mp3.meta new file mode 100644 index 00000000..798c7de6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1e85e7a51cc3fad46b7f6c33ac8da059 +timeCreated: 1513927555 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_6.mp3 new file mode 100644 index 00000000..f6b10188 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_6.mp3.meta new file mode 100644 index 00000000..1a8e7d50 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: df1f12afc04a50a4589b83ef58d8417b +timeCreated: 1513927548 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_7.mp3 new file mode 100644 index 00000000..2ef2c4f8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_7.mp3.meta new file mode 100644 index 00000000..e831bead --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 89e271ed24633f148813e33463d9edca +timeCreated: 1513927554 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_8.mp3 new file mode 100644 index 00000000..dc04ec4e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_8.mp3.meta new file mode 100644 index 00000000..93cc7c92 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f5a659112afc48f4c8dacd6a327f6d0f +timeCreated: 1513927548 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_9.mp3 new file mode 100644 index 00000000..eace6671 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_9.mp3.meta new file mode 100644 index 00000000..9c4376b3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/1_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f31d08033497ee54b86937b64ecf9d51 +timeCreated: 1513927556 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_10.mp3 new file mode 100644 index 00000000..9a0137ec Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_10.mp3.meta new file mode 100644 index 00000000..2ca85da6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_10.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 701517620d5a0254d9f85f7f327e2ef5 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_11.mp3 new file mode 100644 index 00000000..feeab0fd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_11.mp3.meta new file mode 100644 index 00000000..51f62fbf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_11.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 1098ccbcfe2189c4c9f35e1f4b812e7a +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_12.mp3 new file mode 100644 index 00000000..fcc0c6c5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_12.mp3.meta new file mode 100644 index 00000000..8c99ac0d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 45e0d1ca771a8a84ca7fc43033b5cd34 +timeCreated: 1513927546 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_13.mp3 new file mode 100644 index 00000000..00a0ca34 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_13.mp3.meta new file mode 100644 index 00000000..52927452 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_13.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: a2c92ac21fa817a429151fd8607cccd9 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_14.mp3 new file mode 100644 index 00000000..62787230 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_14.mp3.meta new file mode 100644 index 00000000..6b7b760a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_14.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 8293d67836529a04a90c822b48ae528e +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_15.mp3 new file mode 100644 index 00000000..410ed47f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_15.mp3.meta new file mode 100644 index 00000000..9377e7c4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_15.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f2cceb0dad282134e82ada236c2484ea +timeCreated: 1513927557 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_3.mp3 new file mode 100644 index 00000000..600ed068 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_3.mp3.meta new file mode 100644 index 00000000..d0b06059 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: faaf56afab74d5141abd5262b978a409 +timeCreated: 1513927546 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_4.mp3 new file mode 100644 index 00000000..ba5719a0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_4.mp3.meta new file mode 100644 index 00000000..76d8ea56 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a6a90d4a89529a94a89107e74767327b +timeCreated: 1513927554 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_5.mp3 new file mode 100644 index 00000000..e9e790be Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_5.mp3.meta new file mode 100644 index 00000000..e73026bf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b652e7fdd1029a344861e3481ef4d6a3 +timeCreated: 1513927551 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_6.mp3 new file mode 100644 index 00000000..74a35934 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_6.mp3.meta new file mode 100644 index 00000000..4cd0f7c3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 21ac125eac1b0fc41a2120f6a06d48b6 +timeCreated: 1513927554 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_7.mp3 new file mode 100644 index 00000000..fabd1c8b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_7.mp3.meta new file mode 100644 index 00000000..b36af00e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 372db400c2fc91848aba4b9dbd8989fc +timeCreated: 1513927553 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_8.mp3 new file mode 100644 index 00000000..3fe390b3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_8.mp3.meta new file mode 100644 index 00000000..900c4c00 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4f9cf903fb65cd140ad78e10c5437c02 +timeCreated: 1513927552 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_9.mp3 new file mode 100644 index 00000000..95467aaf Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_9.mp3.meta new file mode 100644 index 00000000..f0bd6d50 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/2_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 40fbeda21587fff47bbbd11843921c20 +timeCreated: 1513927547 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_10.mp3 new file mode 100644 index 00000000..7f3d7494 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_10.mp3.meta new file mode 100644 index 00000000..55419b3f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_10.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 28361d58d2cc61f48a62b615de6a336e +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_11.mp3 new file mode 100644 index 00000000..4913912f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_11.mp3.meta new file mode 100644 index 00000000..6061104a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 815d46870b4bc0f428228a9fe3002c03 +timeCreated: 1513927556 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_12.mp3 new file mode 100644 index 00000000..ee0c6429 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_12.mp3.meta new file mode 100644 index 00000000..1035686d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_12.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: d0b696cf0a218de4fb1f20c284e62915 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_13.mp3 new file mode 100644 index 00000000..e62af3f4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_13.mp3.meta new file mode 100644 index 00000000..8ccde29c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_13.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: b7676aeedee474849beb79591c4a4ded +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_14.mp3 new file mode 100644 index 00000000..33de32dd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_14.mp3.meta new file mode 100644 index 00000000..b7dac954 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_14.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 26161ef218501ba4d82eb8eb936eb953 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_15.mp3 new file mode 100644 index 00000000..8bd6abfc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_15.mp3.meta new file mode 100644 index 00000000..a1ed6f2c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_15.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: adfbc7a12e8534e41a6be1b418621a1b +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_3.mp3 new file mode 100644 index 00000000..474ed768 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_3.mp3.meta new file mode 100644 index 00000000..aec290b7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_3.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 537d9f52b4653cf4190fec43f05513de +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_4.mp3 new file mode 100644 index 00000000..8b40cbef Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_4.mp3.meta new file mode 100644 index 00000000..800d0bdb --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_4.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: fa57652b7f550fb44aea7aa121f38a0c +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_5.mp3 new file mode 100644 index 00000000..d8b04546 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_5.mp3.meta new file mode 100644 index 00000000..080d8c1e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: defcdb7e4156cc3478b2c6cc27a81d2d +timeCreated: 1513927553 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_6.mp3 new file mode 100644 index 00000000..e7fa7e62 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_6.mp3.meta new file mode 100644 index 00000000..fa645961 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 826b245ebfb435144955121098c9c214 +timeCreated: 1513927552 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_7.mp3 new file mode 100644 index 00000000..c01fe5ba Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_7.mp3.meta new file mode 100644 index 00000000..4ac517d5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_7.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 093604e6e22857b4fa24f53b5feb29ed +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_8.mp3 new file mode 100644 index 00000000..4ec4b445 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_8.mp3.meta new file mode 100644 index 00000000..25588c7d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_8.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 9c707134031d5ea4393812aef7088adc +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_9.mp3 new file mode 100644 index 00000000..7aea3a92 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_9.mp3.meta new file mode 100644 index 00000000..a44bfb0a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/3_9.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 3d7b2a94f5ef69c4699c821056fd7dcf +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/4.mp3 new file mode 100644 index 00000000..53eb9196 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/4.mp3.meta new file mode 100644 index 00000000..6a8ff648 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ad77e8dab6936bd4792489238708f159 +timeCreated: 1513927557 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/510k.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/510k.mp3 new file mode 100644 index 00000000..4325ad8b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/510k.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/510k.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/510k.mp3.meta new file mode 100644 index 00000000..9189c220 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/510k.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8a68a18d79c33c84eb1d355cc1c2faee +timeCreated: 1645154248 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/6.mp3 new file mode 100644 index 00000000..563871d3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/6.mp3.meta new file mode 100644 index 00000000..513a8f3b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 87a431f16c6ee4c47b5f10ea95d9a392 +timeCreated: 1513927558 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/7.mp3 new file mode 100644 index 00000000..b2f7a2d5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/7.mp3.meta new file mode 100644 index 00000000..08d9c494 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b331e71e43dfd9342baccceeb26e78db +timeCreated: 1513927550 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/bujiao.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/bujiao.mp3 new file mode 100644 index 00000000..c3c6751c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/bujiao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/bujiao.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/bujiao.mp3.meta new file mode 100644 index 00000000..a56a8d5f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/bujiao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bba64adc4c7781a43aba146a7a85cb42 +timeCreated: 1629539865 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/buqiang.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/buqiang.mp3 new file mode 100644 index 00000000..9f3df058 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/buqiang.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/buqiang.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/buqiang.mp3.meta new file mode 100644 index 00000000..39dd874e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/buqiang.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ca7456e920e68994fa593bd9b0b03476 +timeCreated: 1629539865 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/buyao0.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/buyao0.mp3 new file mode 100644 index 00000000..fbb0c96e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/buyao0.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/buyao0.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/buyao0.mp3.meta new file mode 100644 index 00000000..87718d13 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/buyao0.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2fd7c76b9a3819c4f9872be96b2226ac +timeCreated: 1629539865 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/buyao1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/buyao1.mp3 new file mode 100644 index 00000000..0549c2b1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/buyao1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/buyao1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/buyao1.mp3.meta new file mode 100644 index 00000000..122e702c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/buyao1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 70cd3dca1b6c73b4d8b1fd99ab1b15fe +timeCreated: 1629548374 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/card_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/card_1.mp3 new file mode 100644 index 00000000..e39676cb Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/card_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/card_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/card_1.mp3.meta new file mode 100644 index 00000000..1294f332 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/card_1.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: b870cfe1f5d0cd0448f533eddd35f126 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/card_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/card_2.mp3 new file mode 100644 index 00000000..4f399607 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/card_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/card_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/card_2.mp3.meta new file mode 100644 index 00000000..50abb0a9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/card_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 427ef68a1dd6da74e95bddd1581dbe00 +timeCreated: 1513927554 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/dani_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/dani_1.mp3 new file mode 100644 index 00000000..87028b18 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/dani_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/dani_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/dani_1.mp3.meta new file mode 100644 index 00000000..8049778c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/dani_1.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 9d0b66fc5f267fd4ebbdbdf2cd31800c +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/dani_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/dani_2.mp3 new file mode 100644 index 00000000..40549d55 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/dani_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/dani_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/dani_2.mp3.meta new file mode 100644 index 00000000..5b5970c4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/dani_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: cffb32f9741438f4a801d6cc7922db8f +timeCreated: 1513927549 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/dani_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/dani_3.mp3 new file mode 100644 index 00000000..31d48947 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/dani_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/dani_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/dani_3.mp3.meta new file mode 100644 index 00000000..e9f09ea3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/dani_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bc61bae81ece6c3478c25a6dea0a2c1d +timeCreated: 1513927549 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/jiaodizhu.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/jiaodizhu.mp3 new file mode 100644 index 00000000..733013d1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/jiaodizhu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/jiaodizhu.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/jiaodizhu.mp3.meta new file mode 100644 index 00000000..78fc57af --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/jiaodizhu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3228c275f5759574980457ea471f97ea +timeCreated: 1629539865 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_1.mp3 new file mode 100644 index 00000000..ab664e8e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_1.mp3.meta new file mode 100644 index 00000000..06532794 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_1.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: cb24206bd60f13d40ac1c9fa3c7e6fc7 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_2.mp3 new file mode 100644 index 00000000..80bb9be2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_2.mp3.meta new file mode 100644 index 00000000..3d811fd2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_2.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 338c4e20b3dedf6408610fd161fca267 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_3.mp3 new file mode 100644 index 00000000..ebc53ff9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_3.mp3.meta new file mode 100644 index 00000000..131f7f04 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_3.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: e394a4aaf30cb9144973d60c7ab5e67e +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_4.mp3 new file mode 100644 index 00000000..b48e7145 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_4.mp3.meta new file mode 100644 index 00000000..f03d1f0a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/pass_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 990de73555d61a5458684d56a25c2228 +timeCreated: 1513927554 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/qiangdizhu.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/qiangdizhu.mp3 new file mode 100644 index 00000000..3433b8c7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/qiangdizhu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/qiangdizhu.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/qiangdizhu.mp3.meta new file mode 100644 index 00000000..5ec045e2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/man/qiangdizhu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 65253c9b4f801be43a1c8128af8afbb2 +timeCreated: 1629539865 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/mopai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/mopai.mp3 new file mode 100644 index 00000000..5ef6b1e2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/mopai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/mopai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/mopai.mp3.meta new file mode 100644 index 00000000..3f010153 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/mopai.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 55a33f9633ac79e40aabc88847f38c3f +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/sunzi.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/sunzi.mp3 new file mode 100644 index 00000000..dd74ce61 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/sunzi.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/sunzi.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/sunzi.mp3.meta new file mode 100644 index 00000000..118c6f52 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/sunzi.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: ced54cf6e5d78f94c93cc0319002618e +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman.meta new file mode 100644 index 00000000..adefc686 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 01d5e9edd4606f746abc9f2eafde6a2e +folderAsset: yes +timeCreated: 1513927546 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/10.mp3 new file mode 100644 index 00000000..0de67206 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/10.mp3.meta new file mode 100644 index 00000000..e6de6395 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 01c6657a95f9a2e44b66a10cb408fbd8 +timeCreated: 1513927550 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/11.mp3 new file mode 100644 index 00000000..79cf9acd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/11.mp3.meta new file mode 100644 index 00000000..f09654d7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6a4ee4a96b3a28847af2d5f46038c1cb +timeCreated: 1513927557 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_10.mp3 new file mode 100644 index 00000000..9d42a15f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_10.mp3.meta new file mode 100644 index 00000000..a57f1144 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 453b36a5fe60f48409f4a55de3c86ecf +timeCreated: 1513927548 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_11.mp3 new file mode 100644 index 00000000..f172a3b4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_11.mp3.meta new file mode 100644 index 00000000..4b949d18 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_11.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: fade74f42edd54c4db19c7e01fcdc0b9 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_12.mp3 new file mode 100644 index 00000000..17fe884b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_12.mp3.meta new file mode 100644 index 00000000..6afc5864 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7c126745cd2cd3c4da7c01fd1dfe84ca +timeCreated: 1513927552 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_13.mp3 new file mode 100644 index 00000000..43024095 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_13.mp3.meta new file mode 100644 index 00000000..3c34cd13 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 830c63a6f6b82fc48b88a13b18aadc56 +timeCreated: 1513927550 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_14.mp3 new file mode 100644 index 00000000..ecd641f5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_14.mp3.meta new file mode 100644 index 00000000..f5314996 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: eb7b40774bc109e4db6f46c34906e462 +timeCreated: 1513927549 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_15.mp3 new file mode 100644 index 00000000..28d9b7f4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_15.mp3.meta new file mode 100644 index 00000000..f6b0bf76 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_15.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: e9568852aab54ec43b0abb4c5bfabc4b +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_3.mp3 new file mode 100644 index 00000000..7c00aa67 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_3.mp3.meta new file mode 100644 index 00000000..38486646 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_3.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 1cbe8aa69ed764b4e9314e7f801b4621 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_4.mp3 new file mode 100644 index 00000000..7fcff3e6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_4.mp3.meta new file mode 100644 index 00000000..29d7a9f9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_4.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 6a6094059c874a54098abd3c9b60823a +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_5.mp3 new file mode 100644 index 00000000..f485b57a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_5.mp3.meta new file mode 100644 index 00000000..f30c4ee3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 972e11e1f48c02e48a513e03a788f2a5 +timeCreated: 1513927549 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_6.mp3 new file mode 100644 index 00000000..0ede39e1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_6.mp3.meta new file mode 100644 index 00000000..a57da09e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_6.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 07b79b447d564134bb1021ed4dec46d0 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_7.mp3 new file mode 100644 index 00000000..e6b91f2c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_7.mp3.meta new file mode 100644 index 00000000..2d285d7b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_7.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 9444ba9b35937834f9bd1bdbe9db1432 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_8.mp3 new file mode 100644 index 00000000..ef222c15 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_8.mp3.meta new file mode 100644 index 00000000..511928ac --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_8.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: f780b9e8274afc144878c115ba159bfa +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_9.mp3 new file mode 100644 index 00000000..cedd7958 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_9.mp3.meta new file mode 100644 index 00000000..ac4b2e6d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/1_9.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 878f9232deb66024bb061bc443342ee9 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_10.mp3 new file mode 100644 index 00000000..0fe90ca7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_10.mp3.meta new file mode 100644 index 00000000..8b71e49c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 27042b5a78261f349ae9ebf3b08f9eed +timeCreated: 1513927556 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_11.mp3 new file mode 100644 index 00000000..c8e832ed Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_11.mp3.meta new file mode 100644 index 00000000..8296dc1d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_11.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 321cf48b96a3d4f42906e4ffe0c428a0 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_12.mp3 new file mode 100644 index 00000000..2aece7c3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_12.mp3.meta new file mode 100644 index 00000000..70ac10f0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_12.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: cb249d516af892a42a4e391a5177e029 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_13.mp3 new file mode 100644 index 00000000..71a93b5f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_13.mp3.meta new file mode 100644 index 00000000..08374043 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_13.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 49e22b9199fd73e459cec0a61dbf1db1 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_14.mp3 new file mode 100644 index 00000000..26b33503 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_14.mp3.meta new file mode 100644 index 00000000..93e4b4b8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: da760efe4d97e2345bd25f375862ecd4 +timeCreated: 1513927551 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_15.mp3 new file mode 100644 index 00000000..b6f6346d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_15.mp3.meta new file mode 100644 index 00000000..031a3476 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_15.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 9b952878bce957846b811eb69d937911 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_3.mp3 new file mode 100644 index 00000000..fc6894d4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_3.mp3.meta new file mode 100644 index 00000000..ecd76e03 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e908f86f6097e354c9f72169f8ba7495 +timeCreated: 1513927548 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_4.mp3 new file mode 100644 index 00000000..d7a8a901 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_4.mp3.meta new file mode 100644 index 00000000..415cc0c3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2cd5a47bed21fe2469ecce199ce67f3c +timeCreated: 1513927551 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_5.mp3 new file mode 100644 index 00000000..f0a1ea68 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_5.mp3.meta new file mode 100644 index 00000000..c52d660e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_5.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: f2031d46d112a1b4a81a1f5ac73fe622 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_6.mp3 new file mode 100644 index 00000000..5c82cdff Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_6.mp3.meta new file mode 100644 index 00000000..599e5044 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c22bc9560ea7722408c35fadf1fc592c +timeCreated: 1513927556 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_7.mp3 new file mode 100644 index 00000000..764e6449 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_7.mp3.meta new file mode 100644 index 00000000..29be4ab4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_7.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: a5e2986cb1112f443a62b870ee6f75bd +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_8.mp3 new file mode 100644 index 00000000..d70e71c3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_8.mp3.meta new file mode 100644 index 00000000..b443ae87 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_8.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 80d12258b012f4547b81ddfee191f499 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_9.mp3 new file mode 100644 index 00000000..a09f0210 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_9.mp3.meta new file mode 100644 index 00000000..e7599f86 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/2_9.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 8bf2e71981eb67d4fb5012c95def657b +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_10.mp3 new file mode 100644 index 00000000..bb4710e2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_10.mp3.meta new file mode 100644 index 00000000..6ce508e8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_10.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: ffa3fe31c4a14234a878dd68597a1514 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_11.mp3 new file mode 100644 index 00000000..e8c09a08 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_11.mp3.meta new file mode 100644 index 00000000..0fb1bf3c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b22e016fd7c3f054db83a01188168f9b +timeCreated: 1513927555 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_12.mp3 new file mode 100644 index 00000000..482376a7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_12.mp3.meta new file mode 100644 index 00000000..8ee05fc1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_12.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: cc94e1ddc50085d46b23e728a8b16af8 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_13.mp3 new file mode 100644 index 00000000..59b5178f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_13.mp3.meta new file mode 100644 index 00000000..600e0abf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c1d923819fd4c7e4b80dfc1972e4503d +timeCreated: 1513927553 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_14.mp3 new file mode 100644 index 00000000..f315c19f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_14.mp3.meta new file mode 100644 index 00000000..ef5ba423 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 07d3ef041f91f6647bd56a9fae5a7d98 +timeCreated: 1513927546 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_15.mp3 new file mode 100644 index 00000000..acf3dece Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_15.mp3.meta new file mode 100644 index 00000000..ce0df3c2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_15.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 0d59d72ed9cf6d2408c36c438e246ab3 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_3.mp3 new file mode 100644 index 00000000..39010171 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_3.mp3.meta new file mode 100644 index 00000000..71261c5e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_3.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 94549549a12aa554db8cf3f47af6b385 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_4.mp3 new file mode 100644 index 00000000..7df04916 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_4.mp3.meta new file mode 100644 index 00000000..94c45435 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ed1bc3ccb041300479d1f51aee079f21 +timeCreated: 1513927549 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_5.mp3 new file mode 100644 index 00000000..e5f2bd0c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_5.mp3.meta new file mode 100644 index 00000000..e3cb5011 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_5.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: aec6555915ba582478478a6074412a19 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_6.mp3 new file mode 100644 index 00000000..95618d52 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_6.mp3.meta new file mode 100644 index 00000000..a0a65d95 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_6.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 13a34feed9f089844813a1a82d344a9f +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_7.mp3 new file mode 100644 index 00000000..4c591f0f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_7.mp3.meta new file mode 100644 index 00000000..0d14fc20 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_7.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: a51f7c401c540ee439d65e23458d94df +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_8.mp3 new file mode 100644 index 00000000..715c0a64 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_8.mp3.meta new file mode 100644 index 00000000..62182048 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: efe2de330ce8a624e9877889d8a76446 +timeCreated: 1513927547 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_9.mp3 new file mode 100644 index 00000000..8e80bfa0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_9.mp3.meta new file mode 100644 index 00000000..19e06aa6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/3_9.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 84120fb08b6987c42a32f656fe50bd55 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/4.mp3 new file mode 100644 index 00000000..cba8ec7e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/4.mp3.meta new file mode 100644 index 00000000..9f6df11a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 54a4d6ae75b057543ad1f7f1615284f3 +timeCreated: 1513927553 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/510k.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/510k.mp3 new file mode 100644 index 00000000..4325ad8b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/510k.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/510k.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/510k.mp3.meta new file mode 100644 index 00000000..c6e53e6b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/510k.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6fa860f1b51fc5442a367769b508a8de +timeCreated: 1645154248 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/6.mp3 new file mode 100644 index 00000000..64350eca Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/6.mp3.meta new file mode 100644 index 00000000..252ee3e6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/6.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 51a6f40b67267a544a073292a55ba14c +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/7.mp3 new file mode 100644 index 00000000..e4611e3b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/7.mp3.meta new file mode 100644 index 00000000..55a2246a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/7.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: ebd2a0d1c47646e468928a6324b4c594 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/bujiao.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/bujiao.mp3 new file mode 100644 index 00000000..eb0ac1f9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/bujiao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/bujiao.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/bujiao.mp3.meta new file mode 100644 index 00000000..6c93b925 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/bujiao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0d90b7fff6fdedc4dbfb200d56f069fe +timeCreated: 1629539998 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/buqiang.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/buqiang.mp3 new file mode 100644 index 00000000..6089a064 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/buqiang.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/buqiang.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/buqiang.mp3.meta new file mode 100644 index 00000000..cf80d1f1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/buqiang.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 731adbb21b466124cbb08691bfc21f91 +timeCreated: 1629539998 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/buyao0.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/buyao0.mp3 new file mode 100644 index 00000000..77b1ec5e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/buyao0.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/buyao0.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/buyao0.mp3.meta new file mode 100644 index 00000000..d8c27105 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/buyao0.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2e80054e3b168dd43802da27701f399b +timeCreated: 1629539998 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/buyao1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/buyao1.mp3 new file mode 100644 index 00000000..fbb5ed57 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/buyao1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/buyao1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/buyao1.mp3.meta new file mode 100644 index 00000000..1da1d136 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/buyao1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6570bb11d750c014c83456481d04daf9 +timeCreated: 1629548402 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/card_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/card_1.mp3 new file mode 100644 index 00000000..cad735ca Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/card_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/card_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/card_1.mp3.meta new file mode 100644 index 00000000..d59da1fb --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/card_1.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 9161667bcf02d8f46887000b6ab7ec4a +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/card_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/card_2.mp3 new file mode 100644 index 00000000..551487dd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/card_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/card_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/card_2.mp3.meta new file mode 100644 index 00000000..c53aefbf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/card_2.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: bb57a450a17818549b13ae74b8219c6b +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/dani_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/dani_1.mp3 new file mode 100644 index 00000000..e015c653 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/dani_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/dani_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/dani_1.mp3.meta new file mode 100644 index 00000000..c78967d8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/dani_1.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 783bebc1a4e7cf6418e0c4b70d842f8d +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/dani_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/dani_2.mp3 new file mode 100644 index 00000000..e485fb6d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/dani_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/dani_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/dani_2.mp3.meta new file mode 100644 index 00000000..8acb3bbf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/dani_2.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: ce6ed335d8643a149b14df2b82c307f3 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/dani_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/dani_3.mp3 new file mode 100644 index 00000000..aeb59c07 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/dani_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/dani_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/dani_3.mp3.meta new file mode 100644 index 00000000..3ee611b4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/dani_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 271a2941acdb626449bc593389584b2c +timeCreated: 1513927557 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/jiaodizhu.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/jiaodizhu.mp3 new file mode 100644 index 00000000..4ac12b95 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/jiaodizhu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/jiaodizhu.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/jiaodizhu.mp3.meta new file mode 100644 index 00000000..bf1484e0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/jiaodizhu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2ce38a9fe3f05f1409b153bcbf984ba2 +timeCreated: 1629539998 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_1.mp3 new file mode 100644 index 00000000..f30160e0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_1.mp3.meta new file mode 100644 index 00000000..74d397bd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6a25933632431f0428e9750872fa90ad +timeCreated: 1513927547 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_2.mp3 new file mode 100644 index 00000000..14e9b5f7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_2.mp3.meta new file mode 100644 index 00000000..cbb1509d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_2.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: d27afff4edfaa8847868fd216923f781 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_3.mp3 new file mode 100644 index 00000000..8b2ca6d1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_3.mp3.meta new file mode 100644 index 00000000..c07f5f9b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_3.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: d9f83743ed946d2448c5d9040ca809ff +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_4.mp3 new file mode 100644 index 00000000..a70d5c78 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_4.mp3.meta new file mode 100644 index 00000000..bffc21ac --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/pass_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 82eced4c2b3286940861be7fc3c161a1 +timeCreated: 1513927558 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/qiangdizhu.mp3 b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/qiangdizhu.mp3 new file mode 100644 index 00000000..a5bf3e40 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/qiangdizhu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/qiangdizhu.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/qiangdizhu.mp3.meta new file mode 100644 index 00000000..cb7d34ae --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/sound/woman/qiangdizhu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fa086b6d3a61be244a22a3ce52a4ea95 +timeCreated: 1629539998 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui.meta new file mode 100644 index 00000000..055b8a64 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: dd0b553fbaa00a44fb6ae31028de0e74 +folderAsset: yes +timeCreated: 1561176569 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Extend_Poker_DaZhaDan_atlas0.png b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Extend_Poker_DaZhaDan_atlas0.png new file mode 100644 index 00000000..fb4a8b8b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Extend_Poker_DaZhaDan_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Extend_Poker_DaZhaDan_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Extend_Poker_DaZhaDan_atlas0.png.meta new file mode 100644 index 00000000..d72df7b4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Extend_Poker_DaZhaDan_atlas0.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: e044ac94bd5aa884d8e8611bbeccf2e4 +timeCreated: 1644992304 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Extend_Poker_DaZhaDan_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Extend_Poker_DaZhaDan_fui.bytes new file mode 100644 index 00000000..e295bdb4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Extend_Poker_DaZhaDan_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Extend_Poker_DaZhaDan_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Extend_Poker_DaZhaDan_fui.bytes.meta new file mode 100644 index 00000000..d519885d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Extend_Poker_DaZhaDan_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: aeb90fe5299c45c41a7ccaa03ce011e8 +timeCreated: 1644992304 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Info_Poker_DaZhaDan_atlas0.png b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Info_Poker_DaZhaDan_atlas0.png new file mode 100644 index 00000000..df33c81b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Info_Poker_DaZhaDan_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Info_Poker_DaZhaDan_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Info_Poker_DaZhaDan_atlas0.png.meta new file mode 100644 index 00000000..cb090ab5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Info_Poker_DaZhaDan_atlas0.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: 6976cc30d9f61754ba93142f031fac7e +timeCreated: 1644992298 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Info_Poker_DaZhaDan_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Info_Poker_DaZhaDan_fui.bytes new file mode 100644 index 00000000..32e1c0d8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Info_Poker_DaZhaDan_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Info_Poker_DaZhaDan_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Info_Poker_DaZhaDan_fui.bytes.meta new file mode 100644 index 00000000..8866d403 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/dazhadan/ui/Info_Poker_DaZhaDan_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5d13c6cec519bfb4e8282474f56e9448 +timeCreated: 1644992304 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi.meta new file mode 100644 index 00000000..b4e10773 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a83216de5adb7f64ba5566ac6f333f82 +folderAsset: yes +timeCreated: 1638448511 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/bg.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/bg.meta new file mode 100644 index 00000000..0249c5a7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/bg.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 76fa2ace3ec483a418b6bd823077fff8 +folderAsset: yes +timeCreated: 1564626492 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/bg/bg1.png b/wb_unity_pro/Assets/ART/extend/poker/mushi/bg/bg1.png new file mode 100644 index 00000000..15c4ac20 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/bg/bg1.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/bg/bg1.png.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/bg/bg1.png.meta new file mode 100644 index 00000000..097b01fb --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/bg/bg1.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: a02dbf8d5279dbb43b0c20085f52b25e +timeCreated: 1628910093 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/bg/bg2.png b/wb_unity_pro/Assets/ART/extend/poker/mushi/bg/bg2.png new file mode 100644 index 00000000..bb6e1a8b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/bg/bg2.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/bg/bg2.png.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/bg/bg2.png.meta new file mode 100644 index 00000000..d9d459fd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/bg/bg2.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 038499322bf90b449862240a8dd67e64 +timeCreated: 1575365643 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/bg/bg3.png b/wb_unity_pro/Assets/ART/extend/poker/mushi/bg/bg3.png new file mode 100644 index 00000000..e11e9413 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/bg/bg3.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/bg/bg3.png.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/bg/bg3.png.meta new file mode 100644 index 00000000..1ac3108b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/bg/bg3.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 6ce99764996ab0b439380c011b3240ca +timeCreated: 1576482920 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/eff.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/eff.meta new file mode 100644 index 00000000..ef3236d1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/eff.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 49ccaa15b7b97924ea9fe5668ef8defc +folderAsset: yes +timeCreated: 1630486274 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/eff/flyCoinEffect.prefab b/wb_unity_pro/Assets/ART/extend/poker/mushi/eff/flyCoinEffect.prefab new file mode 100644 index 00000000..2776bcda --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/eff/flyCoinEffect.prefab @@ -0,0 +1,2718 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1102683212959336} + m_IsPrefabParent: 1 +--- !u!1 &1102683212959336 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4060020414936694} + - component: {fileID: 198202024848717838} + - component: {fileID: 199074670698181032} + m_Layer: 5 + m_Name: flyCoinEffect + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4060020414936694 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1102683212959336} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!198 &198202024848717838 +ParticleSystem: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1102683212959336} + serializedVersion: 5 + lengthInSec: 1 + simulationSpeed: 1 + looping: 1 + prewarm: 0 + playOnAwake: 1 + autoRandomSeed: 1 + startDelay: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + moveWithTransform: 1 + moveWithCustomTransform: {fileID: 0} + scalingMode: 0 + randomSeed: 170871641 + InitialModule: + serializedVersion: 3 + enabled: 1 + startLifetime: + scalar: 0.4 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.75 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minMaxState: 3 + startSpeed: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startColor: + serializedVersion: 2 + maxGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + minMaxState: 0 + startSize: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startSizeY: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startSizeZ: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startRotationX: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startRotationY: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startRotation: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + randomizeRotationDirection: 0 + maxNumParticles: 30 + size3D: 0 + rotation3D: 0 + gravityModifier: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + ShapeModule: + serializedVersion: 3 + enabled: 1 + type: 2 + radius: 0.01 + angle: 25 + length: 5 + boxX: 1 + boxY: 1 + boxZ: 1 + arc: 360 + placementMode: 0 + m_Mesh: {fileID: 0} + m_MeshRenderer: {fileID: 0} + m_SkinnedMeshRenderer: {fileID: 0} + m_MeshMaterialIndex: 0 + m_MeshNormalOffset: 0 + m_MeshScale: 1 + m_UseMeshMaterialIndex: 0 + m_UseMeshColors: 1 + alignToDirection: 0 + randomDirectionAmount: 0 + sphericalDirectionAmount: 0 + EmissionModule: + enabled: 1 + serializedVersion: 3 + rateOverTime: + scalar: 20 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + rateOverDistance: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + cnt0: 30 + cnt1: 30 + cnt2: 30 + cnt3: 30 + cntmax0: 30 + cntmax1: 30 + cntmax2: 30 + cntmax3: 30 + time0: 0 + time1: 0 + time2: 0 + time3: 0 + m_BurstCount: 0 + SizeModule: + enabled: 0 + curve: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + y: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + z: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + separateAxes: 0 + RotationModule: + enabled: 0 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + curve: + scalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + separateAxes: 0 + ColorModule: + enabled: 0 + gradient: + serializedVersion: 2 + maxGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + minMaxState: 1 + UVModule: + enabled: 0 + frameOverTime: + scalar: 0.9999 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + startFrame: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + tilesX: 1 + tilesY: 1 + animationType: 0 + rowIndex: 0 + cycles: 1 + uvChannelMask: -1 + flipU: 0 + flipV: 0 + randomRow: 1 + VelocityModule: + enabled: 0 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + z: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + inWorldSpace: 0 + InheritVelocityModule: + enabled: 0 + m_Mode: 0 + m_Curve: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + ForceModule: + enabled: 0 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + z: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + inWorldSpace: 0 + randomizePerFrame: 0 + ExternalForcesModule: + enabled: 0 + multiplier: 1 + ClampVelocityModule: + enabled: 0 + x: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + z: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + magnitude: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + separateAxis: 0 + inWorldSpace: 0 + dampen: 1 + NoiseModule: + enabled: 0 + strength: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + strengthY: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + strengthZ: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + separateAxes: 0 + frequency: 0.5 + damping: 1 + octaves: 1 + octaveMultiplier: 0.5 + octaveScale: 2 + quality: 2 + scrollSpeed: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + remap: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -1 + inSlope: 0 + outSlope: 2 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 2 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + remapY: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -1 + inSlope: 0 + outSlope: 2 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 2 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + remapZ: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -1 + inSlope: 0 + outSlope: 2 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 2 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + remapEnabled: 0 + SizeBySpeedModule: + enabled: 0 + curve: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + y: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + z: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + range: {x: 0, y: 1} + separateAxes: 0 + RotationBySpeedModule: + enabled: 0 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + curve: + scalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + separateAxes: 0 + range: {x: 0, y: 1} + ColorBySpeedModule: + enabled: 0 + gradient: + serializedVersion: 2 + maxGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + minMaxState: 1 + range: {x: 0, y: 1} + CollisionModule: + enabled: 0 + serializedVersion: 3 + type: 0 + collisionMode: 0 + plane0: {fileID: 0} + plane1: {fileID: 0} + plane2: {fileID: 0} + plane3: {fileID: 0} + plane4: {fileID: 0} + plane5: {fileID: 0} + m_Dampen: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + m_Bounce: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + m_EnergyLossOnCollision: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + minKillSpeed: 0 + maxKillSpeed: 10000 + radiusScale: 1 + collidesWith: + serializedVersion: 2 + m_Bits: 4294967295 + maxCollisionShapes: 256 + quality: 0 + voxelSize: 0.5 + collisionMessages: 0 + collidesWithDynamic: 1 + interiorCollisions: 1 + TriggerModule: + enabled: 0 + collisionShape0: {fileID: 0} + collisionShape1: {fileID: 0} + collisionShape2: {fileID: 0} + collisionShape3: {fileID: 0} + collisionShape4: {fileID: 0} + collisionShape5: {fileID: 0} + inside: 1 + outside: 0 + enter: 0 + exit: 0 + radiusScale: 1 + SubModule: + serializedVersion: 2 + enabled: 0 + subEmitters: + - emitter: {fileID: 0} + type: 0 + properties: 0 + LightsModule: + enabled: 0 + ratio: 0 + light: {fileID: 0} + randomDistribution: 1 + color: 1 + range: 1 + intensity: 1 + rangeCurve: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + intensityCurve: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + maxLights: 20 + TrailModule: + enabled: 0 + ratio: 1 + lifetime: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + minVertexDistance: 0.2 + textureMode: 0 + worldSpace: 0 + dieWithParticles: 1 + sizeAffectsWidth: 1 + sizeAffectsLifetime: 0 + inheritParticleColor: 1 + colorOverLifetime: + serializedVersion: 2 + maxGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + minMaxState: 0 + widthOverTrail: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + colorOverTrail: + serializedVersion: 2 + maxGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + minMaxState: 0 +--- !u!199 &199074670698181032 +ParticleSystemRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1102683212959336} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_Materials: + - {fileID: 2100000, guid: 0e1d5c04ce1cb084a8d6f7e23a3a8d7d, type: 2} + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 100 + m_RenderMode: 0 + m_SortMode: 0 + m_MinParticleSize: 0 + m_MaxParticleSize: 0.5 + m_CameraVelocityScale: 0 + m_VelocityScale: 0 + m_LengthScale: 2 + m_SortingFudge: 0 + m_NormalDirection: 1 + m_RenderAlignment: 0 + m_Pivot: {x: 0, y: 0, z: 0} + m_UseCustomVertexStreams: 0 + m_VertexStreamMask: 27 + m_Mesh: {fileID: 0} + m_Mesh1: {fileID: 0} + m_Mesh2: {fileID: 0} + m_Mesh3: {fileID: 0} diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/eff/flyCoinEffect.prefab.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/eff/flyCoinEffect.prefab.meta new file mode 100644 index 00000000..09608744 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/eff/flyCoinEffect.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b396bcff19d4c864aa97602b98ed2430 +timeCreated: 1630482532 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/effect.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/effect.meta new file mode 100644 index 00000000..979da1e8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/effect.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1bcb85ee66cf5694fa052fa2d3280c0a +folderAsset: yes +timeCreated: 1630486274 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/effect/flycoin.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/effect/flycoin.meta new file mode 100644 index 00000000..f69f6513 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/effect/flycoin.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2218e8577e9adaa47828ea5dc7d87061 +folderAsset: yes +timeCreated: 1630499292 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/effect/flycoin/flyCoinEffect.prefab b/wb_unity_pro/Assets/ART/extend/poker/mushi/effect/flycoin/flyCoinEffect.prefab new file mode 100644 index 00000000..2776bcda --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/effect/flycoin/flyCoinEffect.prefab @@ -0,0 +1,2718 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 1102683212959336} + m_IsPrefabParent: 1 +--- !u!1 &1102683212959336 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4060020414936694} + - component: {fileID: 198202024848717838} + - component: {fileID: 199074670698181032} + m_Layer: 5 + m_Name: flyCoinEffect + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4060020414936694 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1102683212959336} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!198 &198202024848717838 +ParticleSystem: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1102683212959336} + serializedVersion: 5 + lengthInSec: 1 + simulationSpeed: 1 + looping: 1 + prewarm: 0 + playOnAwake: 1 + autoRandomSeed: 1 + startDelay: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + moveWithTransform: 1 + moveWithCustomTransform: {fileID: 0} + scalingMode: 0 + randomSeed: 170871641 + InitialModule: + serializedVersion: 3 + enabled: 1 + startLifetime: + scalar: 0.4 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.75 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minMaxState: 3 + startSpeed: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startColor: + serializedVersion: 2 + maxGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + minMaxState: 0 + startSize: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startSizeY: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startSizeZ: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startRotationX: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startRotationY: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startRotation: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + randomizeRotationDirection: 0 + maxNumParticles: 30 + size3D: 0 + rotation3D: 0 + gravityModifier: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + ShapeModule: + serializedVersion: 3 + enabled: 1 + type: 2 + radius: 0.01 + angle: 25 + length: 5 + boxX: 1 + boxY: 1 + boxZ: 1 + arc: 360 + placementMode: 0 + m_Mesh: {fileID: 0} + m_MeshRenderer: {fileID: 0} + m_SkinnedMeshRenderer: {fileID: 0} + m_MeshMaterialIndex: 0 + m_MeshNormalOffset: 0 + m_MeshScale: 1 + m_UseMeshMaterialIndex: 0 + m_UseMeshColors: 1 + alignToDirection: 0 + randomDirectionAmount: 0 + sphericalDirectionAmount: 0 + EmissionModule: + enabled: 1 + serializedVersion: 3 + rateOverTime: + scalar: 20 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + rateOverDistance: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + cnt0: 30 + cnt1: 30 + cnt2: 30 + cnt3: 30 + cntmax0: 30 + cntmax1: 30 + cntmax2: 30 + cntmax3: 30 + time0: 0 + time1: 0 + time2: 0 + time3: 0 + m_BurstCount: 0 + SizeModule: + enabled: 0 + curve: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + y: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + z: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + separateAxes: 0 + RotationModule: + enabled: 0 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + curve: + scalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + separateAxes: 0 + ColorModule: + enabled: 0 + gradient: + serializedVersion: 2 + maxGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + minMaxState: 1 + UVModule: + enabled: 0 + frameOverTime: + scalar: 0.9999 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + startFrame: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + tilesX: 1 + tilesY: 1 + animationType: 0 + rowIndex: 0 + cycles: 1 + uvChannelMask: -1 + flipU: 0 + flipV: 0 + randomRow: 1 + VelocityModule: + enabled: 0 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + z: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + inWorldSpace: 0 + InheritVelocityModule: + enabled: 0 + m_Mode: 0 + m_Curve: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + ForceModule: + enabled: 0 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + z: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + inWorldSpace: 0 + randomizePerFrame: 0 + ExternalForcesModule: + enabled: 0 + multiplier: 1 + ClampVelocityModule: + enabled: 0 + x: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + z: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + magnitude: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + separateAxis: 0 + inWorldSpace: 0 + dampen: 1 + NoiseModule: + enabled: 0 + strength: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + strengthY: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + strengthZ: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + separateAxes: 0 + frequency: 0.5 + damping: 1 + octaves: 1 + octaveMultiplier: 0.5 + octaveScale: 2 + quality: 2 + scrollSpeed: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + remap: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -1 + inSlope: 0 + outSlope: 2 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 2 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + remapY: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -1 + inSlope: 0 + outSlope: 2 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 2 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + remapZ: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -1 + inSlope: 0 + outSlope: 2 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 2 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + remapEnabled: 0 + SizeBySpeedModule: + enabled: 0 + curve: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + y: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + z: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + range: {x: 0, y: 1} + separateAxes: 0 + RotationBySpeedModule: + enabled: 0 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + curve: + scalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + separateAxes: 0 + range: {x: 0, y: 1} + ColorBySpeedModule: + enabled: 0 + gradient: + serializedVersion: 2 + maxGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + minMaxState: 1 + range: {x: 0, y: 1} + CollisionModule: + enabled: 0 + serializedVersion: 3 + type: 0 + collisionMode: 0 + plane0: {fileID: 0} + plane1: {fileID: 0} + plane2: {fileID: 0} + plane3: {fileID: 0} + plane4: {fileID: 0} + plane5: {fileID: 0} + m_Dampen: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + m_Bounce: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + m_EnergyLossOnCollision: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + minKillSpeed: 0 + maxKillSpeed: 10000 + radiusScale: 1 + collidesWith: + serializedVersion: 2 + m_Bits: 4294967295 + maxCollisionShapes: 256 + quality: 0 + voxelSize: 0.5 + collisionMessages: 0 + collidesWithDynamic: 1 + interiorCollisions: 1 + TriggerModule: + enabled: 0 + collisionShape0: {fileID: 0} + collisionShape1: {fileID: 0} + collisionShape2: {fileID: 0} + collisionShape3: {fileID: 0} + collisionShape4: {fileID: 0} + collisionShape5: {fileID: 0} + inside: 1 + outside: 0 + enter: 0 + exit: 0 + radiusScale: 1 + SubModule: + serializedVersion: 2 + enabled: 0 + subEmitters: + - emitter: {fileID: 0} + type: 0 + properties: 0 + LightsModule: + enabled: 0 + ratio: 0 + light: {fileID: 0} + randomDistribution: 1 + color: 1 + range: 1 + intensity: 1 + rangeCurve: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + intensityCurve: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + maxLights: 20 + TrailModule: + enabled: 0 + ratio: 1 + lifetime: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + minVertexDistance: 0.2 + textureMode: 0 + worldSpace: 0 + dieWithParticles: 1 + sizeAffectsWidth: 1 + sizeAffectsLifetime: 0 + inheritParticleColor: 1 + colorOverLifetime: + serializedVersion: 2 + maxGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + minMaxState: 0 + widthOverTrail: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + colorOverTrail: + serializedVersion: 2 + maxGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + minMaxState: 0 +--- !u!199 &199074670698181032 +ParticleSystemRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1102683212959336} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_Materials: + - {fileID: 2100000, guid: 0e1d5c04ce1cb084a8d6f7e23a3a8d7d, type: 2} + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 100 + m_RenderMode: 0 + m_SortMode: 0 + m_MinParticleSize: 0 + m_MaxParticleSize: 0.5 + m_CameraVelocityScale: 0 + m_VelocityScale: 0 + m_LengthScale: 2 + m_SortingFudge: 0 + m_NormalDirection: 1 + m_RenderAlignment: 0 + m_Pivot: {x: 0, y: 0, z: 0} + m_UseCustomVertexStreams: 0 + m_VertexStreamMask: 27 + m_Mesh: {fileID: 0} + m_Mesh1: {fileID: 0} + m_Mesh2: {fileID: 0} + m_Mesh3: {fileID: 0} diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/effect/flycoin/flyCoinEffect.prefab.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/effect/flycoin/flyCoinEffect.prefab.meta new file mode 100644 index 00000000..f3e7450a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/effect/flycoin/flyCoinEffect.prefab.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d544d0c12ffd0da4a822e37501ef59f4 +timeCreated: 1630482532 +licenseType: Free +NativeFormatImporter: + mainObjectFileID: -1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound.meta new file mode 100644 index 00000000..0d31713f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6142e520ef2332a4d9268d590e5a21e6 +folderAsset: yes +timeCreated: 1561178583 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/bgm1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/bgm1.mp3 new file mode 100644 index 00000000..d4baeffb Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/bgm1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/bgm1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/bgm1.mp3.meta new file mode 100644 index 00000000..202673ff --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/bgm1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b92f484ce2bd0074392315b1b1e902da +timeCreated: 1539140979 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/chupai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/chupai.mp3 new file mode 100644 index 00000000..d3452cb3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/chupai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/chupai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/chupai.mp3.meta new file mode 100644 index 00000000..31cf8bed --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/chupai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4b43355a865dae94c9f43555c34c92d3 +timeCreated: 1519463463 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/click.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/click.mp3 new file mode 100644 index 00000000..c90ed0e5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/click.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/click.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/click.mp3.meta new file mode 100644 index 00000000..6f22a43b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/click.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2567ae761213f3a449650bd41934ea99 +timeCreated: 1515572559 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/fapai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/fapai.mp3 new file mode 100644 index 00000000..8babaa08 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/fapai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/fapai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/fapai.mp3.meta new file mode 100644 index 00000000..09e5915e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/fapai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 43862d7f0645a054ab0c41671e97a47b +timeCreated: 1515133521 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man.meta new file mode 100644 index 00000000..18c161df --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c386b19961293e24d90e39dc8ca96467 +folderAsset: yes +timeCreated: 1513927546 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_0.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_0.mp3 new file mode 100644 index 00000000..6a0b15c0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_0.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_0.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_0.mp3.meta new file mode 100644 index 00000000..9b89d52e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_0.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0bdf3d73faf13e04bb7c3ee701318541 +timeCreated: 1630580002 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_1.mp3 new file mode 100644 index 00000000..a225f688 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_1.mp3.meta new file mode 100644 index 00000000..b77f4810 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e9ccfad5741f74d45aee7a4d952014d7 +timeCreated: 1630580003 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_2.mp3 new file mode 100644 index 00000000..c2a64fd9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_2.mp3.meta new file mode 100644 index 00000000..b7ce6285 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 68ed2e72555cc9e48add7b3a928b7ed0 +timeCreated: 1630580002 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_3.mp3 new file mode 100644 index 00000000..d5a7da28 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_3.mp3.meta new file mode 100644 index 00000000..c53f2fa6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/jiaofen_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f355be1e683d0e54c858583b09189695 +timeCreated: 1630580003 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_bipai_559f8cd.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_bipai_559f8cd.mp3 new file mode 100644 index 00000000..e779de0c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_bipai_559f8cd.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_bipai_559f8cd.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_bipai_559f8cd.mp3.meta new file mode 100644 index 00000000..dc7fe70e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_bipai_559f8cd.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8da470bb370db8846b52971e12936723 +timeCreated: 1629465844 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_bupai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_bupai.mp3 new file mode 100644 index 00000000..fe8f2385 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_bupai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_bupai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_bupai.mp3.meta new file mode 100644 index 00000000..36f22b0a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_bupai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 86fd9e1c4d22f074392cb78fa0d7c5a9 +timeCreated: 1629464708 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_guopai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_guopai.mp3 new file mode 100644 index 00000000..282ba750 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_guopai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_guopai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_guopai.mp3.meta new file mode 100644 index 00000000..3cef6ff5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_guopai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f9d80b2cf8aeb14498cf5c4085e9e800 +timeCreated: 1629464711 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_kaipai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_kaipai.mp3 new file mode 100644 index 00000000..50ba9403 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_kaipai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_kaipai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_kaipai.mp3.meta new file mode 100644 index 00000000..65785a5a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_kaipai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a9a6fb357e73ce34f80b93413b914448 +timeCreated: 1629464709 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_03.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_03.mp3 new file mode 100644 index 00000000..2a6340cd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_03.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_03.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_03.mp3.meta new file mode 100644 index 00000000..8e8d4e9b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_03.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 802d385b6d8079e4398c87b8201991d6 +timeCreated: 1629464708 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_1.mp3 new file mode 100644 index 00000000..95f80bd7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_1.mp3.meta new file mode 100644 index 00000000..7a2088d2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 28ad8ed55880d6943a5f406881c0888d +timeCreated: 1629464705 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_12.mp3 new file mode 100644 index 00000000..8e7ae1c8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_12.mp3.meta new file mode 100644 index 00000000..a0266900 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: aba7ab5eb411af44caa53359077f6409 +timeCreated: 1629464709 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_13.mp3 new file mode 100644 index 00000000..406cc745 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_13.mp3.meta new file mode 100644 index 00000000..6fa11d28 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b28284c5795bdc74ca1d8f5e133e0ddf +timeCreated: 1629464709 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_2.mp3 new file mode 100644 index 00000000..a0a6e250 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_2.mp3.meta new file mode 100644 index 00000000..3a9be5ef --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3fe464a167d3ee945846488015ac04eb +timeCreated: 1629464706 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_22.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_22.mp3 new file mode 100644 index 00000000..5bcebb27 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_22.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_22.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_22.mp3.meta new file mode 100644 index 00000000..632a4b1e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_22.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3a8dc584378118f41b094a54e31f0d39 +timeCreated: 1629464706 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_23.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_23.mp3 new file mode 100644 index 00000000..a0e9ee81 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_23.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_23.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_23.mp3.meta new file mode 100644 index 00000000..7bd05a32 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_23.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 186597900d3b78646b91c3448d7e9d47 +timeCreated: 1629464704 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_3.mp3 new file mode 100644 index 00000000..2321b20f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_3.mp3.meta new file mode 100644 index 00000000..9d17bbd1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 02dac08ab7aa3e94d872691f2fdb33da +timeCreated: 1629464703 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_32.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_32.mp3 new file mode 100644 index 00000000..98cb7cc5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_32.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_32.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_32.mp3.meta new file mode 100644 index 00000000..b638b92d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_32.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ac3a446f06b31e54da0c2a7bd3c8246b +timeCreated: 1629464709 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_33.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_33.mp3 new file mode 100644 index 00000000..dd61bd9c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_33.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_33.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_33.mp3.meta new file mode 100644 index 00000000..699ad392 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_33.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 002fb94729fc1ae4c89215d8c39c4ce7 +timeCreated: 1629464703 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_4.mp3 new file mode 100644 index 00000000..655bcf35 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_4.mp3.meta new file mode 100644 index 00000000..dbde91f6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5e59a0db6f96b684495f3e1c0c2ca3f8 +timeCreated: 1629464707 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_42.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_42.mp3 new file mode 100644 index 00000000..6403ef48 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_42.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_42.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_42.mp3.meta new file mode 100644 index 00000000..a66bdd6d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_42.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 832d51bdf9ba91d42b3d1af8f70f18ed +timeCreated: 1629464708 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_43.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_43.mp3 new file mode 100644 index 00000000..3985fbba Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_43.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_43.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_43.mp3.meta new file mode 100644 index 00000000..965580bf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_43.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 46ad26324c1951440bf434d2713f7bb1 +timeCreated: 1629464706 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_5.mp3 new file mode 100644 index 00000000..c6ed30be Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_5.mp3.meta new file mode 100644 index 00000000..6961351b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9cc4a3633598bb445be1870223a9867d +timeCreated: 1629464709 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_52.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_52.mp3 new file mode 100644 index 00000000..f76fcfc0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_52.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_52.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_52.mp3.meta new file mode 100644 index 00000000..bf028d2e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_52.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 39b7039cf57a47d4d945195c6a6cdb91 +timeCreated: 1629464705 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_53.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_53.mp3 new file mode 100644 index 00000000..8dc6b101 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_53.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_53.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_53.mp3.meta new file mode 100644 index 00000000..bbbc93be --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_53.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 167400a3fb803d44785bef3250d97da7 +timeCreated: 1629464704 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_6.mp3 new file mode 100644 index 00000000..4c684e7e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_6.mp3.meta new file mode 100644 index 00000000..24729f5c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 122101c6f06e88d489461cdc159ca014 +timeCreated: 1629464704 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_62.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_62.mp3 new file mode 100644 index 00000000..0491daf7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_62.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_62.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_62.mp3.meta new file mode 100644 index 00000000..f21728bc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_62.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5497eb13ecb421e499980e440d10567e +timeCreated: 1629464707 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_63.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_63.mp3 new file mode 100644 index 00000000..1a259ef0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_63.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_63.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_63.mp3.meta new file mode 100644 index 00000000..f24aaa61 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_63.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0e89f159ab8f6144f9c239f23841ea3f +timeCreated: 1629464704 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_7.mp3 new file mode 100644 index 00000000..4e074bfa Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_7.mp3.meta new file mode 100644 index 00000000..c70db4a9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 85f1b82187a01714f83f5498409014df +timeCreated: 1629464708 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_72.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_72.mp3 new file mode 100644 index 00000000..1ccec02f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_72.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_72.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_72.mp3.meta new file mode 100644 index 00000000..e20bcd74 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_72.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6f7ebb79369b25842b4b1700760f3680 +timeCreated: 1629464707 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_73.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_73.mp3 new file mode 100644 index 00000000..2b7c6697 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_73.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_73.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_73.mp3.meta new file mode 100644 index 00000000..52263c3f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_73.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 57cc2eac7e078de428a29be194e17a6b +timeCreated: 1629464707 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_83.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_83.mp3 new file mode 100644 index 00000000..fd438b4b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_83.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_83.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_83.mp3.meta new file mode 100644 index 00000000..4bcc5e4d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_83.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 26300ddbea97601469138b7eed6e2f63 +timeCreated: 1629464705 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_8_8605063.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_8_8605063.mp3 new file mode 100644 index 00000000..94002487 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_8_8605063.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_8_8605063.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_8_8605063.mp3.meta new file mode 100644 index 00000000..edea4ca2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_8_8605063.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d45e3d35be000f14d90fd1b30fabc24f +timeCreated: 1629464710 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_9.mp3 new file mode 100644 index 00000000..aa71cafe Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_9.mp3.meta new file mode 100644 index 00000000..22d7056e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3211671c8d6dab54f951b5db9e2020e1 +timeCreated: 1629464705 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_93.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_93.mp3 new file mode 100644 index 00000000..da25f041 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_93.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_93.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_93.mp3.meta new file mode 100644 index 00000000..05d94d3d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_point_93.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a9b2cce0399de034cb41bbbc6ff866d7 +timeCreated: 1629464709 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_8.mp3 new file mode 100644 index 00000000..bcbebca4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_8.mp3.meta new file mode 100644 index 00000000..cb85d895 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a7a717ea73c48664f8910e6817da01cd +timeCreated: 1629464709 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_82.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_82.mp3 new file mode 100644 index 00000000..0fbd613a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_82.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_82.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_82.mp3.meta new file mode 100644 index 00000000..2f1debf6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_82.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d366f5066b291f1449eb7b45a8629c57 +timeCreated: 1629464710 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_9.mp3 new file mode 100644 index 00000000..1e1c00f0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_9.mp3.meta new file mode 100644 index 00000000..e933d36b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 866263b03fb160249885f53225bdcf95 +timeCreated: 1629464708 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_92.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_92.mp3 new file mode 100644 index 00000000..07899296 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_92.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_92.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_92.mp3.meta new file mode 100644 index 00000000..0fab5792 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_tian_92.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6d4a37051a8d0fc44818796ea5e7a7c9 +timeCreated: 1629464707 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_10.mp3 new file mode 100644 index 00000000..a4994d95 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_10.mp3.meta new file mode 100644 index 00000000..1f271f2f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7d6463823a51bfe4cb40882c25134380 +timeCreated: 1629464707 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_20.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_20.mp3 new file mode 100644 index 00000000..03179d6c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_20.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_20.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_20.mp3.meta new file mode 100644 index 00000000..169573fc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_20.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 35fdf58971d84d84586c924abbadc2a5 +timeCreated: 1629464705 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_4.mp3 new file mode 100644 index 00000000..d339ca33 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_4.mp3.meta new file mode 100644 index 00000000..ff64cce1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6515745dcdfea114e92ee9fec62a88d6 +timeCreated: 1629464707 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_5.mp3 new file mode 100644 index 00000000..27ca3917 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_5.mp3.meta new file mode 100644 index 00000000..4c0284d7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c4309d322ae32ea45bedf9ce341b806b +timeCreated: 1629464710 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_8.mp3 new file mode 100644 index 00000000..1ae8d953 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_8.mp3.meta new file mode 100644 index 00000000..bd632bb8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/man/ms_sound_type_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3c343bf89934cb547bb1aa7e690a0e3c +timeCreated: 1629464706 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/mopai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/mopai.mp3 new file mode 100644 index 00000000..5ef6b1e2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/mopai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/mopai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/mopai.mp3.meta new file mode 100644 index 00000000..fd115f5b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/mopai.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 449f0d5471dd1ea44bf864808dcfaefa +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_fapai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_fapai.mp3 new file mode 100644 index 00000000..767950b8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_fapai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_fapai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_fapai.mp3.meta new file mode 100644 index 00000000..22d18cd5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_fapai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ae7a243e4d154354c996fbfbd3128b67 +timeCreated: 1630578824 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_flychips.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_flychips.mp3 new file mode 100644 index 00000000..cea21deb Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_flychips.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_flychips.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_flychips.mp3.meta new file mode 100644 index 00000000..8611f497 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_flychips.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 756b12e83a54a77458a4f6745bd99f7c +timeCreated: 1630578824 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_randbanker.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_randbanker.mp3 new file mode 100644 index 00000000..24b16748 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_randbanker.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_randbanker.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_randbanker.mp3.meta new file mode 100644 index 00000000..0ee43e2e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_randbanker.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fab739c8cbccf0f41b34494815fb1da6 +timeCreated: 1630668914 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_win.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_win.mp3 new file mode 100644 index 00000000..efa522fd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_win.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_win.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_win.mp3.meta new file mode 100644 index 00000000..23e53af0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/ms_sound_win.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0f439f57c5e7cad44a20c721cb47bd43 +timeCreated: 1630657372 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/sunzi.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/sunzi.mp3 new file mode 100644 index 00000000..dd74ce61 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/sunzi.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/sunzi.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/sunzi.mp3.meta new file mode 100644 index 00000000..666c96ef --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/sunzi.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: c6247bc8d0fcae641b205c4d70a88a9b +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman.meta new file mode 100644 index 00000000..05aeaa1a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5b932424e95020d4f89bc6e082d758d7 +folderAsset: yes +timeCreated: 1513927546 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao0.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao0.mp3 new file mode 100644 index 00000000..77b1ec5e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao0.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao0.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao0.mp3.meta new file mode 100644 index 00000000..e5cd2d84 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao0.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7b4ca76170ea11a4ba11dcbafff5b2fd +timeCreated: 1630580090 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao1.mp3 new file mode 100644 index 00000000..fbb5ed57 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao1.mp3.meta new file mode 100644 index 00000000..6db748df --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 10e853737095ae945b9db4a2490f01cc +timeCreated: 1630580090 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao2.mp3 new file mode 100644 index 00000000..7a70b14d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao2.mp3.meta new file mode 100644 index 00000000..97f868a6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: aebbea374d29f014c9ac0f53bd7867ae +timeCreated: 1630580090 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao3.mp3 new file mode 100644 index 00000000..961f701a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao3.mp3.meta new file mode 100644 index 00000000..b3f59329 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/buyao3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1a488f5b6bb61b34b8958036a7ab6653 +timeCreated: 1630580090 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_0.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_0.mp3 new file mode 100644 index 00000000..7c2e5775 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_0.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_0.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_0.mp3.meta new file mode 100644 index 00000000..ca2d655d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_0.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 76a0432f3b6ad584a835e41e8fab0194 +timeCreated: 1630580565 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_1.mp3 new file mode 100644 index 00000000..be10dddc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_1.mp3.meta new file mode 100644 index 00000000..c05576c9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: db2b38147e44af24194a798daf2148d7 +timeCreated: 1630580565 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_2.mp3 new file mode 100644 index 00000000..316ef15e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_2.mp3.meta new file mode 100644 index 00000000..fc65a4a1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 49a3e33a4718b714bbc05c25d3985963 +timeCreated: 1630580565 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_3.mp3 new file mode 100644 index 00000000..452a1602 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_3.mp3.meta new file mode 100644 index 00000000..368e9f0d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/jiaofen_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 704402a37b170854eb63712a8342a910 +timeCreated: 1630580565 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bankerlose.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bankerlose.mp3 new file mode 100644 index 00000000..f9443605 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bankerlose.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bankerlose.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bankerlose.mp3.meta new file mode 100644 index 00000000..bc8c7145 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bankerlose.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0581827ed105ee9479738fa1be967911 +timeCreated: 1629510119 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bankerwin.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bankerwin.mp3 new file mode 100644 index 00000000..30598ac7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bankerwin.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bankerwin.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bankerwin.mp3.meta new file mode 100644 index 00000000..34cc8469 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bankerwin.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b986fdec06159f34b9d9c3f53b2ed9e4 +timeCreated: 1629510125 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bipai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bipai.mp3 new file mode 100644 index 00000000..ddda8e4d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bipai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bipai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bipai.mp3.meta new file mode 100644 index 00000000..2fd333cf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bipai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2a2c0e1e4cfe34948887589a619875e0 +timeCreated: 1629510120 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bupai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bupai.mp3 new file mode 100644 index 00000000..be55023d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bupai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bupai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bupai.mp3.meta new file mode 100644 index 00000000..0e2d4fe8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_bupai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c03b803a20121424e8fb914ffd2f106f +timeCreated: 1629510125 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_guo.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_guo.mp3 new file mode 100644 index 00000000..081218b1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_guo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_guo.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_guo.mp3.meta new file mode 100644 index 00000000..19079eb3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_guo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 65144b83e6110e848b57d026169721fa +timeCreated: 1629510122 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_kaipai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_kaipai.mp3 new file mode 100644 index 00000000..4ed652cc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_kaipai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_kaipai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_kaipai.mp3.meta new file mode 100644 index 00000000..cabac570 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_kaipai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 852af349207492940a612a3afd95850c +timeCreated: 1629510123 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_needpoker.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_needpoker.mp3 new file mode 100644 index 00000000..85463065 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_needpoker.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_needpoker.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_needpoker.mp3.meta new file mode 100644 index 00000000..a29730e1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_needpoker.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5f9ede9536554574887db6cbc947d913 +timeCreated: 1629510122 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_03.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_03.mp3 new file mode 100644 index 00000000..06569aea Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_03.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_03.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_03.mp3.meta new file mode 100644 index 00000000..bd61174e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_03.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8ce3bf1a68d30a649b3091fe325d445c +timeCreated: 1629510124 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_1.mp3 new file mode 100644 index 00000000..3f0670af Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_1.mp3.meta new file mode 100644 index 00000000..fd8c771d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4362959deb227be43afcfc95cac60292 +timeCreated: 1629510121 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_12.mp3 new file mode 100644 index 00000000..04a9caee Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_12.mp3.meta new file mode 100644 index 00000000..85a6b831 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7dfcb3ac493b5e74caa7fa098a997891 +timeCreated: 1629510123 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_13.mp3 new file mode 100644 index 00000000..2efef6c8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_13.mp3.meta new file mode 100644 index 00000000..f29ad28b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e195c79fa2b8af247a903776ccfc64a8 +timeCreated: 1629510126 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_2.mp3 new file mode 100644 index 00000000..cb7d5a63 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_2.mp3.meta new file mode 100644 index 00000000..16d70be6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b33afca6120121348893cab731dbd160 +timeCreated: 1629510125 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_22.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_22.mp3 new file mode 100644 index 00000000..6b932a56 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_22.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_22.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_22.mp3.meta new file mode 100644 index 00000000..25323b22 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_22.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8b5bebaef470345458dac9acd19b30cb +timeCreated: 1629510124 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_23.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_23.mp3 new file mode 100644 index 00000000..d216ddfd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_23.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_23.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_23.mp3.meta new file mode 100644 index 00000000..12dc69e3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_23.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a02df4348b8c6f846bb884d19f7a0005 +timeCreated: 1629510125 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_3.mp3 new file mode 100644 index 00000000..c4531c92 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_3.mp3.meta new file mode 100644 index 00000000..3637af40 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bf4f45bc6053f684797b1434d69bfaca +timeCreated: 1629510125 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_32.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_32.mp3 new file mode 100644 index 00000000..516471c3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_32.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_32.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_32.mp3.meta new file mode 100644 index 00000000..31b1ea22 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_32.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6f4f2c96b99e1c744b760920a19afe57 +timeCreated: 1629510122 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_33.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_33.mp3 new file mode 100644 index 00000000..6b786ce1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_33.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_33.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_33.mp3.meta new file mode 100644 index 00000000..56207928 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_33.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3a1f4643f1f3fb94f8adec82728f1b80 +timeCreated: 1629510121 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_4.mp3 new file mode 100644 index 00000000..bb4852ac Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_4.mp3.meta new file mode 100644 index 00000000..d9819db6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 71da80d0c87d58e4cbf4b0c6336dc55a +timeCreated: 1629510123 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_42.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_42.mp3 new file mode 100644 index 00000000..09a07d6f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_42.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_42.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_42.mp3.meta new file mode 100644 index 00000000..be2e7043 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_42.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 96201f4fc88c8c846803034e2cb34d97 +timeCreated: 1629510124 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_43.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_43.mp3 new file mode 100644 index 00000000..df5b6168 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_43.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_43.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_43.mp3.meta new file mode 100644 index 00000000..bc287b9d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_43.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 73f683e7a70f8e9478f775f142758312 +timeCreated: 1629510123 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_5.mp3 new file mode 100644 index 00000000..2c6777b6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_5.mp3.meta new file mode 100644 index 00000000..6b86e39e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 917ea53aef6253348849cc6f43097414 +timeCreated: 1629510124 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_52.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_52.mp3 new file mode 100644 index 00000000..ceb42e8e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_52.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_52.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_52.mp3.meta new file mode 100644 index 00000000..c5179d90 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_52.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9247bf1078d57d54fab9a48b2b633e08 +timeCreated: 1629510124 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_53.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_53.mp3 new file mode 100644 index 00000000..e1f27ade Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_53.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_53.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_53.mp3.meta new file mode 100644 index 00000000..b11141e0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_53.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 00f3775531287e44cbbe5855014e5a4e +timeCreated: 1629510119 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_6.mp3 new file mode 100644 index 00000000..9485b6a9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_6.mp3.meta new file mode 100644 index 00000000..39a55d56 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4f33542b2f3266f469b8340663c06dfd +timeCreated: 1629510122 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_62.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_62.mp3 new file mode 100644 index 00000000..eae9559a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_62.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_62.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_62.mp3.meta new file mode 100644 index 00000000..fd6c1d78 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_62.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 84efee9936ff87741b3d3b0da9799e39 +timeCreated: 1629510123 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_63.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_63.mp3 new file mode 100644 index 00000000..9f8a84d9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_63.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_63.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_63.mp3.meta new file mode 100644 index 00000000..153b5ab2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_63.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 78748a487a38a9540ad295fa66ca54c2 +timeCreated: 1629510123 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_7.mp3 new file mode 100644 index 00000000..747028f1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_7.mp3.meta new file mode 100644 index 00000000..fcff987f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e919f415f4054f14f857d06c1221e57b +timeCreated: 1629510126 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_72.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_72.mp3 new file mode 100644 index 00000000..058eff8e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_72.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_72.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_72.mp3.meta new file mode 100644 index 00000000..06537cb4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_72.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9e365c1882a8c2e45b84db418f7c4293 +timeCreated: 1629510125 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_73.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_73.mp3 new file mode 100644 index 00000000..2d2a8b5b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_73.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_73.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_73.mp3.meta new file mode 100644 index 00000000..8d4d7a76 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_73.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 580b332fee7989f46bee1545558e90bf +timeCreated: 1629510122 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_8.mp3 new file mode 100644 index 00000000..be7fba63 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_8.mp3.meta new file mode 100644 index 00000000..f6576a28 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e2cf718286d885d46bb3ed499b008591 +timeCreated: 1629510126 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_83.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_83.mp3 new file mode 100644 index 00000000..a755efad Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_83.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_83.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_83.mp3.meta new file mode 100644 index 00000000..19bbb15f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_83.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ef356af38cf214f4b83cf8ec6ee34170 +timeCreated: 1629510127 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_9.mp3 new file mode 100644 index 00000000..c02d8080 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_9.mp3.meta new file mode 100644 index 00000000..9c886d9c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3f7fe991f558d4a4293eb0dc4a76c2aa +timeCreated: 1629510121 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_93.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_93.mp3 new file mode 100644 index 00000000..9efdc53b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_93.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_93.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_93.mp3.meta new file mode 100644 index 00000000..585d7779 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_point_93.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 26e3539978334574eaeeb5537034c547 +timeCreated: 1629510120 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_startbanker.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_startbanker.mp3 new file mode 100644 index 00000000..79464e92 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_startbanker.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_startbanker.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_startbanker.mp3.meta new file mode 100644 index 00000000..2db05708 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_startbanker.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 16d95411519d3e24195ec2f21d2eaa53 +timeCreated: 1629510119 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_startbet.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_startbet.mp3 new file mode 100644 index 00000000..d5fee451 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_startbet.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_startbet.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_startbet.mp3.meta new file mode 100644 index 00000000..8e662a20 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_startbet.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1f76d16f6acaf1441b50b2edc3c060f7 +timeCreated: 1629510120 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_8.mp3 new file mode 100644 index 00000000..387c1199 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_8.mp3.meta new file mode 100644 index 00000000..5c869f12 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a3fdf950dd85839429a5bbe6c549d9b5 +timeCreated: 1629510125 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_82_967c999.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_82_967c999.mp3 new file mode 100644 index 00000000..0b98d1ea Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_82_967c999.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_82_967c999.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_82_967c999.mp3.meta new file mode 100644 index 00000000..e8898219 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_82_967c999.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9cf10351a828f444eb95f5b5dd752358 +timeCreated: 1629510125 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_9.mp3 new file mode 100644 index 00000000..73f57481 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_9.mp3.meta new file mode 100644 index 00000000..181eda82 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 98068c571fa66414f87008a76efef4a1 +timeCreated: 1629510124 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_92.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_92.mp3 new file mode 100644 index 00000000..fda4c6b6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_92.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_92.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_92.mp3.meta new file mode 100644 index 00000000..fcf6a1f1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_tian_92.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c5e171d32aecd93488c121248e4e8cbf +timeCreated: 1629510126 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_10_2e31bc2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_10_2e31bc2.mp3 new file mode 100644 index 00000000..d7f0132a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_10_2e31bc2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_10_2e31bc2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_10_2e31bc2.mp3.meta new file mode 100644 index 00000000..f680c764 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_10_2e31bc2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 13befce5604c05249b9d92239fcb305e +timeCreated: 1629510119 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_20_53cb03e.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_20_53cb03e.mp3 new file mode 100644 index 00000000..d114e3a9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_20_53cb03e.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_20_53cb03e.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_20_53cb03e.mp3.meta new file mode 100644 index 00000000..10de0935 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_20_53cb03e.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1a25bc90a42ec674ca5bc1a060f4bf91 +timeCreated: 1629510119 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_4.mp3 new file mode 100644 index 00000000..327d09c2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_4.mp3.meta new file mode 100644 index 00000000..76ee4151 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 374e77457b4c7964bbe9711405f08900 +timeCreated: 1629510120 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_5.mp3 new file mode 100644 index 00000000..061cbc72 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_5.mp3.meta new file mode 100644 index 00000000..ecbb71bd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 87105acde5dd2d94e8a590f4d5576fd0 +timeCreated: 1629510124 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_8.mp3 new file mode 100644 index 00000000..5b5f30d1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_8.mp3.meta new file mode 100644 index 00000000..df760cc3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_type_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 446e2bb320d6bb74dafe6b3aa0de0ca7 +timeCreated: 1629510121 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_bankerwin.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_bankerwin.mp3 new file mode 100644 index 00000000..26ecd92f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_bankerwin.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_bankerwin.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_bankerwin.mp3.meta new file mode 100644 index 00000000..9af844a4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_bankerwin.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f8d8246901cf1b44f9ffc7c3fba966ef +timeCreated: 1629510127 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_bipai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_bipai.mp3 new file mode 100644 index 00000000..4a28fb2c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_bipai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_bipai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_bipai.mp3.meta new file mode 100644 index 00000000..70be6629 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_bipai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7e726b7cb82668d42aee7043dbb0663b +timeCreated: 1629510123 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_bupai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_bupai.mp3 new file mode 100644 index 00000000..338c0913 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_bupai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_bupai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_bupai.mp3.meta new file mode 100644 index 00000000..11118fa9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_bupai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9495d5ebb6c9d4741ac2818857051827 +timeCreated: 1629510124 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_guo.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_guo.mp3 new file mode 100644 index 00000000..5c2a504e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_guo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_guo.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_guo.mp3.meta new file mode 100644 index 00000000..0674cda3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_guo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0eba16520eed7114984d60bc7877bf4e +timeCreated: 1629510119 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_kaipai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_kaipai.mp3 new file mode 100644 index 00000000..515c4e8f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_kaipai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_kaipai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_kaipai.mp3.meta new file mode 100644 index 00000000..e8dd5e61 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_kaipai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 70844b7c1fbac7c4e959c3d458a9b57b +timeCreated: 1629510123 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_needpoker.mp3 b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_needpoker.mp3 new file mode 100644 index 00000000..358dc950 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_needpoker.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_needpoker.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_needpoker.mp3.meta new file mode 100644 index 00000000..b1cc0413 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/sound/woman/ms_sound_woman_1_needpoker.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6fdd2b46ad656364299cb652785650ed +timeCreated: 1629510122 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/ui.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/ui.meta new file mode 100644 index 00000000..7ed8fc32 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d84cdbd5d9e4e704a852d369427c038d +folderAsset: yes +timeCreated: 1628495307 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/ui/Extend_Poker_MuShi_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker/mushi/ui/Extend_Poker_MuShi_fui.bytes new file mode 100644 index 00000000..33a560c5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/ui/Extend_Poker_MuShi_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/ui/Extend_Poker_MuShi_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/ui/Extend_Poker_MuShi_fui.bytes.meta new file mode 100644 index 00000000..c4838b2f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/ui/Extend_Poker_MuShi_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: df681fe1b2978334b9a47ec5a9de9f9c +timeCreated: 1638452730 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/ui/Info_Poker_MuShi_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker/mushi/ui/Info_Poker_MuShi_fui.bytes new file mode 100644 index 00000000..1dce79e0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/mushi/ui/Info_Poker_MuShi_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/mushi/ui/Info_Poker_MuShi_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/poker/mushi/ui/Info_Poker_MuShi_fui.bytes.meta new file mode 100644 index 00000000..4900bb13 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/mushi/ui/Info_Poker_MuShi_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2eed052072ded814a9a6f941e8797fe5 +timeCreated: 1638452880 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast.meta new file mode 100644 index 00000000..4bb1c854 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8176389ab31e78345b9d99a1b2469687 +folderAsset: yes +timeCreated: 1561176569 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/bg.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/bg.meta new file mode 100644 index 00000000..13062033 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/bg.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f47f42a17e6ef694eb2a836413a86ca2 +folderAsset: yes +timeCreated: 1564626492 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/bg/bg1.png b/wb_unity_pro/Assets/ART/extend/poker/runfast/bg/bg1.png new file mode 100644 index 00000000..b0119cd7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/bg/bg1.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/bg/bg1.png.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/bg/bg1.png.meta new file mode 100644 index 00000000..ba9d1e16 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/bg/bg1.png.meta @@ -0,0 +1,128 @@ +fileFormatVersion: 2 +guid: ca1023f22b55ce74eb95a7010d716600 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: extend/poker/runfast/c1a3cd841518fe15b4bf8fc5591293e0 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/bg/bg2.png b/wb_unity_pro/Assets/ART/extend/poker/runfast/bg/bg2.png new file mode 100644 index 00000000..bb6e1a8b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/bg/bg2.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/bg/bg2.png.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/bg/bg2.png.meta new file mode 100644 index 00000000..5164f6b0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/bg/bg2.png.meta @@ -0,0 +1,128 @@ +fileFormatVersion: 2 +guid: d24aafaf47b20684f9e6c500bf2d6605 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: extend/poker/runfast/d84d681357c7f46db6d24b7eaae95b36 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/bg/bg3.png b/wb_unity_pro/Assets/ART/extend/poker/runfast/bg/bg3.png new file mode 100644 index 00000000..e11e9413 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/bg/bg3.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/bg/bg3.png.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/bg/bg3.png.meta new file mode 100644 index 00000000..9e3d8838 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/bg/bg3.png.meta @@ -0,0 +1,128 @@ +fileFormatVersion: 2 +guid: c9916e46801228c468d9f8ab835ea725 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: extend/poker/runfast/879cb25bbed3181c1c5b171c7fe92713 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound.meta new file mode 100644 index 00000000..34ee906a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9b11da758ba785a49b825ef938a9deb3 +folderAsset: yes +timeCreated: 1561178583 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/bgm1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/bgm1.mp3 new file mode 100644 index 00000000..ee475732 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/bgm1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/bgm1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/bgm1.mp3.meta new file mode 100644 index 00000000..5f66d761 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/bgm1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 83e92cb43b7624747af78bbbafa00bb7 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/e303a4c4a7a0a0e78fbc53b93e64f12d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/chupai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/chupai.mp3 new file mode 100644 index 00000000..d3452cb3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/chupai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/chupai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/chupai.mp3.meta new file mode 100644 index 00000000..930311ff --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/chupai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c5b23701958a322489b67772314135bb +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/174dda4bfcbbc119fd72be8a5d329299 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/click.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/click.mp3 new file mode 100644 index 00000000..c90ed0e5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/click.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/click.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/click.mp3.meta new file mode 100644 index 00000000..79847e3d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/click.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bdb838e0c47dc5741b434c03261db477 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/6113ad4060eda361ef4e33f85923d529 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/fapai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/fapai.mp3 new file mode 100644 index 00000000..8babaa08 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/fapai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/fapai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/fapai.mp3.meta new file mode 100644 index 00000000..799f935f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/fapai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6a222edca6b23954d8c719591996fe6d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/6f71d799a0e9649dd5f17241d5248a1f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man.meta new file mode 100644 index 00000000..970c1029 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5cc482a4cd795554d9022d1ba5e235b4 +folderAsset: yes +timeCreated: 1513927546 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/10.mp3 new file mode 100644 index 00000000..4f358f65 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/10.mp3.meta new file mode 100644 index 00000000..5738acef --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e8ed0ae102e010842a17b25d5e09265d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/8eeadadeeba6a7456d776aac0b07a6b3 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/11.mp3 new file mode 100644 index 00000000..1670d392 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/11.mp3.meta new file mode 100644 index 00000000..ac104a7b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4223924b617d05c45ac4ed2533675f01 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/475694b62d0515696e70b489687a6c6a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_10.mp3 new file mode 100644 index 00000000..6729bec7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_10.mp3.meta new file mode 100644 index 00000000..fa691575 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9f7535e0400dee04abdb2b53ae5afd97 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/24b47df63d638cc9e13a40cdf87d0457 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_11.mp3 new file mode 100644 index 00000000..5b428ef9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_11.mp3.meta new file mode 100644 index 00000000..5c6db823 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e477dda262df70d49a1f3437d70292ef +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/da07d96aa7b2a0c8bca5ad5e28aa1d51 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_12.mp3 new file mode 100644 index 00000000..395e2cee Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_12.mp3.meta new file mode 100644 index 00000000..65e19db8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 51052307a7aa7b14890111864e246d14 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/b19d3868de0d47dd8a92696366c22ed8 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_13.mp3 new file mode 100644 index 00000000..9a544470 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_13.mp3.meta new file mode 100644 index 00000000..ba83bba6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 724a37965737d084793d658032acaf60 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/3753838579d4e7778ae71dc0c927b601 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_14.mp3 new file mode 100644 index 00000000..7c1b4635 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_14.mp3.meta new file mode 100644 index 00000000..36b59084 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ceb93152d94c17644888622375e63e00 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/64526c3073407577ebf1e682d237b33e + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_15.mp3 new file mode 100644 index 00000000..94101e22 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_15.mp3.meta new file mode 100644 index 00000000..5f021975 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_15.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7aeb75ee6e3b84042b5ece2f25c515a6 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/a3970b49698c3ed1332cda0c1dbdd802 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_3.mp3 new file mode 100644 index 00000000..c5d9a9fd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_3.mp3.meta new file mode 100644 index 00000000..1b57d296 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: eecf07ae8731dd54191aa6f0a8993825 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/8343b96ddd39e33bf9cd1cc74d162322 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_4.mp3 new file mode 100644 index 00000000..848ee03b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_4.mp3.meta new file mode 100644 index 00000000..d99bd6b1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 84957e8f5ca77ac4bb32f1845feb811d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/72fb4007bf6aeda52d46c803e1568e72 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_5.mp3 new file mode 100644 index 00000000..afcfcd48 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_5.mp3.meta new file mode 100644 index 00000000..6668316f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 735ff8d9eb9716d408aa7819cdb27269 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/294a93667c1a2ea57b59de7166cfa3bf + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_6.mp3 new file mode 100644 index 00000000..f6b10188 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_6.mp3.meta new file mode 100644 index 00000000..0a64cef4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 60ed65e146395a249ac6e4916af198c5 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/c3d4056c9b37c709e64717fe8247c8fd + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_7.mp3 new file mode 100644 index 00000000..2ef2c4f8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_7.mp3.meta new file mode 100644 index 00000000..0eec09a7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fcf59c118274e22438e6e9d486d02f9c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/71ca65ac3f81fb70f86835395b100011 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_8.mp3 new file mode 100644 index 00000000..dc04ec4e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_8.mp3.meta new file mode 100644 index 00000000..475341bb --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2ecb3bbca2da5de498dc6193f61a9634 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/92ceb5a466af79cd13951b1972d61761 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_9.mp3 new file mode 100644 index 00000000..eace6671 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_9.mp3.meta new file mode 100644 index 00000000..931304bf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/1_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bff578243f4619849a9834881355e71f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/bf20ef753f9acd65fed8fe5ea46e1901 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_10.mp3 new file mode 100644 index 00000000..9a0137ec Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_10.mp3.meta new file mode 100644 index 00000000..f7d7d0ed --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 94ceaa4a8e5e30d4ba0940669cb085c5 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/1a77037ed70a0b3fc71b0ee4a451d62d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_11.mp3 new file mode 100644 index 00000000..feeab0fd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_11.mp3.meta new file mode 100644 index 00000000..ff3479d8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1704049733ad8ec428402686e0ccbccc +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/ef368e2d74449fa955778e8fc3c07eff + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_12.mp3 new file mode 100644 index 00000000..fcc0c6c5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_12.mp3.meta new file mode 100644 index 00000000..e8c8b212 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6f15ab14126f18645af8f41e51f47461 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/7e7bc429eac0c93ce425cd181c8b812c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_13.mp3 new file mode 100644 index 00000000..00a0ca34 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_13.mp3.meta new file mode 100644 index 00000000..90130a4a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0788cec4e608ac04c959eaff82929879 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/ecdcb7020789f55fe8cf27e57ce41ad3 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_14.mp3 new file mode 100644 index 00000000..62787230 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_14.mp3.meta new file mode 100644 index 00000000..f2cc7c5b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8e9aa294563714d4dbfc13c87dbe24d8 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/b33a68130e97687168e66aced88003a8 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_15.mp3 new file mode 100644 index 00000000..410ed47f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_15.mp3.meta new file mode 100644 index 00000000..80aa25f4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_15.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 533acfb65170a8641a630522fa638568 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/71a093cbdb7741026cb0973ea591ef4f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_3.mp3 new file mode 100644 index 00000000..600ed068 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_3.mp3.meta new file mode 100644 index 00000000..6638a8f5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 43f987ed2e91e314a969f8fae567dad6 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/5a3a7bcb62b2fe87370d3bce261a653b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_4.mp3 new file mode 100644 index 00000000..ba5719a0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_4.mp3.meta new file mode 100644 index 00000000..2e9328d0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e92749fff4a80ee4290520e3cc619791 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/08d06230e7c94dde392c6f126648047a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_5.mp3 new file mode 100644 index 00000000..e9e790be Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_5.mp3.meta new file mode 100644 index 00000000..eae86fd6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 60a9a2daf76c9304d80b4ca7ee7264ab +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/ccd280667f652107da868cec7894cec7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_6.mp3 new file mode 100644 index 00000000..74a35934 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_6.mp3.meta new file mode 100644 index 00000000..8ae0bb82 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5fe0d042edcbc2446b6f8a75d59b2f18 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/d2e0349c4416a4609b25df7ef186cf4c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_7.mp3 new file mode 100644 index 00000000..fabd1c8b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_7.mp3.meta new file mode 100644 index 00000000..939a5ce5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ac3e84504d85da14999d4270817ff1f7 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/cb3e98ab58c0bb43268ed2ae8afb2299 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_8.mp3 new file mode 100644 index 00000000..3fe390b3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_8.mp3.meta new file mode 100644 index 00000000..faf938f6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f75f8bb636eedcf4590f1d38a67bc788 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/5f04176affb5a5860a608dcc649219e7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_9.mp3 new file mode 100644 index 00000000..95467aaf Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_9.mp3.meta new file mode 100644 index 00000000..de871e96 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/2_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d6600eb16c2b6fd42a32924336e82ecc +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/1d49d95884cd4f111c4c09270a4fd4d9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_10.mp3 new file mode 100644 index 00000000..7f3d7494 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_10.mp3.meta new file mode 100644 index 00000000..d64ba073 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f9a67fa20b3934d48a18354bb49d0dae +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/97cdaa7e57917321e5cd3ce6241deb90 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_11.mp3 new file mode 100644 index 00000000..4913912f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_11.mp3.meta new file mode 100644 index 00000000..1ee5b36a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a512836a4fd6ee74c94090a9a3212203 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/790562c4a5956fcb040eacbfd8d84ea4 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_12.mp3 new file mode 100644 index 00000000..ee0c6429 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_12.mp3.meta new file mode 100644 index 00000000..aebf722c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ace3478c8d0efa445b321f578f5d5cca +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/fa82eb0a9e33476841389e2def56247f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_13.mp3 new file mode 100644 index 00000000..e62af3f4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_13.mp3.meta new file mode 100644 index 00000000..3d13767e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 493805a675208f54faf51fec4c36c897 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/e70016b0d1ada8de545cedaff6886eb0 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_14.mp3 new file mode 100644 index 00000000..33de32dd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_14.mp3.meta new file mode 100644 index 00000000..05c89452 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1c3441495656d7640a12ad74f09d1bf7 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/e0e53e3f78eca99f99c6710cb1f7be03 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_15.mp3 new file mode 100644 index 00000000..8bd6abfc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_15.mp3.meta new file mode 100644 index 00000000..fe41a316 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_15.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3f998f0d4d6430e4993f001d5400fda1 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/988e6e5222e1c963edeceeaca876159f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_3.mp3 new file mode 100644 index 00000000..474ed768 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_3.mp3.meta new file mode 100644 index 00000000..d44d3e65 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 287b108776c119b4dafbfeb2e1bd4dcc +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/042a4acb34b66e0e705722cefd1f06c7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_4.mp3 new file mode 100644 index 00000000..8b40cbef Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_4.mp3.meta new file mode 100644 index 00000000..5f56d44c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 796e65f7aafe5104b9465c542054d1e7 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/bd0871b79ec7a8e4998a1128da687b46 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_5.mp3 new file mode 100644 index 00000000..d8b04546 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_5.mp3.meta new file mode 100644 index 00000000..0219095a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 87784b09a73494f478864ed8caa80c9a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/0b8dbf4109166c09799b398e0cebbf33 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_6.mp3 new file mode 100644 index 00000000..e7fa7e62 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_6.mp3.meta new file mode 100644 index 00000000..edcbb756 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 00f7e62e8a37c7c4481f8cfb30f80b38 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/f8ec56c53fa10bae5e822ce83a4f7c06 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_7.mp3 new file mode 100644 index 00000000..c01fe5ba Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_7.mp3.meta new file mode 100644 index 00000000..e4461bd6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 375a05924ebb65649b7abf8710d0ed00 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/fc9215fd48edc29fe6ed38e3235e8d62 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_8.mp3 new file mode 100644 index 00000000..4ec4b445 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_8.mp3.meta new file mode 100644 index 00000000..0db63e44 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: feba15bbbafdcd146a0913f54083db15 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/7094927f3fbe5db4e273d87f68c860f2 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_9.mp3 new file mode 100644 index 00000000..7aea3a92 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_9.mp3.meta new file mode 100644 index 00000000..4c98ab08 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/3_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fd7901f3834767f4fa4ed907067cb4be +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/0e4783d32097f8c10c34bf180ff61e62 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/4.mp3 new file mode 100644 index 00000000..53eb9196 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/4.mp3.meta new file mode 100644 index 00000000..2bc133fc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 41fe9af6e6f75b94e817bff63851ade9 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/6a83b99dcdcce3ed48a580c5313e708b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/6.mp3 new file mode 100644 index 00000000..563871d3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/6.mp3.meta new file mode 100644 index 00000000..726ce1d8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fabd3b04ec58f5245ae48879da15ba49 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/1556aaf6e4fa75cbcbe720f46d25fd09 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/7.mp3 new file mode 100644 index 00000000..b2f7a2d5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/7.mp3.meta new file mode 100644 index 00000000..02d7ec94 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 07d921c848e976c47ad78104b25b47db +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/d270f7f73220df26d0b51fa217fe665c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/card_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/card_1.mp3 new file mode 100644 index 00000000..e39676cb Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/card_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/card_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/card_1.mp3.meta new file mode 100644 index 00000000..5f837b55 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/card_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2c3f89c32f59cbe418671eb6988db16f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/0ee690ce612ec050aad0af3df7ad094e + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/card_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/card_2.mp3 new file mode 100644 index 00000000..4f399607 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/card_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/card_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/card_2.mp3.meta new file mode 100644 index 00000000..226f0ce4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/card_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0e0e99552b19f994d9af44f189ef85a6 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/dd0f342ba7fbe2a9f05b26b4f3768e32 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/dani_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/dani_1.mp3 new file mode 100644 index 00000000..87028b18 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/dani_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/dani_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/dani_1.mp3.meta new file mode 100644 index 00000000..5182f2af --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/dani_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3dda373c465e96a4bb13539f0f527f72 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/9d827772d11ea90dac59fab3162cf4ce + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/dani_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/dani_2.mp3 new file mode 100644 index 00000000..40549d55 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/dani_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/dani_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/dani_2.mp3.meta new file mode 100644 index 00000000..2ec7d4f6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/dani_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4eb851cbaaab4744b98f947ade2f9375 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/bb96d3d76997ef54a8ee66fcaffdb745 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/dani_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/dani_3.mp3 new file mode 100644 index 00000000..31d48947 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/dani_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/dani_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/dani_3.mp3.meta new file mode 100644 index 00000000..eda1691b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/dani_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 53d1af1903593784399fedafee24d57a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/cf3bec055fca1ae4f4bab6273063cbdb + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_1.mp3 new file mode 100644 index 00000000..ab664e8e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_1.mp3.meta new file mode 100644 index 00000000..75bfca1c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 18267809b818da44fb05b8d35b944609 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/1abb0fa44809332358e49edb7b648917 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_2.mp3 new file mode 100644 index 00000000..80bb9be2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_2.mp3.meta new file mode 100644 index 00000000..a02eb18b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 63ca5f34f28a8f64ba86461ef61b1d46 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/86db7848d547da1d11b5e9b67e8b786f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_3.mp3 new file mode 100644 index 00000000..ebc53ff9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_3.mp3.meta new file mode 100644 index 00000000..0ff13740 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2d76f247dc56bc848b6d0a6bf0db01e4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/d19ba601585363847d650a3a4596b7b9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_4.mp3 new file mode 100644 index 00000000..b48e7145 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_4.mp3.meta new file mode 100644 index 00000000..582ca630 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/man/pass_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 66462673c4a606b46b9e80eaf5d5be19 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/3f8dd3301ce0d919821756e61ae8c6e6 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/mopai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/mopai.mp3 new file mode 100644 index 00000000..5ef6b1e2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/mopai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/mopai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/mopai.mp3.meta new file mode 100644 index 00000000..6a11f4b9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/mopai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b842beedf4a8e754a949c9b409e21604 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/7f2619ba9d40a7c3d6eeaffd6e49981d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/sunzi.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/sunzi.mp3 new file mode 100644 index 00000000..dd74ce61 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/sunzi.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/sunzi.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/sunzi.mp3.meta new file mode 100644 index 00000000..870fd639 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/sunzi.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5b4409b62b978824792f1f214e65e567 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/2de6e08cf913938cc172473aed003e4e + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman.meta new file mode 100644 index 00000000..5a357e7f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 21b18f469c59f7a40a026f5c21ba5cd0 +folderAsset: yes +timeCreated: 1513927546 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/10.mp3 new file mode 100644 index 00000000..0de67206 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/10.mp3.meta new file mode 100644 index 00000000..aa6af6d2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 89e8520862ca2a840a4d707af8b5844c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/0137c3ec303d3e5efdbf21029aa22b12 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/11.mp3 new file mode 100644 index 00000000..79cf9acd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/11.mp3.meta new file mode 100644 index 00000000..52fac03f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d77fb0639dc277841b91d544bce0adfb +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/39e186dbc61b0461bb8133075eecf473 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_10.mp3 new file mode 100644 index 00000000..9d42a15f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_10.mp3.meta new file mode 100644 index 00000000..80a46e0e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b9515d25b622c534f9b188dec2d7ed79 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/6268dc169318f523bdeb5cc2fd8c54a8 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_11.mp3 new file mode 100644 index 00000000..f172a3b4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_11.mp3.meta new file mode 100644 index 00000000..518766b4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5fd5809d560288d42a3bbdb8b1cd8d92 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/63e39f12d1ee5a812e667e7326fcd0e0 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_12.mp3 new file mode 100644 index 00000000..17fe884b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_12.mp3.meta new file mode 100644 index 00000000..79baab6e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5d3fdb1500ec34943a950bc3610929d6 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/427117c0377a587943474947c2798cf5 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_13.mp3 new file mode 100644 index 00000000..43024095 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_13.mp3.meta new file mode 100644 index 00000000..dbe2ab56 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 29293d427297bb643a74f7513f579037 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/ac922a8278f94e96af375de008aafe76 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_14.mp3 new file mode 100644 index 00000000..ecd641f5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_14.mp3.meta new file mode 100644 index 00000000..c89729c0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b89128a707594a84bbda4101f3296ff3 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/5a2cc78bdc64054db9c4a217749c8977 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_15.mp3 new file mode 100644 index 00000000..28d9b7f4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_15.mp3.meta new file mode 100644 index 00000000..97767793 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_15.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fbf0cf2f5da30e842aa10bde206a1651 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/6c6389704a4057d30cc5cdf62d0a2584 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_3.mp3 new file mode 100644 index 00000000..7c00aa67 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_3.mp3.meta new file mode 100644 index 00000000..a48eec75 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: db68b960181b9a44a9b1d3331a588e28 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/b42a3148e13503c47fc017797c97fb7f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_4.mp3 new file mode 100644 index 00000000..7fcff3e6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_4.mp3.meta new file mode 100644 index 00000000..4fdcaaa3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4f8cb78315f836344a417d953fddc477 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/9ec70eb9bba20cd0e587d4c944f64842 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_5.mp3 new file mode 100644 index 00000000..f485b57a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_5.mp3.meta new file mode 100644 index 00000000..087602a3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7b6cc694e01b59542a7d78c8d79ac1ec +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/8dd2fb53b926d758b7d574dddd9d76dc + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_6.mp3 new file mode 100644 index 00000000..0ede39e1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_6.mp3.meta new file mode 100644 index 00000000..8f52f810 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5d0ad980e539eb34088108b7799c5020 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/d0000408882f11c1d16182cbc738f646 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_7.mp3 new file mode 100644 index 00000000..e6b91f2c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_7.mp3.meta new file mode 100644 index 00000000..f65c819b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 01dbd083daa3a364182c8a425b9bd8e0 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/a6b2f52b68fca01aa6aad103d057d704 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_8.mp3 new file mode 100644 index 00000000..ef222c15 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_8.mp3.meta new file mode 100644 index 00000000..2c684126 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e903a8309748e514da1f2cd1bf4ba21b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/a9d68716b0ec74b2bbd8bca7ab1e38dd + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_9.mp3 new file mode 100644 index 00000000..cedd7958 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_9.mp3.meta new file mode 100644 index 00000000..75151237 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/1_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e7ee3322fb7537d419c0054b10464e2b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/4436c2fef0ff62a5b2929d0131221685 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_10.mp3 new file mode 100644 index 00000000..0fe90ca7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_10.mp3.meta new file mode 100644 index 00000000..df6ff7aa --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2e5df5ef110aca1419ed5c48cdd07b13 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/f954e84f2fb0583e4ba0f51ac38340f1 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_11.mp3 new file mode 100644 index 00000000..c8e832ed Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_11.mp3.meta new file mode 100644 index 00000000..184eb2b3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fb40cf93ea370cb4f8307cb743ca8452 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/c5fd8cce17d61d17540060ed3c8b2021 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_12.mp3 new file mode 100644 index 00000000..2aece7c3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_12.mp3.meta new file mode 100644 index 00000000..219fd88c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0e27a71d93bbcef4eab74b3411c834d5 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/8be53b99f9f7ba1cb93661a1e782df13 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_13.mp3 new file mode 100644 index 00000000..71a93b5f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_13.mp3.meta new file mode 100644 index 00000000..1a4d2b89 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d1db6a02b678e8247893b84cec16c752 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/084014131385d73c327f5fc2ea9ecb8d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_14.mp3 new file mode 100644 index 00000000..26b33503 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_14.mp3.meta new file mode 100644 index 00000000..2c0f63f3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4e239aa74b5204b4286ad5a04399aa86 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/bb5360ac9fc0ee837f31825562f004ce + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_15.mp3 new file mode 100644 index 00000000..b6f6346d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_15.mp3.meta new file mode 100644 index 00000000..c3a2c22a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_15.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0f5d04561b676454998803afec03cfd1 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/bdc16f197404342540623359506900a0 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_3.mp3 new file mode 100644 index 00000000..fc6894d4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_3.mp3.meta new file mode 100644 index 00000000..08a0d11b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b856f1fef32fe8349b4644d22a91ecd5 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/5c43876cf785acc4729b113f5fa052e5 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_4.mp3 new file mode 100644 index 00000000..d7a8a901 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_4.mp3.meta new file mode 100644 index 00000000..e8f2b85d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: be1bd27d6a017cd409a6ddfd95753a39 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/d5badd37cdac069d624d5a916ec57f78 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_5.mp3 new file mode 100644 index 00000000..f0a1ea68 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_5.mp3.meta new file mode 100644 index 00000000..786fba7e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 412b2eeb9ee74764c80e5236b4517db6 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/957c7d38d73ad81326d2e6b61c21471b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_6.mp3 new file mode 100644 index 00000000..5c82cdff Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_6.mp3.meta new file mode 100644 index 00000000..23d9a8d4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6dd02bcf556af2847bc0b6e55e783ab8 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/39a2f9630d30ca0c7895f9be53d4a39f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_7.mp3 new file mode 100644 index 00000000..764e6449 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_7.mp3.meta new file mode 100644 index 00000000..2aaa1e7e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b0f8f40a0635b4d44831348157762fda +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/1e51c2dcf524a6aa62d80646921d203c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_8.mp3 new file mode 100644 index 00000000..d70e71c3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_8.mp3.meta new file mode 100644 index 00000000..0d5b69dc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b9d7bc7bf86d6e64e94d9dff3bbba9e8 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/0bb7532b84a6be07cc5009f9a343e162 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_9.mp3 new file mode 100644 index 00000000..a09f0210 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_9.mp3.meta new file mode 100644 index 00000000..08577fc6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/2_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 24cd067e76434b94e82243e877efba1c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/9389b0a24a689e0b29c8c0b2b9dd8731 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_10.mp3 new file mode 100644 index 00000000..bb4710e2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_10.mp3.meta new file mode 100644 index 00000000..afdf95e9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d1e6589992852864eb0e43865f9244ff +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/6a28375513051559fe5c1acf08ae3161 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_11.mp3 new file mode 100644 index 00000000..e8c09a08 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_11.mp3.meta new file mode 100644 index 00000000..7e82aa9f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ccb4b6d21e89b4447ae64a810025b34d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/1fa9e10cdccce8d2be15e27189bbe43f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_12.mp3 new file mode 100644 index 00000000..482376a7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_12.mp3.meta new file mode 100644 index 00000000..857b7aed --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5c79e80639707714593f6ac654917322 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/010af9ae1f45fc1bc270200071ac6961 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_13.mp3 new file mode 100644 index 00000000..59b5178f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_13.mp3.meta new file mode 100644 index 00000000..c6d70861 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 05f27a0587060f748b2e57e9efe2dd5a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/142f2abc64ca131ace107d8cead8509a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_14.mp3 new file mode 100644 index 00000000..f315c19f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_14.mp3.meta new file mode 100644 index 00000000..c0375320 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b434dd97905a3eb42b1294ac3ca02b89 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/fa15f33533971db6c39e38955c8bb81a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_15.mp3 new file mode 100644 index 00000000..acf3dece Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_15.mp3.meta new file mode 100644 index 00000000..d19ac4e4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_15.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3b2477b427c4dc342921bc25197eaf7f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/6ac737a2e3da5a4eb666247f2fd9da16 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_3.mp3 new file mode 100644 index 00000000..39010171 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_3.mp3.meta new file mode 100644 index 00000000..02443e18 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6b5f4e1bc794b0e4fb20043e1b137942 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/f07180f457e843b8025be0eb3dc59425 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_4.mp3 new file mode 100644 index 00000000..7df04916 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_4.mp3.meta new file mode 100644 index 00000000..7f9896cf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0c7b9647f4f3ba543bfaf94bf2b42f17 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/fa08758cb7e6fb09e4e9c81414570bf1 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_5.mp3 new file mode 100644 index 00000000..e5f2bd0c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_5.mp3.meta new file mode 100644 index 00000000..5077155b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3b35e8246069ab544abfdf749fe787b0 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/2b7171c26c409308dd66df7582fc7991 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_6.mp3 new file mode 100644 index 00000000..95618d52 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_6.mp3.meta new file mode 100644 index 00000000..1289c3b9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: dabae432b41effc45825321254849fa4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/04b10f5f2a087c942303b6a86e94211e + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_7.mp3 new file mode 100644 index 00000000..4c591f0f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_7.mp3.meta new file mode 100644 index 00000000..f6480109 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e509fea8070cefd449d9742d1143aa20 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/56ee97683389a48eacd649088e86cd5f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_8.mp3 new file mode 100644 index 00000000..715c0a64 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_8.mp3.meta new file mode 100644 index 00000000..3ed27b64 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 18874fa462493154cb826b0bc3d2f524 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/ca2370fe31f0574fd599eecef4a23911 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_9.mp3 new file mode 100644 index 00000000..8e80bfa0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_9.mp3.meta new file mode 100644 index 00000000..ab4da4f4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/3_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 13817a75cb4b86e45ad725c50550b653 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/a195c4e2e2cc4ca46bbf68b7d4e81c35 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/4.mp3 new file mode 100644 index 00000000..cba8ec7e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/4.mp3.meta new file mode 100644 index 00000000..a3a514f6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f062bd0ecfd00bc4e94407e38c47767f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/2ef06cd7a28de3d9f42db43510b6496a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/6.mp3 new file mode 100644 index 00000000..64350eca Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/6.mp3.meta new file mode 100644 index 00000000..c0d06583 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 65c3caa011f25b945af6598f1f54b62c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/cffe409adcd7d0a2c8ebfb8cb364e722 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/7.mp3 new file mode 100644 index 00000000..e4611e3b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/7.mp3.meta new file mode 100644 index 00000000..4788818d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 07322f0bb72a0a348bd3a96ac691f489 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/f85ddb5d85d302514dbf600c81e79201 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/card_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/card_1.mp3 new file mode 100644 index 00000000..cad735ca Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/card_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/card_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/card_1.mp3.meta new file mode 100644 index 00000000..e0ecd16b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/card_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9faed7a2c25cfbf44b6514aa4f5202dc +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/9ef514803072056e8548aaa0298acd42 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/card_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/card_2.mp3 new file mode 100644 index 00000000..551487dd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/card_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/card_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/card_2.mp3.meta new file mode 100644 index 00000000..f7642aad --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/card_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d4cbefb85029565409057af1d19e12bf +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/d3f28cf7805e0e35858da7ee07b11abd + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/dani_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/dani_1.mp3 new file mode 100644 index 00000000..e015c653 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/dani_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/dani_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/dani_1.mp3.meta new file mode 100644 index 00000000..920a210c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/dani_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 32f16bce100b02b46ad115b295991183 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/cf5b90deb6e0a3592aea5411e11e2fca + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/dani_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/dani_2.mp3 new file mode 100644 index 00000000..e485fb6d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/dani_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/dani_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/dani_2.mp3.meta new file mode 100644 index 00000000..324f195b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/dani_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fd86ff54827f12749b85b114d1201bac +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/8d571f179e195697218420fd3d007c78 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/dani_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/dani_3.mp3 new file mode 100644 index 00000000..aeb59c07 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/dani_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/dani_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/dani_3.mp3.meta new file mode 100644 index 00000000..3e9424d9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/dani_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e39425cb873bd154aa15d3b722dbdac9 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/5f3a99ea6199320274341461696c5ae9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_1.mp3 new file mode 100644 index 00000000..f30160e0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_1.mp3.meta new file mode 100644 index 00000000..f2961bab --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: df3dcc8282f03214ea8f7750b83baccb +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/3626ea74ba73a759c56fd02eed5e6d64 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_2.mp3 new file mode 100644 index 00000000..14e9b5f7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_2.mp3.meta new file mode 100644 index 00000000..bc107b63 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3f32f09bfb3020646a21d10a77aeaaf5 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/0cba349f80cd3dd38974fbfe49fd2372 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_3.mp3 new file mode 100644 index 00000000..8b2ca6d1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_3.mp3.meta new file mode 100644 index 00000000..2c0a4967 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2047ebfe061832c43a260717937e7a29 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/3f0b5bd19dcec54ec83289c081357fc7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_4.mp3 new file mode 100644 index 00000000..a70d5c78 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_4.mp3.meta new file mode 100644 index 00000000..9fe5d39b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/sound/woman/pass_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6985da3167b47ea46bbd67ae7243c0e4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/4d310bdcf7ed8d48b6aa611e4fe116ce + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui.meta new file mode 100644 index 00000000..1df11ee7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d63c53d0b3aa9904192732bf99806e4e +folderAsset: yes +timeCreated: 1561176569 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_atlas0.png b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_atlas0.png new file mode 100644 index 00000000..0eb56a5e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_atlas0.png.meta new file mode 100644 index 00000000..725371eb --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_atlas0.png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: ffb01e19f2e912d40a61f7890cb2175c +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 4 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 2 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_fui.bytes new file mode 100644 index 00000000..cf497001 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_fui.bytes.meta new file mode 100644 index 00000000..cb92c270 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 122dc713a1cd78847a7e48bbc8f5d19d +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_prgz94.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_prgz94.mp3 new file mode 100644 index 00000000..ecff85f1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_prgz94.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_prgz94.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_prgz94.mp3.meta new file mode 100644 index 00000000..88b9fe36 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_prgz94.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d4f626d0f08b45d46a90111d3e6122f1 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_prgz97.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_prgz97.mp3 new file mode 100644 index 00000000..398af510 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_prgz97.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_prgz97.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_prgz97.mp3.meta new file mode 100644 index 00000000..528d6af9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_prgz97.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 81a448a6ae059f74b94b2abe00080f5d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_prgz9s.mp3 b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_prgz9s.mp3 new file mode 100644 index 00000000..3a0d1c4f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_prgz9s.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_prgz9s.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_prgz9s.mp3.meta new file mode 100644 index 00000000..cc35745a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Extend_Poker_RunFastNew_prgz9s.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ee4abfbead088d24c9c4c337e9ec2378 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/runfast/4453ac44dfe0b10c314c4b7d0f517f22 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Info_Poker_RunFastNew_atlas0.png b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Info_Poker_RunFastNew_atlas0.png new file mode 100644 index 00000000..88920317 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Info_Poker_RunFastNew_atlas0.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Info_Poker_RunFastNew_atlas0.png.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Info_Poker_RunFastNew_atlas0.png.meta new file mode 100644 index 00000000..e5c98272 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Info_Poker_RunFastNew_atlas0.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 6b333e650d5766f478883d11e89c0229 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: -1 + wrapV: -1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: extend/poker/runfast/f04de0786378eacf34ead5191b1f2883 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Info_Poker_RunFastNew_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Info_Poker_RunFastNew_fui.bytes new file mode 100644 index 00000000..b674ebca Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Info_Poker_RunFastNew_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Info_Poker_RunFastNew_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Info_Poker_RunFastNew_fui.bytes.meta new file mode 100644 index 00000000..4a4a1efc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/runfast/ui/Info_Poker_RunFastNew_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e893b74e10b35cf469cec1f00626db3e +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/poker/runfast/f04de0786378eacf34ead5191b1f2883 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen.meta new file mode 100644 index 00000000..888a1e38 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 17a3cdb0bb8aabe4ebe67a6d551b3ca1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg.meta new file mode 100644 index 00000000..a32bd030 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 99b4f2e7d6d895d4d9f1229ab6977a5d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg/bg1.png b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg/bg1.png new file mode 100644 index 00000000..b0119cd7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg/bg1.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg/bg1.png.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg/bg1.png.meta new file mode 100644 index 00000000..3244e77a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg/bg1.png.meta @@ -0,0 +1,128 @@ +fileFormatVersion: 2 +guid: 919a3782c57c0b74e950c5d2d95c675a +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: extend/poker/sanqianfen/5282fefc375ac158ef5382bbcfd4422e + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg/bg2.png b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg/bg2.png new file mode 100644 index 00000000..bb6e1a8b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg/bg2.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg/bg2.png.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg/bg2.png.meta new file mode 100644 index 00000000..b8d994c0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg/bg2.png.meta @@ -0,0 +1,128 @@ +fileFormatVersion: 2 +guid: 5fd109fdd4e66ea4db17bbc14e8af2b0 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: extend/poker/sanqianfen/413444cfe1d7611f59239f9baa19c198 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg/bg3.png b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg/bg3.png new file mode 100644 index 00000000..e11e9413 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg/bg3.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg/bg3.png.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg/bg3.png.meta new file mode 100644 index 00000000..7f8395ce --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/bg/bg3.png.meta @@ -0,0 +1,128 @@ +fileFormatVersion: 2 +guid: 38ee6121d425fce4b8efa5ce633ca22c +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + applyGammaDecoding: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: extend/poker/sanqianfen/1b81453ae52bbdb6766d1df17b25c7a5 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound.meta new file mode 100644 index 00000000..545c4e2c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 13122b69daad61f4c99363e245314388 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/bgm1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/bgm1.mp3 new file mode 100644 index 00000000..ec54f576 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/bgm1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/bgm1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/bgm1.mp3.meta new file mode 100644 index 00000000..a3e24911 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/bgm1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a860a04889909a94aa4f29c82757a508 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/6746c5adb40022e5f69d03d1cee11a10 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/chupai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/chupai.mp3 new file mode 100644 index 00000000..d3452cb3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/chupai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/chupai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/chupai.mp3.meta new file mode 100644 index 00000000..e4c95779 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/chupai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8f5067c8aff96094dabe9eb4907d38f1 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/9c9870aef18626b07b84231fc1b09601 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/click.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/click.mp3 new file mode 100644 index 00000000..c90ed0e5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/click.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/click.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/click.mp3.meta new file mode 100644 index 00000000..3c54e498 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/click.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: edb884ba0ad75fe41ad896fec997a17c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/cf1c75b1b092b05ee2427634762d4cce + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/fapai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/fapai.mp3 new file mode 100644 index 00000000..8babaa08 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/fapai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/fapai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/fapai.mp3.meta new file mode 100644 index 00000000..b4f236aa --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/fapai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e4c7cf2199b38f040bd003b8027c5867 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/1bca3a4b38eeacbeae677ee4e06e4d34 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man.meta new file mode 100644 index 00000000..7987b8cd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b09f596060d9615409eb51e3b03708dc +folderAsset: yes +timeCreated: 1513927546 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/10.mp3 new file mode 100644 index 00000000..4f358f65 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/10.mp3.meta new file mode 100644 index 00000000..a50f1fcd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 567d8c9486d44284a833de39944f8b51 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/0014d46cc589bd198b73fb9c804494b2 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/11.mp3 new file mode 100644 index 00000000..1670d392 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/11.mp3.meta new file mode 100644 index 00000000..2301aae9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1f291a1049e3af544a87d0c93c36b6d7 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/a5c4bd0904db8673ce52c30a255fd076 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_10.mp3 new file mode 100644 index 00000000..6729bec7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_10.mp3.meta new file mode 100644 index 00000000..6fc03690 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3bdf61d85a592d2498f4c413cc16a084 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/ef1e253e334e2e67e899cb0450ca55d7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_11.mp3 new file mode 100644 index 00000000..5b428ef9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_11.mp3.meta new file mode 100644 index 00000000..6eb2e24a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ac0d36dae8499494e97dea876c83db8e +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/833d477d7c0cdcf6abb70220de9e1ac1 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_12.mp3 new file mode 100644 index 00000000..395e2cee Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_12.mp3.meta new file mode 100644 index 00000000..0ef7ad60 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c5fda78ddeed1f24c8b6aa2adeede85f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/57b60b864554514b3286dcb07ab25a9b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_13.mp3 new file mode 100644 index 00000000..9a544470 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_13.mp3.meta new file mode 100644 index 00000000..a1ab4ce7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fb9a92d705b42ce48af7ca95daeeabe9 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/6f3850cd0f3e0adb6c4b5bf2d27195c6 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_14.mp3 new file mode 100644 index 00000000..7c1b4635 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_14.mp3.meta new file mode 100644 index 00000000..bd14bece --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 81c929ccc6b5be646bc76d1771fad943 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/042243672d2e8f3b313bc13f1a3482b1 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_15.mp3 new file mode 100644 index 00000000..94101e22 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_15.mp3.meta new file mode 100644 index 00000000..27fad4ec --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_15.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5309b0354b300f743bb199fb29fce20e +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/2af33c2684a2dc822a66e697feb813d8 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_3.mp3 new file mode 100644 index 00000000..c5d9a9fd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_3.mp3.meta new file mode 100644 index 00000000..df515abe --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 32a510199e1281a4db813548e6aee334 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/0110afb571ba32293695ddc0baefed8a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_4.mp3 new file mode 100644 index 00000000..848ee03b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_4.mp3.meta new file mode 100644 index 00000000..d485f04b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 22cb931aead5bf24fb93a94cde7c20e3 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/a60ee3e5053679ae9183956fda0f63f7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_5.mp3 new file mode 100644 index 00000000..afcfcd48 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_5.mp3.meta new file mode 100644 index 00000000..8e0ea286 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a5c8f18a2983091408f1c85b831d4d08 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/5db7743d38bcb82f4cf10507a1e39305 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_6.mp3 new file mode 100644 index 00000000..f6b10188 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_6.mp3.meta new file mode 100644 index 00000000..2a5a57eb --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8e6c2dd85eb62dc4c83e1c8d5be2880b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/1a1ca03b0db221f5155b19cfe8f5b017 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_7.mp3 new file mode 100644 index 00000000..2ef2c4f8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_7.mp3.meta new file mode 100644 index 00000000..2dbf011a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ae0ee4144007671458b662fe872c56d1 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/88dffcfca5f18bb876e47962a2c0eff7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_8.mp3 new file mode 100644 index 00000000..dc04ec4e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_8.mp3.meta new file mode 100644 index 00000000..f70436ab --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8c022f4418e65cc4dbe15914d55b27e0 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/b4b3cf9a121e79b4da4a97da7fc8a7eb + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_9.mp3 new file mode 100644 index 00000000..eace6671 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_9.mp3.meta new file mode 100644 index 00000000..f3c59bd8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/1_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c97d1fd0fa843b646ad0daeca9a4a67d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/c7c8e4302947b2fb861196568e1f7a4b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_10.mp3 new file mode 100644 index 00000000..9a0137ec Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_10.mp3.meta new file mode 100644 index 00000000..0dd2dbe5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9d210b9bd7d17314290eade3f1cff436 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/aa6ebcb72d555cc5a944af311f008bcf + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_11.mp3 new file mode 100644 index 00000000..feeab0fd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_11.mp3.meta new file mode 100644 index 00000000..352339b6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9700618b92704e3488643ba65ed94870 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/cf9d748f51250671e89161fecb8776a1 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_12.mp3 new file mode 100644 index 00000000..fcc0c6c5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_12.mp3.meta new file mode 100644 index 00000000..d7a2d1fa --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a4112456aded9044e96f4d28808a2ba3 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/b4303068bdb41348e0ea2a42e5c9060d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_13.mp3 new file mode 100644 index 00000000..00a0ca34 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_13.mp3.meta new file mode 100644 index 00000000..d13a9bfa --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 45a5843d286f3b34a91ec0c38fad59e6 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/afde424298e7f8e02e19b3a960dc592f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_14.mp3 new file mode 100644 index 00000000..62787230 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_14.mp3.meta new file mode 100644 index 00000000..78c3b795 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9d6c29291782abe47a21adf4fb12dd17 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/ce825242fd7b31ecedf678e6ccb14b20 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_15.mp3 new file mode 100644 index 00000000..410ed47f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_15.mp3.meta new file mode 100644 index 00000000..79920255 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_15.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7fb0f3d11af138b46bdbc2f6463e4ff8 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/48ae76acadd1c0cc556c8b5d696b0699 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_3.mp3 new file mode 100644 index 00000000..600ed068 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_3.mp3.meta new file mode 100644 index 00000000..f781d036 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6ddb7d5d8d9264249ae240959072057c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/6110f96814ec4dffefe57368c6da9336 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_4.mp3 new file mode 100644 index 00000000..ba5719a0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_4.mp3.meta new file mode 100644 index 00000000..9f26be20 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 71e7e14cb24c1c5439e8eb264103da9a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/879868ade97dd2fd4867488748d8eb5d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_5.mp3 new file mode 100644 index 00000000..e9e790be Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_5.mp3.meta new file mode 100644 index 00000000..82674874 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2286281a270cce24fae1929af6c9e212 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/a2a43459ddd2b7853f0eeea48514d741 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_6.mp3 new file mode 100644 index 00000000..74a35934 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_6.mp3.meta new file mode 100644 index 00000000..ff29aabe --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 10b2b030344171a41bd7d4166fba97b6 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/24b4f326a1256d6da71115ccf327a4a2 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_7.mp3 new file mode 100644 index 00000000..fabd1c8b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_7.mp3.meta new file mode 100644 index 00000000..877ba67b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fd962aab324cd62489ed026629841b60 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/ca6ef7bbef132fde947ec4d301f46f47 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_8.mp3 new file mode 100644 index 00000000..3fe390b3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_8.mp3.meta new file mode 100644 index 00000000..550525c0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b161fb771deb0b648a8045d2c08eb105 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/42e37643ed170c4e5fb16a372a75aa5b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_9.mp3 new file mode 100644 index 00000000..95467aaf Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_9.mp3.meta new file mode 100644 index 00000000..c5324bd9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/2_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7b2d8b5b52d41ed469cfa395425d167e +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/89225b0490b2a0e45528c07763f75292 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_10.mp3 new file mode 100644 index 00000000..7f3d7494 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_10.mp3.meta new file mode 100644 index 00000000..96c741a6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 17644dcce8aa21c479b66b963a62de8c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/b3f039b8913371e901c3fa7e3a888bb8 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_11.mp3 new file mode 100644 index 00000000..4913912f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_11.mp3.meta new file mode 100644 index 00000000..85933915 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3dd3de0c57fb1e84eb2fc9da3d49f7ed +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/13757f754a71bd4b260f9274a0815be6 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_12.mp3 new file mode 100644 index 00000000..ee0c6429 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_12.mp3.meta new file mode 100644 index 00000000..2e594786 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b9f57aca9ba311d44ba91ac23ad79fac +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/fdcbb60663a5affe22237bef5e1b1783 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_13.mp3 new file mode 100644 index 00000000..e62af3f4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_13.mp3.meta new file mode 100644 index 00000000..4d4eb47f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7c696812559705b42aa32ddf0e9d33e4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/d055fe3632a1bdae9f96869084e56841 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_14.mp3 new file mode 100644 index 00000000..33de32dd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_14.mp3.meta new file mode 100644 index 00000000..8020a375 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 035ed0910b3be104fabd7978b500e8ad +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/886c6c8e1ef956697e1a0360f43e75a6 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_15.mp3 new file mode 100644 index 00000000..8bd6abfc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_15.mp3.meta new file mode 100644 index 00000000..6f71c61c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_15.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 225ec286df1134344aa33031ede6f471 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/d257ec1dc0cd92f93846666b94606193 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_3.mp3 new file mode 100644 index 00000000..474ed768 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_3.mp3.meta new file mode 100644 index 00000000..12d62d6f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c7fa95a926fab8e4ba741f3bbf3d9602 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/8dcbcfe24db8df17dfc0ed46957a43f8 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_4.mp3 new file mode 100644 index 00000000..8b40cbef Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_4.mp3.meta new file mode 100644 index 00000000..a07aaf0e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7e812109e84aefc4f860292c3b318a09 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/ede60c34b3786de1ae08bc0c0b0d48d1 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_5.mp3 new file mode 100644 index 00000000..d8b04546 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_5.mp3.meta new file mode 100644 index 00000000..68229004 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ea9af690ad8fc6d41bc2520eabb50ae8 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/32b4729fc48618843306c5fc6e5b9727 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_6.mp3 new file mode 100644 index 00000000..e7fa7e62 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_6.mp3.meta new file mode 100644 index 00000000..42487822 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 647f807fb1f9e6a4f878f4675cd68916 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/2dbdd356d660cdbcadd63d0e2fdf7907 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_7.mp3 new file mode 100644 index 00000000..c01fe5ba Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_7.mp3.meta new file mode 100644 index 00000000..bdc64e87 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bfef1d606f1834048b1cb9d580cf5756 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/accb6853f29a4dc187019904e376c036 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_8.mp3 new file mode 100644 index 00000000..4ec4b445 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_8.mp3.meta new file mode 100644 index 00000000..3741b99c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9c61b0f132dbdaa48809a1eed99fa575 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/4d8a40bc837f7e6c1242eedfdfb9ee51 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_9.mp3 new file mode 100644 index 00000000..7aea3a92 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_9.mp3.meta new file mode 100644 index 00000000..1aaf87d1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/3_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 50fb50fa270e1dd41906288f548cdf84 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/fe800827bf121ac02d778b63fa7512f9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/4.mp3 new file mode 100644 index 00000000..53eb9196 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/4.mp3.meta new file mode 100644 index 00000000..b81fa39f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 370fb1cbb10310c48aec255d31de29a5 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/0c9add90a39fbace45ff26a21a4f70f5 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/6.mp3 new file mode 100644 index 00000000..563871d3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/6.mp3.meta new file mode 100644 index 00000000..a6f06dbf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bda7e34706b90d14e9c83249d1335e57 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/d51087b8bf641f267a08f97e42abdf19 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/7.mp3 new file mode 100644 index 00000000..b2f7a2d5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/7.mp3.meta new file mode 100644 index 00000000..909601af --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e846111fe01f0424ab4d64da2cb35047 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/be6f9cde43446cbfa17113e24bdd4aec + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/card_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/card_1.mp3 new file mode 100644 index 00000000..e39676cb Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/card_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/card_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/card_1.mp3.meta new file mode 100644 index 00000000..203aa402 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/card_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e7321bf4a5625cf4da4af93f1f43b895 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/34827892e66d09dcda044b7d69712a23 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/card_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/card_2.mp3 new file mode 100644 index 00000000..4f399607 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/card_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/card_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/card_2.mp3.meta new file mode 100644 index 00000000..6408a3b9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/card_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3135c26b99a416b45b451c6b0d92c965 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/3de0f5067f9cbf2e748dbbb742f3c846 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/dani_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/dani_1.mp3 new file mode 100644 index 00000000..87028b18 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/dani_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/dani_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/dani_1.mp3.meta new file mode 100644 index 00000000..e391669c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/dani_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 38f05bce6c222224ba2f2bd5082f4e1b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/e5d9e49eb051b211c0329b2b6bd585ad + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/dani_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/dani_2.mp3 new file mode 100644 index 00000000..40549d55 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/dani_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/dani_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/dani_2.mp3.meta new file mode 100644 index 00000000..98121267 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/dani_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9b8b9f344f6a0ae44aec1661d3562801 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/e2ed34a5dce5d706b80aae984b44e0c8 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/dani_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/dani_3.mp3 new file mode 100644 index 00000000..31d48947 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/dani_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/dani_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/dani_3.mp3.meta new file mode 100644 index 00000000..7daf1e7b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/dani_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c8244827c3d084c439c49b7c89114a7a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/243ac3c2f9b4ffc65cf9674c294048da + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_1.mp3 new file mode 100644 index 00000000..ab664e8e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_1.mp3.meta new file mode 100644 index 00000000..650cf845 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9a0c01cfc4fb2924d846f7e9c2df2a18 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/18b665d85619b9f159987bad81646100 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_2.mp3 new file mode 100644 index 00000000..80bb9be2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_2.mp3.meta new file mode 100644 index 00000000..ea97b4ce --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d3bddb3529dbdea48917ee3a70cbd965 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/589c20a5c37e4ff59e377bc4938ae326 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_3.mp3 new file mode 100644 index 00000000..ebc53ff9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_3.mp3.meta new file mode 100644 index 00000000..a4578c05 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5f2742d57c1d4b04d80b42d5449496be +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/cb4b5af4b805cd15d32e29b7f7bf204a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_4.mp3 new file mode 100644 index 00000000..b48e7145 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_4.mp3.meta new file mode 100644 index 00000000..ba37eed8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/man/pass_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 62a502fe09617fc42a62497194cccc17 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/5e89168eed26b36bfd3918b2cd927640 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/mopai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/mopai.mp3 new file mode 100644 index 00000000..5ef6b1e2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/mopai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/mopai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/mopai.mp3.meta new file mode 100644 index 00000000..f651500b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/mopai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 51fcb10fcfa051445bf750d0ba5274bb +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/246d94995c1030dd0911dd755aff7068 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/sunzi.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/sunzi.mp3 new file mode 100644 index 00000000..dd74ce61 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/sunzi.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/sunzi.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/sunzi.mp3.meta new file mode 100644 index 00000000..77ccf065 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/sunzi.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 279b8bc59cba6ab438372b0f94f326ee +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/fe3b306726ff1809d6ba1d09d55c281b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman.meta new file mode 100644 index 00000000..b06d4964 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b248a27427bb1994ca5eb2905ac8a470 +folderAsset: yes +timeCreated: 1513927546 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/10.mp3 new file mode 100644 index 00000000..0de67206 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/10.mp3.meta new file mode 100644 index 00000000..6cc9ab3c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4f285c0398e4c6a4d885da14bdaf3219 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/86e234e3384b47fcb502dbbc133fbedb + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/11.mp3 new file mode 100644 index 00000000..79cf9acd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/11.mp3.meta new file mode 100644 index 00000000..d9b95163 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 522078220bb9567419a6cb2550be505a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/76f09fc04ff55b741078cb5d23f3df9e + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_10.mp3 new file mode 100644 index 00000000..9d42a15f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_10.mp3.meta new file mode 100644 index 00000000..55813583 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 371403e2c8477864a953b063898a5550 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/87ce308ee2bdc97888f33d9b979dd887 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_11.mp3 new file mode 100644 index 00000000..f172a3b4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_11.mp3.meta new file mode 100644 index 00000000..d780eb3c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5e5003e72ac9c4d409187f3f855c7122 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/82ec73fb3197cf2f47f31492d37e160e + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_12.mp3 new file mode 100644 index 00000000..17fe884b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_12.mp3.meta new file mode 100644 index 00000000..a0534693 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: efd2b8465a30217468ecee86c712fcd3 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/fd5dded00ccf598b52e32340f2b1b3c8 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_13.mp3 new file mode 100644 index 00000000..43024095 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_13.mp3.meta new file mode 100644 index 00000000..838cdd95 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 778c8c79ac5e3284496204273ff04082 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/1b25160946f609c7887359a2c1ebdecc + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_14.mp3 new file mode 100644 index 00000000..ecd641f5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_14.mp3.meta new file mode 100644 index 00000000..23e2bbaa --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5c1416796435ac748be7c9dc627e674f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/83628045e68d1d8e28788d810b9522ef + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_15.mp3 new file mode 100644 index 00000000..28d9b7f4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_15.mp3.meta new file mode 100644 index 00000000..4033b82a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_15.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 26eb6e78b17b6cd4e85d051d38c96f10 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/693aa0b88878f724b414a0e37339fa4d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_3.mp3 new file mode 100644 index 00000000..7c00aa67 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_3.mp3.meta new file mode 100644 index 00000000..a08472db --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 17f6c593cdf1c1042af4f18cb1f89ba6 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/6d520f98d4683731459bccd0a2ce9162 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_4.mp3 new file mode 100644 index 00000000..7fcff3e6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_4.mp3.meta new file mode 100644 index 00000000..36c88aa7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f5954c3bb59d36847a79c601e089ee55 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/ed5d61f3a553a3c29971e28d9f5d9475 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_5.mp3 new file mode 100644 index 00000000..f485b57a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_5.mp3.meta new file mode 100644 index 00000000..97724add --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a3d96263c8b37fd41b90981ca20aa534 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/f9d7abe04f09eaacd30df5ec04106033 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_6.mp3 new file mode 100644 index 00000000..0ede39e1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_6.mp3.meta new file mode 100644 index 00000000..6397812c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8b693fcf9838da745a3b5802f4651069 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/78c9d549a46dbaaaec25a1faffb04505 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_7.mp3 new file mode 100644 index 00000000..e6b91f2c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_7.mp3.meta new file mode 100644 index 00000000..bd793aa5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 14fc567c0ff7ca34ab7e89b417507938 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/97495eb9148810ed60ff44ed8828d7bb + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_8.mp3 new file mode 100644 index 00000000..ef222c15 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_8.mp3.meta new file mode 100644 index 00000000..ea0ec627 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 316d644c1fd4778419c28c010a6994a8 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/b399220fd5c65b42ed6c8648fbd4bd4d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_9.mp3 new file mode 100644 index 00000000..cedd7958 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_9.mp3.meta new file mode 100644 index 00000000..33d837fe --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/1_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2cefcbc296234c5458da896e12db23f0 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/e8c37a5e3e889e42024a5dc36684b4d9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_10.mp3 new file mode 100644 index 00000000..0fe90ca7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_10.mp3.meta new file mode 100644 index 00000000..047b36e5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4689f3e88b4f9de4ba72aff00311489a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/fd227aeb250e9e8ef77f31d4cacd3544 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_11.mp3 new file mode 100644 index 00000000..c8e832ed Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_11.mp3.meta new file mode 100644 index 00000000..fb82e3be --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e647c2b8784a852478fd5e937862e619 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/b469186ff85eca4194a66888bc81b5d8 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_12.mp3 new file mode 100644 index 00000000..2aece7c3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_12.mp3.meta new file mode 100644 index 00000000..d9aa1049 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b3d399b59d5ccae4d9815c3ffc9a2e60 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/92b9f78118722b95d7d837383b742492 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_13.mp3 new file mode 100644 index 00000000..71a93b5f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_13.mp3.meta new file mode 100644 index 00000000..a02eee26 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4e0893ba1962f4b4da60f006f5ef701f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/cdc6b0c33e4b20569a1f04c9af7f767b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_14.mp3 new file mode 100644 index 00000000..26b33503 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_14.mp3.meta new file mode 100644 index 00000000..dce80dd6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bb688cda6f8f7d6428b04675bb57a6fb +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/f48ccac2303d9866a880fcddbe576a2d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_15.mp3 new file mode 100644 index 00000000..b6f6346d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_15.mp3.meta new file mode 100644 index 00000000..2f46ad95 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_15.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a5dcc03b4c5efc942a8a0da7d59d2e84 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/c3a1b4224cae1b088cba881e04e570e7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_3.mp3 new file mode 100644 index 00000000..fc6894d4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_3.mp3.meta new file mode 100644 index 00000000..55c2930a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c40a1fe8a327c79489cc19668f158440 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/1be9806851922ddc46d2e9645a2c2d82 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_4.mp3 new file mode 100644 index 00000000..d7a8a901 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_4.mp3.meta new file mode 100644 index 00000000..4e334561 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c4aa2229f208ce447b0f66aa04095649 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/68ba0a75480f628d31925d743df57742 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_5.mp3 new file mode 100644 index 00000000..f0a1ea68 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_5.mp3.meta new file mode 100644 index 00000000..85e7c907 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ba45c61174a0c10429b346a86e77ed18 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/c7a8162f476686027fedd88464bc1c66 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_6.mp3 new file mode 100644 index 00000000..5c82cdff Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_6.mp3.meta new file mode 100644 index 00000000..cbd33572 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1c193a70979b5424f8db23e11edb6423 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/ba1a5e6925e38ca2520f88cfd98ecd72 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_7.mp3 new file mode 100644 index 00000000..764e6449 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_7.mp3.meta new file mode 100644 index 00000000..dbac156d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 91bf567507e4f174d95a73b2f8d9c255 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/f2fe61a5fc681ea18be583c944bb55f9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_8.mp3 new file mode 100644 index 00000000..d70e71c3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_8.mp3.meta new file mode 100644 index 00000000..02e2f099 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 86fe98f7fd381364fa88939a38dc9d3c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/2cbef6f825d19fa290fbe1f4694881d6 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_9.mp3 new file mode 100644 index 00000000..a09f0210 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_9.mp3.meta new file mode 100644 index 00000000..1d479787 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/2_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e812fc5596988f743adfa6d23db1b9c6 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/af59aab61b0b2bf893cf988cf6512ad5 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_10.mp3 new file mode 100644 index 00000000..bb4710e2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_10.mp3.meta new file mode 100644 index 00000000..73dbebbc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 15e449086d440f64e8424b21a2da50bb +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/8e07bf0f4034c79595178ce2662c6dda + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_11.mp3 new file mode 100644 index 00000000..e8c09a08 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_11.mp3.meta new file mode 100644 index 00000000..918dda16 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d3f09381267297b4e8eeabd88a17c01d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/8cd8f28536739a67b8abcf872fac0d21 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_12.mp3 new file mode 100644 index 00000000..482376a7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_12.mp3.meta new file mode 100644 index 00000000..33730923 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0c1f57a31ddf14343b6a08dbca395977 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/dd6bf50ed2fc7cc38d3e0375076cad0d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_13.mp3 new file mode 100644 index 00000000..59b5178f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_13.mp3.meta new file mode 100644 index 00000000..f6a38d5c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2523b6c72a27e3a4f8a80903404f7fbb +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/e052c8d59170bda009851100239e93dd + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_14.mp3 new file mode 100644 index 00000000..f315c19f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_14.mp3.meta new file mode 100644 index 00000000..ccb85b11 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a226ff5c2d271e74a89fe9704d38f4ac +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/8f2243f8139c8fc0015a8e628281d92a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_15.mp3 new file mode 100644 index 00000000..acf3dece Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_15.mp3.meta new file mode 100644 index 00000000..4e66e6f1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_15.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6d29595ff142b9c45a6dda5540284e09 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/19a553bf400c4bbec8b969ce15353b65 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_3.mp3 new file mode 100644 index 00000000..39010171 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_3.mp3.meta new file mode 100644 index 00000000..3f0d310b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b499dddd98ddc824d870f301ea09aa27 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/a3eb3bc28f76ba29ea8c4a48655e9eb7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_4.mp3 new file mode 100644 index 00000000..7df04916 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_4.mp3.meta new file mode 100644 index 00000000..6bbeb487 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 24264bf4874374c4fbff937c417d6409 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/8068138db74cbd16c076843e614ba560 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_5.mp3 new file mode 100644 index 00000000..e5f2bd0c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_5.mp3.meta new file mode 100644 index 00000000..2aa3b7da --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4f84ce20f4b48714a8a4f8f9b742bae7 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/18f53e211be8fbfdb998349c68592c53 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_6.mp3 new file mode 100644 index 00000000..95618d52 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_6.mp3.meta new file mode 100644 index 00000000..a22f9bfb --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fec36664921eda2429e49301419cd888 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/9c9d5560d710aab4c28381fe95ba01cb + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_7.mp3 new file mode 100644 index 00000000..4c591f0f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_7.mp3.meta new file mode 100644 index 00000000..56e1990e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3c5aa444177e0a6498310c9d21e5097d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/50a803e574ad81b6b05a454c211cc2ab + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_8.mp3 new file mode 100644 index 00000000..715c0a64 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_8.mp3.meta new file mode 100644 index 00000000..dc224cf3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 96af3c123f2e75f46a8bfd82f23735fd +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/607eba7238ec7bcf4f3498f3d2e92db5 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_9.mp3 new file mode 100644 index 00000000..8e80bfa0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_9.mp3.meta new file mode 100644 index 00000000..fc7170d7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/3_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 62b01a6804c86d44085be63f4be6812c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/dbd5059822e02ef6caaaf2b47455720b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/4.mp3 new file mode 100644 index 00000000..cba8ec7e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/4.mp3.meta new file mode 100644 index 00000000..b36e99a7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fa30b82365501d74c8978b3bcffae3ef +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/812ac2e2ec6e37433b764c9c36e428f9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/6.mp3 new file mode 100644 index 00000000..64350eca Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/6.mp3.meta new file mode 100644 index 00000000..c496126f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f844d676517c554488f2d0fffb6020fc +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/15db2d2ec807417323c5206a4885e42d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/7.mp3 new file mode 100644 index 00000000..e4611e3b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/7.mp3.meta new file mode 100644 index 00000000..af0345bf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3b64791f6b11b734a916d63c97655382 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/d1ec91c6e56a0e5f14142613b511d192 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/card_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/card_1.mp3 new file mode 100644 index 00000000..cad735ca Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/card_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/card_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/card_1.mp3.meta new file mode 100644 index 00000000..14a69166 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/card_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b686fdeb905c5834d8187ab082d8b528 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/94ea484613d3b25aa5ff7e52e91f531b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/card_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/card_2.mp3 new file mode 100644 index 00000000..551487dd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/card_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/card_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/card_2.mp3.meta new file mode 100644 index 00000000..fcd6e378 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/card_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 175a8e629a1b45c42b61e0a786f512d9 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/96c69dd08afd47bd2015e95ce54ab15e + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/dani_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/dani_1.mp3 new file mode 100644 index 00000000..e015c653 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/dani_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/dani_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/dani_1.mp3.meta new file mode 100644 index 00000000..4862d792 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/dani_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 065d8d6a180c09e47bbfc633f3bbe7fd +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/ed3cfe3ace5a875421767704f0402a14 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/dani_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/dani_2.mp3 new file mode 100644 index 00000000..e485fb6d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/dani_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/dani_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/dani_2.mp3.meta new file mode 100644 index 00000000..f574e46d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/dani_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 436686ebb56eb914ea52ca6980ab7a5a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/e10d8ca74d4b1826d58dd3654e0013f0 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/dani_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/dani_3.mp3 new file mode 100644 index 00000000..aeb59c07 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/dani_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/dani_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/dani_3.mp3.meta new file mode 100644 index 00000000..650d5ec6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/dani_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6a0e9260b3e63b04cbf0a214c3f58df4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/231ffa17632c407ed3b4aaa89095db70 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_1.mp3 new file mode 100644 index 00000000..f30160e0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_1.mp3.meta new file mode 100644 index 00000000..22f7f4b6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: aef92c2675107474ebf9d2f985c65a7d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/e74b4acd39623347aac433334bf53986 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_2.mp3 new file mode 100644 index 00000000..14e9b5f7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_2.mp3.meta new file mode 100644 index 00000000..e0cc70bd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3b09d59974501e540b7dee5965858d28 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/b0b36672dce8b7f86f2d42bf6bae8aa1 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_3.mp3 new file mode 100644 index 00000000..8b2ca6d1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_3.mp3.meta new file mode 100644 index 00000000..385195b9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 164c0ee2c65759c45a2e346fa2105da6 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/3222127b54bb5e0425ad50cb7abe4a05 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_4.mp3 new file mode 100644 index 00000000..a70d5c78 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_4.mp3.meta new file mode 100644 index 00000000..ef10e57c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/sound/woman/pass_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 326948150d25b6e47bf125f998739766 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/poker/sanqianfen/3ce3f8b669649316d25a1b7e3de4fc1c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/ui.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/ui.meta new file mode 100644 index 00000000..2606c8be --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 04fd92abd7b208a49bfc12446391eea8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/ui/Extend_Poker_SanQianFen_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/ui/Extend_Poker_SanQianFen_fui.bytes new file mode 100644 index 00000000..7630fc9f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/ui/Extend_Poker_SanQianFen_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/ui/Extend_Poker_SanQianFen_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/ui/Extend_Poker_SanQianFen_fui.bytes.meta new file mode 100644 index 00000000..895b2e9e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/ui/Extend_Poker_SanQianFen_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 239de41f69722bd49891c7623857a510 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/poker/sanqianfen/37757f6bcba6ab6c2943eeb6be9a83c9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/ui/Info_Poker_SanQianFen_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/ui/Info_Poker_SanQianFen_fui.bytes new file mode 100644 index 00000000..77d91420 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/ui/Info_Poker_SanQianFen_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/ui/Info_Poker_SanQianFen_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/ui/Info_Poker_SanQianFen_fui.bytes.meta new file mode 100644 index 00000000..b1a4d796 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/sanqianfen/ui/Info_Poker_SanQianFen_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: adb5a314b959e6241a5ca4b375b40b7d +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/poker/sanqianfen/8c97b1a0db723c8fe051495e96b322f9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu.meta new file mode 100644 index 00000000..1049f305 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6d78df3400e831444b682875d421b8bd +folderAsset: yes +timeCreated: 1561176569 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg.meta new file mode 100644 index 00000000..839b8fa0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9f6d9c4df9ce5274492b2a39e51ac944 +folderAsset: yes +timeCreated: 1564626492 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg/bg1.png b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg/bg1.png new file mode 100644 index 00000000..b0119cd7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg/bg1.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg/bg1.png.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg/bg1.png.meta new file mode 100644 index 00000000..3ed67415 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg/bg1.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 7187988cf5e56a546a0ff1f1e11437d6 +timeCreated: 1564626493 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg/bg2.png b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg/bg2.png new file mode 100644 index 00000000..bb6e1a8b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg/bg2.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg/bg2.png.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg/bg2.png.meta new file mode 100644 index 00000000..27173c09 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg/bg2.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 8c119e2443e758a44a770fe5e498ac3e +timeCreated: 1575365643 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg/bg3.png b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg/bg3.png new file mode 100644 index 00000000..e11e9413 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg/bg3.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg/bg3.png.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg/bg3.png.meta new file mode 100644 index 00000000..3be154f8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/bg/bg3.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 71545ca90b5cc464bb566b1b88baaba8 +timeCreated: 1576482920 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound.meta new file mode 100644 index 00000000..7cf54119 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 20e4f29f2a62ee34790dab5ff8e9f37f +folderAsset: yes +timeCreated: 1561178583 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/bgm1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/bgm1.mp3 new file mode 100644 index 00000000..d4baeffb Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/bgm1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/bgm1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/bgm1.mp3.meta new file mode 100644 index 00000000..c68abb15 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/bgm1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 83b26aca668bf01459075e9b38e7dd50 +timeCreated: 1539140979 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/chupai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/chupai.mp3 new file mode 100644 index 00000000..d3452cb3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/chupai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/chupai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/chupai.mp3.meta new file mode 100644 index 00000000..1867253e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/chupai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c2d98adb73502ba498b7da33e39b5e69 +timeCreated: 1519463463 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/click.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/click.mp3 new file mode 100644 index 00000000..c90ed0e5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/click.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/click.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/click.mp3.meta new file mode 100644 index 00000000..804a91de --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/click.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 063c42ff6a1251b4fa3a262e308292e9 +timeCreated: 1515572559 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/fapai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/fapai.mp3 new file mode 100644 index 00000000..8babaa08 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/fapai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/fapai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/fapai.mp3.meta new file mode 100644 index 00000000..22e696c7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/fapai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bb4a051d1ab30a44e8e20739b8511875 +timeCreated: 1515133521 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man.meta new file mode 100644 index 00000000..cc103f23 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8205567306fb53c4299ecb1ab2a47461 +folderAsset: yes +timeCreated: 1513927546 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/10.mp3 new file mode 100644 index 00000000..4f358f65 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/10.mp3.meta new file mode 100644 index 00000000..b12c567d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/10.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: f7c236e1b297ddb46ab31a97e16290ff +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/11.mp3 new file mode 100644 index 00000000..1670d392 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/11.mp3.meta new file mode 100644 index 00000000..8475e9ad --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ed32c899760814f47ae9ec76a6733aec +timeCreated: 1513927553 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_10.mp3 new file mode 100644 index 00000000..6729bec7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_10.mp3.meta new file mode 100644 index 00000000..9e99c865 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 66460428591145c4490ed1dfbfaf2fd5 +timeCreated: 1513927552 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_11.mp3 new file mode 100644 index 00000000..5b428ef9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_11.mp3.meta new file mode 100644 index 00000000..2f09c1ed --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a3528f7b9f02baa4ba4a2f25c2426058 +timeCreated: 1513927555 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_12.mp3 new file mode 100644 index 00000000..395e2cee Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_12.mp3.meta new file mode 100644 index 00000000..bf90887c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5da4767d13f6f7145bae12dc14feb73d +timeCreated: 1513927558 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_13.mp3 new file mode 100644 index 00000000..9a544470 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_13.mp3.meta new file mode 100644 index 00000000..8611cf31 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6429a17738a97b74ab6904b593512528 +timeCreated: 1513927550 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_14.mp3 new file mode 100644 index 00000000..7c1b4635 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_14.mp3.meta new file mode 100644 index 00000000..9bd7d5e6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 365d453493f9ec84fa38f76bfed3279b +timeCreated: 1513927553 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_15.mp3 new file mode 100644 index 00000000..94101e22 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_15.mp3.meta new file mode 100644 index 00000000..9664a63f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_15.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 39a3f6cead9194e49b41eb2c6cfd9748 +timeCreated: 1513927554 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_3.mp3 new file mode 100644 index 00000000..c5d9a9fd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_3.mp3.meta new file mode 100644 index 00000000..8297113e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8f390655ad7cd0d4a9cc1b988dc1056a +timeCreated: 1513927555 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_4.mp3 new file mode 100644 index 00000000..848ee03b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_4.mp3.meta new file mode 100644 index 00000000..d9b66572 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2eb521b843498604ca4c6d595488e767 +timeCreated: 1513927551 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_5.mp3 new file mode 100644 index 00000000..afcfcd48 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_5.mp3.meta new file mode 100644 index 00000000..e7f49f37 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2ebb00a0ec675494aa1adc8351943825 +timeCreated: 1513927555 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_6.mp3 new file mode 100644 index 00000000..f6b10188 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_6.mp3.meta new file mode 100644 index 00000000..7cf3f64c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 83016240eff112e408983bb56b84e223 +timeCreated: 1513927548 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_7.mp3 new file mode 100644 index 00000000..2ef2c4f8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_7.mp3.meta new file mode 100644 index 00000000..abef4d5a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 38af6e2e246fbbb44b09918a0bff2c2d +timeCreated: 1513927554 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_8.mp3 new file mode 100644 index 00000000..dc04ec4e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_8.mp3.meta new file mode 100644 index 00000000..2eebb5e9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c1924685a75a5a3488b46cc79f611520 +timeCreated: 1513927548 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_9.mp3 new file mode 100644 index 00000000..eace6671 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_9.mp3.meta new file mode 100644 index 00000000..37d10168 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/1_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: eda73c2bec8f77c46a25d070f0df1b31 +timeCreated: 1513927556 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_10.mp3 new file mode 100644 index 00000000..9a0137ec Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_10.mp3.meta new file mode 100644 index 00000000..e6ecb410 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_10.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: c0a0f2d681fbfd54982fea67549d739c +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_11.mp3 new file mode 100644 index 00000000..feeab0fd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_11.mp3.meta new file mode 100644 index 00000000..def5be67 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_11.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: b81730b205bf20946904d1e80e61697b +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_12.mp3 new file mode 100644 index 00000000..fcc0c6c5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_12.mp3.meta new file mode 100644 index 00000000..0b054678 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5d436ae7adbbdbf44b77111d2f2683e9 +timeCreated: 1513927546 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_13.mp3 new file mode 100644 index 00000000..00a0ca34 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_13.mp3.meta new file mode 100644 index 00000000..c2d4c26c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_13.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: e686e8573d3ff324da6c1206e064547a +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_14.mp3 new file mode 100644 index 00000000..62787230 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_14.mp3.meta new file mode 100644 index 00000000..00b2ec49 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_14.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 5497b634872d09542b98fd649f258cd0 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_15.mp3 new file mode 100644 index 00000000..410ed47f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_15.mp3.meta new file mode 100644 index 00000000..0d91d5bb --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_15.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 386c472a46661b8429318b107c5a7846 +timeCreated: 1513927557 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_3.mp3 new file mode 100644 index 00000000..600ed068 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_3.mp3.meta new file mode 100644 index 00000000..edc9011e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ecf1c755c76de2e4f9f71655f023a9b1 +timeCreated: 1513927546 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_4.mp3 new file mode 100644 index 00000000..ba5719a0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_4.mp3.meta new file mode 100644 index 00000000..23ceaba0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f12a9c96139d8be478a9622df4d4b6b5 +timeCreated: 1513927554 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_5.mp3 new file mode 100644 index 00000000..e9e790be Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_5.mp3.meta new file mode 100644 index 00000000..ed7aea7c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 58b5055fe9ec7674d82813ab95e3e4be +timeCreated: 1513927551 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_6.mp3 new file mode 100644 index 00000000..74a35934 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_6.mp3.meta new file mode 100644 index 00000000..5eb6a8ec --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b527ca3a8266f784485a588328cb4b32 +timeCreated: 1513927554 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_7.mp3 new file mode 100644 index 00000000..fabd1c8b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_7.mp3.meta new file mode 100644 index 00000000..b6414485 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c9f51111eff2e6047af8f50e594882cf +timeCreated: 1513927553 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_8.mp3 new file mode 100644 index 00000000..3fe390b3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_8.mp3.meta new file mode 100644 index 00000000..bf12087b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2ec400660164e08439dd3f683754ff68 +timeCreated: 1513927552 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_9.mp3 new file mode 100644 index 00000000..95467aaf Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_9.mp3.meta new file mode 100644 index 00000000..63f985ed --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/2_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c9cc9470e8023f84f8509ba97ebc8830 +timeCreated: 1513927547 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_10.mp3 new file mode 100644 index 00000000..7f3d7494 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_10.mp3.meta new file mode 100644 index 00000000..910e3873 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_10.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 40aa0f0d03a1c9a4c834c761cb66e0cb +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_11.mp3 new file mode 100644 index 00000000..4913912f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_11.mp3.meta new file mode 100644 index 00000000..af5b3415 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b118d4d0f5f8713488af9da88269c821 +timeCreated: 1513927556 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_12.mp3 new file mode 100644 index 00000000..ee0c6429 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_12.mp3.meta new file mode 100644 index 00000000..6c6d4115 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_12.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 2146622abfc22d14ba6271c3f2c3b5d6 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_13.mp3 new file mode 100644 index 00000000..e62af3f4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_13.mp3.meta new file mode 100644 index 00000000..d4b83b6e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_13.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: c11617473836a6e43a60bc719a07893d +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_14.mp3 new file mode 100644 index 00000000..33de32dd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_14.mp3.meta new file mode 100644 index 00000000..3b5e820e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_14.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: b3bf573d5fc35f94b98428a435a339d9 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_15.mp3 new file mode 100644 index 00000000..8bd6abfc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_15.mp3.meta new file mode 100644 index 00000000..7931772d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_15.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 2fd5db94dee15e648904c974ce472e5a +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_3.mp3 new file mode 100644 index 00000000..474ed768 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_3.mp3.meta new file mode 100644 index 00000000..498b87c2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_3.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: cee7d5d9dd886724f9fa3dd9f1ecbe26 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_4.mp3 new file mode 100644 index 00000000..8b40cbef Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_4.mp3.meta new file mode 100644 index 00000000..27e52574 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_4.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 2e4612b0cd7dc1843b7bf7b1b7898990 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_5.mp3 new file mode 100644 index 00000000..d8b04546 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_5.mp3.meta new file mode 100644 index 00000000..b0f490ec --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f568ab312aea8cb46a09cacda6771152 +timeCreated: 1513927553 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_6.mp3 new file mode 100644 index 00000000..e7fa7e62 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_6.mp3.meta new file mode 100644 index 00000000..e5a6c061 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 461c262003911784e8799b3cf292e0ae +timeCreated: 1513927552 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_7.mp3 new file mode 100644 index 00000000..c01fe5ba Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_7.mp3.meta new file mode 100644 index 00000000..01f83cc4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_7.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: ea82404cf41bb8846a59dfe4145c610e +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_8.mp3 new file mode 100644 index 00000000..4ec4b445 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_8.mp3.meta new file mode 100644 index 00000000..941c25af --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_8.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: b1ccb60811fea2c4b973e289210f8b2c +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_9.mp3 new file mode 100644 index 00000000..7aea3a92 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_9.mp3.meta new file mode 100644 index 00000000..e2f0db89 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/3_9.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 3f9987e73faa65442bbb5ea8b7842c94 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/4.mp3 new file mode 100644 index 00000000..53eb9196 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/4.mp3.meta new file mode 100644 index 00000000..a4ff00fc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 73b93c61c7cf98d41b37ecd5d5c5580e +timeCreated: 1513927557 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/6.mp3 new file mode 100644 index 00000000..563871d3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/6.mp3.meta new file mode 100644 index 00000000..dbe574b0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1c40aee16b52f784b9b00ce00afe8be0 +timeCreated: 1513927558 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/7.mp3 new file mode 100644 index 00000000..b2f7a2d5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/7.mp3.meta new file mode 100644 index 00000000..aa6284a0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ea80031a0f501cb43b502b1eeca78724 +timeCreated: 1513927550 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/card_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/card_1.mp3 new file mode 100644 index 00000000..e39676cb Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/card_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/card_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/card_1.mp3.meta new file mode 100644 index 00000000..f437b0cb --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/card_1.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: e500a30b087bfa942ba2fbfd058c51b3 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/card_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/card_2.mp3 new file mode 100644 index 00000000..4f399607 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/card_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/card_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/card_2.mp3.meta new file mode 100644 index 00000000..5d2ba76a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/card_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 220d82a278ceca2469228643af47621b +timeCreated: 1513927554 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/dani_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/dani_1.mp3 new file mode 100644 index 00000000..87028b18 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/dani_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/dani_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/dani_1.mp3.meta new file mode 100644 index 00000000..f3f7e52e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/dani_1.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 95ec6ca01139d6349a0cca7a961f6b69 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/dani_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/dani_2.mp3 new file mode 100644 index 00000000..40549d55 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/dani_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/dani_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/dani_2.mp3.meta new file mode 100644 index 00000000..6f3b1674 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/dani_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4c822e0f51a157b4b8b4c405d0faf793 +timeCreated: 1513927549 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/dani_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/dani_3.mp3 new file mode 100644 index 00000000..31d48947 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/dani_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/dani_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/dani_3.mp3.meta new file mode 100644 index 00000000..4153ab4d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/dani_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 26ff1459fdbdb92459044350ba366cfc +timeCreated: 1513927549 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_1.mp3 new file mode 100644 index 00000000..ab664e8e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_1.mp3.meta new file mode 100644 index 00000000..2fe8f882 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_1.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 6fcdf0d069f7c1943a6bc3093ff06bd9 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_2.mp3 new file mode 100644 index 00000000..80bb9be2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_2.mp3.meta new file mode 100644 index 00000000..f9be72d4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_2.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 2b46224854dced74fb4f4348302f0058 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_3.mp3 new file mode 100644 index 00000000..ebc53ff9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_3.mp3.meta new file mode 100644 index 00000000..1dde3612 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_3.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: b69d5360b66980c4bac3d57662f912de +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_4.mp3 new file mode 100644 index 00000000..b48e7145 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_4.mp3.meta new file mode 100644 index 00000000..f1ad3462 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/man/pass_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a8f829f5f19700e4cb952587c40d7a5e +timeCreated: 1513927554 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/mopai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/mopai.mp3 new file mode 100644 index 00000000..5ef6b1e2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/mopai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/mopai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/mopai.mp3.meta new file mode 100644 index 00000000..121b8022 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/mopai.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: d3aae2547e5de0c4882624cc0fa565be +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/sunzi.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/sunzi.mp3 new file mode 100644 index 00000000..dd74ce61 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/sunzi.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/sunzi.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/sunzi.mp3.meta new file mode 100644 index 00000000..d176b4ff --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/sunzi.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: beea47ea5aaca4241883d13fdb6ad534 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman.meta new file mode 100644 index 00000000..189596c6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: babeb32fc6a5cc74ab52cd709c9b32ff +folderAsset: yes +timeCreated: 1513927546 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/10.mp3 new file mode 100644 index 00000000..0de67206 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/10.mp3.meta new file mode 100644 index 00000000..a66abcc9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 139cb5336351ba341b81e9cc74c15a53 +timeCreated: 1513927550 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/11.mp3 new file mode 100644 index 00000000..79cf9acd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/11.mp3.meta new file mode 100644 index 00000000..262c3395 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fcad23fb173f33f46bb1bcb26da22ad7 +timeCreated: 1513927557 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_10.mp3 new file mode 100644 index 00000000..9d42a15f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_10.mp3.meta new file mode 100644 index 00000000..1cc135c3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6ad3c2825bf72344491fbdc03b2df37c +timeCreated: 1513927548 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_11.mp3 new file mode 100644 index 00000000..f172a3b4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_11.mp3.meta new file mode 100644 index 00000000..7aecfaff --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_11.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: bc19eeb03ed443541bc1883e801291a8 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_12.mp3 new file mode 100644 index 00000000..17fe884b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_12.mp3.meta new file mode 100644 index 00000000..8ac90997 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 236c376d2aac9c74e9d2ced70f1ff67e +timeCreated: 1513927552 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_13.mp3 new file mode 100644 index 00000000..43024095 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_13.mp3.meta new file mode 100644 index 00000000..45265ec6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f37138d44ebebf442bfae061c4ad9fdd +timeCreated: 1513927550 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_14.mp3 new file mode 100644 index 00000000..ecd641f5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_14.mp3.meta new file mode 100644 index 00000000..9bb18a13 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 27f21911fed0eab42af940ff8d6cf331 +timeCreated: 1513927549 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_15.mp3 new file mode 100644 index 00000000..28d9b7f4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_15.mp3.meta new file mode 100644 index 00000000..ce6c748d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_15.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 70428c6bccca4b04d9004b1b7267076f +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_3.mp3 new file mode 100644 index 00000000..7c00aa67 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_3.mp3.meta new file mode 100644 index 00000000..ec639c9b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_3.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 4a707a458cc10da47974a6543d42202a +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_4.mp3 new file mode 100644 index 00000000..7fcff3e6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_4.mp3.meta new file mode 100644 index 00000000..b1831a0e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_4.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 2e0e6c15c01b6124797a0c9c7cb724fa +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_5.mp3 new file mode 100644 index 00000000..f485b57a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_5.mp3.meta new file mode 100644 index 00000000..5729575b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2e208447389fa42429f2f218178e96d9 +timeCreated: 1513927549 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_6.mp3 new file mode 100644 index 00000000..0ede39e1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_6.mp3.meta new file mode 100644 index 00000000..91ab153b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_6.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 27a2c29ac35d0f54aaa4ee88bcfb464e +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_7.mp3 new file mode 100644 index 00000000..e6b91f2c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_7.mp3.meta new file mode 100644 index 00000000..d8878170 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_7.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: d6aae94c4d5c17e4a86d45ccaf8859ae +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_8.mp3 new file mode 100644 index 00000000..ef222c15 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_8.mp3.meta new file mode 100644 index 00000000..8c4d62a3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_8.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 8374d9145b4986b4c99fb70c8c855178 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_9.mp3 new file mode 100644 index 00000000..cedd7958 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_9.mp3.meta new file mode 100644 index 00000000..9778a977 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/1_9.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: db40225242ba29e42a1eece2cc2d5df6 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_10.mp3 new file mode 100644 index 00000000..0fe90ca7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_10.mp3.meta new file mode 100644 index 00000000..5d0a601c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: acb113263f2529542a0382c6a036356a +timeCreated: 1513927556 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_11.mp3 new file mode 100644 index 00000000..c8e832ed Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_11.mp3.meta new file mode 100644 index 00000000..8610507d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_11.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 82eeffed4d2876e458439bbf5a191144 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_12.mp3 new file mode 100644 index 00000000..2aece7c3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_12.mp3.meta new file mode 100644 index 00000000..a9a80763 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_12.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 11d9e81405b289f4c9787a8a465d5d13 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_13.mp3 new file mode 100644 index 00000000..71a93b5f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_13.mp3.meta new file mode 100644 index 00000000..3d2dbecd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_13.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: b130e525ce923f54ca868cc7fe3aab24 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_14.mp3 new file mode 100644 index 00000000..26b33503 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_14.mp3.meta new file mode 100644 index 00000000..6117fb3f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1c3c6334a8ea1d24790275b0bfd421b9 +timeCreated: 1513927551 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_15.mp3 new file mode 100644 index 00000000..b6f6346d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_15.mp3.meta new file mode 100644 index 00000000..a39f3710 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_15.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 9d17a914f99124641a275e13ab913f8c +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_3.mp3 new file mode 100644 index 00000000..fc6894d4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_3.mp3.meta new file mode 100644 index 00000000..a5d4e09e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: cee21f100046d8a4299906ec2536a44d +timeCreated: 1513927548 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_4.mp3 new file mode 100644 index 00000000..d7a8a901 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_4.mp3.meta new file mode 100644 index 00000000..3fb1c44b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c046eb4a5050d11409ff06a299c5dd54 +timeCreated: 1513927551 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_5.mp3 new file mode 100644 index 00000000..f0a1ea68 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_5.mp3.meta new file mode 100644 index 00000000..7ae36e9f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_5.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 7c1dafc16b957f54d8a0420eef9a6df1 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_6.mp3 new file mode 100644 index 00000000..5c82cdff Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_6.mp3.meta new file mode 100644 index 00000000..40798f7c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9c92e38edfeb069458082041dafac5d7 +timeCreated: 1513927556 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_7.mp3 new file mode 100644 index 00000000..764e6449 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_7.mp3.meta new file mode 100644 index 00000000..360c8c22 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_7.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 8aa46fa83abc8b24f91868a9372f0e77 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_8.mp3 new file mode 100644 index 00000000..d70e71c3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_8.mp3.meta new file mode 100644 index 00000000..8c468ed6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_8.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: c884648fc52204a489644edecf85d9c7 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_9.mp3 new file mode 100644 index 00000000..a09f0210 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_9.mp3.meta new file mode 100644 index 00000000..9bd90d46 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/2_9.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: c51211b211adad340af0874c46b2fc7d +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_10.mp3 new file mode 100644 index 00000000..bb4710e2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_10.mp3.meta new file mode 100644 index 00000000..cea3d8d7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_10.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 3812fb787aaa9634bb68828983618d3b +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_11.mp3 new file mode 100644 index 00000000..e8c09a08 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_11.mp3.meta new file mode 100644 index 00000000..79c584c9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: de5864426cfa6f140aca1298d84033cb +timeCreated: 1513927555 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_12.mp3 new file mode 100644 index 00000000..482376a7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_12.mp3.meta new file mode 100644 index 00000000..12086eba --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_12.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 09d6fa734553aeb41bc318a6fc2d9d85 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_13.mp3 new file mode 100644 index 00000000..59b5178f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_13.mp3.meta new file mode 100644 index 00000000..632019d6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 895683ed5f7be5d43950579442e1d161 +timeCreated: 1513927553 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_14.mp3 new file mode 100644 index 00000000..f315c19f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_14.mp3.meta new file mode 100644 index 00000000..c7d6e7bd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 64b5fecce737d2147b63c062eb9021c1 +timeCreated: 1513927546 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_15.mp3 new file mode 100644 index 00000000..acf3dece Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_15.mp3.meta new file mode 100644 index 00000000..65fb45d7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_15.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 3e55017c1b292034e87060a1dc224053 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_3.mp3 new file mode 100644 index 00000000..39010171 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_3.mp3.meta new file mode 100644 index 00000000..114626fa --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_3.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 192b502df97a1f04cbf5375b7b2103ed +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_4.mp3 new file mode 100644 index 00000000..7df04916 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_4.mp3.meta new file mode 100644 index 00000000..53bf9432 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8ce7582c8c646b94db1c79a7c8b72675 +timeCreated: 1513927549 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_5.mp3 new file mode 100644 index 00000000..e5f2bd0c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_5.mp3.meta new file mode 100644 index 00000000..72c2ce49 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_5.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: b4775c2894438b745aed0c24e1c7a53f +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_6.mp3 new file mode 100644 index 00000000..95618d52 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_6.mp3.meta new file mode 100644 index 00000000..6cc10e53 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_6.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 3fe6359b38ecf7f489438e061fad979a +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_7.mp3 new file mode 100644 index 00000000..4c591f0f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_7.mp3.meta new file mode 100644 index 00000000..5e919fc4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_7.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 6c67b730a82b76b42989258bf0264c81 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_8.mp3 new file mode 100644 index 00000000..715c0a64 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_8.mp3.meta new file mode 100644 index 00000000..60de124a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7c92b45443a65f248986e2e30cfa10df +timeCreated: 1513927547 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_9.mp3 new file mode 100644 index 00000000..8e80bfa0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_9.mp3.meta new file mode 100644 index 00000000..e61f8811 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/3_9.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 7d1a49bfec8328848bf7917b42078d6c +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/4.mp3 new file mode 100644 index 00000000..cba8ec7e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/4.mp3.meta new file mode 100644 index 00000000..34495faf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 32c4b58bb6a1c50489197f28669f250f +timeCreated: 1513927553 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/6.mp3 new file mode 100644 index 00000000..64350eca Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/6.mp3.meta new file mode 100644 index 00000000..40ec862f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/6.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 10fb85098ef7a29449d5d8dd60149a18 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/7.mp3 new file mode 100644 index 00000000..e4611e3b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/7.mp3.meta new file mode 100644 index 00000000..a39e5ad8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/7.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 94b61e052e404d34d8deec3be9668389 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/card_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/card_1.mp3 new file mode 100644 index 00000000..cad735ca Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/card_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/card_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/card_1.mp3.meta new file mode 100644 index 00000000..ef0b0335 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/card_1.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 76bf23da1c774c84993234dd471f562c +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/card_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/card_2.mp3 new file mode 100644 index 00000000..551487dd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/card_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/card_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/card_2.mp3.meta new file mode 100644 index 00000000..f384fb19 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/card_2.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 71170e00cd1a07844b7452a7365b8763 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/dani_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/dani_1.mp3 new file mode 100644 index 00000000..e015c653 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/dani_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/dani_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/dani_1.mp3.meta new file mode 100644 index 00000000..e05ad2e3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/dani_1.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 07ac36c28e7593245bb6e459720c8f9f +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/dani_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/dani_2.mp3 new file mode 100644 index 00000000..e485fb6d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/dani_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/dani_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/dani_2.mp3.meta new file mode 100644 index 00000000..f7a9519f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/dani_2.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 6cffd0a3a95f8f94e89123b409f37023 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/dani_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/dani_3.mp3 new file mode 100644 index 00000000..aeb59c07 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/dani_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/dani_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/dani_3.mp3.meta new file mode 100644 index 00000000..cb0f35ca --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/dani_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ec3b86001accf84499c925618be14074 +timeCreated: 1513927557 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_1.mp3 new file mode 100644 index 00000000..f30160e0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_1.mp3.meta new file mode 100644 index 00000000..a89033c1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ea4477a718d7f5b40bc9a76e5f1d02d9 +timeCreated: 1513927547 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_2.mp3 new file mode 100644 index 00000000..14e9b5f7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_2.mp3.meta new file mode 100644 index 00000000..04662866 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_2.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: ef5d3fd8f540a58469dd4762d8da8008 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_3.mp3 new file mode 100644 index 00000000..8b2ca6d1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_3.mp3.meta new file mode 100644 index 00000000..be3354aa --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_3.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: dbd9e1532a78bb54da26e254340c00af +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_4.mp3 new file mode 100644 index 00000000..a70d5c78 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_4.mp3.meta new file mode 100644 index 00000000..03787434 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/sound/woman/pass_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6f470fc9141b11447b3a745317bb32e6 +timeCreated: 1513927558 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/ui.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/ui.meta new file mode 100644 index 00000000..76682052 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7f43aa906c2d1d343b181b4c383e2a78 +folderAsset: yes +timeCreated: 1561176569 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/ui/Extend_Poker_ShengSiDu_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/ui/Extend_Poker_ShengSiDu_fui.bytes new file mode 100644 index 00000000..04ac5bac Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/ui/Extend_Poker_ShengSiDu_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/ui/Extend_Poker_ShengSiDu_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/ui/Extend_Poker_ShengSiDu_fui.bytes.meta new file mode 100644 index 00000000..2e8a1bd0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/ui/Extend_Poker_ShengSiDu_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 29af925e833d34c4381fed631330c06e +timeCreated: 1629430872 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/ui/Info_Poker_ShengSiDu_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/ui/Info_Poker_ShengSiDu_fui.bytes new file mode 100644 index 00000000..7da35e22 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/ui/Info_Poker_ShengSiDu_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/shengsidu/ui/Info_Poker_ShengSiDu_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/ui/Info_Poker_ShengSiDu_fui.bytes.meta new file mode 100644 index 00000000..bc424f5c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/shengsidu/ui/Info_Poker_ShengSiDu_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5bcdae147ff203144adc0489124dd3db +timeCreated: 1629430689 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu.meta new file mode 100644 index 00000000..4d42834b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f6553616decb0244c93478165fe12644 +folderAsset: yes +timeCreated: 1629291366 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg.meta new file mode 100644 index 00000000..f2f2cfb2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: eb60eab047d27f24b800b0571ba1ff3e +folderAsset: yes +timeCreated: 1564626492 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg/bg1.png b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg/bg1.png new file mode 100644 index 00000000..d1a76406 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg/bg1.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg/bg1.png.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg/bg1.png.meta new file mode 100644 index 00000000..97d497d8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg/bg1.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 1d80c036c29842d47bd86e2e24b37a01 +timeCreated: 1564626493 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg/bg2.png b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg/bg2.png new file mode 100644 index 00000000..bb6e1a8b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg/bg2.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg/bg2.png.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg/bg2.png.meta new file mode 100644 index 00000000..dd1a8aae --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg/bg2.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: bac629bffb5dfab4ab5ceeffc9a151c0 +timeCreated: 1575365643 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg/bg3.png b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg/bg3.png new file mode 100644 index 00000000..e11e9413 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg/bg3.png differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg/bg3.png.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg/bg3.png.meta new file mode 100644 index 00000000..3b77fa6e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/bg/bg3.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 9aa257c0ac9b4fd4d9582ee44b8f0c44 +timeCreated: 1576482920 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 0 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound.meta new file mode 100644 index 00000000..86619ba5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3f13f6bdc3590984dba7436e975f82e2 +folderAsset: yes +timeCreated: 1561178583 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/bgm1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/bgm1.mp3 new file mode 100644 index 00000000..ec54f576 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/bgm1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/bgm1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/bgm1.mp3.meta new file mode 100644 index 00000000..78fe2230 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/bgm1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 73ce210a2c6291046b0ac6a19db612a6 +timeCreated: 1539140979 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/chupai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/chupai.mp3 new file mode 100644 index 00000000..d3452cb3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/chupai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/chupai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/chupai.mp3.meta new file mode 100644 index 00000000..70b39c63 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/chupai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 35a368040047f764286dedf359fd52f7 +timeCreated: 1519463463 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/click.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/click.mp3 new file mode 100644 index 00000000..c90ed0e5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/click.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/click.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/click.mp3.meta new file mode 100644 index 00000000..ff159a12 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/click.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 14115e0770d56404bb738e3640204cdd +timeCreated: 1515572559 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/fapai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/fapai.mp3 new file mode 100644 index 00000000..8babaa08 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/fapai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/fapai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/fapai.mp3.meta new file mode 100644 index 00000000..7eef5367 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/fapai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b2e743f5674a5e847bb8cbd18f0d3925 +timeCreated: 1515133521 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man.meta new file mode 100644 index 00000000..897018bd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a156d611ad65cc148a1e03c6e466bc43 +folderAsset: yes +timeCreated: 1513927546 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/10.mp3 new file mode 100644 index 00000000..4f358f65 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/10.mp3.meta new file mode 100644 index 00000000..9945889b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/10.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 3bbb7c16bda850042bf6080326e53663 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/11.mp3 new file mode 100644 index 00000000..1670d392 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/11.mp3.meta new file mode 100644 index 00000000..d35bc64d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 154a6099797d2554ea129b8f5fb576ec +timeCreated: 1513927553 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_10.mp3 new file mode 100644 index 00000000..6729bec7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_10.mp3.meta new file mode 100644 index 00000000..7a60b75a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1bb03be506ab2a94f94685a0c6ba3326 +timeCreated: 1513927552 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_11.mp3 new file mode 100644 index 00000000..5b428ef9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_11.mp3.meta new file mode 100644 index 00000000..816a7cea --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 263277697a8a39c4296e86e70f0cdae7 +timeCreated: 1513927555 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_12.mp3 new file mode 100644 index 00000000..395e2cee Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_12.mp3.meta new file mode 100644 index 00000000..a0f063d5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 29f0114920d0c3c4db5ad42a1b4f3f57 +timeCreated: 1513927558 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_13.mp3 new file mode 100644 index 00000000..9a544470 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_13.mp3.meta new file mode 100644 index 00000000..272ff44e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a73f8b28cb8659046bde576ad1bda730 +timeCreated: 1513927550 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_14.mp3 new file mode 100644 index 00000000..7c1b4635 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_14.mp3.meta new file mode 100644 index 00000000..202b79ac --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 834f29b73451dbc4dba7cebc9532c5a4 +timeCreated: 1513927553 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_15.mp3 new file mode 100644 index 00000000..94101e22 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_15.mp3.meta new file mode 100644 index 00000000..3137eb3c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_15.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 86719cce0be9edd4d95a665ea535faef +timeCreated: 1513927554 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_3.mp3 new file mode 100644 index 00000000..c5d9a9fd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_3.mp3.meta new file mode 100644 index 00000000..ed067b1c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fe48b9fbac94ec049aaaa009db743c22 +timeCreated: 1513927555 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_4.mp3 new file mode 100644 index 00000000..848ee03b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_4.mp3.meta new file mode 100644 index 00000000..156386a3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 27e491cfa153fa541a53694349760b3b +timeCreated: 1513927551 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_5.mp3 new file mode 100644 index 00000000..afcfcd48 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_5.mp3.meta new file mode 100644 index 00000000..0c009826 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ebf3be12cbfb681408af65426c2badd7 +timeCreated: 1513927555 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_6.mp3 new file mode 100644 index 00000000..f6b10188 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_6.mp3.meta new file mode 100644 index 00000000..cfefebe6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6683453c79679ac46a1dae273a865455 +timeCreated: 1513927548 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_7.mp3 new file mode 100644 index 00000000..2ef2c4f8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_7.mp3.meta new file mode 100644 index 00000000..1d56129e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b3726e99eb346fd438192103cf2c6730 +timeCreated: 1513927554 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_8.mp3 new file mode 100644 index 00000000..dc04ec4e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_8.mp3.meta new file mode 100644 index 00000000..a5457e04 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 32fbada0028ebd441a9e6469d30f0e7a +timeCreated: 1513927548 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_9.mp3 new file mode 100644 index 00000000..eace6671 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_9.mp3.meta new file mode 100644 index 00000000..d96f07cf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/1_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a92bafc057d5e60478201b04d374c97b +timeCreated: 1513927556 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_10.mp3 new file mode 100644 index 00000000..9a0137ec Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_10.mp3.meta new file mode 100644 index 00000000..30d531a1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_10.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: f35a5edab52bb6347bd35200c68132cd +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_11.mp3 new file mode 100644 index 00000000..feeab0fd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_11.mp3.meta new file mode 100644 index 00000000..cb5666f2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_11.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 808336105add6a9478e02dc2bb9909b6 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_12.mp3 new file mode 100644 index 00000000..fcc0c6c5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_12.mp3.meta new file mode 100644 index 00000000..8dc20f19 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 36f360ab26a6e244088dd7431148502a +timeCreated: 1513927546 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_13.mp3 new file mode 100644 index 00000000..00a0ca34 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_13.mp3.meta new file mode 100644 index 00000000..ed81facd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_13.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 354e7904b2cf4df42b2e63cb84d60e79 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_14.mp3 new file mode 100644 index 00000000..62787230 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_14.mp3.meta new file mode 100644 index 00000000..ef3f57a5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_14.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 3509deaf2492a074ea3a7556d14bdd39 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_15.mp3 new file mode 100644 index 00000000..410ed47f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_15.mp3.meta new file mode 100644 index 00000000..a034be97 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_15.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 334fdc492257efd47b3108ca0038d6ec +timeCreated: 1513927557 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_3.mp3 new file mode 100644 index 00000000..600ed068 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_3.mp3.meta new file mode 100644 index 00000000..d40b1bad --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: dc033efad7e244a44a54fd54306d1041 +timeCreated: 1513927546 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_4.mp3 new file mode 100644 index 00000000..ba5719a0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_4.mp3.meta new file mode 100644 index 00000000..7f2b9424 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d70bf6f4261bb6f489e3efc88d67ca30 +timeCreated: 1513927554 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_5.mp3 new file mode 100644 index 00000000..e9e790be Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_5.mp3.meta new file mode 100644 index 00000000..8a4e0ec4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e41dc1d118924f34a9a127564a790182 +timeCreated: 1513927551 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_6.mp3 new file mode 100644 index 00000000..74a35934 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_6.mp3.meta new file mode 100644 index 00000000..56b9125c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a86d45da1877efd4180f4beb86f4031b +timeCreated: 1513927554 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_7.mp3 new file mode 100644 index 00000000..fabd1c8b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_7.mp3.meta new file mode 100644 index 00000000..417f8515 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9adacee075f7d4d49ba200dcd624b489 +timeCreated: 1513927553 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_8.mp3 new file mode 100644 index 00000000..3fe390b3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_8.mp3.meta new file mode 100644 index 00000000..85ebb5f9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 851298602937cdf4b8b57a8d1c6627a8 +timeCreated: 1513927552 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_9.mp3 new file mode 100644 index 00000000..95467aaf Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_9.mp3.meta new file mode 100644 index 00000000..9a843a0b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/2_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2e3c1bc69b9223243a046877f231b03b +timeCreated: 1513927547 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_10.mp3 new file mode 100644 index 00000000..7f3d7494 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_10.mp3.meta new file mode 100644 index 00000000..cfdc01da --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_10.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 4cfde8e872ca4244b9634f57b4e34a34 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_11.mp3 new file mode 100644 index 00000000..4913912f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_11.mp3.meta new file mode 100644 index 00000000..6d5b95f5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f97836d0c32c65b4892834b5584520c9 +timeCreated: 1513927556 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_12.mp3 new file mode 100644 index 00000000..ee0c6429 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_12.mp3.meta new file mode 100644 index 00000000..502ff991 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_12.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 04d6c53e33023b24c9c2a9c7d2b27a70 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_13.mp3 new file mode 100644 index 00000000..e62af3f4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_13.mp3.meta new file mode 100644 index 00000000..778ee882 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_13.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: d6ef4ac249bd8b54d8fa4e8e223143ac +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_14.mp3 new file mode 100644 index 00000000..33de32dd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_14.mp3.meta new file mode 100644 index 00000000..037c3f30 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_14.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 6dea183bbcb8a4b46bd850bd08bbe2ca +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_15.mp3 new file mode 100644 index 00000000..8bd6abfc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_15.mp3.meta new file mode 100644 index 00000000..8964fb51 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_15.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: c389dff3ec44c724c9b364efbaf5e3ab +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_3.mp3 new file mode 100644 index 00000000..474ed768 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_3.mp3.meta new file mode 100644 index 00000000..b7b2751f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_3.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 2668979bdd1d1784684dd9d090ca5029 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_4.mp3 new file mode 100644 index 00000000..8b40cbef Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_4.mp3.meta new file mode 100644 index 00000000..088c501b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_4.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 0a8883455ad0f424695ad204eec1b04f +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_5.mp3 new file mode 100644 index 00000000..d8b04546 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_5.mp3.meta new file mode 100644 index 00000000..b6ce7fa6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6687b118bc30834469d7c07fabfb0e71 +timeCreated: 1513927553 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_6.mp3 new file mode 100644 index 00000000..e7fa7e62 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_6.mp3.meta new file mode 100644 index 00000000..f6341690 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 17a32ac1293da5641aa89799ce0ac613 +timeCreated: 1513927552 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_7.mp3 new file mode 100644 index 00000000..c01fe5ba Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_7.mp3.meta new file mode 100644 index 00000000..3332be8d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_7.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 05b0bb3091d2f79499036843fcdd63a6 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_8.mp3 new file mode 100644 index 00000000..4ec4b445 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_8.mp3.meta new file mode 100644 index 00000000..3d4b248d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_8.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 21043ce41bf307249a51565a8cd36c26 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_9.mp3 new file mode 100644 index 00000000..7aea3a92 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_9.mp3.meta new file mode 100644 index 00000000..a8b14d45 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/3_9.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: c9037e6b5b2f6464ba637928d312ce45 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/4.mp3 new file mode 100644 index 00000000..53eb9196 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/4.mp3.meta new file mode 100644 index 00000000..f6f508d1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: cf21e73d5e817424781fbca39e791f4d +timeCreated: 1513927557 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/6.mp3 new file mode 100644 index 00000000..563871d3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/6.mp3.meta new file mode 100644 index 00000000..3d8a1ee2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d60ccf338383294428bb9bff4b17ff8b +timeCreated: 1513927558 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/7.mp3 new file mode 100644 index 00000000..b2f7a2d5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/7.mp3.meta new file mode 100644 index 00000000..56dba9c1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bb01f3da28142344b9ec808e75215ec6 +timeCreated: 1513927550 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/bujiao.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/bujiao.mp3 new file mode 100644 index 00000000..c3c6751c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/bujiao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/bujiao.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/bujiao.mp3.meta new file mode 100644 index 00000000..95f2bba9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/bujiao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2221ea940931f204396a21ba94e9e815 +timeCreated: 1629539865 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/buqiang.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/buqiang.mp3 new file mode 100644 index 00000000..9f3df058 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/buqiang.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/buqiang.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/buqiang.mp3.meta new file mode 100644 index 00000000..0601ddb3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/buqiang.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4b15f848a9f453149bc1cbce634f3517 +timeCreated: 1629539865 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/buyao0.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/buyao0.mp3 new file mode 100644 index 00000000..fbb0c96e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/buyao0.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/buyao0.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/buyao0.mp3.meta new file mode 100644 index 00000000..04998bf1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/buyao0.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f5d5455f52c59de49b4bfa6293e2d9b9 +timeCreated: 1629539865 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/buyao1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/buyao1.mp3 new file mode 100644 index 00000000..0549c2b1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/buyao1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/buyao1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/buyao1.mp3.meta new file mode 100644 index 00000000..f5adc0c7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/buyao1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 04f4437a86531d745a308f99c12a9ea0 +timeCreated: 1629548374 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/card_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/card_1.mp3 new file mode 100644 index 00000000..e39676cb Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/card_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/card_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/card_1.mp3.meta new file mode 100644 index 00000000..b8b1a3ce --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/card_1.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 025e61e2b267d494b967c864d998130b +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/card_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/card_2.mp3 new file mode 100644 index 00000000..4f399607 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/card_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/card_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/card_2.mp3.meta new file mode 100644 index 00000000..0d23c1e5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/card_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b0b8e96fab1837b419887aedab9f8c57 +timeCreated: 1513927554 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/dani_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/dani_1.mp3 new file mode 100644 index 00000000..87028b18 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/dani_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/dani_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/dani_1.mp3.meta new file mode 100644 index 00000000..fe10e9b8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/dani_1.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 21ee8447fdef42342acb6983c10e6724 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/dani_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/dani_2.mp3 new file mode 100644 index 00000000..40549d55 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/dani_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/dani_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/dani_2.mp3.meta new file mode 100644 index 00000000..5517cfb3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/dani_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f1cb2fa230163a14d9ed4d1425beec8c +timeCreated: 1513927549 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/dani_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/dani_3.mp3 new file mode 100644 index 00000000..31d48947 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/dani_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/dani_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/dani_3.mp3.meta new file mode 100644 index 00000000..94ae431f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/dani_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: abc4a4503c0ab354b8d1e3a72d124b90 +timeCreated: 1513927549 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/jiaodizhu.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/jiaodizhu.mp3 new file mode 100644 index 00000000..733013d1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/jiaodizhu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/jiaodizhu.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/jiaodizhu.mp3.meta new file mode 100644 index 00000000..1d73386e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/jiaodizhu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2e8a6ab31391fab47bc5ea4bdbf55b45 +timeCreated: 1629539865 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_1.mp3 new file mode 100644 index 00000000..ab664e8e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_1.mp3.meta new file mode 100644 index 00000000..a39481c9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_1.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 0e8bd545fe60ccc40a143b8dcbb45565 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_2.mp3 new file mode 100644 index 00000000..80bb9be2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_2.mp3.meta new file mode 100644 index 00000000..1907226a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_2.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 5ad10e398902d2b47ad35af346c58905 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_3.mp3 new file mode 100644 index 00000000..ebc53ff9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_3.mp3.meta new file mode 100644 index 00000000..565b8d29 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_3.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: af491ee3c33bec54d980029168058024 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_4.mp3 new file mode 100644 index 00000000..b48e7145 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_4.mp3.meta new file mode 100644 index 00000000..c93f68b4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/pass_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 406f8f90a5b10804283528243f538715 +timeCreated: 1513927554 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/qiangdizhu.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/qiangdizhu.mp3 new file mode 100644 index 00000000..3433b8c7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/qiangdizhu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/qiangdizhu.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/qiangdizhu.mp3.meta new file mode 100644 index 00000000..13285e01 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/man/qiangdizhu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 341f0820ec1b0a948a9f653e3713c11a +timeCreated: 1629539865 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/mopai.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/mopai.mp3 new file mode 100644 index 00000000..5ef6b1e2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/mopai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/mopai.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/mopai.mp3.meta new file mode 100644 index 00000000..398ad1f5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/mopai.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 4614a01634ad4994f9febbdb3cde5bc2 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/sunzi.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/sunzi.mp3 new file mode 100644 index 00000000..dd74ce61 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/sunzi.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/sunzi.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/sunzi.mp3.meta new file mode 100644 index 00000000..831115ff --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/sunzi.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 8b7591450e2d8a64780da4a74524a718 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman.meta new file mode 100644 index 00000000..c4ebe6b0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 423deded29b058249a80042f8feb29d2 +folderAsset: yes +timeCreated: 1513927546 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/10.mp3 new file mode 100644 index 00000000..0de67206 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/10.mp3.meta new file mode 100644 index 00000000..d12edc9c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0d60dfcf80272e441bc97252a7acd136 +timeCreated: 1513927550 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/11.mp3 new file mode 100644 index 00000000..79cf9acd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/11.mp3.meta new file mode 100644 index 00000000..e6d7e8c8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4eb203b370eb0ce49b751311b3c8d4a6 +timeCreated: 1513927557 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_10.mp3 new file mode 100644 index 00000000..9d42a15f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_10.mp3.meta new file mode 100644 index 00000000..97f96085 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1d1bf0a002c8dcb4b99b2fe49c28f2af +timeCreated: 1513927548 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_11.mp3 new file mode 100644 index 00000000..f172a3b4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_11.mp3.meta new file mode 100644 index 00000000..aa957540 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_11.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 81b4e0f07cd5eda45a0f508a91cbe96a +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_12.mp3 new file mode 100644 index 00000000..17fe884b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_12.mp3.meta new file mode 100644 index 00000000..129ad860 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_12.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 110038dc1e58a904f8f28c5edc001212 +timeCreated: 1513927552 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_13.mp3 new file mode 100644 index 00000000..43024095 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_13.mp3.meta new file mode 100644 index 00000000..9233ea5d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ef5b0bae350a40a4cafb0521bbca8d3a +timeCreated: 1513927550 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_14.mp3 new file mode 100644 index 00000000..ecd641f5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_14.mp3.meta new file mode 100644 index 00000000..7f5b8a53 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1248c51d0eb62184ea30f669527ae157 +timeCreated: 1513927549 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_15.mp3 new file mode 100644 index 00000000..28d9b7f4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_15.mp3.meta new file mode 100644 index 00000000..78e7b770 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_15.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 3acc6aca69483e346950c2b99d531cb1 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_3.mp3 new file mode 100644 index 00000000..7c00aa67 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_3.mp3.meta new file mode 100644 index 00000000..884164ca --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_3.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 006ee7ffda8656042b92722931cb53aa +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_4.mp3 new file mode 100644 index 00000000..7fcff3e6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_4.mp3.meta new file mode 100644 index 00000000..6e8cc42c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_4.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: ba62434d766e35644b2a8dbdabfc2239 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_5.mp3 new file mode 100644 index 00000000..f485b57a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_5.mp3.meta new file mode 100644 index 00000000..e4bbb2da --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: eba6d0123ea08524b8d26ec016e9605a +timeCreated: 1513927549 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_6.mp3 new file mode 100644 index 00000000..0ede39e1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_6.mp3.meta new file mode 100644 index 00000000..1db2cae5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_6.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 9aae4d2f4c0fdf1499bf445db73d7634 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_7.mp3 new file mode 100644 index 00000000..e6b91f2c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_7.mp3.meta new file mode 100644 index 00000000..762e8d03 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_7.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 4ed706512d8cda544b65a6c696b547a0 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_8.mp3 new file mode 100644 index 00000000..ef222c15 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_8.mp3.meta new file mode 100644 index 00000000..770c1b6f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_8.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 3573dcf92408ff94dae72868e7e74e53 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_9.mp3 new file mode 100644 index 00000000..cedd7958 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_9.mp3.meta new file mode 100644 index 00000000..d40a74a7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/1_9.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 2a66edae3652d9d459627a3a1bd52ea9 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_10.mp3 new file mode 100644 index 00000000..0fe90ca7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_10.mp3.meta new file mode 100644 index 00000000..e1c52cff --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_10.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 702469c7f8dca384ab866e734a3f98e1 +timeCreated: 1513927556 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_11.mp3 new file mode 100644 index 00000000..c8e832ed Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_11.mp3.meta new file mode 100644 index 00000000..e4e0cc5f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_11.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 726b26d01d39a0248a44b149c8b94ad8 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_12.mp3 new file mode 100644 index 00000000..2aece7c3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_12.mp3.meta new file mode 100644 index 00000000..87c02ab4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_12.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 33598b641eb2e9c499134756f0dee414 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_13.mp3 new file mode 100644 index 00000000..71a93b5f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_13.mp3.meta new file mode 100644 index 00000000..bba8e18a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_13.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: d30c53597f2633244a4909712ad9823c +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_14.mp3 new file mode 100644 index 00000000..26b33503 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_14.mp3.meta new file mode 100644 index 00000000..0e061e13 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 41f2e5ee08f13304982c169ae8abe82a +timeCreated: 1513927551 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_15.mp3 new file mode 100644 index 00000000..b6f6346d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_15.mp3.meta new file mode 100644 index 00000000..3277701f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_15.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 24bf8b1135047c14bba25ab89346a483 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_3.mp3 new file mode 100644 index 00000000..fc6894d4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_3.mp3.meta new file mode 100644 index 00000000..7e676996 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ba79fe90d41390f4a83be0747d799d7c +timeCreated: 1513927548 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_4.mp3 new file mode 100644 index 00000000..d7a8a901 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_4.mp3.meta new file mode 100644 index 00000000..a1f6a981 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4c8518ff88448e84b8e9e8a09facc82d +timeCreated: 1513927551 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_5.mp3 new file mode 100644 index 00000000..f0a1ea68 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_5.mp3.meta new file mode 100644 index 00000000..d174c745 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_5.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: a87358b7554541449a0c462d2c8b0df0 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_6.mp3 new file mode 100644 index 00000000..5c82cdff Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_6.mp3.meta new file mode 100644 index 00000000..990a3b4a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 166752db495900340a321ee2a0f0cc9d +timeCreated: 1513927556 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_7.mp3 new file mode 100644 index 00000000..764e6449 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_7.mp3.meta new file mode 100644 index 00000000..1e7f0133 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_7.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: acd25f5d543ce2243a702179cead4752 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_8.mp3 new file mode 100644 index 00000000..d70e71c3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_8.mp3.meta new file mode 100644 index 00000000..0cd738c5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_8.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 1d320cec2ee021b4eb652f8d4987ed5f +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_9.mp3 new file mode 100644 index 00000000..a09f0210 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_9.mp3.meta new file mode 100644 index 00000000..5c0dffb2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/2_9.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 9805875686841c14092990202011b9c9 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_10.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_10.mp3 new file mode 100644 index 00000000..bb4710e2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_10.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_10.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_10.mp3.meta new file mode 100644 index 00000000..283864b8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_10.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 57966bf9d8bb18d4196fe6254c704b27 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_11.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_11.mp3 new file mode 100644 index 00000000..e8c09a08 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_11.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_11.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_11.mp3.meta new file mode 100644 index 00000000..5d546e92 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_11.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3c806c210299897498490c5c0ab74300 +timeCreated: 1513927555 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_12.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_12.mp3 new file mode 100644 index 00000000..482376a7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_12.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_12.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_12.mp3.meta new file mode 100644 index 00000000..e26fb841 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_12.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: fd7344712f09aec478ffebcfbf640645 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_13.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_13.mp3 new file mode 100644 index 00000000..59b5178f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_13.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_13.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_13.mp3.meta new file mode 100644 index 00000000..3a95e1bd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_13.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c4f5fbba50ee58f428727f4af57ff78e +timeCreated: 1513927553 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_14.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_14.mp3 new file mode 100644 index 00000000..f315c19f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_14.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_14.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_14.mp3.meta new file mode 100644 index 00000000..ba25cc9a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_14.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 04a5d53df7c7a884dbf5a1c376f5727b +timeCreated: 1513927546 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_15.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_15.mp3 new file mode 100644 index 00000000..acf3dece Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_15.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_15.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_15.mp3.meta new file mode 100644 index 00000000..36a2d0d4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_15.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 5fa3c9ee2da7ae443bd10974a0a48542 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_3.mp3 new file mode 100644 index 00000000..39010171 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_3.mp3.meta new file mode 100644 index 00000000..96fc128b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_3.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 3d525126f5b93694cb5426d8049b1dc4 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_4.mp3 new file mode 100644 index 00000000..7df04916 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_4.mp3.meta new file mode 100644 index 00000000..c458d06c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e213511686d9aca4191092ced8ee00f4 +timeCreated: 1513927549 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_5.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_5.mp3 new file mode 100644 index 00000000..e5f2bd0c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_5.mp3.meta new file mode 100644 index 00000000..b9dffc71 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_5.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 069231fc080953042953e0049b8b0ea2 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_6.mp3 new file mode 100644 index 00000000..95618d52 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_6.mp3.meta new file mode 100644 index 00000000..521e87e2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_6.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: b069fae5e0a175b4f94b0f3e79ef9b6f +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_7.mp3 new file mode 100644 index 00000000..4c591f0f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_7.mp3.meta new file mode 100644 index 00000000..c5b2c2a0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_7.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 544d06cc13e226a4392d11fc543b18ab +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_8.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_8.mp3 new file mode 100644 index 00000000..715c0a64 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_8.mp3.meta new file mode 100644 index 00000000..a1f87cfc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0ebaf728c9fcf1442960afe8fd866b71 +timeCreated: 1513927547 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_9.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_9.mp3 new file mode 100644 index 00000000..8e80bfa0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_9.mp3.meta new file mode 100644 index 00000000..a736188b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/3_9.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: ec49aa1d792acbc45bc9b7361130d3c5 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/4.mp3 new file mode 100644 index 00000000..cba8ec7e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/4.mp3.meta new file mode 100644 index 00000000..b577e671 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f24f6bbeb1c314d4bac0e597c965f955 +timeCreated: 1513927553 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/6.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/6.mp3 new file mode 100644 index 00000000..64350eca Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/6.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/6.mp3.meta new file mode 100644 index 00000000..d686fdb6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/6.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 07fec4a395d75c5419e19508688a01c0 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/7.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/7.mp3 new file mode 100644 index 00000000..e4611e3b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/7.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/7.mp3.meta new file mode 100644 index 00000000..ad73de3e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/7.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: c7ee819cde69861489eda2f4129cfca4 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/bujiao.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/bujiao.mp3 new file mode 100644 index 00000000..eb0ac1f9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/bujiao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/bujiao.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/bujiao.mp3.meta new file mode 100644 index 00000000..e7e2a365 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/bujiao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 92f0b4f28acfb2041af4809b652c343b +timeCreated: 1629539998 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/buqiang.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/buqiang.mp3 new file mode 100644 index 00000000..6089a064 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/buqiang.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/buqiang.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/buqiang.mp3.meta new file mode 100644 index 00000000..20656958 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/buqiang.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d026be9f4675c01449ab25802d80aecc +timeCreated: 1629539998 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/buyao0.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/buyao0.mp3 new file mode 100644 index 00000000..77b1ec5e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/buyao0.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/buyao0.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/buyao0.mp3.meta new file mode 100644 index 00000000..95257dce --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/buyao0.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7b58784624474e641b405f18cf70738d +timeCreated: 1629539998 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/buyao1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/buyao1.mp3 new file mode 100644 index 00000000..fbb5ed57 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/buyao1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/buyao1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/buyao1.mp3.meta new file mode 100644 index 00000000..a0b972c9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/buyao1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 65509f1b90968fe45bfc599c1259a408 +timeCreated: 1629548402 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/card_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/card_1.mp3 new file mode 100644 index 00000000..cad735ca Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/card_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/card_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/card_1.mp3.meta new file mode 100644 index 00000000..7ac7ea33 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/card_1.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 6e09a9135d8ff7543a76f6040ec9097b +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/card_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/card_2.mp3 new file mode 100644 index 00000000..551487dd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/card_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/card_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/card_2.mp3.meta new file mode 100644 index 00000000..063f3f51 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/card_2.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 66828fefe94ad9b4aabdd7699cf89595 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/dani_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/dani_1.mp3 new file mode 100644 index 00000000..e015c653 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/dani_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/dani_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/dani_1.mp3.meta new file mode 100644 index 00000000..c61c625d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/dani_1.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: be907cc6c26244f4187c0f3e519b1984 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/dani_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/dani_2.mp3 new file mode 100644 index 00000000..e485fb6d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/dani_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/dani_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/dani_2.mp3.meta new file mode 100644 index 00000000..50ea9f98 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/dani_2.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 3e7e731da72229240a4dbfdf8f1dfd94 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/dani_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/dani_3.mp3 new file mode 100644 index 00000000..aeb59c07 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/dani_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/dani_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/dani_3.mp3.meta new file mode 100644 index 00000000..f6f34eb3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/dani_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0f230cd07b4477d41a952fe46bf0fe4d +timeCreated: 1513927557 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/jiaodizhu.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/jiaodizhu.mp3 new file mode 100644 index 00000000..4ac12b95 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/jiaodizhu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/jiaodizhu.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/jiaodizhu.mp3.meta new file mode 100644 index 00000000..d9378969 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/jiaodizhu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9b25847fa2febe34488bb168f1dc930c +timeCreated: 1629539998 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_1.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_1.mp3 new file mode 100644 index 00000000..f30160e0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_1.mp3.meta new file mode 100644 index 00000000..6e5ec3c7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0013518e133bdce4fbfb20aa9b3b99ef +timeCreated: 1513927547 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_2.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_2.mp3 new file mode 100644 index 00000000..14e9b5f7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_2.mp3.meta new file mode 100644 index 00000000..468a710e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_2.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 3374da3c96026214ab3b9fae0e9cc274 +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_3.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_3.mp3 new file mode 100644 index 00000000..8b2ca6d1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_3.mp3.meta new file mode 100644 index 00000000..1aaa7f56 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_3.mp3.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 3adadbf20ffd05f46a7675d53003ea9d +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_4.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_4.mp3 new file mode 100644 index 00000000..a70d5c78 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_4.mp3.meta new file mode 100644 index 00000000..03e268c1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/pass_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a60b8c1743541dc4bb535c751f738749 +timeCreated: 1513927558 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/qiangdizhu.mp3 b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/qiangdizhu.mp3 new file mode 100644 index 00000000..a5bf3e40 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/qiangdizhu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/qiangdizhu.mp3.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/qiangdizhu.mp3.meta new file mode 100644 index 00000000..d967eb17 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/sound/woman/qiangdizhu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b9b9672abd483da4ca328c8807c6b5b5 +timeCreated: 1629539998 +licenseType: Free +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/ui.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/ui.meta new file mode 100644 index 00000000..e41f6d70 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e3cd8c402290e6546939c588614e5327 +folderAsset: yes +timeCreated: 1561176569 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/ui/Extend_Poker_TwoDouDiZhu_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/ui/Extend_Poker_TwoDouDiZhu_fui.bytes new file mode 100644 index 00000000..740089f9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/ui/Extend_Poker_TwoDouDiZhu_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/ui/Extend_Poker_TwoDouDiZhu_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/ui/Extend_Poker_TwoDouDiZhu_fui.bytes.meta new file mode 100644 index 00000000..66977de9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/ui/Extend_Poker_TwoDouDiZhu_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eb34bb7b7d833814cb91d20dab7dc4c5 +timeCreated: 1629289815 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/ui/Info_Poker_TwoDouDiZhu_fui.bytes b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/ui/Info_Poker_TwoDouDiZhu_fui.bytes new file mode 100644 index 00000000..ae10777a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/ui/Info_Poker_TwoDouDiZhu_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/ui/Info_Poker_TwoDouDiZhu_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/ui/Info_Poker_TwoDouDiZhu_fui.bytes.meta new file mode 100644 index 00000000..4a54e83d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/poker/twodoudizhu/ui/Info_Poker_TwoDouDiZhu_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b0c4956a729b78d478a7cb39cda8cd67 +timeCreated: 1629290204 +licenseType: Free +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai.meta b/wb_unity_pro/Assets/ART/extend/zipai.meta new file mode 100644 index 00000000..f372aa96 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 35ea372b94a4e444181df75281b38f04 +folderAsset: yes +timeCreated: 1540783563 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi.meta new file mode 100644 index 00000000..f44e5216 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2485b8b5af685504794a9710fd33acea +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound.meta new file mode 100644 index 00000000..59b488f2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b627df699dc4588488928e3603d2ca45 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/BGSOUND.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/BGSOUND.mp3 new file mode 100644 index 00000000..72fa969f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/BGSOUND.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/BGSOUND.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/BGSOUND.mp3.meta new file mode 100644 index 00000000..86f1e628 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/BGSOUND.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 394d46836deece14caaba305ff225515 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/9e7513b207cc5f1cd39954aed9bd4c15 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/bg.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/bg.mp3 new file mode 100644 index 00000000..a9a3d863 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/bg.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/bg.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/bg.mp3.meta new file mode 100644 index 00000000..4dbdbc2f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/bg.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ae99b9ee9ed935446b53b0e9f7fd52f0 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/7a50fad04fe557134fd75cfaeda53abc + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man.meta new file mode 100644 index 00000000..8618acf8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1d6a38931bd32c74ea6030143e7a6be0 +folderAsset: yes +timeCreated: 1638254348 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_101.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_101.mp3 new file mode 100644 index 00000000..2d721a95 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_101.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_101.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_101.mp3.meta new file mode 100644 index 00000000..b26edc46 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_101.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2bceb65fbbfb2df459df6e5660cf34c2 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/3fc9fb468049b3ae24bcc2b1a66e1d35 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_102.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_102.mp3 new file mode 100644 index 00000000..84c61d42 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_102.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_102.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_102.mp3.meta new file mode 100644 index 00000000..0b510489 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_102.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e3bf304f9eb23dc40afbbf06eafcbfdc +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/917405d612d4ca445ef1e83c8b458a79 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_103.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_103.mp3 new file mode 100644 index 00000000..fb0b8ebc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_103.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_103.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_103.mp3.meta new file mode 100644 index 00000000..42f70c56 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_103.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5a776e630dd8a0d44abdf9b24ceb0a1b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/d07d299e20e7a88633b2acb6aea6ae16 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_104.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_104.mp3 new file mode 100644 index 00000000..9d2f1f7c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_104.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_104.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_104.mp3.meta new file mode 100644 index 00000000..a557f06f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_104.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e1c38c2e1c4c5a44795b1a001c526d12 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/36b5ee07dfdf625822b1a7b6e3648096 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_105.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_105.mp3 new file mode 100644 index 00000000..0dab53c5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_105.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_105.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_105.mp3.meta new file mode 100644 index 00000000..f30d82f0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_105.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8eee78fd41a94334e8a719490e73d06b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/3e92422093198bb7a7e0af6a1479377b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_106.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_106.mp3 new file mode 100644 index 00000000..5b456ae4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_106.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_106.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_106.mp3.meta new file mode 100644 index 00000000..89230cb8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_106.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 10d32166c85606e4ca0e7571fd05130b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/2ab250d7a0e6affc03f44b04965e30d9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_107.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_107.mp3 new file mode 100644 index 00000000..fa93f397 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_107.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_107.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_107.mp3.meta new file mode 100644 index 00000000..6f991a07 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_107.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8b748ca14f517c1449dc686cb4d296cc +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/75b850f9a5b2eef17aab085f30029c33 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_108.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_108.mp3 new file mode 100644 index 00000000..62c8d87a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_108.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_108.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_108.mp3.meta new file mode 100644 index 00000000..ae60a9e1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_108.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4eb8a4793133f2c449456c0cf776ad0b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/c68b852332fe57f10b50c4ac448aaa6f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_109.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_109.mp3 new file mode 100644 index 00000000..0ef72105 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_109.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_109.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_109.mp3.meta new file mode 100644 index 00000000..ffb721eb --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_109.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a7582bd34cf22d34696c9f7375aac111 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/bd1a4a359c70ce1c35f7aaf1ef79a51f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_110.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_110.mp3 new file mode 100644 index 00000000..ec3a9d6e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_110.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_110.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_110.mp3.meta new file mode 100644 index 00000000..8007fd0e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_110.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 789ed27b359d81242bfbf538d7c4c268 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/ed38b2f52b54c61a4703f4d9632d30cc + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_201.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_201.mp3 new file mode 100644 index 00000000..b18d1bc8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_201.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_201.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_201.mp3.meta new file mode 100644 index 00000000..21ac1f18 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_201.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 24c02dc6d8a77e443b994a9a2e14062d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/7aa06a172bf593c0872d02974f6a0eed + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_202.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_202.mp3 new file mode 100644 index 00000000..bd3dd8fc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_202.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_202.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_202.mp3.meta new file mode 100644 index 00000000..1fb7e8cb --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_202.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0a3f2cce696abc34d9bae772386f6d64 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/cfc79b3986002d8a1f29209ed93c4906 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_203.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_203.mp3 new file mode 100644 index 00000000..23252075 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_203.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_203.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_203.mp3.meta new file mode 100644 index 00000000..90324fda --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_203.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4d006aa62594b56458dd19b56b8fa172 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/0861d6e3c1eb3e1d78a80180e84bc595 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_204.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_204.mp3 new file mode 100644 index 00000000..40529b05 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_204.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_204.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_204.mp3.meta new file mode 100644 index 00000000..c6f4a768 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_204.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 519383f400fd1234693456f6e0143ed7 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/ad7a199a617a7aec4a36302f3f818a79 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_205.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_205.mp3 new file mode 100644 index 00000000..5736d3ea Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_205.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_205.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_205.mp3.meta new file mode 100644 index 00000000..494441d4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_205.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5fd8cc745627c1e4e9c3954abc2adb52 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/076811384198120e9b4006612da2e1d3 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_206.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_206.mp3 new file mode 100644 index 00000000..6c0f75d0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_206.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_206.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_206.mp3.meta new file mode 100644 index 00000000..f5afa6e0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_206.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0b9ce45184b41584da5ca2be238dd160 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/4078b40b8c2337a24900e9cef5d2b519 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_207.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_207.mp3 new file mode 100644 index 00000000..681ff761 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_207.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_207.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_207.mp3.meta new file mode 100644 index 00000000..a3867355 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_207.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fd6098f01c43e7d4b9fd31070cedcd06 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/7cb15b593a0d58daa2ef3344ab4f7a17 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_208.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_208.mp3 new file mode 100644 index 00000000..dadba2eb Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_208.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_208.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_208.mp3.meta new file mode 100644 index 00000000..94ba1440 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_208.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6270ecb258666384b92d1eb80f718ccf +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/b510647cd4f87fa624f33a854bddfe67 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_209.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_209.mp3 new file mode 100644 index 00000000..535b55f5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_209.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_209.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_209.mp3.meta new file mode 100644 index 00000000..84fa53df --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_209.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5ef3d6da45aa207488c789d80c21210f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/bd9e71849f6131510d6571f1b751a028 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_210.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_210.mp3 new file mode 100644 index 00000000..193c3f96 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_210.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_210.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_210.mp3.meta new file mode 100644 index 00000000..6ce28d15 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_210.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 49873e04993508547b4a9238c5945dbd +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/f2cd95319a5f9563be3ac7d24b6de27d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Chi.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Chi.mp3 new file mode 100644 index 00000000..ae1c8ad0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Chi.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Chi.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Chi.mp3.meta new file mode 100644 index 00000000..179198f5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Chi.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b952b60e58b330c459ef3eb8a17ac2c4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/565d85b197cc1b0ca661b646c2bdc5de + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_ChongDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_ChongDuo.mp3 new file mode 100644 index 00000000..e6e9e810 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_ChongDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_ChongDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_ChongDuo.mp3.meta new file mode 100644 index 00000000..816d4d24 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_ChongDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e8b82b3d43138094d9c0d59eda2b86b5 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/6a69b44ae5351c981d843bb69c711714 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_DianPao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_DianPao.mp3 new file mode 100644 index 00000000..a4bc21d3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_DianPao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_DianPao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_DianPao.mp3.meta new file mode 100644 index 00000000..98d9cc05 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_DianPao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8b9014b8c55d95b4e8a4ebff05d6b1d7 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/080ff81c4864fe78bee6b5eb2d95f311 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_GuoSao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_GuoSao.mp3 new file mode 100644 index 00000000..5fdd9dbc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_GuoSao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_GuoSao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_GuoSao.mp3.meta new file mode 100644 index 00000000..68100b1d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_GuoSao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: de4ccd0926b88214894918abde004202 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/35e3cf21faee8e20246b0a002591f77f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Hu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Hu.mp3 new file mode 100644 index 00000000..6a0f1386 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Hu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Hu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Hu.mp3.meta new file mode 100644 index 00000000..de7ed53e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Hu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6ec89af0eced7fe47af7d6d31c91b636 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/55c4d9ed57efb02d86fcfcf083431198 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_KaiDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_KaiDuo.mp3 new file mode 100644 index 00000000..e97abd27 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_KaiDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_KaiDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_KaiDuo.mp3.meta new file mode 100644 index 00000000..ccabed87 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_KaiDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3382fa33a2caeec42ab2d2a18fbe783f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/52b2c9bc8277db2b3ac72de33cdc362d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Peng.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Peng.mp3 new file mode 100644 index 00000000..7c6c7e77 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Peng.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Peng.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Peng.mp3.meta new file mode 100644 index 00000000..daf76afe --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Peng.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 25ee03bb319346a4b90334b914611844 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/34d0a5e33ab495c5f9e3691b65adfd28 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Sao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Sao.mp3 new file mode 100644 index 00000000..5ae3de41 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Sao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Sao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Sao.mp3.meta new file mode 100644 index 00000000..97a8cb27 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Sao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 29116d841b19d6f4d8020bb13091141d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/7fda8480a03a09d56e79fc7aa746fa11 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_SaoChuan.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_SaoChuan.mp3 new file mode 100644 index 00000000..8c114353 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_SaoChuan.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_SaoChuan.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_SaoChuan.mp3.meta new file mode 100644 index 00000000..c6beb14b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_SaoChuan.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 85c6397fd9f73f9458f81e3817203c3e +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/7f6ccd023371220aa1375aacd278de38 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_TianHu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_TianHu.mp3 new file mode 100644 index 00000000..2f647d3e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_TianHu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_TianHu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_TianHu.mp3.meta new file mode 100644 index 00000000..7a203917 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_TianHu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0d78e1ed933ef8545ac4954b6674dce6 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/5c17f00a5ae1e1a0ddf4e3539aab66cd + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Wai.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Wai.mp3 new file mode 100644 index 00000000..6e006ffe Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Wai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Wai.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Wai.mp3.meta new file mode 100644 index 00000000..43123755 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_Wai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 18ec2f7351c47b4489c3e50946caa783 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/893dfc4dfd535b51b88fc380ddd34e06 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_ZiMo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_ZiMo.mp3 new file mode 100644 index 00000000..3d108af0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_ZiMo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_ZiMo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_ZiMo.mp3.meta new file mode 100644 index 00000000..ff2fb7ae --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/F_ZiMo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3945a8d40b3154049b4953954225c87b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/b739ec6abd1d3dba5cb55ec94a5debc6 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_1.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_1.mp3 new file mode 100644 index 00000000..08a56038 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_1.mp3.meta new file mode 100644 index 00000000..157df95f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4982c18c8b9d4ba46b8c575c7a14f7c2 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/214ebfc8197d34e8dd36f5cd6448a702 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_2.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_2.mp3 new file mode 100644 index 00000000..672196b7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_2.mp3.meta new file mode 100644 index 00000000..221742e3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 938fb83e550be194a8fc84007848ba12 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/949be62ceab01c533b48f243329a37db + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_3.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_3.mp3 new file mode 100644 index 00000000..cf5d8d1d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_3.mp3.meta new file mode 100644 index 00000000..1fdb6ae1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b8cb1b1165d468e4a9c6ee686750de9d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/498642cfec18ec070ea74e8ba5de4e6d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_4.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_4.mp3 new file mode 100644 index 00000000..5415995b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_4.mp3.meta new file mode 100644 index 00000000..6589861b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 63c35b046b824f64daef6fdd9d526823 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/52f536a4231731085dd46d7d90b81062 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_5.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_5.mp3 new file mode 100644 index 00000000..00b69519 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_5.mp3.meta new file mode 100644 index 00000000..fba29f76 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 96fe0197611d4d947b4682927c5048ac +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/fa46833a7503630b9b454ced572e3b21 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_6.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_6.mp3 new file mode 100644 index 00000000..5f9cabc9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_6.mp3.meta new file mode 100644 index 00000000..284924e5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 94af151e45993b84db664ef76763e505 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/dc546b868982bb3ea2157913347c8f22 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_7.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_7.mp3 new file mode 100644 index 00000000..e54c8f71 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_7.mp3.meta new file mode 100644 index 00000000..6388678a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e089154fe7c13dc4c8cd8db26c855e18 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/6c52d40cd37dfec873bedf20eced4324 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_8.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_8.mp3 new file mode 100644 index 00000000..450437f2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_8.mp3.meta new file mode 100644 index 00000000..e53dea9d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b9d03cd357230b541b11d9bfefa74c79 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/2238b95d73e4ea1e47b9675ac4b5e6a1 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_9.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_9.mp3 new file mode 100644 index 00000000..f9cb387b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_9.mp3.meta new file mode 100644 index 00000000..0d004e39 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/man/chat_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f8d561d255099c341ba5f6fded774f98 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/259c9275bdd3cdca4ef431fa4816ad4c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman.meta new file mode 100644 index 00000000..b0d15779 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 02e4b143d8cae1d4f87b275589a17c1f +folderAsset: yes +timeCreated: 1514857692 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_101.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_101.mp3 new file mode 100644 index 00000000..0e5ca8ce Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_101.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_101.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_101.mp3.meta new file mode 100644 index 00000000..62dc54e4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_101.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a2fe7b881253aaf448bcf2ca2f359ec0 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/709d2ec1244fd36d3d7b1116247cef01 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_102.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_102.mp3 new file mode 100644 index 00000000..82100a53 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_102.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_102.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_102.mp3.meta new file mode 100644 index 00000000..e9c7df49 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_102.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2234ed6b1bae52d498d398a08e9456cd +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/b10038f40ae37fe41d62ec4d6d8572f0 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_103.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_103.mp3 new file mode 100644 index 00000000..0a9bc3d9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_103.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_103.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_103.mp3.meta new file mode 100644 index 00000000..174ab7cb --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_103.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fc2dd28765f5fa946a3825a5a79256a4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/780d57987bb6d325c8bf3f9cbabc5f4c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_104.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_104.mp3 new file mode 100644 index 00000000..1e2fcca2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_104.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_104.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_104.mp3.meta new file mode 100644 index 00000000..a965c7cc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_104.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3fa9ff0d04f19814c828b214b21ce1f8 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/1c603ef465c99ecdd430d6a8f7b8a897 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_105.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_105.mp3 new file mode 100644 index 00000000..3273ed62 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_105.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_105.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_105.mp3.meta new file mode 100644 index 00000000..11f73f5e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_105.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f7e6b876d164e214ebe904b147280d98 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/e3e325ce4e8515f6e8941a2cf494aa71 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_106.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_106.mp3 new file mode 100644 index 00000000..f85916f2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_106.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_106.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_106.mp3.meta new file mode 100644 index 00000000..27c51cdd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_106.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a603c93e738112c4da9f7eae10ccdaee +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/1ec923f337baa0db87f9006e4b70dfe1 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_107.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_107.mp3 new file mode 100644 index 00000000..b281ae26 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_107.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_107.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_107.mp3.meta new file mode 100644 index 00000000..51d7440e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_107.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5137914e436c7a24baa07776218d1f6d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/cf40496835dd81ceb1708fd4f128b540 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_108.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_108.mp3 new file mode 100644 index 00000000..5a299c31 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_108.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_108.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_108.mp3.meta new file mode 100644 index 00000000..5d3d0b35 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_108.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 990a4b0143690184e96186c454fa2988 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/5129e034488768b914017e943b1a932f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_109.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_109.mp3 new file mode 100644 index 00000000..8163fd83 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_109.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_109.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_109.mp3.meta new file mode 100644 index 00000000..e2c9eb2a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_109.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7bec641ef2dc4794f81741edac25edfb +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/4d8a94e0f9f14b44762bce88b22f923c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_110.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_110.mp3 new file mode 100644 index 00000000..7a68881b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_110.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_110.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_110.mp3.meta new file mode 100644 index 00000000..168ea1f2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_110.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 10fecb1a31b9c604a84bc429aa68216f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/0252a7499b1cf645f41f8371c8cd82c1 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_201.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_201.mp3 new file mode 100644 index 00000000..f87b59f4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_201.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_201.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_201.mp3.meta new file mode 100644 index 00000000..17f6201a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_201.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7d7f3250093f06f4eb1b121af6fd776b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/5fb375e1518400cba2768ad595352cea + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_202.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_202.mp3 new file mode 100644 index 00000000..e95870ec Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_202.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_202.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_202.mp3.meta new file mode 100644 index 00000000..6813b0ad --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_202.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9f1f6743ea885fd4ba26a2a2a4a1176b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/fa21a160d1fd95d13143cd77b95bd373 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_203.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_203.mp3 new file mode 100644 index 00000000..c74f48b6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_203.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_203.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_203.mp3.meta new file mode 100644 index 00000000..1d3b012f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_203.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e56b5017f1dbdea4287126b6bbf04fe9 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/fa7ac5f97efbb04c705d26925ea37124 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_204.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_204.mp3 new file mode 100644 index 00000000..32976e30 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_204.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_204.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_204.mp3.meta new file mode 100644 index 00000000..f8936e4b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_204.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f8bdd0167f23f6c4e8d481b1f1ec1fb7 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/6373efb795d3fa7f00c121e0b788e2af + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_205.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_205.mp3 new file mode 100644 index 00000000..85e7da1b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_205.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_205.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_205.mp3.meta new file mode 100644 index 00000000..aba28258 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_205.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f358530acd1af20488941d553e2ff08a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/dfafc141bb87179c7455dee2940cda35 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_206.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_206.mp3 new file mode 100644 index 00000000..90a218ee Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_206.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_206.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_206.mp3.meta new file mode 100644 index 00000000..33019caa --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_206.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 266709a776fa0e441b136dd9025fccd0 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/344d7f425159e806865a3b5dc813f03a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_207.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_207.mp3 new file mode 100644 index 00000000..b38439c1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_207.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_207.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_207.mp3.meta new file mode 100644 index 00000000..0ce44115 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_207.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 61a218b50e8ffd946833206126ea59de +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/a5d3b7fc5744a115ee6b736d491e1062 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_208.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_208.mp3 new file mode 100644 index 00000000..422b95df Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_208.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_208.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_208.mp3.meta new file mode 100644 index 00000000..387d5789 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_208.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3e11ba9d20bd9444fab78ae038e2ec12 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/f58ba339e47ce355b713c9e1713217e1 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_209.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_209.mp3 new file mode 100644 index 00000000..faf0b858 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_209.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_209.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_209.mp3.meta new file mode 100644 index 00000000..21bff6a0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_209.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 259466e71a80fa248ac6473dd8728dab +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/7fb0e88005fe2164f09c53784d55987f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_210.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_210.mp3 new file mode 100644 index 00000000..ebec4b91 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_210.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_210.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_210.mp3.meta new file mode 100644 index 00000000..19020211 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_210.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 754d049b7fbad5642b1407d0c5166ef1 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/439f5fafddb9d34b8af43cb0455bb340 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Chi.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Chi.mp3 new file mode 100644 index 00000000..1546bd66 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Chi.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Chi.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Chi.mp3.meta new file mode 100644 index 00000000..03103911 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Chi.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7d5f490818729da48a9caa4fecd7b387 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/bfb2c62ffa3a1a0ffa4b789066b83260 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_ChongDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_ChongDuo.mp3 new file mode 100644 index 00000000..b50961fa Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_ChongDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_ChongDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_ChongDuo.mp3.meta new file mode 100644 index 00000000..171ffe82 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_ChongDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3556843d71cbda64a877e7e91e78fff4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/020428bbcc2f19a3a8b9793f9fce12cf + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_DianPao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_DianPao.mp3 new file mode 100644 index 00000000..f1e367f8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_DianPao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_DianPao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_DianPao.mp3.meta new file mode 100644 index 00000000..39067192 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_DianPao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4c98d790eec787048a6d2ece0b96409b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/fc11a3efac3c6f168e1a53810f3363d7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_GuoSao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_GuoSao.mp3 new file mode 100644 index 00000000..e910ff9b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_GuoSao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_GuoSao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_GuoSao.mp3.meta new file mode 100644 index 00000000..ae8bddd6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_GuoSao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6e8e82a30133cc7419868463fb7bbc37 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/2cc2cb510f085161c1f484f1fdb6ee2c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Hu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Hu.mp3 new file mode 100644 index 00000000..888b6d75 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Hu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Hu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Hu.mp3.meta new file mode 100644 index 00000000..388d182e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Hu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9669920bcd0e8844fbbc7e5e5fa1af7d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/d904a9ddcf969d84837c733d6d201a67 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_KaiDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_KaiDuo.mp3 new file mode 100644 index 00000000..8acf933e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_KaiDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_KaiDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_KaiDuo.mp3.meta new file mode 100644 index 00000000..e80c6cc6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_KaiDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 71dd18d039500ae4ab28d91a105faa48 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/ea7edd9bbf6091b674deaea4459e4d97 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Peng.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Peng.mp3 new file mode 100644 index 00000000..b283a601 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Peng.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Peng.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Peng.mp3.meta new file mode 100644 index 00000000..c0a43c1d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Peng.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b2966121082a07e46bf8a85ec6aad572 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/a57ca7a7edb3865bebefe6a06b62528e + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Sao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Sao.mp3 new file mode 100644 index 00000000..50020653 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Sao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Sao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Sao.mp3.meta new file mode 100644 index 00000000..63502648 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Sao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: eca8f7869f0a31449898c0269d0ca9be +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/b257e9c71d4edd080fcfabe7ba66cc1f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_SaoChuan.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_SaoChuan.mp3 new file mode 100644 index 00000000..823a80a0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_SaoChuan.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_SaoChuan.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_SaoChuan.mp3.meta new file mode 100644 index 00000000..3d2ff8ec --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_SaoChuan.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e0fdd2e36ba39974c886b69ce2300d21 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/bcae298bb1ce953b5221db7bbbad5a74 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_TianHu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_TianHu.mp3 new file mode 100644 index 00000000..4cc0936b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_TianHu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_TianHu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_TianHu.mp3.meta new file mode 100644 index 00000000..968f85b7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_TianHu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 203421d240c3912429a74a6e93820eb4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/b0bc9b08582f2013d287fd774e779c0d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Wai.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Wai.mp3 new file mode 100644 index 00000000..6e006ffe Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Wai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Wai.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Wai.mp3.meta new file mode 100644 index 00000000..ba3612d7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_Wai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b38da536028ea3b4c81de69f8f820afd +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/570c4b3c5860af9a7a6ad48255fa62e7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_ZiMo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_ZiMo.mp3 new file mode 100644 index 00000000..1bf3c478 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_ZiMo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_ZiMo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_ZiMo.mp3.meta new file mode 100644 index 00000000..8e9dfac4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/F_ZiMo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ff84c7ee3e4bc32429e9b0a8145ffd0b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/b5457172b137505ed7ed4689665dd1ba + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_1.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_1.mp3 new file mode 100644 index 00000000..40142fee Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_1.mp3.meta new file mode 100644 index 00000000..be48962b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 71be4818a361fca4eb92933dc087a1ac +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/be5779c7315e8d2c95ffdf935458b558 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_2.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_2.mp3 new file mode 100644 index 00000000..ab428517 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_2.mp3.meta new file mode 100644 index 00000000..c2755b9f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f6e8d640b345da04a9d2265641fa9be0 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/d163844327de48aa643ad63e6041c146 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_3.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_3.mp3 new file mode 100644 index 00000000..06b1ba11 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_3.mp3.meta new file mode 100644 index 00000000..908cb50e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7186f62b297712640896fff91e08a807 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/412a48888a2f7357f48a9021bf66d7be + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_4.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_4.mp3 new file mode 100644 index 00000000..5c55d575 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_4.mp3.meta new file mode 100644 index 00000000..f7580eb8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fca88c59696373b4c900ef1ad3ccffb7 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/885aed8d6f2a5c4a6cafad143984f0b1 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_5.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_5.mp3 new file mode 100644 index 00000000..1dc0d3ec Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_5.mp3.meta new file mode 100644 index 00000000..7773777b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ddf1a330208f99149aae03c7da6749e9 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/52c70e9ea959fe631b5ed3b3c0691329 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_6.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_6.mp3 new file mode 100644 index 00000000..1fa5851b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_6.mp3.meta new file mode 100644 index 00000000..1be23ca6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3a485d519dd6c23479c7f20fd5cb4661 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/b832eebbfa2c36634e45298ee380cd57 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_7.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_7.mp3 new file mode 100644 index 00000000..038e62cc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_7.mp3.meta new file mode 100644 index 00000000..48e4986a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f9a6a37e481984449aba9ae2119aa26a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/453bf1df33f169a3a226f50d4f7be413 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_8.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_8.mp3 new file mode 100644 index 00000000..a9076f13 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_8.mp3.meta new file mode 100644 index 00000000..6efce2cd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ce421183d12269b41b2107fc43b57523 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/0fe3e283e4dd56c082f848249750f5e9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_9.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_9.mp3 new file mode 100644 index 00000000..1867a5a8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_9.mp3.meta new file mode 100644 index 00000000..358d6743 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/sound/woman/chat_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d46cc7ceac4cf2c41beef70db41df270 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/changdepaohuzi/b6a9f26e98fce8d47070606ff52836a6 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/ui.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/ui.meta new file mode 100644 index 00000000..f8b3065d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/ui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 70d729058822f0142afb3bea82833d8f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/ui/Extend_Poker_ChangdeWHZ_fui.bytes b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/ui/Extend_Poker_ChangdeWHZ_fui.bytes new file mode 100644 index 00000000..9c680da4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/ui/Extend_Poker_ChangdeWHZ_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/ui/Extend_Poker_ChangdeWHZ_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/ui/Extend_Poker_ChangdeWHZ_fui.bytes.meta new file mode 100644 index 00000000..ad772889 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/ui/Extend_Poker_ChangdeWHZ_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 36b29970a084b6c40b26bec4966f3d33 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/zipai/changdepaohuzi/e03ff1f4dc77821fe95910001a7e606e + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/ui/Info_Poker_ChangdeWHZ_fui.bytes b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/ui/Info_Poker_ChangdeWHZ_fui.bytes new file mode 100644 index 00000000..f82818a0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/ui/Info_Poker_ChangdeWHZ_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/ui/Info_Poker_ChangdeWHZ_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/ui/Info_Poker_ChangdeWHZ_fui.bytes.meta new file mode 100644 index 00000000..13f0108b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/changdepaohuzi/ui/Info_Poker_ChangdeWHZ_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 24e9925e89dd08443b8c7401529dcee9 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/zipai/changdepaohuzi/56f4bebb2ecdbcc31f3e6a93e9bf884b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou.meta new file mode 100644 index 00000000..b0aa8934 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 95b46eb23cc6fcb48b3ba3e943f3f862 +folderAsset: yes +timeCreated: 1587569081 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound.meta new file mode 100644 index 00000000..4e10b87c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bb25f39f3fc7a6245a253417468e5c0b +folderAsset: yes +timeCreated: 1587569596 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/BGSOUND.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/BGSOUND.mp3 new file mode 100644 index 00000000..72fa969f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/BGSOUND.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/BGSOUND.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/BGSOUND.mp3.meta new file mode 100644 index 00000000..37d41ab4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/BGSOUND.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b849ddd5f58dc8644bc34ad09b68e9fb +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/32395352a3953e9099c04cab4ef8b08d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/bg.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/bg.mp3 new file mode 100644 index 00000000..0f69ecc6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/bg.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/bg.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/bg.mp3.meta new file mode 100644 index 00000000..de329b38 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/bg.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e0a97c92ce328dc4daecfd8916b99eea +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/79fc7de88f8f0c63e9b1a06b10f0d1e8 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/bgMain.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/bgMain.mp3 new file mode 100644 index 00000000..e94b5083 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/bgMain.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/bgMain.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/bgMain.mp3.meta new file mode 100644 index 00000000..2f760570 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/bgMain.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 547a9b8af80874545a2296af70696eaf +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/bf72b517acb801a9dfbcca07f860170c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man.meta new file mode 100644 index 00000000..a269bf8f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 585bf8d12a8d7a54f83e18c33e99cd9b +folderAsset: yes +timeCreated: 1514857686 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_101.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_101.mp3 new file mode 100644 index 00000000..56b859c7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_101.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_101.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_101.mp3.meta new file mode 100644 index 00000000..4e4008b5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_101.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8cfda90544c9a63428f52400efab2075 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/858384be4120d40758a4f4a9668b2d54 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_102.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_102.mp3 new file mode 100644 index 00000000..9b79b9aa Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_102.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_102.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_102.mp3.meta new file mode 100644 index 00000000..8e35c08e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_102.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5b564a7783f763e42917f6228e2de5d8 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/4d7011d3a78e6b45cfe5a71aa6c316d9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_103.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_103.mp3 new file mode 100644 index 00000000..fb939df7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_103.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_103.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_103.mp3.meta new file mode 100644 index 00000000..581c0b76 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_103.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1635b1e450ef2d543adb804ab6c632fd +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/d63f595f7452d19d9ca19a53683f3e19 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_201.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_201.mp3 new file mode 100644 index 00000000..fea6f1d2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_201.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_201.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_201.mp3.meta new file mode 100644 index 00000000..d053735d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_201.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a1644bafeedee3640b15279170fe7206 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/67ccc3bc76c8214a1ae0d709a999e1bd + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_202.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_202.mp3 new file mode 100644 index 00000000..52c721ab Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_202.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_202.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_202.mp3.meta new file mode 100644 index 00000000..af23ae56 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_202.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7235911791836624a92cf888c3a05901 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/57b4225824d54a6987a89d23d9c083f0 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_203.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_203.mp3 new file mode 100644 index 00000000..4d754d6a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_203.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_203.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_203.mp3.meta new file mode 100644 index 00000000..d5be1b5a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_203.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3ce25bffb48282943bcdaf5eedbaf3d3 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/e9670fb8df3413d5bd86e690467fc704 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_301.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_301.mp3 new file mode 100644 index 00000000..cb15ca66 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_301.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_301.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_301.mp3.meta new file mode 100644 index 00000000..01420657 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_301.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3b2ee715f38c60b479fd68a8d2c8e775 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/bcceddd825d745a9d19e83a48fbc223c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_302.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_302.mp3 new file mode 100644 index 00000000..e0375a1e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_302.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_302.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_302.mp3.meta new file mode 100644 index 00000000..1b44683c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_302.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 270477544ac4d0d4ba7ece1ab13a8572 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/2ee24b3fa3776f20502fef1b6070c46c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_303.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_303.mp3 new file mode 100644 index 00000000..ee6b8629 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_303.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_303.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_303.mp3.meta new file mode 100644 index 00000000..d8a14a1b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_303.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2556bb8f55da56f48979dae387773c86 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/cdbb18ad43c71e5f12e03f61e4de2e32 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_401.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_401.mp3 new file mode 100644 index 00000000..03c92c6a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_401.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_401.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_401.mp3.meta new file mode 100644 index 00000000..24547b41 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_401.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 095ce53911fa0b641ab6d3c30799ed81 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/fb877db57fb22834d663438db9b664b6 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_402.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_402.mp3 new file mode 100644 index 00000000..d206073b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_402.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_402.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_402.mp3.meta new file mode 100644 index 00000000..28490d83 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_402.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: aefe397800f3200478922996ed1bb41f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/37881b110c7ea104e66eef4af826764f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_403.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_403.mp3 new file mode 100644 index 00000000..177ad2ec Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_403.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_403.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_403.mp3.meta new file mode 100644 index 00000000..273256b6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_403.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 979012c4f2264fd42a867b19c398da2e +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/211212d5085387d8666deeed032b7800 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_501.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_501.mp3 new file mode 100644 index 00000000..81e1dfb3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_501.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_501.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_501.mp3.meta new file mode 100644 index 00000000..979d4f4f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_501.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e1fd8240f028ddb4292bd2a9574a8524 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/843f8c0f97354378acbdf028b67ab537 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_502.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_502.mp3 new file mode 100644 index 00000000..77b3fd55 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_502.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_502.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_502.mp3.meta new file mode 100644 index 00000000..34c68121 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_502.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f07611e96cd989d4f9a7269aa2b3ffdc +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/537207a98b14d0ab10e9f8314b5ae711 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_503.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_503.mp3 new file mode 100644 index 00000000..cbde5a42 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_503.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_503.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_503.mp3.meta new file mode 100644 index 00000000..9636816b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_503.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: cf1414a64df74634bae953b1cc8a4050 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/885b3197c4d1ca01b7f6146602c6e23c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_601.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_601.mp3 new file mode 100644 index 00000000..1475cf18 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_601.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_601.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_601.mp3.meta new file mode 100644 index 00000000..0ad42dfa --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_601.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7f2b9d613e64aab4aa6bccd227ca60e4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/c81ec01e44fb6336480445f837852e5d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_602.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_602.mp3 new file mode 100644 index 00000000..4e325ceb Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_602.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_602.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_602.mp3.meta new file mode 100644 index 00000000..fd6ca246 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_602.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d8a0a130b9053e54aa4d174218198874 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/153915c6be0e579474e0c7192f18caed + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_603.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_603.mp3 new file mode 100644 index 00000000..5986ffb5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_603.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_603.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_603.mp3.meta new file mode 100644 index 00000000..fc15cde1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_603.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: edf75e619710e0846a18b762a87499ea +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/9159b2de2282b484abc53afc125913bf + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_701.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_701.mp3 new file mode 100644 index 00000000..a7a0794a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_701.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_701.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_701.mp3.meta new file mode 100644 index 00000000..7db79f9d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_701.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: eb6a230040067e64bada14778f6084ec +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/51effad1f1d2e69d447f754daa71312a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_702.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_702.mp3 new file mode 100644 index 00000000..abb66854 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_702.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_702.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_702.mp3.meta new file mode 100644 index 00000000..56b41729 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_702.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a0b75f3a0e8fb0a49a82a07cfd1e4b78 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/a2e196f2edfe44e0f3a2e43aa6d6d329 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_703.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_703.mp3 new file mode 100644 index 00000000..1ab16bec Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_703.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_703.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_703.mp3.meta new file mode 100644 index 00000000..605524ab --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_703.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fcef835d83014c148b128907e50853e3 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/adcebde4998e307fc75ef67221baae80 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_801.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_801.mp3 new file mode 100644 index 00000000..794429a8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_801.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_801.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_801.mp3.meta new file mode 100644 index 00000000..d7b3e82e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_801.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 32046116058c8ab47aa3659b9b1de802 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/1c8d67f21dfabaf60957fb8f116e150e + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_802.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_802.mp3 new file mode 100644 index 00000000..8afa7dd8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_802.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_802.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_802.mp3.meta new file mode 100644 index 00000000..483914d3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_802.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f9a986b7ded2dc24e8b0a8f7577db7b6 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/7b5ee200f1c450a6b18ab99a5bb88a45 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_803.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_803.mp3 new file mode 100644 index 00000000..a4774636 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_803.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_803.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_803.mp3.meta new file mode 100644 index 00000000..6b2d77e5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_803.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 062175e30d7c2e64a8b3a78513c5be8e +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/f45cbf542ade579721ea50f00cc42120 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Chi.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Chi.mp3 new file mode 100644 index 00000000..191935f4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Chi.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Chi.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Chi.mp3.meta new file mode 100644 index 00000000..4186a23e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Chi.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c6357894924d55d4d9a5d9a88140c50c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/c85629a49f14622d2b6588487a31b546 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_ChongDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_ChongDuo.mp3 new file mode 100644 index 00000000..e6e9e810 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_ChongDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_ChongDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_ChongDuo.mp3.meta new file mode 100644 index 00000000..2e8fcdaf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_ChongDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2d9e5d6d980d1de45873ce37d232899c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/3ed726661cdb387d0461605e80d2a102 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_DianPao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_DianPao.mp3 new file mode 100644 index 00000000..a4bc21d3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_DianPao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_DianPao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_DianPao.mp3.meta new file mode 100644 index 00000000..2473f192 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_DianPao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f0ce07fce0b3b934a9943990ae4299cc +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/dbb0c240588d5de636d92f6b144f8e5d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Gang.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Gang.mp3 new file mode 100644 index 00000000..27a1381c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Gang.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Gang.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Gang.mp3.meta new file mode 100644 index 00000000..6e007bda --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Gang.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4d2913688be9b634f9cca1b1dbbf4808 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/dea9edd01d3831f69f952ac67944d0f7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_GuoSao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_GuoSao.mp3 new file mode 100644 index 00000000..5fdd9dbc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_GuoSao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_GuoSao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_GuoSao.mp3.meta new file mode 100644 index 00000000..99874be0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_GuoSao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f96e33d7be77b72429ebea14823ee5d1 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/65696f2d770b942723f04de26772a8c7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Hu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Hu.mp3 new file mode 100644 index 00000000..2bf73c4a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Hu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Hu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Hu.mp3.meta new file mode 100644 index 00000000..128affb4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Hu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0a1d7c8095edac343bfac5bf2dc4524d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/7a8671f9071c1f4eb67baf7cfff8bcae + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_KaiDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_KaiDuo.mp3 new file mode 100644 index 00000000..43ea5633 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_KaiDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_KaiDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_KaiDuo.mp3.meta new file mode 100644 index 00000000..a03ff7b7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_KaiDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 20484a4a073d3ab438d2dcbb643111dd +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/c58bd3889850000ee0d0da1ae60905bd + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Peng.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Peng.mp3 new file mode 100644 index 00000000..63146532 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Peng.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Peng.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Peng.mp3.meta new file mode 100644 index 00000000..2412ea99 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Peng.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3fb6c837838f2fc4ea7bc0181ea1c7a8 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/58cf9e8746c16874e6cd51741f244310 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Sao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Sao.mp3 new file mode 100644 index 00000000..5ae3de41 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Sao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Sao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Sao.mp3.meta new file mode 100644 index 00000000..78972b44 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Sao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 39753464beb4e3e48a336e8c1d65caf4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/3c62d39788f97462342849bd8e77ad6f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_SaoChuan.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_SaoChuan.mp3 new file mode 100644 index 00000000..57719320 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_SaoChuan.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_SaoChuan.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_SaoChuan.mp3.meta new file mode 100644 index 00000000..2f565852 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_SaoChuan.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a11aa04e78f9379459ea839f8b296af7 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/23e7f89e2edb9ef5ded42df2b7278d35 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_TianHu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_TianHu.mp3 new file mode 100644 index 00000000..2f647d3e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_TianHu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_TianHu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_TianHu.mp3.meta new file mode 100644 index 00000000..2abfe961 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_TianHu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e24b04e8c0896a44d8632633d36d5884 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/83af659c409497ffbbae4a88bacd9ebf + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Wai.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Wai.mp3 new file mode 100644 index 00000000..7e020d6d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Wai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Wai.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Wai.mp3.meta new file mode 100644 index 00000000..d403c05a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Wai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3ab4a5a0867eac548b93d1bbe8ac78b4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/dda7ccf9bba04050b3466c01700e5634 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Zhao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Zhao.mp3 new file mode 100644 index 00000000..599e7799 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Zhao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Zhao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Zhao.mp3.meta new file mode 100644 index 00000000..1d53c908 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_Zhao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 447e90513e04c3246bd276f9895f6f81 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/5f8ed9fb8f807b9a0fde230769051e27 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_ZiMo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_ZiMo.mp3 new file mode 100644 index 00000000..3d108af0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_ZiMo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_ZiMo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_ZiMo.mp3.meta new file mode 100644 index 00000000..4721763c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/F_ZiMo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ff3835e3ceef3f942a51a0c6b8195e92 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/e1648eee4b573f2689e4c28265a2bee7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_1.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_1.mp3 new file mode 100644 index 00000000..08a56038 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_1.mp3.meta new file mode 100644 index 00000000..ffee77db --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 83f18d74df5e5d14487c283c51ad93d0 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/315580c46058a3f9149bd93ccc282856 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_2.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_2.mp3 new file mode 100644 index 00000000..672196b7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_2.mp3.meta new file mode 100644 index 00000000..27a6924c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 178dd82abc5336342bc42659eab6a2c0 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/46d0b24cd4d53cc4490cea9b6376d9ec + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_3.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_3.mp3 new file mode 100644 index 00000000..cf5d8d1d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_3.mp3.meta new file mode 100644 index 00000000..824a941c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 48e6df0fcb1de87438ca573a6f1c72e4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/ddf78ef1970e570928a7f3376fffd73d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_4.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_4.mp3 new file mode 100644 index 00000000..5415995b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_4.mp3.meta new file mode 100644 index 00000000..a8b1f1cb --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c17c7f7e289877c4fa1bf637b85ce6c1 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/ca79016b78a1b4572e981b53a5a68316 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_5.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_5.mp3 new file mode 100644 index 00000000..00b69519 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_5.mp3.meta new file mode 100644 index 00000000..7004728d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f35e7c02cdfdcd4409cd330397c5b0a8 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/8937f45985e81896d31731e9a61e39f3 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_6.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_6.mp3 new file mode 100644 index 00000000..5f9cabc9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_6.mp3.meta new file mode 100644 index 00000000..db493ed2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 356f590b140913641b33178ccb2c1c46 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/7333a166c978afa19d81d18574ad15e9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_7.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_7.mp3 new file mode 100644 index 00000000..e54c8f71 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_7.mp3.meta new file mode 100644 index 00000000..4b3afc83 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 96fbf5308fe50b047a51bf42744db387 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/2ee7b580e2e16842d4888d99374d71c4 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_8.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_8.mp3 new file mode 100644 index 00000000..450437f2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_8.mp3.meta new file mode 100644 index 00000000..3f3da9b9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 279a5556079d33a4a8112e8a6f2d4846 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/d8f5477a865b8bee3b732eb9902e7b49 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_9.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_9.mp3 new file mode 100644 index 00000000..f9cb387b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_9.mp3.meta new file mode 100644 index 00000000..11d44ae5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/man/chat_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d8cf12e38ffec2d439d23687401ec9f6 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/c562bfad6ce46c6eeff339bae7ddbabd + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman.meta new file mode 100644 index 00000000..ee9eca62 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e8fedee41b7e60a48968bbe8c2963b9c +folderAsset: yes +timeCreated: 1514857692 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_101.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_101.mp3 new file mode 100644 index 00000000..0e5ca8ce Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_101.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_101.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_101.mp3.meta new file mode 100644 index 00000000..02bbcd30 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_101.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3eb9f63bef7751a4e8604d08d217b7ef +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/a4165fc6c38343443ba309fffced1fd8 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_102.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_102.mp3 new file mode 100644 index 00000000..82100a53 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_102.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_102.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_102.mp3.meta new file mode 100644 index 00000000..633cdf73 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_102.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9250affa65469ef40a44ceae4af3583c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/19f8f580b271be37470f38aa9d43b5c8 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_103.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_103.mp3 new file mode 100644 index 00000000..0a9bc3d9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_103.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_103.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_103.mp3.meta new file mode 100644 index 00000000..54032588 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_103.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 432d4bc4c3a18d44c8522e0f34677eda +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/9691c9bc7c3c02168950b3bf993db7cf + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_104.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_104.mp3 new file mode 100644 index 00000000..1e2fcca2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_104.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_104.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_104.mp3.meta new file mode 100644 index 00000000..8a90ad77 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_104.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 058e5c523d74fdc47b84ec96bd3c360b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/c86e79f50dfbcaf10d7f7c8ab37a32c3 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_105.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_105.mp3 new file mode 100644 index 00000000..3273ed62 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_105.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_105.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_105.mp3.meta new file mode 100644 index 00000000..ec7e5715 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_105.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3fa27ab0690e4d44290e4000d03c4944 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/c78a6f7f2cd085c444893d402f84e3a0 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_106.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_106.mp3 new file mode 100644 index 00000000..f85916f2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_106.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_106.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_106.mp3.meta new file mode 100644 index 00000000..d90d642a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_106.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 93a9dd9988af4444f8f30f27dba455fb +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/c9fc3752045de2d1b5c5b0af1b975687 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_107.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_107.mp3 new file mode 100644 index 00000000..b281ae26 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_107.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_107.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_107.mp3.meta new file mode 100644 index 00000000..c5a62d04 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_107.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 082f229dd0502a7458864d747034ed54 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/8ef7002576de619d2bfff41c0197b08a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_108.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_108.mp3 new file mode 100644 index 00000000..5a299c31 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_108.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_108.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_108.mp3.meta new file mode 100644 index 00000000..141c378e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_108.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a008593e01d81f242ad616fb22a9a7a1 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/b92a6cd48ca6e0827e9c3d2aec5f6c26 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_109.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_109.mp3 new file mode 100644 index 00000000..8163fd83 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_109.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_109.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_109.mp3.meta new file mode 100644 index 00000000..45222e9e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_109.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 378fd69be505ea44299ea0e58cdc941a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/ad7498ae0949751afe433348b929782c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_110.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_110.mp3 new file mode 100644 index 00000000..7a68881b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_110.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_110.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_110.mp3.meta new file mode 100644 index 00000000..5e086ee0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_110.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 08c657a1cccf3804b9cfa0f510ad445a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/b62a403b98563245e1d597219473ccca + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_201.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_201.mp3 new file mode 100644 index 00000000..f87b59f4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_201.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_201.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_201.mp3.meta new file mode 100644 index 00000000..d9c2914d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_201.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bfa8b92dc39cfac4989f24956f04a70e +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/d9eabace6ce79f9f6b355e1a0b147078 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_202.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_202.mp3 new file mode 100644 index 00000000..e95870ec Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_202.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_202.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_202.mp3.meta new file mode 100644 index 00000000..4c2e68d0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_202.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a52d86b8b6663e849b73e45d265dc518 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/2bc82f2fb892c31fa1faa61276354f4a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_203.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_203.mp3 new file mode 100644 index 00000000..c74f48b6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_203.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_203.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_203.mp3.meta new file mode 100644 index 00000000..e3333f0c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_203.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fcb326ecddee252438bc154928ef1bfc +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/7b5a82d068bca183f52c9b400e8145a2 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_204.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_204.mp3 new file mode 100644 index 00000000..32976e30 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_204.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_204.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_204.mp3.meta new file mode 100644 index 00000000..70a27f38 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_204.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e1d845802aeda7a48913d3e029b5fdb3 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/1e8e294b2f699494fd6a56576de08627 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_205.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_205.mp3 new file mode 100644 index 00000000..85e7da1b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_205.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_205.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_205.mp3.meta new file mode 100644 index 00000000..c324ec10 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_205.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 505c9eb19394f1445a5815069fe4e2a9 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/fc94a8fcd45ef05e2996ba440c025267 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_206.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_206.mp3 new file mode 100644 index 00000000..90a218ee Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_206.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_206.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_206.mp3.meta new file mode 100644 index 00000000..30c50bde --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_206.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ece864608c57f9d4cb9b6a7a72ab3443 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/7f2d59d3e831cb189ab84cd50bea2b02 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_207.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_207.mp3 new file mode 100644 index 00000000..b38439c1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_207.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_207.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_207.mp3.meta new file mode 100644 index 00000000..e4bf71a2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_207.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 868ba9e77fadf994faec4bafbc720e49 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/6ed937da82926047fa85a9d6763ed5dc + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_208.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_208.mp3 new file mode 100644 index 00000000..422b95df Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_208.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_208.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_208.mp3.meta new file mode 100644 index 00000000..74859a37 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_208.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5c5ea683df150cd46ae568ccf0519bea +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/d53a6359d20b3468be24be30f4839935 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_209.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_209.mp3 new file mode 100644 index 00000000..faf0b858 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_209.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_209.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_209.mp3.meta new file mode 100644 index 00000000..a4dd76f6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_209.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3d4b680359a7c3b4b93921af2affd8c3 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/63177900758ebef3aca50b3c651701d4 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_210.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_210.mp3 new file mode 100644 index 00000000..ebec4b91 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_210.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_210.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_210.mp3.meta new file mode 100644 index 00000000..82ba995d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_210.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d153150074ffeaa40a8dfdc8465fbc60 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/2c7a04f12bd451057e520ce785affc4c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Chi.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Chi.mp3 new file mode 100644 index 00000000..1546bd66 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Chi.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Chi.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Chi.mp3.meta new file mode 100644 index 00000000..b501e3ff --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Chi.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2ddfb272f3d64084ead5b522d1aa214f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/fdbb71e38d081b3f97dd07825dcb1467 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_ChongDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_ChongDuo.mp3 new file mode 100644 index 00000000..b50961fa Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_ChongDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_ChongDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_ChongDuo.mp3.meta new file mode 100644 index 00000000..2c26702f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_ChongDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9952cf5c1adf6184fa84ec93d023f128 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/868216be8fd4e601bda3caf1bd0ae8bc + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_DianPao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_DianPao.mp3 new file mode 100644 index 00000000..f1e367f8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_DianPao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_DianPao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_DianPao.mp3.meta new file mode 100644 index 00000000..7b1a5e3b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_DianPao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3f7210ca99f764542917714bd1e6e89f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/28f23ca9ae0be21402217ab70ddb4a21 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_GuoSao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_GuoSao.mp3 new file mode 100644 index 00000000..e910ff9b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_GuoSao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_GuoSao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_GuoSao.mp3.meta new file mode 100644 index 00000000..bcfafecc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_GuoSao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 64fef14309d36584b9540c759ac614b8 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/08103e5e7e63befdbf509e5c2396464a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Hu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Hu.mp3 new file mode 100644 index 00000000..888b6d75 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Hu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Hu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Hu.mp3.meta new file mode 100644 index 00000000..9c6d8b29 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Hu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a9984a0d598a20d4dab4aef52f51f3a4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/3948f96455aaecf45d19d36955c68828 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_KaiDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_KaiDuo.mp3 new file mode 100644 index 00000000..8acf933e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_KaiDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_KaiDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_KaiDuo.mp3.meta new file mode 100644 index 00000000..f283e218 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_KaiDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 19890935e85fb0a4b923ceff2a216b95 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/6d67dada6ce5e7822560af4c8cee49a7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Peng.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Peng.mp3 new file mode 100644 index 00000000..b283a601 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Peng.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Peng.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Peng.mp3.meta new file mode 100644 index 00000000..c6d17089 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Peng.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 90c9dfa85eed6d547a97e7c6b91cb935 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/6ff7b8e06d937f6bb1b5a70c5ccaf503 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Sao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Sao.mp3 new file mode 100644 index 00000000..50020653 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Sao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Sao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Sao.mp3.meta new file mode 100644 index 00000000..34b93321 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Sao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b6b5ca25ac31e08468a8e920e3d77a13 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/00566aeb7fc41c07cb9b3a4f568fcd1f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_SaoChuan.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_SaoChuan.mp3 new file mode 100644 index 00000000..823a80a0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_SaoChuan.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_SaoChuan.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_SaoChuan.mp3.meta new file mode 100644 index 00000000..bdadde45 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_SaoChuan.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9606d6555df83dd47999a8fc5ba512ba +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/2f4a9d0ed20f10ae984591c8afa4dad8 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_TianHu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_TianHu.mp3 new file mode 100644 index 00000000..4cc0936b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_TianHu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_TianHu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_TianHu.mp3.meta new file mode 100644 index 00000000..10099c6a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_TianHu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 29ff950a9f32c864b8cb4368e9c2dabd +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/f1dc8d7abba6befe0a4a0672dc6fced5 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Wai.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Wai.mp3 new file mode 100644 index 00000000..6e006ffe Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Wai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Wai.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Wai.mp3.meta new file mode 100644 index 00000000..e6e3c076 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_Wai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2324617b95d5a0a4cb7843812d10f90f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/d2c1bf474991876e17974ed0cef4538f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_ZiMo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_ZiMo.mp3 new file mode 100644 index 00000000..1bf3c478 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_ZiMo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_ZiMo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_ZiMo.mp3.meta new file mode 100644 index 00000000..3f10cccf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/F_ZiMo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b57d8012144f849468b828de73aac980 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/1d9dff96c16a4a8f4f450b900540722c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_1.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_1.mp3 new file mode 100644 index 00000000..40142fee Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_1.mp3.meta new file mode 100644 index 00000000..2aa5ef7c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1d71740cecdf8da43b3a00f277cc0303 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/464e22a0b22cf84773c19cc597eb3770 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_2.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_2.mp3 new file mode 100644 index 00000000..ab428517 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_2.mp3.meta new file mode 100644 index 00000000..f9706ed4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 38768d3d05e5c1d45a27660ee3cdea36 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/97f911f6e2fd5a91639b5b998daaf77c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_3.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_3.mp3 new file mode 100644 index 00000000..06b1ba11 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_3.mp3.meta new file mode 100644 index 00000000..4a9bd70a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1c9259740e820074aae30c2d634e2bda +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/90e309b9b392664e104a199629023191 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_4.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_4.mp3 new file mode 100644 index 00000000..5c55d575 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_4.mp3.meta new file mode 100644 index 00000000..d655d423 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2d72c452eb75b9b499d15ff8cd937e2c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/dfbbe5b083046f93a7a7bbb4b019d426 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_5.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_5.mp3 new file mode 100644 index 00000000..1dc0d3ec Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_5.mp3.meta new file mode 100644 index 00000000..8654c0d2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 59ef0fb38be51094880825c01b7f2748 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/042ac72501a16852f6248c7306f6747d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_6.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_6.mp3 new file mode 100644 index 00000000..1fa5851b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_6.mp3.meta new file mode 100644 index 00000000..5206a890 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a8619d0237a3d444c841da3efbad0575 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/cebfa5244b844d325179c5a7c212efd9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_7.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_7.mp3 new file mode 100644 index 00000000..038e62cc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_7.mp3.meta new file mode 100644 index 00000000..09ae32c0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 62100fe110dc6b246a0d9fcff9800567 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/848bf258a0d3d2169f4ff250b07c3b5c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_8.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_8.mp3 new file mode 100644 index 00000000..a9076f13 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_8.mp3.meta new file mode 100644 index 00000000..d70cbee0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: dbb042288983c594e87fe3341b716c33 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/73f51ee27fec992e320f0bf6d1a4b3d8 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_9.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_9.mp3 new file mode 100644 index 00000000..1867a5a8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_9.mp3.meta new file mode 100644 index 00000000..3c3029d0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/sound/woman/chat_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6964eade6c573b94cb6508251205822f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/fulushou/4fbc79aaa42ef93b2e00e7a30422aac2 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/ui.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/ui.meta new file mode 100644 index 00000000..fffe4451 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 733a321fa1607d044a5efe8f6d05fb0c +folderAsset: yes +timeCreated: 1587569081 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/ui/Extend_Poker_FuLuShou_fui.bytes b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/ui/Extend_Poker_FuLuShou_fui.bytes new file mode 100644 index 00000000..14a5749b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/ui/Extend_Poker_FuLuShou_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/ui/Extend_Poker_FuLuShou_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/ui/Extend_Poker_FuLuShou_fui.bytes.meta new file mode 100644 index 00000000..7d96db16 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/ui/Extend_Poker_FuLuShou_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c5e5f766e0d5a134ca24b251479964e9 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/zipai/fulushou/e2b2a7510a55a1eb6b03805b9ec170ed + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/ui/Info_Poker_FuLuShou_fui.bytes b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/ui/Info_Poker_FuLuShou_fui.bytes new file mode 100644 index 00000000..96bb7c65 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/ui/Info_Poker_FuLuShou_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/fulushou/ui/Info_Poker_FuLuShou_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/ui/Info_Poker_FuLuShou_fui.bytes.meta new file mode 100644 index 00000000..cee30161 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/fulushou/ui/Info_Poker_FuLuShou_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7452d0179ba6c9b42a14794d565dc7e7 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/zipai/fulushou/caf4abdbb7b42b6be1d5e7ad24131a32 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard.meta new file mode 100644 index 00000000..ef607df4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 88e151338bfa568449388b981123ce35 +folderAsset: yes +timeCreated: 1587569081 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound.meta new file mode 100644 index 00000000..f8854541 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c13e5ba83e4b8de47ad0f966af0967d9 +folderAsset: yes +timeCreated: 1587569596 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/BGSOUND.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/BGSOUND.mp3 new file mode 100644 index 00000000..72fa969f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/BGSOUND.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/BGSOUND.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/BGSOUND.mp3.meta new file mode 100644 index 00000000..151bbdce --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/BGSOUND.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4cce24d1b064ee54788ba099fa13348d +timeCreated: 1533718377 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/bg.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/bg.mp3 new file mode 100644 index 00000000..0f69ecc6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/bg.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/bg.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/bg.mp3.meta new file mode 100644 index 00000000..564a4f2e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/bg.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9100eb628b92dfe4e932db6a62610082 +timeCreated: 1533718337 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man.meta new file mode 100644 index 00000000..c320aeb2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 189fc0c3c287d9a4e8ca754ede644412 +folderAsset: yes +timeCreated: 1514857686 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_101.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_101.mp3 new file mode 100644 index 00000000..5762107e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_101.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_101.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_101.mp3.meta new file mode 100644 index 00000000..3702e78e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_101.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b176bc3d0e80d2e40b7489f70df5ec56 +timeCreated: 1533718355 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_102.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_102.mp3 new file mode 100644 index 00000000..950977d5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_102.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_102.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_102.mp3.meta new file mode 100644 index 00000000..22afbe3a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_102.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3e720bfec3d6d2d44b00ecef177e1e3b +timeCreated: 1533718359 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_103.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_103.mp3 new file mode 100644 index 00000000..41080221 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_103.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_103.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_103.mp3.meta new file mode 100644 index 00000000..e77cf95f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_103.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0cb12322c3cff53418d08069e1e9f32d +timeCreated: 1533718334 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_104.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_104.mp3 new file mode 100644 index 00000000..56ad8820 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_104.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_104.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_104.mp3.meta new file mode 100644 index 00000000..ec5d302a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_104.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 09fe4e998a688264f8ea562adfbdb508 +timeCreated: 1533718354 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_105.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_105.mp3 new file mode 100644 index 00000000..f4012c04 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_105.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_105.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_105.mp3.meta new file mode 100644 index 00000000..76c96a8b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_105.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c42f31c9d85498c4192379b5e567e5f1 +timeCreated: 1533718387 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_106.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_106.mp3 new file mode 100644 index 00000000..a444254d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_106.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_106.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_106.mp3.meta new file mode 100644 index 00000000..4aeea51d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_106.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6743e22e55a5a1243b59fe41c63d5ca4 +timeCreated: 1533718333 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_107.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_107.mp3 new file mode 100644 index 00000000..d0316e56 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_107.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_107.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_107.mp3.meta new file mode 100644 index 00000000..60398caf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_107.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c3c9100fb2b44644f9513f63decacaa2 +timeCreated: 1533718340 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_108.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_108.mp3 new file mode 100644 index 00000000..09c7beff Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_108.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_108.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_108.mp3.meta new file mode 100644 index 00000000..b8a9f83b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_108.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b5b8dddc3d0352e42a3c389126194367 +timeCreated: 1533718356 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_109.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_109.mp3 new file mode 100644 index 00000000..8bab2105 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_109.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_109.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_109.mp3.meta new file mode 100644 index 00000000..bbf53f35 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_109.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d4567c759b4b0b24f94597d5beb29218 +timeCreated: 1533718382 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_110.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_110.mp3 new file mode 100644 index 00000000..a0ed6f55 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_110.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_110.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_110.mp3.meta new file mode 100644 index 00000000..951d25d3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_110.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1b17dbb413008ff4fafbc0cec59a75ef +timeCreated: 1533718380 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_201.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_201.mp3 new file mode 100644 index 00000000..9f2692e2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_201.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_201.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_201.mp3.meta new file mode 100644 index 00000000..d5fa080d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_201.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: eafa3e9a9f940c941b0fbd025fbdefd4 +timeCreated: 1533718354 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_202.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_202.mp3 new file mode 100644 index 00000000..4846fa0e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_202.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_202.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_202.mp3.meta new file mode 100644 index 00000000..c539d046 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_202.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4aa9111d9b17f404a9e45e2824f7db2f +timeCreated: 1533718346 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_203.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_203.mp3 new file mode 100644 index 00000000..c04e9ec6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_203.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_203.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_203.mp3.meta new file mode 100644 index 00000000..caed2be7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_203.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bdf56ac4b9e72db4288e602a80284d6b +timeCreated: 1533718372 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_204.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_204.mp3 new file mode 100644 index 00000000..3f7dc5ce Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_204.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_204.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_204.mp3.meta new file mode 100644 index 00000000..7cd4d57c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_204.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e4e3b8cfdc833b8428d17769ffc5be0d +timeCreated: 1533718348 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_205.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_205.mp3 new file mode 100644 index 00000000..355bb7fd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_205.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_205.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_205.mp3.meta new file mode 100644 index 00000000..38190d65 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_205.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 00d9afb6f8394604c83d55c7d76b72c0 +timeCreated: 1533718394 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_206.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_206.mp3 new file mode 100644 index 00000000..ce6fb1f9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_206.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_206.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_206.mp3.meta new file mode 100644 index 00000000..b9d76fe3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_206.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 06619366e7c94f44aa24930575786ee6 +timeCreated: 1533718381 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_207.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_207.mp3 new file mode 100644 index 00000000..9f1337d0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_207.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_207.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_207.mp3.meta new file mode 100644 index 00000000..1ed60bf7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_207.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: cf428993014696d4cbfbe2bb28e9f054 +timeCreated: 1533718343 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_208.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_208.mp3 new file mode 100644 index 00000000..461ac53a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_208.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_208.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_208.mp3.meta new file mode 100644 index 00000000..885da576 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_208.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1cb92c7e2b005464dad5ba732794c1cd +timeCreated: 1533718353 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_209.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_209.mp3 new file mode 100644 index 00000000..69a4770e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_209.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_209.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_209.mp3.meta new file mode 100644 index 00000000..3e1ced8c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_209.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0f084f935e08259469baa95423ff441e +timeCreated: 1533718333 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_210.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_210.mp3 new file mode 100644 index 00000000..d68d55d8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_210.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_210.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_210.mp3.meta new file mode 100644 index 00000000..a5b53dcb --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_210.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c4b77906500559347907f694966f2615 +timeCreated: 1533718390 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Chi.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Chi.mp3 new file mode 100644 index 00000000..9c1ba996 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Chi.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Chi.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Chi.mp3.meta new file mode 100644 index 00000000..c5a2ddb3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Chi.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 544fbf52baf6ffb48ae47cb033d4a589 +timeCreated: 1533718344 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_ChongDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_ChongDuo.mp3 new file mode 100644 index 00000000..e6e9e810 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_ChongDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_ChongDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_ChongDuo.mp3.meta new file mode 100644 index 00000000..0b951b16 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_ChongDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bcb9b4ae8f0b0ac4fa0a47eb095331de +timeCreated: 1533718391 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_DianPao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_DianPao.mp3 new file mode 100644 index 00000000..a4bc21d3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_DianPao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_DianPao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_DianPao.mp3.meta new file mode 100644 index 00000000..baf8eaf9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_DianPao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 865984f0e39bfc34992d3d8360df0684 +timeCreated: 1533718331 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_GuoSao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_GuoSao.mp3 new file mode 100644 index 00000000..5fdd9dbc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_GuoSao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_GuoSao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_GuoSao.mp3.meta new file mode 100644 index 00000000..d66e7a6c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_GuoSao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d2c36111d60e77744aaada991916efd4 +timeCreated: 1533718344 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Hu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Hu.mp3 new file mode 100644 index 00000000..a13dae22 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Hu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Hu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Hu.mp3.meta new file mode 100644 index 00000000..022644b9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Hu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2ce84b89d1d769842afa505f0b10077b +timeCreated: 1533718397 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_KaiDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_KaiDuo.mp3 new file mode 100644 index 00000000..43ea5633 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_KaiDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_KaiDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_KaiDuo.mp3.meta new file mode 100644 index 00000000..6b568cd8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_KaiDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bf22521e7db78914fbac9d50b4631781 +timeCreated: 1533718393 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Peng.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Peng.mp3 new file mode 100644 index 00000000..6e09f1d9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Peng.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Peng.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Peng.mp3.meta new file mode 100644 index 00000000..d0b3ac97 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Peng.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b7783ca2a63775d4d90ba741a5a6223a +timeCreated: 1533718342 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Sao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Sao.mp3 new file mode 100644 index 00000000..5ae3de41 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Sao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Sao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Sao.mp3.meta new file mode 100644 index 00000000..2790e10b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_Sao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8060739baa0d0144585fd9136badf132 +timeCreated: 1533718391 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_SaoChuan.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_SaoChuan.mp3 new file mode 100644 index 00000000..57719320 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_SaoChuan.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_SaoChuan.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_SaoChuan.mp3.meta new file mode 100644 index 00000000..ede94242 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_SaoChuan.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: afe323f5505cd904fad5fe00b51dfa17 +timeCreated: 1533718335 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_TianHu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_TianHu.mp3 new file mode 100644 index 00000000..2f647d3e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_TianHu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_TianHu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_TianHu.mp3.meta new file mode 100644 index 00000000..4bbcb177 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_TianHu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c747b8e31ff5dea4a9787a67b04aa017 +timeCreated: 1533718364 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_ZiMo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_ZiMo.mp3 new file mode 100644 index 00000000..3d108af0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_ZiMo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_ZiMo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_ZiMo.mp3.meta new file mode 100644 index 00000000..a3a2e120 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/F_ZiMo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 06834aaab2342d44085fc321b463798a +timeCreated: 1533718386 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_1.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_1.mp3 new file mode 100644 index 00000000..08a56038 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_1.mp3.meta new file mode 100644 index 00000000..9dd8dec6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0ae06df56ca123c43b61de70406413f7 +timeCreated: 1533718397 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_2.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_2.mp3 new file mode 100644 index 00000000..672196b7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_2.mp3.meta new file mode 100644 index 00000000..923af6f6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 69e0754091a70854b84a75a7b0572e1d +timeCreated: 1533718393 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_3.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_3.mp3 new file mode 100644 index 00000000..cf5d8d1d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_3.mp3.meta new file mode 100644 index 00000000..430a0c19 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b24e65eea2a76334886848a44ad82946 +timeCreated: 1533718360 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_4.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_4.mp3 new file mode 100644 index 00000000..5415995b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_4.mp3.meta new file mode 100644 index 00000000..c6ea363c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1fbcc1184804dfe4a88053856e493a29 +timeCreated: 1533718390 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_5.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_5.mp3 new file mode 100644 index 00000000..00b69519 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_5.mp3.meta new file mode 100644 index 00000000..573fde08 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a87ab8d312fbc964a98444a44e9a7d91 +timeCreated: 1533718338 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_6.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_6.mp3 new file mode 100644 index 00000000..5f9cabc9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_6.mp3.meta new file mode 100644 index 00000000..4abc0aa2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3db79607d01b04641b2a5d661354d470 +timeCreated: 1533718336 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_7.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_7.mp3 new file mode 100644 index 00000000..e54c8f71 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_7.mp3.meta new file mode 100644 index 00000000..3f7415eb --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 772adc5d537343f4fb6cf5ff25459365 +timeCreated: 1533718341 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_8.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_8.mp3 new file mode 100644 index 00000000..450437f2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_8.mp3.meta new file mode 100644 index 00000000..998f62d1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8ab66943a08862d4da32dac7454be818 +timeCreated: 1533718363 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_9.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_9.mp3 new file mode 100644 index 00000000..f9cb387b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_9.mp3.meta new file mode 100644 index 00000000..b1b12497 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/man/chat_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c0864c5d282d8f24081b8d404e6c3b2e +timeCreated: 1533718364 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman.meta new file mode 100644 index 00000000..be62615c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8d25dbe88d6899e4d88772fd89c063c0 +folderAsset: yes +timeCreated: 1514857692 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_101.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_101.mp3 new file mode 100644 index 00000000..0e5ca8ce Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_101.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_101.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_101.mp3.meta new file mode 100644 index 00000000..2373b3da --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_101.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b70fe9ed915751f46a6b594d7371cf90 +timeCreated: 1533718367 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_102.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_102.mp3 new file mode 100644 index 00000000..82100a53 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_102.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_102.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_102.mp3.meta new file mode 100644 index 00000000..99eabf26 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_102.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b55689534c984b546a930bbfd3e688d5 +timeCreated: 1533718349 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_103.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_103.mp3 new file mode 100644 index 00000000..0a9bc3d9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_103.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_103.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_103.mp3.meta new file mode 100644 index 00000000..8f830b24 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_103.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8cedeef2715b21b478c9c9f7827e346e +timeCreated: 1533718356 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_104.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_104.mp3 new file mode 100644 index 00000000..1e2fcca2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_104.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_104.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_104.mp3.meta new file mode 100644 index 00000000..dad757d8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_104.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 54ee5f6267163af4888e99ded4b22f70 +timeCreated: 1533718396 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_105.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_105.mp3 new file mode 100644 index 00000000..3273ed62 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_105.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_105.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_105.mp3.meta new file mode 100644 index 00000000..08cff3f2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_105.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c75c7577af266324f97f97c4f644685d +timeCreated: 1533718345 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_106.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_106.mp3 new file mode 100644 index 00000000..f85916f2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_106.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_106.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_106.mp3.meta new file mode 100644 index 00000000..59317264 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_106.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a7e0e582ad77a1b428a766024f02d165 +timeCreated: 1533718386 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_107.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_107.mp3 new file mode 100644 index 00000000..b281ae26 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_107.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_107.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_107.mp3.meta new file mode 100644 index 00000000..bff89261 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_107.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 73f33a2e326966645a2380d0e1457448 +timeCreated: 1533718381 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_108.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_108.mp3 new file mode 100644 index 00000000..5a299c31 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_108.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_108.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_108.mp3.meta new file mode 100644 index 00000000..c518efc8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_108.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 96f1f55dd3aa0a547acab128b52e9f85 +timeCreated: 1533718384 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_109.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_109.mp3 new file mode 100644 index 00000000..8163fd83 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_109.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_109.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_109.mp3.meta new file mode 100644 index 00000000..23e7afe8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_109.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: da1d97ff8c5838042947837530bb3c95 +timeCreated: 1533718386 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_110.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_110.mp3 new file mode 100644 index 00000000..7a68881b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_110.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_110.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_110.mp3.meta new file mode 100644 index 00000000..856846c3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_110.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ef0a8daa52ac5c741af27c00d9f4e7d7 +timeCreated: 1533718340 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_201.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_201.mp3 new file mode 100644 index 00000000..f87b59f4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_201.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_201.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_201.mp3.meta new file mode 100644 index 00000000..033c8966 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_201.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 965017839666c534a819cdcb67deaaa6 +timeCreated: 1533718355 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_202.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_202.mp3 new file mode 100644 index 00000000..e95870ec Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_202.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_202.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_202.mp3.meta new file mode 100644 index 00000000..f5dc1f70 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_202.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c149562ec57687c47847de2d1934e1d1 +timeCreated: 1533718336 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_203.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_203.mp3 new file mode 100644 index 00000000..c74f48b6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_203.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_203.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_203.mp3.meta new file mode 100644 index 00000000..48c355f8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_203.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 052596f2890b12b42829a40554550582 +timeCreated: 1533718345 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_204.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_204.mp3 new file mode 100644 index 00000000..32976e30 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_204.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_204.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_204.mp3.meta new file mode 100644 index 00000000..9d778a00 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_204.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0127d7a7730338e4b9bdbfadeba968fe +timeCreated: 1533718382 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_205.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_205.mp3 new file mode 100644 index 00000000..85e7da1b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_205.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_205.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_205.mp3.meta new file mode 100644 index 00000000..24f0bcff --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_205.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ea3a4dc39c5b1434ba313313b220d07e +timeCreated: 1533718382 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_206.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_206.mp3 new file mode 100644 index 00000000..90a218ee Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_206.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_206.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_206.mp3.meta new file mode 100644 index 00000000..ceea4281 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_206.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8e395bd30f4dc9548b0a31f3a625e86c +timeCreated: 1533718391 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_207.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_207.mp3 new file mode 100644 index 00000000..b38439c1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_207.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_207.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_207.mp3.meta new file mode 100644 index 00000000..8d7e9382 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_207.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5e4dbf5ad641d01499c29cf4be1b0fd9 +timeCreated: 1533718396 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_208.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_208.mp3 new file mode 100644 index 00000000..422b95df Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_208.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_208.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_208.mp3.meta new file mode 100644 index 00000000..1d3614f2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_208.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7b03d3ae15b7009499945977b69852d4 +timeCreated: 1533718400 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_209.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_209.mp3 new file mode 100644 index 00000000..faf0b858 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_209.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_209.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_209.mp3.meta new file mode 100644 index 00000000..08e7bfb5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_209.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e17c7f0a8e2920a4f8431e5350f3cbe2 +timeCreated: 1533718361 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_210.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_210.mp3 new file mode 100644 index 00000000..ebec4b91 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_210.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_210.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_210.mp3.meta new file mode 100644 index 00000000..cbb1f11c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_210.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c92381aea78f84b4896b664310237e14 +timeCreated: 1533718360 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Chi.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Chi.mp3 new file mode 100644 index 00000000..1546bd66 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Chi.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Chi.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Chi.mp3.meta new file mode 100644 index 00000000..fb67c285 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Chi.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5e214a61bb4af0348a89503b9a5a8da4 +timeCreated: 1533718385 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_ChongDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_ChongDuo.mp3 new file mode 100644 index 00000000..b50961fa Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_ChongDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_ChongDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_ChongDuo.mp3.meta new file mode 100644 index 00000000..73536869 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_ChongDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 32fab930aebbfc948aa8004e4e960b8e +timeCreated: 1533718372 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_DianPao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_DianPao.mp3 new file mode 100644 index 00000000..f1e367f8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_DianPao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_DianPao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_DianPao.mp3.meta new file mode 100644 index 00000000..92a74c89 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_DianPao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8cb6bc22fa46f2f44ab79d770a31c13b +timeCreated: 1533718384 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_GuoSao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_GuoSao.mp3 new file mode 100644 index 00000000..e910ff9b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_GuoSao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_GuoSao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_GuoSao.mp3.meta new file mode 100644 index 00000000..897c31ac --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_GuoSao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1011a193d610c9d48864f9acc72dfa98 +timeCreated: 1533718359 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Hu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Hu.mp3 new file mode 100644 index 00000000..888b6d75 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Hu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Hu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Hu.mp3.meta new file mode 100644 index 00000000..009f7107 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Hu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c3b697e198492a045a5c825e62dcc775 +timeCreated: 1533718393 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_KaiDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_KaiDuo.mp3 new file mode 100644 index 00000000..8acf933e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_KaiDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_KaiDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_KaiDuo.mp3.meta new file mode 100644 index 00000000..814012d8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_KaiDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e1cd84fff1e99344c8b7a61db045d1a9 +timeCreated: 1533718396 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Peng.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Peng.mp3 new file mode 100644 index 00000000..b283a601 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Peng.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Peng.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Peng.mp3.meta new file mode 100644 index 00000000..341b7597 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Peng.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 52cc52879418e0e41b24ed06a590d659 +timeCreated: 1533718366 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Sao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Sao.mp3 new file mode 100644 index 00000000..50020653 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Sao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Sao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Sao.mp3.meta new file mode 100644 index 00000000..7dd46b67 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_Sao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7ba0cbe22b20def449907f2e714e29c7 +timeCreated: 1533718358 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_SaoChuan.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_SaoChuan.mp3 new file mode 100644 index 00000000..823a80a0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_SaoChuan.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_SaoChuan.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_SaoChuan.mp3.meta new file mode 100644 index 00000000..d7fe2f8e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_SaoChuan.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3094f1fc8c9efdc4a966921d411b8886 +timeCreated: 1533718392 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_TianHu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_TianHu.mp3 new file mode 100644 index 00000000..4cc0936b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_TianHu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_TianHu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_TianHu.mp3.meta new file mode 100644 index 00000000..8d65be46 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_TianHu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 08b2bfc0f811a5747a78ab09809540fe +timeCreated: 1533718369 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_ZiMo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_ZiMo.mp3 new file mode 100644 index 00000000..1bf3c478 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_ZiMo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_ZiMo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_ZiMo.mp3.meta new file mode 100644 index 00000000..85837cdb --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/F_ZiMo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4d792490fad003842990ad12909b9911 +timeCreated: 1533718382 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_1.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_1.mp3 new file mode 100644 index 00000000..40142fee Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_1.mp3.meta new file mode 100644 index 00000000..f3ea7c2a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f0173193b958d4c4d9c677358fbd7c96 +timeCreated: 1533718382 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_2.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_2.mp3 new file mode 100644 index 00000000..ab428517 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_2.mp3.meta new file mode 100644 index 00000000..3607e10f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3437202c86535784fb6e6ed27073d84f +timeCreated: 1533718344 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_3.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_3.mp3 new file mode 100644 index 00000000..06b1ba11 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_3.mp3.meta new file mode 100644 index 00000000..c786056c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 553ab3ada5364a64b9a3b814916adafe +timeCreated: 1533718366 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_4.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_4.mp3 new file mode 100644 index 00000000..5c55d575 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_4.mp3.meta new file mode 100644 index 00000000..9b98e88f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fdc2a3efdd295cb47be46902dc2b5899 +timeCreated: 1533718362 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_5.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_5.mp3 new file mode 100644 index 00000000..1dc0d3ec Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_5.mp3.meta new file mode 100644 index 00000000..b7e2de55 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 13445644b3483ff4c9c686eb51f4b958 +timeCreated: 1533718389 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_6.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_6.mp3 new file mode 100644 index 00000000..1fa5851b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_6.mp3.meta new file mode 100644 index 00000000..79eb141c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 33e827562405acd479b5449193ed97da +timeCreated: 1533718390 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_7.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_7.mp3 new file mode 100644 index 00000000..038e62cc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_7.mp3.meta new file mode 100644 index 00000000..245f70c1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4745cfab388b97540a6f12f7651a09f5 +timeCreated: 1533718342 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_8.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_8.mp3 new file mode 100644 index 00000000..a9076f13 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_8.mp3.meta new file mode 100644 index 00000000..20a45b35 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 556f823f277f2684b95d3f3a36fd57e9 +timeCreated: 1533718338 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_9.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_9.mp3 new file mode 100644 index 00000000..1867a5a8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_9.mp3.meta new file mode 100644 index 00000000..862a3e75 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/sound/woman/chat_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bf5519857fa4ada4e95550d3c3523287 +timeCreated: 1533718358 +licenseType: Pro +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/ui.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/ui.meta new file mode 100644 index 00000000..8e6c1f4d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0ba3953ea87eaab40b2abe090bff3705 +folderAsset: yes +timeCreated: 1587569081 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/ui/Extend_Poker_HSRunBeard_fui.bytes b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/ui/Extend_Poker_HSRunBeard_fui.bytes new file mode 100644 index 00000000..9084707c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/ui/Extend_Poker_HSRunBeard_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/ui/Extend_Poker_HSRunBeard_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/ui/Extend_Poker_HSRunBeard_fui.bytes.meta new file mode 100644 index 00000000..1d835e99 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/ui/Extend_Poker_HSRunBeard_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 275ef44be5aaca345a26ea77196c6054 +timeCreated: 1587569598 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/ui/Info_Poker_HSRunBeard_fui.bytes b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/ui/Info_Poker_HSRunBeard_fui.bytes new file mode 100644 index 00000000..479f46dc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/ui/Info_Poker_HSRunBeard_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/ui/Info_Poker_HSRunBeard_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/ui/Info_Poker_HSRunBeard_fui.bytes.meta new file mode 100644 index 00000000..dce5522b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/hsrunbeard/ui/Info_Poker_HSRunBeard_fui.bytes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5b106c94f0b25d14498a92db6c175f07 +timeCreated: 1587569081 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard.meta new file mode 100644 index 00000000..acdd7869 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 877604c6ff407994782b9d1ec5b21317 +folderAsset: yes +timeCreated: 1581304938 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound.meta new file mode 100644 index 00000000..1e4e24fe --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 343158edc98d2a84da1e5adc5f9a07aa +folderAsset: yes +timeCreated: 1514857673 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/BGSOUND.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/BGSOUND.mp3 new file mode 100644 index 00000000..72fa969f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/BGSOUND.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/BGSOUND.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/BGSOUND.mp3.meta new file mode 100644 index 00000000..5992078c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/BGSOUND.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c22d035fd5d6f4a4cbdd5fa59fd54573 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/b9852e006dd0eaef10aad6b5eebbb0c8 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/bg.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/bg.mp3 new file mode 100644 index 00000000..fca2f8dc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/bg.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/bg.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/bg.mp3.meta new file mode 100644 index 00000000..c0299874 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/bg.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5c7f287230c59604c82ded4c32c91bbd +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/be9d9587467b57cc86564925a8d94e99 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man.meta new file mode 100644 index 00000000..217c4505 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 71e4b3453d5a3cf44a438d3465247bf0 +folderAsset: yes +timeCreated: 1514857686 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_101.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_101.mp3 new file mode 100644 index 00000000..5762107e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_101.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_101.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_101.mp3.meta new file mode 100644 index 00000000..f8ea72bc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_101.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1b0f45acd2634a041ac8646f84aa4613 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/0b2068d49a1541922607dbbca01863eb + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_102.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_102.mp3 new file mode 100644 index 00000000..950977d5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_102.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_102.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_102.mp3.meta new file mode 100644 index 00000000..cc1a1748 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_102.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4448b791d17cbaf4b994ab68fe8217af +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/ba76ad1900f0ca1baa08fe513c010c1e + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_103.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_103.mp3 new file mode 100644 index 00000000..41080221 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_103.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_103.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_103.mp3.meta new file mode 100644 index 00000000..3660752e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_103.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e76992af307255544b488f1c6fb4c4c4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/874057c8e7821a633d37b144105287b7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_104.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_104.mp3 new file mode 100644 index 00000000..56ad8820 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_104.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_104.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_104.mp3.meta new file mode 100644 index 00000000..9191bfca --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_104.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 042ad678d0fbfee4197c0bd9a5b36e42 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/e8114207b53eafa369d864c4ecd9574e + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_105.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_105.mp3 new file mode 100644 index 00000000..f4012c04 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_105.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_105.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_105.mp3.meta new file mode 100644 index 00000000..7419caa5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_105.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 23f0d0b80b0373749b505495bf08bc3f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/f2140d1d09b6b6d22bdaa66304c73453 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_106.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_106.mp3 new file mode 100644 index 00000000..a444254d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_106.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_106.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_106.mp3.meta new file mode 100644 index 00000000..aa142dc8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_106.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ab38da1765c53a9429287becb466a04b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/7b8d236f6e823e3b43c903614459248d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_107.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_107.mp3 new file mode 100644 index 00000000..d0316e56 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_107.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_107.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_107.mp3.meta new file mode 100644 index 00000000..32d7b10d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_107.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 77f0dc8e5733d154fb154af72395632f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/6b46e75db1685c67ba6e74d7cd68b4a5 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_108.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_108.mp3 new file mode 100644 index 00000000..09c7beff Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_108.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_108.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_108.mp3.meta new file mode 100644 index 00000000..01a87fb5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_108.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9ea3f4fbb239c2c4d84a1783599c4b72 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/88acdaf931868453e34174d0ed0e9af9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_109.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_109.mp3 new file mode 100644 index 00000000..8bab2105 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_109.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_109.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_109.mp3.meta new file mode 100644 index 00000000..eb078b55 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_109.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1546e5dba731ec7408ebd9918411b8b4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/206d637923f55280f3e78d60aa01b2dc + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_110.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_110.mp3 new file mode 100644 index 00000000..a0ed6f55 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_110.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_110.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_110.mp3.meta new file mode 100644 index 00000000..65ff5ea4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_110.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e5781e47f6dde4b4981a572b6056b8ec +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/4c6555236c5a8411b5dc0b66aad72beb + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_201.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_201.mp3 new file mode 100644 index 00000000..9f2692e2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_201.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_201.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_201.mp3.meta new file mode 100644 index 00000000..84ee5bf2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_201.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c152acab28648574ba30c3ae8c28e66a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/2a47ca392fd1c8717d0830a77e154d16 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_202.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_202.mp3 new file mode 100644 index 00000000..4846fa0e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_202.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_202.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_202.mp3.meta new file mode 100644 index 00000000..a61e99d9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_202.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6d4961c97a0327f459d7ec20166086fb +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/f88fca29b3cbe50b7b493d0d1d431565 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_203.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_203.mp3 new file mode 100644 index 00000000..c04e9ec6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_203.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_203.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_203.mp3.meta new file mode 100644 index 00000000..27e1889c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_203.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d0caad1198695be45b96a33a0d34eb02 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/98f4270551686f850c28e8c8a175193f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_204.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_204.mp3 new file mode 100644 index 00000000..3f7dc5ce Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_204.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_204.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_204.mp3.meta new file mode 100644 index 00000000..910c9615 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_204.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6abe1b7a7056b2447b0065cc9039d3af +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/6563d22f35683fdaec781a82df05f7a8 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_205.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_205.mp3 new file mode 100644 index 00000000..355bb7fd Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_205.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_205.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_205.mp3.meta new file mode 100644 index 00000000..c047cfe9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_205.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 62f59dd103dc0de4cb31136c8a85fdc1 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/89d0feb85f8a7fafbceba899f54b7042 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_206.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_206.mp3 new file mode 100644 index 00000000..ce6fb1f9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_206.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_206.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_206.mp3.meta new file mode 100644 index 00000000..ab4fcf08 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_206.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6f9123722e0aed7499df936c63874174 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/6957e610dc427eeb9d5d4102cd4abc2a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_207.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_207.mp3 new file mode 100644 index 00000000..9f1337d0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_207.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_207.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_207.mp3.meta new file mode 100644 index 00000000..da91cd59 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_207.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: cc5ebc973944e1a4ea359d4703c9bbcf +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/82882d3fc2cbcfb77a14db9c955b398b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_208.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_208.mp3 new file mode 100644 index 00000000..461ac53a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_208.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_208.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_208.mp3.meta new file mode 100644 index 00000000..e5498e6c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_208.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 964f1394b9d81ca4495e040e87652c26 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/bac08f09be3751b15790f9d7b589511d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_209.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_209.mp3 new file mode 100644 index 00000000..69a4770e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_209.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_209.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_209.mp3.meta new file mode 100644 index 00000000..08dd8eb0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_209.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 18f2ab3680acd4040beded76c0cc555a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/ef034b22f8f900b0bc35095d125c39f0 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_210.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_210.mp3 new file mode 100644 index 00000000..d68d55d8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_210.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_210.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_210.mp3.meta new file mode 100644 index 00000000..72325b33 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_210.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f2f4eb4d0d52e6740a63667903de5f31 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/81a5c93472d5f9ffbe7e9b854874f8c9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Chi.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Chi.mp3 new file mode 100644 index 00000000..9c1ba996 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Chi.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Chi.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Chi.mp3.meta new file mode 100644 index 00000000..3fb26f2b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Chi.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d49c1d7601040304592d3b8530eaff4b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/3317d4ba68db618da294c272f79873df + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_ChongDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_ChongDuo.mp3 new file mode 100644 index 00000000..e6e9e810 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_ChongDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_ChongDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_ChongDuo.mp3.meta new file mode 100644 index 00000000..76f05cce --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_ChongDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 746707f4a1bc0394198f2c90598f6eb2 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/c8815a8ad4afac3d2d7a0f9a78a372d0 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_DianPao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_DianPao.mp3 new file mode 100644 index 00000000..a4bc21d3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_DianPao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_DianPao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_DianPao.mp3.meta new file mode 100644 index 00000000..e7678af6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_DianPao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 86640d1652db67847ae1af184305f9fb +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/23859f88118bf4b9884791af2401522b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_GuoSao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_GuoSao.mp3 new file mode 100644 index 00000000..5fdd9dbc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_GuoSao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_GuoSao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_GuoSao.mp3.meta new file mode 100644 index 00000000..0246cfa9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_GuoSao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ebbe8351f7de69d41946c3672c0662a1 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/bc57aa825881916ae59f25c2167d6fee + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Hu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Hu.mp3 new file mode 100644 index 00000000..a13dae22 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Hu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Hu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Hu.mp3.meta new file mode 100644 index 00000000..bfd12adf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Hu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fb3e8a796f5767c4e9c21cb27e2143e8 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/7316a9914ccd72309f7c19092dcd272d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_KaiDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_KaiDuo.mp3 new file mode 100644 index 00000000..43ea5633 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_KaiDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_KaiDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_KaiDuo.mp3.meta new file mode 100644 index 00000000..79b7ac7c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_KaiDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c993e2c08dd1fc54bb45e2a8bdfb6698 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/6538506d2bfa01925de51762dac31045 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Peng.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Peng.mp3 new file mode 100644 index 00000000..6e09f1d9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Peng.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Peng.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Peng.mp3.meta new file mode 100644 index 00000000..ed88b99d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Peng.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2be637e083306f44b9da263ce2ea3444 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/76837a81817dbae368c0b5ae7294ef26 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Sao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Sao.mp3 new file mode 100644 index 00000000..5ae3de41 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Sao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Sao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Sao.mp3.meta new file mode 100644 index 00000000..e188d7ab --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_Sao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6a12497ee0699fc40ac78d1adc374b15 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/1a51c29b91e2a32fa3abbf92c67771d7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_SaoChuan.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_SaoChuan.mp3 new file mode 100644 index 00000000..57719320 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_SaoChuan.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_SaoChuan.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_SaoChuan.mp3.meta new file mode 100644 index 00000000..86561583 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_SaoChuan.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e97d7bedd623b204f88fd86d454e757d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/32e943f1c07fa931bb16e24c91620cb4 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_TianHu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_TianHu.mp3 new file mode 100644 index 00000000..2f647d3e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_TianHu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_TianHu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_TianHu.mp3.meta new file mode 100644 index 00000000..a91072a9 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_TianHu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 178186ed9aaa4384ea01957e9a7f6977 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/f149e5e738dfcb816ff7467566d4b815 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_ZiMo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_ZiMo.mp3 new file mode 100644 index 00000000..3d108af0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_ZiMo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_ZiMo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_ZiMo.mp3.meta new file mode 100644 index 00000000..93615a60 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/F_ZiMo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ab5a08811ef90c74a8ed0b8857aeb1f6 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/d5d6984be93596715cbc6d46aebfb650 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_1.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_1.mp3 new file mode 100644 index 00000000..08a56038 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_1.mp3.meta new file mode 100644 index 00000000..b567f725 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bedd3a067f41aa044946a7b787afd629 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/24a0b3bf9580e17a4b140cc168337785 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_2.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_2.mp3 new file mode 100644 index 00000000..672196b7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_2.mp3.meta new file mode 100644 index 00000000..bbf62354 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c35aa281d64f48e40bfcca3b264c19a7 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/33bcadb36912d9077834fb8a61e197f4 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_3.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_3.mp3 new file mode 100644 index 00000000..cf5d8d1d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_3.mp3.meta new file mode 100644 index 00000000..afad7b22 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9b257b84c1afa0448bf324d28cddba73 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/9c9e0c7eed32f586e634b327daf24cc0 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_4.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_4.mp3 new file mode 100644 index 00000000..5415995b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_4.mp3.meta new file mode 100644 index 00000000..c0443298 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ae6a459619aedca479f22674e6a8589c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/f4950655532874e32ff1cd53d2ea03c7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_5.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_5.mp3 new file mode 100644 index 00000000..00b69519 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_5.mp3.meta new file mode 100644 index 00000000..81cdcc0e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 999c0cf4a1e539f448394d828119deac +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/d7072128445279ec2dab01fffa8e703f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_6.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_6.mp3 new file mode 100644 index 00000000..5f9cabc9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_6.mp3.meta new file mode 100644 index 00000000..cf45a5fe --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b15522ca22e7c104aa10c38f10946e7d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/6855f18d5a744a292ff2a232b346982b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_7.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_7.mp3 new file mode 100644 index 00000000..e54c8f71 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_7.mp3.meta new file mode 100644 index 00000000..82424273 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 377da954449c3334a958eeaa1d6739ea +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/21d59268f2533c54bb69a0f90138f700 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_8.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_8.mp3 new file mode 100644 index 00000000..450437f2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_8.mp3.meta new file mode 100644 index 00000000..6d56bf7d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d83dea52be2f1a44e8b20bf40fce774f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/a20b92abedb5604fa2340ac2b5404f37 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_9.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_9.mp3 new file mode 100644 index 00000000..f9cb387b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_9.mp3.meta new file mode 100644 index 00000000..f1e79998 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/man/chat_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a3f18515aae8855418e5559de94d8cb7 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/892493666189279e13e64b4c0a584a0a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman.meta new file mode 100644 index 00000000..5a5f182a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 14f2eeafd7f382f4a94deb7630daa01f +folderAsset: yes +timeCreated: 1514857692 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_101.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_101.mp3 new file mode 100644 index 00000000..0e5ca8ce Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_101.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_101.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_101.mp3.meta new file mode 100644 index 00000000..57f065dc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_101.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6d507c07ef3d2f743a740a491e1a9f29 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/041aa1765733a51c35fdc427aa860184 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_102.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_102.mp3 new file mode 100644 index 00000000..82100a53 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_102.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_102.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_102.mp3.meta new file mode 100644 index 00000000..834303e3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_102.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 36ec0a78e5a3bcf4c91b22c7d4cde6de +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/eac14462abc55559fe3ed1dc01d48ede + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_103.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_103.mp3 new file mode 100644 index 00000000..0a9bc3d9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_103.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_103.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_103.mp3.meta new file mode 100644 index 00000000..0f7454cc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_103.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 63fb3d484c2a01d49834638174993c42 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/165db78f8952d7ca6c83a10375cb57ce + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_104.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_104.mp3 new file mode 100644 index 00000000..1e2fcca2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_104.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_104.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_104.mp3.meta new file mode 100644 index 00000000..99ed7662 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_104.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 17ccae65437c84f4fb82df8732392364 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/ec5b068802104397a8e6dd398c65fce9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_105.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_105.mp3 new file mode 100644 index 00000000..3273ed62 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_105.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_105.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_105.mp3.meta new file mode 100644 index 00000000..d0f44bd2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_105.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e98c7300b44660145900c4056045b736 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/7a3a59a084465ea80d7d89cd0b7e04f3 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_106.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_106.mp3 new file mode 100644 index 00000000..f85916f2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_106.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_106.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_106.mp3.meta new file mode 100644 index 00000000..65e0766a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_106.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d645344c873d49b41bccab8fa80dbf97 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/8f4f53195d55b9c5883020d0128c416c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_107.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_107.mp3 new file mode 100644 index 00000000..b281ae26 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_107.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_107.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_107.mp3.meta new file mode 100644 index 00000000..ba980ae6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_107.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ce70c12b74c1e214b99d20e90c5bc37d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/59c4158d57a90920c91418b4122eb610 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_108.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_108.mp3 new file mode 100644 index 00000000..5a299c31 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_108.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_108.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_108.mp3.meta new file mode 100644 index 00000000..59a15aca --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_108.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c1f784d5727c1df4caa20460475eb26c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/42a50a425de599c37352000b88fa2f74 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_109.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_109.mp3 new file mode 100644 index 00000000..8163fd83 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_109.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_109.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_109.mp3.meta new file mode 100644 index 00000000..46c0da8f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_109.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8eca6eb1d894ea54191da3e95f8a457a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/0c3303d122d0b24ba9b1ae805656cea5 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_110.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_110.mp3 new file mode 100644 index 00000000..7a68881b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_110.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_110.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_110.mp3.meta new file mode 100644 index 00000000..5c3e0a09 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_110.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 55c85a26d53757748ba604db264c7264 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/e52b77d075e579510a45977b719bfa5b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_201.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_201.mp3 new file mode 100644 index 00000000..f87b59f4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_201.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_201.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_201.mp3.meta new file mode 100644 index 00000000..47a89ce6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_201.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 432c1d4ec1dd0de4ab5752421524b2c2 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/06779a8ad357ec29f63fcf244d7fd8dc + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_202.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_202.mp3 new file mode 100644 index 00000000..e95870ec Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_202.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_202.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_202.mp3.meta new file mode 100644 index 00000000..19123041 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_202.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 09198e39e640a9a4dbbec2baca3bcb1c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/9d3c9bbc581b95919f9e63f89dd77522 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_203.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_203.mp3 new file mode 100644 index 00000000..c74f48b6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_203.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_203.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_203.mp3.meta new file mode 100644 index 00000000..b8317d6f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_203.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3b3d3b7c4999c4649b88ba7847795fa9 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/e2f11ad0fa3188c36458cf7d83669008 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_204.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_204.mp3 new file mode 100644 index 00000000..32976e30 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_204.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_204.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_204.mp3.meta new file mode 100644 index 00000000..c8e55eaf --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_204.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fa8cdd3304893d442861d654e993c1f5 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/11fdee5cea8433b9cce0aeda631fadb1 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_205.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_205.mp3 new file mode 100644 index 00000000..85e7da1b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_205.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_205.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_205.mp3.meta new file mode 100644 index 00000000..96dc8a39 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_205.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 167cd81e7d702924596989a37b4e7761 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/096c68a53599c4450bb2e3922aaabea0 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_206.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_206.mp3 new file mode 100644 index 00000000..90a218ee Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_206.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_206.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_206.mp3.meta new file mode 100644 index 00000000..82442aa4 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_206.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 648aef39120353d498a5a589943d0cef +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/09a250b9246b3f4d7e2f8e5096b56ef9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_207.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_207.mp3 new file mode 100644 index 00000000..b38439c1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_207.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_207.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_207.mp3.meta new file mode 100644 index 00000000..7d3683fa --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_207.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8ec7cba043f4b034ca8dc79b0216970e +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/8a03d50be7c21ee7478b5f7e70939347 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_208.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_208.mp3 new file mode 100644 index 00000000..422b95df Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_208.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_208.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_208.mp3.meta new file mode 100644 index 00000000..58789b9a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_208.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5cbf52cea45d4dc40b2887b961e1c3f1 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/d26857808547509d9523b7273c48c37c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_209.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_209.mp3 new file mode 100644 index 00000000..faf0b858 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_209.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_209.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_209.mp3.meta new file mode 100644 index 00000000..2e3a67b2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_209.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7c9d09b855664434b9dc989b8b89b7f1 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/a844570f7099617c106b0fb6c9c35371 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_210.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_210.mp3 new file mode 100644 index 00000000..ebec4b91 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_210.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_210.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_210.mp3.meta new file mode 100644 index 00000000..7b689a53 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_210.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b5ddcc0c14ab29040a78b02861330b02 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/44ecd51693100aa77f2e8509705637e0 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Chi.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Chi.mp3 new file mode 100644 index 00000000..1546bd66 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Chi.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Chi.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Chi.mp3.meta new file mode 100644 index 00000000..f2db28e6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Chi.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5a27b42ab3a063a48a006c7040944abd +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/cb13856cf79c01648d342ea177c47a76 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_ChongDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_ChongDuo.mp3 new file mode 100644 index 00000000..b50961fa Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_ChongDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_ChongDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_ChongDuo.mp3.meta new file mode 100644 index 00000000..db4138c8 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_ChongDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2a8f6ec3395bf9f46ac32b83df0c9b5f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/164309d32c957404e3490a0520b5fc24 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_DianPao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_DianPao.mp3 new file mode 100644 index 00000000..f1e367f8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_DianPao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_DianPao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_DianPao.mp3.meta new file mode 100644 index 00000000..1f7da15e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_DianPao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: cc3af850119071b4bafe89d19ca5e042 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/7fc92e755be2ef1dbaee849d73d9e766 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_GuoSao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_GuoSao.mp3 new file mode 100644 index 00000000..e910ff9b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_GuoSao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_GuoSao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_GuoSao.mp3.meta new file mode 100644 index 00000000..e70693c7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_GuoSao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: dc45f43a6d693fc41a1d8f1aaf91a8d7 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/199f9c8dc8517b3eef13c0f0eaf2b5de + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Hu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Hu.mp3 new file mode 100644 index 00000000..888b6d75 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Hu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Hu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Hu.mp3.meta new file mode 100644 index 00000000..35d03450 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Hu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8826f194814c1a3438cd0d5b7e10ba3e +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/a9b5f808c86419f830274086358efee9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_KaiDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_KaiDuo.mp3 new file mode 100644 index 00000000..8acf933e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_KaiDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_KaiDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_KaiDuo.mp3.meta new file mode 100644 index 00000000..c06b5edc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_KaiDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 34598d213e030f04c89f97af95505aee +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/a5a3cc134285d00d15e0a6662aba75d1 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Peng.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Peng.mp3 new file mode 100644 index 00000000..b283a601 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Peng.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Peng.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Peng.mp3.meta new file mode 100644 index 00000000..c78966ae --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Peng.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5c6acdbe807982742994f2295ecfeff4 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/7747f3d893e1d91e7e6fa1d4d8927bf2 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Sao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Sao.mp3 new file mode 100644 index 00000000..50020653 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Sao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Sao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Sao.mp3.meta new file mode 100644 index 00000000..10470e18 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_Sao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: eae86305ab0ddac498e34d322ffdb067 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/03d8829090308c7b03b4ab080e34b61f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_SaoChuan.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_SaoChuan.mp3 new file mode 100644 index 00000000..823a80a0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_SaoChuan.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_SaoChuan.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_SaoChuan.mp3.meta new file mode 100644 index 00000000..94e3360f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_SaoChuan.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7665297a35365bb448414d58579e00d1 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/75f703ef3bd758db89a53008967c8bdf + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_TianHu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_TianHu.mp3 new file mode 100644 index 00000000..4cc0936b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_TianHu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_TianHu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_TianHu.mp3.meta new file mode 100644 index 00000000..3a15358b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_TianHu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8c6e38823a1d7564598a562c3329228a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/4d77cef3311ea09909560ff8bc017b7b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_ZiMo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_ZiMo.mp3 new file mode 100644 index 00000000..1bf3c478 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_ZiMo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_ZiMo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_ZiMo.mp3.meta new file mode 100644 index 00000000..1939c4fc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/F_ZiMo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e9d856aee963165498f4ba4bfc1ece55 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/9476ade9ab3585f7b3b40408bbf5b00a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_1.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_1.mp3 new file mode 100644 index 00000000..40142fee Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_1.mp3.meta new file mode 100644 index 00000000..cd2e959c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 29b2e6963534acf439a755c72a6ff05c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/9dc41fe6a517bc7db705fc8d9b3ebbd4 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_2.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_2.mp3 new file mode 100644 index 00000000..ab428517 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_2.mp3.meta new file mode 100644 index 00000000..8b375102 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8cb4f40dba29cf44db29b81957c443c9 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/08582e22768067faa19fa0d7d39129a4 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_3.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_3.mp3 new file mode 100644 index 00000000..06b1ba11 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_3.mp3.meta new file mode 100644 index 00000000..35784a19 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: da1f63eea2fd3c042a1c483dfc413225 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/726e1ca49c4921361179fc70b96a26d0 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_4.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_4.mp3 new file mode 100644 index 00000000..5c55d575 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_4.mp3.meta new file mode 100644 index 00000000..e2595613 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bab4d2112238e36459dd3ac161b7fcf8 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/82e336b7b1af84412bbf8f551e5e12b2 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_5.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_5.mp3 new file mode 100644 index 00000000..1dc0d3ec Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_5.mp3.meta new file mode 100644 index 00000000..7151bbb3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5e13c9d2380eb2e41909f6b7d284c782 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/62f8395defa1a03c765f612d8ce6718f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_6.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_6.mp3 new file mode 100644 index 00000000..1fa5851b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_6.mp3.meta new file mode 100644 index 00000000..eb1fe952 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: bf896f52ccdfccd4da19f125ed3655e7 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/0d5fc186d4d6b4242861dc989157d006 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_7.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_7.mp3 new file mode 100644 index 00000000..038e62cc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_7.mp3.meta new file mode 100644 index 00000000..9626d4ee --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 40fdcd1ac451d97438d9e0734fdc79f2 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/ffa197536fec2bd17ad3656f3e4a99d3 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_8.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_8.mp3 new file mode 100644 index 00000000..a9076f13 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_8.mp3.meta new file mode 100644 index 00000000..8354f4dc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 9ed2f945ccf83e449a097d0eee22b6cc +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/9d509c39b50b0403c0700ca1e354bc57 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_9.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_9.mp3 new file mode 100644 index 00000000..1867a5a8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_9.mp3.meta new file mode 100644 index 00000000..b87847b3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/sound/woman/chat_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d98c96c1e6a621a409e8871672ea4449 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/runbeard/44facc020341d95e9d3c21e5b9241217 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/ui.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/ui.meta new file mode 100644 index 00000000..db41312c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d530d6de125e9bf47a419b5a4d59e974 +folderAsset: yes +timeCreated: 1513755555 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/ui/Extend_Poker_RunBeard_fui.bytes b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/ui/Extend_Poker_RunBeard_fui.bytes new file mode 100644 index 00000000..f105cda4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/ui/Extend_Poker_RunBeard_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/ui/Extend_Poker_RunBeard_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/ui/Extend_Poker_RunBeard_fui.bytes.meta new file mode 100644 index 00000000..b8cf1a59 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/ui/Extend_Poker_RunBeard_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2774295149d4cba4fb4a181813aeeb31 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/zipai/runbeard/f27274742b1791358228dc7d9406ef27 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/ui/Info_Poker_RunBeard_fui.bytes b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/ui/Info_Poker_RunBeard_fui.bytes new file mode 100644 index 00000000..94954096 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/ui/Info_Poker_RunBeard_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/runbeard/ui/Info_Poker_RunBeard_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/ui/Info_Poker_RunBeard_fui.bytes.meta new file mode 100644 index 00000000..f881769d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/runbeard/ui/Info_Poker_RunBeard_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 618fac6817cf11f49977523e09641382 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/zipai/runbeard/6cbc8061332df8e76457e46812811f66 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi.meta new file mode 100644 index 00000000..ae1d5a27 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4bb40b829c6fe634cacf5b32e47aad2d +folderAsset: yes +timeCreated: 1587569081 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound.meta new file mode 100644 index 00000000..54c20fb7 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 75cbfca9ed7efad478c812aaeac38087 +folderAsset: yes +timeCreated: 1587569596 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/BGSOUND.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/BGSOUND.mp3 new file mode 100644 index 00000000..72fa969f Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/BGSOUND.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/BGSOUND.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/BGSOUND.mp3.meta new file mode 100644 index 00000000..d0aece20 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/BGSOUND.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a50be69dbf5b9a44cb1db62a0f26a884 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 1 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/36807fca1b5d2023cb98056ea1e8c50c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/bg.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/bg.mp3 new file mode 100644 index 00000000..a9a3d863 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/bg.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/bg.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/bg.mp3.meta new file mode 100644 index 00000000..24963178 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/bg.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: cb2ec7462904165448eb23dcca3f0979 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/7d137acece02b64de0fc91df242f1983 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man.meta new file mode 100644 index 00000000..f339e4c1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d0d878837c1d8e6429c5e28c18e69204 +folderAsset: yes +timeCreated: 1638254348 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_101.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_101.mp3 new file mode 100644 index 00000000..2d721a95 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_101.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_101.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_101.mp3.meta new file mode 100644 index 00000000..4483a08b --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_101.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 156e7790b8a2e494faaf264096fde791 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/763ba07f6c66d41e15696cd23095a973 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_102.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_102.mp3 new file mode 100644 index 00000000..84c61d42 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_102.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_102.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_102.mp3.meta new file mode 100644 index 00000000..6177ee88 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_102.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 932ab7fea8cf1d7408c5abd1a35c212d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/f79556b3ee50ea92e1e6596a1bc0af06 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_103.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_103.mp3 new file mode 100644 index 00000000..fb0b8ebc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_103.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_103.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_103.mp3.meta new file mode 100644 index 00000000..ef81b3b2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_103.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a3d30ae286579f846aed97a01666557b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/6a6b247f41c40e412174b9b35dac3701 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_104.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_104.mp3 new file mode 100644 index 00000000..9d2f1f7c Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_104.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_104.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_104.mp3.meta new file mode 100644 index 00000000..196e2f12 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_104.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 48f8e11439bef4c4680115dd0f783f38 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/1405fc40784eaadafc0e21b9ab31e447 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_105.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_105.mp3 new file mode 100644 index 00000000..0dab53c5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_105.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_105.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_105.mp3.meta new file mode 100644 index 00000000..91687503 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_105.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 3f105fca9d8fe4b4b99a53f765464a94 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/389816644d6c564ebe195e02bf545d78 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_106.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_106.mp3 new file mode 100644 index 00000000..5b456ae4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_106.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_106.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_106.mp3.meta new file mode 100644 index 00000000..68eb0118 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_106.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 02d73303571c6074aa4bbb6ad001a55c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/883c30f74d40fc4aa59984ec899a20af + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_107.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_107.mp3 new file mode 100644 index 00000000..fa93f397 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_107.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_107.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_107.mp3.meta new file mode 100644 index 00000000..53093053 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_107.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a806187287d0f504cbec6b48b0d878b2 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/3278bcf43f3dcfa250d51650d550e520 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_108.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_108.mp3 new file mode 100644 index 00000000..62c8d87a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_108.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_108.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_108.mp3.meta new file mode 100644 index 00000000..6de82d64 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_108.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 34c35ff1f44c69243b2819d0190bf9df +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/b3074fc30ecea5c25b1eea49dc0fe109 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_109.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_109.mp3 new file mode 100644 index 00000000..0ef72105 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_109.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_109.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_109.mp3.meta new file mode 100644 index 00000000..f617638a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_109.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: da255e36ecf94c54d9d6a981b9b9ba0f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/63a67512e2b65af1bd86019a474c4d1b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_110.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_110.mp3 new file mode 100644 index 00000000..ec3a9d6e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_110.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_110.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_110.mp3.meta new file mode 100644 index 00000000..b2429779 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_110.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d1ae1821aa607c94d8396e69453f2847 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/f274c33d92dd831349cbb7b55b24c7fa + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_201.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_201.mp3 new file mode 100644 index 00000000..b18d1bc8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_201.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_201.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_201.mp3.meta new file mode 100644 index 00000000..e0705b2e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_201.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 626bab3e88b215345be261d1c33e253b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/1e39698481d6f5dd800b6b78797ff56f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_202.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_202.mp3 new file mode 100644 index 00000000..bd3dd8fc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_202.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_202.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_202.mp3.meta new file mode 100644 index 00000000..7fcc2fbb --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_202.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: da1ab8f0b5e8fbe408fec650f8848f67 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/7ebfdc653500771065837dd2b6b6b0a6 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_203.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_203.mp3 new file mode 100644 index 00000000..23252075 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_203.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_203.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_203.mp3.meta new file mode 100644 index 00000000..0070a330 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_203.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 420ca89e15f85b645bf059451f0bbf45 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/d82cb04660e41a9bd60afd320e1d7683 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_204.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_204.mp3 new file mode 100644 index 00000000..40529b05 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_204.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_204.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_204.mp3.meta new file mode 100644 index 00000000..01a40727 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_204.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: dcdc5aaf485794e4483440f4c3e15dbe +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/1f5cff9d924868b490806c577aea07bb + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_205.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_205.mp3 new file mode 100644 index 00000000..5736d3ea Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_205.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_205.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_205.mp3.meta new file mode 100644 index 00000000..fc95e697 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_205.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e14ca6814f5512446ae43a494b8b7a60 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/39bc98327d26c8d3397c0df3d517c503 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_206.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_206.mp3 new file mode 100644 index 00000000..6c0f75d0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_206.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_206.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_206.mp3.meta new file mode 100644 index 00000000..19b56cf0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_206.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a535f958c39b6fc4caf16e60b97abc7d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/bd465fd7a0b5a2d09ed20c5e02711a51 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_207.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_207.mp3 new file mode 100644 index 00000000..681ff761 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_207.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_207.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_207.mp3.meta new file mode 100644 index 00000000..5c38b126 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_207.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a7c80387a54f4df4ca5a206ed9e4c686 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/c13e53b976651ba21a03087172e56c1f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_208.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_208.mp3 new file mode 100644 index 00000000..dadba2eb Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_208.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_208.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_208.mp3.meta new file mode 100644 index 00000000..d6674d5e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_208.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a8b1f65ca4fc7e24aad1c51cd7d1cb40 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/394cd8a9c96265bc4533f1ba2208d176 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_209.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_209.mp3 new file mode 100644 index 00000000..535b55f5 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_209.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_209.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_209.mp3.meta new file mode 100644 index 00000000..2896ac00 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_209.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8df325df4190b074f9d44c31816b48ed +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/927774c19f5a633b34e7d531db7a30eb + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_210.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_210.mp3 new file mode 100644 index 00000000..193c3f96 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_210.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_210.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_210.mp3.meta new file mode 100644 index 00000000..ca41937d --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_210.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f378750de208c494b9d984ddf6480bb0 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/e3062ea43f5db6339140b137be4c5957 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Chi.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Chi.mp3 new file mode 100644 index 00000000..ae1c8ad0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Chi.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Chi.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Chi.mp3.meta new file mode 100644 index 00000000..5fdab534 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Chi.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 64789022dd5628e4fb94fc3f7b42c715 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/f89ca7cf159fca51b0899f6a5039348b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_ChongDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_ChongDuo.mp3 new file mode 100644 index 00000000..e6e9e810 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_ChongDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_ChongDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_ChongDuo.mp3.meta new file mode 100644 index 00000000..964c628a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_ChongDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: cdc4b30f66c826249be2309dc30dedd5 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/1ff5bf32b689563c6db10f8e26517701 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_DianPao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_DianPao.mp3 new file mode 100644 index 00000000..a4bc21d3 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_DianPao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_DianPao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_DianPao.mp3.meta new file mode 100644 index 00000000..6eee0bab --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_DianPao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 831b92e0fd8af064fb56e6d9739004b9 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/79511f9408533e6d474fd5acfdcc74aa + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_GuoSao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_GuoSao.mp3 new file mode 100644 index 00000000..5fdd9dbc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_GuoSao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_GuoSao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_GuoSao.mp3.meta new file mode 100644 index 00000000..95ea5df5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_GuoSao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1ca6e228e54c64742b734f52c49500fc +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/65f0a1a7801fd7d6f0f59a74405e942a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Hu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Hu.mp3 new file mode 100644 index 00000000..6a0f1386 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Hu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Hu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Hu.mp3.meta new file mode 100644 index 00000000..c1020a81 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Hu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7fec7d84be1043c49810d0180d070a36 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/040dddc715172c395d0a7fa2a15fb2d6 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_KaiDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_KaiDuo.mp3 new file mode 100644 index 00000000..e97abd27 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_KaiDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_KaiDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_KaiDuo.mp3.meta new file mode 100644 index 00000000..ba03e825 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_KaiDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 079f15d426855b041bc834292a12872b +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/8862081ed17d47c0d3a8fce4b011bf8c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Peng.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Peng.mp3 new file mode 100644 index 00000000..7c6c7e77 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Peng.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Peng.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Peng.mp3.meta new file mode 100644 index 00000000..3174166c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Peng.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 15cff008da737b1489dad70f88a53f6c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/9e7f8db946cae5dd4b351658a8d38e97 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Sao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Sao.mp3 new file mode 100644 index 00000000..5ae3de41 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Sao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Sao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Sao.mp3.meta new file mode 100644 index 00000000..8c662692 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Sao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e38289e6007aa2f4d97f132929832f43 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/d45ce2f1e744838734baae30b363c9c3 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_SaoChuan.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_SaoChuan.mp3 new file mode 100644 index 00000000..8c114353 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_SaoChuan.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_SaoChuan.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_SaoChuan.mp3.meta new file mode 100644 index 00000000..c896674a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_SaoChuan.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d9010edec07cfb945a7e20c611c0f240 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/c7b28096c6494966c78abbc12eb212fb + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_TianHu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_TianHu.mp3 new file mode 100644 index 00000000..2f647d3e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_TianHu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_TianHu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_TianHu.mp3.meta new file mode 100644 index 00000000..d61b0f70 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_TianHu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f2cc677f199c5b142911512299580923 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/e4b6e9b275c6a3137c33f8807e168e5a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Wai.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Wai.mp3 new file mode 100644 index 00000000..6e006ffe Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Wai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Wai.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Wai.mp3.meta new file mode 100644 index 00000000..b6e202f3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_Wai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e6385e454d099e24d981fd2ceb52971a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/3694e26c644bb2fd53f0ade74c137f0c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_ZiMo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_ZiMo.mp3 new file mode 100644 index 00000000..3d108af0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_ZiMo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_ZiMo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_ZiMo.mp3.meta new file mode 100644 index 00000000..8d310bc6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/F_ZiMo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0921c8104008ff54a83399bb00325bfc +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/6aa56159588f8b7ff438f3b82bf2df97 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_1.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_1.mp3 new file mode 100644 index 00000000..08a56038 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_1.mp3.meta new file mode 100644 index 00000000..51bfaebd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 36e7981c807f69a448cd8907252fc6c5 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/d2f643f6296673c783d85ec9cb5c8a4f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_2.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_2.mp3 new file mode 100644 index 00000000..672196b7 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_2.mp3.meta new file mode 100644 index 00000000..3461bf1e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4d0679a25a4c2e8459198e2921de21fd +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/96d12fe37c7dbdb8821b8bf5b69eee2b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_3.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_3.mp3 new file mode 100644 index 00000000..cf5d8d1d Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_3.mp3.meta new file mode 100644 index 00000000..609d4fe2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 03445d1ce09431b418723d377251c007 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/5a805c991a1a19f540154765731b8a70 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_4.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_4.mp3 new file mode 100644 index 00000000..5415995b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_4.mp3.meta new file mode 100644 index 00000000..a9f9be07 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 72b6961d60f8aff4980fcb62cd5e2d83 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/af15557be9c8a031bcedfd2d582f354c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_5.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_5.mp3 new file mode 100644 index 00000000..00b69519 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_5.mp3.meta new file mode 100644 index 00000000..23334097 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f235f8ee52539f343b1d1153a2ea8287 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/36163e990d2f9a8f4ab3af33ea332f70 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_6.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_6.mp3 new file mode 100644 index 00000000..5f9cabc9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_6.mp3.meta new file mode 100644 index 00000000..88a9426e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 613cb8b55f302e943b993b553b18465a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/90bdf86baf9f8d2e8116acb59915b5e7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_7.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_7.mp3 new file mode 100644 index 00000000..e54c8f71 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_7.mp3.meta new file mode 100644 index 00000000..23efc7fe --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f9cb900b44af8f24dbb128bea0188a92 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/db7af671d755f69bb9584b7f3ec164db + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_8.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_8.mp3 new file mode 100644 index 00000000..450437f2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_8.mp3.meta new file mode 100644 index 00000000..165924cd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5fb9f73231793404aab709a52e85f90f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/78bb141f2cb9b6f8af079a1f344af438 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_9.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_9.mp3 new file mode 100644 index 00000000..f9cb387b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_9.mp3.meta new file mode 100644 index 00000000..80469a20 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/man/chat_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 01e961159c0f7d347b5dcfc90debd63d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/e9d060dd0592044051dcf228ae9c600a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman.meta new file mode 100644 index 00000000..e0cf6d5f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 37ba885f9b4a25d459df3314e4bea7f6 +folderAsset: yes +timeCreated: 1514857692 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_101.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_101.mp3 new file mode 100644 index 00000000..0e5ca8ce Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_101.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_101.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_101.mp3.meta new file mode 100644 index 00000000..b1947f2f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_101.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c0e000ad84598e54d82f3e2272e09641 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/a948aaee215fd175a63ffb6bdd97a1ee + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_102.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_102.mp3 new file mode 100644 index 00000000..82100a53 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_102.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_102.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_102.mp3.meta new file mode 100644 index 00000000..09958dc3 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_102.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 05ff5c35a8a14784dbc677290b0ef53d +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/7aaa2b20b05b4d107f1a04eddc483aac + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_103.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_103.mp3 new file mode 100644 index 00000000..0a9bc3d9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_103.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_103.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_103.mp3.meta new file mode 100644 index 00000000..9d8d42c2 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_103.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1376a644b91c12144b945dc47639c519 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/69d46b316f88194a5e9c093a37e81f47 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_104.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_104.mp3 new file mode 100644 index 00000000..1e2fcca2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_104.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_104.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_104.mp3.meta new file mode 100644 index 00000000..c4777191 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_104.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 1afe23ad9a72a9b408180cee00bce893 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/18a251a7d181f06e8927d3631b4e53d9 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_105.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_105.mp3 new file mode 100644 index 00000000..3273ed62 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_105.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_105.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_105.mp3.meta new file mode 100644 index 00000000..2ba68b72 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_105.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: debbd06271f472f41bca607b1d5c642f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/cf3bf49f536ab4ff4450fb670e64bc29 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_106.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_106.mp3 new file mode 100644 index 00000000..f85916f2 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_106.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_106.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_106.mp3.meta new file mode 100644 index 00000000..27c4fe4a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_106.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f59d28f2a28a54341baec6b4cfa4c1cb +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/2def621d1c7e5a80c1dd045baac4d655 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_107.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_107.mp3 new file mode 100644 index 00000000..b281ae26 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_107.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_107.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_107.mp3.meta new file mode 100644 index 00000000..fe2e7d82 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_107.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 29ef9d176e40ce74ab8fc24ad61bf69f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/35421835f359787d205d41dcefde028d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_108.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_108.mp3 new file mode 100644 index 00000000..5a299c31 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_108.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_108.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_108.mp3.meta new file mode 100644 index 00000000..0d4fae91 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_108.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8c1fcf985e0258844aa27306bb9c70cb +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/343227336eaf9d2a6b4dc183e4ffc7db + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_109.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_109.mp3 new file mode 100644 index 00000000..8163fd83 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_109.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_109.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_109.mp3.meta new file mode 100644 index 00000000..770b629f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_109.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a7760b26c9bedcb4da458863a3ff439a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/e8f450dcf96899b64c44d9e5ef6955f3 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_110.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_110.mp3 new file mode 100644 index 00000000..7a68881b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_110.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_110.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_110.mp3.meta new file mode 100644 index 00000000..09160e03 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_110.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 09d2cd371974d904c91bed18e48ffcb5 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/7f7e0a5187c650e432babd64682587e2 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_201.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_201.mp3 new file mode 100644 index 00000000..f87b59f4 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_201.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_201.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_201.mp3.meta new file mode 100644 index 00000000..51c9457c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_201.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b1de4ac49f36a18458e6d3dcfb331468 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/cee0cbc335af0b5cfa5016435363ca2e + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_202.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_202.mp3 new file mode 100644 index 00000000..e95870ec Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_202.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_202.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_202.mp3.meta new file mode 100644 index 00000000..a8db7d64 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_202.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ecd58b8a6d667874b87c61cbd6d11fc9 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/2b2142a4a96ccf73e5a9e972d02aa669 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_203.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_203.mp3 new file mode 100644 index 00000000..c74f48b6 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_203.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_203.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_203.mp3.meta new file mode 100644 index 00000000..f4212614 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_203.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b0bab11a49764dc48b7768767575e710 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/52e6aaa37ce57065cf72faf74e817a9e + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_204.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_204.mp3 new file mode 100644 index 00000000..32976e30 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_204.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_204.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_204.mp3.meta new file mode 100644 index 00000000..e7f39384 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_204.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 27384207de384b340acf192cd4ce9115 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/8352e269ecd0ea73618376c6d45d070f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_205.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_205.mp3 new file mode 100644 index 00000000..85e7da1b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_205.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_205.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_205.mp3.meta new file mode 100644 index 00000000..07b9506e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_205.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7672aec3dd85dbb43b75febca4dd7a23 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/35fad625895702f9e334fd86981da0e2 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_206.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_206.mp3 new file mode 100644 index 00000000..90a218ee Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_206.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_206.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_206.mp3.meta new file mode 100644 index 00000000..217d4469 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_206.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4b68a941e947ba24abc18716d4e23602 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/3a72ebbdecbccb2518c6817f1a9188c7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_207.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_207.mp3 new file mode 100644 index 00000000..b38439c1 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_207.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_207.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_207.mp3.meta new file mode 100644 index 00000000..688bde0c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_207.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 223c9e2dcc8d13941bfaf084c711af25 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/e0d2d227d9565bde5df7c74aa30f38c0 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_208.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_208.mp3 new file mode 100644 index 00000000..422b95df Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_208.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_208.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_208.mp3.meta new file mode 100644 index 00000000..b597cc07 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_208.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0ad00301828e2b04985e7fb634e4ab0e +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/ae32742aa394975b26a573022253457d + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_209.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_209.mp3 new file mode 100644 index 00000000..faf0b858 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_209.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_209.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_209.mp3.meta new file mode 100644 index 00000000..6165bc3a --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_209.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 6dfc2e54c977b4c4db5763af5bd1aab0 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/3f2a0fc725c86d4775008bb39be3430f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_210.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_210.mp3 new file mode 100644 index 00000000..ebec4b91 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_210.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_210.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_210.mp3.meta new file mode 100644 index 00000000..91448376 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_210.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 91c8e24175d66534080c4782dffb0c9f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/4b357268506ce38a52f003a949912465 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Chi.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Chi.mp3 new file mode 100644 index 00000000..1546bd66 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Chi.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Chi.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Chi.mp3.meta new file mode 100644 index 00000000..ed9298dd --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Chi.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a21639e32426db740b62a055614b0553 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/ebe5add53d28ebd7e83e78c5a912cf53 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_ChongDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_ChongDuo.mp3 new file mode 100644 index 00000000..b50961fa Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_ChongDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_ChongDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_ChongDuo.mp3.meta new file mode 100644 index 00000000..af3fcb99 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_ChongDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: a89b435ff930aab4684eb7870de4eb21 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/22044f0c9bd7d3521c9b24d371f7348a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_DianPao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_DianPao.mp3 new file mode 100644 index 00000000..f1e367f8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_DianPao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_DianPao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_DianPao.mp3.meta new file mode 100644 index 00000000..7a86ca98 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_DianPao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5dc17d23c9284ee4184112284b4ca504 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/d1281b3ac7cb941dd75640211e95d9e4 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_GuoSao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_GuoSao.mp3 new file mode 100644 index 00000000..e910ff9b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_GuoSao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_GuoSao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_GuoSao.mp3.meta new file mode 100644 index 00000000..546f3ebc --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_GuoSao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 5353bb16f0ac9984fa597c25caa32993 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/ec0e4950958df75cbe3667d42c305b41 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Hu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Hu.mp3 new file mode 100644 index 00000000..888b6d75 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Hu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Hu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Hu.mp3.meta new file mode 100644 index 00000000..b703d39f --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Hu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0ec680a3afa8ffb4586bacb033a3a3e2 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/98f7e77bf821393dde674e5380a9ab44 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_KaiDuo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_KaiDuo.mp3 new file mode 100644 index 00000000..8acf933e Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_KaiDuo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_KaiDuo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_KaiDuo.mp3.meta new file mode 100644 index 00000000..7fb12b2e --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_KaiDuo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d7b25e3e6a2b0f94e9f2ba2c35d51d4a +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/608f78dde43382e0984415f626a653cb + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Peng.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Peng.mp3 new file mode 100644 index 00000000..b283a601 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Peng.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Peng.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Peng.mp3.meta new file mode 100644 index 00000000..c5e5c1f5 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Peng.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 2d05f7cb4f46782458a1c4b30925c46c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/53e8a773979be4c72f6078c5807378e7 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Sao.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Sao.mp3 new file mode 100644 index 00000000..50020653 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Sao.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Sao.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Sao.mp3.meta new file mode 100644 index 00000000..219060f1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Sao.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: e0e015ef020c4d94187369e3cf2c1880 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/d56aba135d855efa76cd9c6995fb518a + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_SaoChuan.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_SaoChuan.mp3 new file mode 100644 index 00000000..823a80a0 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_SaoChuan.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_SaoChuan.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_SaoChuan.mp3.meta new file mode 100644 index 00000000..689d9bc6 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_SaoChuan.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 74741d22fe428214eb4d00b1c1883ea9 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/0ea8fddf1aed1656bbfe7462b568468f + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_TianHu.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_TianHu.mp3 new file mode 100644 index 00000000..4cc0936b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_TianHu.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_TianHu.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_TianHu.mp3.meta new file mode 100644 index 00000000..8c92a179 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_TianHu.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: ab9357e505839cb41b256e78d813be24 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/2c68b99f593a9c05a69915c9cf7f47ac + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Wai.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Wai.mp3 new file mode 100644 index 00000000..6e006ffe Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Wai.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Wai.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Wai.mp3.meta new file mode 100644 index 00000000..9f2af618 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_Wai.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d5efb0e8c0965f243b565680b55edc5c +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/5f5704819d74dd57d6c0ff0e4cdd8e34 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_ZiMo.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_ZiMo.mp3 new file mode 100644 index 00000000..1bf3c478 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_ZiMo.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_ZiMo.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_ZiMo.mp3.meta new file mode 100644 index 00000000..834ca781 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/F_ZiMo.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: b12f8fde03292854fb9f3a6820bf2de1 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/26d00085ddbb10d1f6be97b828a8ab0c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_1.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_1.mp3 new file mode 100644 index 00000000..40142fee Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_1.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_1.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_1.mp3.meta new file mode 100644 index 00000000..80b337d1 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_1.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7af50a05ed4f8c740b161d3b97ccf375 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/c23429399b3b05fdb96b0d4b8ccbac72 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_2.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_2.mp3 new file mode 100644 index 00000000..ab428517 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_2.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_2.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_2.mp3.meta new file mode 100644 index 00000000..8c42be44 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_2.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 98e4411486b3ac341816aaa02c09b223 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/8baa5066fe1d425fb1bf6d2e9796976c + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_3.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_3.mp3 new file mode 100644 index 00000000..06b1ba11 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_3.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_3.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_3.mp3.meta new file mode 100644 index 00000000..9c695ce0 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_3.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 93a8e0e4f950cd44da2b63a5ac0be472 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/767b53831416c33dc548d0fd242fb9af + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_4.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_4.mp3 new file mode 100644 index 00000000..5c55d575 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_4.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_4.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_4.mp3.meta new file mode 100644 index 00000000..18b46f31 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_4.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 26282a2258399bf4e9ee89e4f21a4dcb +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/b0ff6743badc66a0481d328973558d37 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_5.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_5.mp3 new file mode 100644 index 00000000..1dc0d3ec Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_5.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_5.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_5.mp3.meta new file mode 100644 index 00000000..e54bcd8c --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8be0dedcd28dc41499ad9c52996ca33f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/44da4422fcdd6bdcf74857d6ee613e5b + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_6.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_6.mp3 new file mode 100644 index 00000000..1fa5851b Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_6.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_6.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_6.mp3.meta new file mode 100644 index 00000000..c8c68ece --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_6.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 0e5a839694a05f24f958e374006742f8 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/1d298f3eefc6d8f643a2a776017c4806 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_7.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_7.mp3 new file mode 100644 index 00000000..038e62cc Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_7.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_7.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_7.mp3.meta new file mode 100644 index 00000000..afb7dc57 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_7.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: c4c8bd8f7a6c46741aaeef6223d8df0f +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/1990cbb67d57ea440247bc2fecc2f9de + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_8.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_8.mp3 new file mode 100644 index 00000000..a9076f13 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_8.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_8.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_8.mp3.meta new file mode 100644 index 00000000..9d8c9254 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_8.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 362439ff097754e4bb90071b33531092 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/501fbe83f7dc4c4deb489b08cfcd0093 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_9.mp3 b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_9.mp3 new file mode 100644 index 00000000..1867a5a8 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_9.mp3 differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_9.mp3.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_9.mp3.meta new file mode 100644 index 00000000..1385b498 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/sound/woman/chat_9.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: fa7cbeba7f048834daa02b26475e28ca +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/ae1a8cfdda47ee930a7e6a921cf5dad8 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/ui.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/ui.meta new file mode 100644 index 00000000..c84aa397 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/ui.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8082193cb3c29c94f94f3aa8014620d5 +folderAsset: yes +timeCreated: 1587569081 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/ui/Extend_Poker_YueYangWHZ_fui.bytes b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/ui/Extend_Poker_YueYangWHZ_fui.bytes new file mode 100644 index 00000000..710bb25a Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/ui/Extend_Poker_YueYangWHZ_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/ui/Extend_Poker_YueYangWHZ_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/ui/Extend_Poker_YueYangWHZ_fui.bytes.meta new file mode 100644 index 00000000..d2a268db --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/ui/Extend_Poker_YueYangWHZ_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 88b711b61d8ef7c478601a038777181a +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/5470e0c35decbaac0600dc8845c49f52 + assetBundleVariant: diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/ui/Info_Poker_YueYangWHZ_fui.bytes b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/ui/Info_Poker_YueYangWHZ_fui.bytes new file mode 100644 index 00000000..1b6525d9 Binary files /dev/null and b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/ui/Info_Poker_YueYangWHZ_fui.bytes differ diff --git a/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/ui/Info_Poker_YueYangWHZ_fui.bytes.meta b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/ui/Info_Poker_YueYangWHZ_fui.bytes.meta new file mode 100644 index 00000000..2c496c20 --- /dev/null +++ b/wb_unity_pro/Assets/ART/extend/zipai/yueyangwaihuzi/ui/Info_Poker_YueYangWHZ_fui.bytes.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9e041003d91c326468a97ef2154cfd67 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: extend/zipai/yueyangwaihuzi/ed7c609822703fd962292501dc513620 + assetBundleVariant: