32#define kQuiriumCascadeDuration (20.0)
33#define kQuiriumCollisionDelay (0.05)
38- (id) initQuiriumCascadeFromShip:(
ShipEntity *)ship
46 if ((
self = [super
init]))
50 [
self setStatus:STATUS_EFFECT];
53 [
self setOwner:[ship
owner]];
64+ (instancetype) quiriumCascadeFromShip:(
ShipEntity *)ship
66 return [[[
self alloc] initQuiriumCascadeFromShip:ship] autorelease];
72 return [NSString stringWithFormat:@"%f seconds passed of %f", _timePassed, kQuiriumCascadeDuration];
78 [
super update:delta_t];
84 GLfloat stf = tf * tf;
85 GLfloat expansionSpeed = 0.0;
88 expansionSpeed = fmin(240.0f + 10.0f / (tf * tf), 1000.0f);
92 energy = delta_t * (100000 - 90000 * tf);
94 _color[3] = OOClamp_0_1_f(0.5f * ((0.025f / tf) + 1.0f - stf));
116 [UNIVERSE removeEntity:self];
121- (void) drawImmediate:(
bool)immediate translucent:(
bool)translucent
123 if (!translucent || [
UNIVERSE breakPatternHide])
return;
128 OOGL(glPushAttrib(GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT));
130 OOGL(glDisable(GL_CULL_FACE));
131 OOGL(glDisable(GL_TEXTURE_2D));
132 OOGL(glEnable(GL_BLEND));
133 OOGL(glBlendFunc(GL_SRC_ALPHA, GL_ONE));