Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 7, 2005, 3:45:26 PM (18 years ago)
Author:
manuel
Message:

many changes:
created generic weapon_power_up that can contain any kind of weapon
space_ship is now extendable and can pickup weapon_power_ups

File:
1 copied

Legend:

Unmodified
Added
Removed
  • branches/powerups/src/world_entities/power_ups/weapon_power_up.h

    r5958 r5965  
    11/*!
    2  * @file laser_power_up.h
    3  * @brief A class representing a PowerUp in the world.
     2 * @file weapon_power_up.h
     3 * @brief A class representing a PowerUp containing a weapon.
    44*/
    55
    6 #ifndef _LASER_POWER_UP_H
    7 #define _LASER_POWER_UP_H
     6#ifndef _WEAPON_POWER_UP_H
     7#define _WEAPON_POWER_UP_H
    88
    99#include "power_up.h"
     10#include "weapons/weapon.h"
    1011
    1112/* FORWARD DEFINITION */
    12 class Material;
    1313
    14 class LaserPowerUp : public PowerUp {
     14class WeaponPowerUp : public PowerUp {
    1515
    16  public:
    17   LaserPowerUp();
    18   LaserPowerUp(const TiXmlElement* root);
    19   virtual ~LaserPowerUp ();
     16public:
     17  WeaponPowerUp();
     18  WeaponPowerUp(const TiXmlElement* root);
     19  virtual ~WeaponPowerUp ();
    2020
    21   virtual void LaserPowerUp::collidesWith(WorldEntity* entity, const Vector& location);
    22   virtual void tick(float dt);
    23   virtual void draw() const;
     21  Weapon* getWeapon();
     22  ClassID getWeaponID();
     23  long getCapsNeeded();
    2424
    25   private:
    26    void init();
    27    void loadParams(const TiXmlElement* root);
     25private:
     26  void init();
     27  void loadParams(const TiXmlElement* root);
    2828
    29   private:
    30    Vector              rotation;
    31    float               cycle;
    32 
    33    Model*              sphereModel;
    34    Material*           sphereMaterial;
     29private:
     30  ClassID weaponID;
     31  long capsNeeded;
    3532};
    3633
    37 #endif /* _LASER_POWER_UP_H */
     34#endif /* _WEAPON_POWER_UP_H */
Note: See TracChangeset for help on using the changeset viewer.