【引导】npc修改
parent
1b3e9460fe
commit
fd1ea5fa67
|
@ -6,6 +6,9 @@ local curId
|
||||||
local args
|
local args
|
||||||
local audio
|
local audio
|
||||||
local orginLayer
|
local orginLayer
|
||||||
|
local live2d
|
||||||
|
local SkeletonGraphic
|
||||||
|
|
||||||
--初始化组件(用于子类重写)
|
--初始化组件(用于子类重写)
|
||||||
function this:InitComponent()
|
function this:InitComponent()
|
||||||
|
|
||||||
|
@ -32,7 +35,8 @@ function this:InitComponent()
|
||||||
|
|
||||||
|
|
||||||
self.handPoint = Util.GetGameObject(self.buttonIcon,"GameObject")
|
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
|
end
|
||||||
|
|
||||||
--绑定事件(用于子类重写)
|
--绑定事件(用于子类重写)
|
||||||
|
@ -527,6 +531,10 @@ function this:OnOpen(id, func, ...)
|
||||||
this.ShowGuide(id)
|
this.ShowGuide(id)
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -556,6 +564,7 @@ end
|
||||||
|
|
||||||
--界面关闭时调用(用于子类重写)
|
--界面关闭时调用(用于子类重写)
|
||||||
function this:OnClose()
|
function this:OnClose()
|
||||||
|
SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
|
||||||
|
|
||||||
if this.sortingOrder == 6300 then
|
if this.sortingOrder == 6300 then
|
||||||
this:SetSortingOrder(6000)
|
this:SetSortingOrder(6000)
|
||||||
|
|
Loading…
Reference in New Issue