From 1e04dcc2008c1ca56ce32378a934eb3223b93418 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Tue, 20 Apr 2021 14:52:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8D=E5=AD=97=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Prefabs/Map/UI_MapPoint.prefab | 8 +++---- .../Modules/Fight/View/FightPointMapView.lua | 17 ++++++++++----- .../~Lua/View/SingleFightPlayerView.lua | 21 +++++++++++++++---- 3 files changed, 33 insertions(+), 13 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/Map/UI_MapPoint.prefab b/Assets/ManagedResources/Prefabs/Map/UI_MapPoint.prefab index d7aba1560e..349104226a 100644 --- a/Assets/ManagedResources/Prefabs/Map/UI_MapPoint.prefab +++ b/Assets/ManagedResources/Prefabs/Map/UI_MapPoint.prefab @@ -293,16 +293,16 @@ MonoBehaviour: m_Font: {fileID: 12800000, guid: 6fa15837529b0e640af6620b07d3207d, type: 3} m_FontSize: 34 m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 0 - m_MaxSize: 300 + m_BestFit: 1 + m_MinSize: 20 + m_MaxSize: 34 m_Alignment: 0 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: "\u5764\u54E5\u5764\u54E5\u5764\u54E5\u5764\u54E5\u5764\u54E5" + m_Text: "\u83B7\u5F97\u66F4\u591A\u7684\u795E\u5C06\u5E76\u589E\u52A0\u5386\u7EC3" --- !u!1 &4999992061623016917 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/ManagedResources/~Lua/Modules/Fight/View/FightPointMapView.lua b/Assets/ManagedResources/~Lua/Modules/Fight/View/FightPointMapView.lua index 93642791ab..5c4a3c294f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Fight/View/FightPointMapView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Fight/View/FightPointMapView.lua @@ -110,8 +110,8 @@ function this:Init() if not this.playerViews[0] then --LogGreen(m_curMapId) if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.guajigongneng) then - iconNum = 9 - local randomNum = math.random(2, 4) + iconNum = 12 + local randomNum = math.random(2,4) PlayerManager.GetFightMapPlayerNPCData(randomNum,function(NPCList) --LogGreen("NPCList:"..LengthOfTable(NPCList)) local index = 1 @@ -206,7 +206,7 @@ function this.SetPlayerViewWalk() for k,v in pairs(this.playerViews) do v:SetRoleHitTarget() end - end,1) + end,1.5) this.startTimer:Start() end @@ -232,11 +232,18 @@ function this.AsideTriggerJudge(data,isSelf,_userData) if not this.threads then this.threads = {} end - if this.isClose then - return + if this.threads[_userData.userId] then + coroutine.stop(this.threads[_userData.userId]) + this.threads[_userData.userId] = nil end this.threads[_userData.userId] = coroutine.start(function() while(not isGetIconList) do + if this.isClose and this.isClose == true then + coroutine.stop(this.threads[_userData.userId]) + this.threads[_userData.userId] = nil + this.ReleaseIconList() + return + end --LogGreen("没有得到访问权") iconList = this.RequestIconList() if iconList and LengthOfTable(iconList) > 0 then diff --git a/Assets/ManagedResources/~Lua/View/SingleFightPlayerView.lua b/Assets/ManagedResources/~Lua/View/SingleFightPlayerView.lua index 4156ab8445..17ad69739b 100644 --- a/Assets/ManagedResources/~Lua/View/SingleFightPlayerView.lua +++ b/Assets/ManagedResources/~Lua/View/SingleFightPlayerView.lua @@ -7,6 +7,10 @@ local m_roleTextPos = { [4] = {pos = Vector3.New(-177, 204, 0), angleOffset = 0} -- 反之 } +local namePos = { + [1] = {pos = Vector3.New(-1.86, 185.3, 0)}, -- 角色朝左,气泡在左 + [2] = {pos = Vector3.New(154, 273.5, 0)} -- 反之 +} -- 老头对话气泡位置 local m_oldManTextPos = { [3] = {pos = Vector3.New(-176, 130, 0), angleOffset = 0}, -- 角色朝左,气泡在左 @@ -162,10 +166,14 @@ function SingleFightPlayerView:SetData(u,v,isSelf,data) ride = data.userMount, designation = data.userTitle, }) + if data.userMount == 0 then + self.name.transform.localPosition = namePos[1].pos + else + self.name.transform.localPosition = namePos[2].pos + end self.name.text = data.userName self.nameDi.gameObject:SetActive(true) end - self.playerLiveView:OnOpen(GetPlayerRoleSingleConFig().Scale2) self.playerLiveView.name = "npc" @@ -524,7 +532,9 @@ function SingleFightPlayerView:SetIconShow(_eventpoint) self.context.text = strList[num] local boxPos = self.selectPointPos Timer.New(function() - self:SetEffect(boxPos) + if self.state == 1 then + self:SetEffect(boxPos) + end end,1.5):Start() end self:NotBattleShow() @@ -552,8 +562,10 @@ function SingleFightPlayerView:SetIconShow(_eventpoint) self.eventPointPos:SetDialogueStr(strList1[num]) Timer.New(function() self.dialogueRoot.gameObject:SetActive(false) - self.eventPointPos:ShowDialogue(true) - self:NotBattleShow() + if self.state == 1 then + self.eventPointPos:ShowDialogue(true) + self:NotBattleShow() + end end,1):Start() else self:NotBattleShow() @@ -787,6 +799,7 @@ function SingleFightPlayerView:StopAction() end function SingleFightPlayerView:OnClose() + self.dialogueRoot.gameObject:SetActive(false) self:StopAction() self.buffTipList = {} if self.playerLiveView then