From 330c34a0b8f679f7e61a33c48ef4e5b7df6b6ee4 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Fri, 31 Dec 2021 16:32:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A2=E7=B4=A2=E5=9C=B0=E5=9B=BE=E4=BA=BA?= =?UTF-8?q?=E7=89=A9=E5=88=87=E6=8D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Fight/View/ExploreMapView.lua | 26 +++++++++---------- .../~Lua/View/SingleExplorePlayerView.lua | 7 +++++ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Fight/View/ExploreMapView.lua b/Assets/ManagedResources/~Lua/Modules/Fight/View/ExploreMapView.lua index 61f5e965f1..80788b648f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Fight/View/ExploreMapView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Fight/View/ExploreMapView.lua @@ -88,29 +88,29 @@ function this.Refresh(teamId) end this.playerViews[teamId]:RefreshHp() if ExploreManager.FormationData[teamId].state < 1 then + this.playerViews[teamId]:RefreshIsSelf(false) SubUIManager.Close(this.playerViews[teamId]) this.playerViews[teamId] = nil - if this.playerViews[0].formationId == teamId then + if this.playerViews[0].data.formationId == teamId then this.playerViews[0] = nil - this.playerViews[this.playerViews[0].formationId] = nil end end if not this.playerViews[0] then for k,v in pairs(this.playerViews) do - if v.formationId > 3100 then + if v.data.formationId > 3100 then this.playerViews[0] = v - if not this.playerViews[0] then - this.playerViews[v.formationId]:RefreshIsSelf(true) - this.playerViews[0] = this.playerViews[v.formationId] - end + this.playerViews[v.data.formationId]:RefreshIsSelf(true) + this.playerViews[0] = this.playerViews[v.data.formationId] + break end - end + end + if this.playerViews[0] then + -- 设置相机初始化位置 + local v4 = this.playerViews[0].transform.localPosition + v4.z = -50 + TileMapView.SetCameraPos(v4) + end end - - -- 设置相机初始化位置 - local v4 = this.playerViews[0].transform.localPosition - v4.z = -50 - TileMapView.SetCameraPos(v4) end function this:Init() diff --git a/Assets/ManagedResources/~Lua/View/SingleExplorePlayerView.lua b/Assets/ManagedResources/~Lua/View/SingleExplorePlayerView.lua index e90ba2c284..fe8f0f3a21 100644 --- a/Assets/ManagedResources/~Lua/View/SingleExplorePlayerView.lua +++ b/Assets/ManagedResources/~Lua/View/SingleExplorePlayerView.lua @@ -145,8 +145,15 @@ end function SingleExplorePlayerView:RefreshIsSelf(isSelf) if isSelf then self.ui:GetComponent("Canvas").worldCamera = TileMapView.GetCamera() + else + self.ui:GetComponent("Canvas").worldCamera = nil end self.isSelf = isSelf + if self.eventPointPos then + self.parent.RemoveSelectIconList(self.eventPointPos) + self.eventPointPos = nil + end + self:RoleWalkEnd(nil) end function SingleExplorePlayerView:SetData(u,v,data)