【灵兽系统】 动画调整
parent
02d4a3ab13
commit
5d2bfdc46b
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -102,6 +102,7 @@ function this.GetShowPanelData()
|
|||
end
|
||||
function this.NoGetShowPanelData()
|
||||
local pokemonSData=ConfigManager.GetConfigData(ConfigName.SpiritAnimal, pokemonSid)
|
||||
this.heroName.text = pokemonSData.Name
|
||||
this.ShowPokemonLive(pokemonSData)
|
||||
--星级
|
||||
PokemonManager.SetHeroStars(this.starGrid, 0,2,Vector2.New(60,60))
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ this.contents = {
|
|||
[1] = {view = require("Modules/Pokemon/view/PokemonInfoPanel_UpLv"), panelName = "PokemonInfoPanel_UpLv"},
|
||||
[2] = {view = require("Modules/Pokemon/view/PokemonInfoPanel_UpStar"), panelName = "PokemonInfoPanel_UpStar"},
|
||||
}
|
||||
local isHideLeftRihtBtn = false
|
||||
local redPointList = {}
|
||||
--初始化组件(用于子类重写)
|
||||
function PokemonInfoPanel:InitComponent()
|
||||
|
|
@ -87,7 +88,7 @@ function PokemonInfoPanel:BindEvent()
|
|||
end)
|
||||
Util.AddClick(this.dragView.gameObject, function()
|
||||
local SkeletonGraphic = this.curLiveObj:GetComponent("SkeletonGraphic")
|
||||
-- SkeletonGraphic.AnimationState:SetAnimation(0, "touch", false)
|
||||
SkeletonGraphic.AnimationState:SetAnimation(0, "attack", false)
|
||||
end)
|
||||
--涅槃
|
||||
Util.AddClick(this.nirvanaBtn, function()
|
||||
|
|
@ -192,9 +193,17 @@ function PokemonInfoPanel:RemoveListener()
|
|||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function PokemonInfoPanel:OnOpen(_curPokemonData, _pokemonDatas)
|
||||
function PokemonInfoPanel:OnOpen(_curPokemonData, _pokemonDatas,_isHideLeftRihtBtn)
|
||||
curPokemonData, pokemonDatas = _curPokemonData, _pokemonDatas
|
||||
isHideLeftRihtBtn = _isHideLeftRihtBtn or false
|
||||
curIndex = 1
|
||||
if isHideLeftRihtBtn then
|
||||
this.leftBtn.transform.parent.gameObject:SetActive(false)
|
||||
this.rightBtn.transform.parent.gameObject:SetActive(false)
|
||||
else
|
||||
this.leftBtn.transform.parent.gameObject:SetActive(true)
|
||||
this.rightBtn.transform.parent.gameObject:SetActive(true)
|
||||
end
|
||||
end
|
||||
function this.RefreshShow(_curPokemonData, _pokemonDatas)
|
||||
if this.leftLiveObj and leftPokemonData then
|
||||
|
|
@ -329,7 +338,7 @@ function this.LoadHerolive(_heroData, _objPoint)
|
|||
local testLive = poolManager:LoadLive(GetResourcePath(spiritAnimal[_heroData.id].Live), _objPoint.transform,
|
||||
Vector3.one * spiritAnimal[_heroData.id].Scale, Vector3.New(spiritAnimal[_heroData.id].Position[1], spiritAnimal[_heroData.id].Position[2], 0))
|
||||
local SkeletonGraphic = testLive:GetComponent("SkeletonGraphic")
|
||||
-- local idle = function() SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true) end
|
||||
local idle = function() SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true) end
|
||||
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete + idle
|
||||
poolManager:SetLiveClearCall(GetResourcePath(spiritAnimal[_heroData.id].Live), testLive, function ()
|
||||
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete - idle
|
||||
|
|
@ -382,7 +391,7 @@ function this.RightBtnOnClick()
|
|||
this.OnShowData()
|
||||
this.contents[curIndex].view:OnShow(this,curPokemonData)
|
||||
local SkeletonGraphic = this.curLiveObj:GetComponent("SkeletonGraphic")
|
||||
-- SkeletonGraphic.AnimationState:SetAnimation(0, "touch", false)
|
||||
SkeletonGraphic.AnimationState:SetAnimation(0, "attack", false)
|
||||
this.rightBtn:GetComponent("Button").enabled = true
|
||||
isClickLeftOrRightBtn = true
|
||||
end):SetEase(Ease.Linear)
|
||||
|
|
@ -412,7 +421,7 @@ function this.LeftBtnOnClick()
|
|||
this.OnShowData()
|
||||
this.contents[curIndex].view:OnShow(this,curPokemonData)
|
||||
local SkeletonGraphic = this.curLiveObj:GetComponent("SkeletonGraphic")
|
||||
-- SkeletonGraphic.AnimationState:SetAnimation(0, "touch", false)
|
||||
SkeletonGraphic.AnimationState:SetAnimation(0, "attack", false)
|
||||
this.leftBtn:GetComponent("Button").enabled = true
|
||||
isClickLeftOrRightBtn = true
|
||||
end):SetEase(Ease.Linear)
|
||||
|
|
|
|||
|
|
@ -197,6 +197,9 @@ function this.ShowSinglePokemonList(go,singleData,liveIndex)
|
|||
local LiveName = curData.live
|
||||
local live2d = poolManager:LoadLive(LiveName, curPokemonLive.transform,Vector3.one *curData.scale * 0.4, Vector3.New(spiritAnimal[curData.id].littleScalePosition[1],spiritAnimal[curData.id].littleScalePosition[2],0))--curData.scale
|
||||
live2dList[liveIndex] = {name=curData.live, go=live2d}
|
||||
local SkeletonGraphic = live2d:GetComponent("SkeletonGraphic")
|
||||
local idle = function() SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true) end
|
||||
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete + idle
|
||||
local starSize = Vector2.New(65,65)
|
||||
PokemonManager.SetHeroStars(Util.GetGameObject(go, "upZhenInfo/starGrid/starGrid(Clone)"), curData.star,1,starSize)
|
||||
-- Util.AddOnceClick( Util.GetGameObject(go, "upZhenInfo/upZhenClick"), function()
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ function this.SingPokemonDataShow(_go,_itemData)
|
|||
local starSize = Vector2.New(50,50)
|
||||
SetHeroStars(Util.GetGameObject(_go.transform, "star/starGrid"), _itemData.star,1,starSize, -5,Vector2.New(0.5,0.5))
|
||||
Util.AddOnceClick(Util.GetGameObject(_go.transform,"click"), function()
|
||||
UIManager.OpenPanel(UIName.PokemonInfoPanel,_itemData,PokemonManager.GetPokemonDatas())
|
||||
UIManager.OpenPanel(UIName.PokemonInfoPanel,_itemData,{_itemData},true)
|
||||
end)
|
||||
end
|
||||
function this.SingPokemonChipDataShow(_go,_itemData)
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ function this.SingleItemDataShow(_go,_itemData)
|
|||
end
|
||||
end)
|
||||
Util.AddOnceClick(Util.GetGameObject(_go.transform,"click"), function()
|
||||
UIManager.OpenPanel(UIName.PokemonInfoPanel,_itemData,PokemonManager.GetPokemonDatas())
|
||||
UIManager.OpenPanel(UIName.PokemonInfoPanel,_itemData,{_itemData},true)
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue