29 |
#include "Common/Coord.h" |
#include "Common/Coord.h" |
30 |
|
|
31 |
@class NSMutableArray; |
@class NSMutableArray; |
32 |
@class NSCoder; |
@class NSString; |
33 |
|
|
34 |
@class HgGame; |
@class HgGame; |
35 |
|
@class MdlModel; |
36 |
|
|
37 |
@interface HgObject : NSObject |
@interface HgObject : NSObject |
38 |
{ |
{ |
39 |
|
|
40 |
@private |
@private |
41 |
unsigned _identifier; |
unsigned _identifier; |
42 |
|
id _delegate; |
43 |
coord_t _position; |
coord_t _position; |
44 |
coord_t _orientation; |
coord_t _orientation; |
|
NSMutableArray *_boundingBoxes; |
|
45 |
HgGame *_game; |
HgGame *_game; |
46 |
} |
} |
47 |
|
|
48 |
+ (NSString *) name; |
+ (NSString *) name; |
49 |
|
+ (MdlModel *) model; |
50 |
|
|
51 |
- (id) initWithGame: (HgGame *)game |
- (id) initWithGame: (HgGame *)game |
52 |
position: (coord_t)position; |
position: (coord_t)position; |
53 |
- (HgGame *) game; |
|
54 |
- (unsigned) identifier; |
- (unsigned) identifier; |
55 |
|
|
56 |
|
- (id) delegate; |
57 |
|
- (void) setDelegate: (id)delegate; |
58 |
|
|
59 |
|
- (NSString *) state; |
60 |
|
|
61 |
- (coord_t) position; |
- (coord_t) position; |
62 |
- (void) setPosition: (coord_t)position; |
- (void) setPosition: (coord_t)position; |
63 |
|
|
64 |
- (coord_t) orientation; |
- (coord_t) orientation; |
65 |
- (void) setOrientation: (coord_t)orientation; |
- (void) setOrientation: (coord_t)orientation; |
66 |
- (BOOL) collision: (HgObject *)object; |
|
67 |
- (void) setBoundingBoxes: (NSMutableArray *)boundingBoxes; |
- (HgGame *) game; |
|
- (void) collide: (HgObject *)object; |
|
68 |
|
|
69 |
@end |
@end |
70 |
|
|
|
@interface HgObject (NSCoding) |
|
71 |
|
|
72 |
- (void)encodeWithCoder: (NSCoder *)encoder; |
@class NSCoder; |
73 |
- (id)initWithCoder: (NSCoder *)decoder; |
|
74 |
|
@interface HgObject (NSCoding) <NSCoding> |
75 |
|
|
76 |
|
- (void) encodeWithCoder: (NSCoder *)encoder; |
77 |
|
- (id) initWithCoder: (NSCoder *)decoder; |
78 |
|
|
79 |
@end |
@end |
80 |
|
|