Changeset 4779 in orxonox.OLD for orxonox/trunk/src/world_entities/weapons
- Timestamp:
- Jul 2, 2005, 10:03:59 PM (19 years ago)
- Location:
- orxonox/trunk/src/world_entities/weapons
- Files:
-
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/weapons/crosshair.cc
r4774 r4779 10 10 11 11 ### File Specific: 12 main-programmer: ...12 main-programmer: Benjamin Grauer 13 13 co-programmer: ... 14 14 */ … … 16 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ 17 17 18 #include " proto_class.h"18 #include "crosshair.h" 19 19 20 20 using namespace std; … … 25 25 \todo this constructor is not jet implemented - do it 26 26 */ 27 ProtoClass::ProtoClass()27 Crosshair::Crosshair () 28 28 { 29 this->setClassID(CL_PROTO_ID, "ProtoClass"); 29 this->setClassID(CL_CROSSHAIR, "Crosshair"); 30 this->setName("Crosshair"); 30 31 31 /* If you make a new class, what is most probably the case when you write this file32 don't forget to:33 1. Add the new file new_class.cc to the ./src/Makefile.am34 2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS35 36 Advanced Topics:37 - if you want to let your object be managed via the ObjectManager make sure to read38 the object_manager.h header comments. You will use this most certanly only if you39 make many objects of your class, like a weapon bullet.40 */41 32 } 42 33 … … 46 37 47 38 */ 48 ProtoClass::~ProtoClass()39 Crosshair::~Crosshair () 49 40 { 50 41 // delete what has to be deleted here 51 42 } 43 44 void Crosshair::process(const Event &event) 45 { 46 47 48 } -
orxonox/trunk/src/world_entities/weapons/crosshair.h
r4774 r4779 1 /*! 2 \file proto_class.h1 /*! 2 \file crosshair.h 3 3 \brief Definition of ... 4 4 5 5 */ 6 6 7 #ifndef _ PROTO_CLASS_H8 #define _ PROTO_CLASS_H7 #ifndef _CROSSHAIR_H 8 #define _CROSSHAIR_H 9 9 10 #include "base_object.h" 10 #include "event_listener.h" 11 12 #include "vector.h" 11 13 12 14 // FORWARD DEFINITION 13 15 14 16 15 16 //! A class for ... 17 class ProtoClass : public BaseObject { 17 //! A class that enables the 18 class Crosshair : public EventListener { 18 19 19 20 public: 20 ProtoClass();21 virtual ~ ProtoClass();21 Crosshair(); 22 virtual ~Crosshair(); 22 23 23 24 25 virtual void process(const Event &event); 26 27 /** @returns the current 3D-position of the Crosshair */ 28 const Vector& getPosition() { return this->position; }; 29 30 void tick(float dt); 31 void draw(); 32 24 33 private: 34 Vector position; //!< The current position of the Crosshair 25 35 26 36 }; 27 37 28 #endif /* _ PROTO_CLASS_H */38 #endif /* _CROSSHAIR_H */
Note: See TracChangeset
for help on using the changeset viewer.