17 #ifndef HEADER_SUPERTUX_OBJECT_BULLET_HPP 18 #define HEADER_SUPERTUX_OBJECT_BULLET_HPP 20 #include "sprite/sprite_ptr.hpp" 21 #include "supertux/direction.hpp" 22 #include "supertux/moving_object.hpp" 23 #include "supertux/physic.hpp" 24 #include "supertux/player_status.hpp" 29 Bullet(
const Vector& pos,
float xm, Direction dir, BonusType type);
31 virtual void update(
float dt_sec)
override;
43 BonusType get_type()
const {
return type; }
49 SpritePtr lightsprite;
Simple two dimensional vector.
Definition: vector.hpp:24
Definition: bullet.hpp:26
Physics engine.
Definition: physic.hpp:27
virtual void collision_solid(const CollisionHit &hit) override
this function is called when the object collided with something solid
Definition: bullet.cpp:96
virtual HitResponse collision(GameObject &other, const CollisionHit &hit) override
this function is called when the object collided with any other object
Definition: bullet.cpp:117
Base class for all the things that make up Levels' Sectors.
Definition: game_object.hpp:46
void ricochet(GameObject &other, const CollisionHit &hit)
Makes bullet bounce off an object (that got hit).
Definition: bullet.cpp:111
Base class for all dynamic/moving game objects.
Definition: moving_object.hpp:31
virtual void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: bullet.cpp:87
virtual void update(float dt_sec) override
This function is called once per frame and allows the object to update it's state.
Definition: bullet.cpp:60
virtual bool is_saveable() const override
Indicates if the object will be saved.
Definition: bullet.hpp:35
This class provides functions for drawing things on screen.
Definition: drawing_context.hpp:42
This class collects data about a collision.
Definition: collision_hit.hpp:44