DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ Update()

override void EffectBoatWaterBack::Update ( float timeSlice = 0)
inlineprotected

См. определение в файле BoatWaterEffects.c строка 166

167 {
168 if (m_Boat.GetCurrentGear() == 0)
169 {
170 if (IsPlaying())
171 {
173 GetParticle().SetParticleParam(EmitorParam.BIRTH_RATE_RND, 0);
174 Stop();
175 };
176
177 return;
178 }
179
180 super.Update(timeSlice);
181 Particle ptc = GetParticle();
182
183 float speed = m_Boat.PropellerGetAngularVelocity();
184 UpdateSpeedState(ptc, speed);
185
186 float lerp = Math.InverseLerp(0, m_SpeedFast, speed);
187
188 for (int i = 0; i < m_EmitorCount; i++)
189 {
190 if (i < EMITORS_FAST && m_SpeedState > EBoatSpeed.SLOW)
191 {
192 ptc.SetParameter(i, EmitorParam.SIZE, ptc.GetParameterOriginal(i, EmitorParam.SIZE) * lerp);
193 ptc.SetParameter(i, EmitorParam.BIRTH_RATE, ptc.GetParameterOriginal(i, EmitorParam.BIRTH_RATE) * lerp);
194 }
195 }
196 }
EBoatSpeed
Определения BoatWaterEffects.c:2
bool IsPlaying()
Returns true when the Effect is playing, false otherwise.
Определения Effect.c:195
void UpdateSpeedState(Particle ptc, float speed)
Определения BoatWaterEffects.c:130
BoatScript m_Boat
Определения BoatWaterEffects.c:282
int m_EmitorCount
Определения BoatWaterEffects.c:275
int m_SpeedFast
Определения BoatWaterEffects.c:278
override void Stop()
Stops all elements this effect consists of.
Определения EffectParticle.c:204
Particle GetParticle()
Gets the main particle which this Effect is managing.
Определения EffectParticle.c:162
float GetParameterOriginal(int emitter, int parameter)
Определения Particle.c:663
void SetParticleParam(int parameter_id, float value)
Set the value of a parameter of all emitors in the particle.
Определения Particle.c:611
void SetParameter(int emitter, int parameter, float value)
Set the value of a parameter of an emitor in the particle.
Определения Particle.c:625
EmitorParam
Определения EnVisual.c:114

Перекрестные ссылки Particle::GetParameterOriginal(), EffectParticle::GetParticle(), Math::InverseLerp(), IsPlaying(), EffectBoatWaterBase::m_Boat, EffectBoatWaterBase::m_EmitorCount, EffectBoatWaterBase::m_SpeedFast, Particle::SetParameter(), Particle::SetParticleParam(), EffectParticle::Stop() и UpdateSpeedState().