DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
PPERContaminated.c
См. документацию.
1// PPE when player is in contaminated area trigger
2class PPERequester_ContaminatedAreaTint extends PPERequester_GameplayBase
3{
5 protected float m_AccumulatedTime = 0;
6 protected bool m_FadeIn = false;
7 protected bool m_FadeOut = false;
8
9 const float FADE_TIME = 3;
10 // the end result is 1 - the value set here
11 const float R_TARGET = 0.142; // end value 0.858
12 const float G_TARGET = 0.15; // end value 0.850
13 const float B_TARGET = 0.44; // end value 0.560
14
15 override protected void OnStart( Param par = null )
16 {
17 super.OnStart( par );
18
20
21 m_FadeIn = true;
22 m_FadeOut = false;
23
26 }
27
28 override protected void OnUpdate( float delta )
29 {
30 super.OnUpdate( delta );
31
33 {
34 m_AccumulatedTime += delta;
35
39
40 SetTargetValueColor(PostProcessEffectType.Glow,PPEGlow.PARAM_COLORIZATIONCOLOR,{m_StartRGB[0], m_StartRGB[1], m_StartRGB[2], 0.0},PPEGlow.L_23_TOXIC_TINT,PPOperators.MULTIPLICATIVE);
41 }
42
43 if ( m_FadeOut )
44 {
46 {
47 m_AccumulatedTime += delta;
48
52
53 SetTargetValueColor(PostProcessEffectType.Glow,PPEGlow.PARAM_COLORIZATIONCOLOR,{m_StartRGB[0], m_StartRGB[1], m_StartRGB[2], 0.0},PPEGlow.L_23_TOXIC_TINT,PPOperators.MULTIPLICATIVE);
54 }
55 else
56 {
57 Stop(); //proper termination after a fadeout
58 }
59 }
60 }
61
62 override void OnStop(Param par = null)
63 {
64 m_FadeIn = false;
65 m_FadeOut = false;
66 Param1<bool> p;
67
68 if (par && Class.CastTo(p,par))
69 m_FadeOut = p.param1;
70
72
73 super.OnStop(par);
74 }
75
76 // Lerped multiplier for RGBA values
77 protected float FadeColourMult( float x, float y, float deltaT )
78 {
79 float output;
80 output = Math.Lerp( x, y, deltaT );
81 Easing.EaseInOutSine( output );
82 return output;
83 }
84}
Icon x
Icon y
PPOperators
PP operators, specify operation between subsequent layers.
Определения PPEConstants.c:53
void SetTargetValueFloat(int mat_id, int param_idx, bool relative, float val, int priority_layer, int operator=PPOperators.ADD_RELATIVE)
Определения PPERequestPlatformsBase.c:588
void SetTargetValueColor(int mat_id, int param_idx, array< float > val, int priority_layer, int operator=PPOperators.ADD_RELATIVE)
Определения PPERequestPlatformsBase.c:630
Super root of all classes in Enforce script.
Определения EnScript.c:11
static float EaseInOutSine(float t)
Определения Easing.c:14
Input value between 0 and 1, returns value adjusted by easing, no automatic clamping of input(do your...
Определения Easing.c:3
Определения EnMath.c:7
static const int L_1_TOXIC_TINT
Определения PPEFilmGrain.c:20
static const int PARAM_SHARPNESS
Определения PPEFilmGrain.c:9
static const int L_2_TOXIC_TINT
Определения PPEFilmGrain.c:22
static const int PARAM_GRAINSIZE
Определения PPEFilmGrain.c:10
FilmGrain - PostProcessEffectType.FilmGrain.
Определения PPEFilmGrain.c:7
static const int PARAM_COLORIZATIONCOLOR
Определения PPEGlow.c:32
static const int L_23_TOXIC_TINT
Определения PPEGlow.c:53
Glow - PostProcessEffectType.Glow.
Определения PPEGlow.c:8
override void OnStop(Param par=null)
Определения PPERContaminated.c:62
float FadeColourMult(float x, float y, float deltaT)
Определения PPERContaminated.c:77
const float G_TARGET
Определения PPERContaminated.c:12
const float FADE_TIME
Определения PPERContaminated.c:9
void OnStart(Param par=null)
Определения PPERContaminated.c:15
float m_AccumulatedTime
Определения PPERContaminated.c:5
const float B_TARGET
Определения PPERContaminated.c:13
vector m_StartRGB
Определения PPERContaminated.c:4
void OnUpdate(float delta)
Определения PPERContaminated.c:28
const float R_TARGET
Определения PPERContaminated.c:11
base, not to be used directly, would lead to layering collisions!
Определения PPERBloodLoss.c:2
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Определения param.c:12
static const vector Zero
Определения EnConvert.c:110
Определения EnConvert.c:106
PostProcessEffectType
Post-process effect type.
Определения EnWorld.c:72
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
void Stop()
Stops all elements this effect consists of.
Определения Effect.c:181