Last change
on this file since 1654 was
1558,
checked in by landauf, 16 years ago
|
added support for isVisible() and isActive() to all objects.
those functions are provided by BaseObject, combined with virtual functions changedVisibility and changedActivity respectively.
use them, to make orxonox scriptable, say: to change the state of objects with 2 simple functions instead of changing all meshes and emitters and billboards of an object. don't forget to pass calls to changedVisibility and changedActivity to the parent class.
additionally there is a new function, isInitialized(), provided by BaseObject too. this returns true if the constructor of BaseObject passed the object registration. this allows you, to check whether an object was properly initialized or if the constructor returned (as this is the case while creating the class hierarchy). use isInitialized() in your destructor before deleting something.
|
-
Property svn:eol-style set to
native
|
File size:
790 bytes
|
Rev | Line | |
---|
[1505] | 1 | #ifndef _RotatingProjectile_H__ |
---|
| 2 | #define _RotatingProjectile_H__ |
---|
| 3 | |
---|
[1552] | 4 | #include "OrxonoxPrereqs.h" |
---|
[1505] | 5 | #include "util/Math.h" |
---|
[1552] | 6 | #include "BillboardProjectile.h" |
---|
[1505] | 7 | |
---|
| 8 | namespace orxonox |
---|
| 9 | { |
---|
[1552] | 10 | class _OrxonoxExport RotatingProjectile : public BillboardProjectile |
---|
[1505] | 11 | { |
---|
| 12 | public: |
---|
| 13 | RotatingProjectile(SpaceShip* owner = 0); |
---|
| 14 | virtual ~RotatingProjectile(); |
---|
| 15 | void setConfigValues(); |
---|
| 16 | virtual void tick(float dt); |
---|
[1558] | 17 | virtual void changedVisibility(); |
---|
[1505] | 18 | |
---|
| 19 | private: |
---|
| 20 | ColourValue colour_; |
---|
| 21 | BillboardSet rotatingBillboard1_; |
---|
| 22 | BillboardSet rotatingBillboard2_; |
---|
| 23 | Ogre::SceneNode* rotatingNode1_; |
---|
| 24 | Ogre::SceneNode* rotatingNode2_; |
---|
| 25 | float time_; |
---|
| 26 | }; |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | #endif /* _RotatingProjectile_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.