22 |
*/ |
*/ |
23 |
|
|
24 |
#include <Foundation/NSCoder.h> |
#include <Foundation/NSCoder.h> |
25 |
|
#include <Foundation/NSNotification.h> |
26 |
|
|
27 |
#include "GameEngine/HgBonus.h" |
#include "GameEngine/HgBonus.h" |
28 |
|
|
29 |
/** |
/** |
50 |
*/ |
*/ |
51 |
- (void) setTtl: (unsigned)ttl |
- (void) setTtl: (unsigned)ttl |
52 |
{ |
{ |
53 |
|
[[NSNotificationCenter defaultCenter] |
54 |
|
postNotificationName:@"updateObject" object: [self game]]; |
55 |
|
|
56 |
_ttl = ttl; |
_ttl = ttl; |
57 |
} |
} |
58 |
|
|
67 |
*/ |
*/ |
68 |
- (void) activate: (BOOL)state |
- (void) activate: (BOOL)state |
69 |
{ |
{ |
70 |
|
[[NSNotificationCenter defaultCenter] |
71 |
|
postNotificationName:@"updateObject" object: [self game]]; |
72 |
|
|
73 |
_activated = state; |
_activated = state; |
74 |
} |
} |
75 |
|
|
81 |
return _activated; |
return _activated; |
82 |
} |
} |
83 |
|
|
84 |
|
@end |
85 |
|
|
86 |
|
@implementation HgBonus (NSCoding) |
87 |
|
|
88 |
/** |
/** |
89 |
* NSCoding method |
* NSCoding method |
90 |
* to encode and decode objects |
* to encode and decode objects |