#ifndef _BallProjectile_H__ #define _BallProjectile_H__ #include "weapons/WeaponsPrereqs.h" #include "weapons/projectiles/BillboardProjectile.h" #include "../../OrxoBlox/OrxoBlox.h" #include "../../OrxoBlox/OrxoBloxStones.h" #include "OrxoBlox/OrxoBloxPrereqs.h" namespace orxonox { class _WeaponsExport BallProjectile : public BillboardProjectile { public: BallProjectile(Context* context); void Bounce(WorldEntity* otherObject, btManifoldPoint& contactPoint, const btCollisionShape* cs); virtual void setMaterial(const std::string& material) override; virtual void tick(float dt) override; void setSpeed(float speed); protected: bool processCollision(WorldEntity* otherObject, btManifoldPoint& contactPoint, const btCollisionShape* cs) override; private: void destroyObject() override; void registerVariables(); void changeTexture(); OrxoBlox* getOrxoBlox(); float speed_; //!< The speed (in x-direction) of the ball. float fieldWidth_; //!< The width of the playing field. float fieldHeight_; //!< The height of the playing field. unsigned int textureIndex_; //!< The current index of the texture. (i.e. the index of the currently displayed texture) unsigned int maxTextureIndex_; //!< The maximal index. std::string materialBase_; //!< The base name of the material. OrxoBlox* orxoblox_; OrxoBloxStones* stone_; }; } #endif /* _ParticleProjectile_H__ */