252 {
253 #ifdef HEATBUFFER_INDICATOR_DEBUG
254 Print(
"HEAT BUFFER - EFFECT - Widget=" + hbw.GetName());
255 #endif
256
257 float baseAlpha = hbw.GetAlpha();
258 float opacity;
259
261
262
264 {
268 }
269
270
272
273
275
276
278 {
279 opacity = Math.Lerp(0.0, 1.0, timeFraction);
280 if (timeFraction >= 1.0)
281 {
284 }
285 }
286 else
287 {
288 opacity = Math.Lerp(1.0, 0.0, timeFraction);
289 if (timeFraction >= 1.0)
290 {
293 }
294 }
295
296
297 opacity = Math.Clamp(opacity, 0.0, 1.0);
298
299
300 hbw.SetAlpha(opacity);
301
302
303 #ifdef HEATBUFFER_INDICATOR_DEBUG
305 #endif
306 }
proto void Print(void var)
Prints content of variable to console/log.