【引导】npc修改

dev_chengFeng
gaoxin 2021-03-19 17:52:36 +08:00
parent 1b3e9460fe
commit fd1ea5fa67
1 changed files with 10 additions and 1 deletions

View File

@ -6,6 +6,9 @@ local curId
local args
local audio
local orginLayer
local live2d
local SkeletonGraphic
--初始化组件(用于子类重写)
function this:InitComponent()
@ -32,7 +35,8 @@ function this:InitComponent()
self.handPoint = Util.GetGameObject(self.buttonIcon,"GameObject")
poolManager:LoadLive("live2d_c_yff_0048", self.dialogRoot.transform, Vector3.one * 0.36, Vector3.New(-330, 100))
live2d = poolManager:LoadLive("live2d_sgtn", self.dialogRoot.transform, Vector3.one * 0.42, Vector3.New(-337, -170))
end
--绑定事件(用于子类重写)
@ -527,6 +531,10 @@ function this:OnOpen(id, func, ...)
this.ShowGuide(id)
end
SkeletonGraphic = live2d:GetComponent("SkeletonGraphic")
SkeletonGraphic.AnimationState:SetAnimation(0, "touch", true)
Timer.New(function () SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true) end, 1.7):Start()
end
@ -556,6 +564,7 @@ end
--界面关闭时调用(用于子类重写)
function this:OnClose()
SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
if this.sortingOrder == 6300 then
this:SetSortingOrder(6000)