Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
MaterialCinematicTrack.c
Go to the documentation of this file.
1[CinematicTrackAttribute(name:"Material Animation Track", description:"Track used for animating materials")]
3{
4 [Attribute("0.0")]
5 float m_Emissivity;
6
7 private GameEntity m_GeneralEntity;
8 private World globalWorld;
9
10 override void OnInit(World world)
11 {
12 // Find particle entity by using name of track
13 findEntity(world);
14 globalWorld = world;
15 }
16
17 void findEntity(World world)
18 {
19 // Find particle entity by using name of track
20 TStringArray strs = new TStringArray;
21 GetTrackName().Split("_", strs, true);
22
23 m_GeneralEntity = GameEntity.Cast(world.FindEntityByName(strs.Get(0)));
24 }
25
26 override void OnApply(float time)
27 {
28
29 if (globalWorld)
30 {
31 //Finding effect entity each frame for keep working in edit time
32 findEntity(globalWorld);
33 }
34
35 if (m_GeneralEntity)
36 {
37
39
40 if (paramMat)
41 paramMat.SetEmissiveMultiplier(m_Emissivity);
42 }
43 }
44}
Definition World.c:16
SCR_FieldOfViewSettings Attribute
array< string > TStringArray
Definition Types.c:385