探索地图人物切换修改
parent
9880fcf8e8
commit
330c34a0b8
|
|
@ -88,29 +88,29 @@ function this.Refresh(teamId)
|
||||||
end
|
end
|
||||||
this.playerViews[teamId]:RefreshHp()
|
this.playerViews[teamId]:RefreshHp()
|
||||||
if ExploreManager.FormationData[teamId].state < 1 then
|
if ExploreManager.FormationData[teamId].state < 1 then
|
||||||
|
this.playerViews[teamId]:RefreshIsSelf(false)
|
||||||
SubUIManager.Close(this.playerViews[teamId])
|
SubUIManager.Close(this.playerViews[teamId])
|
||||||
this.playerViews[teamId] = nil
|
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[0] = nil
|
||||||
this.playerViews[this.playerViews[0].formationId] = nil
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not this.playerViews[0] then
|
if not this.playerViews[0] then
|
||||||
for k,v in pairs(this.playerViews) do
|
for k,v in pairs(this.playerViews) do
|
||||||
if v.formationId > 3100 then
|
if v.data.formationId > 3100 then
|
||||||
this.playerViews[0] = v
|
this.playerViews[0] = v
|
||||||
if not this.playerViews[0] then
|
this.playerViews[v.data.formationId]:RefreshIsSelf(true)
|
||||||
this.playerViews[v.formationId]:RefreshIsSelf(true)
|
this.playerViews[0] = this.playerViews[v.data.formationId]
|
||||||
this.playerViews[0] = this.playerViews[v.formationId]
|
break
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if this.playerViews[0] then
|
||||||
|
-- 设置相机初始化位置
|
||||||
|
local v4 = this.playerViews[0].transform.localPosition
|
||||||
|
v4.z = -50
|
||||||
|
TileMapView.SetCameraPos(v4)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 设置相机初始化位置
|
|
||||||
local v4 = this.playerViews[0].transform.localPosition
|
|
||||||
v4.z = -50
|
|
||||||
TileMapView.SetCameraPos(v4)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:Init()
|
function this:Init()
|
||||||
|
|
|
||||||
|
|
@ -145,8 +145,15 @@ end
|
||||||
function SingleExplorePlayerView:RefreshIsSelf(isSelf)
|
function SingleExplorePlayerView:RefreshIsSelf(isSelf)
|
||||||
if isSelf then
|
if isSelf then
|
||||||
self.ui:GetComponent("Canvas").worldCamera = TileMapView.GetCamera()
|
self.ui:GetComponent("Canvas").worldCamera = TileMapView.GetCamera()
|
||||||
|
else
|
||||||
|
self.ui:GetComponent("Canvas").worldCamera = nil
|
||||||
end
|
end
|
||||||
self.isSelf = isSelf
|
self.isSelf = isSelf
|
||||||
|
if self.eventPointPos then
|
||||||
|
self.parent.RemoveSelectIconList(self.eventPointPos)
|
||||||
|
self.eventPointPos = nil
|
||||||
|
end
|
||||||
|
self:RoleWalkEnd(nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
function SingleExplorePlayerView:SetData(u,v,data)
|
function SingleExplorePlayerView:SetData(u,v,data)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue