Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3577 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Mar 16, 2005, 5:16:40 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: enabling disabling of weapons

Location:
orxonox/trunk/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/weapon.cc

    r3576 r3577  
    4747
    4848
     49/**
     50    \brief enables the weapon
     51
     52    a weapon can be enabled/disabled because of various reasons. if a weapon is
     53    been enabled, it can interact in a world. elswhere it wont react to any
     54    action.
     55*/
     56void Weapon::enable()
     57{}
     58
     59
     60/**
     61    \brief disables the weapon
     62
     63    a weapon can be enabled/disabled because of various reasons. if a weapon is
     64    been enabled, it can interact in a world. elswhere it wont react to any
     65    action.
     66*/
     67void Weapon::disable()
     68{}
     69
     70
     71/**
     72    \brief checks if the weapon is enabled
     73    \returns true if enabled
     74
     75    a weapon can be ebabled/disabled because of various reasons. if a weapon is
     76    been enabled, it can interact in a world. elswhere it wont react to any
     77    action.
     78*/
     79bool Weapon::isEnabled()
     80{}
     81
     82
    4983/**
    5084   \brief sets a new projectile to the weapon
     
    139173
    140174/**
    141    \brief tick signal for time dependent/driven stuff
    142 */
    143 void Weapon::tick (float time)
    144 {}
     175   \brief fires the weapon
     176   
     177   this is called from the player.cc, when fire-button is been pushed
     178*/
     179void Weapon::fire()
     180{}
     181
    145182
    146183/**
     
    155192{}
    156193
     194
    157195/**
    158196   \brief is called, when the weapon is destroyed
     
    162200*/
    163201void Weapon::destroy ()
     202{}
     203
     204
     205/**
     206   \brief tick signal for time dependent/driven stuff
     207*/
     208void Weapon::tick (float time)
    164209{}
    165210
  • orxonox/trunk/src/world_entities/weapon.h

    r3576 r3577  
    3636  virtual ~Weapon ();
    3737 
     38  void enable();
     39  void disable();
     40  bool isEnabled();
     41
    3842  void setProjectile(Projectile* projectile);
    3943  Projectile* getProjectile();
     
    5761
    5862 private:
     63  bool enabled;
    5964  float firingRate;
    6065  float localTime;
Note: See TracChangeset for help on using the changeset viewer.