MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / Simulate

Method Simulate

engine/Poseidon/Game/TitEffects.cpp:137–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137void TitleEffectTimed::Simulate(float deltaT)
138{
139 PoseidonAssert(deltaT >= 0);
140
141 deltaT /= _speed;
142 if (_fadeInTime > 0)
143 {
144 _fadeInTime -= deltaT;
145 _alpha = 1 - _fadeInTime / _fadeInTotal;
146 }
147 else if (_timeToLive > 0)
148 {
149 _timeToLive -= deltaT;
150 _alpha = 1;
151 }
152 else
153 {
154 _fadeOutTime -= deltaT;
155 _alpha = _fadeOutTime / _fadeOutTotal;
156 }
157 saturate(_alpha, 0, 1);
158}
159
160class TitleEffectBasic : public TitleEffectTimed
161{

Callers 1

SetupEffectFunction · 0.45

Calls 1

saturateFunction · 0.85

Tested by

no test coverage detected