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

Diff of /hegemonie/GameEngine/HgWeapon.m

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

revision 1.7 by nicov, Mon Aug 18 10:39:31 2003 UTC revision 1.8 by nicov, Tue Aug 19 15:45:05 2003 UTC
# Line 27  Line 27 
27  #include "GameEngine/HgWeapon.h"  #include "GameEngine/HgWeapon.h"
28    
29  /**  /**
30   * Hgweapons stores all caracteristic of weapons.   * HgWeapons stores all caracteristic of weapons.
31   * Weapons are mobileObject with a time to life (ttl).   * Weapons are mobileObject with a time to life (ttl).
32   * This class is abstract and must be redefined by a subclass to make   * This class is abstract and must be redefined by a subclass to make
33   * a "real" weapon.   * a "real" weapon.
34   */   */
35  @implementation HgWeapon  @implementation HgWeapon
36    
37    /**
38     * Returns the fire rate of the weapon.
39     * This method is abstract and must be redefined by concrete subclasses.
40     */
41    + (unsigned) fireRate
42    {
43      [self subclassResponsibility: _cmd];
44      return 0;
45    }
46    
47    /**
48     * Returns the damage of the weapon.
49     * This method is abstract and must be redefined by concrete subclasses.
50     */
51    + (unsigned) damage
52    {
53      [self subclassResponsibility: _cmd];
54      return 0;
55    }
56    
57  /**  /**
58   * The contructeur is the same as HgMobile.   * The contructor is the same as HgMobile.
59   */   */
60    
61  /**  /**
# Line 53  Line 73 
73   */   */
74  - (void) setTtl: (unsigned)ttl  - (void) setTtl: (unsigned)ttl
75  {  {
76    _ttl=ttl;    _ttl = ttl;
77        
78    [[NSNotificationCenter defaultCenter] postNotificationName: @"updateObject"    [[NSNotificationCenter defaultCenter] postNotificationName: @"updateObject"
79                                                        object: [self game]                                                        object: [self game]

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