麻将重构

master
1076390229 2025-08-19 22:17:52 +08:00
parent f4dedc9eb2
commit 3cff3b0992
39 changed files with 422 additions and 122 deletions

View File

@ -46,9 +46,9 @@ ExtendHotupdate = {
-- 正常
VERSION_NORMAL = 0,
-- 下载
VERSION_DOWN = 0,
VERSION_DOWN = 1,
-- 更新
VERSION_UPDATE = 0,
VERSION_UPDATE = 2,
}
function ExtendHotupdate.UpdateGameList(list, callback)

View File

@ -190,7 +190,7 @@ function M:UpdateScore(score, doAnimation)
self._tex_score.text = tostring(score)
if doAnimation then
self:ScoreAnimation(lastScore - score)
self:ScoreAnimation(score - lastScore)
end
end

View File

@ -184,10 +184,13 @@ function M:UpdatePlayerInfoView()
end
function M:NewMJPlayerCardInfoView(view, index)
return MJMainView.NewMJPlayerCardInfoView(self, view, index)
--[[
if index == 1 then
return MJPlayerSelfCardInfoView.new(view, self)
end
return MJPlayerCardInfoView.new(view, self)
]]
end
function M:EventInit()

View File

@ -160,6 +160,7 @@ function M:EventInit()
info:MarkBank(p.seat == _room.banker_seat)
info:Ready(false)
local card_info = self._player_card_info[self:GetPos(p.seat)]
card_info:Clear()
card_info:UpdateHandCardWitness()
end
end)
@ -342,10 +343,13 @@ function M:InitPlayerInfoView()
end
function M:NewMJPlayerCardInfoView(view, index)
return MJMainView.NewMJPlayerCardInfoView(self, view, index)
--[[
if index == 1 then
return MJPlayerSelfCardInfoView.new(view, self)
end
return MJPlayerCardInfoView.new(view, self)
]]
end
function M:RemoveCursor()

View File

@ -184,10 +184,13 @@ function M:UpdatePlayerInfoView()
end
function M:NewMJPlayerCardInfoView(view, index)
return MJMainView.NewMJPlayerCardInfoView(self, view, index)
--[[
if index == 1 then
return MJPlayerSelfCardInfoView.new(view, self)
end
return MJPlayerCardInfoView.new(view, self)
]]
end
function M:EventInit()
@ -238,6 +241,7 @@ function M:EventInit()
info:MarkBank(p.seat == _room.banker_seat)
info:Ready(false)
local card_info = self._player_card_info[self:GetPos(p.seat)]
card_info:Clear()
card_info:UpdateHandCard()
end
end)

View File

@ -159,6 +159,7 @@ function M:EventInit()
info:MarkBank(p.seat == _room.banker_seat)
info:Ready(false)
local card_info = self._player_card_info[self:GetPos(p.seat)]
card_info:Clear()
card_info:UpdateHandCardWitness()
end
end)
@ -341,10 +342,13 @@ function M:InitPlayerInfoView()
end
function M:NewMJPlayerCardInfoView(view, index)
return MJMainView.NewMJPlayerCardInfoView(self, view, index)
--[[
if index == 1 then
return MJPlayerSelfCardInfoView.new(view, self)
end
return MJPlayerCardInfoView.new(view, self)
]]
end
function M:RemoveCursor()

View File

@ -183,10 +183,13 @@ function M:UpdatePlayerInfoView()
end
function M:NewMJPlayerCardInfoView(view, index)
return MJMainView.NewMJPlayerCardInfoView(self, view, index)
--[[
if index == 1 then
return MJPlayerSelfCardInfoView.new(view, self)
end
return MJPlayerCardInfoView.new(view, self)
]]
end
function M:EventInit()
@ -238,6 +241,7 @@ function M:EventInit()
info:MarkBank(p.seat == _room.banker_seat)
info:Ready(false)
local card_info = self._player_card_info[self:GetPos(p.seat)]
card_info:Clear()
card_info:UpdateHandCard()
end
end)

View File

@ -184,6 +184,7 @@ function M:EventInit()
info:MarkBank(p.seat == _room.banker_seat)
info:Ready(false)
local card_info = self._player_card_info[self:GetPos(p.seat)]
card_info:Clear()
card_info:UpdateHandCardWitness()
end
end)
@ -366,10 +367,13 @@ function M:InitPlayerInfoView()
end
function M:NewMJPlayerCardInfoView(view, index)
return MJMainView.NewMJPlayerCardInfoView(self, view, index)
--[[
if index == 1 then
return MJPlayerSelfCardInfoView.new(view, self)
end
return MJPlayerCardInfoView.new(view, self)
]]
end
function M:RemoveCursor()

View File

@ -182,10 +182,13 @@ function M:UpdatePlayerInfoView()
end
function M:NewMJPlayerCardInfoView(view, index)
return MJMainView.NewMJPlayerCardInfoView(self, view, index)
--[[
if index == 1 then
return MJPlayerSelfCardInfoView.new(view, self)
end
return MJPlayerCardInfoView.new(view, self)
]]
end
function M:EventInit()
@ -236,6 +239,7 @@ function M:EventInit()
info:MarkBank(p.seat == _room.banker_seat)
info:Ready(false)
local card_info = self._player_card_info[self:GetPos(p.seat)]
card_info:Clear()
card_info:UpdateHandCard()
end
end)

View File

@ -159,6 +159,7 @@ function M:EventInit()
info:MarkBank(p.seat == _room.banker_seat)
info:Ready(false)
local card_info = self._player_card_info[self:GetPos(p.seat)]
card_info:Clear()
card_info:UpdateHandCardWitness()
end
end)
@ -341,10 +342,13 @@ function M:InitPlayerInfoView()
end
function M:NewMJPlayerCardInfoView(view, index)
return MJMainView.NewMJPlayerCardInfoView(self, view, index)
--[[
if index == 1 then
return MJPlayerSelfCardInfoView.new(view, self)
end
return MJPlayerCardInfoView.new(view, self)
]]
end
function M:RemoveCursor()

View File

@ -586,10 +586,33 @@ function M:PlayerChangeLineState()
end
function M:NewMJPlayerCardInfoView(view, index)
if index == 1 then
return MJPlayerSelfCardInfoView.new(view, self)
local infoView = {}
if self._room.room_config.people_num == 2 then
if index == 1 then
infoView = MJPlayerSelfCardInfoView.new(view, self, nil, "S")
elseif index == 2 then
infoView = MJPlayerCardInfoView.new(view, self, nil, "N")
end
elseif self._room.room_config.people_num == 3 then
if index == 1 then
infoView = MJPlayerSelfCardInfoView.new(view, self, nil, "S")
elseif index == 2 then
infoView = MJPlayerCardInfoView.new(view, self, nil, "E")
elseif index == 3 then
infoView = MJPlayerCardInfoView.new(view, self, nil, "N")
end
elseif self._room.room_config.people_num == 4 then
if index == 1 then
infoView = MJPlayerSelfCardInfoView.new(view, self, nil, "S")
elseif index == 2 then
infoView = MJPlayerCardInfoView.new(view, self, nil, "E")
elseif index == 3 then
infoView = MJPlayerCardInfoView.new(view, self, nil, "N")
elseif index == 4 then
infoView = MJPlayerCardInfoView.new(view, self, nil, "W")
end
end
return MJPlayerCardInfoView.new(view, self)
return infoView
end
function M:RemoveCursor()
@ -677,7 +700,7 @@ function M:OnResult1(...)
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:Clear()
card_info:ResetCardType()
if _room:checkHpNonnegative() then
p.cur_hp = data[i].total_score
@ -698,7 +721,7 @@ function M:OnResult1(...)
p.fz_list = {}
end
DataManager.CurrenRoom.self_player.card_list = {}
self._state.selectedIndex = 2
--self._state.selectedIndex = 2
self._clearingView = nil
end)
end
@ -804,9 +827,9 @@ function M:OnHuCard(...)
end
-- 扣分动画
for _, player in pairs(scoreData) do
local infoView = self._player_info[self:GetPos(player.seat)]
infoView:UpdateScore(player.total_score, true)
for _, pScore in pairs(scoreData) do
local infoView = self._player_info[self:GetPos(pScore.seat)]
infoView:UpdateScore(pScore.total_score, true)
end
coroutine.wait(0.5)

View File

@ -36,12 +36,13 @@ end
local M = PlayerCardInfoView
--- Create a new PlayerCardInfoView
function M.new(view, mainView, record)
function M.new(view, mainView, record, direction)
local self = {}
setmetatable(self, { __index = M })
self._view = view
self._mainView = mainView
self._flag_record = record
self.direction = direction
self:init()
return self
end
@ -63,6 +64,14 @@ function M:init()
self._view_handCardList = self._view:GetChild('List_HandCard2')
self._view_getCard = self._view:GetChild('Btn_HandCard2')
end
if self.direction == "S" then
self._view_outCardList.layout = FairyGUI.ListLayoutType.FlowHorizontal_left2right_bottom2top
elseif self.direction == "N" then
self._view_outCardList.layout = FairyGUI.ListLayoutType.FlowHorizontal_right2left_top2bottom
elseif self.direction == "E" then
self._view_outCardList.layout = FairyGUI.ListLayoutType.FlowVertical_right2left_bottom2top
end
end
function M:SetPlayer(p)
@ -465,7 +474,6 @@ function M:ResetCardType()
end
function M:ShowHand(cards)
self._view_handCardList:RemoveChildren()
local list = self._view_handCardList
@ -476,8 +484,11 @@ function M:ShowHand(cards)
end
--list:RemoveChildren()
local passcard = false
for _, card in pairs(cards) do
if self.winCard ~= card then
if self.winCard == cards and passcard == false then
passcard = true
else
local obj = list:AddItemFromPool()
obj:GetChild("icon").url = 'ui://Main_Majiang/' .. cardType .. card
end
@ -489,6 +500,7 @@ function M:ShowHuCard(card)
self._view_getCard:RemoveChildrenToPool()
local btn_card = self._view_getCard:AddItemFromPool()
btn_card:GetChild("icon").url = 'ui://Main_Majiang/' .. self._viewText_cardInfo['Out_Card'] .. card
self._ctr_getCard.selectedIndex = 1
end
return M

View File

@ -7,11 +7,12 @@ local PlayerSelfView = {
local M = PlayerSelfView
function PlayerSelfView.new(view, mainView)
function PlayerSelfView.new(view, mainView, record, direction)
setmetatable(M, { __index = MJPlayerCardInfoView })
local self = setmetatable({}, { __index = M })
self._view = view
self._mainView = mainView
self.direction = direction
self:init()
return self
end

View File

@ -104,7 +104,7 @@
<item/>
<item/>
</list>
<list id="n24_in3i" name="list_familyNumber" xy="497,437" size="322,591" group="n34_86ct" overflow="scroll" lineGap="20" defaultItem="ui://htcn7v3rin3i7cur" autoItemSize="false">
<list id="n24_in3i" name="list_familyNumber" xy="497,437" size="322,591" group="n34_86ct" overflow="scroll" lineGap="20" defaultItem="ui://htcn7v3rin3i7cur" autoItemSize="false" autoClearItems="true">
<relation target="" sidePair="height-height,left-left"/>
<item/>
<item/>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="117,117" extention="Button">
<controller name="button" pages="0,up,1,down" selected="0"/>
<controller name="jing" pages="0,,1," selected="1"/>
<displayList>
<loader id="n13_wcy5" name="icon" xy="0,0" size="117,117" url="ui://v0j9abjyk0pa12m" fill="scaleFree">
<relation target="" sidePair="width-width,height-height"/>
</loader>
<image id="n14_wcy5" name="n14" src="xblm1a5" fileName="Main_new/Main/Image/jing 1.png" xy="50,-9" size="62,72">
<relation target="" sidePair="width-width,height-height"/>
</image>
</displayList>
<Button mode="Check"/>
</component>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="117,117">
<controller name="jing" pages="0,,1," selected="0"/>
<displayList>
<loader id="n3_wcy5" name="icon" xy="0,0" size="117,117" url="ui://v0j9abjyk0pa12m" fill="scaleFree">
<relation target="" sidePair="width-width,height-height"/>
</loader>
<image id="n4_wcy5" name="n4" src="xblm1a5" fileName="Main_new/Main/Image/jing 1.png" xy="50,-9" size="62,72">
<gearDisplay controller="jing" pages="1"/>
<relation target="" sidePair="width-width,height-height"/>
</image>
</displayList>
</component>

View File

@ -13,7 +13,20 @@
<item/>
<item/>
</list>
<list id="n53_j6yy" name="List_OutCard" xy="1220,192" pivot="0.5,0.5" size="935,699" skew="180,180" touchable="false" pageController="ting" layout="flow_vt" selectionMode="none" lineGap="-20" colGap="-7" defaultItem="ui://v0j9abjygi9910o" autoItemSize="true" renderOrder="descent" autoClearItems="true">
<list id="n53_j6yy" name="List_OutCard" xy="1599,192" size="556,699" touchable="false" pageController="ting" layout="flow_vt" selectionMode="none" lineGap="-20" colGap="-7" defaultItem="ui://v0j9abjywcy51g8" autoItemSize="true" align="right" renderOrder="descent" autoClearItems="true">
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="2532,1170" opaque="false" initName="player_card_info" designImage="ui://v0j9abjyj6yy1fw" designImageAlpha="100">
<component size="2532,1170" opaque="false" initName="player_card_info" designImage="ui://v0j9abjyj6yy1ft" designImageAlpha="35">
<controller name="3d" pages="0,,1," selected="0"/>
<controller name="ting" pages="0,,1," selected="0"/>
<controller name="site" pages="0,2-1,1,2-2" selected="0"/>
<controller name="getCard" pages="0,,1," selected="0"/>
<controller name="cStie" exported="true" pages="0,,1,,2," selected="2">
<controller name="cStie" exported="true" pages="0,,1,,2," selected="1">
<remark page="0" value="2人"/>
<remark page="1" value="3人"/>
<remark page="2" value="4人"/>
@ -25,15 +25,15 @@
<item/>
<item/>
</list>
<list id="n38_gi99" name="List_FZ" xy="454,18" size="1329,103" touchable="false" layout="row" selectionMode="none" colGap="7" defaultItem="ui://v0j9abjygi9910r" align="right" vAlign="bottom" autoClearItems="true">
<list id="n38_gi99" name="List_FZ" xy="454,18" size="1329,103" touchable="false" layout="row" selectionMode="none" colGap="7" defaultItem="ui://v0j9abjygi9910r" autoItemSize="false" align="right" vAlign="bottom" autoClearItems="true">
<item/>
<item/>
<item/>
<item/>
</list>
<list id="n41_gi99" name="List_OutCard" xy="1275,400" pivot="0.5,0.5" anchor="true" size="887,502" skew="0,180" touchable="false" pageController="ting" layout="flow_hz" selectionMode="none" margin="40,0,0,0" lineGap="-20" colGap="-7" defaultItem="ui://v0j9abjygi9910t" autoItemSize="true" autoClearItems="true">
<gearXY controller="cStie" pages="0,1,2" values="1314,401|920,355|1275,400"/>
<gearSize controller="cStie" pages="1,2" values="1239,502,1,1|887,502,1,1" default="2097,502,1,1"/>
<list id="n41_gi99" name="List_OutCard" xy="324,103" size="1217,502" touchable="false" pageController="ting" layout="flow_hz" selectionMode="none" margin="40,0,0,0" lineGap="-20" colGap="-7" defaultItem="ui://v0j9abjywcy51g8" autoItemSize="true" align="right" autoClearItems="true">
<gearXY controller="cStie" pages="0,1,2" values="265,150|324,103|833,148"/>
<gearSize controller="cStie" pages="1,2" values="1217,502,1,1|887,502,1,1" default="2097,502,1,1"/>
<item/>
<item/>
<item/>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="2532,1170" opaque="false" initName="player_card_info" designImage="ui://v0j9abjyj6yy1fw" designImageAlpha="0">
<component size="2532,1170" opaque="false" initName="player_card_info" designImage="ui://v0j9abjyj6yy1fs" designImageAlpha="35">
<controller name="3d" pages="0,,1," selected="0"/>
<controller name="ting" pages="0,,1," selected="0"/>
<controller name="site" pages="0,2-1,1,2-2" selected="0"/>
@ -35,32 +35,9 @@
<item/>
<item/>
</list>
<list id="n35_gi99" name="List_OutCard" xy="287,606" pivot="0.5,0.5" size="2097,312" skew="180,0" pageController="ting" layout="flow_hz" selectionMode="none" scroll="horizontal" margin="0,40,0,0" lineGap="-20" colGap="-7" defaultItem="ui://v0j9abjygi9910j" autoItemSize="true" renderOrder="descent" autoClearItems="true">
<gearXY controller="cStie" pages="1,2" values="322,609|836,608" default="287,606"/>
<gearSize controller="cStie" pages="1,2" values="1217,312,1,1|887,312,1,1" default="2097,312,1,1"/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<item/>
<list id="n35_gi99" name="List_OutCard" xy="283,606" size="2097,312" pageController="ting" layout="flow_hz" selectionMode="none" scroll="horizontal" lineGap="-20" colGap="-7" defaultItem="ui://v0j9abjywcy51g8" autoItemSize="true" renderOrder="descent" autoClearItems="true">
<gearXY controller="cStie" pages="0,1,2" values="283,606|324,612|832,608"/>
<gearSize controller="cStie" pages="0,1,2" values="2097,312,1,1|1217,312,1,1|887,312,1,1"/>
<item/>
<item/>
<item/>

View File

@ -25,7 +25,7 @@
<item/>
<item/>
</list>
<list id="n54_j6yy" name="List_OutCard" xy="406,192" pivot="0.5,0.5" size="935,699" touchable="false" pageController="ting" layout="flow_vt" selectionMode="none" lineGap="-20" colGap="-7" defaultItem="ui://v0j9abjygi9910x" autoItemSize="true" autoClearItems="true">
<list id="n54_j6yy" name="List_OutCard" xy="406,192" size="935,699" touchable="false" pageController="ting" layout="flow_vt" selectionMode="none" lineGap="-20" colGap="-7" defaultItem="ui://v0j9abjywcy51g8" autoItemSize="true" autoClearItems="true">
<item/>
<item/>
<item/>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="2532,1170" pivot="0.5,0.5" designImage="ui://v0j9abjyj6yy1fw" designImageAlpha="0">
<controller name="state" pages="0,准备状态,1,游戏状态,2,回合间状态,3,回放状态,4,观战状态" selected="0"/>
<component size="2532,1170" pivot="0.5,0.5" designImage="ui://v0j9abjyj6yy1fr" designImageAlpha="35">
<controller name="state" pages="0,准备状态,1,游戏状态,2,回合间状态,3,回放状态,4,观战状态" selected="1"/>
<controller name="sdk" pages="0,,1," selected="0"/>
<controller name="action" pages="2,空,0,准备,1,开始" selected="0"/>
<controller name="3d" pages="0,,1," selected="0"/>
@ -17,10 +17,10 @@
<component id="n193_o4nh" name="com_logo" src="o4nh1ei" fileName="Main_new/Component/com_logo.xml" xy="1200,366" size="435,73">
<relation target="" sidePair="center-center,middle-middle"/>
</component>
<component id="n155_gi99" name="player_card_info2" src="inqx13x" fileName="Main_new/Main_new_2/Player_card_info_N.xml" xy="0,0" size="2532,1170" controller="cStie,0">
<component id="n155_gi99" name="player_card_info2" src="inqx13x" fileName="Main_new/Main_new_2/Component/NewHandCard/Player_card_info_N.xml" xy="0,0" size="2532,1170" controller="cStie,0">
<gearDisplay controller="state" pages="1,3,4"/>
</component>
<component id="n118_pkx5" name="player_card_info1" src="inqx13w" fileName="Main_new/Main_new_2/Player_card_info_S.xml" xy="0,0" size="2532,1170" controller="cStie,0">
<component id="n118_pkx5" name="player_card_info1" src="inqx13w" fileName="Main_new/Main_new_2/Component/NewHandCard/Player_card_info_S.xml" xy="0,0" size="2532,1170" controller="cStie,0">
<gearDisplay controller="state" pages="1,3,4"/>
<relation target="" sidePair="width-width,bottom-bottom"/>
</component>
@ -28,7 +28,7 @@
<gearDisplay controller="state" pages="0,2"/>
<relation target="" sidePair="center-center,bottom-bottom"/>
</component>
<component id="n141_lu84" name="player_info1_2" src="pkx5so" fileName="Main_new/Main/PlayerHead_1.xml" xy="730,-59" size="153,132">
<component id="n141_lu84" name="player_info1_2" src="pkx5so" fileName="Main_new/Main/PlayerHead_1.xml" xy="87,788" size="153,132">
<gearDisplay controller="state" pages="1,3,4"/>
<gearXY controller="state" pages="1,3,4" values="87,788|64,-191|62,-201" default="730,-59"/>
<relation target="n118_pkx5" sidePair="right-left,top-top"/>
@ -37,7 +37,7 @@
<gearDisplay controller="state" pages="0,2"/>
<relation target="" sidePair="center-center,top-top"/>
</component>
<component id="n152_kxhm" name="player_info2_2" src="o8k813y" fileName="Main_new/Main_new_2/PlayerHead2_2.xml" xy="2701,486" size="153,132">
<component id="n152_kxhm" name="player_info2_2" src="o8k813y" fileName="Main_new/Main_new_2/PlayerHead2_2.xml" xy="1865,29" size="153,132">
<gearDisplay controller="state" pages="1,3,4"/>
<gearXY controller="state" pages="0,1,3,4" values="2701,486|1865,29|2555,-6|2567,10" default="2007,876"/>
<relation target="n155_gi99" sidePair="left-right,top-top"/>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="2532,1170" designImage="ui://v0j9abjyj6yy1ft" designImageAlpha="0">
<controller name="state" pages="0,准备状态,1,游戏状态,2,回合间状态,3,回放状态,4,观战状态" selected="0"/>
<controller name="state" pages="0,准备状态,1,游戏状态,2,回合间状态,3,回放状态,4,观战状态" selected="1"/>
<controller name="sdk" pages="0,,1," selected="0"/>
<controller name="action" pages="2,空,0,准备,1,开始" selected="0"/>
<controller name="3d" pages="0,,1," selected="0"/>
@ -14,13 +14,13 @@
<component id="n205_hyws" name="com_logo" src="o4nh1ei" fileName="Main_new/Component/com_logo.xml" xy="1200,366" size="435,73">
<relation target="" sidePair="center-center,middle-middle"/>
</component>
<component id="n216_ogwn" name="player_card_info2" src="j6yy1fu" fileName="Main_new/Main_new_2/Player_card_info_E.xml" xy="0,0">
<component id="n216_ogwn" name="player_card_info2" src="j6yy1fu" fileName="Main_new/Main_new_2/Component/NewHandCard/Player_card_info_E.xml" xy="0,0">
<gearDisplay controller="state" pages="1,3,4"/>
</component>
<component id="n217_ogwn" name="player_card_info3" src="inqx13x" fileName="Main_new/Main_new_2/Player_card_info_N.xml" xy="0,0" controller="cStie,1">
<component id="n217_ogwn" name="player_card_info3" src="inqx13x" fileName="Main_new/Main_new_2/Component/NewHandCard/Player_card_info_N.xml" xy="0,0" controller="cStie,1">
<gearDisplay controller="state" pages="1,3,4"/>
</component>
<component id="n218_ogwn" name="player_card_info1" src="inqx13w" fileName="Main_new/Main_new_2/Player_card_info_S.xml" xy="0,0" controller="cStie,1">
<component id="n218_ogwn" name="player_card_info1" src="inqx13w" fileName="Main_new/Main_new_2/Component/NewHandCard/Player_card_info_S.xml" xy="0,0" controller="cStie,1">
<gearDisplay controller="state" pages="1,3,4"/>
</component>
<component id="n115_pkx5" name="player_info1_1" src="pkx5so" fileName="Main_new/Main/PlayerHead_1.xml" xy="1189,909" size="153,132">
@ -30,7 +30,7 @@
<component id="n141_lu84" name="player_info1_2" src="pkx5so" fileName="Main_new/Main/PlayerHead_1.xml" xy="87,788" size="153,132">
<gearDisplay controller="state" pages="1,3,4"/>
</component>
<component id="n116_pkx5" name="player_info2_1" src="pkx5so" fileName="Main_new/Main/PlayerHead_1.xml" xy="1888,519" size="153,132">
<component id="n116_pkx5" name="player_info2_1" src="pkx5so" fileName="Main_new/Main/PlayerHead_1.xml" xy="2004,77" size="153,132">
<gearDisplay controller="state" pages="0,2"/>
<gearXY controller="state" pages="0,1,2" values="1888,519|2004,77|1888,519" default="1194,274"/>
<relation target="" sidePair="middle-middle"/>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="2532,1170" designImage="ui://v0j9abjyj6yy1fw" designImageAlpha="0">
<controller name="state" pages="0,准备状态,1,游戏状态,2,回合间状态,3,回放状态,5,观战状态" selected="0"/>
<controller name="state" pages="0,准备状态,1,游戏状态,2,回合间状态,3,回放状态,5,观战状态" selected="1"/>
<controller name="sdk" pages="0,,1," selected="0"/>
<controller name="action" pages="2,空,0,准备,1,开始" selected="0"/>
<controller name="3d" pages="0,,1," selected="0"/>
@ -15,16 +15,16 @@
<component id="n213_hyws" name="com_logo" src="o4nh1ei" fileName="Main_new/Component/com_logo.xml" xy="1209,328" size="435,73">
<relation target="" sidePair="center-center,middle-middle"/>
</component>
<component id="n224_ogwn" name="player_card_info2" src="j6yy1fu" fileName="Main_new/Main_new_2/Player_card_info_E.xml" xy="0,0" size="2532,1170">
<component id="n224_ogwn" name="player_card_info2" src="j6yy1fu" fileName="Main_new/Main_new_2/Component/NewHandCard/Player_card_info_E.xml" xy="0,0" size="2532,1170">
<gearDisplay controller="state" pages="1,3,5"/>
</component>
<component id="n225_ogwn" name="player_card_info3" src="inqx13x" fileName="Main_new/Main_new_2/Player_card_info_N.xml" xy="0,0" size="2532,1170" controller="cStie,2">
<component id="n225_ogwn" name="player_card_info3" src="inqx13x" fileName="Main_new/Main_new_2/Component/NewHandCard/Player_card_info_N.xml" xy="0,0" size="2532,1170" controller="cStie,2">
<gearDisplay controller="state" pages="1,3,5"/>
</component>
<component id="n227_ogwn" name="player_card_info4" src="j6yy1fv" fileName="Main_new/Main_new_2/Player_card_info_W.xml" xy="0,0" size="2532,1170">
<component id="n227_ogwn" name="player_card_info4" src="j6yy1fv" fileName="Main_new/Main_new_2/Component/NewHandCard/Player_card_info_W.xml" xy="0,0" size="2532,1170">
<gearDisplay controller="state" pages="1,3,5"/>
</component>
<component id="n226_ogwn" name="player_card_info1" src="inqx13w" fileName="Main_new/Main_new_2/Player_card_info_S.xml" xy="0,0" size="2532,1170" controller="cStie,2">
<component id="n226_ogwn" name="player_card_info1" src="inqx13w" fileName="Main_new/Main_new_2/Component/NewHandCard/Player_card_info_S.xml" xy="0,0" size="2532,1170" controller="cStie,2">
<gearDisplay controller="state" pages="1,3,5"/>
</component>
<component id="n115_pkx5" name="player_info1_1" src="pkx5so" fileName="Main_new/Main/PlayerHead_1.xml" xy="1189,909" size="153,132">

View File

@ -1197,8 +1197,8 @@
<image id="gmbn13t" name="Union.png" path="/Main_new/Main/Image/"/>
<image id="gmbn13u" name="button_05 1.png" path="/Main_new/Main/Image/"/>
<component id="zmou13v" name="Main_new_2_jiangxi.xml" path="/Main_new/" exported="true"/>
<component id="inqx13w" name="Player_card_info_S.xml" path="/Main_new/Main_new_2/"/>
<component id="inqx13x" name="Player_card_info_N.xml" path="/Main_new/Main_new_2/"/>
<component id="inqx13w" name="Player_card_info_S.xml" path="/Main_new/Main_new_2/Component/NewHandCard/"/>
<component id="inqx13x" name="Player_card_info_N.xml" path="/Main_new/Main_new_2/Component/NewHandCard/"/>
<component id="o8k813y" name="PlayerHead2_2.xml" path="/Main_new/Main_new_2/"/>
<image id="vum113z" name="b201_0.png" path="/images/cards3/" exported="true"/>
<image id="kzuz140" name="opt_hu_no_nor.png" path="/Main_new/Main/Image/"/>
@ -1529,8 +1529,8 @@
<image id="j6yy1fr" name="e64501792ed1d68d0c12c5668437a69 1.png" path="/Main_new/Image/"/>
<image id="j6yy1fs" name="Screenshot_20250412-160003.png" path="/Main_new/Image/"/>
<image id="j6yy1ft" name="de87786dd190bbd4d4c7dbfff2484d89_720 1.png" path="/Main_new/Image/"/>
<component id="j6yy1fu" name="Player_card_info_E.xml" path="/Main_new/Main_new_2/"/>
<component id="j6yy1fv" name="Player_card_info_W.xml" path="/Main_new/Main_new_2/"/>
<component id="j6yy1fu" name="Player_card_info_E.xml" path="/Main_new/Main_new_2/Component/NewHandCard/"/>
<component id="j6yy1fv" name="Player_card_info_W.xml" path="/Main_new/Main_new_2/Component/NewHandCard/"/>
<image id="j6yy1fw" name="4918b5270e436c54b44d48f0bb79114 3.png" path="/Main_new/Image/"/>
<image id="j6yy1fz" name="微信图片_20250813225357_169.jpg" path="/Main_new/Image/"/>
<component id="kikc1g0" name="Cgm_message.xml" path="/component/notice_old/"/>
@ -1540,6 +1540,8 @@
<component id="kikc1g4" name="com_notice.xml" path="/Main_new/"/>
<image id="kikc1g5" name="result_tips_bg.png" path="/component/notice_old/"/>
<image id="smbw1g6" name="4918b5270e436c54b44d48f0bb79114 3(1).png" path="/Main_new/Image/"/>
<component id="wcy51g7" name="Btn_Card.xml" path="/Main_new/Main_new_2/Component/NewHandCard/Component/" exported="true"/>
<component id="wcy51g8" name="com_OutCard_Vertical.xml" path="/Main_new/Main_new_2/Component/NewHandCard/Component/"/>
</resources>
<publish name="Main_Majiang" path="..\wb_unity_pro\Assets\ART\base\main_majiang\ui" packageCount="2"/>
</packageDescription>

View File

@ -124,5 +124,5 @@ TextureImporter:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
assetBundleVariant:

View File

@ -88,5 +88,5 @@ TextureImporter:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleName: base/main_majiang/d2fa434d27dc07bf09395dc32491060b
assetBundleVariant:

View File

@ -127,7 +127,12 @@
SingleRow,
FlowHorizontal,
FlowVertical,
Pagination
Pagination,
// 自定义LayoutType实现倒叙渲染
FlowHorizontal_right2left_top2bottom, //水平右到左<<<<,上到下
FlowHorizontal_left2right_bottom2top, //水平左到右>>>>,下到上
FlowVertical_right2left_bottom2top, //垂直右到左<<<<,下到上
}
public enum ListSelectionMode

View File

@ -2611,6 +2611,102 @@ namespace FairyGUI
ch = Mathf.CeilToInt(maxHeight);
}
}
else if (_layout == ListLayoutType.FlowHorizontal_left2right_bottom2top)
{
curY = viewHeight;
for (i = 0; i < cnt; i++)
{
child = GetChildAt(i);
if (foldInvisibleItems && !child.visible)
continue;
if (curX != 0)
curX += _columnGap;
if (_columnCount != 0 && j >= _columnCount
|| _columnCount == 0 && curX + child.width > viewWidth && maxHeight != 0)
{
//new line
curX = 0;
curY -= Mathf.CeilToInt(maxHeight) + _lineGap;
maxHeight = 0;
j = 0;
}
child.SetXY(curX, curY - child.height);
curX += Mathf.CeilToInt(child.width);
if (curX > maxWidth)
maxWidth = curX;
if (child.height > maxHeight)
maxHeight = child.height;
j++;
}
ch = viewHeight;//curY + Mathf.CeilToInt(maxHeight);
cw = viewWidth;//Mathf.CeilToInt(maxWidth);
}
else if (_layout == ListLayoutType.FlowHorizontal_right2left_top2bottom)
{
curX = viewWidth; //curX = 0;
for (i = 0; i < cnt; i++)
{
child = GetChildAt(i);
if (foldInvisibleItems && !child.visible)
continue;
if (curX != viewWidth) //if (curX != 0)
curX -= _columnGap; //curX += _columnGap;
//if (_columnCount != 0 && j >= _columnCount || _columnCount == 0 && curX + child.width > viewWidth && maxHeight != 0)
if (_columnCount != 0 && j >= _columnCount || _columnCount == 0 && curX - child.width < 0 && maxHeight != 0)
{
//new line
curX = viewWidth; //curX = 0;
curY += Mathf.CeilToInt(maxHeight) + _lineGap;
maxHeight = 0;
j = 0;
}
child.SetXY(curX - child.width, curY);
curX -= Mathf.CeilToInt(child.width); //curX += Mathf.CeilToInt(child.width);
if (viewWidth - curX > maxWidth) //if (curX > maxWidth)
maxWidth = viewWidth - curX; //maxWidth = curX;
if (child.height > maxHeight)
maxHeight = child.height;
j++;
}
ch = viewHeight;//curY + Mathf.CeilToInt(maxHeight);
cw = viewWidth;//Mathf.CeilToInt(maxWidth);
}
else if (_layout == ListLayoutType.FlowVertical_right2left_bottom2top)
{
curY = viewHeight;
curX = viewWidth;
for (i = 0; i < cnt; i++)
{
child = GetChildAt(i);
if (foldInvisibleItems && !child.visible)
continue;
if (curY != viewHeight) //if (curY != 0)
curY -= _lineGap; //
if (_lineCount != 0 && j >= _lineCount
|| _lineCount == 0 && curY - child.height < 0 && maxWidth != 0)
{
curY = viewHeight; //curY = 0;
curX -= Mathf.CeilToInt(maxWidth) + _columnGap; //curX += Mathf.CeilToInt(maxWidth) + _columnGap;
maxWidth = 0;
j = 0;
}
child.SetXY(curX - child.width, curY - child.height); //
curY -= child.height; //curY += child.height;
if (viewHeight - curY > maxHeight) //if (curY > maxHeight)
maxHeight = viewHeight - curY;
if (child.width > maxWidth)
maxWidth = child.width;
j++;
}
cw = viewWidth;//viewWidth - curX + Mathf.CeilToInt(maxWidth);
ch = viewHeight;//Mathf.CeilToInt(maxHeight);
}
else //pagination
{
int page = 0;

View File

@ -230,6 +230,7 @@ public static class CustomSettings
_GT(typeof(FairyGUI.TextField)),
_GT(typeof(EmojiDitc)),
_GT(typeof(EaseType)),
_GT(typeof(ListLayoutType)),
};
public static List<Type> dynamicList = new List<Type>()

View File

@ -65,8 +65,9 @@ public class GameApplication : MonoBehaviour
NetManager.TIMEOUT_TIME = 10;
NetManager.debug_print = false;
// UIConfig.depthSupportForPaintingMode = false;
// Singleton<LogManager>.GetInstance();
UIConfig.depthSupportForPaintingMode = true;
// UIConfig.depthSupportForPaintingMode = false;
// Singleton<LogManager>.GetInstance();
}
@ -76,7 +77,7 @@ public class GameApplication : MonoBehaviour
{
SDKCallBack.Instance.AuthCallback = __OnWXCallBack;
SDKCallBack.Instance.ShareCallback = _OnSharecallback;
UIConfig.depthSupportForPaintingMode = true;
}
internal void StartGame()

View File

@ -198,9 +198,9 @@ public class Hotupdate {
public void LoadAsset()
{
Done = true;
Progress = 1;
return;
//Done = true; 屏蔽更新调试
//Progress = 1;
//return;
GameApplication.Instance.StartCoroutine(__LoadAsset());
}

View File

@ -0,0 +1,99 @@
//this source code was auto-generated by tolua#, do not modify it
using System;
using LuaInterface;
public class FairyGUI_ListLayoutTypeWrap
{
public static void Register(LuaState L)
{
L.BeginEnum(typeof(FairyGUI.ListLayoutType));
L.RegVar("SingleColumn", get_SingleColumn, null);
L.RegVar("SingleRow", get_SingleRow, null);
L.RegVar("FlowHorizontal", get_FlowHorizontal, null);
L.RegVar("FlowVertical", get_FlowVertical, null);
L.RegVar("Pagination", get_Pagination, null);
L.RegVar("FlowHorizontal_right2left_top2bottom", get_FlowHorizontal_right2left_top2bottom, null);
L.RegVar("FlowHorizontal_left2right_bottom2top", get_FlowHorizontal_left2right_bottom2top, null);
L.RegVar("FlowVertical_right2left_bottom2top", get_FlowVertical_right2left_bottom2top, null);
L.RegFunction("IntToEnum", IntToEnum);
L.EndEnum();
TypeTraits<FairyGUI.ListLayoutType>.Check = CheckType;
StackTraits<FairyGUI.ListLayoutType>.Push = Push;
}
static void Push(IntPtr L, FairyGUI.ListLayoutType arg)
{
ToLua.Push(L, arg);
}
static bool CheckType(IntPtr L, int pos)
{
return TypeChecker.CheckEnumType(typeof(FairyGUI.ListLayoutType), L, pos);
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_SingleColumn(IntPtr L)
{
ToLua.Push(L, FairyGUI.ListLayoutType.SingleColumn);
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_SingleRow(IntPtr L)
{
ToLua.Push(L, FairyGUI.ListLayoutType.SingleRow);
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_FlowHorizontal(IntPtr L)
{
ToLua.Push(L, FairyGUI.ListLayoutType.FlowHorizontal);
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_FlowVertical(IntPtr L)
{
ToLua.Push(L, FairyGUI.ListLayoutType.FlowVertical);
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_Pagination(IntPtr L)
{
ToLua.Push(L, FairyGUI.ListLayoutType.Pagination);
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_FlowHorizontal_right2left_top2bottom(IntPtr L)
{
ToLua.Push(L, FairyGUI.ListLayoutType.FlowHorizontal_right2left_top2bottom);
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_FlowHorizontal_left2right_bottom2top(IntPtr L)
{
ToLua.Push(L, FairyGUI.ListLayoutType.FlowHorizontal_left2right_bottom2top);
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_FlowVertical_right2left_bottom2top(IntPtr L)
{
ToLua.Push(L, FairyGUI.ListLayoutType.FlowVertical_right2left_bottom2top);
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int IntToEnum(IntPtr L)
{
int arg0 = (int)LuaDLL.lua_tonumber(L, 1);
FairyGUI.ListLayoutType o = (FairyGUI.ListLayoutType)arg0;
ToLua.Push(L, o);
return 1;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 566c7c95380c94e48b7020e034ac315f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -136,6 +136,7 @@ public static class LuaBinder
FairyGUI_ImageWrap.Register(L);
FairyGUI_TextFieldWrap.Register(L);
FairyGUI_EaseTypeWrap.Register(L);
FairyGUI_ListLayoutTypeWrap.Register(L);
FairyGUI_GearBaseWrap.Register(L);
FairyGUI_BaseFontWrap.Register(L);
L.RegFunction("GTweenCallback", FairyGUI_GTweenCallback);

View File

@ -24,34 +24,34 @@
"bundle": "extend/poker2/suoha"
},
{
"ver": "1.0.30",
"ver": "1.0.22",
"name": "南城麻将",
"check": true,
"version": "1.0.30",
"version": "1.0.22",
"game_id": "86",
"bundle": "extend/majiang/nancheng"
},
{
"ver": "1.0.31",
"ver": "1.0.33",
"name": "黎川麻将",
"check": true,
"version": "1.0.31",
"version": "1.0.33",
"game_id": "87",
"bundle": "extend/majiang/lichuan"
},
{
"ver": "1.0.17",
"ver": "1.0.19",
"name": "金溪麻将",
"check": true,
"version": "1.0.17",
"version": "1.0.19",
"game_id": "88",
"bundle": "extend/majiang/jinxi"
},
{
"ver": "1.0.16",
"ver": "1.0.18",
"name": "抚州麻将",
"check": true,
"version": "1.0.16",
"version": "1.0.18",
"game_id": "89",
"bundle": "extend/majiang/fuzhou"
}

View File

@ -1,109 +1,109 @@
[
{
"lua_path": "/tolua_project,/base_project,/main_project",
"ver": "1.0.8",
"ver": "1.0.7",
"name": "base_script",
"check": true,
"bundle": "base/base_script",
"version": "1.0.8"
"version": "1.0.7"
},
{
"ver": "1.0.8",
"ver": "1.0.7",
"name": "common",
"check": true,
"bundle": "base/common",
"version": "1.0.8"
"version": "1.0.7"
},
{
"ver": "1.0.8",
"ver": "1.0.7",
"name": "login",
"check": true,
"bundle": "base/login",
"version": "1.0.8"
"version": "1.0.7"
},
{
"ver": "1.0.8",
"ver": "1.0.7",
"name": "lobby",
"check": true,
"bundle": "base/lobby",
"version": "1.0.8"
"version": "1.0.7"
},
{
"ver": "1.0.8",
"ver": "1.0.7",
"name": "Family",
"check": true,
"bundle": "base/Family",
"version": "1.0.8"
"version": "1.0.7"
},
{
"ver": "1.0.8",
"ver": "1.0.7",
"name": "chat",
"check": true,
"bundle": "base/chat",
"version": "1.0.8"
"version": "1.0.7"
},
{
"ver": "1.0.8",
"ver": "1.0.7",
"name": "newgroup",
"check": true,
"bundle": "base/newgroup",
"version": "1.0.8"
"version": "1.0.7"
},
{
"ver": "1.0.8",
"ver": "1.0.7",
"name": "rank",
"check": true,
"version": "1.0.8",
"version": "1.0.7",
"bundle": "base/rank"
},
{
"ver": "1.0.8",
"ver": "1.0.7",
"name": "main_majiang",
"check": true,
"version": "1.0.8",
"version": "1.0.7",
"bundle": "base/main_majiang"
},
{
"ver": "1.0.8",
"ver": "1.0.7",
"name": "main_poker",
"check": true,
"version": "1.0.8",
"version": "1.0.7",
"bundle": "base/main_poker"
},
{
"ver": "1.0.8",
"ver": "1.0.7",
"name": "main_zipai",
"check": true,
"version": "1.0.8",
"version": "1.0.7",
"bundle": "base/main_zipai"
},
{
"ver": "1.0.8",
"ver": "1.0.7",
"name": "static",
"check": true,
"bundle": "base/static",
"version": "1.0.8"
"version": "1.0.7"
},
{
"ver": "1.0.8",
"ver": "1.0.7",
"is_res": true,
"name": "embed",
"check": true,
"bundle": "base/embed",
"version": "1.0.8"
"version": "1.0.7"
},
{
"ver": "1.0.8",
"ver": "1.0.7",
"name": "main_pokemajiang",
"check": true,
"version": "1.0.8",
"version": "1.0.7",
"bundle": "base/main_pokemajiang"
},
{
"ver": "1.0.8",
"ver": "1.0.7",
"name": "main_zipaimajiang",
"check": true,
"version": "1.0.8",
"version": "1.0.7",
"bundle": "base/main_zipaimajiang"
}
]

View File

@ -36,8 +36,8 @@ TagManager:
-
-
-
-
-
- VUI
- Hidden VUI
m_SortingLayers:
- name: Default
uniqueID: 0