扔番茄
parent
0efe04d84c
commit
c2dd7d7683
|
|
@ -17,7 +17,7 @@ function FamilyEventView.new(root)
|
||||||
mgr_ctr:AddEventListener(GroupMgrEvent.DelRoom, handler(self, self._evtDelRoom))
|
mgr_ctr:AddEventListener(GroupMgrEvent.DelRoom, handler(self, self._evtDelRoom))
|
||||||
mgr_ctr:AddEventListener(GroupMgrEvent.UpdateRoom, handler(self, self._evtUpdateRoom))
|
mgr_ctr:AddEventListener(GroupMgrEvent.UpdateRoom, handler(self, self._evtUpdateRoom))
|
||||||
mgr_ctr:AddEventListener(GroupMgrEvent.UpdatePlayerInfo, handler(self, self._evtUpdatePlayerInfo))
|
mgr_ctr:AddEventListener(GroupMgrEvent.UpdatePlayerInfo, handler(self, self._evtUpdatePlayerInfo))
|
||||||
mgr_ctr:AddEventListener(GroupMgrEvent.BeInvited, handler(self, self._evtInvited))
|
--mgr_ctr:AddEventListener(GroupMgrEvent.BeInvited, handler(self, self._evtInvited))
|
||||||
mgr_ctr:AddEventListener(GroupMgrEvent.UpdateGroup, handler(self, self._evtUpdateGroup))
|
mgr_ctr:AddEventListener(GroupMgrEvent.UpdateGroup, handler(self, self._evtUpdateGroup))
|
||||||
mgr_ctr:AddEventListener(GroupMgrEvent.NewMailTip, handler(self, self._evtNewMailTip))
|
mgr_ctr:AddEventListener(GroupMgrEvent.NewMailTip, handler(self, self._evtNewMailTip))
|
||||||
mgr_ctr:AddEventListener(GroupMgrEvent.InviteResponse, handler(self, self._evtInviteResponse))
|
mgr_ctr:AddEventListener(GroupMgrEvent.InviteResponse, handler(self, self._evtInviteResponse))
|
||||||
|
|
|
||||||
|
|
@ -772,6 +772,14 @@ function M:EventInit()
|
||||||
GameEvent.Interaction,
|
GameEvent.Interaction,
|
||||||
function(...)
|
function(...)
|
||||||
local arg = { ... }
|
local arg = { ... }
|
||||||
|
local data = arg[1]
|
||||||
|
local _type = arg[2].type
|
||||||
|
if _type == "Missile" then
|
||||||
|
local sendSeat = arg[2].sendSeat
|
||||||
|
local targetSeat = arg[2].targetSeat
|
||||||
|
self:Missile(sendSeat, targetSeat, arg[3])
|
||||||
|
end
|
||||||
|
|
||||||
local p = arg[1]
|
local p = arg[1]
|
||||||
if not p or not p.seat or p.seat == 0 then
|
if not p or not p.seat or p.seat == 0 then
|
||||||
return
|
return
|
||||||
|
|
@ -1211,7 +1219,24 @@ function M:SetLanguage(language)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function M:Missile(seat, targetSeat, url, animUrl)
|
function M:Missile(seat, targetSeat, Missile)
|
||||||
|
|
||||||
|
local animUrl = ""
|
||||||
|
local url = ""
|
||||||
|
if Missile == "boom" then
|
||||||
|
animUrl = "ui://Main_Majiang/Missile_boom"
|
||||||
|
url = "ui://Common/boom"
|
||||||
|
elseif Missile == "egg" then
|
||||||
|
animUrl = "ui://Main_Majiang/Missile_egg"
|
||||||
|
url = "ui://Common/egg"
|
||||||
|
elseif Missile == "diamo" then
|
||||||
|
animUrl = "ui://Main_Majiang/Missile_diamo"
|
||||||
|
url = "ui://Common/diamo"
|
||||||
|
elseif Missile == "flower" then
|
||||||
|
animUrl = "ui://Main_Majiang/Missile_flower"
|
||||||
|
url = "ui://Common/flower"
|
||||||
|
end
|
||||||
|
|
||||||
local send = self._player_info[self:GetPos(seat)]
|
local send = self._player_info[self:GetPos(seat)]
|
||||||
local target = self._player_info[self:GetPos(targetSeat)]
|
local target = self._player_info[self:GetPos(targetSeat)]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,14 @@
|
||||||
local playerDetailView = {}
|
local playerDetailView = {}
|
||||||
|
|
||||||
|
local function Send(self, Missile)
|
||||||
|
local _data = {}
|
||||||
|
_data.sendSeat = DataManager.CurrenRoom.self_player.seat --DataManager.SelfUser.account_id
|
||||||
|
_data.targetSeat = self.player.seat
|
||||||
|
_data.type = "Missile"
|
||||||
|
local _gamectr = ControllerManager.GetController(GameController)
|
||||||
|
_gamectr:SendInteraction(DataManager.SelfUser.account_id, _data, Missile)
|
||||||
|
end
|
||||||
|
|
||||||
function playerDetailView.New()
|
function playerDetailView.New()
|
||||||
setmetatable(playerDetailView, { __index = BaseWindow })
|
setmetatable(playerDetailView, { __index = BaseWindow })
|
||||||
local inst = setmetatable({}, { __index = playerDetailView })
|
local inst = setmetatable({}, { __index = playerDetailView })
|
||||||
|
|
@ -37,35 +46,23 @@ function playerDetailView:Init()
|
||||||
self.loader_icon = self._view:GetChild("loader_icon")
|
self.loader_icon = self._view:GetChild("loader_icon")
|
||||||
|
|
||||||
self.btn_boom.onClick:Set(function()
|
self.btn_boom.onClick:Set(function()
|
||||||
|
Send(self, "boom")
|
||||||
local _gamectr = ControllerManager.GetController(GameController)
|
self:Close()
|
||||||
_gamectr:SendInteraction(DataManager.SelfUser.account_id, self.player.seat, "boom")
|
|
||||||
|
|
||||||
local mainView = BaseView.FindView("MainView")
|
|
||||||
if mainView then
|
|
||||||
mainView:Missile(1, self.player.seat, "ui://Common/boom", "ui://Main_Majiang/Missile_boom")
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
self.btn_egg.onClick:Set(function()
|
self.btn_egg.onClick:Set(function()
|
||||||
local mainView = BaseView.FindView("MainView")
|
Send(self, "egg")
|
||||||
if mainView then
|
self:Close()
|
||||||
mainView:Missile(1, self.player.seat, "ui://Common/egg", "ui://Main_Majiang/Missile_egg")
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
self.btn_ring.onClick:Set(function()
|
self.btn_ring.onClick:Set(function()
|
||||||
local mainView = BaseView.FindView("MainView")
|
Send(self, "diamo")
|
||||||
if mainView then
|
self:Close()
|
||||||
mainView:Missile(1, self.player.seat, "ui://Common/diamo", "ui://Main_Majiang/Missile_diamo")
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
self.btn_flower.onClick:Set(function()
|
self.btn_flower.onClick:Set(function()
|
||||||
local mainView = BaseView.FindView("MainView")
|
Send(self, "flower")
|
||||||
if mainView then
|
self:Close()
|
||||||
mainView:Missile(1, self.player.seat, "ui://Common/flower", "ui://Main_Majiang/Missile_flower")
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
<text id="n11_cioe" name="tex_name" xy="318,251" size="350,72" group="n26_p747" font="ui://27vd145bh35o7ili" fontSize="54" color="#983431" autoSize="shrink" singleLine="true" autoClearText="true" text="玩家名字"/>
|
<text id="n11_cioe" name="tex_name" xy="318,251" size="350,72" group="n26_p747" font="ui://27vd145bh35o7ili" fontSize="54" color="#983431" autoSize="shrink" singleLine="true" autoClearText="true" text="玩家名字"/>
|
||||||
<component id="n10_cioe" name="btn_head" src="do2f1z" fileName="component/head/Head2.xml" pkg="27vd145b" xy="140,81" pivot="0.5,0.5" anchor="true" group="n13_cioe" visible="false"/>
|
<component id="n10_cioe" name="btn_head" src="do2f1z" fileName="component/head/Head2.xml" pkg="27vd145b" xy="140,81" pivot="0.5,0.5" anchor="true" group="n13_cioe" visible="false"/>
|
||||||
<text id="n12_cioe" name="tex_id" xy="215,86" size="143,42" group="n13_cioe" visible="false" fontSize="30" color="#663300" singleLine="true" autoClearText="true" text="iD:123456"/>
|
<text id="n12_cioe" name="tex_id" xy="215,86" size="143,42" group="n13_cioe" visible="false" fontSize="30" color="#663300" singleLine="true" autoClearText="true" text="iD:123456"/>
|
||||||
<group id="n13_cioe" name="n13" xy="98,39" size="260,89" group="n26_p747" advanced="true"/>
|
<group id="n13_cioe" name="n13" xy="98,39" size="260,89" group="n26_p747" visible="false" advanced="true"/>
|
||||||
<group id="n26_p747" name="player" xy="98,39" size="570,284"/>
|
<group id="n26_p747" name="player" xy="98,39" size="570,284"/>
|
||||||
<text id="n28_pbp6" name="n28" xy="138,177" size="185,72" group="n30_pbp6" font="ui://27vd145bh35o7ili" fontSize="54" color="#983431" text="亲友圈:"/>
|
<text id="n28_pbp6" name="n28" xy="138,177" size="185,72" group="n30_pbp6" font="ui://27vd145bh35o7ili" fontSize="54" color="#983431" text="亲友圈:"/>
|
||||||
<text id="n29_pbp6" name="tex_group_name" xy="318,177" size="453,72" group="n30_pbp6" font="ui://27vd145bh35o7ili" fontSize="54" color="#983431" autoSize="shrink" singleLine="true" autoClearText="true" text="长沙麻将"/>
|
<text id="n29_pbp6" name="tex_group_name" xy="318,177" size="453,72" group="n30_pbp6" font="ui://27vd145bh35o7ili" fontSize="54" color="#983431" autoSize="shrink" singleLine="true" autoClearText="true" text="长沙麻将"/>
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Reference in New Issue