Merge branch 'china/dev' into china/test
commit
d91c88f4d8
|
@ -103,7 +103,12 @@ function EnemyView:onCreate(go, role, position, root, isBoss,enemyId)
|
|||
self.RoleLiveGO2:GetComponent("RectTransform").anchoredPosition = Vector2.New(self.outOffset[1], self.outOffset[2] + 400)
|
||||
self.RoleLiveGO2.transform.localScale = Vector3.one * self.enemy_liveScale --* 2
|
||||
self.RoleLiveGO2:SetActive(false)
|
||||
local toward=HeroConfig[role.roleData.roleId].Toward
|
||||
local toward=0
|
||||
if self.skinId~=0 then
|
||||
toward=RoleConfig[roleId].Toward
|
||||
else
|
||||
toward=HeroConfig[role.roleData.roleId].Toward
|
||||
end
|
||||
if toward==2 then
|
||||
local mirrOffset=RoleConfig[roleId].mirrorimage_offset
|
||||
if mirrOffset and mirrOffset[1]~=0 and mirrOffset[2]~=0 then
|
||||
|
|
|
@ -128,7 +128,13 @@ function PlayerView:onCreate(go, role, position, root)
|
|||
self.RoleLiveGOTran2 = self.RoleLiveGO2:GetComponent("RectTransform")
|
||||
self.RoleLiveGOGraphic2.AnimationState:SetAnimation(0, "idle", true)
|
||||
self.RoleLiveGOTran2.sizeDelta = Vector2.New(1000, 1000)
|
||||
local toward=HeroConfig[role.roleData.roleId].Toward
|
||||
local toward=0
|
||||
if self.skinId~=0 then
|
||||
toward=RoleConfig[roleId].Toward
|
||||
else
|
||||
toward=HeroConfig[role.roleData.roleId].Toward
|
||||
end
|
||||
|
||||
if toward==1 then
|
||||
local mirrOffset=RoleConfig[roleId].mirrorimage_offset
|
||||
if mirrOffset and mirrOffset[1]~=0 and mirrOffset[2]~=0 then
|
||||
|
|
|
@ -512,15 +512,18 @@ function this.SetCardSingleData(o, heroId, _pos, _heroData)
|
|||
local live = Util.GetGameObject(o, "Mask/icon"):GetComponent("RawImage")
|
||||
local liveName = heroData.live
|
||||
local roleConfig = {}
|
||||
local toward=0
|
||||
if heroData.skinId == 0 then
|
||||
roleConfig = ConfigManager.GetConfigData(ConfigName.RoleConfig, heroData.heroConfig.Id)
|
||||
toward=heroData.heroConfig.Toward
|
||||
else
|
||||
roleConfig = ConfigManager.GetConfigData(ConfigName.RoleConfig, heroData.skinId)
|
||||
toward=roleConfig.Toward
|
||||
end
|
||||
local scale = roleConfig.play_liveScale
|
||||
local livePos = Vector3.New(roleConfig.offset[1], roleConfig.offset[2], 0)
|
||||
live.texture = CardRendererManager.GetSpineTexture(_pos, liveName, Vector3.one * scale, livePos, true)
|
||||
SetHEeroLiveToward(live,heroData.heroConfig.Toward)
|
||||
SetHEeroLiveToward(live,toward,heroData.heroConfig.Position)
|
||||
live.transform.localScale = Vector3.one
|
||||
live.transform.localPosition = Vector3.zero
|
||||
|
||||
|
|
|
@ -344,7 +344,7 @@ function HandBookHeroInfoPanel:ChangeCurentHeroSkinLive(herodata)
|
|||
poolManager:UnLoadLive(this.curLiveObj.name, this.curLiveObj)
|
||||
this.curLiveObj = nil
|
||||
end
|
||||
if herodata then
|
||||
if herodata then
|
||||
this.curLiveObj=self:LoadHerolive(herodata,this.curObj)
|
||||
else
|
||||
this.curLiveObj=self:LoadHerolive(heroConFigData,this.curObj)
|
||||
|
@ -366,6 +366,15 @@ end
|
|||
--根据界面数据加载动态立绘
|
||||
function HandBookHeroInfoPanel:LoadHerolive(_heroData, _objPoint)
|
||||
--TODO:动态加载立绘
|
||||
local toward
|
||||
if _heroData.Type and _heroData.Type~=0 then
|
||||
local roleCon=ConfigManager.TryGetConfigData(ConfigName.RoleConfig,_heroData.Type)
|
||||
if roleCon then
|
||||
toward=roleCon.Toward
|
||||
end
|
||||
else
|
||||
toward=_heroData.Toward
|
||||
end
|
||||
local icon = GetResourcePath(_heroData.Live)
|
||||
local testLive = poolManager:LoadLive(GetResourcePath(_heroData.Live), _objPoint.transform,
|
||||
Vector3.one * _heroData.Scale, Vector3.New(_heroData.Position[1], _heroData.Position[2], 0))
|
||||
|
@ -375,7 +384,7 @@ function HandBookHeroInfoPanel:LoadHerolive(_heroData, _objPoint)
|
|||
poolManager:SetLiveClearCall(_heroData.Live, testLive, function ()
|
||||
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete - idle
|
||||
end)
|
||||
SetHEeroLiveToward(testLive,_heroData.Toward,_heroData.Position)
|
||||
SetHEeroLiveToward(testLive,toward,_heroData.Position)
|
||||
return testLive
|
||||
end
|
||||
|
||||
|
|
|
@ -364,11 +364,29 @@ function this:RightBtnOnClick()
|
|||
this.curLiveObj = nil
|
||||
end
|
||||
Util.ClearChild(this.leftObj.transform)
|
||||
this.leftLiveObj = HeroManager.LoadHerolive(leftHeroData,this.leftObj)
|
||||
SetHEeroLiveToward(this.leftLiveObj,leftHeroData.heroConfig.Toward,leftHeroData.position)
|
||||
this.leftLiveObj = HeroManager.LoadHerolive(leftHeroData,this.leftObj)
|
||||
local leftToward=0
|
||||
if leftHeroData.skinId and leftHeroData.skinId~=0 then
|
||||
local roleCon=ConfigManager.TryGetConfigData(ConfigName.RoleConfig,leftHeroData.skinId)
|
||||
if roleCon then
|
||||
leftToward=roleCon.Toward
|
||||
end
|
||||
else
|
||||
leftToward=leftHeroData.heroConfig.Toward
|
||||
end
|
||||
SetHEeroLiveToward(this.leftLiveObj,leftToward,leftHeroData.position)
|
||||
this.curLiveObj = this.rightLiveObj
|
||||
local rightToward=0
|
||||
if rightHeroData.skinId and rightHeroData.skinId~=0 then
|
||||
local roleCon=ConfigManager.TryGetConfigData(ConfigName.RoleConfig,rightHeroData.skinId)
|
||||
if roleCon then
|
||||
rightToward=roleCon.Toward
|
||||
end
|
||||
else
|
||||
rightToward=rightHeroData.heroConfig.Toward
|
||||
end
|
||||
this.rightLiveObj = HeroManager.LoadHerolive(rightHeroData,this.rightObj)
|
||||
SetHEeroLiveToward(this.rightLiveObj,rightHeroData.heroConfig.Toward,rightHeroData.position)
|
||||
SetHEeroLiveToward(this.rightLiveObj,rightToward,rightHeroData.position)
|
||||
local SkeletonGraphic = this.curLiveObj:GetComponent("SkeletonGraphic")
|
||||
SkeletonGraphic.AnimationState:SetAnimation(0, "touch", false)
|
||||
this.rightBtn:GetComponent("Button").enabled = true
|
||||
|
@ -411,10 +429,28 @@ function this:LeftBtnOnClick()
|
|||
end
|
||||
Util.ClearChild(this.rightObj.transform)
|
||||
this.rightLiveObj = HeroManager.LoadHerolive(rightHeroData,this.rightObj)
|
||||
SetHEeroLiveToward(this.rightLiveObj,rightHeroData.heroConfig.Toward,rightHeroData.position)
|
||||
local rightToward=0
|
||||
if rightHeroData.skinId and rightHeroData.skinId~=0 then
|
||||
local roleCon=ConfigManager.TryGetConfigData(ConfigName.RoleConfig,rightHeroData.skinId)
|
||||
if roleCon then
|
||||
rightToward=roleCon.Toward
|
||||
end
|
||||
else
|
||||
rightToward=rightHeroData.heroConfig.Toward
|
||||
end
|
||||
SetHEeroLiveToward(this.rightLiveObj,rightToward,rightHeroData.position)
|
||||
this.curLiveObj = this.leftLiveObj
|
||||
this.leftLiveObj = HeroManager.LoadHerolive(leftHeroData,this.leftObj)
|
||||
SetHEeroLiveToward(this.leftLiveObj,leftHeroData.heroConfig.Toward,leftHeroData.position)
|
||||
local leftToward=0
|
||||
if leftHeroData.skinId and leftHeroData.skinId~=0 then
|
||||
local roleCon=ConfigManager.TryGetConfigData(ConfigName.RoleConfig,leftHeroData.skinId)
|
||||
if roleCon then
|
||||
leftToward=roleCon.Toward
|
||||
end
|
||||
else
|
||||
leftToward=leftHeroData.heroConfig.Toward
|
||||
end
|
||||
SetHEeroLiveToward(this.leftLiveObj,leftToward,leftHeroData.position)
|
||||
local SkeletonGraphic = this.curLiveObj:GetComponent("SkeletonGraphic")
|
||||
SkeletonGraphic.AnimationState:SetAnimation(0, "touch", false)
|
||||
this.leftBtn:GetComponent("Button").enabled = true
|
||||
|
@ -719,8 +755,10 @@ function this:ChangeCurentHeroSkinLive(herodata)
|
|||
local toward=0
|
||||
local pos=nil
|
||||
if herodata.Type~=0 then
|
||||
LogError("type=="..herodata.Type)
|
||||
local roleCon=ConfigManager.TryGetConfigData(ConfigName.RoleConfig,herodata.Type)
|
||||
if roleCon then
|
||||
LogError("type====="..herodata.Type)
|
||||
toward=roleCon.Toward
|
||||
end
|
||||
else
|
||||
|
@ -741,8 +779,18 @@ function this:ChangeCurentHeroSkinLive(herodata)
|
|||
-- allAddProVal = HeroManager.CalculateHeroAllProValList(1,curHeroData.dynamicId,false)
|
||||
end
|
||||
this.force.text = WarPower
|
||||
|
||||
local toward=0
|
||||
if curHeroData.skinId and curHeroData.skinId~=0 then
|
||||
local roleCon=ConfigManager.TryGetConfigData(ConfigName.RoleConfig,curHeroData.skinId)
|
||||
if roleCon then
|
||||
toward=roleCon.Toward
|
||||
end
|
||||
else
|
||||
toward=curHeroData.heroConfig.Toward
|
||||
end
|
||||
this.curLiveObj=HeroManager.LoadHerolive(curHeroData,this.curObj)
|
||||
SetHEeroLiveToward(this.curLiveObj,curHeroData.heroConfig.Toward,curHeroData.position)
|
||||
SetHEeroLiveToward(this.curLiveObj,toward,curHeroData.position)
|
||||
-- 清空临时保存的皮肤位置
|
||||
curHeroPosition = nil
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue