Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_SpawnMusic.c
Go to the documentation of this file.
1
class
SCR_SpawnMusic
:
ScriptedMusic
2
{
3
MusicManager m_MusicManager;
4
5
//~ On local player spawned
6
protected
void
OnPlayerSpawned
()
7
{
8
m_MusicManager.Play(
SCR_SoundEvent
.SOUND_ONSPAWN);
9
}
10
11
override
void
Init
()
12
{
13
ChimeraWorld
world =
GetGame
().GetWorld();
14
15
if
(!world)
16
return
;
17
18
m_MusicManager = world.GetMusicManager();
19
if
(!m_MusicManager)
20
return
;
21
22
SCR_RespawnComponent
.SGetOnLocalPlayerSpawned().Insert(
OnPlayerSpawned
);
23
}
24
25
override
void
OnDelete
()
26
{
27
if
(!m_MusicManager)
28
return
;
29
30
SCR_RespawnComponent
.SGetOnLocalPlayerSpawned().Remove(
OnPlayerSpawned
);
31
}
32
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
SCR_RespawnComponent
void SCR_RespawnComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition
SCR_RespawnComponent.c:565
ChimeraWorld
Definition
ChimeraWorld.c:13
SCR_SoundEvent
Definition
SCR_SoundEvent.c:2
SCR_SpawnMusic
Definition
SCR_SpawnMusic.c:2
SCR_SpawnMusic::OnDelete
override void OnDelete()
Definition
SCR_SpawnMusic.c:25
SCR_SpawnMusic::OnPlayerSpawned
void OnPlayerSpawned()
Definition
SCR_SpawnMusic.c:6
SCR_SpawnMusic::Init
override void Init()
Definition
SCR_SpawnMusic.c:11
ScriptedMusic
Definition
ScriptedMusic.c:13
scripts
Game
Music
SCR_SpawnMusic.c
Generated by
1.17.0