-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGELayer.m
More file actions
42 lines (32 loc) · 712 Bytes
/
GELayer.m
File metadata and controls
42 lines (32 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// GELayer.m
// BallStack
//
// Created by Adam McDonald on 11/9/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import "GELayer.h"
#define INITIAL_OBJECTS 100
@implementation GELayer
@synthesize gameObjects;
- (id)init {
if (self = [super init]) {
// Initialization code
gameObjects = [[NSMutableArray alloc] initWithCapacity:INITIAL_OBJECTS];
}
return self;
}
- (void)addGameObject:(GEGameObject *)obj {
[gameObjects addObject:obj];
}
- (void)removeGameObject:(GEGameObject *)obj {
[gameObjects removeObject:obj];
}
- (void)removeAllGameObjects {
[gameObjects removeAllObjects];
}
- (void)dealloc {
[gameObjects release];
[super dealloc];
}
@end