34@interface OOFlasherEntity (Internal)
36- (void) setUpColors:(NSArray *)colorSpecifiers;
44+ (instancetype) flasherWithDictionary:(NSDictionary *)dictionary
46 return [[[
OOFlasherEntity alloc] initWithDictionary:dictionary] autorelease];
44+ (instancetype) flasherWithDictionary:(NSDictionary *)dictionary {
…}
50- (id) initWithDictionary:(NSDictionary *)dictionary
52 float size = [
dictionary oo_floatForKey:@"size" defaultValue:1.0f];
54 if ((
self = [super initWithDiameter:
size]))
50- (id) initWithDictionary:(NSDictionary *)dictionary {
…}
77- (void) setUpColors:(NSArray *)colorSpecifiers
82 while ((specifier = [specEnum nextObject]))
77- (void) setUpColors:(NSArray *)colorSpecifiers {
…}
103- (void) setActive:(BOOL)active
103- (void) setActive:(BOOL)active {
…}
112 green:_colorComponents[1]
113 blue:_colorComponents[2]
114 alpha:_colorComponents[3]];
124- (void) setFrequency:(
float)frequency
124- (void) setFrequency:(
float)frequency {
…}
136- (void) setPhase:(
float)phase
136- (void) setPhase:(
float)phase {
…}
148- (void) setFraction:(
float)fraction
148- (void) setFraction:(
float)fraction {
…}
163 NSUInteger
count = [_colors count];
164 if (
count > 1 && wave < 0)
171 [
self setColor:[_colors objectAtIndex:_activeColor]];
182 if (wave > threshold)
186 else if (wave < threshold)
202- (void) drawImmediate:(
bool)immediate translucent:(
bool)translucent
202- (void) drawImmediate:(
bool)immediate translucent:(
bool)translucent {
…}
211- (void) drawSubEntityImmediate:(
bool)immediate translucent:(
bool)translucent
211- (void) drawSubEntityImmediate:(
bool)immediate translucent:(
bool)translucent {
…}
232- (void) rescaleBy:(GLfloat)factor
232- (void) rescaleBy:(GLfloat)factor {
…}
238- (void) rescaleBy:(GLfloat)factor writeToCache:(BOOL)writeToCache
238- (void) rescaleBy:(GLfloat)factor writeToCache:(BOOL)writeToCache {
…}
247@implementation Entity (OOFlasherEntityExtensions)
void getCurrentColorComponents()
void update:(OOTimeDelta delta_t)
OOColor * colorWithRed:green:blue:alpha:(float red,[green] float green,[blue] float blue,[alpha] float alpha)
OOColor * colorWithDescription:saturationFactor:(id description,[saturationFactor] float factor)
void setActive:(BOOL active)
void getCurrentColorComponents()
double findCollisionRadius()
void setUpColors:(NSArray *colorSpecifiers)
void setColor:alpha:(OOColor *color,[alpha] GLfloat alpha)
void setColor:(OOColor *color)
void drawSubEntityImmediate:translucent:(bool immediate,[translucent] bool translucent)
void setDiameter:(float diameter)
void drawImmediate:translucent:(bool immediate, [translucent] bool translucent)
GLfloat _colorComponents[4]