| 195 | } |
| 196 | |
| 197 | void UpdateFootprints() |
| 198 | { |
| 199 | if (Footprints.empty()) |
| 200 | return; |
| 201 | |
| 202 | for (auto& footprint: Footprints) |
| 203 | { |
| 204 | if (footprint.Life <= 0.0f) |
| 205 | continue; |
| 206 | |
| 207 | // Update opacity. |
| 208 | if (footprint.Life <= footprint.LifeStartFading) |
| 209 | { |
| 210 | float alpha = 1.0f - (footprint.Life / footprint.LifeStartFading); |
| 211 | footprint.Opacity = Lerp(footprint.OpacityStart, 0.0f, alpha); |
| 212 | } |
| 213 | |
| 214 | // Update life. |
| 215 | footprint.Life -= 1.0f; |
| 216 | } |
| 217 | |
| 218 | ClearInactiveEffects(Footprints); |
| 219 | } |
| 220 | |
| 221 | void ClearFootprints() |
| 222 | { |
no test coverage detected