diff options
Diffstat (limited to 'Classes/ScoreBarLayer.m')
-rw-r--r-- | Classes/ScoreBarLayer.m | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Classes/ScoreBarLayer.m b/Classes/ScoreBarLayer.m new file mode 100644 index 0000000..b838ac9 --- /dev/null +++ b/Classes/ScoreBarLayer.m | |||
@@ -0,0 +1,41 @@ | |||
1 | // | ||
2 | // ScoreBarLayer.m | ||
3 | // Cartographic | ||
4 | // | ||
5 | // Created by Starla Insigna on 1/4/13. | ||
6 | // Copyright 2013 __MyCompanyName__. All rights reserved. | ||
7 | // | ||
8 | |||
9 | #import "ScoreBarLayer.h" | ||
10 | |||
11 | |||
12 | @implementation ScoreBarLayer | ||
13 | |||
14 | + (ScoreBarLayer*)scoreBar | ||
15 | { | ||
16 | return [[[ScoreBarLayer alloc] init] autorelease]; | ||
17 | } | ||
18 | |||
19 | - (id)init | ||
20 | { | ||
21 | self = [super initWithColor:ccc4(101, 214, 253, 255) fadingTo:ccc4(0, 104, 248, 255)]; | ||
22 | |||
23 | if (nil != self) | ||
24 | { | ||
25 | [self changeWidth:480 height:40]; | ||
26 | self.position = ccp(0, 280); | ||
27 | } | ||
28 | |||
29 | return self; | ||
30 | } | ||
31 | |||
32 | - (void)draw | ||
33 | { | ||
34 | [super draw]; | ||
35 | |||
36 | glEnable(GL_LINE_SMOOTH); | ||
37 | glColor4ub(0, 0, 0, 255); | ||
38 | ccDrawLine(ccp(0,0), ccp(480,0)); | ||
39 | } | ||
40 | |||
41 | @end | ||