DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
WheelSmoke.c
См. документацию.
2{
3 const float WHEEL_SMOKE_THRESHOLD = 5.0;
4
5 override void SelectFromSurface(SurfaceInfo surfaceInfo)
6 {
7
8 int particleID = surfaceInfo.GetWheelParticleId();
9
10 if (m_ParticleID != particleID)
11 {
12 if (particleID != 0)
13 SetParticleState(particleID);
14 else
15 Stop();
16 }
17 }
18
19 override void SetParticleState(int state)
20 {
21 bool wasPlaying = IsPlaying();
22
23 Stop();
24 SetParticleID(state);
25
26 if (wasPlaying)
27 {
28 Start(); // resume effect
29 }
30 }
31
32 [Obsolete("1.30: use SelectFromSurface instead")]
33 void SetSurface(string surface)
34 {
35 int particleID = Surface.GetWheelParticleID(surface);
36
37 if (m_ParticleID != particleID)
38 {
39 if (particleID != 0)
40 {
41 SetParticleState(particleID);
42 }
43 else
44 {
45 Stop();
46 }
47 }
48 }
49}
bool IsPlaying()
Returns true when the Effect is playing, false otherwise.
Определения Effect.c:197
const float WHEEL_SMOKE_THRESHOLD
Определения WheelSmoke.c:3
override void SelectFromSurface(SurfaceInfo surfaceInfo)
Определения WheelSmoke.c:5
override void SetParticleState(int state)
Определения WheelSmoke.c:19
void SetSurface(string surface)
Определения WheelSmoke.c:33
Определения WheelSmoke.c:2
override void Stop()
Stops all elements this effect consists of.
Определения EffectParticle.c:224
override void Start()
Plays all elements this effect consists of.
Определения EffectParticle.c:185
void SetParticleID(int id)
Sets the id of the particle to be used.
Определения EffectParticle.c:327
void EffectParticle()
ctor
Определения EffectParticle.c:36
int m_ParticleID
The ID in the ParticleList to create Particle from.
Определения EffectParticle.c:14
static int GetWheelParticleID(string surface_name)
Определения Surface.c:71
Определения Surface.c:2
proto int GetWheelParticleId()
Определения SurfaceInfo.c:9
void Obsolete(string msg="")
Определения EnScript.c:371