Oolite 1.91.0.7668-250429-8542c40
All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Modules Pages
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 69 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

Referenced by OOSparkEntity::initWithPosition:velocity:duration:size:color:, and OOSparkEntity::update:.

+ Here is the caller graph for this function:

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