Merge branch 'china/dev-c' of http://60.1.1.230/gaoxin/JL_Client into china/dev-c
commit
1ab5a831b4
|
|
@ -1039,6 +1039,13 @@ JumpType = {
|
||||||
XinJiangLaiXiShangDian = 20200, --社稷大典商店
|
XinJiangLaiXiShangDian = 20200, --社稷大典商店
|
||||||
XingChenShangDian = 20059, --星辰商店
|
XingChenShangDian = 20059, --星辰商店
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NPCPosType={
|
||||||
|
maincity=1,
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
YaoHunFrame = {
|
YaoHunFrame = {
|
||||||
--[6] = "r_tongyong_yaohunkuang002",
|
--[6] = "r_tongyong_yaohunkuang002",
|
||||||
--[7] = "r_tongyong_yaohunkuang001",
|
--[7] = "r_tongyong_yaohunkuang001",
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ function FightSmallChoosePanel:OnShow()
|
||||||
if self.liveNode then
|
if self.liveNode then
|
||||||
self.liveNode:OnClose()
|
self.liveNode:OnClose()
|
||||||
end
|
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))
|
self.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale4,Vector3.New(0,40,0))
|
||||||
if FightPointPassManager.GetRoleDirection()==1 then
|
if FightPointPassManager.GetRoleDirection()==1 then
|
||||||
self.liveNode:SetWalkDir(WALK_DIR.RUN_LEFT)
|
self.liveNode:SetWalkDir(WALK_DIR.RUN_LEFT)
|
||||||
|
|
|
||||||
|
|
@ -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/text"):SetActive(true)
|
||||||
Util.GetGameObject(instance.leader, "name/text2"):SetActive(false)
|
Util.GetGameObject(instance.leader, "name/text2"):SetActive(false)
|
||||||
_sex = NameManager.roleSex
|
_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
|
if PlayerManager.GetPlayerRide() > 0 then
|
||||||
Util.GetGameObject(instance.leader, "name").transform.localPosition = Vector3.New(0,239.9,0)
|
Util.GetGameObject(instance.leader, "name").transform.localPosition = Vector3.New(0,239.9,0)
|
||||||
|
|
|
||||||
|
|
@ -203,11 +203,11 @@ function this.RefreshPlayerInfo(data)
|
||||||
if not _PlayerHead then
|
if not _PlayerHead then
|
||||||
_PlayerHead = SubUIManager.Open(SubUIConfig.PlayerHeadView, this.memHead.transform)
|
_PlayerHead = SubUIManager.Open(SubUIConfig.PlayerHeadView, this.memHead.transform)
|
||||||
end
|
end
|
||||||
if titleLive then
|
-- if titleLive then
|
||||||
poolManager:UnLoadAsset(titleLiveStr, titleLive, PoolManager.AssetType.GameObject)
|
-- poolManager:UnLoadAsset(titleLiveStr, titleLive, PoolManager.AssetType.GameObject)
|
||||||
titleLive = nil
|
-- titleLive = nil
|
||||||
titleLiveStr = nil
|
-- titleLiveStr = nil
|
||||||
end
|
-- end
|
||||||
_PlayerHead:Reset()
|
_PlayerHead:Reset()
|
||||||
_PlayerHead:SetScale(Vector3.one * 0.85)
|
_PlayerHead:SetScale(Vector3.one * 0.85)
|
||||||
_PlayerHead:SetHead(data.head)
|
_PlayerHead:SetHead(data.head)
|
||||||
|
|
@ -218,18 +218,25 @@ function this.RefreshPlayerInfo(data)
|
||||||
local title=data.userTitle
|
local title=data.userTitle
|
||||||
if title and title>0 then
|
if title and title>0 then
|
||||||
this.titlePar:SetActive(true)
|
this.titlePar:SetActive(true)
|
||||||
local curPlayerRole = ConfigManager.GetConfigData(ConfigName.PlayerRole,title)
|
-- local curPlayerRole = ConfigManager.GetConfigData(ConfigName.PlayerRole,title)
|
||||||
local curArtResourcesConfig = ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,curPlayerRole.LiveAnimName)
|
-- local curArtResourcesConfig = ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,curPlayerRole.LiveAnimName)
|
||||||
titleLiveStr = curArtResourcesConfig.Name
|
-- titleLiveStr = curArtResourcesConfig.Name
|
||||||
titleLive = poolManager:LoadAsset(titleLiveStr, PoolManager.AssetType.GameObject)
|
-- titleLive = poolManager:LoadAsset(titleLiveStr, PoolManager.AssetType.GameObject)
|
||||||
titleLive.transform:SetParent(this.titlePar.transform)
|
-- titleLive.transform:SetParent(this.titlePar.transform)
|
||||||
titleLive.transform.localPosition = Vector3.New(0,0,0)
|
-- titleLive.transform.localPosition = Vector3.New(0,0,0)
|
||||||
titleLive.transform.localScale = Vector3.New(0.5,0.5,0.5)
|
-- titleLive.transform.localScale = Vector3.New(0.5,0.5,0.5)
|
||||||
local sortingorder=0
|
-- local sortingorder=0
|
||||||
if this.sortingOrder then
|
-- if this.sortingOrder then
|
||||||
Util.AddParticleSortLayer(titleLive,this.sortingOrder - sortingorder)
|
-- Util.AddParticleSortLayer(titleLive,this.sortingOrder - sortingorder)
|
||||||
sortingorder = this.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
|
end
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
this.titlePar:SetActive(false)
|
this.titlePar:SetActive(false)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ local mapNpcOp = "PlayerLiveView"
|
||||||
-- designation = 80010
|
-- designation = 80010
|
||||||
-- }
|
-- }
|
||||||
|
|
||||||
function PlayerLiveView:New(gameObject,_Type, PlayerLiveViewData,orginLayer)
|
function PlayerLiveView:New(gameObject,_Type, PlayerLiveViewData,orginLayer,posType)
|
||||||
-- Type = _Type
|
-- Type = _Type
|
||||||
-- local b = {}
|
-- local b = {}
|
||||||
-- b.gameObject = gameObject
|
-- b.gameObject = gameObject
|
||||||
|
|
@ -39,7 +39,7 @@ function PlayerLiveView:New(gameObject,_Type, PlayerLiveViewData,orginLayer)
|
||||||
instance.playerLiveGo = Util.GetGameObject(instance.leader, "liveParent/playerLive")
|
instance.playerLiveGo = Util.GetGameObject(instance.leader, "liveParent/playerLive")
|
||||||
instance.titleLiveGo = Util.GetGameObject(instance.leader, "liveParent/titleLive")
|
instance.titleLiveGo = Util.GetGameObject(instance.leader, "liveParent/titleLive")
|
||||||
instance.nameHeight=0
|
instance.nameHeight=0
|
||||||
|
instance.posType=posType
|
||||||
--立绘对象
|
--立绘对象
|
||||||
instance.rideLive = nil
|
instance.rideLive = nil
|
||||||
instance.playerLive = nil
|
instance.playerLive = nil
|
||||||
|
|
@ -83,22 +83,23 @@ end
|
||||||
|
|
||||||
--界面打开时调用(用于子类重写)
|
--界面打开时调用(用于子类重写)
|
||||||
function PlayerLiveView:OnOpen(scale,pos,dir)
|
function PlayerLiveView:OnOpen(scale,pos,dir)
|
||||||
self:OnShowLive()
|
|
||||||
if scale then
|
if scale then
|
||||||
self.leader.transform.localScale = Vector3.New(scale,scale,scale)
|
self.leader.transform.localScale = Vector3.New(scale,scale,scale)
|
||||||
end
|
end
|
||||||
if pos then
|
if pos then
|
||||||
self.leader.transform.localPosition = pos
|
self.leader.transform.localPosition = pos
|
||||||
end
|
end
|
||||||
|
self:OnShowLive()
|
||||||
if dir then
|
if dir then
|
||||||
self:SetWalkDir(dir)
|
self:SetWalkDir(dir)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local sortingorder=0
|
local sortingorder=0
|
||||||
|
|
||||||
function PlayerLiveView:OnSortingOrderChange(sortingOrder)
|
function PlayerLiveView:OnSortingOrderChange(sortingOrder1)
|
||||||
|
sortingorder=sortingOrder1
|
||||||
if self.titleLive then
|
if self.titleLive then
|
||||||
self.titleLive:SetLayer(sortingOrder)
|
self.titleLive:SetLayer(sortingOrder1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -164,7 +165,15 @@ function PlayerLiveView:OnShowLive()
|
||||||
y=y+3
|
y=y+3
|
||||||
end
|
end
|
||||||
local curLocalPosition = Vector3.New(curArtResourcesConfig.Position[1],y,0)
|
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
|
||||||
end
|
end
|
||||||
function PlayerLiveView:SetNameHeight(hei)
|
function PlayerLiveView:SetNameHeight(hei)
|
||||||
|
|
|
||||||
|
|
@ -583,7 +583,9 @@ function SingleFightPlayerView:SetIconShow(_eventpoint)
|
||||||
self.eventPointPos:SetDialogueStr(strList1[num])
|
self.eventPointPos:SetDialogueStr(strList1[num])
|
||||||
Timer.New(function()
|
Timer.New(function()
|
||||||
if self.dialogueRoot then
|
if self.dialogueRoot then
|
||||||
self.dialogueRoot.gameObject:SetActive(false)
|
if self.dialogueRoot.gameObject then
|
||||||
|
self.dialogueRoot.gameObject:SetActive(false)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if self.state == 1 then
|
if self.state == 1 then
|
||||||
self.eventPointPos:ShowDialogue(true)
|
self.eventPointPos:ShowDialogue(true)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue