同步跑得快结尾动画,判断类型使用cardcheck
parent
901df13ef6
commit
4499ae219b
|
|
@ -16,7 +16,22 @@ function FamilyInviteFamilyView.new(root)
|
||||||
self._input_numberSearch = self._view:GetChild('input_search')
|
self._input_numberSearch = self._view:GetChild('input_search')
|
||||||
|
|
||||||
self:initBtn()
|
self:initBtn()
|
||||||
self:FillList(numbers)
|
local fgCtr = ControllerManager.GetController(NewGroupController)
|
||||||
|
if #numbers == 0 then
|
||||||
|
fgCtr:FG_GroupMembers(self._group.id, 0, self._group.total_member_num, false, 1, function(res)
|
||||||
|
numbers = self._group.members
|
||||||
|
-- print("==========================res.Data.members")
|
||||||
|
pt(self._group.members)
|
||||||
|
ViewUtil:CloseModalWait()
|
||||||
|
if res.ReturnCode ~= 0 then
|
||||||
|
ViewUtil.ErrorTip(res.ReturnCode, "获取成员列表失败")
|
||||||
|
else
|
||||||
|
self:FillList(numbers)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
else
|
||||||
|
self:FillList(numbers)
|
||||||
|
end
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -44,6 +59,7 @@ function M:FillList(numbers)
|
||||||
self._viewList_allNumbers.itemRenderer = function(index, obj)
|
self._viewList_allNumbers.itemRenderer = function(index, obj)
|
||||||
local i = index + 1
|
local i = index + 1
|
||||||
obj:GetController('lev').selectedIndex = numbers[i].lev - 1
|
obj:GetController('lev').selectedIndex = numbers[i].lev - 1
|
||||||
|
obj:GetController('ban').selectedIndex = numbers[i].ban
|
||||||
obj:GetChild('name').text = numbers[i].nick
|
obj:GetChild('name').text = numbers[i].nick
|
||||||
obj:GetChild('id').text = string.format("ID:%s", numbers[i].uid)
|
obj:GetChild('id').text = string.format("ID:%s", numbers[i].uid)
|
||||||
ImageLoad.Load(numbers[i].portrait, obj:GetChild('btn_head')._iconObject)
|
ImageLoad.Load(numbers[i].portrait, obj:GetChild('btn_head')._iconObject)
|
||||||
|
|
@ -60,9 +76,9 @@ function M:FillList(numbers)
|
||||||
self._viewList_allNumbers.numItems = #numbers
|
self._viewList_allNumbers.numItems = #numbers
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:TickNumberCallback(res)
|
function M.TickNumberCallback(res)
|
||||||
if res.ReturnCode == 0 then
|
if res.ReturnCode == 0 then
|
||||||
self:FillList(self._group.members)
|
-- self:FillList(self._group.members)
|
||||||
else
|
else
|
||||||
ViewUtil.ErrorTip(res.ReturnCode, "删除成员失败")
|
ViewUtil.ErrorTip(res.ReturnCode, "删除成员失败")
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ function M:init(url, lev, res)
|
||||||
BaseWindow.init(self, url)
|
BaseWindow.init(self, url)
|
||||||
local info = res.Data.members[1]
|
local info = res.Data.members[1]
|
||||||
local flag_assistant = info.lev == 2 and 1 or 0
|
local flag_assistant = info.lev == 2 and 1 or 0
|
||||||
|
local flag_band = info.ban
|
||||||
|
|
||||||
self._view:GetChild('name').text = string.format("%s(%s)", info.nick, info.uid)
|
self._view:GetChild('name').text = string.format("%s(%s)", info.nick, info.uid)
|
||||||
self._view:GetChild('text_allRounds').text = info.total_round
|
self._view:GetChild('text_allRounds').text = info.total_round
|
||||||
|
|
@ -49,10 +50,16 @@ function M:init(url, lev, res)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
self._view:GetChild('btn_band'):GetController('band').selectedIndex = flag_band
|
||||||
self._view:GetChild('btn_band').onClick:Set(function()
|
self._view:GetChild('btn_band').onClick:Set(function()
|
||||||
ViewUtil.ShowTwoChooose(string.format("是否禁止用户(%s)进入房间", info.nick), function()
|
ViewUtil.ShowTwoChooose(string.format("是否禁止用户(%s)进入房间", info.nick), function()
|
||||||
fgCtr:FG_GroupRemoveMember(self.groupId, info.uid, function()
|
fgCtr:FG_BanMember(self.groupId, info.uid, 1 - flag_band, 1, function()
|
||||||
ViewUtil.ShowOneChooose(string.format("用户(%s)已禁止进入房间", info.nick))
|
if res.ReturnCode == 0 then
|
||||||
|
flag_band = 1 - flag_band
|
||||||
|
self._view:GetChild('btn_band'):GetController('band').selectedIndex = flag_band
|
||||||
|
else
|
||||||
|
ViewUtil.ShowOneChooose("设置进房权限失败")
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
@ -67,8 +74,12 @@ function M:init(url, lev, res)
|
||||||
string.format("是否%s用户(%s)%s", flag_assistant == 1 and "取消" or "将", info.nick,
|
string.format("是否%s用户(%s)%s", flag_assistant == 1 and "取消" or "将", info.nick,
|
||||||
flag_assistant == 1 and "助理身份" or "设置为助理"), function()
|
flag_assistant == 1 and "助理身份" or "设置为助理"), function()
|
||||||
fgCtr:FG_SetManager(self.groupId, info.uid, flag_assistant + 1, function(res)
|
fgCtr:FG_SetManager(self.groupId, info.uid, flag_assistant + 1, function(res)
|
||||||
flag_assistant = 1 - flag_assistant
|
if res.ReturnCode == 0 then
|
||||||
self._view:GetChild('btn_assistant'):GetController('isAssistant').selectedIndex = flag_assistant
|
flag_assistant = 1 - flag_assistant
|
||||||
|
self._view:GetChild('btn_assistant'):GetController('isAssistant').selectedIndex = flag_assistant
|
||||||
|
else
|
||||||
|
ViewUtil.ShowOneChooose("设置助理失败")
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
|
|
@ -228,7 +228,7 @@ function M:OnPlaySuccCheck(evt_data)
|
||||||
local card_type, number, length, plan_three_count = self:GetCardListInfo(out_card_list)
|
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)
|
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,
|
DispatchEvent(self._dispatcher, RunFast_GameEvent.OnPlaySucc, player, remain, card_type, number, otherList,
|
||||||
length)
|
length, cards)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ local RunFast_ResultView = import(".RunFast_ResultView")
|
||||||
local RunFast_RightPanelView = import(".RunFast_RightPanelView")
|
local RunFast_RightPanelView = import(".RunFast_RightPanelView")
|
||||||
local PlayerInfoView = import(".EXPlayerInfoView")
|
local PlayerInfoView = import(".EXPlayerInfoView")
|
||||||
local TableBG = import('Game.Data.TableBG')
|
local TableBG = import('Game.Data.TableBG')
|
||||||
|
local RunFast_CardCheck = import(".CardCheck")
|
||||||
local M = {}
|
local M = {}
|
||||||
function M.new()
|
function M.new()
|
||||||
setmetatable(M, { __index = PKMainView })
|
setmetatable(M, { __index = PKMainView })
|
||||||
|
|
@ -205,6 +206,8 @@ function M:InitView(url)
|
||||||
self._text_currenRound = self._view:GetChild('Text_CurrenRound')
|
self._text_currenRound = self._view:GetChild('Text_CurrenRound')
|
||||||
self._text_maxRound = self._view:GetChild('Text_MaxMaxRound')
|
self._text_maxRound = self._view:GetChild('Text_MaxMaxRound')
|
||||||
|
|
||||||
|
self._cardCheck = RunFast_CardCheck:InitFlag()
|
||||||
|
|
||||||
self:UpdateRound(0)
|
self:UpdateRound(0)
|
||||||
|
|
||||||
--按钮功能全部未开放
|
--按钮功能全部未开放
|
||||||
|
|
@ -576,6 +579,7 @@ function M:EventInit()
|
||||||
local num = arg[4]
|
local num = arg[4]
|
||||||
local otherList = arg[5]
|
local otherList = arg[5]
|
||||||
local length = arg[6]
|
local length = arg[6]
|
||||||
|
local lastCardList = arg[7]
|
||||||
self.ctr_time.selectedIndex = 0
|
self.ctr_time.selectedIndex = 0
|
||||||
local index = self:GetPos(p.seat)
|
local index = self:GetPos(p.seat)
|
||||||
if index == 1 then
|
if index == 1 then
|
||||||
|
|
@ -608,46 +612,23 @@ function M:EventInit()
|
||||||
--card_info:UpdateHandPoker(card_number,false,false) -- todo
|
--card_info:UpdateHandPoker(card_number,false,false) -- todo
|
||||||
end
|
end
|
||||||
|
|
||||||
if self._room.is_new_bout == true then
|
-- if self._room.is_new_bout == true then
|
||||||
for i = 1, #self._room.player_list do
|
-- for i = 1, #self._room.player_list do
|
||||||
local player = self._room.player_list[i]
|
-- local player = self._room.player_list[i]
|
||||||
local card_info_i = self._player_card_info[self:GetPos(player.seat)]
|
-- local card_info_i = self._player_card_info[self:GetPos(player.seat)]
|
||||||
if p.seat ~= player.seat then
|
-- if p.seat ~= player.seat then
|
||||||
card_info_i:SetOutCardInfo(nil, false)
|
-- card_info_i:SetOutCardInfo(nil, false)
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
-- card_info:PlayCardTypeEff(cardstype)
|
-- self:_Effect(cardstype, p)
|
||||||
-- if cardstype~=12 then
|
-- else
|
||||||
-- -- body
|
-- if cardstype == 11 and cardstype ~= 12 then
|
||||||
|
-- self:_Effect(cardstype, p)
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
|
||||||
|
self._cardCheck:InitLastCard(lastCardList)
|
||||||
-- if cardstype==10 and length>=6 then
|
self:_Effect(self._cardCheck.type, p)
|
||||||
-- -- 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))
|
self:PlaySound(p.self_user.sex, self:GetSoundFileName(cardstype, num, self._room.is_new_bout))
|
||||||
if card_number == 1 then
|
if card_number == 1 then
|
||||||
|
|
@ -792,8 +773,7 @@ function M:EventInit()
|
||||||
local zdts = self._view:GetController("zidongtishi").selectedIndex
|
local zdts = self._view:GetController("zidongtishi").selectedIndex
|
||||||
-- self._player_card_info[1]._cardCheck:InitLastCard(lastCardList)
|
-- self._player_card_info[1]._cardCheck:InitLastCard(lastCardList)
|
||||||
-- self._player_card_info[1]:ShowOutCardOption(ctr_number, card_type, card_number, card_length, m, play, zdts)
|
-- self._player_card_info[1]:ShowOutCardOption(ctr_number, card_type, card_number, card_length, m, play, zdts)
|
||||||
card_info:ShowOutCardOption2(lastCardList,ctr_number,m)
|
card_info:ShowOutCardOption2(lastCardList, ctr_number, m)
|
||||||
|
|
||||||
end)
|
end)
|
||||||
-- 托管
|
-- 托管
|
||||||
_gamectr:AddEventListener(RunFast_GameEvent.Game_TuoGuan, function(...)
|
_gamectr:AddEventListener(RunFast_GameEvent.Game_TuoGuan, function(...)
|
||||||
|
|
@ -1239,24 +1219,20 @@ function M:CreateRankEff()
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:_Effect(type1, player)
|
function M:_Effect(type1, player)
|
||||||
-- body
|
|
||||||
|
|
||||||
if type1 < 7 and type1 ~= 4 and type1 ~= 5 then
|
if type1 < 7 and type1 ~= 4 and type1 ~= 5 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local eff_code = 0
|
local eff_code = 0
|
||||||
if type1 == 10 then
|
if type1 == 5 or 8 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
|
eff_code = 1
|
||||||
|
elseif type1 == 2 then
|
||||||
|
eff_code = 2
|
||||||
|
elseif type1 == 10 then
|
||||||
|
eff_code = 4
|
||||||
|
elseif type1 == 4 then
|
||||||
|
eff_code = 5
|
||||||
|
elseif type1 == 6 then
|
||||||
|
eff_code = 3
|
||||||
end
|
end
|
||||||
local info = self._player_card_info[self:GetPos(player.seat)]
|
local info = self._player_card_info[self:GetPos(player.seat)]
|
||||||
local pNode = info._mask_liangpai
|
local pNode = info._mask_liangpai
|
||||||
|
|
@ -1307,56 +1283,71 @@ function M:_Effect(type1, player)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- function M:_Effect(type1, player)
|
-- function M:_Effect(type1, player)
|
||||||
-- if type1 < 7 and type1 ~= 4 then return end
|
-- -- body
|
||||||
-- 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
|
-- if type1 < 7 and type1 ~= 4 and type1 ~= 5 then
|
||||||
|
-- return
|
||||||
-- --effect:SetXY((self._view.width - effect.width) / 2,(self._view.hight - effect.hight) / 2)
|
-- end
|
||||||
-- pNode:AddChild(effect)
|
-- local eff_code = 0
|
||||||
-- if type1 == 10 then --顺子
|
-- if type1 == 10 then
|
||||||
-- effect.x, effect.y = -400, -200
|
-- eff_code = 2
|
||||||
-- elseif type1 == 11 then --炸
|
-- elseif type1 == 11 then
|
||||||
-- effect.x, effect.y = -80, -225
|
-- eff_code = 3
|
||||||
-- elseif type1 == 4 then --连对
|
-- elseif type1 == 4 then
|
||||||
-- effect.x, effect.y = -400, -200
|
-- eff_code = 4
|
||||||
-- else
|
-- elseif type1 == 12 then
|
||||||
-- effect.x, effect.y = -157, -140
|
-- return
|
||||||
-- end
|
-- elseif type1 == 5 then
|
||||||
-- coroutine.start(function()
|
-- eff_code = 5
|
||||||
-- if type1== 10 or type1== 11 or type1== 4 then
|
|
||||||
-- -- body
|
|
||||||
-- coroutine.wait(2)
|
|
||||||
-- effect:Dispose()
|
|
||||||
-- else
|
-- else
|
||||||
-- coroutine.wait(1.2)
|
-- eff_code = 1
|
||||||
-- effect:Dispose()
|
-- 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
|
-- end
|
||||||
|
|
||||||
-- end)
|
|
||||||
-- if eff_code ==3 then
|
-- if eff_code == 1 then
|
||||||
-- coroutine.start(function()
|
-- self.eff_feiji = UIPackage.CreateObjectFromURL("ui://Extend_Poker_RunFastNew/eff_feiji")
|
||||||
-- coroutine.wait(1)
|
-- self._view:AddChild(self.eff_feiji)
|
||||||
-- effect:Dispose()
|
-- self.eff_feiji:Center()
|
||||||
-- end)
|
-- self.eff_feiji:GetTransition("t0"):Play()
|
||||||
-- else
|
-- 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.start(function()
|
||||||
-- coroutine.wait(2)
|
-- coroutine.wait(1)
|
||||||
|
-- if self.eff_feiji ~= nil then
|
||||||
|
-- self.eff_feiji:Dispose()
|
||||||
|
-- end
|
||||||
-- effect:Dispose()
|
-- effect:Dispose()
|
||||||
-- end)
|
-- end)
|
||||||
-- end
|
-- -- end
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,8 @@ function M:SelectedConfigData()
|
||||||
|
|
||||||
|
|
||||||
local _data = {}
|
local _data = {}
|
||||||
_data["round"] = round
|
_data["opt"] = round
|
||||||
_data["peopleNum"] = Mathf.Round(self.peopleSlider.value) + 1
|
_data["maxPlayers"] = Mathf.Round(self.peopleSlider.value) + 1
|
||||||
_data["min_score"] = 0
|
_data["min_score"] = 0
|
||||||
_data["max_score"] = 0
|
_data["max_score"] = 0
|
||||||
_data["max_bet"] = 0
|
_data["max_bet"] = 0
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 264 KiB After Width: | Height: | Size: 114 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 253 KiB After Width: | Height: | Size: 399 KiB |
Binary file not shown.
Loading…
Reference in New Issue