探索地图人物切换修改
parent
9880fcf8e8
commit
330c34a0b8
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue