Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3575 in orxonox.OLD for orxonox/trunk/src/world_entities/weapon.h


Ignore:
Timestamp:
Mar 16, 2005, 4:24:09 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: weapon skeleton extended

File:
1 edited

Legend:

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

    r3573 r3575  
    1616    weapon in this world:
    1717     o sound file/ressource: this is a pointer to the sound-file/ressource. however it may be represented
     18     o shooting animation
    1819     
    1920*/
     
    2526#include "world_entity.h"
    2627
     28class Projectile;
    2729
    2830class Weapon : public WorldEntity
     
    3436  virtual ~Weapon ();
    3537 
    36   virtual void tick (float time);
     38  void setProjectile(Projectile* projectile);
     39  Projectile* getProjectile();
     40
     41  void activate();
     42  void deactivate();
     43  bool isActive();
     44
     45  void setWeaponEnergy(int energy);
     46  void addWeaponEnergy(int addEnergy);
     47  void substractWeaponEnergy(int subEnergy);
     48  int getWeaponEnergy();
     49
     50  void fire();
    3751  virtual void hit (WorldEntity* weapon, Vector loc);
    3852  virtual void destroy ();
    39   virtual void collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags);
     53 
     54  virtual void tick (float time);
    4055  virtual void draw ();
     56
    4157
    4258 private:
    4359  float firingRate;
     60  float localTime;
    4461  float slowDownFactor;
    4562  int energyConsumption;
     63  Projectile* projectile;
    4664
    4765};
Note: See TracChangeset for help on using the changeset viewer.