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

Diff of /hegemonie/GameEngine/HgStatic.m

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

revision 1.7 by thunder, Wed Aug 13 16:22:12 2003 UTC revision 1.8 by nicov, Mon Aug 18 10:38:13 2003 UTC
# Line 49  Line 49 
49    
50  /**  /**
51   * Change the object health.   * Change the object health.
52     * Post an notification named "updateObject" containing the current game and
53     * the current object.
54   */   */
55  - (void) setHealth: (unsigned)health  - (void) setHealth: (unsigned)health
56  {  {
57    [[NSNotificationCenter defaultCenter]    _health = health;
     postNotificationName:@"updateObject" object: [self game]];  
58    
59   _health = health;    [[NSNotificationCenter defaultCenter] postNotificationName: @"updateObject"
60                                                          object: [self game]
61                    userInfo: [NSDictionary dictionaryWithObject: self
62                                                          forKey: @"HgObject"]];
63  }  }
64    
65  /**  /**
# Line 68  Line 72 
72    
73  /**  /**
74   * Change the object mass.   * Change the object mass.
75     * Post an notification named "updateObject" containing the current game and
76     * the current object.
77   */   */
78  - (void) setMass: (unsigned)mass  - (void) setMass: (unsigned)mass
79  {  {
80   _mass = mass;    _mass = mass;
81    
82      [[NSNotificationCenter defaultCenter] postNotificationName: @"updateObject"
83                                                          object: [self game]
84                    userInfo: [NSDictionary dictionaryWithObject: self
85                                                          forKey: @"HgObject"]];
86  }  }
87    
88  /**  /**
# Line 84  Line 95 
95    
96  /**  /**
97   * Change the object hullShield.   * Change the object hullShield.
98     * Post an notification named "updateObject" containing the current game and
99     * the current object.
100   */   */
101  - (void) setHullShield: (unsigned)hullShield  - (void) setHullShield: (unsigned)hullShield
102  {  {
103    [[NSNotificationCenter defaultCenter]    _hullShield = hullShield;
     postNotificationName:@"updateObject" object: [self game]];  
104    
105   _hullShield = hullShield;    [[NSNotificationCenter defaultCenter] postNotificationName: @"updateObject"
106                                                          object: [self game]
107                    userInfo: [NSDictionary dictionaryWithObject: self
108                                                          forKey: @"HgObject"]];
109  }  }
110    
111  /**  /**
# Line 103  Line 118 
118    
119  /**  /**
120   * Change the object deckShield.   * Change the object deckShield.
121     * Post an notification named "updateObject" containing the current game and
122     * the current object.
123   */   */
124  - (void) setDeckShield: (unsigned)deckShield  - (void) setDeckShield: (unsigned)deckShield
125  {  {
126    [[NSNotificationCenter defaultCenter]    _deckShield = deckShield;
     postNotificationName:@"updateObject" object: [self game]];  
127    
128   _deckShield = deckShield;    [[NSNotificationCenter defaultCenter] postNotificationName: @"updateObject"
129                                                          object: [self game]
130                    userInfo: [NSDictionary dictionaryWithObject: self
131                                                          forKey: @"HgObject"]];
132  }  }
133    
134  @end  @end
# Line 117  Line 136 
136  @implementation HgStatic (NSCoding)  @implementation HgStatic (NSCoding)
137    
138  /**  /**
139   * NSCoding method   * NSCoding method to encode and decode objects
  * to encode and decode objects  
140   */   */
141  - (void)encodeWithCoder: (NSCoder *)encoder  - (void)encodeWithCoder: (NSCoder *)encoder
142  {  {

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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