-
Notifications
You must be signed in to change notification settings - Fork 0
/
TeamsCounter_device.verse
70 lines (50 loc) · 2.07 KB
/
TeamsCounter_device.verse
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/UI }
using { /Fortnite.com/UI }
using { /UnrealEngine.com/Temporary/SpatialMath}
# See https://dev.epicgames.com/documentation/en-us/uefn/create-your-own-device-in-verse for how to create a verse device.
# A Verse-authored creative device that can be placed in a level
TeamsCounter_device := class(creative_device):
@editable
var TeamCounter1 : player_counter_device = player_counter_device {}
@editable
var TeamCounter2 : player_counter_device = player_counter_device {}
@editable
var TeamCounter3 : player_counter_device = player_counter_device {}
@editable
var TeamCounter4 : player_counter_device = player_counter_device {}
@editable
var IconTeam1 : hud_message_device = hud_message_device {}
@editable
var IconTeam2 : hud_message_device = hud_message_device {}
@editable
var IconTeam3 : hud_message_device = hud_message_device {}
@editable
var IconTeam4 : hud_message_device = hud_message_device {}
@editable
Timer:timer_device = timer_device{}
OnBegin<override>()<suspends>:void=
Timer.SuccessEvent.Subscribe(OnTimeComplete)
OnTimeComplete(Agent: ?agent):void=
TeamCounter1.Enable()
TeamCounter2.Enable()
TeamCounter3.Enable()
TeamCounter4.Enable()
TeamCounter1.CountSucceedsEvent.Subscribe(OnCountSucceedT1)
TeamCounter2.CountSucceedsEvent.Subscribe(OnCountSucceedT2)
TeamCounter3.CountSucceedsEvent.Subscribe(OnCountSucceedT3)
TeamCounter4.CountSucceedsEvent.Subscribe(OnCountSucceedT4)
TeamCounter1.CompareToTarget()
TeamCounter2.CompareToTarget()
TeamCounter3.CompareToTarget()
TeamCounter4.CompareToTarget()
OnCountSucceedT1():void=
IconTeam1.Hide()
OnCountSucceedT2():void=
IconTeam2.Hide()
OnCountSucceedT3():void=
IconTeam3.Hide()
OnCountSucceedT4():void=
IconTeam4.Hide()