Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
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")]
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
26 {
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)
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
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}
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_BaseGameMode GetGameMode()
override void OnInit(World world)
override void OnApply(float time)
ScriptInvoker GetOnGameEnd()
Definition World.c:16
SCR_FieldOfViewSettings Attribute