17 #ifndef HEADER_SUPERTUX_OBJECT_ICECRUSHER_HPP 18 #define HEADER_SUPERTUX_OBJECT_ICECRUSHER_HPP 20 #include "object/moving_sprite.hpp" 21 #include "supertux/physic.hpp" 29 enum IceCrusherState {
45 virtual void update(
float dt_sec)
override;
47 virtual std::string get_class()
const override {
return "icecrusher"; }
48 virtual std::string get_display_name()
const override {
return _(
"Ice crusher"); }
50 virtual void after_editor_set()
override;
53 bool found_victim()
const;
54 void set_state(IceCrusherState state,
bool force =
false);
55 Vector eye_position(
bool right)
const;
57 void after_sprite_set();
60 IceCrusherState state;
69 IceCrusherSize ic_size;
virtual void draw(DrawingContext &context) override
The GameObject should draw itself onto the provided DrawingContext if this function is called...
Definition: icecrusher.cpp:237
Simple two dimensional vector.
Definition: vector.hpp:24
Physics engine.
Definition: physic.hpp:27
virtual void update(float dt_sec) override
This function is called once per frame and allows the object to update it's state.
Definition: icecrusher.cpp:189
virtual HitResponse collision(GameObject &other, const CollisionHit &hit) override
this function is called when the object collided with any other object
Definition: icecrusher.cpp:98
Base class for all the things that make up Levels' Sectors.
Definition: game_object.hpp:46
This class is the base class for icecrushers that tux can stand on.
Definition: icecrusher.hpp:26
virtual void collision_solid(const CollisionHit &hit) override
this function is called when the object collided with something solid
Definition: icecrusher.cpp:127
Definition: reader_mapping.hpp:31
Abstract base class for MovingObjects that are represented by a Sprite.
Definition: moving_sprite.hpp:29
Definition: player.hpp:39
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