接入Spine
This commit is contained in:
@ -42,11 +42,11 @@ function SubSystem:ReceiveWorldBeginPlay()
|
||||
self.generator = CreateItemGenerator(row_data)
|
||||
|
||||
-- 创建初始篝火
|
||||
local bonfire = BusyActorManagerSubSystem:SpawnBonfire(row_data.FirstBonfirePosition)
|
||||
-- local bonfire = BusyActorManagerSubSystem:SpawnBonfire(row_data.FirstBonfirePosition)
|
||||
|
||||
-- 创建角色
|
||||
local role = BusyActorManagerSubSystem:SpawnRole(bonfire)
|
||||
GameplayStatics.GetPlayerController(self, 0):Possess(role)
|
||||
-- local role = BusyActorManagerSubSystem:SpawnRole(bonfire)
|
||||
-- GameplayStatics.GetPlayerController(self, 0):Possess(role)
|
||||
end
|
||||
|
||||
function SubSystem:ReceiveSubSystemTick(DeltaTime)
|
||||
|
||||
11
Content/Lua/Level/Actor/BusyPlayerRole.lua
Normal file
11
Content/Lua/Level/Actor/BusyPlayerRole.lua
Normal file
@ -0,0 +1,11 @@
|
||||
local BusyPlayerRole = {}
|
||||
|
||||
function BusyPlayerRole:UpdateMoveDirection(InDirection)
|
||||
if(InDirection.Y > 0) then
|
||||
self["SpineAnimationComponent"]:SetSkin("front/move")
|
||||
else
|
||||
self["SpineAnimationComponent"]:SetSkin("back/move")
|
||||
end
|
||||
end
|
||||
|
||||
return Class(nil, nil, BusyPlayerRole)
|
||||
Reference in New Issue
Block a user