Merge branch 'china/dev-c' of http://60.1.1.230/gaoxin/JL_Client into china/dev-c

dev_chengFeng
ZhangBiao 2021-06-02 18:29:24 +08:00
commit 1ab5a831b4
6 changed files with 50 additions and 25 deletions

View File

@ -1039,6 +1039,13 @@ JumpType = {
XinJiangLaiXiShangDian = 20200, --社稷大典商店
XingChenShangDian = 20059, --星辰商店
}
NPCPosType={
maincity=1,
}
YaoHunFrame = {
--[6] = "r_tongyong_yaohunkuang002",
--[7] = "r_tongyong_yaohunkuang001",

View File

@ -89,7 +89,7 @@ function FightSmallChoosePanel:OnShow()
if self.liveNode then
self.liveNode:OnClose()
end
self.liveNode = PlayerLiveView:New(Util.GetGameObject(self.selectMap, "pos"),1)
self.liveNode = PlayerLiveView:New(Util.GetGameObject(self.selectMap, "pos"),self.sortingOrder)
self.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale4,Vector3.New(0,40,0))
if FightPointPassManager.GetRoleDirection()==1 then
self.liveNode:SetWalkDir(WALK_DIR.RUN_LEFT)

View File

@ -29,7 +29,7 @@ function MainPlayerView.New(isSelf, root, rect, pos,_NpvData,sortingOrder)
Util.GetGameObject(instance.leader, "name/text"):SetActive(true)
Util.GetGameObject(instance.leader, "name/text2"):SetActive(false)
_sex = NameManager.roleSex
instance.NpcGO = PlayerLiveView:New(instance.roleRootTran,1, nil,sortingOrder)
instance.NpcGO = PlayerLiveView:New(instance.roleRootTran,1, nil,sortingOrder,NPCPosType.maincity)
if PlayerManager.GetPlayerRide() > 0 then
Util.GetGameObject(instance.leader, "name").transform.localPosition = Vector3.New(0,239.9,0)

View File

@ -203,11 +203,11 @@ function this.RefreshPlayerInfo(data)
if not _PlayerHead then
_PlayerHead = SubUIManager.Open(SubUIConfig.PlayerHeadView, this.memHead.transform)
end
if titleLive then
poolManager:UnLoadAsset(titleLiveStr, titleLive, PoolManager.AssetType.GameObject)
titleLive = nil
titleLiveStr = nil
end
-- if titleLive then
-- poolManager:UnLoadAsset(titleLiveStr, titleLive, PoolManager.AssetType.GameObject)
-- titleLive = nil
-- titleLiveStr = nil
-- end
_PlayerHead:Reset()
_PlayerHead:SetScale(Vector3.one * 0.85)
_PlayerHead:SetHead(data.head)
@ -218,18 +218,25 @@ function this.RefreshPlayerInfo(data)
local title=data.userTitle
if title and title>0 then
this.titlePar:SetActive(true)
local curPlayerRole = ConfigManager.GetConfigData(ConfigName.PlayerRole,title)
local curArtResourcesConfig = ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,curPlayerRole.LiveAnimName)
titleLiveStr = curArtResourcesConfig.Name
titleLive = poolManager:LoadAsset(titleLiveStr, PoolManager.AssetType.GameObject)
titleLive.transform:SetParent(this.titlePar.transform)
titleLive.transform.localPosition = Vector3.New(0,0,0)
titleLive.transform.localScale = Vector3.New(0.5,0.5,0.5)
local sortingorder=0
if this.sortingOrder then
Util.AddParticleSortLayer(titleLive,this.sortingOrder - sortingorder)
sortingorder = this.sortingOrder
-- local curPlayerRole = ConfigManager.GetConfigData(ConfigName.PlayerRole,title)
-- local curArtResourcesConfig = ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,curPlayerRole.LiveAnimName)
-- titleLiveStr = curArtResourcesConfig.Name
-- titleLive = poolManager:LoadAsset(titleLiveStr, PoolManager.AssetType.GameObject)
-- titleLive.transform:SetParent(this.titlePar.transform)
-- titleLive.transform.localPosition = Vector3.New(0,0,0)
-- titleLive.transform.localScale = Vector3.New(0.5,0.5,0.5)
-- local sortingorder=0
-- if this.sortingOrder then
-- Util.AddParticleSortLayer(titleLive,this.sortingOrder - sortingorder)
-- sortingorder = this.sortingOrder
-- end
LogError("title=="..title)
if not titleLive then
titleLive = SubUIManager.Open(SubUIConfig.PlayerTitle, this.titlePar.transform)
titleLive:SetShow(title, Vector3.New(0,0,0), 0.5, 0.03*20, this.sortingOrder)
end
else
this.titlePar:SetActive(false)
end

View File

@ -7,7 +7,7 @@ local mapNpcOp = "PlayerLiveView"
-- designation = 80010
-- }
function PlayerLiveView:New(gameObject,_Type, PlayerLiveViewData,orginLayer)
function PlayerLiveView:New(gameObject,_Type, PlayerLiveViewData,orginLayer,posType)
-- Type = _Type
-- local b = {}
-- b.gameObject = gameObject
@ -39,7 +39,7 @@ function PlayerLiveView:New(gameObject,_Type, PlayerLiveViewData,orginLayer)
instance.playerLiveGo = Util.GetGameObject(instance.leader, "liveParent/playerLive")
instance.titleLiveGo = Util.GetGameObject(instance.leader, "liveParent/titleLive")
instance.nameHeight=0
instance.posType=posType
--立绘对象
instance.rideLive = nil
instance.playerLive = nil
@ -83,22 +83,23 @@ end
--界面打开时调用(用于子类重写)
function PlayerLiveView:OnOpen(scale,pos,dir)
self:OnShowLive()
if scale then
self.leader.transform.localScale = Vector3.New(scale,scale,scale)
end
if pos then
self.leader.transform.localPosition = pos
end
self:OnShowLive()
if dir then
self:SetWalkDir(dir)
end
end
local sortingorder=0
function PlayerLiveView:OnSortingOrderChange(sortingOrder)
function PlayerLiveView:OnSortingOrderChange(sortingOrder1)
sortingorder=sortingOrder1
if self.titleLive then
self.titleLive:SetLayer(sortingOrder)
self.titleLive:SetLayer(sortingOrder1)
end
end
@ -164,7 +165,15 @@ function PlayerLiveView:OnShowLive()
y=y+3
end
local curLocalPosition = Vector3.New(curArtResourcesConfig.Position[1],y,0)
self.titleLive:SetShow(self.PlayerLiveViewData.designation, curLocalPosition, curArtResourcesConfig.Scale, curArtResourcesConfig.Scale* self.transform.localScale.x, self.orginLayer)
LogError("scale=="..curArtResourcesConfig.Scale.." transform scale=="..self.leader.transform.localScale.x)
-- curArtResourcesConfig.Scale* self.transform.localScale.x
local effect=0
if self.posType==NPCPosType.maincity then
effect=self.transform.localScale.x
else
effect=self.leader.transform.localScale.x
end
self.titleLive:SetShow(self.PlayerLiveViewData.designation, curLocalPosition, curArtResourcesConfig.Scale, curArtResourcesConfig.Scale*effect,self.orginLayer)
end
end
function PlayerLiveView:SetNameHeight(hei)

View File

@ -583,7 +583,9 @@ function SingleFightPlayerView:SetIconShow(_eventpoint)
self.eventPointPos:SetDialogueStr(strList1[num])
Timer.New(function()
if self.dialogueRoot then
self.dialogueRoot.gameObject:SetActive(false)
if self.dialogueRoot.gameObject then
self.dialogueRoot.gameObject:SetActive(false)
end
end
if self.state == 1 then
self.eventPointPos:ShowDialogue(true)