32@interface OOSparkEntity (Private)
41- (id) initWithPosition:(HPVector)pos
47 if ((
self = [super initWithDiameter:
size]))
51 _duration = _timeRemaining = duration;
64 [
super update:delta_t];
65 [
self performUpdate:delta_t];
71 _timeRemaining -= delta_t;
73 float mix = OOClamp_0_1_f(_timeRemaining / _duration);
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];
82 if (mix == 0) [UNIVERSE removeEntity:self];
void setVelocity:(Vector vel)
void setCollisionRadius:(GLfloat amount)
void setPosition:(HPVector posn)
void getRed:green:blue:alpha:(float *red,[green] float *green,[blue] float *blue,[alpha] float *alpha)
void performUpdate:(OOTimeDelta delta_t)