8.26提交

master
罗家炜 2025-08-26 17:25:29 +08:00
parent 1813727234
commit 1e519e4a60
47 changed files with 182 additions and 22 deletions

View File

@ -362,8 +362,11 @@ end
-- 网络状态更新
function M:OnEventOnlineState(evt_data)
printlog("lingmeng OnEventOnlineState")
self._cacheEvent:Enqueue(
function()
printlog("lingmeng OnEventOnlineState1")
local playerid = evt_data['aid']
local online = evt_data['online']
local player = DataManager.CurrenRoom:GetPlayerById(playerid)

View File

@ -162,6 +162,7 @@ function M:connect(host, groupId, callback)
group.ban_chat2 = res.Data.ban_chat2
group.isvip = res.Data.isvip
group.isWatch = res.Data.isWatch
group.messageCount = res.Data.messageCount
group.joinsData = {}
else
self.code = SocketCode.ExceptionOnConnect
@ -648,7 +649,7 @@ function M:OnRefNumberBan(evt_data)
local group = DataManager.groups:get(self.groupId)
group:addMember(tem)
pt("lingmeng ccc OnRefNumberBan1",evt_data)
pt("lingmeng ccc OnRefNumberBan1", evt_data)
DispatchEvent(self._dispatcher, GroupMgrEvent.OnRefNumberBan, evt_data)
end

View File

@ -99,6 +99,15 @@ function M:RecordItemDetailRender(round, allDate, rdata, obj)
for i = 1, #rdata do
local obj2 = list:AddItemFromPool()
obj2:GetChild('title').text = rdata[i].score
if allDate.applyDismisUserId and allDate.applyDismisUserId ~= "" then
if round == tonumber(allDate.round) then
obj2:GetController('jiesan').selectedIndex = rdata[i].nick == allDate.applyDismisUserId and 1 or 2
end
end
end
if round == tonumber(allDate.round) then
obj:GetController('jiesan_mng').selectedIndex = (not allDate.applyDismisUserId or allDate.applyDismisUserId == "") and
1 or 0
end
local btn_play = obj:GetChild("n10")

View File

@ -326,8 +326,7 @@ end
function M:RemindCardRender(data, obj)
local room = DataManager.CurrenRoom
obj.icon = string.format("ui://Main_Majiang/b202_%d", data)
print("lingmeng icon", obj.icon)
obj.icon = string.format("ui://Main_Majiang/%s202_%d", self:GetPrefix(), data)
if room.jing == data then
obj:GetController('jing').selectedIndex = 1
end

View File

@ -245,6 +245,10 @@ function M:OnEventFzTips(evt_data)
-- end
tiplist:AddTip(tip)
end
--排序规则,胡杠碰
tiplist:SortList(function(a, b)
return a.type < b.type
end)
DispatchEvent(self._dispatcher, TX_GameEvent.FZTips, tiplist, weight)
end)
end

View File

@ -59,7 +59,9 @@ function M:InitView(url)
--]]
local config = ExtendManager.GetExtendConfig(room.game_id)
local mode = config:GetGameInfo()
local gamePlay = mode:LoadConfigToDetail(json.encode(room.room_config.config), json.encode(room.room_config.hpData))
pt("lingmeng", room)
local gamePlay = mode:LoadConfigToDetail(json.encode(room.room_config.config),
json.encode(room.room_config.config.hpData))
self._view:GetChild('wanfa_text').text = gamePlay
self.jing = self._view:GetChild('jing')
@ -177,9 +179,11 @@ function M:UpdatePlayerInfoView()
local list = self._room.player_list
for i = 1, self._room.room_config.people_num do
local tem = self._view:GetChild(string.format("player_info%d_%d", i, (self._state.selectedIndex % 2) + 1))
_player_info[i] = PlayerInfoView.new(tem, self)
_player_info[i]:FillData(list[i])
local seat = self:GetPos(list[i].seat)
local tem = self._view:GetChild(string.format("player_info%d_%d", seat, (self._state.selectedIndex % 2) + 1))
_player_info[seat] = PlayerInfoView.new(tem, self)
_player_info[seat]:FillData(list[i])
printlog("lingmeng _player_info", tem, seat, list[i].self_user.nick_name)
end
end
@ -315,6 +319,7 @@ function M:EventInit()
end)
_gamectr:AddEventListener(TX_GameEvent.ZPResult1, function(...)
self:PlayMJSound("end_music.mp3")
MJMainView.OnResult1(self, ...)
--[[
self._popEvent = false
@ -456,6 +461,18 @@ function M:EventInit()
end
self.showNextList.numItems = #cardSet
end)
--替换mianview的事件
_gamectr:AddEventListener(
GameEvent.PlayerState,
function(...)
printlog("lingmeng OnEventOnlineState")
local arg = { ... }
local p = arg[1]
local info = self._player_info[self:GetPos(p.seat)]
info._ctr_offline.selectedIndex = p.line_state == 0 and 1 or 0
end
)
end
function M:OutCard(card)
@ -542,20 +559,21 @@ function M:__FangziTip(tip, weight)
local _lit_fanzi = _chipeng_tip:GetChild("list")
--_lit_fanzi:SetVirtual()
local _tlist = tip.tip_map_id
local _tlist = tip.tip_sortList
_lit_fanzi.itemRenderer = function(index, obj)
local type = obj:GetController('type')
if index == tip.tip_num then
type.selectedIndex = 0
obj.onClick:Set(function()
--测试暂时取消过提示
-- local guo_msg = MsgWindow.new(self._root_view, "确定要点过吗?", MsgWindow.MsgMode.OkAndCancel)
-- guo_msg.onOk:Add(function()
_gamectr:SendAction(0)
_ctr_tips.selectedIndex = 0
-- guo_msg:Close()
-- end)
-- guo_msg:Show()
if tip.is_hu then
info._ctr_showGuoHu.selectedIndex = 1
info._viewBtn_guoHu.onClick:Set(function()
_gamectr:SendAction(0)
end)
else
_gamectr:SendAction(0)
end
end)
else
index = index + 1
@ -798,7 +816,7 @@ function M:ReloadRoom(bskip)
end
end
self:ShowJing()
for i = 1, #room.player_list do
local p = room.player_list[i]
local info = self._player_card_info[self:GetPos(p.seat)]

View File

@ -76,7 +76,6 @@ function M:SendOutCard(card, callback)
pt(p.card_list)
table.sort(p.card_list, self.HandCardSortAndJing)
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

View File

@ -167,6 +167,7 @@ function M:InitPlayerInfoView()
local tem = self._view:GetChild(string.format("player_info%d_%d", i, (self._state.selectedIndex % 2) + 1))
_player_info[i] = PlayerInfoView.new(tem, self)
tem.visible = false
printlog("lingmeng _player_info init", tem, i)
end
end
@ -176,9 +177,11 @@ function M:UpdatePlayerInfoView()
local list = self._room.player_list
for i = 1, self._room.room_config.people_num do
local tem = self._view:GetChild(string.format("player_info%d_%d", i, (self._state.selectedIndex % 2) + 1))
_player_info[i] = PlayerInfoView.new(tem, self)
_player_info[i]:FillData(list[i])
local seat = self:GetPos(list[i].seat)
local tem = self._view:GetChild(string.format("player_info%d_%d", seat, (self._state.selectedIndex % 2) + 1))
_player_info[seat] = PlayerInfoView.new(tem, self)
_player_info[seat]:FillData(list[i])
printlog("lingmeng _player_info", tem, seat, list[i].self_user.nick_name)
end
end
@ -289,6 +292,7 @@ function M:EventInit()
self._tex_LeftCard.text = string.format("余%d张", arg[3])
-- self:UpdateRoomInfo()
local info = self._player_card_info[self:GetPos(seat)]
print("lingmeng log GetCard", self:GetPos(seat))
info:UpdateHandCard(true)
end)
@ -485,6 +489,7 @@ function M:EventInit()
end)
_gamectr:AddEventListener(TX_GameEvent.ZPResult2, function(...)
self:PlayMJSound("end_music.mp3")
self:UnmarkSelfTuoguan()
self._left_time = 0
self:UpdateCardBox(0)
@ -551,6 +556,18 @@ function M:EventInit()
end
self.showNextList.numItems = #cardSet
end)
--替换mianview的事件
_gamectr:AddEventListener(
GameEvent.PlayerState,
function(...)
printlog("lingmeng OnEventOnlineState")
local arg = { ... }
local p = arg[1]
local info = self._player_info[self:GetPos(p.seat)]
info._ctr_offline.selectedIndex = p.line_state == 0 and 1 or 0
end
)
end
function M:OutCard(card)
@ -564,6 +581,7 @@ function M:OutCard(card)
info:UpdateHandCard()
info:UpdateOutCardList(nil, card, self._cursor)
info._ctr_tip.selectedIndex = 0
self:PlaySound("LiChuan_MJ", self._room.self_player.self_user.sex, tostring(card))
self:PlayMJSound("chupai.mp3")
-- self:ShowHuTip()
@ -811,7 +829,8 @@ function M:OnFangziAction(...)
local fs_info = _player_card_info[self:GetPos(fz.from_seat)]
fs_info:UpdateOutCardList()
end
info:UpdateFzList(fz, index, true)
local seat = (self._room.room_config.people_num == 2 and fz.from_seat == 2) and 2 or fz.from_seat - 1
info:UpdateFzList(fz, index, true, seat)
local getcard = fz.type == FZType.Peng or fz.type == FZType.Chi
printlog(getcard)
info:UpdateHandCard(getcard)

View File

@ -7,6 +7,7 @@ local MJPlayerCardInfoView = require("main.majiang.MJPlayerCardInfoView")
local SettingView = import(".EXSettingView")
local TableBG = require("Game.Data.TableBG")
local WitnessView = require("Game.View.WitnessView")
local MJMainView = require("main.majiang.MJMainView")
local Record_Event = import(".RecordEvent")

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="2328,150">
<controller name="jiesan_mng" pages="0,,1," selected="0"/>
<displayList>
<image id="n0_slrk" name="n0" src="slrk7d34" fileName="Record/Image/Rectangle 182.png" xy="-11,-12" size="2349,170"/>
<image id="n2_slrk" name="n2" src="slrk7d35" fileName="Record/Image/Rectangle 187.png" xy="162,12"/>
@ -8,11 +9,14 @@
<image id="n8_slrk" name="n8" src="slrk7d35" fileName="Record/Image/Rectangle 187.png" xy="2097,12"/>
<text id="n1_slrk" name="text_round" xy="49,47" size="76,56" font="ui://27vd145bg2mo7ij0" fontSize="42" color="#a62812" autoSize="none" text="999"/>
<text id="n3_slrk" name="text_time" xy="170,27" size="204,96" font="ui://27vd145bg2mo7ij0" fontSize="36" color="#444444" align="center" vAlign="middle" autoSize="shrink" text="2025-03-21&#xA;14:30:23"/>
<list id="n6_slrk" name="list_score" xy="373,0" size="1505,150" layout="flow_hz" scroll="horizontal" lineItemCount="5" defaultItem="ui://htcn7v3rslrk7d36" autoItemSize="true" scrollItemToViewOnClick="false">
<list id="n6_slrk" name="list_score" xy="373,-2" size="1505,150" layout="flow_hz" scroll="horizontal" lineItemCount="5" defaultItem="ui://htcn7v3rslrk7d36" autoItemSize="true" scrollItemToViewOnClick="false">
<item/>
<item/>
</list>
<component id="n9_slrk" name="n9" src="slrk7d39" fileName="Record/Component/btn_share.xml" xy="1896,39"/>
<component id="n10_slrk" name="n10" src="slrk7d3a" fileName="Record/Component/btn_replay.xml" xy="2115,39"/>
<image id="n12_noxu" name="n12" src="noxu7d6a" fileName="Record/Image/guanliyuanjiesan.png" xy="0,0">
<gearDisplay controller="jiesan_mng" pages="1"/>
</image>
</displayList>
</component>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="800,150">
<controller name="jiesan" pages="0,,1,,2," selected="2"/>
<displayList>
<image id="n0_slrk" name="n0" src="slrk7d35" fileName="Record/Image/Rectangle 187.png" xy="0,12">
<relation target="" sidePair="left-left"/>
@ -7,5 +8,11 @@
<text id="n1_slrk" name="title" xy="321,47" size="158,56" font="ui://27vd145bg2mo7ij0" fontSize="42" color="#444444" align="center" vAlign="middle" autoSize="none" text="-9999">
<relation target="" sidePair="center-center,middle-middle"/>
</text>
<image id="n2_noxu" name="n2" src="noxu7d6b" fileName="Record/Image/解散.png" xy="289,21">
<gearDisplay controller="jiesan" pages="1"/>
</image>
<image id="n3_noxu" name="n3" src="noxu7d6c" fileName="Record/Image/同意.png" xy="290,21">
<gearDisplay controller="jiesan" pages="2"/>
</image>
</displayList>
</component>

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -398,6 +398,9 @@
<image id="amfo7d67" name="Group 699.png" path="/Main/Image/" qualityOption="source" disableTrim="true"/>
<image id="amfo7d68" name="Group 700.png" path="/Main/Image/" qualityOption="source" disableTrim="true"/>
<image id="amfo7d69" name="Group 701.png" path="/Main/Image/" qualityOption="source" disableTrim="true"/>
<image id="noxu7d6a" name="guanliyuanjiesan.png" path="/Record/Image/"/>
<image id="noxu7d6b" name="解散.png" path="/Record/Image/"/>
<image id="noxu7d6c" name="同意.png" path="/Record/Image/"/>
</resources>
<publish name="Family" path="..\wb_unity_pro\Assets\ART\base\Family\ui" packageCount="2"/>
</packageDescription>

View File

@ -137,5 +137,6 @@
<text id="n104_kxhm" name="n104" xy="1278,658" size="217,72" group="n106_kxhm" visible="false" font="ui://27vd145bh35o7ill" fontSize="54" color="#450f05" text="五个字啦"/>
<image id="n105_kxhm" name="n105" src="pzuc7cx6" fileName="component/CreatePlay/Image/Line 2.png" pkg="2d9xdj6z" xy="195,741" group="n106_kxhm"/>
<group id="n106_kxhm" name="specialPlay2" xy="195,651" size="1515,93" advanced="true"/>
<component id="n107_sbed" name="com_editSetting" src="f8c37d65" fileName="component/CreatePlay/Component/com_editSetting.xml" pkg="2d9xdj6z" xy="0,743"/>
</displayList>
</component>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 MiB

After

Width:  |  Height:  |  Size: 4.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 560 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 716 KiB

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 484 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 KiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 KiB

View File

@ -0,0 +1,92 @@
fileFormatVersion: 2
guid: 7ff3ac2be65b7b5459c85281dc00cf59
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: base/family/b23cba4d4e164d6d5cb3cff916b9e0a4
assetBundleVariant: