|
Hummingbird Framework
|
Public Member Functions | |
| SpriteComponent (const Sprite &sprite=Sprite(), const std::vector< int > &frame_order=std::vector< int >(1, 0), const Time &frame_time=Time::seconds(0)) | |
| virtual void | postUpdate () override |
| Function called in the post-update step. | |
| void | setSprite (const Sprite &sprite) |
| void | setFrameOrder (const std::vector< int > &frame_order) |
| const std::vector< int > & | getFrameOrder () const |
| void | setFrameTime (const Time &frame_time) |
| const Time & | getFrameTime () const |
| const Sprite & | getSprite () const |
| Sprite & | getSprite () |
| Vector2d | getSize () const |
| bool | isVisible () const |
| void | setVisible (bool visible) |
| bool | isLooping () const |
| void | loop (bool loop) |
| bool | isPlaying () const |
| void | play () |
| void | stop () |
| void | setColor (const Color &color) |
| const Color & | getColor () const |
Public Member Functions inherited from hb::GameObject::Component | |
| Component () | |
| Default constructor. More... | |
| virtual | ~Component () |
| Default destructor. | |
| virtual void | init () |
| Function called once after the Component has been added to a GameObject. More... | |
| virtual void | preUpdate () |
| Function called in the pre-update step. | |
| virtual void | update () |
| Function called in the update step. | |
| GameObject * | getGameObject () const |
| Get the GameObject instance composed by this Component. More... | |
| void | setActive (bool active) |
| Set if Component is active. More... | |
| bool | isActive () const |
| Get if Component is active. More... | |
Public Member Functions inherited from hb::Transform | |
| Transform () | |
| Default constructor. More... | |
| Transform (const Vector3d &init_pos) | |
| Constructor with initial position. | |
| ~Transform () | |
| Class destructor. | |
| const Vector3d & | getPosition () const |
| Get Transform position. More... | |
| void | setPosition (const Vector3d &p) |
| Set position from a Vector3d. More... | |
| void | setPosition (double p_x, double p_y, double p_z) |
| Set position from doubles. More... | |
| const Vector3d & | getRotation () const |
| Get Transform rotation. More... | |
| void | setRotation (const Vector3d &rotation) |
| Set rotation from a Vector3d. More... | |
| void | setRotation (double rotation_x, double rotation_y, double rotation_z) |
| Set rotation from doubles. More... | |
| const Vector3d & | getScale () const |
| Get Transform scale. More... | |
| void | setScale (const Vector3d &scale) |
| Set scale from a Vector3d. More... | |
| void | setScale (double scale_x, double scale_y, double scale_z) |
| Set position from doubles. More... | |
Protected Member Functions | |
| Vector2d | getCoords () |
Protected Member Functions inherited from hb::GameObject::Component | |
| void | addListenerToGameObject (const std::string &name, std::function< void(DataRepository &)> &&listener) |
| void | ignoreToGameObject (const GameObjectMessageManager::ListenerId< DataRepository > &listener_id) |
Protected Attributes | |
| Time | m_time_left |
| Time | m_frame_time |
| unsigned int | m_current_frame |
| bool | m_visible |
| bool | m_playing |
| bool | m_looping |
| sf::Sprite | m_sprite |
| Sprite | m_animation |
| std::vector< int > | m_frame_order |
| Color | m_color |