Oolite 1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
OOSparkEntity(Private) Category Reference

Instance Methods

(void) - performUpdate:
 

Detailed Description

Definition at line 32 of file OOSparkEntity.m.

Method Documentation

◆ performUpdate:

- (void) performUpdate: (OOTimeDelta) delta_t

Extends class OOSparkEntity.

Definition at line 1 of file OOSparkEntity.m.

69 :(OOTimeDelta)delta_t
70{
71 _timeRemaining -= delta_t;
72
73 float mix = OOClamp_0_1_f(_timeRemaining / _duration);
74
75 // Fade towards red while fading out.
76 _colorComponents[0] = mix * _baseRGBA[0] + (1.0f - mix);
77 _colorComponents[1] = mix * _baseRGBA[1];
78 _colorComponents[2] = mix * _baseRGBA[2];
79 _colorComponents[3] = mix * _baseRGBA[3];
80
81 // Disappear when gone.
82 if (mix == 0) [UNIVERSE removeEntity:self];
83}
double OOTimeDelta
Definition OOTypes.h:224

The documentation for this category was generated from the following file: