Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
pperunconeffects.c
Go to the documentation of this file.
1
class
PPERequester_UnconEffects
extends
PPERequester_GameplayBase
2
{
3
protected
const
float
FADING_TIME_DEFAULT
= 3.0;
4
5
protected
float
m_Intensity
;
6
protected
float
m_FadeoutStartIntensity
;
7
protected
bool
m_Stopping
;
8
protected
bool
m_StopNext
;
9
protected
float
m_FadeOutTimeTarget
;
10
protected
float
m_FadingTimeElapsed
;
11
protected
float
m_FadingProgress
;
12
13
override
protected
void
OnStart
(
Param
par = null)
14
{
15
super.OnStart();
16
17
m_Intensity
= Param1<float>.Cast(par).param1;
18
m_Stopping
=
false
;
19
m_StopNext
=
false
;
20
SetTargetValueFloat
(
PostProcessEffectType
.Glow,
PPEGlow
.
PARAM_VIGNETTE
,
false
,
m_Intensity
,
PPEGlow
.
L_25_UNCON
,
PPOperators
.HIGHEST);
21
SetTargetValueColor
(
PostProcessEffectType
.Glow,
PPEGlow
.
PARAM_VIGNETTECOLOR
,{0.0,0.0,0.0,0.0},
PPEGlow
.
L_26_UNCON
,
PPOperators
.LOWEST);
22
}
23
24
override
protected
void
OnStop
(
Param
par = null)
25
{
26
super.OnStop(par);
27
28
m_FadingProgress
= 0.0;
29
m_Stopping
=
false
;
30
m_StopNext
=
false
;
31
}
32
33
override
protected
void
OnUpdate
(
float
delta)
34
{
35
if
(
m_StopNext
)
36
{
37
if
(
m_IsRunning
)
38
Stop
();
39
return
;
40
}
41
42
if
(
m_IsRunning
&&
m_Stopping
)
43
ProcessFading
(delta);
44
45
super.OnUpdate(delta);
46
47
if
(
m_IsRunning
&&
m_Stopping
)
48
SetRequesterUpdating
(
true
);
49
}
50
51
void
FadeOutEffect
(
float
targetTime =
FADING_TIME_DEFAULT
)
52
{
53
m_Stopping
=
true
;
54
m_FadeoutStartIntensity
=
m_Intensity
;
55
m_FadeOutTimeTarget
= targetTime;
56
m_FadingTimeElapsed
= 0.0;
57
58
if
(
m_IsRunning
)
59
SetRequesterUpdating
(
true
);
60
}
61
62
protected
void
ProcessFading
(
float
delta)
63
{
64
m_FadingTimeElapsed
+= delta;
65
m_FadingProgress
=
m_FadingTimeElapsed
/
m_FadeOutTimeTarget
;
66
67
m_StopNext
=
m_FadingProgress
>= 1.0;
68
69
m_Intensity
=
Math
.
Lerp
(0,
m_FadeoutStartIntensity
,
Easing
.
EaseInOutQuad
(1 -
m_FadingProgress
));
70
SetTargetValueFloat
(
PostProcessEffectType
.Glow,
PPEGlow
.
PARAM_VIGNETTE
,
false
,
m_Intensity
,
PPEGlow
.
L_25_UNCON
,
PPOperators
.HIGHEST);
71
}
72
}
Easing
Input value between 0 and 1, returns value adjusted by easing, no automatic clamping of input(do your...
Definition
easing.c:3
Easing::EaseInOutQuad
static float EaseInOutQuad(float t)
Definition
easing.c:29
Math
Definition
enmath.c:7
PPEGlow
Glow - PostProcessEffectType.Glow.
Definition
ppeglow.c:8
PPEGlow::L_25_UNCON
static const int L_25_UNCON
Definition
ppeglow.c:60
PPEGlow::PARAM_VIGNETTE
static const int PARAM_VIGNETTE
Definition
ppeglow.c:34
PPEGlow::PARAM_VIGNETTECOLOR
static const int PARAM_VIGNETTECOLOR
Definition
ppeglow.c:35
PPEGlow::L_26_UNCON
static const int L_26_UNCON
Definition
ppeglow.c:66
PPERequester_GameplayBase
base, not to be used directly, would lead to layering collisions!
Definition
pperbloodloss.c:2
PPERequester_GameplayBase::m_FadingTimeElapsed
float m_FadingTimeElapsed
Definition
pperhmpghosts.c:12
PPERequester_GameplayBase::OnStop
void OnStop(Param par=null)
Definition
pperunconeffects.c:24
PPERequester_GameplayBase::m_FadeoutStartIntensity
float m_FadeoutStartIntensity
Definition
pperunconeffects.c:6
PPERequester_GameplayBase::OnStart
void OnStart(Param par=null)
Definition
pperunconeffects.c:13
PPERequester_GameplayBase::ProcessFading
void ProcessFading(float delta)
Definition
pperhmpghosts.c:123
PPERequester_GameplayBase::m_FadingProgress
float m_FadingProgress
Definition
pperhmpghosts.c:13
PPERequester_GameplayBase::m_Stopping
bool m_Stopping
Definition
pperhmpghosts.c:9
PPERequester_GameplayBase::m_Intensity
float m_Intensity
Definition
pperflashbangeffects.c:6
PPERequester_GameplayBase::OnUpdate
void OnUpdate(float delta)
Definition
pperunconeffects.c:33
PPERequester_GameplayBase::FADING_TIME_DEFAULT
const float FADING_TIME_DEFAULT
Definition
pperunconeffects.c:3
PPERequester_GameplayBase::m_FadeOutTimeTarget
float m_FadeOutTimeTarget
Definition
pperhmpghosts.c:11
PPERequester_GameplayBase::m_StopNext
bool m_StopNext
Definition
pperhmpghosts.c:10
PPERequester_GameplayBase::FadeOutEffect
void FadeOutEffect(float targetTime=FADING_TIME_DEFAULT)
Definition
pperunconeffects.c:51
Param
Base Param Class with no parameters.
Definition
param.c:12
PostProcessEffectType
PostProcessEffectType
Post-process effect type.
Definition
enworld.c:72
Math::Lerp
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
Stop
void Stop()
Stops all elements this effect consists of.
Definition
effect.c:183
PPOperators
PPOperators
PP operators, specify operation between subsequent layers.
Definition
ppeconstants.c:53
m_IsRunning
bool m_IsRunning
Definition
pperequestplatformsbase.c:437
SetTargetValueFloat
void SetTargetValueFloat(int mat_id, int param_idx, bool relative, float val, int priority_layer, int operator=PPOperators.ADD_RELATIVE)
Definition
pperequestplatformsbase.c:588
SetRequesterUpdating
void SetRequesterUpdating(bool state)
Has to be set for the requester to be handled.
Definition
pperequestplatformsbase.c:456
SetTargetValueColor
void SetTargetValueColor(int mat_id, int param_idx, array< float > val, int priority_layer, int operator=PPOperators.ADD_RELATIVE)
Definition
pperequestplatformsbase.c:630
Games
Dayz
scripts
3_game
ppemanager
requesters
pperunconeffects.c
Generated by
1.17.0