Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 27, 2006, 6:45:58 PM (18 years ago)
Author:
bensch
Message:

orxonox/proxy: the rockets from the targeting turrets aquire targets as they are supposed, but they do not get fired unless the player is near of them… strangely

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/world_entities/weapons/aim.h

    r9513 r9516  
    1111#include "object_manager.h"
    1212
     13#include "material.h"
     14
    1315// FORWARD DECLARATION
    1416class Model;
    1517class Text;
    16 class Material;
    1718class TiXmlElement;
    1819template<class T> class tAnimation;
     
    2526 * Also the Aim is a Element2D, as it draws a cross onto the Target.
    2627 */
    27 class Aim : public PNode, public Element2D {
     28class Aim : public PNode, public Element2D
     29{
    2830
    29  public:
     31public:
    3032  Aim(PNode* source, const TiXmlElement* root = NULL);
    3133  virtual ~Aim();
    3234
    33   void init();
    3435  virtual void loadParams(const TiXmlElement* root);
    3536
     
    4344  void setRange(float range) {this->range = range;};
    4445  void setAngle(float angle) {this->angle = angle;};
    45   void setGroup(OM_LIST group) {this->group = group;};
     46  void setTargetGroup(OM_LIST group) { this->targetGroup = group; };
     47  void setTargetGroupS(const std::string& grounName);
    4648
    4749  void setSize(float size);
     
    5355  virtual void draw() const;
    5456
    55  private:
    56    Material*        material;             //!< a material for the Aim.
    57    float            rotationSpeed;        //!< Speed of the Rotation.
    58    tAnimation<Aim>* anim;
     57private:
     58  void init();
    5959
    60    float            range;                //!<
    61    float            angle;                //!<
    62    Vector           diffVec;
    63    OM_LIST          group;
    6460
    65    PNode*           source;               //!< Where this Shot has come from.
     61private:
     62  Material         material;             //!< a material for the Aim.
     63  float            rotationSpeed;        //!< Speed of the Rotation.
     64  tAnimation<Aim>* anim;
    6665
    67    Text*            text;                 //!< A Text to display onto this Node. (distance to Target)
     66  float            range;                //!<
     67  float            angle;                //!<
     68  Vector           diffVec;
     69  OM_LIST          targetGroup;
     70
     71  PNode*           source;               //!< Where this Shot has come from.
     72
     73  //   Text             text;                 //!< A Text to display onto this Node. (distance to Target)
    6874};
    6975
Note: See TracChangeset for help on using the changeset viewer.