-
Notifications
You must be signed in to change notification settings - Fork 0
/
bgm_manager.verse
44 lines (35 loc) · 1.43 KB
/
bgm_manager.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
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Fortnite.com/Playspaces }
# 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
bgm_manager := class(creative_device):
@editable EndrollBgmPlayer: audio_player_device = audio_player_device{}
@editable BattleBgmPlayer: audio_player_device = audio_player_device{}
@editable NormalBgmPlayer: audio_player_device = audio_player_device{}
@editable DeadPlayer: audio_player_device = audio_player_device{}
@editable DefeatPlayer: audio_player_device = audio_player_device{}
# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
PlayNormalBgm()
PlayDead():void =
Print("PlayDead")
DeadPlayer.Play()
PlayDefeat():void =
Print("PlayDefeat")
DefeatPlayer.Play()
PlayNormalBgm():void =
Print("PlayNormalBgm")
EndrollBgmPlayer.Stop()
BattleBgmPlayer.Stop()
NormalBgmPlayer.Play()
PlayBattleBgm(IsLasBoss: logic):void =
Print("PlayBattleBgm")
NormalBgmPlayer.Stop()
EndrollBgmPlayer.Stop()
BattleBgmPlayer.Play()
PlayEndrollBgm():void =
NormalBgmPlayer.Stop()
BattleBgmPlayer.Stop()
EndrollBgmPlayer.Play()