Merge branch 'china/dev' into china/test
commit
a45b0dce05
|
@ -37,20 +37,20 @@ function EnemyView:onCreate(go, role, position, root, isBoss,enemyId)
|
|||
--
|
||||
local roleId=role.roleData.roleId
|
||||
local live=HeroConfig[role.roleData.roleId].Live
|
||||
--如果英雄装备皮肤
|
||||
if role.roleData.skinId and role.roleData.skinId>0 then
|
||||
roleId=role.roleData.skinId
|
||||
local skin=ConfigManager.GetConfigDataByKey(ConfigName.HeroSkin,"Type",roleId)
|
||||
if skin then
|
||||
live=skin.Live
|
||||
end
|
||||
end
|
||||
if not role.roleData.skinId then
|
||||
self.skinId=0
|
||||
-- 判断是否有皮肤
|
||||
if not role.roleData.skinId or role.roleData.skinId == 0 then
|
||||
self.skinId = 0
|
||||
else
|
||||
self.skinId=roleId
|
||||
self.skinId = role.roleData.skinId
|
||||
end
|
||||
--如果英雄装备皮肤
|
||||
if self.skinId and self.skinId > 0 then
|
||||
roleId = self.skinId
|
||||
local skin=ConfigManager.GetConfigDataByKey(ConfigName.HeroSkin,"Type",roleId)
|
||||
if skin then
|
||||
live=skin.Live
|
||||
end
|
||||
end
|
||||
|
||||
self.hpCache = self.role:GetRoleData(RoleDataName.Hp) / self.role:GetRoleData(RoleDataName.MaxHp)
|
||||
self.hpSlider.fillAmount = self.hpCache
|
||||
self.hpPassSlider.fillAmount = self.hpCache
|
||||
|
@ -114,6 +114,7 @@ function EnemyView:onCreate(go, role, position, root, isBoss,enemyId)
|
|||
if mirrOffset and mirrOffset[1]~=0 and mirrOffset[2]~=0 then
|
||||
self.RoleLiveGO:GetComponent("RectTransform").anchoredPosition = Vector2.New(mirrOffset[1],mirrOffset[2])
|
||||
self.RoleLiveGO2:GetComponent("RectTransform").anchoredPosition = Vector2.New(mirrOffset[1],mirrOffset[2]+400)
|
||||
self.outOffset = RoleConfig[roleId].mirrorimage_offset
|
||||
end
|
||||
|
||||
self.RoleLiveGO:GetComponent("RectTransform").rotation = Quaternion.Euler(Vector3.New(0,180, 0))
|
||||
|
|
|
@ -44,21 +44,21 @@ function PlayerView:onCreate(go, role, position, root)
|
|||
self.hpPassSlider.fillAmount = self.hpCache
|
||||
self.yujiaSlider.fillAmount = 0
|
||||
local roleId=role.roleData.roleId
|
||||
|
||||
local live=HeroConfig[role.roleData.roleId].Live
|
||||
--如果英雄装备皮肤
|
||||
if role.roleData.skinId and role.roleData.skinId>0 then
|
||||
roleId=role.roleData.skinId
|
||||
local skin=ConfigManager.GetConfigDataByKey(ConfigName.HeroSkin,"Type",roleId)
|
||||
if skin then
|
||||
live=skin.Live
|
||||
end
|
||||
end
|
||||
if not role.roleData.skinId then
|
||||
self.skinId=0
|
||||
else
|
||||
self.skinId=roleId
|
||||
local live=HeroConfig[role.roleData.roleId].Live
|
||||
-- 判断是否有皮肤
|
||||
if not role.roleData.skinId or role.roleData.skinId == 0 then
|
||||
self.skinId = 0
|
||||
else
|
||||
self.skinId = role.roleData.skinId
|
||||
end
|
||||
--如果英雄装备皮肤
|
||||
if self.skinId and self.skinId > 0 then
|
||||
roleId = self.skinId
|
||||
local skin = ConfigManager.GetConfigDataByKey(ConfigName.HeroSkin,"Type",roleId)
|
||||
if skin then
|
||||
live = skin.Live
|
||||
end
|
||||
end
|
||||
self.livePath = GetResourcePath(live)
|
||||
self.play_liveScale = RoleConfig[roleId].play_liveScale
|
||||
self.enemy_liveScale = RoleConfig[roleId].enemy_liveScale
|
||||
|
@ -140,6 +140,7 @@ function PlayerView:onCreate(go, role, position, root)
|
|||
if mirrOffset and mirrOffset[1]~=0 and mirrOffset[2]~=0 then
|
||||
self.RoleLiveGO:GetComponent("RectTransform").anchoredPosition = Vector2.New(mirrOffset[1],mirrOffset[2])
|
||||
self.RoleLiveGO2:GetComponent("RectTransform").anchoredPosition = Vector2.New(mirrOffset[1],mirrOffset[2]-300)
|
||||
self.outOffset = RoleConfig[roleId].mirrorimage_offset
|
||||
end
|
||||
self.RoleLiveGO:GetComponent("RectTransform").rotation = Quaternion.Euler(Vector3.New(0,180, 0))
|
||||
self.RoleLiveGO2:GetComponent("RectTransform").rotation = Quaternion.Euler(Vector3.New(0,180, 0))
|
||||
|
|
|
@ -304,8 +304,34 @@ function RoleInfoPanel:OnShow()
|
|||
Util.ClearChild(this.rightObj.transform)
|
||||
|
||||
this.leftLiveObj = HeroManager.LoadHerolive(leftHeroData,this.leftObj)
|
||||
|
||||
this.rightLiveObj = HeroManager.LoadHerolive(rightHeroData,this.rightObj)
|
||||
|
||||
this.curLiveObj = HeroManager.LoadHerolive(curHeroData,this.curObj)
|
||||
|
||||
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 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)
|
||||
|
||||
|
||||
|
||||
|
||||
if this.curLiveObj then
|
||||
this.dragView.gameObject:SetActive(true)
|
||||
|
|
Loading…
Reference in New Issue