Sprite Object.  
 More...
#include <game.h>
 | 
| asw::Quad< float >  | transform | 
|   | The transform of the object.  
  | 
|   | 
| float  | rotation {0} | 
|   | The rotation of the object in degrees.  
  | 
|   | 
| int  | zIndex {0} | 
|   | The layer that the object is on.  
  | 
|   | 
| bool  | active {true} | 
|   | Whether or not the object is active.  
  | 
|   | 
| float  | alpha {1.0F} | 
|   | Opacity of the object.  
  | 
|   | 
| Physics  | body | 
|   | Physics body of the object.  
  | 
|   | 
| bool  | alive {true} | 
|   | Alive state.  
  | 
|   | 
Sprite Object. 
Definition at line 98 of file game.h.
 
◆ draw()
  
  
      
        
          | void asw::game::Sprite::draw  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
Draw the sprite to the screen. 
If a rotation is set, the sprite will be rotated around its center. 
Reimplemented from asw::game::GameObject.
Definition at line 124 of file game.h.
 
 
◆ setTexture()
  
  
      
        
          | void asw::game::Sprite::setTexture  | 
          ( | 
          const asw::Texture & |           texture,  | 
         
        
           | 
           | 
          bool |           autoSize = true ) | 
         
       
   | 
  
inline   | 
  
 
Set the texture of the sprite. 
- Parameters
 - 
  
    | texture | The texture to set.  | 
    | autoSize | Whether or not to automatically set the size of the sprite based on the texture dimensions.  | 
  
   
Definition at line 106 of file game.h.
 
 
◆ update()
  
  
      
        
          | void asw::game::Sprite::update  | 
          ( | 
          float |           deltaTime | ) | 
           | 
         
       
   | 
  
inlineoverridevirtual   | 
  
 
Update the sprite. 
- Parameters
 - 
  
    | deltaTime | The time since the last update.  | 
  
   
Reimplemented from asw::game::GameObject.
Definition at line 118 of file game.h.
 
 
◆ texture
The texture of the sprite. 
Definition at line 147 of file game.h.
 
 
The documentation for this class was generated from the following file: