00001
00002
00003
00004
00005
00006
00007
00008
00009 #import "PainterFactoryForTac.h"
00010
00011
00012 @implementation PainterFactoryForTac
00013
00014 - (void) drawPlayer:(Player*) player inRect:(NSRect) Rect {
00015
00016 NSColor *col = [self colorForTeam:[player team]];
00017 if ([player flags] & PLAYER_CLOAK) {
00018
00019
00020 float alpha = 1.0;
00021 alpha -= (((1.0 - PF_MIN_ALPHA_VALUE) * [player cloakPhase]) / PLAYER_CLOAK_PHASES);
00022 col = [col colorWithAlphaComponent:alpha];
00023 }
00024 [col set];
00025
00026
00027
00028 [shapes drawTriangleNotchUpInRect:NSInsetRect(Rect, Rect.size.width*0.1515, Rect.size.height*0.1515)];
00029 }
00030
00031 @end