65- (id) initRingFromEntity:(
Entity *)sourceEntity
67 if (sourceEntity ==
nil)
73 if ((
self = [super
init]))
81 [
self setPosition:[sourceEntity
position]];
83 [
self setVelocity:[sourceEntity
velocity]];
85 [
self setStatus:STATUS_EFFECT];
86 [
self setScanClass:CLASS_NO_DRAW];
88 [
self setOwner:sourceEntity];
95+ (instancetype) ringFromEntity:(
Entity *)sourceEntity
97 return [[[
self alloc] initRingFromEntity:sourceEntity] autorelease];
101+ (instancetype) shrinkingRingFromEntity:(
Entity *)sourceEntity
115 return [NSString stringWithFormat:@"%f seconds passed of %f", _timePassed, kRingDuration];
121 [
super update:delta_t];
129 [UNIVERSE removeEntity:self];
134- (void) drawImmediate:(
bool)immediate translucent:(
bool)translucent
136 if (!translucent || [
UNIVERSE breakPatternHide])
return;
143 GLfloat ex_em_hi[4] = {0.6, 0.8, 1.0, alpha};
144 GLfloat ex_em_lo[4] = {0.2, 0.0, 1.0, 0.0};
149 glColor4fv(ex_em_lo);
151 glColor4fv(ex_em_hi);