source:
orxonox.OLD/orxonox/trunk/src/world_entities/world_entity.h
@
4230
Last change on this file since 4230 was 4010, checked in by bensch, 19 years ago | |
---|---|
File size: 1.6 KB |
Rev | Line | |
---|---|---|
[2077] | 1 | /*! |
2 | \file world_entity.h | |
[2190] | 3 | \brief Definition of the basic WorldEntity |
4 | */ | |
[2036] | 5 | |
[3224] | 6 | #ifndef _WORLD_ENTITY_H |
7 | #define _WORLD_ENTITY_H | |
[2036] | 8 | |
[3365] | 9 | #include "p_node.h" |
[3608] | 10 | #include "comincl.h" |
[3658] | 11 | #include "resource_manager.h" |
[2036] | 12 | |
[3658] | 13 | |
[3474] | 14 | //class CollisionCluster; |
[3583] | 15 | class CharacterAttributes; |
[3655] | 16 | class Model; |
[2036] | 17 | |
[3583] | 18 | |
[2190] | 19 | //! Basic class from which all interactive stuff in the world is derived from |
[3365] | 20 | class WorldEntity : public PNode |
[2190] | 21 | { |
[2551] | 22 | friend class World; |
[3365] | 23 | |
[2036] | 24 | public: |
[4010] | 25 | WorldEntity (void); |
26 | WorldEntity(TiXmlElement* root); | |
[3221] | 27 | virtual ~WorldEntity (); |
[3365] | 28 | |
[3531] | 29 | |
[3474] | 30 | //void setCollision (CollisionCluster* newhull); |
[2551] | 31 | |
[2190] | 32 | //void addAbility(Ability* ability); |
33 | //void removeAbility(Ability* ability); | |
[3583] | 34 | void setDrawable (bool bDraw); |
35 | void setCharacterAttributes(CharacterAttributes* charAttr); | |
36 | CharacterAttributes* getCharacterAttributes(); | |
37 | ||
[3229] | 38 | virtual void postSpawn (); |
[3583] | 39 | virtual void leftWorld (); |
40 | ||
[3578] | 41 | virtual void hit (WorldEntity* weapon, Vector* loc); |
[2190] | 42 | virtual void collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); |
[2551] | 43 | virtual void command (Command* cmd); |
[3365] | 44 | |
45 | void processDraw (); | |
[2190] | 46 | virtual void draw (); |
[3583] | 47 | virtual void tick (float time); |
[2551] | 48 | |
[3583] | 49 | protected: |
[3655] | 50 | Model* model; //!< The model that should be loaded for this entity. |
[3583] | 51 | CharacterAttributes* charAttr; //!< the character attributes of a world_entity |
[2551] | 52 | |
[2036] | 53 | private: |
[3449] | 54 | bool bCollide; //!< If it should be considered for the collisiontest. |
55 | bool bDraw; //!< If it should be visible. | |
[3365] | 56 | |
[3583] | 57 | |
58 | ||
[3474] | 59 | //CollisionCluster* collisioncluster; //!< The collision-Cluster of this entity. |
[2036] | 60 | }; |
61 | ||
[3224] | 62 | #endif /* _WORLD_ENTITY_H */ |
Note: See TracBrowser
for help on using the repository browser.