80 |
*/ |
*/ |
81 |
- (void) setAcceleration :(float)acceleration |
- (void) setAcceleration :(float)acceleration |
82 |
{ |
{ |
83 |
|
[[NSNotificationCenter defaultCenter] |
84 |
|
postNotificationName:@"updateObject" object: [self game]]; |
85 |
|
|
86 |
_acceleration = acceleration; |
_acceleration = acceleration; |
87 |
} |
} |
88 |
|
|
99 |
*/ |
*/ |
100 |
- (void) setDirection : (float)direction |
- (void) setDirection : (float)direction |
101 |
{ |
{ |
102 |
|
[[NSNotificationCenter defaultCenter] |
103 |
|
postNotificationName:@"updateObject" object: [self game]]; |
104 |
|
|
105 |
_direction = direction; |
_direction = direction; |
106 |
} |
} |
107 |
|
|
137 |
*/ |
*/ |
138 |
- (void) setCanonDirection: (float)canonDirection |
- (void) setCanonDirection: (float)canonDirection |
139 |
{ |
{ |
140 |
|
[[NSNotificationCenter defaultCenter] |
141 |
|
postNotificationName:@"updateObject" object: [self game]]; |
142 |
|
|
143 |
_canonDirection = canonDirection; |
_canonDirection = canonDirection; |
144 |
} |
} |
145 |
|
|
156 |
*/ |
*/ |
157 |
- (void) setCanonElevation: (unsigned)canonElevation |
- (void) setCanonElevation: (unsigned)canonElevation |
158 |
{ |
{ |
159 |
|
[[NSNotificationCenter defaultCenter] |
160 |
|
postNotificationName:@"updateObject" object: [self game]]; |
161 |
|
|
162 |
_canonElevation = canonElevation; |
_canonElevation = canonElevation; |
163 |
} |
} |
164 |
|
|
165 |
|
@end |
166 |
|
|
167 |
|
@implementation HgPlayerState (NSCoding) |
168 |
|
|
169 |
/** |
/** |
170 |
* NSCoding protocol |
* NSCoding protocol |
171 |
* to encode and decode objects |
* to encode and decode objects |