修改BUG

onepiece_demo_arena
xiejun 2023-08-18 17:55:02 +08:00
parent 21d0262140
commit 65d783dae1
5 changed files with 11 additions and 13 deletions

View File

@ -69,7 +69,7 @@ MonoBehaviour:
initialSkinName: default
initialFlipX: 0
initialFlipY: 0
startingAnimation:
startingAnimation: idle
startingLoop: 1
timeScale: 1
freeze: 0

View File

@ -3147,7 +3147,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -2, y: -0.1}
m_SizeDelta: {x: 100, y: 100}
m_SizeDelta: {x: 39, y: 39}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2643405721069577264
CanvasRenderer:

View File

@ -69,7 +69,7 @@ MonoBehaviour:
initialSkinName: default
initialFlipX: 0
initialFlipY: 0
startingAnimation:
startingAnimation: idle
startingLoop: 1
timeScale: 1
freeze: 0

View File

@ -4268,16 +4268,14 @@ end
--根据界面数据加载动态立绘
function this.LoadHerolive(_heroData, _objPoint)
--TODO:动态加载立绘
local t=(_heroData.id==10016 or _heroData.id==21063 or _heroData.id==21064) and _heroData.painting or _heroData.live
LogError(t)
local t=_heroData.painting
local testLive = poolManager:LoadLive(t, _objPoint.transform,
Vector3.one * _heroData.scale, Vector3.New(_heroData.position[1], _heroData.position[2], 0))
local SkeletonGraphic = testLive:GetComponent("SkeletonGraphic")
local clip="idle"
if (_heroData.id==10016 or _heroData.id==21063 or _heroData.id==21064)then
clip="animation"
end
local idle = function() SkeletonGraphic.AnimationState:SetAnimation(0, "animation", true) end
local idle = function() SkeletonGraphic.AnimationState:SetAnimation(0, clip, true) end
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete + idle
poolManager:SetLiveClearCall(_heroData.live, testLive, function ()
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete - idle
@ -4289,7 +4287,7 @@ end
--根据界面数据加载动态立绘
function this.LoadHerolive1(data, _objPoint)
--TODO:动态加载立绘
local testLive = poolManager:LoadLive(GetResourcePath(data.Live), _objPoint.transform,
local testLive = poolManager:LoadLive(GetResourcePath(data.Painting), _objPoint.transform,
Vector3.one * data.Scale, Vector3.New(data.Position[1], data.Position[2], 0))
local SkeletonGraphic = testLive:GetComponent("SkeletonGraphic")
local idle = function() SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true) end

View File

@ -228,7 +228,7 @@ function RoleInfoPanel:BindEvent()
Util.AddClick(this.dragView.gameObject, function()
local SkeletonGraphic = this.curLiveObj:GetComponent("SkeletonGraphic")
SkeletonGraphic.AnimationState:SetAnimation(0, "touch", false)
SkeletonGraphic.AnimationState:SetAnimation(0, "idle", false)
end)
--装备
@ -450,7 +450,7 @@ function this:RightBtnOnClick()
this.rightLiveObj = HeroManager.LoadHerolive(rightHeroData,this.rightObj)
SetHEeroLiveToward(this.rightLiveObj,rightToward,rightHeroData.position)
local SkeletonGraphic = this.curLiveObj:GetComponent("SkeletonGraphic")
SkeletonGraphic.AnimationState:SetAnimation(0, "touch", false)
SkeletonGraphic.AnimationState:SetAnimation(0, "idle", false)
this.rightBtn:GetComponent("Button").enabled = true
isClickLeftOrRightBtn = true
this:UpdateHeroInfoData()
@ -519,7 +519,7 @@ function this:LeftBtnOnClick()
end
SetHEeroLiveToward(this.leftLiveObj,leftToward,leftHeroData.position)
local SkeletonGraphic = this.curLiveObj:GetComponent("SkeletonGraphic")
SkeletonGraphic.AnimationState:SetAnimation(0, "touch", false)
SkeletonGraphic.AnimationState:SetAnimation(0, "idle", false)
this.leftBtn:GetComponent("Button").enabled = true
isClickLeftOrRightBtn = true
this:UpdateHeroInfoData()