保险箱积分

master
罗家炜 2025-06-20 02:17:27 +08:00
parent 866ca2e5d6
commit f4393e45d4
6 changed files with 234 additions and 299 deletions

View File

@ -10,7 +10,7 @@ local FGAssistView = import('.FGAssistView')
MainView = {}
-- 继承 BaseView
setmetatable(MainView, {__index = BaseView})
setmetatable(MainView, { __index = BaseView })
local M = MainView
@ -37,23 +37,22 @@ end
function M:SetTuoGuanState()
--printlog("初始化设置托管状态")
if ControllerManager.enterPlayerData and #ControllerManager.enterPlayerData>0 then
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)]
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 t = ControllerManager.enterPlayerData[i].entrust_time
--local isShow=ControllerManager.enterPlayerData[i].entrust
--if isShow==nil then return end
if t and t>0 then
if t and t > 0 then
-- p:IsShowTGTips(true,t)
else
end
end
ControllerManager.enterPlayerData=nil
ControllerManager.enterPlayerData = nil
end
end
@ -120,7 +119,8 @@ function M:InitView(url, isHideIpAdds)
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._view:GetController("state").selectedIndex = self._state.selectedIndex > 0 and
self._state.selectedIndex < 3 and 1 or 0
self.distance_view:Show()
end)
end
@ -149,7 +149,7 @@ function M:InitView(url, isHideIpAdds)
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()
self._co_timer = coroutine.start(function()
while true do
tex_time.text = os.date('%m-%d %H:%M')
local _client = ControllerManager.GameNetClinet
@ -361,25 +361,21 @@ function M:InitView(url, isHideIpAdds)
-- 显示牌友圈助手
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
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
@ -395,11 +391,6 @@ function M:InitView(url, isHideIpAdds)
)
end
end--]]
end
function M:continue_game(continue)
@ -580,7 +571,7 @@ function M:EventInit()
_gamectr:AddEventListener(
GameEvent.PlayerState,
function(...)
local arg = {...}
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
@ -596,7 +587,7 @@ function M:EventInit()
_gamectr:AddEventListener(
GameEvent.DeskBreak,
function(...)
local arg = {...}
local arg = { ... }
local code = arg[1]
if code == 0 then
if self.dismissWin == nil then
@ -625,7 +616,7 @@ function M:EventInit()
_gamectr:AddEventListener(
GameEvent.Interaction,
function(...)
local arg = {...}
local arg = { ... }
local p = arg[1]
if not p or not p.seat or p.seat == 0 then
return
@ -686,22 +677,19 @@ function M:EventInit()
GameEvent.TupGuanOpen,
function(...)
--print("刷新托管数据=====")
local arg = {...}
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])
info:IsShowTGTips(arg[2], arg[3])
end
if info and info.SetShowTGTips then
info:SetShowTGTips(arg[2],arg[3])
info:SetShowTGTips(arg[2], arg[3])
end
end
)
end
-- 设置能否互动,1允许,0禁止
@ -787,7 +775,7 @@ end
function M:OnPlayerEnter(...)
printlog("进入房间222222222222222222++++++++++++++++++++++++++++")
local arg = {...}
local arg = { ... }
local p = arg[1]
if
p ~= self._room.self_player and self._room.room_config.people_num <= 4 and
@ -803,7 +791,8 @@ function M:OnPlayerEnter(...)
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._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
@ -815,19 +804,19 @@ function M:OnPlayerEnter(...)
end
function M:OnPlayerReady(...)
local arg = {...}
local arg = { ... }
local p = arg[1]
if p.isSendCardState~=nil and p.isSendCardState==true then
p.isSendCardState=false
ControllerManager.IsSendCard=false
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
if ControllerManager.IsSendCard == true then
print("以发送开牌======================")
return
else
@ -835,7 +824,7 @@ function M:OnPlayerReady(...)
ControllerManager.OnConnect(SocketCode.TimeoutDisconnect)
ViewManager.refreshGameView()
end
ControllerManager.IsSendCard=false
ControllerManager.IsSendCard = false
end)
end
@ -850,7 +839,7 @@ function M:OnPlayerReady(...)
end
function M:OnUpdateInfo(...)
local arg = {...}
local arg = { ... }
local p = arg[1]
local t = arg[2]
-- 托管状态变化
@ -914,14 +903,14 @@ function M:MarkSelfTuoguan()
_msg_view = nil
end
)
local roate=GRoot.inst.width/GRoot.inst.height
local num=100
if roate<1.9 then
num=250
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.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
)
@ -936,7 +925,7 @@ function M:UnmarkSelfTuoguan()
end
function M:OnPlayerLeave(...)
local arg = {...}
local arg = { ... }
local p = arg[1]
local info = self._player_info[self:GetPos(p.seat)]
info._view.visible = false
@ -997,10 +986,12 @@ function M:OnUpdate()
if (self._popEvent) then
local func = self._gamectr:PopEvent()
if (func ~= nil) then
if pcall(func) then
local result, resultInfo = pcall(func)
print("lingmeng PopEvent", result, resultInfo)
if result then
else
printlog("lingmeng eror", resultInfo)
self._gamectr = ControllerManager.GetController(GameController)
if self._gamectr then
self._gamectr:ResetConnect()
@ -1019,16 +1010,16 @@ function M:OnUpdate()
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]
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]
for i = 2, 4 do
local text = self["_tex_leftTime" .. i]
if text then
text.text = tostring(leftTime)
end
@ -1048,8 +1039,8 @@ function M:OnUpdate()
if self._tex_leftTime then
self._tex_leftTime.text = '00'
end
for i=2,4 do
local text = self["_tex_leftTime"..i]
for i = 2, 4 do
local text = self["_tex_leftTime" .. i]
if text then
text.text = '00'
end
@ -1080,9 +1071,11 @@ function M:OnUpdate()
self:OnMuShiUpdate()
end
end
function M:onLeftTimeOver()
end
function M:Clear()
-- self:__CloseTip()
for i = 1, #self._player_info do
@ -1090,14 +1083,12 @@ function M: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
@ -1137,7 +1128,8 @@ function M:Show()
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._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
@ -1161,5 +1153,4 @@ function M:Destroy()
BaseView.Destroy(self)
BaseWindow.DestroyAll()
ResourcesManager.UnLoadGroup('base_chat')
end

View File

@ -7,75 +7,10 @@
"/"
],
"libview.iconScale": 0,
"doc.openedDocs": [
"ui://2d9xdj6zfn7fao",
"ui://m7iejg4610snh5j",
"ui://m7iejg46kwi0hma",
"ui://27vd145bm16m7iji",
"ui://m7iejg46xt5s7ij4",
"ui://m7iejg46xt5s7ij3",
"ui://m7iejg46xt5s7ij2",
"ui://m7iejg46xt5s7iiy",
"ui://m7iejg46gltdhc9",
"ui://m7iejg46irlqi02",
"ui://m7iejg46imp57ih2",
"ui://m7iejg46ilon7i9l",
"ui://m7iejg46iaes7idc",
"ui://m7iejg46iaes7idk",
"ui://m7iejg46iaes7idb",
"ui://m7iejg46iaes7idj",
"ui://m7iejg46ilon7i9m",
"ui://0khx14are0py2",
"ui://m7iejg46ilon7ia2",
"ui://m7iejg46ilon7ias",
"ui://m7iejg46ilon7ibc",
"ui://m7iejg46imp57ihp",
"ui://9n9stu2eprgzf0",
"ui://ppu1wv76j4mf9j",
"ui://ppu1wv76j4mf9d",
"ui://ppu1wv76j4mf9e",
"ui://ppu1wv76j4mf9k",
"ui://v6yvqp7wf55qwa",
"ui://v6yvqp7wf55qw7",
"ui://m7iejg46kwi0hkb",
"ui://m7iejg46mpllhv2",
"ui://m7iejg46kwi0hkl",
"ui://m7iejg46mpllhv5",
"ui://m7iejg46mkdvhdu",
"ui://v6yvqp7wf55qw5",
"ui://v6yvqp7waen81bs",
"ui://v6yvqp7waen81b0",
"ui://v6yvqp7waen81bf",
"ui://v6yvqp7wf55qvt",
"ui://v6yvqp7wf55qwb",
"ui://9n9stu2ethxkcis",
"ui://v0j9abjygq7ms2",
"ui://v0j9abjygq7m8f",
"ui://v0j9abjygq7m8l",
"ui://v0j9abjygq7m8u",
"ui://v0j9abjyp0aisn",
"ui://v0j9abjygq7med",
"ui://v0j9abjyp0aism",
"ui://v0j9abjygq7mgx",
"ui://v0j9abjygq7mh1",
"ui://m7iejg46z3847i6m",
"ui://m7iejg46kwi0hk0",
"ui://m7iejg46imp57igy",
"ui://m7iejg46imp57ih3",
"ui://m7iejg46hsbhhjn",
"ui://m7iejg46l679hwn",
"ui://m7iejg46l679hws",
"ui://m7iejg46n5sxha2",
"ui://m7iejg46cioeho9",
"ui://m7iejg46z3847i6q",
"ui://m7iejg46m16m7igb",
"ui://m7iejg46imp57igl",
"ui://m7iejg46imp57igi"
],
"doc.openedDocs": [],
"test.device": "720p Phone",
"canvasColor": 10066329,
"auxline2": true,
"doc.activeDoc": "ui://m7iejg46mpllhv5",
"libview.twoColumn": false,
"libview.expandedNodes": [
"s63l0suw",
@ -95,7 +30,15 @@
"v6yvqp7w",
"/component/Main/",
"v6yvqp7w",
"/component/Main/component/"
"/component/Main/component/",
"m7iejg46",
"/",
"m7iejg46",
"/mgr/",
"m7iejg46",
"/mgr/component/",
"m7iejg46",
"/mgr/component/play_set/"
],
"auxline1": true,
"snapToGrid": true,

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="55,262">
<controller name="c1" pages="0,,1,,2," selected="2"/>
<controller name="c1" pages="0,,1,,2," selected="0"/>
<controller name="hu" pages="0,,1,,2,,3,,4," selected="0"/>
<displayList>
<loader id="n18_of6w" name="card_4" xy="0,166" pivot="0.5,0.5" size="55,67" group="n19_of6w" aspect="true" rotation="180" fill="scale">

View File

@ -24,10 +24,10 @@
<gearDisplay controller="button" pages="1"/>
<Button icon="ui://v6yvqp7wn1ry3r"/>
</component>
<text id="n14_pt1r" name="n14" xy="62,2" size="92,31" group="n19_pt1r" fontSize="22" color="#ffffff" align="center" vAlign="middle" text="房间号:"/>
<text id="n14_pt1r" name="n14" xy="62,2" size="92,32" group="n19_pt1r" fontSize="22" color="#ffffff" align="center" vAlign="middle" text="房间号:"/>
<text id="n15_pt1r" name="tex_roomnum" xy="166,1" size="76,41" group="n19_pt1r" fontSize="22" color="#ffffff" vAlign="middle" autoSize="none" text="123456&#xA;"/>
<text id="n16_pt1r" name="tex_game" xy="916,9" size="114,31" group="n19_pt1r" fontSize="22" color="#ffffff" vAlign="middle" text="娄底放炮罚"/>
<text id="n17_pt1r" name="tex_data" xy="1106,3" size="145,39" group="n19_pt1r" fontSize="28" color="#b25116" align="center" vAlign="middle" text="2017-02-12"/>
<text id="n16_pt1r" name="tex_game" xy="916,9" size="114,32" group="n19_pt1r" fontSize="22" color="#ffffff" vAlign="middle" text="娄底放炮罚"/>
<text id="n17_pt1r" name="tex_data" xy="1106,3" size="150,39" group="n19_pt1r" fontSize="28" color="#b25116" align="center" vAlign="middle" text="2017-02-12"/>
<group id="n19_pt1r" name="room_info" xy="62,1" size="1189,41" group="n70_dunj"/>
<text id="n49_g8y2" name="n49" xy="475,600" size="457,74" group="n70_dunj" visible="false" fontSize="18" color="#999999" vAlign="middle" autoSize="none" singleLine="true" text="此页面仅用于娱乐竞技展示,禁止一切赌博行为!">
<gearDisplay controller="over" pages="1"/>
@ -103,7 +103,7 @@
<item/>
</list>
<text id="n42_n1ry" name="score" xy="986,364" size="256,42" group="n45_n1ry" fontSize="30" color="#924e00" vAlign="middle" autoSize="none" bold="true" singleLine="true" text=""/>
<text id="n56_fnpw" name="222" xy="767,567" size="82,37" group="n58_fnpw" fontSize="26" color="#b25116" vAlign="middle" text="弃牌:"/>
<text id="n56_fnpw" name="222" xy="767,567" size="82,36" group="n58_fnpw" fontSize="26" color="#b25116" vAlign="middle" text="弃牌:"/>
<list id="n62_fnpw" name="qipai_list" xy="955,479" size="298,157" group="n58_fnpw" layout="row" colGap="1" defaultItem="ui://ppu1wv76j4mf9e" vAlign="middle">
<item/>
<item/>

View File

@ -441,7 +441,7 @@
<image id="thxk7dor" name="Group 638@2x.png" path="/images/index/"/>
<image id="thxk7dos" name="Group 639.png" path="/images/index/"/>
<image id="thxk7dot" name="Group 639@2x.png" path="/images/index/"/>
<image id="thxk7dou" name="Rectangle 23.png" path="/images/index/" scale="9grid" scale9grid="47,17,986,36"/>
<image id="thxk7dou" name="Rectangle 23.png" path="/images/index/" scale="9grid" scale9grid="47,17,986,36" atlas="alone"/>
<image id="thxk7dov" name="Rectangle 23@2x.png" path="/images/index/" atlas="alone"/>
<image id="thxk7dow" name="hecheng 1_00048.png" path="/images/clip_joinRoom/" exported="true" atlas="9"/>
<image id="thxk7doz" name="taohua_00064.png" path="/images/clip_bg/" exported="true" atlas="6"/>

View File

@ -2,7 +2,7 @@
<component size="1334,750">
<controller name="manager" pages="0,,1," selected="0"/>
<controller name="index" pages="0,,1," selected="0"/>
<controller name="top" pages="0,,1,,2,,3,,4," selected="0"/>
<controller name="top" pages="0,,1,,2,,3,,4," selected="4"/>
<displayList>
<image id="n95_xt5s" name="n95" src="xt5s7iit" fileName="images/jifen/Rectangle 424.png" xy="36,36">
<relation target="" sidePair="width-width%,height-height%"/>
@ -43,6 +43,7 @@
<relation target="n87_vyn3" sidePair="left-left%,top-top%"/>
</text>
<text id="n33_gltd" name="n33" xy="1110,145" size="142,61" group="n34_gltd" font="Microsoft YaHei" fontSize="24" color="#884f00" align="center" vAlign="middle" autoSize="none" bold="true" text="当前积分">
<gearText controller="top" pages="3" values="保险箱积分" default="当前积分"/>
<relation target="" sidePair=""/>
<relation target="n87_vyn3" sidePair="left-left%,top-top%"/>
</text>
@ -148,7 +149,7 @@
</text>
<image id="n82_et16" name="n82" pkg="m7iejg46" src="et167i3a" fileName="积分详情11_PxCook.png" xy="-216,0" pivot="0.5,0" visible="false" alpha="0.5"/>
<component id="n105_xt5s" name="btn_all" src="xt5s7iix" fileName="images/jifen/btn_all.xml" xy="167,64" group="n103_xt5s">
<Button checked="true" controller="top" page="0"/>
<Button controller="top" page="0"/>
</component>
<component id="n106_xt5s" name="btn_filter1" src="xt5s7iiy" fileName="images/jifen/btn_filter1.xml" xy="367,64" group="n103_xt5s">
<Button controller="top" page="1"/>
@ -160,7 +161,7 @@
<Button controller="top" page="3"/>
</component>
<component id="n109_xt5s" name="btn_filter64" src="xt5s7ij4" fileName="images/jifen/btn_filter64.xml" xy="967,64" group="n103_xt5s">
<Button controller="top" page="4"/>
<Button checked="true" controller="top" page="4"/>
</component>
<group id="n103_xt5s" name="newFillter" xy="167,64" size="1000,56" advanced="true">
<relation target="" sidePair="center-center,middle-middle"/>