NasNas
An intuitive and beginner friendly 2D game framework for C++
Public Member Functions | List of all members
ns::Sprite Class Reference
Inheritance diagram for ns::Sprite:
ns::Transformable

Public Member Functions

 Sprite (const sf::Sprite &other)
 
 Sprite (const sf::Texture &texture)
 
 Sprite (const sf::Texture &texture, const sf::IntRect &rectangle)
 
void setTexture (const sf::Texture &texture, bool reset_rect=false)
 
void setTextureRect (const sf::IntRect &rectangle)
 
void setColor (const sf::Color &color)
 
void setColor (const sf::Color &color, unsigned vert_index)
 
auto getTexture () const -> const sf::Texture *
 
auto getTextureRect () const -> const IntRect &
 
auto getColor () const -> const sf::Color &
 
auto getColor (unsigned vert_index) const -> const sf::Color &
 
auto getVertex (unsigned index) const -> const sf::Vertex &
 
auto getLocalBounds () const -> ns::FloatRect
 
auto getGlobalBounds () const -> ns::FloatRect
 
- Public Member Functions inherited from ns::Transformable
void setPosition (float x, float y)
 
void setPosition (const sf::Vector2f &position)
 
void setRotation (float angle)
 
void setScale (float factorX, float factorY)
 
void setScale (const sf::Vector2f &factors)
 
void setOrigin (float x, float y)
 
void setOrigin (const sf::Vector2f &origin)
 
void move (float offsetX, float offsetY)
 
void move (const sf::Vector2f &offset)
 
void rotate (float angle)
 
void scale (float factorX, float factorY)
 
void scale (const sf::Vector2f &factor)
 

Detailed Description

Definition at line 15 of file Sprite.hpp.


The documentation for this class was generated from the following file: