-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBP_ThirldPerson.lua
52 lines (41 loc) · 997 Bytes
/
BP_ThirldPerson.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
--
-- DESCRIPTION
--
-- @COMPANY **
-- @AUTHOR **
-- @DATE ${date} ${time}
--
---@type ThirdPersonCharacter_C
local M = UnLua.Class()
local Screen = require("Screen")
-- function M:Initialize(Initializer)
-- end
-- function M:UserConstructionScript()
-- end
-- A custom event named Pick
function M:Pick()
self.item:K2_DestroyActor()
Screen.Print("Pick Up Actor")
end
function M:ReceiveBeginPlay()
local __actor = UE.TArray(UE.AActor)
UE.UGameplayStatics.GetAllActorsOfClass(
self:GetWorld(),
UE.UClass.Load("/Game/TestFile/BluePrint/BP_Pickup.BP_Pickup_C"),
__actor
)
self.item = __actor:GetRef(1)
-- bind event to PickUp
self.item.PickUp:Add(self,self.Pick)
end
-- function M:ReceiveEndPlay()
-- end
-- function M:ReceiveTick(DeltaSeconds)
-- end
-- function M:ReceiveAnyDamage(Damage, DamageType, InstigatedBy, DamageCauser)
-- end
-- function M:ReceiveActorBeginOverlap(OtherActor)
-- end
-- function M:ReceiveActorEndOverlap(OtherActor)
-- end
return M