/[hegemonie]/hegemonie/GameEngine/HgBonus.m
ViewVC logotype

Diff of /hegemonie/GameEngine/HgBonus.m

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by thunder, Wed Aug 13 16:14:45 2003 UTC revision 1.6 by nicov, Mon Aug 18 10:20:14 2003 UTC
# Line 47  Line 47 
47    
48  /**  /**
49   * Set the bonus ttl.   * Set the bonus ttl.
50     * Post an notification named "updateObject" containing the current game and
51     * the current object.
52   */   */
53  - (void) setTtl: (unsigned)ttl  - (void) setTtl: (unsigned)ttl
54  {  {
   [[NSNotificationCenter defaultCenter]  
     postNotificationName:@"updateObject" object: [self game]];  
   
55    _ttl = ttl;    _ttl = ttl;
56    
57      [[NSNotificationCenter defaultCenter] postNotificationName: @"updateObject"
58                                                          object: [self game]
59                    userInfo: [NSDictionary dictionaryWithObject: self
60                                                          forKey: @"HgObject"]];
61  }  }
62    
63  - (void) updateTtl  - (void) updateTtl
# Line 64  Line 68 
68  /**  /**
69   * Change the bonus value. This is an abstract class, and must be   * Change the bonus value. This is an abstract class, and must be
70   * redefined by subclasses to actually do something.   * redefined by subclasses to actually do something.
71     * Post an notification named "updateObject" containing the current game and
72     * the current object.
73   */   */
74  - (void) activate: (BOOL)state  - (void) activate: (BOOL)state
75  {  {
   [[NSNotificationCenter defaultCenter]  
     postNotificationName:@"updateObject" object: [self game]];  
   
76    _activated = state;    _activated = state;
77    
78      [[NSNotificationCenter defaultCenter] postNotificationName: @"updateObject"
79                                                          object: [self game]
80                    userInfo: [NSDictionary dictionaryWithObject: self
81                                                          forKey: @"HgObject"]];
82  }  }
83    
84  /**  /**
# Line 86  Line 94 
94  @implementation HgBonus (NSCoding)  @implementation HgBonus (NSCoding)
95    
96  /**  /**
97   * NSCoding method   * NSCoding method to encode and decode objects
  * to encode and decode objects  
98   */   */
99  - (void)encodeWithCoder: (NSCoder *)encoder  - (void)encodeWithCoder: (NSCoder *)encoder
100  {  {

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26