Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
FadesCinematicTrack.c
Go to the documentation of this file.
1
[
CinematicTrackAttribute
(name:
"Fades Track"
, description:
"Track used for fading of visual and sound"
)]
2
class
FadesCinematicTrack
:
CinematicTrackBase
3
{
4
5
[
Attribute
(
"0.0"
,
params
:
"0.0 1.0"
)]
6
float
m_fBlackScreenOpacity;
7
8
[
Attribute
(
"1.0"
,
params
:
"0.0 1.0"
)]
9
float
m_fVolumeSFX;
10
11
[
Attribute
(
"1.0"
,
params
:
"0.0 1.0"
)]
12
float
m_fVolumeVoices;
13
14
[
Attribute
(
"false"
)]
15
bool
m_bDestroyBlackscreenOnTimelineEnd;
16
17
[
Attribute
(
"0"
,
params
:
"0 100"
)]
18
int
m_iDestroyLaterInSeconds;
19
20
private
GenericEntity
m_Entity;
21
private
World
globalWorld;
22
static
Widget
m_wBlackScreen;
23
protected
const
string
FADEOUT_LAYOUT
=
"{265245C299401BF6}UI/layouts/Menus/ContentBrowser/DownloadManager/ScrollBackground.layout"
;
24
25
void
DestroyScreen
()
26
{
27
SCR_BaseGameMode
gamemode =
SCR_BaseGameMode
.Cast(
GetGame
().
GetGameMode
());
28
29
if
(gamemode)
30
gamemode.
GetOnGameEnd
().Remove(
DestroyScreen
);
31
32
if
(m_wBlackScreen)
33
m_wBlackScreen.RemoveFromHierarchy();
34
}
35
36
override
void
OnFinish
()
37
{
38
if
(!m_bDestroyBlackscreenOnTimelineEnd)
39
return
;
40
41
if
(m_iDestroyLaterInSeconds == 0)
42
DestroyScreen
();
43
else
44
GetGame
().GetCallqueue().CallLater(
DestroyScreen
, m_iDestroyLaterInSeconds * 1000);
45
}
46
47
override
void
OnInit
(
World
world)
48
{
49
if
(!m_wBlackScreen)
50
{
51
m_wBlackScreen =
GetGame
().GetWorkspace().CreateWidgets(
FADEOUT_LAYOUT
);
52
53
SCR_BaseGameMode
gamemode =
SCR_BaseGameMode
.Cast(
GetGame
().
GetGameMode
());
54
55
if
(gamemode)
56
gamemode.
GetOnGameEnd
().Insert(
DestroyScreen
);
57
}
58
}
59
60
override
void
OnApply
(
float
time)
61
{
62
63
if
(!m_wBlackScreen)
64
return
;
65
66
m_wBlackScreen.SetOpacity(m_fBlackScreenOpacity);
67
68
AudioSystem
.SetMasterVolume(
AudioSystem
.SFX, m_fVolumeSFX);
69
AudioSystem
.SetMasterVolume(
AudioSystem
.Dialog, m_fVolumeVoices);
70
}
71
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
GetGameMode
SCR_BaseGameMode GetGameMode()
Definition
SCR_BaseGameModeComponent.c:15
params
category params
Definition
SCR_SpherePointGeneratorPreviewComponent.c:21
AudioSystem
Definition
AudioSystem.c:13
CinematicTrackAttribute
Definition
attributes.c:3
CinematicTrackBase
Definition
CinematicTrackBase.c:8
FadesCinematicTrack
Definition
FadesCinematicTrack.c:3
FadesCinematicTrack::OnInit
override void OnInit(World world)
Definition
FadesCinematicTrack.c:47
FadesCinematicTrack::OnApply
override void OnApply(float time)
Definition
FadesCinematicTrack.c:60
FadesCinematicTrack::DestroyScreen
void DestroyScreen()
Definition
FadesCinematicTrack.c:25
FadesCinematicTrack::FADEOUT_LAYOUT
const string FADEOUT_LAYOUT
Definition
FadesCinematicTrack.c:23
FadesCinematicTrack::OnFinish
override void OnFinish()
Definition
FadesCinematicTrack.c:36
GenericEntity
Definition
GenericEntity.c:16
SCR_BaseGameMode
Definition
SCR_BaseGameMode.c:139
SCR_BaseGameMode::GetOnGameEnd
ScriptInvoker GetOnGameEnd()
Definition
SCR_BaseGameMode.c:589
Widget
Definition
Widget.c:13
World
Definition
World.c:16
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Cinematics
FadesCinematicTrack.c
Generated by
1.17.0