34 #ifndef _SimpleRocket_H__ 35 #define _SimpleRocket_H__ 49 class ConeCollisionShape;
64 virtual void tick(
float dt)
override;
66 virtual bool collidesAgainst(
WorldEntity* otherObject,
const btCollisionShape* cs, btManifoldPoint& contactPoint)
override;
74 virtual void rotateYaw(
const Vector2& value)
override;
75 virtual void rotatePitch(
const Vector2& value)
override;
76 virtual void rotateRoll(
const Vector2& value)
override;
84 { this->moveFrontBack(Vector2(value, 0)); }
90 { this->moveRightLeft(Vector2(value, 0)); }
96 { this->moveUpDown(Vector2(value, 0)); }
103 { this->rotateYaw(Vector2(value, 0)); }
109 { this->rotatePitch(Vector2(value, 0)); }
115 { this->rotateRoll(Vector2(value, 0)); }
117 virtual void setShooter(
Pawn* shooter)
override;
120 {
return this->fuel_; }
Everything in Orxonox that has a health attribute is a Pawn.
Definition: Pawn.h:56
void rotateYaw(float value)
Rotates the SimpleRocket around the y-axis by the specifed amount.
Definition: SimpleRocket.h:102
static const float FUEL_PERCENTAGE
Percentage of lifetime the rocket has fuel.
Definition: SimpleRocket.h:124
Vector3 localAngularVelocity_
Variable to temporarily store accumulated steering command input.
Definition: SimpleRocket.h:126
Shared library macros, enums, constants and forward declarations for the weapons module ...
void rotateRoll(float value)
Rotates the SimpleRocket around the z-axis by the specifed amount.
Definition: SimpleRocket.h:114
Interface for receiving window events.
Definition: RadarViewable.h:48
WeakPtr wraps a pointer to an object, which becomes nullptr if the object is deleted.
Definition: CorePrereqs.h:236
Definition: ParticleEmitter.h:39
The WorldEntity represents everything that can be put in a Scene at a certain location.
Definition: WorldEntity.h:72
SimpleRocket is a target seeking, intelligent rocket.
Definition: SimpleRocket.h:59
Timer destroyTimer_
Timer to destroy the projectile after its lifetime has run out.
Definition: SimpleRocket.h:130
void moveRightLeft(float value)
Moves the SimpleRocket in the Right/Left-direction by the specifed amount.
Definition: SimpleRocket.h:89
Declaration of the Timer class, used to call functions after a given time-interval.
WeakPtr< PlayerInfo > player_
The player the SimpleRocket belongs to.
Definition: SimpleRocket.h:129
bool fuel_
Bool is true while the rocket "has fuel".
Definition: SimpleRocket.h:127
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
void moveUpDown(float value)
Moves the SimpleRocket in the Up/Down-direction by the specifed amount.
Definition: SimpleRocket.h:95
virtual void moveRightLeft(const Vector2 &value) override
Definition: SimpleRocket.h:71
void moveFrontBack(float value)
Moves the SimpleRocket in the Front/Back-direction by the specifed amount.
Definition: SimpleRocket.h:83
bool hasFuel() const
Definition: SimpleRocket.h:119
Implementation of the BasicProjectile class.
Baseclass of all projectiles.
Definition: BasicProjectile.h:54
float lifetime_
The time the projectile exists.
Definition: SimpleRocket.h:131
Timer is a helper class that executes a function after a given amount of seconds in game-time...
Definition: Timer.h:105
virtual void moveUpDown(const Vector2 &value) override
Definition: SimpleRocket.h:72
void rotatePitch(float value)
Rotates the SimpleRocket around the x-axis by the specifed amount.
Definition: SimpleRocket.h:108
virtual void moveFrontBack(const Vector2 &value) override
Definition: SimpleRocket.h:70
The ControllableEntity is derived from the orxonox::MobileEntity.
Definition: ControllableEntity.h:48
#define _WeaponsExport
Definition: WeaponsPrereqs.h:60
ParticleEmitter * fire_
Fire-Emittor.
Definition: SimpleRocket.h:133